/* Shared auth design tokens — org owner / staff match Organisation workspace */
:root {
    --auth-primary: #131db9;
    --auth-primary-dark: #0e1694;
    --auth-primary-light: #444ecf;
    --auth-navy: #1e295b;
    --auth-navy-mid: #232d5f;
    --auth-navy-deep: #162044;
    --auth-coral: #f04438;
    --auth-coral-dark: #d92d20;
    --auth-coral-soft: rgba(240, 68, 56, 0.12);
    --auth-text-dark: #1a1a1a;
    --auth-text-muted: #6c757d;
    --auth-light-bg: #f0f2f8;
    --auth-border: #e2e5f1;
    --auth-page-bg: #f9fafb;
    --auth-font: 'Poppins', sans-serif;
    --auth-radius-card: 16px;
    --auth-radius-control: 12px;
    --auth-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(30, 41, 91, 0.08);
    --auth-focus-ring: 0 0 0 3px rgba(19, 29, 185, 0.12);
}

/* Organisation owner + staff / admin — dashboard brand language */
body.auth-org {
    --auth-primary: var(--auth-coral);
    --auth-primary-dark: var(--auth-coral-dark);
    --auth-primary-light: #f97066;
    --auth-focus-ring: 0 0 0 3px rgba(240, 68, 56, 0.18);
    --auth-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 10px 28px rgba(30, 41, 91, 0.1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--auth-font);
    color: var(--auth-text-dark);
    -webkit-font-smoothing: antialiased;
}

body.auth-body {
    background: var(--background-auth, linear-gradient(165deg, #f8faff 0%, #eef1ff 50%, #f6f8fc 100%));
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.auth-body.auth-org {
    background: var(--auth-page-bg) !important;
}

/* ── Navbar ─────────────────────────────────────────────── */
.auth-nav {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 2px 16px rgba(19, 29, 185, 0.06);
    padding: 0.65rem 0;
    flex-shrink: 0;
}

body.auth-org .auth-nav {
    box-shadow: 0 2px 16px rgba(30, 41, 91, 0.06);
}

.auth-nav .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--auth-text-dark);
    padding: 0.35rem 0.9rem !important;
    transition: color 0.2s;
    margin: 0;
}

.auth-nav .nav-link:hover { color: var(--auth-primary); }

body.auth-org .auth-nav .nav-link:hover { color: var(--auth-navy); }

.auth-nav .btn-primary {
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--auth-primary);
    border-color: var(--auth-primary);
    padding: 0.4rem 1.25rem;
    border-radius: 50px;
    transition: all 0.25s;
}

.auth-nav .btn-primary:hover {
    background: var(--auth-primary-dark);
    border-color: var(--auth-primary-dark);
    transform: translateY(-1px);
}

.auth-nav .btn-outline-primary {
    border-radius: 50px;
}

body.auth-org .auth-nav .btn-outline-primary {
    border-color: var(--auth-navy) !important;
    color: var(--auth-navy) !important;
}

body.auth-org .auth-nav .btn-outline-primary:hover {
    background: var(--auth-navy) !important;
    color: #fff !important;
}

/* ── Split layout ───────────────────────────────────────── */
.auth-split-wrapper {
    flex: 1;
    display: flex;
    align-items: stretch;
    min-height: 0;
}

