/**
 * Auth / login pages — fixed tokens (not admin UI themes).
 * Snapshot of :root typography + core colors from aurazenix-theme.css @ HEAD.
 * Login templates load this instead of aurazenix-theme.css.
 */
:root {
    --az-primary: #475569;
    --az-primary-dark: #334155;
    --az-primary-darker: #1E293B;
    --az-primary-light: #64748B;
    --az-primary-rgb: 71, 85, 105;

    --az-bg-body: #FFFFFF;
    --az-bg-secondary: #F8FAFC;

    --az-text-primary: #0F172A;
    --az-text-secondary: #475569;
    --az-text-muted: #64748B;
    --az-text-white: #FFFFFF;
    --az-text-on-page: var(--az-text-primary);
    --az-text-on-card: var(--az-text-primary);
    --az-text-emphasis: var(--az-primary-dark);
    --az-text-success-soft: var(--az-status-success-text);
    --az-text-warning-soft: var(--az-status-warning-text);
    --az-text-danger-soft: var(--az-status-danger-text);

    --az-surface: #ffffff;
    --az-surface-alt: #F8FAFC;
    --az-surface-page: var(--az-bg-body);
    --az-surface-hover: #f3f4f6;

    --az-status-success-bg: #86EFAC;
    --az-status-success-text: #052E16;
    --az-status-success-border: #4ADE80;
    --az-status-warning-bg: #FCD34D;
    --az-status-warning-text: #422006;
    --az-status-warning-border: #FBBF24;
    --az-status-info-bg: #7DD3FC;
    --az-status-info-text: #082F49;
    --az-status-info-border: #38BDF8;
    --az-status-danger-bg: #FCA5A5;
    --az-status-danger-text: #450A0A;
    --az-status-danger-border: #F87171;

    --az-line-height-base: 1.5;
    --az-line-height-sm: 1.25;

    --az-font-size-2xs: 0.65rem;
    --az-font-size-xs: 0.75rem;
    --az-font-size-sm: 0.875rem;
    --az-font-size-base: 0.875rem;
    --az-font-size-lg: 1rem;
    --az-font-size-xl: 1.0625rem;
    --az-font-size-3xl: 1.25rem;

    --az-type-page-title: var(--az-font-size-3xl);
    --az-type-section-title: var(--az-font-size-xl);
    --az-type-card-title: var(--az-font-size-lg);
    --az-type-card-body: var(--az-font-size-base);
    --az-type-small: var(--az-font-size-xs);
    --az-type-meta: var(--az-font-size-xs);
    --az-type-caption: var(--az-font-size-2xs);
    --az-type-line-heading: var(--az-line-height-base);
    --az-type-line-body: var(--az-line-height-sm);
}

