/* ============================================================
   AACCS Auth CSS — Login Page
   ============================================================ */

.auth-body {
    min-height: 100vh;
    background: var(--bg);
}

.theme-toggle-fixed {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100;
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition);
}

.theme-toggle-fixed:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle-fixed svg { width: 16px; height: 16px; }

/* ── TWO-PANEL LAYOUT ──────────────────────────────────────── */
.auth-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ── LEFT PANEL ────────────────────────────────────────────── */
.auth-panel-left {
    background: linear-gradient(160deg, #0B0F1A 0%, #111827 60%, #161D2F 100%);
    border-right: 1px solid var(--border);
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* Decorative blobs */
.auth-panel-left::before {
    content: '';
    position: absolute;
    top: -120px;
    left: -60px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79,110,247,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.auth-panel-left::after {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -40px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34,211,238,0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* Brand */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-logo-mark {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(79,110,247,0.2);
}

.auth-brand-name {
    font-size: 18px;
    font-weight: 800;
    color: #E8EDF5;
    letter-spacing: -0.4px;
}

.auth-brand-sub {
    font-size: 11px;
    color: #8A97B0;
    font-weight: 500;
    margin-top: 1px;
}

/* Hero text */
.auth-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 48px 0; }

.auth-hero-title {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.05;
    color: #E8EDF5;
    margin-bottom: 18px;
}

.auth-hero-accent {
    background: linear-gradient(120deg, var(--accent), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-hero-desc {
    font-size: 14px;
    color: #8A97B0;
    line-height: 1.7;
    max-width: 380px;
    margin-bottom: 28px;
}

/* Feature list */
.auth-feature-list { display: flex; flex-direction: column; gap: 12px; }

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #8A97B0;
}

.auth-feature-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--green);
}

.auth-feature-check svg { width: 11px; height: 11px; stroke-width: 3; }

/* Stats row */
.auth-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.auth-stat { text-align: center; }

.auth-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: #E8EDF5;
    letter-spacing: -0.8px;
}

.auth-stat-label {
    font-size: 11px;
    color: #8A97B0;
    margin-top: 2px;
    font-weight: 500;
}

/* ── RIGHT PANEL ──────────────────────────────────────────── */
.auth-panel-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: var(--bg);
}

/* Card */
.auth-card {
    width: 100%;
    max-width: 420px;
}

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

.auth-card-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--text);
    margin-bottom: 5px;
}

.auth-card-sub {
    font-size: 14px;
    color: var(--text-muted);
}

/* Demo hint */
.auth-demo-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(79,110,247,0.07);
    border: 1px solid rgba(79,110,247,0.2);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.6;
}

.auth-demo-hint svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.auth-demo-hint strong { color: var(--text); }
.auth-demo-hint code {
    font-family: var(--font-mono);
    font-size: 12px;
    background: var(--surface-2);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--accent);
    border: 1px solid var(--border);
}

/* Error */
.auth-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(244,63,94,0.08);
    border: 1px solid rgba(244,63,94,0.2);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--rose);
    margin-bottom: 16px;
}

.auth-error svg { flex-shrink: 0; }

/* Form groups */
.form-group { margin-bottom: 16px; }

/* Remember */
.form-remember { margin-bottom: 20px; }

/* Login button */
.btn-login {
    width: 100%;
    padding: 12px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(79,110,247,0.35);
}

.btn-login:hover:not(:disabled) {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(79,110,247,0.45);
}

.btn-login:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.btn-login-spinner { display: flex; align-items: center; gap: 8px; }

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

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

.auth-divider span {
    font-size: 12px;
    color: var(--text-faint);
    white-space: nowrap;
}

/* SSO buttons */
.auth-sso { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }

.btn-sso {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-sso:hover { border-color: var(--border-2); background: var(--card); }

/* Footer */
.auth-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-faint);
    line-height: 1.8;
}

.auth-footer strong { color: var(--text-muted); }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-panel-left { display: none; }
    .auth-panel-right { padding: 32px 20px; min-height: 100vh; }
}

@media (max-width: 480px) {
    .auth-sso { grid-template-columns: 1fr; }
}