.auth-split-brand {
    flex: 1;
    display: none;
    background: linear-gradient(160deg, #f8faff 0%, #eef2ff 45%, #ffffff 100%);
    padding: 3rem 3.5rem;
    position: relative;
    overflow: hidden;
}

@media (min-width: 992px) {
    .auth-split-brand { display: flex; flex-direction: column; justify-content: center; }
}

.auth-split-brand::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(19, 29, 185, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.auth-split-brand::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(68, 78, 207, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* Org: navy brand panel (dashboard sidebar language) */
body.auth-org .auth-split-brand {
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.1) 0%, transparent 42%),
        radial-gradient(circle at 10% 90%, rgba(240, 68, 56, 0.18) 0%, transparent 45%),
        linear-gradient(165deg, var(--auth-navy-mid) 0%, var(--auth-navy) 48%, var(--auth-navy-deep) 100%);
}

body.auth-org .auth-split-brand::before {
    width: 320px;
    height: 320px;
    top: -100px;
    right: -90px;
    border: 40px solid rgba(255, 255, 255, 0.06);
    background: transparent;
}

body.auth-org .auth-split-brand::after {
    width: 260px;
    height: 260px;
    bottom: -80px;
    left: -70px;
    border: 32px solid rgba(255, 255, 255, 0.05);
    background: transparent;
}

.auth-brand-content { position: relative; z-index: 1; max-width: 420px; }

.auth-brand-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.auth-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--auth-coral);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(240, 68, 56, 0.35);
}

.auth-brand-wordmark__text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.auth-brand-wordmark__name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.auth-brand-wordmark__product {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.auth-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--auth-primary);
    background: rgba(19, 29, 185, 0.08);
    border: 1px solid rgba(19, 29, 185, 0.12);
    border-radius: 50px;
    padding: 0.35rem 0.9rem;
    margin-bottom: 1.25rem;
}

body.auth-org .auth-split-brand .auth-brand-badge {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

body.auth-org.auth-org--staff .auth-split-brand .auth-brand-badge {
    background: rgba(18, 183, 106, 0.2);
    border-color: rgba(18, 183, 106, 0.35);
}

body.auth-org .auth-mobile-brand .auth-brand-badge {
    color: var(--auth-navy);
    background: rgba(30, 41, 91, 0.08);
    border-color: rgba(30, 41, 91, 0.12);
}

body.auth-org.auth-org--staff .auth-mobile-brand .auth-brand-badge {
    color: #0e7a4a;
    background: rgba(18, 183, 106, 0.12);
    border-color: rgba(18, 183, 106, 0.22);
}

.auth-brand-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

body.auth-org .auth-split-brand .auth-brand-title {
    color: #fff;
}

.auth-brand-lead {
    font-size: 1rem;
    color: var(--auth-text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}

body.auth-org .auth-split-brand .auth-brand-lead {
    color: rgba(255, 255, 255, 0.72);
}

.auth-brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-brand-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    font-size: 0.925rem;
    color: #374151;
    line-height: 1.5;
}

body.auth-org .auth-split-brand .auth-brand-features li {
    color: rgba(255, 255, 255, 0.88);
}

body.auth-org .auth-split-brand .auth-brand-features strong {
    color: #fff;
}

.auth-brand-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(19, 29, 185, 0.12) 0%, rgba(68, 78, 207, 0.15) 100%);
    color: var(--auth-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

body.auth-org .auth-split-brand .auth-brand-icon {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.auth-split-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 2.5rem;
    min-width: 0;
}

@media (min-width: 992px) {
    .auth-split-form {
        flex: 0 0 480px;
        max-width: 480px;
        background: #fff;
        box-shadow: -8px 0 40px rgba(19, 29, 185, 0.04);
    }

    body.auth-org .auth-split-form {
        box-shadow: -12px 0 40px rgba(30, 41, 91, 0.12);
    }
}

/* Mobile brand strip */
.auth-mobile-brand {
    display: block;
    width: 100%;
    text-align: center;
    padding: 1.25rem 1rem 0;
    margin-bottom: 0.5rem;
}

@media (min-width: 992px) {
    .auth-mobile-brand { display: none; }
}

.auth-mobile-brand .auth-brand-badge { margin-bottom: 0.5rem; }

/* ── Card (centered / form panel) ─────────────────────── */
.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: var(--auth-radius-card);
    box-shadow: var(--auth-shadow-card);
    padding: 2.5rem 2.25rem;
}

body.auth-org .auth-card {
    border: 1px solid rgba(30, 41, 91, 0.06);
}

@media (min-width: 992px) {
    .auth-split-form .auth-card {
        box-shadow: none;
        border: none;
        padding: 2rem 2.25rem;
        max-width: 100%;
    }
}

