:root {
    --auth-bg: #eef2f6;
    --auth-card: #ffffff;
    --auth-text: #0f172a;
    --auth-muted: #64748b;
    --auth-accent: #0d7a55;
    --auth-accent-2: #0f766e;
    --auth-border: #e2e8f0;
    --auth-hero-dark: #0f172a;
    --auth-shadow: 0 24px 60px rgba(15, 23, 42, 0.09);
    --auth-radius: 24px;
}

* { box-sizing: border-box; }

body.auth-page,
body.auth-page input,
body.auth-page button,
body.auth-page select,
body.auth-page label,
body.auth-page h1,
body.auth-page h2,
body.auth-page p,
body.auth-page a,
body.auth-page span {
    font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
}

body.auth-page {
    margin: 0;
    min-height: 100vh;
    color: var(--auth-text);
    direction: rtl;
    background: var(--auth-bg);
}

.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 85% 8%, rgba(13, 122, 85, 0.14), transparent 32%),
        radial-gradient(circle at 12% 88%, rgba(15, 118, 110, 0.12), transparent 28%),
        linear-gradient(160deg, #f8fafc 0%, #eef2f6 48%, #e8f3ef 100%);
}

.auth-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px 22px 28px;
    max-width: 1240px;
    margin: 0 auto;
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    min-height: 52px;
    padding: 6px 0;
}

.auth-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px 24px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: var(--auth-text);
    vertical-align: middle;
}

.auth-topbar-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    text-align: center;
    vertical-align: middle;
}

.auth-brand-mark svg {
    display: block;
    width: 40px;
    height: 40px;
}

.auth-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.auth-brand-text strong {
    font-size: 18px;
    font-weight: 800;
}

.auth-brand-text small {
    font-size: 11px;
    color: var(--auth-muted);
    font-weight: 700;
    letter-spacing: 0.06em;
}

.auth-topbar-action .auth-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid var(--auth-border);
    background: #fff;
    color: var(--auth-accent-2);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-topbar-action .auth-link-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.auth-topbar-action .auth-link-btn--accent {
    background: linear-gradient(90deg, var(--auth-accent), var(--auth-accent-2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 22px rgba(13, 122, 85, 0.22);
}

.auth-topbar-action .auth-link-btn--accent:hover {
    box-shadow: 0 12px 28px rgba(13, 122, 85, 0.28);
}

.auth-shell {
    flex: 1;
    width: 100%;
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    gap: 18px;
    align-items: stretch;
}

.auth-shell--register {
    grid-template-columns: 0.92fr 1.08fr;
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
}

.auth-hero,
.auth-card {
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
}

.auth-hero {
    background: linear-gradient(155deg, var(--auth-hero-dark) 0%, var(--auth-accent) 52%, var(--auth-accent-2) 100%);
    color: #fff;
    padding: 32px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    min-height: 420px;
}

.auth-hero::before,
.auth-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-hero::before { width: 200px; height: 200px; top: -60px; left: -70px; }
.auth-hero::after { width: 260px; height: 260px; bottom: -120px; right: -80px; }

.auth-hero .hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
}

.auth-hero .eyebrow {
    display: inline-flex;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 12px;
    font-weight: 800;
}

.auth-hero h1 {
    margin: 0;
    font-size: clamp(28px, 3.6vw, 42px);
    line-height: 1.2;
    max-width: 14ch;
}

.auth-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 15px;
    line-height: 1.85;
    max-width: 40ch;
}

.auth-hero .hero-points {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.auth-hero .hero-point {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-hero .hero-point-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
}

.auth-hero .hero-point-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.auth-hero .hero-point strong {
    display: block;
    margin-bottom: 2px;
    font-size: 14px;
}

.auth-hero .hero-point span {
    color: rgba(255, 255, 255, 0.74);
    font-size: 13px;
    line-height: 1.65;
}

.auth-hero .hero-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 12px;
    font-weight: 700;
    margin-top: 16px;
}

.auth-hero-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
}

.auth-hero-stat {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

.auth-hero-stat strong {
    display: block;
    font-size: 18px;
    line-height: 1.2;
}

.auth-hero-stat span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.72);
}

.auth-main {
    display: flex;
    align-items: center;
}

.auth-card {
    width: 100%;
    background: var(--auth-card);
    padding: 30px 28px;
}

.auth-card h2 {
    margin: 0 0 6px;
    font-size: 28px;
    color: var(--auth-text);
}

.auth-card > .auth-card-lead {
    margin: 0 0 20px;
    color: var(--auth-muted);
    line-height: 1.75;
    font-size: 14px;
}

.auth-card label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 13px;
    color: #334155;
}

.auth-card input,
.auth-card select,
.auth-card button[type="submit"],
.auth-card .auth-submit {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--auth-border);
    margin-bottom: 12px;
    font-size: 15px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    background: #fff;
}

.auth-card input:focus,
.auth-card select:focus {
    outline: none;
    border-color: rgba(13, 122, 85, 0.4);
    box-shadow: 0 0 0 4px rgba(13, 122, 85, 0.1);
}

