/**
 * AegisCBT Design System (Proctor Cadence v4.2)
 * Unified Theme for Antigravity CBT Platform
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap');

:root {
    --primary: #166534;
    --primary-rgb: 22, 101, 52;
    --primary-hover: #14532d;
    --primary-subtle: #ecfdf5;
    --primary-border: #a7f3d0;
    
    --surface: #ffffff;
    --background: #f8fafc;
    --border: #e2e8f0;
    --border-subtle: #f1f5f9;
    
    --text-main: #0b1c30;
    --text-muted: #64748b;
    --text-dim: #94a3b8;

    --bs-primary: #166534 !important;
    --bs-primary-rgb: 22, 101, 52 !important;
    --bs-success: #166534 !important;
    --bs-success-rgb: 22, 101, 52 !important;
    --bs-info: #0284c7 !important;
    --bs-info-rgb: 2, 132, 199 !important;
    --bs-warning: #d97706 !important;
    --bs-warning-rgb: 217, 119, 6 !important;
    --bs-danger: #dc2626 !important;
    --bs-danger-rgb: 220, 38, 38 !important;

    --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    --bs-body-bg: #f8fafc !important;
    --bs-body-color: #0b1c30 !important;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    background-color: #f8fafc !important;
    color: #0b1c30 !important;
    -webkit-font-smoothing: antialiased;
}

/* JetBrains Mono Typography */
code, pre, kbd, samp, .font-mono, [class*="mono"] {
    font-family: 'JetBrains Mono', monospace !important;
}

/* Material Symbols Outlined Default */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    line-height: 1;
    display: inline-block;
}
.material-symbols-fill {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Modern Card & Surface Styling */
.card, .stat-card, .table-card, .card-box {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    color: #0b1c30;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04) !important;
}

.card-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-weight: 700;
    font-size: 0.875rem;
    color: #0f172a;
    padding: 0.85rem 1.25rem;
}

.card-footer {
    background-color: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 0.75rem 1.25rem;
}

/* Button Refinement */
.btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 6px !important;
    padding: 0.45rem 0.95rem;
    transition: all 0.15s ease;
}

.btn-primary {
    background-color: #166534 !important;
    border-color: #166534 !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: #14532d !important;
    border-color: #14532d !important;
    color: #ffffff !important;
}

.btn-outline-primary {
    color: #166534 !important;
    border-color: #166534 !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    background-color: #ecfdf5 !important;
    border-color: #166534 !important;
    color: #166534 !important;
}

.btn-success {
    background-color: #166534 !important;
    border-color: #166534 !important;
    color: #ffffff !important;
}

.btn-success:hover {
    background-color: #14532d !important;
    border-color: #14532d !important;
}

.btn-outline-secondary, .btn-secondary-custom {
    border-color: #cbd5e1 !important;
    color: #475569 !important;
    background-color: #ffffff !important;
}

.btn-outline-secondary:hover {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

.btn-light {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
}

.btn-light:hover {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

/* Badge Refinement */
.badge {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    border-radius: 4px !important;
    padding: 0.35em 0.6em;
    letter-spacing: 0.02em;
}

.bg-primary, .badge.bg-primary {
    background-color: #166534 !important;
    color: #ffffff !important;
}

.bg-primary-subtle, .badge.bg-primary-subtle {
    background-color: #ecfdf5 !important;
    color: #166534 !important;
    border: 1px solid #a7f3d0 !important;
}

.bg-success, .badge.bg-success {
    background-color: #166534 !important;
    color: #ffffff !important;
}

.bg-success-subtle, .badge.bg-success-subtle {
    background-color: #ecfdf5 !important;
    color: #166534 !important;
    border: 1px solid #a7f3d0 !important;
}

.bg-warning-subtle, .badge.bg-warning-subtle {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
}

.bg-danger-subtle, .badge.bg-danger-subtle {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
}

.bg-info-subtle, .badge.bg-info-subtle {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #bae6fd !important;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 6px !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 0.8125rem;
    color: #0f172a;
    background-color: #ffffff;
    padding: 0.45rem 0.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #166534 !important;
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.15) !important;
    outline: 0;
}

.form-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
    margin-bottom: 0.35rem;
}

/* Table Clean Styling */
.table {
    --bs-table-bg: transparent;
    font-size: 0.8125rem;
    color: #1e293b;
    border-color: #f1f5f9;
}

.table thead th {
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: #64748b !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    padding: 0.75rem 0.75rem;
}

.table tbody td {
    padding: 0.75rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: #f8fafc !important;
}

/* Nav Tabs */
.nav-tabs {
    border-bottom: 1px solid #e2e8f0 !important;
}

.nav-tabs .nav-link {
    font-weight: 600;
    font-size: 0.8125rem;
    color: #64748b;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.6rem 1rem;
    border-radius: 0;
}

.nav-tabs .nav-link:hover {
    color: #0f172a;
    border-bottom: 2px solid #cbd5e1;
}

.nav-tabs .nav-link.active {
    color: #166534 !important;
    border-bottom: 2px solid #166534 !important;
    background: transparent;
}

/* Alerts */
.alert {
    border-radius: 8px !important;
    font-size: 0.8125rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
    color: #166534 !important;
}

.alert-info {
    background-color: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #1e40af !important;
}

.alert-warning {
    background-color: #fffbeb !important;
    border-color: #fde68a !important;
    color: #92400e !important;
}

.alert-danger {
    background-color: #fef2f2 !important;
    border-color: #fecaca !important;
    color: #991b1b !important;
}

/* Modal */
.modal-content {
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1) !important;
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
    background-color: #ffffff;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 0.85rem 1.25rem;
    background-color: #f8fafc;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}
