/* ==========================================================================
   Loan Sanction with AI/ML - Modern FinTech Design System
   ========================================================================== */

:root {
    /* Color Palette - Dark Theme Default */
    --bg-base: #0a0e17;
    --bg-surface: #111827;
    --bg-surface-elevated: #1a2234;
    --bg-surface-card: rgba(26, 34, 52, 0.75);
    --bg-surface-input: #151d2e;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: #3b82f6;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.25);
    
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.25);
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --success-border: rgba(16, 185, 129, 0.3);
    
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --warning-border: rgba(245, 158, 11, 0.3);
    
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --danger-border: rgba(239, 68, 68, 0.3);
    
    --info: #06b6d4;
    --info-bg: rgba(6, 182, 212, 0.12);
    
    /* Layout & Spacing */
    --sidebar-width: 270px;
    --header-height: 72px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    /* Transitions & Shadows */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px var(--primary-glow);
}

[data-theme="light"] {
    --bg-base: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f8fafc;
    --bg-surface-card: rgba(255, 255, 255, 0.9);
    --bg-surface-input: #f8fafc;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-focus: #2563eb;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-glow: rgba(37, 99, 235, 0.2);
    
    --accent: #7c3aed;
    --accent-glow: rgba(124, 58, 237, 0.2);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.12);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6, .brand-text {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
    font-weight: 700;
}

/* App Layout Grid */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 0 16px var(--primary-glow);
}

.logo-title {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.2;
}

.logo-title span {
    color: var(--primary);
}

.logo-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 14px;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    padding: 12px 14px 6px;
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.nav-btn i {
    width: 20px;
    height: 20px;
    transition: var(--transition);
}

.nav-btn:hover {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
}

.nav-btn.active {
    background: linear-gradient(90deg, var(--primary-glow), transparent);
    color: var(--primary);
    font-weight: 600;
    border-left: 3px solid var(--primary);
}

.nav-btn.active i {
    color: var(--primary);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface-elevated);
}

.system-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.06), transparent 40%),
                radial-gradient(circle at 10% 90%, rgba(139, 92, 246, 0.05), transparent 40%);
}

/* Top Header */
.top-header {
    height: var(--header-height);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 90;
}

[data-theme="light"] .top-header {
    background: rgba(255, 255, 255, 0.8);
}

.header-left h1 {
    font-size: 1.4rem;
    font-weight: 700;
}

.header-left p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.select-wrapper i {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.select-wrapper select, .form-control {
    background: var(--bg-surface-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 9px 14px 9px 36px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition);
    cursor: pointer;
}

.select-wrapper select:focus, .form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--bg-surface-elevated);
    border-color: var(--primary);
    color: var(--primary);
}

/* Glass & Card Styles */
.glass {
    background: var(--bg-surface-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.glass:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Tab Panels */
.tab-panels {
    padding: 32px;
    flex: 1;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #2563eb);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-surface-input);
    border-color: var(--text-muted);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary-glow);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.badge-info { background: var(--info-bg); color: var(--info); border: 1px solid rgba(6, 182, 212, 0.3); }

/* Disclaimer Banner */
.disclaimer-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-sm);
    color: #93c5fd;
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.disclaimer-banner i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--primary);
}

/* ==========================================================================
   1. LANDING PAGE STYLES
   ========================================================================== */
.landing-hero {
    padding: 60px 20px 40px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3.2rem;
    line-height: 1.15;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #ffffff 30%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-title {
    background: linear-gradient(135deg, #0f172a 30%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 32px;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
}

/* How It Works Flow */
.flow-section {
    margin-top: 40px;
    padding: 36px;
}

.section-heading {
    text-align: center;
    margin-bottom: 36px;
}

.section-heading h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.section-heading p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.flow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    position: relative;
}

.flow-step-card {
    padding: 24px;
    text-align: center;
    position: relative;
}

.flow-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.flow-step-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.flow-step-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.feature-card {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card h3 {
    font-size: 1.2rem;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   2. DASHBOARD STYLES
   ========================================================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.metric-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.metric-icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.metric-value-container {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}

.metric-value {
    font-size: 1.9rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.probability-track {
    width: 100%;
    height: 6px;
    background: var(--bg-surface-elevated);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.probability-bar {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-primary { background: var(--primary); }
.progress-success { background: var(--success); }
.progress-warning { background: var(--warning); }
.progress-danger { background: var(--danger); }
.progress-info { background: var(--info); }

.dashboard-charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.chart-card {
    padding: 24px;
}

.chart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.data-table th {
    padding: 12px 16px;
    background: var(--bg-surface-elevated);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   3. MULTI-STEP ASSESSMENT FORM
   ========================================================================== */
.form-wizard-card {
    max-width: 850px;
    margin: 0 auto;
    padding: 36px;
}

.wizard-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 36px;
}

.wizard-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bg-surface-elevated);
    transform: translateY(-50%);
    z-index: 1;
}

.wizard-progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    height: 3px;
    background: var(--primary);
    transform: translateY(-50%);
    z-index: 2;
    transition: width 0.4s ease;
}

.step-indicator {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-surface-elevated);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.step-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.step-indicator.active .step-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 16px var(--primary-glow);
}

.step-indicator.active .step-label {
    color: var(--primary);
}

.step-indicator.completed .step-circle {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-label span.req {
    color: var(--danger);
}

.form-control {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    width: 100%;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-left {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.9rem;
    font-weight: 700;
}

.input-with-icon .form-control {
    padding-left: 36px;
}

.form-slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slider-val-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.slider-val-display strong {
    color: var(--primary);
    font-size: 1rem;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--bg-surface-elevated);
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary-glow);
    transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.wizard-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   4. ASSESSMENT RESULT & EXPLAINABLE AI
   ========================================================================== */
.result-banner {
    padding: 32px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.result-banner.eligible {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.15));
    border: 1px solid var(--success-border);
}

.result-banner.review {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.1));
    border: 1px solid var(--warning-border);
}

.result-banner.high-risk {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(185, 28, 28, 0.1));
    border: 1px solid var(--danger-border);
}

.result-status-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.result-score-gauge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin: 24px 0;
}

.gauge-circle {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 6px solid var(--primary);
    box-shadow: 0 0 24px var(--primary-glow);
}

.gauge-circle .score-num {
    font-size: 2.5rem;
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    line-height: 1;
}

.gauge-circle .score-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.result-grid-factors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.factors-card {
    padding: 24px;
}

.factors-card h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.factor-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.factor-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    line-height: 1.4;
}

.factor-item i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.xai-section {
    padding: 28px;
    margin-bottom: 28px;
}

.xai-bar-row {
    margin-bottom: 14px;
}

.xai-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.xai-bar-track {
    height: 8px;
    background: var(--bg-surface-elevated);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.xai-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* ==========================================================================
   5. WHAT-IF SIMULATOR STYLES
   ========================================================================== */
.simulator-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 28px;
}

.simulator-controls {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.simulator-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sim-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.sim-card {
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
}

.sim-card.baseline {
    background: var(--bg-surface-elevated);
}

.sim-card.simulated {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    flex-direction: column;
    gap: 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--bg-surface-elevated);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.loading-subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Modal styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Print Friendly Styles */
@media print {
    .sidebar, .top-header, .btn, .wizard-footer, .modal-close {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
    body {
        background: #fff !important;
        color: #000 !important;
    }
    .glass, .modal-content {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .dashboard-charts-grid, .simulator-layout, .result-grid-factors {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group.full-width {
        grid-column: span 1;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .tab-panels {
        padding: 20px 16px;
    }
}