.auth-card input:hover,
.auth-card select:hover {
    border-color: #cbd5e1;
}

.auth-card input.input-invalid {
    border-color: #fecaca;
    background: #fff7f7;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.auth-card button[type="submit"],
.auth-card .auth-submit {
    background: linear-gradient(90deg, var(--auth-accent), var(--auth-accent-2));
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(13, 122, 85, 0.2);
}

.auth-card button[type="submit"]:hover,
.auth-card .auth-submit:hover {
    transform: translateY(-1px);
}

.auth-card button[type="submit"]:disabled,
.auth-card .auth-submit:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.auth-alert {
    border-radius: 14px;
    padding: 11px 13px;
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.7;
}

.auth-alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-alert--success {
    background: #f0fdf4;
    color: #14532d;
    border: 1px solid #bbf7d0;
}

.auth-alert--info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.auth-hint {
    font-size: 13px;
    color: var(--auth-muted);
    margin-top: 10px;
    line-height: 1.7;
}

.auth-hint--top { margin-top: 0; margin-bottom: 14px; }

.auth-hint--dev {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    font-size: 12px;
}

.auth-check {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.auth-check input { width: auto; margin: 0; }

.auth-check label { margin: 0; font-weight: 600; }

.auth-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: -2px 0 12px;
}

.auth-link {
    color: var(--auth-accent-2);
    font-weight: 700;
    text-decoration: none;
}

.auth-link:hover { text-decoration: underline; }

.password-wrap { position: relative; }

.password-wrap input { padding-left: 76px; }

.password-toggle {
    position: absolute;
    left: 6px;
    top: 6px;
    width: auto;
    min-width: 62px;
    margin: 0;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    box-shadow: none;
}

.password-toggle:hover {
    background: #f8fafc;
    transform: none;
}

.field-error,
.login-field-error {
    display: block;
    min-height: 14px;
    margin-top: -8px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #991b1b;
}

.caps-lock-indicator {
    display: block;
    min-height: 16px;
    margin-top: -8px;
    margin-bottom: 8px;
    color: #9a3412;
    font-size: 12px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    color: var(--auth-muted);
    font-size: 12px;
}

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

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--auth-muted);
    padding-top: 4px;
}

.auth-footer a {
    color: var(--auth-accent-2);
    font-weight: 700;
    text-decoration: none;
}

/* ── تسجيل الدخول: عمودان (تعريف + نموذج) ── */
.auth-page--login .auth-wrap {
    align-items: stretch;
    justify-content: flex-start;
    text-align: start;
}

.auth-page--login .auth-shell {
    width: 100%;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
}

.auth-page--login .auth-main {
    width: 100%;
    justify-content: center;
    align-items: center;
}

.auth-page--login .login-form h2 {
    font-size: clamp(24px, 3vw, 30px);
}

.auth-page--login .login-form .auth-card-lead {
    margin-bottom: 22px;
}

.auth-page--login .login-form .auth-submit {
    margin-top: 6px;
}

.auth-page--login .login-form .auth-switch {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--auth-muted);
}

.auth-page--login .auth-footer-inner {
    max-width: 1120px;
    padding: 26px 24px 18px;
}

.auth-page--login .auth-footer-top {
    grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(0, 0.82fr));
    gap: 28px;
    align-items: start;
    padding-bottom: 18px;
}

.auth-page--login .auth-footer-brand {
    max-width: 18rem;
}

.auth-page--login .auth-footer-tagline {
    max-width: 20rem;
    font-size: 13px;
    line-height: 1.6;
}

.auth-page--login .auth-footer-heading {
    margin-bottom: 12px;
}

.auth-page--login .auth-footer-list {
    gap: 10px;
}

.auth-page--login .auth-footer-actions {
    gap: 8px;
}

.auth-page--login .auth-footer-btn {
    min-height: 40px;
    padding: 10px 16px;
}

.auth-page--login .auth-footer-bottom {
    padding-top: 16px;
    font-size: 12px;
}

@media (max-width: 960px) {
    .auth-page--login .auth-footer-top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }
}

@media (max-width: 640px) {
    .auth-page--login .auth-footer-inner {
        padding: 22px 16px 18px;
    }

    .auth-page--login .auth-footer-top {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .auth-page--login .auth-footer-bottom {
        gap: 10px;
    }
}

/* ── استرجاع / إعادة تعيين كلمة المرور ── */
.auth-page--recovery .auth-wrap {
    width: 100%;
    max-width: 1240px;
    align-items: stretch;
    justify-content: flex-start;
    text-align: start;
}

.auth-page--recovery .auth-shell {
    width: 100%;
    max-width: 100%;
}

.auth-page--recovery .auth-main {
    align-items: stretch;
}

.auth-page--recovery .recovery-form h2 {
    font-size: clamp(24px, 3vw, 30px);
}

.auth-page--recovery .recovery-form .auth-card-lead {
    margin-bottom: 22px;
}

.auth-page--recovery .recovery-form .auth-switch {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--auth-muted);
}

