/* Modern Premium Light Theme Dashboard Stylesheet for Maqsut Narikbayev University */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #f6f8fb;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.07);
    --sidebar-bg: rgba(255, 255, 255, 0.98);

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary: #9b0012; /* MNU Burgundy Red */
    --primary-hover: #b9001b;
    --primary-glow: rgba(155, 0, 18, 0.2);
    
    --gold: #bca15f; /* MNU Gold */
    --gold-hover: #cdb271;
    --gold-glow: rgba(188, 161, 95, 0.25);
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Likert Scale Colors (Optimized for light mode) */
    --likert-5: #0f766e; /* Strongly Agree */
    --likert-4: #2dd4bf; /* Agree */
    --likert-3: #cbd5e1; /* Neutral / NA */
    --likert-2: #fca5a5; /* Disagree */
    --likert-1: #dc2626; /* Strongly Disagree */
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 5% 15%, rgba(155, 0, 18, 0.03) 0%, transparent 35%),
        radial-gradient(circle at 95% 85%, rgba(188, 161, 95, 0.04) 0%, transparent 35%);
    background-attachment: fixed;
    line-height: 1.5;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.85);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.logo-section img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.logo-section h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin: 0;
    overflow-wrap: anywhere;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
}

/* Tabs Nav */
.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.03);
    padding: 0.25rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.03);
}

.tab-btn.active {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Burger Filter Button */
.filter-toggle-btn {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.filter-toggle-btn:hover {
    background: #f8fafc;
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(155, 0, 18, 0.08);
}

.filter-toggle-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Main Content Area */
main {
    flex: 1;
    padding: 2rem;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

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

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

.kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    transform: translateY(-4px);
    border-color: rgba(188, 161, 95, 0.3);
    box-shadow: 0 12px 35px rgba(188, 161, 95, 0.08);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
}

.kpi-card.nps::before {
    background: linear-gradient(90deg, var(--primary), var(--warning));
}

.kpi-card.participation::before {
    background: linear-gradient(90deg, var(--success), var(--gold));
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.kpi-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-icon {
    font-size: 1.1rem;
    color: var(--primary);
    background: rgba(155, 0, 18, 0.08);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.kpi-card.nps .kpi-icon {
    color: var(--gold);
    background: rgba(188, 161, 95, 0.1);
}

.kpi-card.participation .kpi-icon {
    color: var(--success);
    background: rgba(16, 185, 129, 0.08);
}

.kpi-value {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.kpi-subtext {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.kpi-subtext i {
    color: var(--success);
}

/* Grid Layout for Charts */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.dashboard-grid.full-width {
    grid-template-columns: 1fr;
}

.chart-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    height: 420px;
    min-width: 0;
    transition: var(--transition-smooth);
}

.chart-card:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.06);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.chart-container {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
}

/* Context Filter Side Panel */
.filter-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    max-width: 100vw;
    height: 100vh;
    background: var(--sidebar-bg);
    border-left: 1px solid var(--card-border);
    z-index: 1000;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
}

.filter-sidebar.active {
    transform: translateX(0);
}

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

.sidebar-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.sidebar-header h2 i {
    color: var(--primary);
}

.sidebar-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.sidebar-close-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    width: 100%;
    background: #f8fafc;
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-select:hover {
    background: #f1f5f9;
    border-color: rgba(0, 0, 0, 0.15);
}

.filter-select:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(155, 0, 18, 0.1);
}

.filter-select option {
    background: #ffffff;
    color: var(--text-primary);
    padding: 10px;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--card-border);
    display: flex;
    gap: 1rem;
}

.btn {
    flex: 1;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition-smooth);
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(155, 0, 18, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

/* Sidebar overlay background */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Tab 2: Likert Gantt-like Chart View */
.likert-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.likert-legend {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.1rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.color-5 { background-color: var(--likert-5); }
.color-4 { background-color: var(--likert-4); }
.color-3 { background-color: var(--likert-3); }
.color-2 { background-color: var(--likert-2); }
.color-1 { background-color: var(--likert-1); }

/* Likert Categories Accordion */
.likert-category-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
    margin-bottom: 1.5rem;
}

.likert-category-card:hover {
    border-color: rgba(0, 0, 0, 0.12);
}

.category-header {
    padding: 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.01);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: var(--transition-smooth);
}

.category-header:hover {
    background: rgba(0, 0, 0, 0.03);
}

.category-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.category-score-badge {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #047857;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.category-header .chevron-icon {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.likert-category-card.expanded .chevron-icon {
    transform: rotate(180deg);
}

.category-body {
    display: none;
    border-top: 1px solid var(--card-border);
    padding: 1.5rem;
    background: #fafbfd;
}

.likert-category-card.expanded .category-body {
    display: block;
}

/* Question Row with Stacked Bar */
.question-row {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.question-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.question-text-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 2rem;
}

.question-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.question-csat {
    font-size: 0.9rem;
    font-weight: 700;
    color: #047857;
    white-space: nowrap;
}

/* Stacked Bar Graphics */
.stacked-bar-wrapper {
    display: flex;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.stacked-segment {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
}

.stacked-segment:hover {
    filter: brightness(1.1);
    transform: scaleY(1.05);
    z-index: 10;
}

/* Custom CSS Tooltip */
.stacked-segment .tooltip {
    visibility: hidden;
    width: 220px;
    background: #ffffff;
    color: var(--text-primary);
    text-align: left;
    border-radius: 8px;
    padding: 0.8rem;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    margin-left: -110px;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    transform: translateY(10px);
    pointer-events: none;
    font-weight: 400;
    font-size: 0.8rem;
    line-height: 1.4;
}

.stacked-segment .tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

.stacked-segment:hover .tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.tooltip-header {
    font-weight: 700;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 0.25rem;
    color: var(--text-primary);
}

.tooltip-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    color: var(--text-secondary);
}

/* Tab 3: Open Text AI Analysis Drill-down */
.drilldown-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.question-select-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.drilldown-selector {
    display: flex;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.02);
    padding: 0.25rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.selector-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.selector-btn.active {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 4px 10px var(--primary-glow);
}

.drilldown-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
    min-height: 480px;
}

