/* BaselineIQ Dashboard Styles — Ensolvia Design System */

:root {
    --primary: #1a2744;
    --primary-dark: #0f1a2e;
    --primary-light: #2a3d5c;
    --accent: #c9982e;
    --accent-light: #d4ab4a;
    --accent-bg: rgba(201,152,46,0.08);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #dc2626;
    --steel: #64748b;
    --gray-50: #1e293b;
    --gray-100: #1a2235;
    --gray-200: rgba(255,255,255,0.06);
    --gray-300: rgba(255,255,255,0.1);
    --gray-600: #94a3b8;
    --gray-700: #cbd5e1;
    --gray-800: #e2e8f0;
    --gray-900: #f1f5f9;

    --text: #e2e8f0;
    --text-light: #94a3b8;
    --border: rgba(255,255,255,0.1);
    --bg-light: #0f1a2e;
    --purple: #c9982e;
    --radius: 6px;
    --shadow: 0 1px 4px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.4);
    --font-mono: 'JetBrains Mono','Fira Code','Consolas',monospace;
    --sidebar-width: 240px;
    --sidebar-collapsed: 60px;
    --topbar-height: 56px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0f1520;
    color: #e2e8f0;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ======== SIDEBAR ======== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--primary);
    border-right: 1px solid rgba(201,152,46,0.2);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: width 0.25s ease;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(201,152,46,0.12);
    min-height: var(--topbar-height);
}

.sidebar-powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.sidebar-powered-by img {
    height: 18px;
    width: auto;
    opacity: 0.5;
}
.sidebar-powered-by span {
    font-size: 0.6rem;
    color: #64748b;
    font-style: italic;
    white-space: nowrap;
}

/* BaselineIQ wordmark */
.brand-wordmark {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.brand-wordmark .brand-bottom {
    letter-spacing: -0.01em;
}
.brand-wordmark .brand-bottom .brand-base {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    color: #f1f5f9;
}
.brand-wordmark .brand-bottom .brand-iq {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #c9982e;
}
.brand-wordmark .brand-bottom .brand-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: #c9982e;
    border-radius: 50%;
    margin-left: 1px;
    vertical-align: baseline;
    position: relative;
    top: 0px;
}
.brand-wordmark .brand-tagline {
    font-family: 'Outfit', sans-serif;
    font-size: 0.5rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #64748b;
    margin-top: 2px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.sidebar-section-label {
    padding: 16px 16px 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--steel);
    white-space: nowrap;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 16px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    white-space: nowrap;
    border-left: 3px solid transparent;
}

.sidebar-item:hover {
    color: #e2e8f0;
    background: rgba(255,255,255,0.04);
}

.sidebar-item.active {
    color: var(--accent);
    background: var(--accent-bg);
    border-left-color: var(--accent);
}

.sidebar-item .icon {
    font-size: 1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-item .label {
    white-space: nowrap;
}

.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: none;
    background: rgba(255,255,255,0.03);
    border-top: 1px solid rgba(255,255,255,0.06);
    color: var(--steel);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.15s;
}

.sidebar-collapse-btn:hover {
    color: var(--accent);
    background: rgba(255,255,255,0.06);
}

/* Sidebar collapsed state */
.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .sidebar-item .label,
.sidebar.collapsed .brand-tagline,
.sidebar.collapsed .brand-wordmark,
.sidebar.collapsed .sidebar-powered-by {
    display: none;
}

.sidebar.collapsed .sidebar-brand {
    justify-content: center;
    padding: 16px 8px;
}

.sidebar.collapsed .sidebar-item {
    justify-content: center;
    padding: 9px 0;
    border-left-width: 0;
}

body.sidebar-collapsed .topbar {
    left: var(--sidebar-collapsed);
}

body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* ======== TOPBAR (replaces old header) ======== */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: var(--primary-dark);
    border-bottom: 3px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 90;
    transition: left 0.25s ease;
}

.topbar .project-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar .project-selector label {
    font-weight: 500;
    color: var(--steel);
    font-size: 0.85rem;
}

.topbar .project-selector input {
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    font-size: 0.85rem;
    background: var(--primary);
    color: #e2e8f0;
}

.topbar .project-selector input::placeholder {
    color: var(--steel);
}

/* ======== MAIN CONTENT AREA ======== */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: calc(var(--topbar-height) + 24px);
    padding-bottom: 40px;
    min-height: 100vh;
    transition: margin-left 0.25s ease;
}

.main-content > .container {
    max-width: 1400px;
}

/* ======== OLD NAV-TABS (hidden, replaced by sidebar) ======== */
.nav-tabs {
    display: none;
}

/* Old header class (hidden on dashboard, used on other pages) */
.header {
    background: var(--primary-dark);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    border-bottom: 3px solid var(--accent);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
}