.auth-page--recovery-modern .recovery-form.login-form--modern .auth-card-header h2 {
    font-size: clamp(24px, 3vw, 30px);
}

.auth-page--recovery-modern .recovery-form.login-form--modern .auth-card-lead {
    margin-bottom: 22px;
}

.auth-page--recovery-modern .recovery-form.login-form--modern .auth-submit {
    margin-top: 6px;
}

.auth-page--recovery-modern .recovery-form.login-form--modern .auth-switch {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--auth-muted);
}

/* ── المصادقة الثنائية ── */
.auth-page--2fa .auth-wrap,
.auth-page--2fa-setup .auth-wrap,
.auth-page--2fa-recovery .auth-wrap {
    width: 100%;
    max-width: 1240px;
    align-items: stretch;
    justify-content: flex-start;
    text-align: start;
}

.auth-page--2fa .auth-shell,
.auth-page--2fa-setup .auth-shell,
.auth-page--2fa-recovery .auth-shell {
    width: 100%;
    max-width: 100%;
}

.auth-page--2fa .auth-main,
.auth-page--2fa-setup .auth-main,
.auth-page--2fa-recovery .auth-main {
    align-items: stretch;
}

.auth-page--2fa-setup .auth-card {
    max-height: none;
    overflow: visible;
}

.auth-page--register .auth-wrap {
    max-width: 1280px;
}

.auth-page--register .auth-shell--register {
    width: 100%;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
}

.auth-page--register.auth-page--register-simple .auth-wrap {
    width: 100%;
    align-items: stretch;
    justify-content: flex-start;
    text-align: start;
}

.auth-page--register.auth-page--register-simple .auth-shell--register {
    width: 100%;
    max-width: 100%;
}

.auth-page--register .auth-main {
    width: 100%;
    justify-content: center;
    align-items: flex-start;
}

.auth-page--register.auth-page--register-simple .auth-main {
    align-items: stretch;
}

.auth-page--register .auth-card {
    padding: 26px 24px 22px;
}

@media (max-width: 960px) {
    .auth-shell,
    .auth-shell--register {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        min-height: auto;
    }

    .auth-hero h1 { max-width: none; }

    .auth-hero-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .auth-wrap { padding: 14px 12px 20px; }

    .auth-hero,
    .auth-card { border-radius: 20px; }

    .auth-card { padding: 22px 18px; }

    .auth-topbar-inner {
        flex-direction: column;
        gap: 12px;
    }

    .auth-topbar-action {
        width: 100%;
        justify-content: center;
    }

    .auth-topbar-action .auth-link-btn {
        padding: 8px 11px;
        font-size: 12px;
    }
}

/* Dark mode (مشترك مع لوحة التطبيق عبر localStorage darkMode) */
html.dark {
    --auth-bg: #0f172a;
    --auth-card: #1e293b;
    --auth-text: #e2e8f0;
    --auth-muted: #94a3b8;
    --auth-border: #334155;
    --auth-hero-dark: #020617;
    --auth-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

html.dark .auth-bg {
    background:
        radial-gradient(circle at 85% 8%, rgba(13, 122, 85, 0.2), transparent 32%),
        radial-gradient(circle at 12% 88%, rgba(15, 118, 110, 0.15), transparent 28%),
        linear-gradient(160deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
}

html.dark .auth-hero {
    background: linear-gradient(145deg, #14532d 0%, #0f766e 42%, #134e4a 100%);
}

html.dark .auth-card input,
html.dark .auth-card select {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

html.dark .auth-topbar-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

html.dark .auth-topbar-action .auth-link-btn {
    background: #1e293b;
}

html.dark .auth-topbar-action .auth-link-btn--accent {
    background: linear-gradient(90deg, #15803d, #0f766e);
    color: #fff;
}

/* ── وضع بسيط: تسجيل / 2FA بدون ازدحام ── */
.auth-page--minimal .auth-wrap {
    width: 100%;
    max-width: 520px;
    padding: 16px 18px 24px;
    gap: 14px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.auth-page--minimal .auth-shell--solo {
    grid-template-columns: 1fr;
    max-width: 100%;
}

.auth-page--minimal .auth-main {
    width: 100%;
}

.auth-page--minimal .auth-card {
    padding: 24px 22px;
    border-radius: 20px;
}

.auth-page--minimal .auth-card h2 {
    font-size: 22px;
    margin: 0;
}

.auth-page--minimal .auth-card-lead {
    margin: 0;
    font-size: 13px;
}

.auth-page--minimal .auth-card-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.auth-page--minimal .auth-card-brand svg {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.auth-page--minimal .auth-submit {
    margin-top: 4px;
    margin-bottom: 0;
}

.auth-page--minimal .auth-switch {
    margin: 14px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--auth-muted);
}

.auth-page--minimal .auth-footer {
    justify-content: center;
    font-size: 11px;
}

.auth-page--register.auth-page--minimal .auth-wrap {
    max-width: 560px;
}

.auth-page--register.auth-page--minimal .register-card {
    max-height: none;
    overflow: visible;
}

.auth-page--register.auth-page--minimal .register-title {
    font-size: 22px;
    margin: 0 0 4px;
}

.auth-page--register.auth-page--minimal .register-lead {
    margin-bottom: 16px !important;
}

.auth-page--register.auth-page--minimal .steps--compact .step {
    padding: 6px 8px;
    font-size: 11px;
}

.auth-page--register.auth-page--minimal .section-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 800;
    color: var(--auth-text);
}

.auth-page--register.auth-page--minimal .preset-card {
    padding: 12px;
}

.auth-page--register.auth-page--minimal .preset-recommend-badge {
    font-size: 10px;
}

.auth-page--register.auth-page--minimal .decision-summary--compact {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid var(--auth-border);
}

.auth-page--register.auth-page--minimal .decision-summary--compact .summary-line {
    font-size: 13px;
    margin-bottom: 6px;
}

html.dark .auth-page--register.auth-page--minimal .decision-summary--compact {
    background: #0f172a;
}

/* صفحات قانونية — نفس تخطيط الدخول */
.auth-page--legal .legal-card-body {
    line-height: 1.9;
    color: var(--auth-text);
    font-size: 14px;
}

.auth-page--legal .legal-card-body p {
    margin: 0 0 10px;
}

.auth-page--legal .legal-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--auth-border);
    font-size: 13px;
}

.legal-card-footer-sep {
    color: var(--auth-muted);
}

.auth-card-wrapper--legal {
    max-width: 640px;
}

.auth-page--legal-modern .legal-card .auth-card-header h2 {
    font-size: clamp(22px, 3vw, 28px);
}

.auth-page--legal-modern .legal-card .auth-card-header {
    margin-bottom: 16px;
}

/* ═════════════════════════════════════════════════════════════════
   NEW PROFESSIONAL HEADER & FOOTER
   ═════════════════════════════════════════════════════════════════ */

/* ── New Header ─────────────────────────────────────────────────── */
.auth-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

html.dark .auth-header {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(51, 65, 85, 0.8);
}

.auth-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 24px;
    min-height: 64px;
}

/* Brand */
.auth-header-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--auth-text);
    padding: 6px 10px;
    margin: -6px -10px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.auth-header-brand:hover {
    background: rgba(13, 122, 85, 0.06);
    transform: translateY(-1px);
}

html.dark .auth-header-brand:hover {
    background: rgba(110, 231, 183, 0.08);
}

.auth-header-brand svg {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(13, 122, 85, 0.15));
}

