: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 ── */
/* Moody mountain photo (same stock frame used for the homepage hero) under
   a forest-green color grade, rather than a flat fill — the reference look
   calls for real depth here since this panel now carries a lot more
   visual weight than the original plain-color version. */
.auth-left {
    background:
        linear-gradient(165deg, rgba(8, 20, 10, .84) 0%, rgba(20, 40, 22, .68) 45%, rgba(6, 14, 7, .92) 100%),
        url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?q=80&w=1200&auto=format&fit=crop') center 30% / cover no-repeat;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 52px 60px;
    min-height: 100vh;
}

.auth-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 55% 60% at 8% 95%, rgba(201, 168, 76, .10) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

/* Vignette — darkens the outer edges so the (already dim) corner photo
   detail recedes and the gold/cream foreground content stays legible. */
.auth-left::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 90% 80% at 50% 45%, transparent 45%, rgba(4, 10, 5, .55) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Soft warm moon glow, upper-right sky. */
.auth-left-moon {
    position: absolute;
    top: 54px;
    right: 96px;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 248, 222, .85) 0%, rgba(232, 213, 163, .4) 40%, transparent 72%);
    filter: blur(5px);
    pointer-events: none;
    z-index: 0;
}

.auth-left-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Hand-drawn leaf clusters (SVG, not a stock cutout) trailing in from the
   corners — one base cluster, mirrored per corner via transform so only
   one asset has to be authored/maintained. */
.leaf-corner {
    position: absolute;
    width: 240px;
    height: 260px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='260' viewBox='0 0 240 260'%3E%3Cg transform='translate(200,5) rotate(38)'%3E%3Cpath d='M0,0 Q42,-30 84,0 Q42,30 0,0 Z' fill='%234f7a48' opacity='0.85'/%3E%3C/g%3E%3Cg transform='translate(175,42) rotate(60)'%3E%3Cpath d='M0,0 Q36,-24 72,0 Q36,24 0,0 Z' fill='%233e6338' opacity='0.85'/%3E%3C/g%3E%3Cg transform='translate(148,20) rotate(-10)'%3E%3Cpath d='M0,0 Q28,-19 56,0 Q28,19 0,0 Z' fill='%236b9a5f' opacity='0.75'/%3E%3C/g%3E%3Cg transform='translate(150,78) rotate(80)'%3E%3Cpath d='M0,0 Q32,-21 64,0 Q32,21 0,0 Z' fill='%23365c31' opacity='0.85'/%3E%3C/g%3E%3Cg transform='translate(120,110) rotate(102)'%3E%3Cpath d='M0,0 Q29,-19 58,0 Q29,19 0,0 Z' fill='%234a7245' opacity='0.8'/%3E%3C/g%3E%3Cg transform='translate(90,138) rotate(122)'%3E%3Cpath d='M0,0 Q26,-17 52,0 Q26,17 0,0 Z' fill='%232f4f2a' opacity='0.75'/%3E%3C/g%3E%3Cg transform='translate(60,163) rotate(140)'%3E%3Cpath d='M0,0 Q22,-14 44,0 Q22,14 0,0 Z' fill='%233e6338' opacity='0.65'/%3E%3C/g%3E%3Cg transform='translate(215,60) rotate(8)'%3E%3Cpath d='M0,0 Q20,-13 40,0 Q20,13 0,0 Z' fill='%23e8d5a3' opacity='0.35'/%3E%3C/g%3E%3Cg transform='translate(35,190) rotate(155)'%3E%3Cpath d='M0,0 Q18,-12 36,0 Q18,12 0,0 Z' fill='%232f4f2a' opacity='0.5'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

.leaf-corner--tr { top: -22px; right: -24px; }
.leaf-corner--tl { top: -22px; left: -24px; transform: scaleX(-1); }
.leaf-corner--bl { bottom: -22px; left: -24px; transform: scale(-1, -1); }

.leaf-corner--right-tr,
.leaf-corner--right-br {
    width: 170px;
    height: 184px;
    opacity: .3;
}
.leaf-corner--right-tr { top: -18px; right: -18px; }
.leaf-corner--right-br { bottom: -18px; right: -18px; transform: scaleY(-1); }

.auth-left-brand {
    display: block;
    position: relative;
    z-index: 1;
    margin-bottom: 76px;
    text-align: center;
}

.auth-left-logo-img {
    display: block;
    height: 110px;
    width: auto;
    max-width: 340px;
    object-fit: contain;
    margin: 0 auto;
}

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

.auth-left-tagline {
    position: absolute;
    z-index: 1;
    right: 56px;
    bottom: 92px;
    font-family: 'Marck Script', cursive;
    font-size: 1.9rem;
    line-height: 1.2;
    color: rgba(232, 213, 163, .8);
    text-align: right;
    transform: rotate(-6deg);
    transform-origin: bottom right;
}

.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.35;
    margin-bottom: 32px;
}

.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;
    margin-left: auto;
    margin-right: auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: rgba(255, 255, 255, .35);
    text-decoration: none;
    margin-top: 36px;
    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;
    margin-top: auto;
}

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

/* Same leaf-cluster motif as the left panel, faint, creeping in from the
   outer page corners only — kept well clear of the centered form. */
.auth-right-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.auth-box {
    width: 100%;
    max-width: 390px;
    position: relative;
    z-index: 1;
}

.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;
    }

    .auth-right-decor {
        display: none;
    }
}

/* ── 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;
    }
}