.project-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-selector label {
    font-weight: 500;
    color: var(--steel);
}

.project-selector input {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: var(--primary);
    color: #e2e8f0;
}

/* ======== BUTTONS ======== */
.btn-primary {
    background: var(--accent);
    color: var(--primary);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.btn-primary:hover {
    background: var(--accent-light);
    box-shadow: 0 2px 8px rgba(201,152,46,0.3);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-secondary {
    background: transparent;
    color: #cbd5e1;
    border: 1px solid var(--steel);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-bg);
}

.btn-secondary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-icon {
    padding: 6px 8px;
    line-height: 1;
    font-size: 0.85rem;
}

.btn-danger-outline {
    background: transparent;
    color: #fca5a5;
    border: 1px solid var(--danger);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger-outline:hover {
    background: rgba(220,38,38,0.1);
}

.btn-purple {
    background: var(--accent);
    color: var(--primary);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.btn-purple:hover {
    background: var(--accent-light);
    box-shadow: 0 2px 8px rgba(201,152,46,0.3);
}

/* ======== LAYOUT HELPERS ======== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h2,
.section-header h3 {
    margin: 0;
}

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

.card-header h3 {
    margin: 0;
}

.hidden {
    display: none !important;
}

.scroll-panel {
    max-height: 400px;
    overflow-y: auto;
}

/* Card Accents */
.card-accent-purple {
    border-left: 4px solid var(--accent);
}

.card-accent-green {
    border-left: 4px solid var(--success);
}

.card-accent-amber {
    border-left: 4px solid var(--warning);
}

.card-accent-blue {
    border-left: 4px solid #60a5fa;
}

.card-accent-violet {
    border-left: 4px solid var(--accent);
}

/* ======== FORMS ======== */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #cbd5e1;
}

.form-input {
    width: 100%;
    padding: 8px 10px;
    height: 38px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    font-size: 0.9rem;
    background: #0f1a2e;
    color: #e2e8f0;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201,152,46,0.15);
}

.form-input::placeholder {
    color: var(--steel);
}

textarea.form-input {
    height: auto;
    resize: vertical;
}

select.form-input {
    background: #0f1a2e;
    color: #e2e8f0;
}

/* ======== MODALS ======== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #1a2235;
    border: 1px solid rgba(201,152,46,0.15);
    border-radius: var(--radius);
    padding: 30px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    color: #e2e8f0;
}

.modal-content--sm {
    max-width: 500px;
}

.modal-content--md {
    max-width: 650px;
}

.modal-content--lg {
    max-width: 800px;
}

.modal-content h3:first-child {
    margin-top: 0;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ======== METRICS GRID ======== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Metric Block (inline stat card) */
.metric-block {
    padding: 15px;
    background: #0f1a2e;
    border-radius: 8px;
}

.metric-block-title {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.metric-block-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--accent);
    font-family: var(--font-mono);
}

.metric-block-label {
    font-size: 0.9rem;
    color: var(--steel);
    margin-top: 2px;
}

/* EVM Summary Grid */
.evm-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 12px;
    padding: 12px;
    background: #0f1a2e;
    border-radius: 8px;
}

.evm-summary-grid .evm-stat {
    text-align: center;
}

.evm-summary-grid .evm-stat-label {
    font-size: 0.8rem;
    color: var(--steel);
}

.evm-summary-grid .evm-stat-value {
    font-size: 1.3rem;
    font-weight: 600;
}

/* ======== TEXT UTILITIES ======== */
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--steel); }
.fw-600 { font-weight: 600; }
.text-mono { font-family: var(--font-mono); font-size: 0.8rem; }

/* Info Callout */
.info-callout {
    background: #0f1a2e;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}

.info-callout p {
    font-size: 0.9rem;
    color: var(--steel);
    margin-bottom: 10px;
}

.info-callout p:last-child {
    margin-bottom: 0;
}

/* ======== BADGE VARIANTS ======== */
.badge-blue {
    background: rgba(96,165,250,0.15);
    color: #93c5fd;
}

.badge-purple {
    background: var(--accent-bg);
    color: var(--accent);
}

.badge-inline {
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-inline.badge-blue {
    background: rgba(96,165,250,0.15);
    color: #93c5fd;
}

.badge-inline.badge-purple {
    background: var(--accent-bg);
    color: var(--accent);
}

/* ======== FLEX ROW HELPERS ======== */
.flex-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.flex-row-center {
    display: flex;
    gap: 10px;
    align-items: center;
}

.flex-1 {
    flex: 1;
    min-width: 250px;
}

/* ======== SEARCH RESULTS DROPDOWN ======== */
.search-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
    background: #1a2235;
    border: 1px solid rgba(255,255,255,0.1);
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.search-result-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #cbd5e1;
}

.wp-quick-select {
    width: auto;
    min-width: 200px;
    padding: 6px 10px;
    font-size: 0.85rem;
}

.search-result-item:hover {
    background: var(--accent-bg);
}

/* Summary callout box */
.summary-callout {
    margin-top: 15px;
    padding: 10px;
    background: rgba(16,185,129,0.1);
    border-radius: 6px;
    font-size: 0.85rem;
    color: #34d399;
}

/* ======== LOADING ======== */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
    color: #e2e8f0;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* ======== TAB CONTENT ======== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

.tab-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 10px;
}