.auth-header-brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.auth-header-brand strong {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--auth-text);
}

html.dark .auth-header-brand strong {
    color: #f8fafc;
}

.auth-header-brand small {
    font-size: 11px;
    font-weight: 700;
    color: var(--auth-accent);
    letter-spacing: 0.02em;
}

html.dark .auth-header-brand small {
    color: #6ee7b7;
}

/* Navigation */
.auth-header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 1023px) {
    .auth-header-nav {
        display: none;
    }
}

.auth-header-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border-radius: 999px;
    transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
}

html.dark .auth-header-link {
    color: #94a3b8;
}

.auth-header-link:hover {
    background: rgba(13, 122, 85, 0.08);
    color: var(--auth-accent);
    transform: translateY(-1px);
}

html.dark .auth-header-link:hover {
    background: rgba(110, 231, 183, 0.1);
    color: #6ee7b7;
}

/* Actions */
.auth-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 767px) {
    .auth-header-actions .auth-header-btn:not(.auth-header-btn--icon) {
        display: none;
    }
}

.auth-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.auth-header-btn--icon {
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(241, 245, 249, 0.8);
    border-color: #e2e8f0;
    color: #64748b;
    font-size: 16px;
}

html.dark .auth-header-btn--icon {
    background: rgba(30, 41, 59, 0.8);
    border-color: #334155;
    color: #94a3b8;
}

.auth-header-btn--icon:hover {
    background: rgba(13, 122, 85, 0.08);
    border-color: var(--auth-accent-border);
    color: var(--auth-accent);
    transform: translateY(-1px);
}

html.dark .auth-header-btn--icon:hover {
    background: rgba(110, 231, 183, 0.1);
    color: #6ee7b7;
}

/* Theme icons - show/hide based on dark mode */
.theme-icon-light,
.theme-icon-dark {
    position: absolute;
    transition: opacity 0.2s ease;
}

html:not(.dark) .theme-icon-dark {
    opacity: 0;
}

html.dark .theme-icon-light {
    opacity: 0;
}

.auth-header-btn--primary {
    background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-2));
    color: #fff;
    box-shadow: 0 4px 14px rgba(13, 122, 85, 0.35);
}

.auth-header-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13, 122, 85, 0.45);
}

.auth-header-btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.auth-header-btn--primary:hover::before {
    transform: translateX(100%);
}

.auth-header-btn--block {
    width: 100%;
}

/* Mobile Toggle */
.auth-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    position: relative;
}

@media (max-width: 1023px) {
    .auth-mobile-toggle {
        display: inline-flex;
    }
}

html.dark .auth-mobile-toggle {
    background: #1e293b;
    border-color: #334155;
}

