/* ═══════════════════════════════════════════════════════════
   AUTH.CSS  —  SaraSutra  |  Login & Register
   Design: Dark full-bleed bg, centered split card
═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; }

:root {
    --gold:       #C9A84C;
    --gold-dim:   rgba(201,168,76,0.15);
    --navy:       #0B1D33;
    --navy-mid:   #0f2540;
    --navy-card:  #122849;
    --white:      #ffffff;
    --cream:      #FAFAF7;
    --ink:        #1A1A1A;
    --ink-mid:    #4A4A4A;
    --ink-muted:  #888888;
    --border:     #E5DDD0;
    --red:        #C0392B;
    --ease:       cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    height: 100%;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ════════════════════════════════════
   PAGE — full bleed dark bg
════════════════════════════════════ */
.auth-page {
    min-height: 100vh;
    margin-top: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

/* Ambient glows */
.auth-page::before {
    content: '';
    position: absolute;
    top: -120px; left: -120px;
    width: 560px; height: 560px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201,168,76,0.07) 0%, transparent 65%);
    pointer-events: none;
}
.auth-page::after {
    content: '';
    position: absolute;
    bottom: -100px; right: -100px;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30,80,160,0.18) 0%, transparent 65%);
    pointer-events: none;
}

/* Dot grid */
.auth-bg-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
}

/* ════════════════════════════════════
   CARD — the actual split container
════════════════════════════════════ */
.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1000px;
    display: grid;
    grid-template-columns: 420px 1fr;
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(201,168,76,0.14),
        0 32px 80px rgba(0,0,0,0.55),
        0 8px 20px rgba(0,0,0,0.3);
    min-height: 600px;
}

/* ════════════════════════════════════
   LEFT — Brand panel
════════════════════════════════════ */
.auth-brand {
    background: var(--navy-card);
    padding: 52px 44px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Thin gold border on right edge */
.auth-brand::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 1px; height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(201,168,76,0.3) 30%, rgba(201,168,76,0.3) 70%, transparent 100%);
}

/* Corner bracket top-left */
.auth-brand::before {
    content: '';
    position: absolute;
    top: 22px; left: 22px;
    width: 50px; height: 50px;
    border-top: 1px solid rgba(201,168,76,0.25);
    border-left: 1px solid rgba(201,168,76,0.25);
    pointer-events: none;
}

.ab-corner-br {
    position: absolute;
    bottom: 22px; right: 22px;
    width: 50px; height: 50px;
    border-bottom: 1px solid rgba(201,168,76,0.25);
    border-right: 1px solid rgba(201,168,76,0.25);
}

/* Logo */
.ab-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 56px;
}

.ab-logo-mark {
    width: 42px; height: 42px;
    border-radius: 11px;
    background: rgba(201,168,76,0.1);
    border: 1px solid rgba(201,168,76,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ab-logo-mark svg {
    width: 20px; height: 20px;
}

.ab-brand-name {
    display: block;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--white);
    line-height: 1.1;
}

.ab-brand-sub {
    display: block;
    font-size: 9px;
    letter-spacing: 0.24em;
    color: var(--gold);
    text-transform: uppercase;
    margin-top: 3px;
}

/* Headline block */
.ab-copy {
    flex: 1;
}

.ab-headline {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.6rem;
    font-weight: 300;
    line-height: 1.12;
    color: var(--white);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.ab-headline em {
    font-style: italic;
    color: var(--gold);
}

.ab-desc {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
    line-height: 1.8;
    max-width: 260px;
    margin-bottom: 40px;
}

/* Gold ornament */
.ab-ornament {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
}

.ab-ornament-line {
    height: 1px;
    width: 24px;
    background: var(--gold);
    opacity: 0.45;
}

.ab-ornament-diamond {
    width: 5px; height: 5px;
    background: var(--gold);
    transform: rotate(45deg);
    opacity: 0.6;
    flex-shrink: 0;
}

/* Feature list */
.ab-features {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 48px;
}

.ab-feat {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.81rem;
    color: rgba(255,255,255,0.52);
}

.ab-feat-bullet {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.55;
    flex-shrink: 0;
}

/* Stats row */
.ab-stats {
    display: flex;
    gap: 0;
    padding-top: 24px;
    border-top: 1px solid rgba(201,168,76,0.1);
}

.ab-stat {
    flex: 1;
    text-align: center;
    padding: 0 8px;
}

.ab-stat + .ab-stat {
    border-left: 1px solid rgba(255,255,255,0.07);
}

.ab-stat-num {
    display: block;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.7rem;
    font-weight: 500;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 4px;
}

.ab-stat-label {
    display: block;
    font-size: 9px;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
}

/* Background orb in brand panel */
.ab-glow {
    position: absolute;
    bottom: -100px; left: -60px;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201,168,76,0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* ════════════════════════════════════
   RIGHT — Form panel
════════════════════════════════════ */
.auth-form-panel {
    background: var(--cream);
    padding: 52px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

/* Form header */
.afp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 10px;
}

.afp-eyebrow::before {
    content: '';
    width: 18px; height: 1px;
    background: var(--gold);
    display: block;
}

.afp-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.4rem;
    font-weight: 400;
    color: var(--navy);
    line-height: 1.1;
    margin-bottom: 6px;
}

.afp-sub {
    font-size: 0.84rem;
    color: var(--ink-muted);
    margin-bottom: 28px;
}

/* ── Form fields ── */
.afp-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.af-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.af-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.af-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-mid);
}