.tab-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

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

/* ======== KPI GRID ======== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: #1e293b;
    border: 1px solid rgba(201,152,46,0.15);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.kpi-icon.health {
    background: linear-gradient(135deg, #10b981, #059669);
}

.kpi-icon.confidence {
    background: linear-gradient(135deg, #1a2744, #c9982e);
}

.kpi-icon.date {
    background: linear-gradient(135deg, #c9982e, #a67c1a);
}

.kpi-icon.risks {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.kpi-icon.baseline {
    background: linear-gradient(135deg, #1a2744, #2a3d5c);
}

.kpi-content h3 {
    font-size: 0.85rem;
    color: var(--steel);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--accent);
    font-family: var(--font-mono);
    margin-bottom: 0.25rem;
}

.kpi-label {
    font-size: 0.75rem;
    color: var(--steel);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ======== CARDS ======== */
.card {
    background: #1a2235;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    color: #f1f5f9;
    font-size: 1.1rem;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

/* ======== GRID ======== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ======== TABLES ======== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 0.75rem;
    background: var(--primary);
    border-bottom: 2px solid rgba(201,152,46,0.3);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    font-family: var(--font-mono);
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.85rem;
    color: #cbd5e1;
}

.data-table tr:hover {
    background: rgba(201,152,46,0.04);
}

/* ======== STATUS BADGES ======== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.good {
    background: rgba(16,185,129,0.15);
    color: #34d399;
}

.badge.fair {
    background: rgba(251,191,36,0.15);
    color: #fbbf24;
}

.badge.at-risk {
    background: rgba(220,38,38,0.15);
    color: #fca5a5;
}

.badge.low {
    background: rgba(96,165,250,0.15);
    color: #93c5fd;
}

.badge.medium {
    background: rgba(251,191,36,0.15);
    color: #fbbf24;
}

.badge.high {
    background: rgba(249,115,22,0.15);
    color: #fb923c;
}

.badge.critical {
    background: rgba(220,38,38,0.15);
    color: #fca5a5;
}

/* ======== METRICS ======== */
.metric-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.metric-row:last-child {
    border-bottom: none;
}

.metric-label {
    font-weight: 500;
    color: #94a3b8;
}

.metric-value {
    font-weight: 600;
    color: #e2e8f0;
}

/* ======== EXCEPTION ITEMS ======== */
.exception-item {
    padding: 1rem;
    border-left: 4px solid var(--warning);
    background: #0f1a2e;
    margin-bottom: 0.75rem;
    border-radius: 4px;
}

.exception-item.critical {
    border-left-color: var(--danger);
}

.exception-item h4 {
    margin-bottom: 0.5rem;
    color: #e2e8f0;
    font-size: 0.95rem;
}

.exception-item .reasons {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.exception-item .action {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ======== RISK ITEMS ======== */
.risk-item {
    padding: 1rem;
    background: #0f1a2e;
    margin-bottom: 0.75rem;
    border-radius: 4px;
    border-left: 4px solid var(--steel);
}

.risk-item.high {
    border-left-color: var(--warning);
}

.risk-item.critical {
    border-left-color: var(--danger);
}

.risk-item h4 {
    margin-bottom: 0.5rem;
    color: #e2e8f0;
    font-size: 0.95rem;
}

.risk-item .risk-factors {
    font-size: 0.85rem;
    color: #94a3b8;
}

.risk-tag {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 0.25rem;
    margin-top: 0.25rem;
    color: #94a3b8;
}

/* ======== FOOTER ======== */
.footer {
    background: var(--primary);
    border-top: 1px solid rgba(201,152,46,0.2);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    color: var(--steel);
    font-size: 0.85rem;
}

/* ======== CHART CONTAINERS ======== */
canvas {
    max-height: 400px;
}

/* ======== EMPTY STATE ======== */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--steel);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-collapsed);
    }

    .sidebar .sidebar-brand-text,
    .sidebar .sidebar-section-label,
    .sidebar .sidebar-item .label {
        display: none;
    }

    .sidebar .sidebar-brand {
        justify-content: center;
        padding: 16px 8px;
    }

    .sidebar .sidebar-item {
        justify-content: center;
        padding: 9px 0;
        border-left-width: 0;
    }

    .topbar {
        left: var(--sidebar-collapsed);
    }

    .main-content {
        margin-left: var(--sidebar-collapsed);
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