.auth-toggle-icon {
    display: block;
    width: 20px;
    height: 2px;
    background: #475569;
    border-radius: 2px;
    position: relative;
}

html.dark .auth-toggle-icon {
    background: #94a3b8;
}

.auth-toggle-icon::before,
.auth-toggle-icon::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: #475569;
    border-radius: 2px;
    left: 0;
}

html.dark .auth-toggle-icon::before,
html.dark .auth-toggle-icon::after {
    background: #94a3b8;
}

.auth-toggle-icon::before {
    top: -6px;
}

.auth-toggle-icon::after {
    top: 6px;
}

.auth-mobile-toggle[aria-expanded="true"] .auth-toggle-icon {
    background: transparent;
}

.auth-mobile-toggle[aria-expanded="true"] .auth-toggle-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.auth-mobile-toggle[aria-expanded="true"] .auth-toggle-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Mobile Menu */
.auth-mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

html.dark .auth-mobile-menu {
    background: rgba(15, 23, 42, 0.98);
    border-color: #334155;
}

.auth-mobile-menu[hidden] {
    display: none;
}

.auth-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auth-mobile-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
}

html.dark .auth-mobile-link {
    color: #cbd5e1;
}

.auth-mobile-link:hover {
    background: rgba(13, 122, 85, 0.08);
    color: var(--auth-accent);
}

.auth-mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

html.dark .auth-mobile-actions {
    border-color: #334155;
}

body.auth-mobile-open {
    overflow: hidden;
}

/* ── Background Particles ───────────────────────────────────────── */
.auth-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.auth-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(13, 122, 85, 0.25);
}

.auth-particle:nth-child(1) { top: 20%; inset-inline-start: 10%; animation: float 8s ease-in-out infinite; }
.auth-particle:nth-child(2) { top: 60%; inset-inline-start: 85%; width: 4px; height: 4px; animation: float 10s ease-in-out infinite 1s; }
.auth-particle:nth-child(3) { top: 40%; inset-inline-start: 70%; width: 8px; height: 8px; opacity: 0.4; animation: float 12s ease-in-out infinite 2s; }
.auth-particle:nth-child(4) { top: 80%; inset-inline-start: 25%; width: 5px; height: 5px; animation: float 9s ease-in-out infinite 0.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ── New Footer ─────────────────────────────────────────────────── */
.auth-footer-new {
    width: 100%;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

html.dark .auth-footer-new {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    border-color: #334155;
}

.auth-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px 32px;
}

.auth-footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e2e8f0;
}

@media (max-width: 960px) {
    .auth-footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 640px) {
    .auth-footer-top {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

html.dark .auth-footer-top {
    border-color: #334155;
}

.auth-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-footer-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--auth-text);
    padding: 8px;
    margin: -8px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.auth-footer-brand-link:hover {
    background: rgba(13, 122, 85, 0.06);
}

.auth-footer-brand-link svg {
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 2px 4px rgba(13, 122, 85, 0.15));
}

.auth-footer-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-footer-brand-text strong {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--auth-text);
}

html.dark .auth-footer-brand-text strong {
    color: #f8fafc;
}

.auth-footer-brand-text small {
    font-size: 12px;
    font-weight: 700;
    color: var(--auth-accent);
}

html.dark .auth-footer-brand-text small {
    color: #6ee7b7;
}

.auth-footer-tagline {
    margin: 0;
    max-width: 28rem;
    font-size: 14px;
    line-height: 1.7;
    color: #64748b;
}

html.dark .auth-footer-tagline {
    color: #94a3b8;
}

.auth-footer-heading {
    margin: 0 0 16px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    position: relative;
    padding-bottom: 8px;
}

.auth-footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 24px;
    height: 2px;
    background: var(--auth-accent);
    border-radius: 999px;
}

html.dark .auth-footer-heading {
    color: #64748b;
}

.auth-footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-footer-list a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 0;
    transition: all 0.2s ease;
    position: relative;
}

html.dark .auth-footer-list a {
    color: #cbd5e1;
}

.auth-footer-list a::before {
    content: '›';
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
    color: var(--auth-accent);
}

.auth-footer-list a:hover {
    color: var(--auth-accent);
    padding-inline-start: 4px;
}

.auth-footer-list a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

html.dark .auth-footer-list a:hover {
    color: #6ee7b7;
}

.auth-footer-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 999px;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
}

.auth-footer-btn--primary {
    background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-2));
    color: #fff;
    box-shadow: 0 4px 14px rgba(13, 122, 85, 0.35);
}

.auth-footer-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13, 122, 85, 0.45);
}

.auth-footer-btn--ghost {
    background: linear-gradient(135deg, #fff, #f8fafc);
    color: #334155;
    border: 1px solid #e2e8f0;
}

.auth-footer-btn--ghost:hover {
    background: #fff;
    border-color: var(--auth-accent);
    color: var(--auth-accent);
}

html.dark .auth-footer-btn--ghost {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #e2e8f0;
    border-color: #334155;
}

html.dark .auth-footer-btn--ghost:hover {
    border-color: #059669;
    color: #6ee7b7;
}

.auth-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 24px;
    font-size: 13px;
    color: #64748b;
}

