﻿:root[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-card: #ffffff;
    --text-primary: #1f1f1f;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --accent-color: #0078d4;
    --header-bg: #ffffff;
    --sidebar-bg: #f5f5f5;
    --progress-yellow: #ffd700;
    --progress-bg: #e0e0e0;
    --card-shadow: rgba(0, 0, 0, 0.16);
}

:root[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #404040;
    --accent-color: #4db8ff;
    --header-bg: #1f1f1f;
    --sidebar-bg: #1a1a1a;
    --progress-yellow: #ffd700;
    --progress-bg: #404040;
    --card-shadow: rgba(0, 0, 0, 0.3);
}
/* ----------------------------------------------------------
   GLOBAL RESET (matches React baseline)
-----------------------------------------------------------*/
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-size-adjust: 100%;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* ----------------------------------------------------------
   ROOT WRAPPER (critical for React-matching layout)
-----------------------------------------------------------*/
.auth-root {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, rgba(59, 130, 246, 0.15), transparent), radial-gradient(circle at bottom, rgba(16, 185, 129, 0.08), transparent), var(--bg-primary);
}

/* ----------------------------------------------------------
   THEME VARIABLES (LIGHT & DARK)
-----------------------------------------------------------*/
:root[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-card: #ffffff;
    --text-primary: #1f1f1f;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --accent-color: #0078d4;
    --header-bg: #ffffff;
    --sidebar-bg: #f5f5f5;
    --progress-yellow: #ffd700;
    --progress-bg: #e0e0e0;
    --card-shadow: rgba(0, 0, 0, 0.16);
}

:root[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #404040;
    --accent-color: #4db8ff;
    --header-bg: #1f1f1f;
    --sidebar-bg: #1a1a1a;
    --progress-yellow: #ffd700;
    --progress-bg: #404040;
    --card-shadow: rgba(0, 0, 0, 0.3);
}

/* Light mode card elevation
-----------------------------------------------------------*/
[data-theme='light'] .dashboard-card,
[data-theme='light'] .org-overview-card,
[data-theme='light'] .table-container,
[data-theme='light'] .controls-header,
[data-theme='light'] .assessment-header,
[data-theme='light'] .assessment-tabs,
[data-theme='light'] .sidebar-section,
[data-theme='light'] .practice-details-container,
[data-theme='light'] .control-description-card,
[data-theme='light'] .control-form-card {
    box-shadow: 0 3px 12px var(--card-shadow);
    border-color: rgba(0, 0, 0, 0.12);
}

/* ----------------------------------------------------------
   ANIMATION
-----------------------------------------------------------*/
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----------------------------------------------------------
   PAGE WRAPPER
-----------------------------------------------------------*/
.auth-page {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.auth-helper {
    font-size: 12px;
    color: var(--text-secondary);
}

.auth-helper {
    font-size: 12px;
    color: var(--text-secondary);
}
/* ----------------------------------------------------------
   CARD (900px exactly like React)
-----------------------------------------------------------*/
.auth-card {
    width: 100%;
    max-width: 900px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 36px;
    animation: fadeInUp 0.4s ease;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.15);
}

/* ----------------------------------------------------------
   BRAND
-----------------------------------------------------------*/
.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

    .auth-brand img {
        width: 160px;
        height: auto;
        max-height: 80px;
        border-radius: 16px;
        border: 1px solid rgba(59, 130, 246, 0.25);
        object-fit: contain;
    }

/* ----------------------------------------------------------
   TITLES
-----------------------------------------------------------*/
.auth-brand-name {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auth-brand-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.auth-brand-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ----------------------------------------------------------
   FORM
-----------------------------------------------------------*/
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.auth-input {
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    padding: 0 14px;
    font-size: 14px;
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    .auth-input:focus {
        outline: none;
        border-color: var(--accent-color);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    }

/* ----------------------------------------------------------
   SUBMIT BUTTON
-----------------------------------------------------------*/
.auth-submit {
    height: 46px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #2563EB, #0EA5E9);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    letter-spacing: 0.4px;
    margin-top: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .auth-submit:hover {
        transform: translateY(-1px);
        box-shadow: 0 16px 32px rgba(37, 99, 235, 0.35);
    }

/* Remember + Forgot Row */
.auth-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

/* Left side: checkbox + label */
.auth-remember-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary) !important;
    margin: 0;
}

/* Checkbox color */
.auth-remember-checkbox {
    accent-color: #2563EB !important;
}

/* Forgot password link */
.auth-forgot-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-color);
    white-space: nowrap;
}




