:root {
    --forest: #1a2e1c;
    --moss: #2d4a2e;
    --gold: #c9a84c;
    --gold-light: #e8d5a3;
    --cream: #faf7f2;
    --bark: #7a6250;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--cream);
    color: var(--forest);
}

/* ── LEFT PANEL ── */
.auth-left {
    background: var(--forest);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 52px 60px;
    min-height: 100vh;
}

.auth-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 50% at 80% 15%, rgba(201, 168, 76, .15) 0%, transparent 60%), radial-gradient(ellipse 50% 60% at 5% 85%, rgba(201, 168, 76, .10) 0%, transparent 55%);
    pointer-events: none;
}

.auth-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.auth-logo span {
    color: #fff;
}

.auth-left-body {
    position: relative;
    z-index: 1;
}

.auth-left-body h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.8rem, 4vw, 3.8rem);
    font-weight: 300;
    color: #fff;
    line-height: 1.12;
    margin-bottom: 22px;
}

.auth-left-body h1 em {
    font-style: italic;
    color: var(--gold-light);
}

.auth-left-body p {
    color: rgba(255, 255, 255, .5);
    font-size: 15px;
    line-height: 1.75;
    max-width: 320px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: rgba(255, 255, 255, .35);
    text-decoration: none;
    margin-top: 28px;
    letter-spacing: .5px;
    transition: color .2s;
}

.back-link:hover {
    color: var(--gold);
}

.auth-left-footer {
    font-size: 12px;
    color: rgba(255, 255, 255, .22);
    letter-spacing: .5px;
    position: relative;
    z-index: 1;
}

/* ── RIGHT PANEL ── */
.auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    min-height: 100vh;
}

.auth-box {
    width: 100%;
    max-width: 390px;
}

.auth-eyebrow {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 6px;
}

.auth-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.3rem;
    font-weight: 400;
    color: var(--forest);
    margin-bottom: 6px;
}

.auth-sub {
    color: var(--bark);
    font-size: 14px;
    margin-bottom: 32px;
}

.msg {
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 10px;
}

.msg.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.msg.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #374151;
    margin-bottom: 7px;
}

.field input {
    width: 100%;
    padding: 13px 15px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #1f2937;
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.field input:focus {
    border-color: var(--forest);
    box-shadow: 0 0 0 3px rgba(26, 46, 28, .08);
}

.auth-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 26px;
    font-size: 13px;
}

.auth-options a {
    color: var(--forest);
    font-weight: 600;
    text-decoration: none;
}

.auth-options a:hover {
    color: var(--gold);
}

.btn-submit {
    width: 100%;
    background: var(--forest);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, transform .15s;
}

.btn-submit:hover {
    background: var(--moss);
    transform: translateY(-1px);
}

.auth-switch {
    margin-top: 22px;
    text-align: center;
    font-size: 13px;
    color: var(--bark);
}

.auth-switch a {
    color: var(--forest);
    font-weight: 700;
    text-decoration: none;
}

.auth-switch a:hover {
    color: var(--gold);
}

@media (max-width: 768px) {
    body {
        grid-template-columns: 1fr;
    }

    .auth-left {
        display: none;
    }

    .auth-right {
        padding: 48px 24px;
        min-height: 100vh;
    }
}