html.dark .auth-footer-bottom {
    color: #94a3b8;
}

.auth-footer-copy {
    font-weight: 500;
}

.auth-footer-bottom-end {
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.auth-footer-top-link {
    font-weight: 600;
    color: var(--auth-accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.auth-footer-top-link::before {
    content: '↑';
    font-size: 10px;
}

.auth-footer-top-link:hover {
    color: #059669;
    transform: translateY(-1px);
}

/* Hide old footer, show new one */
.auth-wrap > .auth-footer {
    display: none;
}

/* Adjust wrap padding for sticky header */
.auth-wrap {
    padding: 32px 24px 48px;
}

@media (max-width: 640px) {
    .auth-wrap {
        padding: 24px 16px 32px;
    }
    
    .auth-header-inner {
        padding: 10px 16px;
    }
    
    .auth-footer-inner {
        padding: 32px 16px 24px;
    }
}

/* ═════════════════════════════════════════════════════════════════
   MODERN LOGIN FORM STYLES
   ═════════════════════════════════════════════════════════════════ */

.auth-card-wrapper {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.auth-card-header {
    margin-bottom: 24px;
}

.auth-card-header h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 800;
    color: var(--auth-text);
}

.auth-form-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.auth-form-trust--wide {
    margin-bottom: 22px;
}

.auth-form-trust__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(13, 122, 85, 0.08), rgba(15, 118, 110, 0.04));
    border: 1px solid rgba(13, 122, 85, 0.12);
    color: #0f766e;
    font-size: 12px;
    font-weight: 700;
}

.auth-form-trust__item::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-2));
    box-shadow: 0 0 0 4px rgba(13, 122, 85, 0.08);
}

html.dark .auth-form-trust__item {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(71, 85, 105, 0.48);
    color: #d1fae5;
}

.auth-card--modern {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.02),
        0 12px 24px -4px rgba(13, 122, 85, 0.08),
        0 24px 48px -12px rgba(13, 122, 85, 0.12);
    padding: 32px;
}

html.dark .auth-card--modern {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(51, 65, 85, 0.8);
}

/* Form Groups */
.form-group--modern {
    margin-bottom: 20px;
}

.form-label--modern {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

html.dark .form-label--modern {
    color: #94a3b8;
}

/* Input Wrappers */
.input-wrapper--modern {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    inset-inline-start: 14px;
    font-size: 16px;
    opacity: 0.6;
    z-index: 2;
    pointer-events: none;
}

.input--modern {
    width: 100%;
    padding: 14px 16px 14px 44px;
    font-size: 15px;
    font-weight: 500;
    color: var(--auth-text);
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.input--modern::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.input--modern:hover {
    background: #f1f5f9;
}

.input--modern:focus {
    outline: none;
    background: #fff;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 4px rgba(13, 122, 85, 0.1);
}

html.dark .input--modern {
    background: #1e293b;
    color: #f1f5f9;
}

html.dark .input--modern:hover {
    background: #334155;
}

html.dark .input--modern:focus {
    background: #0f172a;
    border-color: #059669;
    box-shadow: 0 0 0 4px rgba(13, 122, 85, 0.2);
}

/* Password Toggle */
.password-toggle--modern {
    position: absolute;
    inset-inline-end: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #64748b;
    font-size: 16px;
    transition: all 0.2s ease;
}

.password-toggle--modern:hover {
    background: rgba(13, 122, 85, 0.08);
    color: var(--auth-accent);
}

/* Meta Row */
.auth-meta-row--modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.auth-check--modern {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-check--modern input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-accent);
    cursor: pointer;
}

.auth-check--modern label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
}

html.dark .auth-check--modern label {
    color: #94a3b8;
}

.auth-link--modern {
    font-size: 13px;
    font-weight: 600;
    color: var(--auth-accent);
    text-decoration: none;
    transition: all 0.2s ease;
}

.auth-link--modern:hover {
    color: #059669;
    text-decoration: underline;
}

/* Submit Button */
.auth-submit--modern {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-2));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(13, 122, 85, 0.4);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
}

.auth-submit--modern::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.auth-submit--modern:hover::before {
    transform: translateX(100%);
}

.auth-submit--modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(13, 122, 85, 0.5);
}

.auth-submit--modern:active {
    transform: translateY(0);
}