/* Split-panel auth flow (tenant slug → login) — must match select_tenant shell */
body.auth-login-flow {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    display: block;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.auth-login-flow .auth-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

body.auth-login-flow .auth-left {
    flex: 1;
    background: #1F2937;
}

body.auth-login-flow .auth-right {
    flex: 1;
    background: #FFFFFF;
}

body.auth-login-flow .login-header h1 {
    color: #1F2937;
    font-size: var(--az-type-page-title);
    font-weight: 700;
}

body.auth-login-flow .login-header p {
    color: #64748B;
    font-size: var(--az-type-card-body);
}

body.auth-login-flow .form-label {
    color: #475569;
    font-weight: 500;
    font-size: var(--az-type-card-body);
}

body.auth-login-flow .form-control {
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    color: #0F172A;
    background-color: #ffffff;
    box-shadow: none;
}

body.auth-login-flow .form-control:focus {
    border-color: #14B8A6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
    outline: none;
}

body.auth-login-flow .input-group-text {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-right: none;
    color: #64748B;
}

body.auth-login-flow .input-group > .form-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

body.auth-login-flow .input-group-field-password {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

body.auth-login-flow .input-group-field-password > .form-control {
    width: 100%;
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding-right: 2.75rem;
}

body.auth-login-flow .password-toggle {
    position: absolute;
    top: 50%;
    right: 0.625rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.25rem;
    min-width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #64748B;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 0.2s ease, background 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
}

body.auth-login-flow .password-toggle:hover {
    background: rgba(148, 163, 184, 0.15);
    color: #475569;
}

body.auth-login-flow .password-toggle:focus {
    outline: none;
    box-shadow: none;
}

body.auth-login-flow .input-group:focus-within .password-toggle {
    color: #14B8A6;
}

body.auth-login-flow .input-group:focus-within .input-group-field-password > .form-control {
    border-color: #14B8A6;
}

body.auth-login-flow input[type="password"]::-ms-reveal,
body.auth-login-flow input[type="password"]::-ms-clear {
    display: none;
}

body.auth-login-flow .input-group:focus-within .input-group-text {
    border-color: #14B8A6;
    background: #F0FDFA;
    color: #14B8A6;
}

body.auth-login-flow .btn.az-btn.az-btn-primary-subtle {
    background: linear-gradient(135deg, #0F766E 0%, #14B8A6 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
    transition: all 0.3s ease;
}

body.auth-login-flow .btn.az-btn.az-btn-primary-subtle:hover,
body.auth-login-flow .btn.az-btn.az-btn-primary-subtle:focus {
    color: #ffffff;
    background: linear-gradient(135deg, #0F766E 0%, #14B8A6 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

body.auth-login-flow .btn-outline-secondary[name="resend_otp"] {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    color: #64748B;
}

body.auth-login-flow .btn-outline-secondary[name="resend_otp"]:hover {
    background: #F1F5F9;
    border-color: #E2E8F0;
    color: #475569;
}

body.auth-login-flow .form-check-input:checked {
    background-color: #14B8A6;
    border-color: #14B8A6;
}

body.auth-login-flow .forgot-password a {
    color: #0F766E;
    text-decoration: none;
    font-weight: 500;
}

body.auth-login-flow .forgot-password a:hover {
    color: #14B8A6;
    text-decoration: underline;
}

/* -----------------------------------------------------------------------
 * Login v2 brand panel (login page only) — matches the AuraZenix aurora hero.
 * Scoped to body.auth-login-flow.az-login-v2 so the shared select_tenant /
 * forgot_password / password_reset left panels are unaffected.
 * -------------------------------------------------------------------- */
body.auth-login-flow.az-login-v2 .auth-left {
    background:
        radial-gradient(115% 90% at 16% 105%, rgba(20, 184, 166, 0.24) 0%, transparent 46%),
        radial-gradient(95% 85% at 102% 55%, rgba(139, 92, 246, 0.20) 0%, transparent 52%),
        radial-gradient(140% 120% at 32% -10%, rgba(30, 58, 92, 0.55) 0%, transparent 60%),
        linear-gradient(158deg, #0A0F1E 0%, #0B1220 46%, #0A0E1A 100%);
}

/* Violet light arc on the right edge */
body.auth-login-flow.az-login-v2 .auth-left::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -150px;
    left: auto;
    bottom: auto;
    width: 360px;
    height: 130%;
    background: radial-gradient(closest-side, rgba(167, 139, 250, 0.38) 0%, transparent 72%);
    border-radius: 50%;
    filter: blur(26px);
    transform: translateY(-50%);
}

/* Glowing particle-mesh wave along the bottom */
body.auth-login-flow.az-login-v2 .auth-left::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: auto;
    height: 46%;
    background-image: radial-gradient(rgba(94, 234, 212, 0.28) 1px, transparent 1.7px);
    background-size: 14px 14px;
    -webkit-mask-image: radial-gradient(125% 100% at 22% 125%, #000 0%, transparent 62%);
    mask-image: radial-gradient(125% 100% at 22% 125%, #000 0%, transparent 62%);
    opacity: 0.55;
    border-radius: 0;
}

body.auth-login-flow.az-login-v2 .brand-content.az-brand-hero {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

body.auth-login-flow.az-login-v2 .az-brand-mark {
    width: 116px;
    height: auto;
    margin-bottom: 1.75rem;
    filter: drop-shadow(0 10px 34px rgba(45, 212, 191, 0.35));
}

body.auth-login-flow.az-login-v2 .az-brand-wordmark {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: clamp(2rem, 4.2vw, 3rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.22em;
    text-indent: 0.22em;
    color: #F8FAFC;
}

body.auth-login-flow.az-login-v2 .az-brand-wordmark span {
    color: #5EEAD4;
}

body.auth-login-flow.az-login-v2 .az-brand-underline {
    display: block;
    width: 46px;
    height: 2px;
    margin: 0.95rem auto 0;
    border-radius: 2px;
    background: linear-gradient(90deg, #2DD4BF 0%, #5EEAD4 100%);
}

body.auth-login-flow.az-login-v2 .az-brand-subtitle {
    margin: 1.5rem 0 0;
    color: #CBD5E1;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-indent: 0.35em;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    body.auth-login-flow.az-login-v2 .az-brand-mark {
        width: 92px;
        margin-bottom: 1.25rem;
    }

    body.auth-login-flow.az-login-v2 .az-brand-subtitle {
        margin-top: 1.15rem;
        font-size: 0.85rem;
        letter-spacing: 0.3em;
        text-indent: 0.3em;
    }
}

@media (max-width: 576px) {
    body.auth-login-flow.az-login-v2 .az-brand-mark {
        width: 72px;
        margin-bottom: 1rem;
    }

    body.auth-login-flow.az-login-v2 .az-brand-wordmark {
        letter-spacing: 0.16em;
        text-indent: 0.16em;
    }

    body.auth-login-flow.az-login-v2 .az-brand-subtitle {
        font-size: 0.75rem;
        letter-spacing: 0.24em;
        text-indent: 0.24em;
    }
}