/* ── OTP PHONE FIELD ── */
.otp-phone-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.otp-phone-wrap:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.12); background: #fff; }
.otp-phone-wrap.ph-ok  { border-color: #16a34a; background: #fff; }
.otp-phone-wrap.ph-err { border-color: #ef4444; background: #fff; }
.otp-phone-pfx {
    padding: 0 14px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    background: #f1f5f9;
    border-right: 1.5px solid #e2e8f0;
    line-height: 46px;
    white-space: nowrap;
    user-select: none;
}
.otp-phone-inp {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 13px 14px;
    font-size: 14px;
    letter-spacing: 1px;
    color: #1e293b;
    font-family: inherit;
}
.otp-phone-msg {
    display: block;
    font-size: 11px;
    margin-top: 5px;
    min-height: 16px;
    font-weight: 600;
}
.otp-phone-msg.err { color: #ef4444; }
.otp-phone-msg.ok  { color: #16a34a; }


/* ─────────────────────────────
   PREMIUM MOBILE LOGIN UI
───────────────────────────── */

.mobile-login-hero {
    display: none;
}

@media (max-width: 768px) {
    body {
        display: block;
        min-height: 100vh;
        background:
            linear-gradient(180deg, rgba(250,247,242,0.2) 0%, rgba(250,247,242,1) 42%),
            url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?q=80&w=1200&auto=format&fit=crop");
        background-size: cover;
        background-position: center top;
        color: var(--forest);
    }

    .auth-left {
        display: none;
    }

    .auth-right {
        min-height: 100vh;
        padding: 38px 18px 28px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
    }

    .mobile-login-hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 10px 0 28px;
        color: var(--forest);
        text-align: center;
    }

    .mobile-logo-mark {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--gold);
        border: 1px solid rgba(201, 168, 76, 0.45);
        background: rgba(255, 255, 255, 0.74);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        font-size: 20px;
        margin-bottom: 10px;
        box-shadow: 0 10px 28px rgba(26, 46, 28, 0.12);
    }

    .mobile-logo-text span {
        display: block;
        font-family: 'Cormorant Garamond', serif;
        font-size: 32px;
        line-height: 1;
        letter-spacing: 5px;
        font-weight: 500;
        color: var(--forest);
    }

    .mobile-logo-text strong {
        display: block;
        margin-top: 5px;
        font-size: 12px;
        letter-spacing: 6px;
        color: var(--gold);
        font-weight: 700;
    }

    .auth-box {
        width: 100%;
        max-width: 390px;
        background: rgba(255, 252, 247, 0.94);
        border: 1px solid rgba(255, 255, 255, 0.72);
        border-radius: 30px;
        padding: 34px 24px 28px;
        box-shadow:
            0 24px 70px rgba(26, 46, 28, 0.18),
            inset 0 1px 0 rgba(255,255,255,0.8);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    .auth-eyebrow {
        text-align: center;
        font-size: 12px;
        letter-spacing: 5px;
        color: var(--gold);
        margin-bottom: 10px;
    }

    .auth-title {
        text-align: center;
        font-size: 54px;
        line-height: 1;
        color: var(--forest);
        margin-bottom: 14px;
    }

    .auth-sub {
        text-align: center;
        font-size: 15px;
        line-height: 1.55;
        color: #6f6258;
        margin-bottom: 30px;
    }

    .field {
        margin-bottom: 20px;
    }

    .field label {
        font-size: 13px;
        letter-spacing: 0;
        text-transform: none;
        color: #111827;
        margin-bottom: 9px;
        font-weight: 800;
    }

    .field input {
        height: 58px;
        border-radius: 14px;
        border: 1.5px solid #ded6cc;
        background: rgba(255,255,255,0.92);
        padding: 0 16px;
        font-size: 15px;
        color: #111827;
        box-shadow: 0 6px 18px rgba(26, 46, 28, 0.04);
    }

    .field input::placeholder {
        color: #9ca3af;
    }

    .field input:focus {
        border-color: var(--gold);
        box-shadow: 0 0 0 4px rgba(201, 168, 76, .16);
    }

    .auth-options {
        margin-top: -6px;
        margin-bottom: 24px;
    }

    .auth-options a {
        font-size: 14px;
        color: var(--forest);
        font-weight: 800;
    }

    .btn-submit {
        height: 58px;
        border-radius: 15px;
        background: linear-gradient(135deg, #123318, #1a2e1c);
        color: #fff;
        font-size: 15px;
        letter-spacing: 0;
        text-transform: none;
        box-shadow: 0 16px 34px rgba(26, 46, 28, .22);
    }

    .btn-submit:hover {
        background: linear-gradient(135deg, #1f4a28, #1a2e1c);
    }

    .auth-box > div[style*="text-align:center"] {
        margin: 22px 0 !important;
        color: #8b7b6d !important;
        font-size: 15px !important;
        position: relative;
    }

    .auth-box > div[style*="text-align:center"]::before,
    .auth-box > div[style*="text-align:center"]::after {
        content: "";
        display: inline-block;
        width: 34%;
        height: 1px;
        background: #e3dbd1;
        vertical-align: middle;
        margin: 0 10px;
    }

    .auth-box a.btn-submit {
        background: #fff !important;
        color: #1f2937 !important;
        border: 1px solid #e4ddd4 !important;
        box-shadow: 0 10px 24px rgba(26, 46, 28, 0.08);
        font-size: 15px;
        text-transform: none;
        letter-spacing: 0;
    }

    .auth-switch {
        margin-top: 26px;
        font-size: 14px;
        color: #6f6258;
    }

    .auth-switch a {
        color: var(--forest);
        font-weight: 900;
    }

    .otp-login-box {
        margin-top: 14px;
        padding-top: 8px;
    }

    .otp-phone-wrap {
        height: 58px;
        border-radius: 14px;
    }

    .otp-phone-pfx {
        line-height: 58px;
    }

    .otp-phone-inp {
        font-size: 15px;
    }
}

@media (max-width: 380px) {
    .auth-right {
        padding: 26px 14px 22px;
    }

    .auth-box {
        padding: 30px 20px 24px;
        border-radius: 26px;
    }

    .auth-title {
        font-size: 48px;
    }

    .mobile-logo-text span {
        font-size: 28px;
    }
}