.af-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.af-forgot {
    font-size: 11px;
    color: var(--gold);
    font-weight: 600;
    transition: opacity 0.2s;
}
.af-forgot:hover { opacity: 0.65; }

.af-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.af-icon {
    position: absolute;
    left: 13px;
    color: #C4BBB0;
    font-size: 12.5px;
    pointer-events: none;
    z-index: 1;
    transition: color 0.2s;
}

.af-input {
    width: 100%;
    padding: 11px 40px 11px 38px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.22s, box-shadow 0.22s;
    -webkit-appearance: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.af-input::placeholder { color: #CDBFB0; font-size: 0.84rem; }

.af-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}

.af-wrap:focus-within .af-icon { color: var(--gold); }

.af-input--error {
    border-color: var(--red) !important;
    box-shadow: 0 0 0 3px rgba(192,57,43,0.09) !important;
}

.af-select { padding-right: 38px; cursor: pointer; }

.af-select-arrow {
    position: absolute;
    right: 12px;
    color: #C4BBB0;
    font-size: 10px;
    pointer-events: none;
}

.af-toggle-pw {
    position: absolute;
    right: 11px;
    background: none;
    border: none;
    color: #C4BBB0;
    font-size: 13px;
    padding: 4px;
    line-height: 1;
    z-index: 1;
    transition: color 0.2s;
}
.af-toggle-pw:hover { color: var(--gold); }

.af-error {
    font-size: 10.5px;
    color: var(--red);
    min-height: 14px;
    letter-spacing: 0.02em;
}

/* Remember */
.af-remember { margin-top: -3px; }

.af-check-label {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
}

.af-check-real { display: none; }

.af-check-box {
    width: 17px; height: 17px;
    border: 1.5px solid #D2C8BA;
    border-radius: 5px;
    background: #fff;
    flex-shrink: 0;
    position: relative;
    transition: all 0.18s;
}

.af-check-real:checked + .af-check-box {
    background: var(--gold);
    border-color: var(--gold);
}

.af-check-real:checked + .af-check-box::after {
    content: '';
    position: absolute;
    left: 4px; top: 1.5px;
    width: 5px; height: 8px;
    border: 2px solid #fff;
    border-top: none; border-left: none;
    transform: rotate(45deg);
}

.af-check-text {
    font-size: 0.82rem;
    color: var(--ink-muted);
}

/* ── Submit button ── */
.af-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 13px 24px;
    background: var(--navy);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: none;
    border-radius: 10px;
    transition: background 0.25s, transform 0.18s, box-shadow 0.25s;
    margin-top: 4px;
    position: relative;
    overflow: hidden;
}

.af-btn::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(201,168,76,0.7) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.af-btn:hover:not(:disabled) {
    background: #163550;
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(11,29,51,0.3);
}

.af-btn:hover:not(:disabled)::after { opacity: 1; }
.af-btn:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
.af-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.af-btn-icon {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    transition: border-color 0.2s, transform 0.2s;
}

.af-btn:hover .af-btn-icon {
    border-color: rgba(201,168,76,0.6);
    transform: translateX(2px);
}

/* Divider */
.af-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #C0B8AC;
    font-size: 10.5px;
    letter-spacing: 0.06em;
}

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

/* Switch & Terms */
.af-switch {
    font-size: 0.84rem;
    color: var(--ink-muted);
    text-align: center;
    margin: 0;
}

.af-link {
    color: var(--navy);
    font-weight: 700;
    margin-left: 4px;
    transition: color 0.2s;
    border-bottom: 1.5px solid rgba(201,168,76,0.3);
    padding-bottom: 1px;
}
.af-link:hover { color: var(--gold); border-color: var(--gold); }

.af-terms {
    font-size: 0.74rem;
    color: #B0A898;
    text-align: center;
    line-height: 1.6;
    margin: 0;
}

.af-terms-link {
    color: #8E8479;
    border-bottom: 1px solid #D4C8B4;
    padding-bottom: 1px;
    margin: 0 2px;
    font-weight: 500;
    font-size: inherit;
    transition: color 0.2s;
}
.af-terms-link:hover { color: var(--gold); }

/* ════════════════════════════════════
   RESPONSIVE
════════════════════════════════════ */
@media (max-width: 860px) {
    .auth-card {
        grid-template-columns: 1fr;
        max-width: 460px;
        min-height: auto;
    }
    .auth-brand { display: none; }
    .auth-form-panel { padding: 52px 36px; border-radius: 24px; }
}

@media (max-width: 500px) {
    .auth-page { padding: 40px 20px; min-height: auto; }
    .auth-card { max-width: 100%; border-radius: 0; box-shadow: none; }
    .auth-form-panel { padding: 52px 22px 40px; border-radius: 0; justify-content: flex-start; padding-top: 60px; }
    .af-row { grid-template-columns: 1fr; gap: 15px; }
}