/* =============================================================================
   AUTH SHELL — shared by register.php and login.php
   -----------------------------------------------------------------------------
   Layout follows the reference design the owner supplied (near-black card on a
   saturated colour field, brand badge + wordmark, icon-led inputs with a glow
   focus ring, segmented strength meter, alternate-action button, in-card footer
   bar). The palette is PWF's own emerald brand (landing2.css --brand #10b981),
   not the reference's indigo.

   Loaded AFTER landing2.css so it overrides the older auth styles. Both auth
   pages are deliberately single-theme (dark); the theme toggle is hidden.
   ============================================================================= */

/* ═══════════════════════════════════════════════════════════════
   Auth shell (2026-09-06). Layout follows the reference the owner
   supplied: near-black card on a saturated colour field, brand badge
   + wordmark, icon-led inputs with a glow focus ring, segmented
   strength meter, alternate-action button and an in-card footer bar.
   The palette is PWF's own emerald (landing2.css --brand #10b981),
   NOT the reference's indigo.
   Shared with login.php via assets/css/auth-shell.css.
   ═══════════════════════════════════════════════════════════════ */
:root {
    --au-accent:      #10b981;
    --au-accent-hi:   #34d399;
    --au-accent-soft: rgba(16, 185, 129, 0.28);
    --au-card:        #070b12;
    --au-field:       #0d131d;
    --au-line:        rgba(255, 255, 255, 0.10);
    --au-line-2:      rgba(255, 255, 255, 0.16);
    --au-text:        #f1f5f4;
    --au-text-2:      #8b9aa8;
}

/* Emerald/teal field behind the card, echoing the landing page's glow
   on the same near-black base. Fixed so it never scrolls away. */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 96px 20px 34px;   /* 96px top clears the fixed .nav2-wrap */
    /* Flat, calm base. The saturated emerald->cyan wash that used to live here
       was static and hard on the eyes at full-screen; depth now comes from the
       two layers ABOVE this colour instead:
         .scene          (z-index -2) soft brand glows + a 64px grid, masked
         #authParticles  (z-index -1) the connected dot network, mouse-reactive
       Both are the same layers the homepage uses, so the auth pages and the
       landing page finally share one backdrop. */
    background: var(--bg, #060a14);   /* landing2.css themes --bg for us */
}

/* The grid + particle network are the point of this background — keep them.
   The particle script freezes itself to a single static frame under
   prefers-reduced-motion, so no separate opt-out is needed here. */
.auth-body .scene { z-index: -2; }
.auth-body #authParticles { z-index: -1; }

/* Drop the 64px square grid that .scene::after paints — the owner wants the
   glow + dot network without it. Scoped to .auth-body so index.php, which
   shares this same .scene layer, keeps its grid. */
.auth-body .scene::after { display: none; }


.auth-theme-toggle { display: none; }   /* page is single-theme by design */

/* Outer frame: form column + marketing panel share one rounded container. */
.auth-shell {
    width: 100%;
    max-width: 600px;                 /* grows to 1200px once the panel fits */
    display: flex;
    align-items: stretch;
    border-radius: 22px;
    background: var(--au-card);
    border: 1px solid var(--au-line);
    box-shadow: 0 30px 80px rgba(2, 20, 16, 0.55);
    overflow: hidden;
    animation: authIn .5s var(--ease-out) both;
}
.auth-card {
    width: 100%;
    flex: 0 0 600px;          /* 50/50 with the panel, as in the reference */
    max-width: 600px;
    padding: 34px 46px 0;
    background: var(--au-card);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
@media (max-width: 1099px) {
    .auth-card { flex: 1 1 auto; max-width: 600px; }
}
@keyframes authIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .auth-card { animation: none; } }