.auth-logo {
    display: block;
    height: 40px;
    margin: 0 auto 1.5rem;
}

.auth-card-kicker {
    display: block;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--auth-navy);
    opacity: 0.55;
    margin: -0.5rem 0 0.65rem;
}

.auth-card h4 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.auth-sub {
    font-size: 0.875rem;
    color: var(--auth-text-muted);
    text-align: center;
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

.form-label {
    font-weight: 600;
    font-size: 0.825rem;
    color: #374151;
    margin-bottom: 0.4rem;
}

/* ── Phone input ──────────────────────────────────────── */
.phone-wrap {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-control);
    background: #fafbff;
    position: relative;
    transition: border-color 0.25s, box-shadow 0.25s;
}

body.auth-org .phone-wrap {
    background: #f9fafb;
    border-color: rgba(30, 41, 91, 0.12);
}

.phone-wrap:focus-within {
    border-color: var(--auth-primary);
    box-shadow: var(--auth-focus-ring);
}

.btn-flag {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--auth-font);
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    background: #f1f3fb;
    border: none;
    border-right: 1.5px solid var(--auth-border);
    border-radius: 11px 0 0 11px;
    padding: 0.72rem 0.85rem;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s;
    outline: none;
}

body.auth-org .btn-flag {
    background: #eef0f6;
    border-right-color: rgba(30, 41, 91, 0.12);
}

.btn-flag:hover { background: #e8eaf6; }
.btn-flag .bi-chevron-down { font-size: 0.6rem; opacity: 0.55; margin-left: 1px; }

.phone-wrap .phone-input {
    flex: 1;
    min-width: 0;
    font-family: var(--auth-font);
    font-size: 0.9rem;
    color: var(--auth-text-dark);
    background: transparent;
    border: none;
    outline: none;
    padding: 0.72rem 1rem;
    border-radius: 0 11px 11px 0;
    -moz-appearance: textfield;
}

.phone-wrap .phone-input::-webkit-outer-spin-button,
.phone-wrap .phone-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.phone-wrap .phone-input::placeholder { color: #b0b8d0; }

.phone-wrap .dropdown-menu {
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(30, 41, 91, 0.12);
    padding: 0.4rem 0 0.25rem;
    margin-top: 6px !important;
    min-width: 280px;
}

.phone-wrap .dropdown-menu .searchlist-input { padding: 0.5rem 0.75rem 0.4rem; }

.phone-wrap .search-countryList {
    font-family: var(--auth-font);
    font-size: 0.82rem;
    border-color: var(--auth-border);
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
}

.phone-wrap .search-countryList:focus {
    border-color: var(--auth-primary);
    box-shadow: var(--auth-focus-ring);
    outline: none;
}

.phone-wrap .dropdown-menu-list { max-height: 210px; overflow-y: auto; }

.phone-wrap .dropdown-menu .dropdown-item {
    font-family: var(--auth-font);
    font-size: 0.83rem;
    padding: 0.4rem 0.85rem;
    color: var(--auth-text-dark);
}

.phone-wrap .dropdown-menu .dropdown-item:hover,
.phone-wrap .dropdown-menu .dropdown-item.active {
    background: #f0f2f8;
    color: var(--auth-primary);
}

body.auth-org .phone-wrap .dropdown-menu .dropdown-item:hover,
body.auth-org .phone-wrap .dropdown-menu .dropdown-item.active {
    background: rgba(30, 41, 91, 0.06);
    color: var(--auth-navy);
}

.otp-hint {
    font-size: 0.775rem;
    color: #9ca3af;
    margin-top: 0.4rem;
    margin-bottom: 0;
}

/* ── OTP ──────────────────────────────────────────────── */
.otp-icon-wrap {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(19, 29, 185, 0.1) 0%, rgba(68, 78, 207, 0.12) 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
    color: var(--auth-primary);
}

body.auth-org .otp-icon-wrap {
    background: linear-gradient(135deg, rgba(30, 41, 91, 0.1) 0%, rgba(240, 68, 56, 0.12) 100%);
    color: var(--auth-navy);
}

.otp-boxes {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.otp-digit {
    width: 64px;
    height: 64px;
    text-align: center;
    font-family: var(--auth-font);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--auth-text-dark);
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-control);
    background: #fafbff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    -moz-appearance: textfield;
}

body.auth-org .otp-digit {
    background: #f9fafb;
    border-color: rgba(30, 41, 91, 0.12);
}

.otp-digit::-webkit-outer-spin-button,
.otp-digit::-webkit-inner-spin-button { -webkit-appearance: none; }

.otp-digit:focus {
    border-color: var(--auth-primary);
    box-shadow: var(--auth-focus-ring);
    background: #fff;
}

.otp-digit.filled {
    border-color: var(--auth-primary);
    background: #f4f5fd;
}

body.auth-org .otp-digit.filled {
    background: rgba(240, 68, 56, 0.06);
}

#otp { display: none; }

.resend-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.resend-row a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

body.auth-org .resend-row a {
    color: var(--auth-navy);
}

.resend-row a:hover { color: var(--auth-primary-dark); text-decoration: underline; }

body.auth-org .resend-row a:hover { color: var(--auth-coral); }

#resend-timer { color: var(--auth-text-muted); font-size: 0.85rem; }
#resend-link { display: none; }

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: #9ca3af;
    text-decoration: none;
    margin-top: 1rem;
    transition: color 0.2s;
}

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