.submit-icon {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.auth-submit--modern:hover .submit-icon {
    transform: translateX(4px);
}

/* Switch Section */
.auth-switch--modern {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 14px;
    color: #64748b;
}

html.dark .auth-switch--modern {
    border-color: #334155;
    color: #94a3b8;
}

.auth-link-highlight {
    font-weight: 700;
    color: var(--auth-accent);
    text-decoration: none;
    transition: all 0.2s ease;
}

.auth-link-highlight:hover {
    color: #059669;
    text-decoration: underline;
}

/* Alerts */
.auth-alert--modern {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.auth-alert--success.auth-alert--modern {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

html.dark .auth-alert--success.auth-alert--modern {
    background: rgba(13, 122, 85, 0.2);
    color: #86efac;
    border-color: rgba(13, 122, 85, 0.3);
}

.auth-alert--error.auth-alert--modern {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

html.dark .auth-alert--error.auth-alert--modern {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.auth-alert--success .alert-icon {
    background: #166534;
    color: #fff;
}

.auth-alert--error .alert-icon {
    background: #991b1b;
    color: #fff;
}

/* Dev Hint */
.auth-hint--modern {
    margin-top: 20px;
    padding: 12px 16px;
    background: #f1f5f9;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
    font-size: 12px;
    color: #64748b;
}

html.dark .auth-hint--modern {
    background: #1e293b;
    border-color: #475569;
    color: #94a3b8;
}

.auth-hint--modern code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: var(--auth-accent);
}

html.dark .auth-hint--modern code {
    background: #0f172a;
}

/* Modern Hero Styles */
.auth-hero-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    width: fit-content;
}

.hero-badge-icon {
    font-size: 14px;
}

.hero-title-modern {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0;
}

.hero-lead-modern {
    font-size: 16px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.hero-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 640px) {
    .auth-form-trust__item {
        width: 100%;
        justify-content: center;
    }
}

/* Caps Lock Indicator */
.caps-lock-indicator--modern {
    display: block;
    font-size: 11px;
    color: #d97706;
    margin-top: 4px;
    font-weight: 600;
}

.caps-lock-indicator--modern:empty {
    display: none;
}

/* ═════════════════════════════════════════════════════════════════
   MODERN REGISTER PAGE STYLES
   ═════════════════════════════════════════════════════════════════ */

/* Hero Guarantee Section */
.hero-guarantee {
    margin-top: 32px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    width: fit-content;
}

.guarantee-icon {
    font-size: 28px;
    line-height: 1;
}

.guarantee-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.guarantee-text strong {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.guarantee-text span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* Modern Register Card */
.register-card--modern {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.02),
        0 12px 24px -4px rgba(13, 122, 85, 0.08),
        0 24px 48px -12px rgba(13, 122, 85, 0.12);
    padding: 32px;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

html.dark .register-card--modern {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(51, 65, 85, 0.8);
}

.register-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    color: var(--auth-text);
}

/* Modern Steps */
.steps--modern {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

html.dark .steps--modern {
    border-color: #334155;
}

.steps--modern .step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 2px solid transparent;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    position: relative;
    transition: all 0.3s ease;
}

html.dark .steps--modern .step {
    background: #1e293b;
    color: #94a3b8;
}

.steps--modern .step.active {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: var(--auth-accent);
    color: var(--auth-accent);
}

html.dark .steps--modern .step.active {
    background: linear-gradient(135deg, #064e3b, #065f46);
    border-color: #059669;
    color: #6ee7b7;
}

.steps--modern .step::before {
    content: attr(data-step-indicator);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.steps--modern .step.active::before {
    background: var(--auth-accent);
}

/* Section Title */
.section-title--modern {
    font-size: 16px;
    font-weight: 700;
    color: var(--auth-text);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.section-title--modern::after {
    content: '';
    position: absolute;
    bottom: -2px;
    inset-inline-start: 0;
    width: 60px;
    height: 2px;
    background: var(--auth-accent);
    border-radius: 999px;
}

html.dark .section-title--modern {
    border-color: #334155;
    color: #f1f5f9;
}

/* Error Styling */
.field-error--modern {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #dc2626;
    margin-top: 6px;
    font-weight: 500;
}

.field-error--modern::before {
    content: '⚠️';
    font-size: 12px;
}

html.dark .field-error--modern {
    color: #fca5a5;
}

/* Password Strength Panel Modern */
.password-strength-panel--modern {
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

html.dark .password-strength-panel--modern {
    background: #1e293b;
    border-color: #334155;
}

.password-strength-bar--modern {
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 10px;
}

.password-strength-bar--modern .password-strength-fill {
    height: 100%;
    border-radius: 999px;
    transition: all 0.3s ease;
    width: 0%;
}

.password-strength-bar--modern .strength-0 { width: 0%; background: #e2e8f0; }
.password-strength-bar--modern .strength-1 { width: 25%; background: #ef4444; }
.password-strength-bar--modern .strength-2 { width: 50%; background: #f59e0b; }
.password-strength-bar--modern .strength-3 { width: 75%; background: #10b981; }
.password-strength-bar--modern .strength-4 { width: 100%; background: var(--auth-accent); }

.password-hints {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.password-hint-text {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.password-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.password-rules .rule {
    font-size: 11px;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.password-rules .rule.met {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

html.dark .password-rules .rule {
    background: #0f172a;
    border-color: #334155;
}

html.dark .password-rules .rule.met {
    background: rgba(13, 122, 85, 0.3);
    color: #6ee7b7;
}

/* Terms Checkbox Modern */
.register-terms--modern {
    margin: 20px 0;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

html.dark .register-terms--modern {
    background: #1e293b;
    border-color: #334155;
}

.register-terms--modern input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-accent);
}

.register-terms--modern label {
    font-size: 13px;
    line-height: 1.6;
}

/* Select Wrapper */
.select-wrapper--modern {
    position: relative;
}

.select--modern {
    width: 100%;
    padding: 14px 40px 14px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--auth-text);
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    appearance: none;
    transition: all 0.2s ease;
}

.select--modern:hover {
    background: #f1f5f9;
}

.select--modern:focus {
    outline: none;
    background: #fff;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 4px rgba(13, 122, 85, 0.1);
}

.select-arrow {
    position: absolute;
    inset-inline-end: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #64748b;
    pointer-events: none;
}

html.dark .select--modern {
    background: #1e293b;
    color: #f1f5f9;
}

html.dark .select--modern:hover {
    background: #334155;
}

html.dark .select--modern:focus {
    background: #0f172a;
    border-color: #059669;
}

/* Two Column Layout */
.register-field-row--modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .register-field-row--modern {
        grid-template-columns: 1fr;
    }
}

/* Hint Modern */
.hint--modern {
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hint--modern::before {
    content: 'ℹ️';
    font-size: 12px;
}

html.dark .hint--modern {
    color: #94a3b8;
}

/* Setup Hint */
.register-setup-hint--modern {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
    padding: 14px 16px;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    font-size: 13px;
    color: #166534;
    line-height: 1.6;
}

.hint-icon {
    font-size: 18px;
    flex-shrink: 0;
}

html.dark .register-setup-hint--modern {
    background: linear-gradient(135deg, #064e3b, #065f46);
    border-color: #059669;
    color: #86efac;
}

/* Step Actions */
.step-actions--modern {
    margin-top: 24px;
}

.step-actions--modern.between-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.auth-submit--next {
    width: 100%;
}

.auth-submit--outline {
    background: linear-gradient(135deg, #fff, #f8fafc);
    color: #475569;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.auth-submit--outline:hover {
    background: #fff;
    border-color: var(--auth-accent);
    color: var(--auth-accent);
}

html.dark .auth-submit--outline {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #e2e8f0;
    border-color: #334155;
}

html.dark .auth-submit--outline:hover {
    border-color: #059669;
    color: #6ee7b7;
}

.auth-submit--create {
    background: linear-gradient(135deg, #0d7a55, #0f766e);
}

/* Readonly Input */
.input--readonly {
    background: #f1f5f9 !important;
    color: #64748b;
    cursor: not-allowed;
}

html.dark .input--readonly {
    background: #1e293b !important;
    color: #94a3b8;
}

/* ── 2FA (modern) ── */
.auth-2fa-card .auth-2fa-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 14px;
    font-size: 14px;
}

.auth-2fa-card .auth-2fa-status--on {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #14532d;
}

.auth-2fa-card .auth-2fa-status--off {
    background: #f8fafc;
    border: 1px solid var(--auth-border);
    color: var(--auth-muted);
}

.auth-2fa-actions {
    margin-bottom: 8px;
}

.auth-divider--modern {
    margin: 20px 0;
    border: none;
    border-top: 1px solid var(--auth-border);
}

.auth-2fa-subheading {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
}

.auth-card-lead--tight {
    margin-bottom: 12px;
}

.auth-2fa-qr-wrap {
    text-align: center;
    margin: 16px 0;
}

.auth-2fa-qr {
    border-radius: 12px;
    border: 1px solid var(--auth-border);
}

.auth-2fa-secret-box {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
}

.auth-2fa-secret-label {
    color: var(--auth-muted);
}

.auth-2fa-secret-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}

.auth-2fa-secret-code {
    flex: 1;
    word-break: break-all;
    font-size: 13px;
}

.auth-2fa-copy-btn {
    border: none;
    cursor: pointer;
}

.auth-2fa-code-input {
    letter-spacing: 0.2em;
    text-align: center;
    font-weight: 700;
}

.auth-submit--danger {
    background: linear-gradient(90deg, #b45309, #dc2626);
    box-shadow: none;
}

.auth-submit--danger:hover {
    filter: brightness(1.05);
}

html.dark .auth-2fa-secret-box {
    background: rgba(15, 23, 42, 0.6);
}

html.dark .auth-2fa-card .auth-2fa-status--on {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(110, 231, 183, 0.3);
    color: #6ee7b7;
}

.auth-alert--warning.auth-alert--modern {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

html.dark .auth-alert--warning.auth-alert--modern {
    background: rgba(180, 83, 9, 0.15);
    border-color: rgba(253, 230, 138, 0.35);
    color: #fcd34d;
}

.auth-submit--block {
    display: block;
    text-align: center;
    text-decoration: none;
    margin-top: 16px;
}

.auth-2fa-recovery-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.auth-2fa-recovery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.auth-2fa-recovery-cell {
    background: #f8fafc;
    border: 1px solid var(--auth-border);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.auth-2fa-recovery-code {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

html.dark .auth-2fa-recovery-cell {
    background: rgba(15, 23, 42, 0.6);
    border-color: #334155;
}

.auth-2fa-recovery-warning {
    margin-bottom: 4px;
}