@media (max-width: 1024px) {
    .drilldown-panels {
        grid-template-columns: 1fr;
    }
}

.drilldown-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    min-height: 480px;
}

.drilldown-header {
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drilldown-title {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.drilldown-back-btn {
    background: #f1f5f9;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: var(--transition-smooth);
}

.drilldown-back-btn:hover {
    color: var(--text-primary);
    background: #e2e8f0;
}

.drilldown-list {
    flex: 1;
    overflow-y: auto;
    max-height: 380px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.5rem;
}

/* Category & Subcategory Row */
.drilldown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--card-border);
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.drilldown-row:hover {
    background: rgba(155, 0, 18, 0.04);
    border-color: rgba(155, 0, 18, 0.2);
    transform: translateX(4px);
}

.drilldown-row.active {
    background: rgba(155, 0, 18, 0.08);
    border-color: var(--primary);
}

.drilldown-label {
    font-size: 0.95rem;
    font-weight: 600;
}

.drilldown-badge {
    background: #ffffff;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.drilldown-row:hover .drilldown-badge {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Text Answers Panel */
.answers-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    min-height: 480px;
}

.answers-header {
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.answers-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.answers-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.answers-list {
    flex: 1;
    overflow-y: auto;
    max-height: 380px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-right: 0.5rem;
}

.answer-item {
    background: #f8fafc;
    border: 1px solid var(--card-border);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition-smooth);
}

.answer-item:hover {
    border-color: rgba(0,0,0,0.12);
    background: #f1f5f9;
}

.answer-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
    font-style: italic;
}

.answer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.meta-tag {
    background: #ffffff;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.meta-tag.school {
    background: rgba(155, 0, 18, 0.05);
    border-color: rgba(155, 0, 18, 0.15);
    color: var(--primary);
}

.meta-tag.program {
    background: rgba(188, 161, 95, 0.1);
    border-color: rgba(188, 161, 95, 0.2);
    color: #8c7132;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.18);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-controls {
        width: 100%;
        justify-content: flex-start;
    }
    
    main {
        padding: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-sidebar {
        width: 100%;
    }
    
    .filter-sidebar.active {
        transform: translateX(0);
    }
}

/* Methodology Collapsible Card Styles */
.methodology-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.methodology-card:hover {
    border-color: rgba(188, 161, 95, 0.3);
}

.methodology-header {
    padding: 0.95rem 1.5rem;
    background: rgba(188, 161, 95, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary);
}

.methodology-header span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.methodology-header i.toggle-chevron {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.methodology-card.collapsed .methodology-body {
    display: none;
}

.methodology-card:not(.collapsed) .toggle-chevron {
    transform: rotate(180deg);
}

.methodology-body {
    padding: 1.5rem;
    border-top: 1px solid var(--card-border);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.methodology-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .methodology-grid {
        grid-template-columns: 1fr;
    }
}

.methodology-section h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-transform: none;
}

.methodology-section p {
    margin-bottom: 0.5rem;
}

.warning-box {
    background: rgba(245, 158, 11, 0.06);
    border-left: 3px solid var(--warning);
    padding: 0.75rem;
    border-radius: 0 6px 6px 0;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    line-height: 1.5;
}

.formula-box {
    background: #f8fafc;
    border: 1px dashed var(--gold);
    border-radius: 8px;
    padding: 0.85rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.85rem;
}

/* Info Icon Button next to CSI/OSI values */
.info-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
    padding: 0.15rem;
    display: inline-flex;
    align-items: center;
    border-radius: 50%;
    margin-left: 0.25rem;
}

.info-btn:hover {
    color: var(--primary);
    background: rgba(155, 0, 18, 0.05);
}

/* TALDAU portal override: keep the published dashboard header compact. */
header {
    min-height: 0 !important;
    height: auto !important;
    padding: 12px 24px !important;
    align-items: center !important;
}

.logo-section {
    min-height: 0 !important;
    height: auto !important;
}

.logo-section img {
    width: auto !important;
    height: 48px !important;
    max-width: 150px !important;
    max-height: 48px !important;
    object-fit: contain !important;
}

.logo-section h1 {
    margin: 0 !important;
    font-size: 1.2rem !important;
    line-height: 1.15 !important;
}

main {
    padding-top: 20px !important;
}