body.auth-org .back-link:hover { color: var(--auth-navy); }

/* ── Buttons & misc ───────────────────────────────────── */
.or-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: #cbd5e1;
    font-size: 0.8rem;
}

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

.btn-auth-primary {
    display: block;
    width: 100%;
    font-family: var(--auth-font);
    font-size: 0.975rem;
    font-weight: 600;
    color: #fff;
    background: var(--auth-primary);
    border: none;
    border-radius: var(--auth-radius-control);
    padding: 0.85rem 1.5rem;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 10px rgba(19, 29, 185, 0.2);
    transition: transform 0.22s, box-shadow 0.22s, opacity 0.22s, background 0.22s;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

body.auth-org .btn-auth-primary {
    background: var(--auth-coral);
    box-shadow: 0 4px 14px rgba(240, 68, 56, 0.28);
}

.btn-auth-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(19, 29, 185, 0.26);
    background: var(--auth-primary-dark);
    color: #fff;
}

body.auth-org .btn-auth-primary:hover:not(:disabled) {
    background: var(--auth-coral-dark);
    box-shadow: 0 6px 18px rgba(240, 68, 56, 0.34);
}

.btn-auth-primary:active:not(:disabled) { transform: translateY(0); }
.btn-auth-primary:disabled { opacity: 0.52; cursor: not-allowed; }

.btn-auth-secondary {
    display: block;
    width: 100%;
    font-family: var(--auth-font);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--auth-primary);
    background: transparent;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-control);
    padding: 0.72rem 1.5rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.22s;
    cursor: pointer;
}

body.auth-org .btn-auth-secondary {
    color: var(--auth-navy);
    border-color: rgba(30, 41, 91, 0.18);
}

.btn-auth-secondary:hover {
    border-color: var(--auth-primary);
    background: #f4f5fd;
    color: var(--auth-primary);
}

body.auth-org .btn-auth-secondary:hover {
    border-color: var(--auth-navy);
    background: rgba(30, 41, 91, 0.04);
    color: var(--auth-navy);
}

.bottom-link {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    margin-top: 1.1rem;
    margin-bottom: 0;
}

.bottom-link a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

body.auth-org .bottom-link a {
    color: var(--auth-navy);
}

.bottom-link a:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

body.auth-org .bottom-link a:hover {
    color: var(--auth-coral);
}

.auth-footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.775rem;
    color: #adb5bd;
    flex-shrink: 0;
}