/* ----------------------------------------------------------
   LINKS
-----------------------------------------------------------*/
.auth-links {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    text-align: center;
}

.auth-link {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .auth-link:hover {
        opacity: 0.85;
    }

.auth-muted-text {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}
/* ----------------------------------------------------------
   CONTENT STRUCTURE
-----------------------------------------------------------*/
.auth-content-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    margin-top: 24px;
}

.auth-form-section {
    flex: 1;
}

.auth-sso-section {
    flex: 0 0 auto;
    min-width: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ----------------------------------------------------------
   VERTICAL DIVIDER
-----------------------------------------------------------*/
.auth-divider-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 8px;
    color: var(--text-secondary);
    font-size: 12px;
    padding: 0 8px;
    flex-shrink: 0;
}
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--text-secondary);
    font-size: 12px;
}

    .auth-divider::before,
    .auth-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--border-color);
    }

    .auth-divider-vertical::before,
    .auth-divider-vertical::after {
        content: '';
        width: 1px;
        flex: 1;
        background: var(--border-color);
        min-height: 40px;
    }

/* ----------------------------------------------------------
   SSO BUTTONS
-----------------------------------------------------------*/
.auth-sso-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.auth-sso-button {
    height: 46px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.auth-sso-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-sso-button:hover {
    border-color: var(--accent-color);
    background: var(--bg-card);
    transform: translateY(-1px);
}

/* ----------------------------------------------------------
   RESPONSIVE
-----------------------------------------------------------*/
@media (max-width: 768px) {
    .auth-content-wrapper {
        flex-direction: column;
        gap: 24px;
    }

    .auth-divider-vertical {
        flex-direction: row;
        width: 100%;
        padding: 8px 0;
    }

        .auth-divider-vertical::before,
        .auth-divider-vertical::after {
            width: 100%;
            height: 1px;
            min-height: 0;
        }

    .auth-sso-section {
        min-width: 100%;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 28px 24px;
    }

    .auth-title {
        font-size: 22px;
    }

    .auth-content-wrapper {
        gap: 20px;
    }
}


/* Landing Page Styles */
.landing-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

    .landing-page::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15), transparent 50%), radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.15), transparent 50%);
        pointer-events: none;
    }

.landing-container {
    max-width: 900px;
    width: 100%;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 60px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease;
}

.landing-header {
    margin-bottom: 48px;
}

.landing-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.landing-logo-main {
    width: 250px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.4));
}

.landing-logo-aatd {
    width: 350px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.3));
}

.landing-content {
    text-align: center;
    color: white;
}

.landing-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: #ffffff;
}

.landing-highlight {
    color: #60a5fa;
    font-weight: 800;
}

.landing-subtitle {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 48px;
}

    .landing-subtitle strong {
        color: #60a5fa;
        font-weight: 700;
    }

.landing-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.landing-btn {
    padding: 14px 40px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
}

.landing-btn-primary {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

    .landing-btn-primary:hover {
        background: #2563eb;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
    }

.landing-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 11px 32px;
    font-size: 0.875rem;
    min-width: 128px;
}

    .landing-btn-secondary:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-2px);
    }

.landing-footer {
    margin-top: 48px;
    text-align: center;
    font-size: 0.875rem;
    color: #94a3b8;
}

/* Responsive Styles for Split Layout */
@media (max-width: 1024px) {
    .auth-page.split-layout {
        grid-template-columns: 1fr;
    }

    .auth-branding-side {
        display: none;
    }

    .auth-form-side {
        padding: 40px 20px;
    }

    .branding-logos {
        flex-direction: column;
        gap: 24px;
    }

    .chac-logo,
    .aatd-logo {
        width: 200px;
    }

    .branding-title,
    .lobby-title,
    .landing-title {
        font-size: 2rem;
    }

    .branding-subtitle,
    .lobby-subtitle,
    .landing-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .lobby-container,
    .landing-container {
        padding: 40px 24px;
    }

    .lobby-logos,
    .landing-logos {
        flex-direction: column;
        gap: 24px;
    }

    .lobby-logo-main,
    .lobby-logo-aatd,
    .landing-logo-main,
    .landing-logo-aatd {
        width: 200px;
    }

    .lobby-title,
    .landing-title {
        font-size: 1.75rem;
    }

    .lobby-instructions {
        padding: 24px;
    }

        .lobby-instructions h2 {
            font-size: 1.25rem;
        }

    .landing-cta {
        flex-direction: column;
    }

    .landing-btn {
        width: 100%;
    }
}
