@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
    --ink:#17372c; --muted:#718178; --paper:#f5f1e8; --surface:#fffdf8;
    --line:#d9dfd5; --green:#1f6b4f; --green-dark:#15513c; --lime:#b8d66a; --orange:#e8753d; --danger:#b94d42;
    --input:#faf9f4; --surface-bright:#fff; --surface-soft:#f5f7f1; --modal-backdrop:rgba(23,55,44,.38);
}
* { box-sizing:border-box; }
body {
    min-height:100vh; margin:0; padding:28px; display:grid; place-items:center;
    color:var(--ink); background:var(--paper); font-family:"DM Sans",system-ui,sans-serif;
}
body::before {
    content:""; position:fixed; inset:0; pointer-events:none; opacity:.35;
    background-image:radial-gradient(rgba(31,107,79,.08) .7px,transparent .7px); background-size:18px 18px;
}
.auth-shell {
    width:min(1060px,100%); display:grid; grid-template-columns:.9fr 1.1fr;
    border:1px solid var(--line); border-radius:30px; overflow:hidden; background:var(--surface);
    box-shadow:0 30px 90px rgba(29,57,45,.14); position:relative;
}
.auth-intro {
    min-height:650px; padding:48px; display:flex; flex-direction:column; justify-content:flex-end;
    color:#f8f6ee; background:var(--green); position:relative; overflow:hidden;
}
.auth-intro::before {
    content:""; position:absolute; width:390px; height:390px; border-radius:50%; right:-170px; top:-150px;
    background:rgba(184,214,106,.2); box-shadow:-130px 170px 0 rgba(232,117,61,.09);
}
.brand-mark {
    position:absolute; left:48px; top:48px; width:44px; height:44px; border-radius:13px;
    display:grid; place-items:center; background:var(--lime); color:var(--green);
    font:800 14px Manrope,sans-serif; z-index:1; overflow:hidden;
}

.brand-logo {
    width:100%;
    height:100%;
    display:block;
    object-fit:contain;
    object-position:center;
    border-radius:inherit;
}

.brand-name { position:absolute; top:58px; left:102px; font:800 15px Manrope,sans-serif; z-index:1; }
.eyebrow { position:relative; color:var(--lime); font-size:11px; font-weight:800; letter-spacing:1.6px; text-transform:uppercase; }
.auth-intro h1 {
    position:relative; margin:15px 0 18px; font:800 clamp(43px,5vw,65px)/.98 Manrope,sans-serif; letter-spacing:-3px;
}
.auth-intro h1 em { color:var(--lime); font-style:normal; }
.auth-intro p { position:relative; max-width:390px; margin:0; color:rgba(248,246,238,.72); font-size:15px; }
.intro-pills { display:flex; flex-wrap:wrap; gap:7px; margin-top:28px; }
.intro-pills span { border:1px solid rgba(248,246,238,.2); border-radius:999px; padding:6px 9px; color:rgba(248,246,238,.68); font-size:9px; font-weight:800; letter-spacing:1px; }

.auth-card { padding:54px 62px; align-self:center; }
.auth-card-top { display:flex; align-items:center; gap:9px; color:var(--orange); font-size:11px; font-weight:800; letter-spacing:1.4px; text-transform:uppercase; }
.auth-dot { width:6px; height:6px; border-radius:50%; background:var(--orange); }
.auth-card h2 { margin:18px 0 5px; font:800 34px Manrope,sans-serif; letter-spacing:-1.5px; }
.auth-subtitle { margin:0 0 28px; color:var(--muted); font-size:13px; }

.signup-retention-notice {
    margin: 0 0 22px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--orange);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--ink);
    font-size: 11px;
    line-height: 1.65;
}
.signup-retention-notice strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-size: 12px;
}
.signup-retention-notice p { margin: 0; color: var(--muted); }
.form-group { margin:0 0 18px; }
label { display:block; margin-bottom:7px; color:var(--ink-soft,#355247); font-size:12px; font-weight:700; }
input {
    width:100%; min-height:46px; padding:11px 13px; border:1px solid var(--line); border-radius:12px;
    outline:none; background:var(--input); color:var(--ink); font:inherit; transition:.2s;
}
input:focus { border-color:var(--green); box-shadow:0 0 0 4px rgba(31,107,79,.09); background:var(--surface-bright); }
input::placeholder { color:#a1aaa4; }
button {
    width:100%; min-height:47px; border:0; border-radius:12px; background:var(--green); color:#fff;
    font:800 14px "DM Sans",sans-serif; cursor:pointer; transition:.2s; box-shadow:0 8px 20px rgba(31,107,79,.13);
}
button:hover { background:var(--green-dark); transform:translateY(-1px); }
button span { margin-left:7px; font-size:17px; }
.error-message,.success-message { margin-top:12px; font-size:12px; line-height:1.5; text-align:center; }
.error-message { color:var(--danger); } .success-message { color:var(--green); }
.auth-footer { margin-top:25px; padding-top:20px; border-top:1px solid var(--line); color:var(--muted); text-align:center; font-size:12px; }
.auth-footer a { color:var(--green); font-weight:800; text-decoration:none; } .auth-footer a:hover { text-decoration:underline; }

@media(max-width:760px) {
    body { padding:12px; }
    .auth-shell { grid-template-columns:1fr; border-radius:22px; }
    .auth-intro { min-height:300px; padding:30px; }
    .brand-mark { top:28px; left:30px; } .brand-name { top:39px; left:84px; }
    .auth-intro h1 { font-size:43px; letter-spacing:-2px; }
    .auth-intro p { max-width:460px; }
    .auth-card { padding:32px 26px; }
}
@media(max-width:430px) {
    .auth-intro { min-height:270px; }
    .auth-intro h1 { font-size:37px; }
    .auth-card h2 { font-size:29px; }
}

.auth-forgot { margin-top:13px; text-align:right; font-size:12px; }
.auth-forgot a { color:var(--green); font-weight:800; text-decoration:none; }
.auth-forgot a:hover { text-decoration:underline; }
.auth-back { margin-top:18px; text-align:center; font-size:12px; }
.auth-back a { color:var(--green); font-weight:800; text-decoration:none; }
.auth-back a:hover { text-decoration:underline; }


.auth-verification-action {
    margin-top: 13px;
}

.auth-verification-action button {
    min-height: 40px;
    background: transparent;
    color: var(--green);
    border: 1px solid var(--line);
    box-shadow: none;
    font-size: 12px;
}

.auth-verification-action button:hover:not(:disabled) {
    background: #f5f7f1;
    border-color: var(--green);
}

.auth-verification-action button:disabled {
    opacity: .55;
    cursor: not-allowed;
}


.password-hint {
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}


.signup-status-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(23, 55, 44, .38);
    backdrop-filter: blur(4px);
}

.signup-status-modal[hidden] {
    display: none;
}

.signup-status-card {
    width: min(430px, 100%);
    padding: 30px 28px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 25px 70px rgba(29, 57, 45, .2);
    text-align: center;
    color: var(--ink);
}

.signup-spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto 18px;
    border: 3px solid #dce4db;
    border-top-color: var(--green);
    border-radius: 50%;
    animation: signup-spin .8s linear infinite;
}

.signup-status-card #signupStatusMessage {
    font: 800 18px Manrope, sans-serif;
    letter-spacing: -.3px;
}