.auth-footer a { color: #adb5bd; text-decoration: none; }
.auth-footer a:hover { color: var(--auth-primary); }

body.auth-org .auth-footer a:hover { color: var(--auth-navy); }

.auth-card .form-label {
    font-weight: 600;
    font-size: 0.825rem;
    color: #374151;
    margin-bottom: 0.4rem;
}

.auth-input.form-control {
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-control);
    background: #fafbff;
    padding: 0.72rem 1rem;
    font-size: 0.9rem;
    color: var(--auth-text-dark);
    transition: border-color 0.25s, box-shadow 0.25s;
}

body.auth-org .auth-input.form-control {
    background: #f9fafb;
    border-color: rgba(30, 41, 91, 0.12);
}

.auth-input.form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: var(--auth-focus-ring);
    background: #fff;
}

.password-addon {
    height: 100%;
    padding-right: 0.85rem !important;
}

@media (max-width: 575.98px) {
    .auth-card { border-radius: 16px; padding: 2rem 1.5rem; }
    .auth-card h4 { font-size: 1.25rem; }
    .otp-digit {
        width: 56px;
        height: 58px;
        font-size: 1.2rem;
        border-radius: 10px;
    }
    .otp-boxes { gap: 0.5rem; }
    .auth-brand-title { font-size: 1.5rem; }
}

/* ══════════════════════════════════════════════════════════
   Shared auth SaaS system — owner, staff, student
   Primary #24378D · CTA #F63145 · bg #F6F8FC · Inter
   ══════════════════════════════════════════════════════════ */
body.auth-saas {
    --auth-brand: #24378D;
    --auth-brand-mid: #1B6FB8;
    --auth-brand-deep: #1a2a6b;
    --auth-accent-blue: #0B84FF;
    --auth-accent-red: #F63145;
    --auth-accent-red-dark: #d92a3b;
    --auth-accent-orange: #F6A623;
    --auth-accent-green: #2ECC71;
    --auth-navy: #24378D;
    --auth-navy-mid: #2a4199;
    --auth-navy-deep: #1a2a6b;
    --auth-coral: #F63145;
    --auth-coral-dark: #d92a3b;
    --auth-primary: #F63145;
    --auth-primary-dark: #d92a3b;
    --auth-primary-light: #ff6b7a;
    --auth-page-bg: #F6F8FC;
    --auth-border: rgba(36, 55, 141, 0.12);
    --auth-font: 'Inter', 'Poppins', system-ui, sans-serif;
    --auth-radius-card: 22px;
    --auth-radius-control: 16px;
    --auth-radius-btn: 14px;
    --auth-focus-ring: 0 0 0 3px rgba(36, 55, 141, 0.16);
    --auth-shadow-card: 0 4px 6px rgba(36, 55, 141, 0.03), 0 12px 32px rgba(36, 55, 141, 0.08);
    --auth-transition: 250ms ease;
    font-family: var(--auth-font);
    background: var(--auth-page-bg) !important;
}

body.auth-saas .auth-nav {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(36, 55, 141, 0.06);
    box-shadow: 0 4px 20px rgba(36, 55, 141, 0.04);
}

body.auth-saas .auth-nav .nav-link {
    font-weight: 500;
    color: #334155;
    transition: color var(--auth-transition);
}

body.auth-saas .auth-nav .nav-link:hover {
    color: var(--auth-brand);
}

body.auth-saas .auth-nav .btn-outline-primary {
    border-color: var(--auth-brand) !important;
    color: var(--auth-brand) !important;
    border-radius: 999px;
    font-weight: 600;
    transition: background var(--auth-transition), color var(--auth-transition), transform var(--auth-transition);
}

