/* =============================================
   PREDIKSIKARIR — AUTH PAGE STYLES
   style.css
   ============================================= */

/* ---------- VARIABLES ---------- */
:root {
    --brand-deep:    #0d3d57;
    --brand-mid:     #13547a;
    --brand-teal:    #3aa6a6;
    --brand-light:   #80d0c7;
    --accent:        #f6a623;

    --bg:            #f0f6fb;
    --card-bg:       #ffffff;
    --input-bg:      #f8fafb;
    --border:        #dde8ef;
    --border-focus:  #3aa6a6;

    --text-dark:     #0d1f2d;
    --text-mid:      #4a6274;
    --text-muted:    #8fa8ba;

    --error:         #e5534b;
    --success:       #2eb88a;
    --info:          #3aa6a6;

    --radius-sm:     8px;
    --radius-md:     14px;
    --radius-lg:     22px;
    --radius-xl:     32px;

    --shadow-card:   0 24px 64px rgba(13, 61, 87, 0.14), 0 4px 16px rgba(13, 61, 87, 0.08);
    --shadow-btn:    0 8px 24px rgba(19, 84, 122, 0.28);
    --shadow-input:  0 0 0 3px rgba(58, 166, 166, 0.18);

    --transition:    all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* ---------- BACKGROUND ORBS ---------- */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
    animation: orbFloat 8s ease-in-out infinite;
}

.orb-1 {
    width: 520px; height: 520px;
    background: radial-gradient(circle, #80d0c7, #13547a);
    top: -160px; left: -160px;
    animation-delay: 0s;
}

.orb-2 {
    width: 380px; height: 380px;
    background: radial-gradient(circle, #f6a623, #e5534b);
    bottom: -100px; right: -100px;
    animation-delay: -3s;
}

.orb-3 {
    width: 260px; height: 260px;
    background: radial-gradient(circle, #3aa6a6, #0d3d57);
    top: 50%; left: 60%;
    animation-delay: -5s;
}

@keyframes orbFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-30px) scale(1.05); }
}

/* ---------- AUTH WRAPPER & CARD ---------- */
.auth-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.auth-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
}

/* ---------- AUTH PANELS ---------- */
.auth-panel {
    padding: 44px 40px;
    display: none;
    animation: panelIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-panel.active {
    display: block;
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- BRAND ---------- */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.brand-icon {
    font-size: 28px;
    line-height: 1;
}

.brand-name {
    font-family: 'Sora', sans-serif;
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand-mid), var(--brand-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- TITLES ---------- */
.auth-title {
    font-family: 'Sora', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.5;
}

/* ---------- ALERT ---------- */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 20px;
    border: 1.5px solid transparent;
    transition: var(--transition);
}

.alert.alert-info    { background: #e8f7f7; color: var(--info);    border-color: #b3e8e8; }
.alert.alert-success { background: #e6f9f3; color: var(--success); border-color: #a3e8d0; }
.alert.alert-danger  { background: #fdecea; color: var(--error);   border-color: #f5b8b5; }

.alert i { font-size: 16px; flex-shrink: 0; }

.hidden { display: none !important; }

/* ---------- FIELD GROUP ---------- */
.field-group {
    margin-bottom: 18px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 7px;
}

.field-label i { font-size: 13px; }

.field-input {
    width: 100%;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    transition: var(--transition);
    outline: none;
}

.field-input::placeholder { color: var(--text-muted); }

.field-input:focus {
    border-color: var(--border-focus);
    background: #fff;
    box-shadow: var(--shadow-input);
}

.field-input.input-error {
    border-color: var(--error);
    background: #fff8f8;
}

.field-error {
    font-size: 12px;
    color: var(--error);
    margin-top: 5px;
    min-height: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ---------- INPUT WITH ICON ---------- */
.input-icon-wrap {
    position: relative;
}

.input-icon-wrap .field-input {
    padding-right: 42px;
}

.toggle-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 2px;
    transition: color 0.2s;
    line-height: 1;
}

.toggle-eye:hover { color: var(--brand-mid); }

/* ---------- ROW BETWEEN ---------- */
.row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* ---------- CHECKBOX ---------- */
.check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--text-mid);
    user-select: none;
}

.check-input { display: none; }

.check-box {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 5px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    background: var(--input-bg);
}

.check-input:checked + .check-box {
    background: linear-gradient(135deg, var(--brand-mid), var(--brand-teal));
    border-color: var(--brand-teal);
}

.check-input:checked + .check-box::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
}

.terms-label {
    align-items: flex-start;
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.5;
}

/* ---------- LINKS ---------- */
.link-muted {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: color 0.2s;
}

.link-muted:hover { color: var(--brand-mid); }

.link-accent {
    color: var(--brand-teal);
    text-decoration: none;
    font-weight: 600;
}

.link-accent:hover { text-decoration: underline; }

/* ---------- BUTTONS ---------- */
.btn-primary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    background: linear-gradient(135deg, var(--brand-mid) 0%, var(--brand-teal) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    transition: var(--transition);
    box-shadow: var(--shadow-btn);
    letter-spacing: 0.2px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(19, 84, 122, 0.38);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary i { font-size: 16px; }

.btn-primary.loading {
    pointer-events: none;
    opacity: 0.75;
}

.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: white;
    color: var(--text-dark);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-google:hover {
    background: #fafafa;
    border-color: #bbb;
    transform: translateY(-1px);
}

/* ---------- DIVIDER ---------- */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider span {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ---------- TOGGLE HINT ---------- */
.toggle-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 13.5px;
    color: var(--text-muted);
}

.link-toggle {
    background: none;
    border: none;
    color: var(--brand-mid);
    font-family: 'Sora', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.link-toggle:hover { color: var(--brand-teal); }

/* ---------- SPINNER ---------- */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 540px) {
    .auth-wrapper { padding: 12px; }
    .auth-panel   { padding: 32px 24px; }
    .auth-title   { font-size: 22px; }

    .field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