/* ── Brand row: gradient badge + wordmark, side by side ── */
/* Top bar: brand on the leading edge, theme switch on the trailing edge. */
.auth-topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 18px;
}
.auth-header { text-align: start; margin-bottom: 16px; }
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    margin-bottom: 10px;
    padding: 5px 11px 5px 9px; border-radius: 99px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.26);
    font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
    color: var(--au-accent-hi);
}
.auth-eyebrow::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--au-accent-hi);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
[data-theme="light"] .auth-eyebrow { color: #047857; background: rgba(4, 120, 87, 0.09); border-color: rgba(4, 120, 87, 0.24); }
[data-theme="light"] .auth-eyebrow::before { background: #047857; }
.auth-theme-pill {
    display: inline-flex; align-items: center; gap: 7px;
    height: 34px; padding: 0 14px;
    border-radius: 99px;
    background: var(--au-field);
    border: 1px solid var(--au-line);
    color: var(--au-text-2);
    font-family: inherit; font-size: 12.5px; font-weight: 600;
    cursor: pointer;
    transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}
.auth-theme-pill:hover { border-color: var(--au-line-2); color: var(--au-text); background: #12161f; }
.auth-logo {
    /* margin:0 is load-bearing: login.php's older rule sets `margin:0 auto`,
       which on a flex child eats the free space and shoves the wordmark away. */
    margin: 0;
    width: 38px; height: 38px; border-radius: 12px;
    background: linear-gradient(135deg, #34d399, #059669);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px; flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.45);
}
.auth-wordmark {
    font-family: var(--font-display);
    font-size: 21px; font-weight: 700; letter-spacing: -0.015em;
    color: var(--au-text);
}
.auth-title {
    font-family: var(--font-display);
    font-size: 34px; line-height: 1.14; font-weight: 800;
    letter-spacing: -0.03em; color: var(--au-text);
    margin: 0 0 7px;
}
.auth-subtitle {
    font-size: 14.5px; line-height: 1.5;
    color: var(--au-text-2); margin: 0;
}

/* ── Fields ── */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block; margin-bottom: 8px;
    font-size: 13.5px; font-weight: 600; letter-spacing: -0.005em;
    color: var(--au-text);
}
.input-wrapper { position: relative; }
.form-control {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 46px;
    border-radius: 10px;
    background: var(--au-field);
    border: 1px solid var(--au-line);
    color: var(--au-text);
    font-size: 14.5px;
    font-family: inherit;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
[dir="rtl"] .form-control { padding: 0 46px 0 16px; }
.form-control::placeholder { color: #8a94a8; }   /* 5.4:1 on the field */
.form-control:focus {
    outline: none;
    background: #12121f;
    border-color: var(--au-accent-hi);
    box-shadow: 0 0 0 3px var(--au-accent-soft), 0 0 22px rgba(16, 185, 129, 0.22);
}
.form-control-password { padding-right: 44px; }
[dir="rtl"] .form-control-password { padding-right: 42px; padding-left: 44px; }

.input-icon {
    position: absolute; top: 50%; transform: translateY(-50%);
    inset-inline-start: 17px;
    font-size: 14px; color: #8a94a8;
    pointer-events: none; transition: color .16s ease;
}
.form-control:focus ~ .input-icon,
.input-wrapper:focus-within .input-icon { color: var(--au-accent-hi); }

.password-toggle-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    inset-inline-end: 13px;
    background: none; border: 0; padding: 4px;
    color: #6b7385; cursor: pointer; font-size: 13px;
    transition: color .16s ease;
}
.password-toggle-btn:hover { color: var(--au-text); }

/* ── Honeypot: invisible and unreachable for real users ── */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden; opacity: 0; pointer-events: none;
}

/* ── Hints (revealed while the field is active) & live status ── */
.field-hint {
    margin: 0 2px;
    font-size: 11.5px; line-height: 1.45;
    color: var(--au-text-2);
    max-height: 0; opacity: 0; overflow: hidden;
    transition: max-height .2s ease, opacity .2s ease, margin .2s ease;
}
.form-group.hint-open .field-hint,
.form-group:focus-within .field-hint {
    max-height: 3.2em; opacity: 1; margin: 6px 2px 0;
}
.field-status {
    margin: 4px 2px 0;
    font-size: 11.5px; font-weight: 600; line-height: 1.4;
}
.field-status.is-ok   { color: #22c55e; }
.field-status.is-bad  { color: #f87171; }
.field-status.is-busy { color: var(--au-text-2); font-weight: 500; }
.field-status i { margin-inline-end: 5px; }

/* ── Segmented password strength ── */
.pw-strength { margin-top: 10px; }
.pw-strength[hidden] { display: none; }   /* class beats the UA [hidden] rule */
.pw-strength-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.pw-seg {
    height: 4px; border-radius: 99px;
    background: rgba(255, 255, 255, 0.10);
    transition: background-color .2s ease;
}
.pw-strength-text {
    display: block; margin-top: 7px;
    font-size: 11.5px; color: var(--au-text-2);
}
.pw-s1 .pw-seg:nth-child(-n+1) { background: #ef4444; }
.pw-s2 .pw-seg:nth-child(-n+2) { background: #f59e0b; }
.pw-s3 .pw-seg:nth-child(-n+3) { background: #3b82f6; }
.pw-s4 .pw-seg                 { background: #22c55e; }

/* ── Buttons ── */
.auth-card .btn-block { width: 100%; }
.register-btn {
    height: 52px; margin-top: 6px;
    border: 0; border-radius: 12px;
    background: linear-gradient(100deg, var(--au-accent) 0%, #0ea5a4 55%, #0ea5e9 100%);
    color: #fff; font-size: 15px; font-weight: 700;
    font-family: inherit;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.30);
    transition: filter .16s ease, box-shadow .16s ease, transform .12s ease;
}
.register-btn:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 14px 34px rgba(16, 185, 129, 0.42);
}
.register-btn:active:not(:disabled) { transform: translateY(1px); }
.register-btn:disabled { opacity: .65; cursor: default; }
[dir="rtl"] .register-btn .fa-right-to-bracket { transform: scaleX(-1); }

.auth-alt-btn {
    height: 50px; width: 100%;
    border-radius: 12px;
    background: var(--au-field);
    border: 1px solid var(--au-line);
    color: var(--au-text); font-size: 14.5px; font-weight: 600;
    font-family: inherit; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    transition: border-color .16s ease, background-color .16s ease;
}
.auth-alt-btn:hover { border-color: var(--au-line-2); background: #14141f; color: var(--au-text); }
.auth-alt-btn .fa-telegram { color: #229ED9; font-size: 16px; }

/* ── "Already have an account?" ── */
.auth-footer {
    text-align: center;
    margin: 16px 0 0;
    font-size: 13.5px; font-weight: 600;
    color: var(--au-text-2);
}
.auth-link { color: #34d399; text-decoration: none; font-weight: 700; }
.auth-link:hover { color: #6ee7b7; text-decoration: underline; }

/* ── In-card footer bar ── */
.auth-legal {
    margin: 24px -32px 0;
    padding: 15px 32px;
    border-top: 1px solid var(--au-line);
    background: rgba(255, 255, 255, 0.015);
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; flex-wrap: wrap;
    font-size: 11.5px; color: var(--au-text-2);
}
.auth-legal a { color: var(--au-text-2); text-decoration: none; }
.auth-legal a:hover { color: var(--au-text); }
.auth-legal-links { display: flex; gap: 16px; }

/* ── Alerts ── */
.alert {
    display: none;
    padding: 12px 14px; border-radius: 10px;
    margin-bottom: 15px; font-size: 12.5px; line-height: 1.5;
    align-items: flex-start; gap: 9px;
}
.alert-danger {
    background: rgba(248, 113, 113, 0.10);
    border: 1px solid rgba(248, 113, 113, 0.28);
    color: #fca5a5;
}
.alert-success {
    background: rgba(34, 197, 94, 0.09);
    border: 1px solid rgba(34, 197, 94, 0.26);
    color: #bbf7d0;
}

/* ── Success panel (Telegram activation) ── */
.reg-done { text-align: start; width: 100%; }
.reg-done-title { font-size: 14px; font-weight: 700; color: #dcfce7; margin-bottom: 5px; }
.reg-done-next { font-size: 12.5px; margin-bottom: 12px; opacity: .92; }
.reg-bot-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 10px;
    background: #229ED9; color: #fff; text-decoration: none;
    font-weight: 700; font-size: 13px;
}
.reg-bot-btn:hover { background: #1b8ec2; color: #fff; }
.reg-cmd-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.reg-cmd {
    font-family: var(--font-mono); font-size: 12.5px;
    background: rgba(0, 0, 0, 0.4); color: #fff;
    padding: 6px 10px; border-radius: 8px;
    direction: ltr; unicode-bidi: plaintext;   /* command stays LTR in Arabic */
}
.reg-copy-btn {
    border: 1px solid var(--au-line-2); background: transparent; color: inherit;
    padding: 6px 12px; border-radius: 8px;
    font-size: 12px; font-weight: 600; cursor: pointer;
}
.reg-copy-btn:hover { border-color: #22c55e; color: #22c55e; }
.reg-done-actions { margin-top: 14px; }
.reg-done-actions .btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 40px; padding: 0 18px; border-radius: 10px;
    background: var(--au-accent); color: #fff;
    font-size: 13px; font-weight: 700; text-decoration: none;
}
.reg-done-actions .btn:hover { background: var(--au-accent-hi); color: #fff; }
.reg-done-redirect { margin-top: 9px; font-size: 11.5px; opacity: .7; }

/* ── Back to home ── */
.back-home-link {
    position: fixed; inset-inline-start: 22px; bottom: 20px;
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12.5px; font-weight: 600;
    color: rgba(255, 255, 255, 0.72); text-decoration: none;
    transition: color .16s ease;
}
.back-home-link:hover { color: #fff; }
[dir="rtl"] .back-home-link i { transform: scaleX(-1); }

/* ── Mobile: footer bar stacks and centres (matches the reference) ── */
@media (max-width: 560px) {
    .auth-body { padding: 22px 14px 64px; }
    .auth-card { padding: 28px 24px 0; border-radius: 20px; }
    .auth-title { font-size: 25px; }
    .auth-legal {
        margin: 20px -22px 0; padding: 14px 22px;
        flex-direction: column; justify-content: center; text-align: center; gap: 8px;
    }
    .auth-legal-links { justify-content: center; }
    .back-home-link { position: static; margin-top: 16px; justify-content: center; display: flex; }
}

/* =============================================================================
   LOGIN-SPECIFIC COMPONENTS
   login.php keeps its own inline <style> for the multi-step / OTP / modal
   machinery; this section re-skins the parts that must match the shell.
   Loaded after that block, so these win.
   ============================================================================= */

/* Remember-me + forgot row */
.login-options {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    margin: 2px 0 16px;
    font-size: 12.5px;
}
.remember-me {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--au-text-2); font-weight: 500; cursor: pointer;
    position: relative;
}
.remember-me .checkmark {
    width: 16px; height: 16px; border-radius: 5px;
    border: 1px solid var(--au-line-2);
    background: var(--au-field);
    display: inline-block; position: relative; flex-shrink: 0;
    transition: background-color .15s ease, border-color .15s ease;
}
.remember-me .checkmark::after {
    content: ''; position: absolute;
    left: 5px; top: 1.5px; width: 4px; height: 8px;
    border: solid #fff; border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform .15s ease;
}
.remember-me:hover .checkmark { border-color: var(--au-accent); }
.remember-me input:checked + .checkmark {
    background: var(--au-accent); border-color: var(--au-accent);
}
.remember-me input:checked + .checkmark::after { transform: rotate(45deg) scale(1); }
.remember-me input:focus-visible + .checkmark { box-shadow: 0 0 0 3px var(--au-accent-soft); }

.forgot-link { color: var(--au-accent-hi); text-decoration: none; font-weight: 600; }
.forgot-link:hover { color: #6ee7b7; text-decoration: underline; }

/* Primary button shared by login + 2FA verify */
.login-btn, #verify2faBtn {
    width: 100%; height: 52px; margin-top: 4px;
    border: 0; border-radius: 12px;
    background: linear-gradient(100deg, var(--au-accent) 0%, #0ea5a4 55%, #0ea5e9 100%);
    color: #fff;
    font-size: 15px; font-weight: 700; font-family: inherit;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(16, 185, 129, 0.30);
    transition: filter .16s ease, box-shadow .16s ease, transform .12s ease;
}
.login-btn:hover:not(:disabled), #verify2faBtn:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 14px 34px rgba(16, 185, 129, 0.42);
}
.login-btn:active:not(:disabled), #verify2faBtn:active:not(:disabled) { transform: translateY(1px); }
.login-btn:disabled, #verify2faBtn:disabled { opacity: .65; cursor: default; }
[dir="rtl"] .login-btn .fa-sign-in-alt { transform: scaleX(-1); }

/* Outline buttons (resend / back). MUST stay scoped to .auth-card: the
   homepage navbar also uses .btn-outline, and width:100% there collapses the
   language switcher next to it. */
.auth-card .btn-outline {
    width: 100%; height: 44px; margin-top: 9px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--au-line);
    color: var(--au-text-2);
    font-size: 13px; font-weight: 600; font-family: inherit;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer;
    transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}
.auth-card .btn-outline:hover:not(:disabled) { border-color: var(--au-line-2); color: var(--au-text); background: var(--au-field); }
.auth-card .btn-outline:disabled { opacity: .5; cursor: default; }
[dir="rtl"] .auth-card .btn-outline .fa-arrow-left { transform: scaleX(-1); }

/* One-time-code boxes */
.otp-group { display: flex; gap: 8px; justify-content: center; }
.otp-box {
    width: 44px; height: 52px;
    text-align: center;
    font-family: var(--font-mono, monospace);
    font-size: 19px; font-weight: 700;
    color: var(--au-text);
    background: var(--au-field);
    border: 1px solid var(--au-line);
    border-radius: 10px;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.otp-box:hover { border-color: var(--au-line-2); }
.otp-box:focus {
    outline: none;
    background: #12161f;
    border-color: var(--au-accent-hi);
    box-shadow: 0 0 0 3px var(--au-accent-soft);
}
.countdown-wrap {
    margin-top: 12px; text-align: center;
    font-size: 12px; color: var(--au-text-2);
}
.countdown-timer { font-weight: 700; color: var(--au-text); }
.countdown-timer.danger { color: #f87171; }

/* Footer link cluster (login has three secondary actions) */
.auth-footer-links {
    display: flex; flex-direction: column; align-items: center; gap: 9px;
}
.auth-link-btn {
    background: none; border: 0; padding: 0;
    color: var(--au-accent-hi); font-family: inherit;
    font-size: 12.5px; font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; gap: 7px;
}
.auth-link-btn:hover { color: #6ee7b7; text-decoration: underline; }
.auth-reseller-link {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12.5px; font-weight: 600;
    color: var(--au-text-2); text-decoration: none;
}
.auth-reseller-link:hover { color: var(--au-text); }

/* Modal (activation guide) */
.login-modal-content {
    background: var(--au-card);
    border: 1px solid var(--au-line);
    border-radius: 18px;
    color: var(--au-text);
}
.login-modal-header h3 { color: var(--au-text); font-size: 16px; }
.login-modal-close { color: var(--au-text-2); }
.login-modal-close:hover { color: var(--au-text); }
.auth-reseller-row { text-align: center; margin-top: 13px; }

/* =============================================================================
   REFERENCE-MATCH ADDITIONS (single-column layout)
   Divider, terms toggle, alternate-action row, centred bottom line.
   ============================================================================= */

/* "or continue with" rule */
.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 18px 0 14px;
    font-size: 12.5px; color: var(--au-text-2);
}
.auth-divider::before,
.auth-divider::after {
    content: ''; flex: 1; height: 1px;
    background: var(--au-line);
}

/* Alternate actions sit in a row; a single child simply fills the width. */
.auth-social-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

/* Terms agreement — a switch, matching the reference */
.auth-terms {
    display: flex; align-items: flex-start; gap: 11px;
    margin: 2px 0 12px;
    font-size: 13.5px; line-height: 1.5; color: var(--au-text-2);
}
.auth-terms input { position: absolute; opacity: 0; width: 0; height: 0; }
/* A checkbox, not a switch: switches imply an immediate effect, whereas a
   form consent is committed by the submit button. */
.auth-terms .checkbox {
    position: relative; flex-shrink: 0;
    width: 18px; height: 18px; margin-top: 1px;
    border-radius: 5px;
    background: var(--au-field);
    border: 1px solid var(--au-line-2);
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}
.auth-terms .checkbox::after {
    content: ''; position: absolute;
    left: 5.5px; top: 2px; width: 5px; height: 9px;
    border: solid #fff; border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform .15s ease;
}
.auth-terms:hover .checkbox { border-color: var(--au-accent); }
.auth-terms input:checked + .checkbox {
    background: var(--au-accent); border-color: var(--au-accent);
}
.auth-terms input:checked + .checkbox::after { transform: rotate(45deg) scale(1); }
.auth-terms input:focus-visible + .checkbox { box-shadow: 0 0 0 3px var(--au-accent-soft); }
.auth-terms label { cursor: pointer; }
.auth-terms a { color: var(--au-accent-hi); text-decoration: none; font-weight: 600; }
.auth-terms a:hover { text-decoration: underline; }

/* Centred bottom line replaces the split legal bar */
.auth-bottom {
    margin: 20px -46px 0;
    padding: 16px 46px;
    border-top: 1px solid var(--au-line);
    text-align: center;
    font-size: 11.5px; color: var(--au-text-2);
}
.auth-bottom a { color: var(--au-text-2); text-decoration: none; }
.auth-bottom a:hover { color: var(--au-text); }
.auth-bottom .sep { opacity: .5; margin: 0 6px; }

@media (max-width: 560px) {
    .auth-bottom { margin: 18px -24px 0; padding: 14px 24px; }
    .auth-social-row { grid-template-columns: 1fr; }
}

/* Only the username status reserves a line — it appears while typing. */
#usernameStatus { min-height: 1em; }

/* =============================================================================
   LIGHT THEME
   The Theme control in the top bar is only honest if it actually changes
   something. Every surface here is driven by the --au-* tokens, so the light
   variant is a token swap plus a softer background field.
   ============================================================================= */
[data-theme="light"] {
    --au-card:   #ffffff;
    --au-field:  #f4f6f9;
    --au-line:   rgba(15, 23, 42, 0.10);
    --au-line-2: rgba(15, 23, 42, 0.18);
    --au-text:   #0f172a;
    --au-text-2: #5a6b7c;   /* 4.7:1 on #ffffff */
}
[data-theme="light"] .auth-body {
    background:
        radial-gradient(120% 90% at 6% 100%, #6ee7b7 0%, rgba(110, 231, 183, 0) 52%),
        radial-gradient(110% 95% at 94% 6%, #7dd3fc 0%, rgba(125, 211, 252, 0) 55%),
        linear-gradient(140deg, #34d399 0%, #5eead4 42%, #e6f2f7 100%);
}
[data-theme="light"] .auth-card {
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}
[data-theme="light"] .form-control::placeholder { color: #57677a; }   /* measured 4.4:1 at #64748b; this clears 4.5:1 AA */
[data-theme="light"] .input-icon,
[data-theme="light"] .password-toggle-btn { color: #94a3b8; }
[data-theme="light"] .form-control:focus { background: #fff; }
[data-theme="light"] .otp-box:focus { background: #fff; }
[data-theme="light"] .auth-theme-pill:hover,
[data-theme="light"] .auth-alt-btn:hover { background: #eef2f6; }
[data-theme="light"] .pw-seg { background: rgba(15, 23, 42, 0.10); }
[data-theme="light"] .auth-bottom,
[data-theme="light"] .auth-legal { background: rgba(15, 23, 42, 0.02); }
[data-theme="light"] .auth-link,
[data-theme="light"] .forgot-link,
[data-theme="light"] .auth-terms a { color: #047857; }   /* 4.6:1 on white */
[data-theme="light"] .auth-link:hover,
[data-theme="light"] .forgot-link:hover { color: #065f46; }
[data-theme="light"] .field-status.is-ok { color: #047857; }
[data-theme="light"] .field-status.is-bad { color: #b91c1c; }
[data-theme="light"] .reg-cmd { background: rgba(15, 23, 42, 0.08); color: #0f172a; }
[data-theme="light"] .back-home-link { color: rgba(15, 23, 42, 0.72); }
[data-theme="light"] .back-home-link:hover { color: #0f172a; }
[data-theme="light"] .alert-success { color: #065f46; }
[data-theme="light"] .alert-danger { color: #b91c1c; }

/* =============================================================================
   MARKETING PANEL (right-hand column)
   Hidden below 980px: it is supporting material, and on a phone the form has
   to come first. Three rotating slides, matching the reference's dots.
   ============================================================================= */
.auth-aside { display: none; }

@media (min-width: 1100px) {
    .auth-shell { max-width: 1200px; }
    .auth-aside {
        display: flex;
        flex-direction: column;
        flex: 1 1 0;
        min-width: 0;
        padding: 34px 46px 36px;
        border-inline-start: 1px solid var(--au-line);
        background:
            radial-gradient(95% 70% at 78% 6%, rgba(16, 185, 129, 0.16) 0%, rgba(16, 185, 129, 0) 60%),
            radial-gradient(85% 65% at 12% 96%, rgba(14, 165, 233, 0.14) 0%, rgba(14, 165, 233, 0) 62%),
            linear-gradient(160deg, #0a1119 0%, #070d15 100%);
        position: relative;
        overflow: hidden;
    }
}

/* Status pill, top trailing corner */
.aside-badge {
    align-self: flex-end;
    display: inline-flex; align-items: center; gap: 8px;
    height: 30px; padding: 0 14px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--au-line);
    font-size: 11.5px; font-weight: 600; color: var(--au-text-2);
    white-space: nowrap;
}
.aside-badge .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--au-accent-hi);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

/* "Why PWF Platform?" chip */
.aside-why {
    align-self: center;
    margin-top: 26px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 99px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--au-line);
    font-size: 12.5px; font-weight: 700; color: var(--au-text);
    white-space: nowrap;
}
.aside-why b { color: var(--au-accent-hi); font-weight: 700; }

/* Rotating headline block */
.aside-slides { position: relative; margin-top: 18px; text-align: center; }
.aside-slide {
    position: absolute; inset: 0;
    opacity: 0; visibility: hidden;
    transition: opacity .45s ease;
}
.aside-slide.is-active { position: relative; opacity: 1; visibility: visible; }
.aside-h {
    font-family: var(--font-display);
    font-size: 31px; line-height: 1.22; font-weight: 800;
    letter-spacing: -0.028em; color: var(--au-text);
    margin: 0;
}
.aside-h .accent {
    background: linear-gradient(100deg, var(--au-accent-hi), #38bdf8);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.aside-sub {
    margin: 14px auto 0; max-width: 36ch;
    font-size: 14px; line-height: 1.62; color: var(--au-text-2);
}

/* Illustration: floating tiles joined by a faint arc */
.aside-art {
    position: relative;
    height: 210px; margin: 22px 0 0;
    flex: 1 1 auto; min-height: 150px;
}
.aside-art svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.aside-tile {
    position: absolute;
    display: flex; align-items: center; justify-content: center;
    border-radius: 15px;
    border: 1px solid var(--au-line-2);
    background: linear-gradient(150deg, #101a26, #0b1219);
    color: var(--au-text-2);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}
.aside-tile.t1 { width: 66px; height: 60px; left: 4%;  top: 34%; font-size: 21px; }
.aside-tile.t2 { width: 60px; height: 60px; left: 40%; top: 62%; font-size: 19px; }
.aside-tile.t3 {
    width: 72px; height: 72px; right: 4%; top: 6%; font-size: 24px;
    background: linear-gradient(150deg, var(--au-accent), #0ea5a4);
    border-color: transparent; color: #fff;
    box-shadow: 0 16px 34px rgba(16, 185, 129, 0.35);
}
.aside-spark {
    position: absolute; width: 4px; height: 4px; border-radius: 50%;
    background: var(--au-accent-hi); opacity: .5;
}
.aside-spark.s1 { left: 26%; top: 12%; }
.aside-spark.s2 { left: 62%; top: 88%; }
.aside-spark.s3 { right: 18%; bottom: 6%; opacity: .3; }

/* Three feature columns */
.aside-features {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 22px; margin-top: 14px;
    padding-top: 16px;
    border-top: 1px solid var(--au-line);   /* separates them from the art */
}
.aside-feature-icon {
    width: 38px; height: 38px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(16, 185, 129, 0.10);
    border: 1px solid rgba(16, 185, 129, 0.22);
    color: var(--au-accent-hi); font-size: 14px;
    margin-bottom: 11px;
}
.aside-feature h4 {
    margin: 0 0 6px; font-size: 13.5px; font-weight: 700; color: var(--au-text);
}
.aside-feature p {
    margin: 0; font-size: 12.5px; line-height: 1.55; color: #a8b3c2;   /* 8.9:1 on the panel */
}
[data-theme="light"] .aside-feature p { color: #526071; }

/* Slide dots */
.aside-dots { display: flex; justify-content: center; gap: 6px; margin-top: 20px; }
.aside-dot {
    width: 7px; height: 7px; padding: 0;
    border: 0; border-radius: 99px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: width .25s ease, background-color .25s ease;
}
.aside-dot.is-active { width: 22px; background: var(--au-accent); }

/* Light theme */
[data-theme="light"] .auth-aside {
    background:
        radial-gradient(95% 70% at 78% 6%, rgba(16, 185, 129, 0.14) 0%, rgba(16, 185, 129, 0) 60%),
        radial-gradient(85% 65% at 12% 96%, rgba(14, 165, 233, 0.12) 0%, rgba(14, 165, 233, 0) 62%),
        linear-gradient(160deg, #f7fafc 0%, #eef4f8 100%);
}
[data-theme="light"] .aside-badge,
[data-theme="light"] .aside-why,
[data-theme="light"] .aside-feature-icon { background: rgba(15, 23, 42, 0.04); }
[data-theme="light"] .aside-tile {
    background: linear-gradient(150deg, #ffffff, #f1f5f9);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.10);
}
[data-theme="light"] .aside-tile.t3 {
    background: linear-gradient(150deg, var(--au-accent), #0ea5a4); color: #fff;
}
[data-theme="light"] .aside-dot { background: rgba(15, 23, 42, 0.18); }
[data-theme="light"] .aside-h .accent {
    background: linear-gradient(100deg, #047857, #0284c7);
    -webkit-background-clip: text; background-clip: text;
}

@media (prefers-reduced-motion: reduce) {
    .aside-slide { transition: none; }
}

/* =============================================================================
   HOMEPAGE NAVBAR ON THE AUTH PAGES
   index.php's floating navbar is included here too. Two adjustments:
   the top bar inside the card no longer carries a theme control (the navbar
   owns #themeToggle), and each page hides the nav button that points at itself.
   ============================================================================= */
.auth-body.is-register .nav2-actions .btn-primary,
.auth-body.is-register .mobile-buttons .btn-primary,
.auth-body.is-login    .nav2-actions .btn-outline,
.auth-body.is-login    .mobile-buttons .btn-outline { display: none; }

/* The brand row is alone in the top bar now that the theme pill has gone. */
.auth-topbar { justify-content: flex-start; }

/* The navbar already links home, so the floating corner link is redundant. */
.auth-body.is-register .back-home-link,
.auth-body.is-login    .back-home-link { display: none; }

@media (max-width: 560px) {
    .auth-body { padding-top: 86px; }
}