.signup-status-subtext {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

button.is-loading {
    cursor: wait;
    opacity: .88;
    transform: none;
}

button.is-loading:hover {
    background: var(--green);
    transform: none;
}

@keyframes signup-spin {
    to { transform: rotate(360deg); }
}

html { color-scheme: light; }
html[data-theme="dark"] {
    color-scheme: dark;
    --ink:#eaf4ee; --muted:#93a59b; --paper:#101814; --surface:#16211c;
    --line:#304239; --green:#62b894; --green-dark:#4b9d7a; --lime:#c7e67a; --orange:#f0925b; --danger:#ef8175;
    --input:#1b2721; --surface-bright:#223029; --surface-soft:#233129; --modal-backdrop:rgba(5,12,9,.64);
}


.theme-toggle {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--green); }
.theme-toggle span { font-size: 11px; }
html[data-theme="dark"] body::before {
    opacity: .18;
    background-image: radial-gradient(rgba(98,184,148,.14) .7px, transparent .7px);
}
html[data-theme="dark"] .section-intro,
html[data-theme="dark"] .auth-intro { color: #f8f6ee; }
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus { background: var(--surface-bright); }
html[data-theme="dark"] .profile-nav-btn,
html[data-theme="dark"] .back-btn { color: var(--ink); }
html[data-theme="dark"] .logout-text-btn {
    background: #2d211f;
    border-color: #593832;
    color: var(--danger);
}
html[data-theme="dark"] .account-page input:disabled {
    background: #202b26;
    color: #71847a;
    border-color: #34453d;
}
html[data-theme="dark"] .receipt-modal-card,
html[data-theme="dark"] .payment-method-option {
    background: var(--surface);
}


html[data-theme="dark"] .payment-summary,
html[data-theme="dark"] .payment-methods,
html[data-theme="dark"] .payment-method-option,
html[data-theme="dark"] .receipt-upload-box input[type="file"] {
    background: var(--surface-bright);
}
html[data-theme="dark"] .payment-status.pending {
    background: #3b321f;
    color: #e8c66c;
}
html[data-theme="dark"] .payment-status.approved {
    background: #20392b;
    color: #7fd0a5;
}
html[data-theme="dark"] .payment-status.declined,
html[data-theme="dark"] .payment-status.expired {
    background: #3b2522;
    color: var(--danger);
}
html[data-theme="dark"] #signupLoadingModal .signup-status-card,
html[data-theme="dark"] #forgotLoadingModal .forgot-status-card {
    background: var(--surface) !important;
    border-color: var(--line) !important;
    color: var(--ink) !important;
}


/* Payment page dark-mode surfaces */
html[data-theme="dark"] .auth-shell {
    box-shadow: 0 30px 90px rgba(0, 0, 0, .38);
}
html[data-theme="dark"] .payment-summary,
html[data-theme="dark"] .payment-methods {
    background: var(--surface-bright) !important;
}
html[data-theme="dark"] .payment-method-option {
    background: #18241e !important;
    border-color: var(--line) !important;
}
html[data-theme="dark"] .payment-expiry {
    color: #e8c66c !important;
}
html[data-theme="dark"] .payment-back a {
    color: var(--green) !important;
}
html[data-theme="dark"] .payment-cancel-btn {
    background: #3b2522 !important;
    border-color: #6b4038 !important;
    color: #f19a8f !important;
}
html[data-theme="dark"] .payment-method-qr {
    background: #fff !important;
}
html[data-theme="dark"] .receipt-upload-box input[type="file"] {
    background: var(--input) !important;
    color: var(--ink) !important;
}
html[data-theme="dark"] .payment-status.pending {
    background: #3b321f !important;
    color: #f0cf79 !important;
}
html[data-theme="dark"] .payment-status.approved {
    background: #20392b !important;
    color: #8ed7ae !important;
}
html[data-theme="dark"] .payment-status.declined,
html[data-theme="dark"] .payment-status.expired {
    background: #3b2522 !important;
    color: #f19a8f !important;
}