body.auth-saas .auth-nav .btn-outline-primary:hover {
    background: var(--auth-brand) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* Brand panel — dashboard sidebar gradient */
body.auth-saas .auth-split-brand {
    background:
        radial-gradient(circle at 90% 8%, rgba(255, 255, 255, 0.14) 0%, transparent 40%),
        radial-gradient(circle at 12% 88%, rgba(11, 132, 255, 0.22) 0%, transparent 48%),
        linear-gradient(160deg, #24378D 0%, #1B6FB8 55%, #1a2a6b 100%);
    padding: 3.25rem 3.75rem;
}

body.auth-saas .auth-split-brand::before {
    width: 340px;
    height: 340px;
    top: -110px;
    right: -100px;
    border: 48px solid rgba(255, 255, 255, 0.07);
    background: transparent;
}

body.auth-saas .auth-split-brand::after {
    width: 280px;
    height: 280px;
    bottom: -90px;
    left: -80px;
    border: 36px solid rgba(255, 255, 255, 0.05);
    background: transparent;
}

body.auth-saas .auth-brand-mark {
    background: var(--auth-accent-red);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(246, 49, 69, 0.4);
}

body.auth-saas .auth-brand-wordmark__name {
    font-family: var(--auth-font);
    font-weight: 700;
    letter-spacing: -0.03em;
}

body.auth-saas .auth-brand-title {
    font-family: var(--auth-font);
    font-size: 2.05rem;
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.18;
}

body.auth-saas .auth-brand-lead {
    font-size: 0.98rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.76);
}

body.auth-saas .auth-split-brand .auth-brand-badge {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

body.auth-saas .auth-split-brand .auth-brand-icon {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    color: #fff;
}

body.auth-saas .auth-mobile-brand .auth-brand-badge {
    color: var(--auth-brand);
    background: rgba(36, 55, 141, 0.08);
    border-color: rgba(36, 55, 141, 0.14);
}

@media (min-width: 992px) {
    body.auth-saas .auth-split-form {
        flex: 0 0 500px;
        max-width: 500px;
        background: #fff;
        box-shadow: -16px 0 48px rgba(36, 55, 141, 0.1);
    }
}

body.auth-saas .auth-card {
    border-radius: var(--auth-radius-card);
    box-shadow: var(--auth-shadow-card);
    border: none;
    padding: 2.75rem 2.4rem;
    animation: auth-saas-fade-up 420ms ease both;
}

@keyframes auth-saas-fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 992px) {
    body.auth-saas .auth-split-form .auth-card {
        box-shadow: none;
        animation: auth-saas-fade-up 420ms ease both;
    }
}

body.auth-saas .auth-card-kicker {
    color: var(--auth-brand);
    opacity: 0.65;
    font-family: var(--auth-font);
    letter-spacing: 0.1em;
}

body.auth-saas .auth-card h4 {
    font-family: var(--auth-font);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #0f172a;
}

body.auth-saas .auth-sub {
    color: #64748b;
    font-weight: 500;
}

body.auth-saas .form-label,
body.auth-saas .auth-card .form-label {
    font-family: var(--auth-font);
    font-weight: 600;
    font-size: 0.8rem;
    color: #334155;
    letter-spacing: 0.01em;
}

body.auth-saas .phone-wrap {
    border-radius: var(--auth-radius-control);
    background: #F6F8FC;
    border: 1.5px solid rgba(36, 55, 141, 0.12);
    transition: border-color var(--auth-transition), box-shadow var(--auth-transition);
}

body.auth-saas .phone-wrap:focus-within {
    border-color: var(--auth-brand);
    box-shadow: var(--auth-focus-ring);
}

body.auth-saas .btn-flag {
    background: rgba(36, 55, 141, 0.06);
    border-right-color: rgba(36, 55, 141, 0.12);
    border-radius: 15px 0 0 15px;
    font-family: var(--auth-font);
}

body.auth-saas .btn-flag:hover {
    background: rgba(36, 55, 141, 0.1);
}

body.auth-saas .phone-wrap .phone-input {
    font-family: var(--auth-font);
    border-radius: 0 15px 15px 0;
}

body.auth-saas .otp-digit {
    border-radius: var(--auth-radius-control);
    background: #F6F8FC;
    border-color: rgba(36, 55, 141, 0.12);
    font-family: var(--auth-font);
}

body.auth-saas .otp-digit:focus,
body.auth-saas .otp-digit.filled {
    border-color: var(--auth-brand);
    box-shadow: var(--auth-focus-ring);
}

body.auth-saas .otp-digit.filled {
    background: rgba(36, 55, 141, 0.06);
}

body.auth-saas .otp-icon-wrap {
    background: linear-gradient(135deg, rgba(36, 55, 141, 0.1) 0%, rgba(27, 111, 184, 0.14) 100%);
    color: var(--auth-brand);
    border-radius: 18px;
}

body.auth-saas .btn-auth-primary {
    border-radius: var(--auth-radius-btn) !important;
    background: #F63145 !important;
    box-shadow: 0 6px 18px rgba(246, 49, 69, 0.28) !important;
    font-family: var(--auth-font);
    font-weight: 600;
    padding: 0.9rem 1.5rem;
    color: #fff !important;
    transition: transform var(--auth-transition), box-shadow var(--auth-transition), background var(--auth-transition);
}

body.auth-saas .btn-auth-primary:hover:not(:disabled) {
    background: #d92a3b !important;
    box-shadow: 0 8px 22px rgba(246, 49, 69, 0.36) !important;
    transform: translateY(-2px);
    color: #fff !important;
}

body.auth-saas .btn-auth-secondary {
    border-radius: var(--auth-radius-btn) !important;
    color: #24378D !important;
    border: 1.5px solid rgba(36, 55, 141, 0.2) !important;
    background: transparent !important;
    font-family: var(--auth-font);
    font-weight: 600;
    transition: background var(--auth-transition), border-color var(--auth-transition), transform var(--auth-transition);
}

body.auth-saas .btn-auth-secondary:hover {
    background: rgba(36, 55, 141, 0.05) !important;
    border-color: #24378D !important;
    color: #24378D !important;
    transform: translateY(-1px);
}

body.auth-saas .auth-nav .btn-outline-primary {
    border-color: #24378D !important;
    color: #24378D !important;
}

body.auth-saas .auth-nav .btn-outline-primary:hover {
    background: #24378D !important;
    color: #fff !important;
}

body.auth-saas .bottom-link a,
body.auth-saas .resend-row a,
body.auth-saas .back-link:hover {
    color: var(--auth-brand);
}

body.auth-saas .bottom-link a:hover,
body.auth-saas .resend-row a:hover {
    color: var(--auth-accent-red);
}

body.auth-saas .auth-footer a:hover {
    color: var(--auth-brand);
}

body.auth-saas .auth-input.form-control {
    background: #F6F8FC;
    border-radius: var(--auth-radius-control);
    border-color: rgba(36, 55, 141, 0.12);
    font-family: var(--auth-font);
}

body.auth-saas .auth-input.form-control:focus {
    border-color: var(--auth-brand);
    box-shadow: var(--auth-focus-ring);
}

@media (max-width: 575.98px) {
    body.auth-saas .auth-card {
        border-radius: 22px;
        padding: 2rem 1.4rem;
    }
}


/* Role cues within shared SaaS auth */
body.auth-saas.auth-org--staff .auth-split-brand .auth-brand-badge {
    background: rgba(11, 132, 255, 0.22);
    border-color: rgba(11, 132, 255, 0.35);
}

body.auth-saas.auth-org--student .auth-split-brand .auth-brand-badge {
    background: rgba(46, 204, 113, 0.22);
    border-color: rgba(46, 204, 113, 0.35);
}

body.auth-saas.auth-org--staff .auth-mobile-brand .auth-brand-badge {
    color: #0B84FF;
    background: rgba(11, 132, 255, 0.1);
    border-color: rgba(11, 132, 255, 0.2);
}

body.auth-saas.auth-org--student .auth-mobile-brand .auth-brand-badge {
    color: #1e9e55;
    background: rgba(46, 204, 113, 0.12);
    border-color: rgba(46, 204, 113, 0.22);
}
