/* CSS Design System - Cupertino iPhone/iOS Premium Glassmorphism */
:root {
    --bg-gradient-start: #000000;   /* Pitch black for deep OLED look */
    --bg-gradient-end: #1c1c1e;     /* Cupertino dark slate */
    --glass-bg: rgba(28, 28, 30, 0.7); /* Frosted iOS dark material */
    --glass-bg-hover: rgba(44, 44, 46, 0.85);
    --glass-border: rgba(255, 255, 255, 0.12); /* Extremely thin, crisp iOS borders */
    --glass-border-hover: rgba(255, 255, 255, 0.22);
    --text-primary: #ffffff;
    --text-secondary: #aeaeae;
    --text-muted: #8e8e93;          /* iOS standard gray */
    
    /* Cupertino System Colors (Vibrant, premium Apple HIG accents) */
    --color-primary: #2563EB;       /* Royal Blue */
    --color-primary-glow: rgba(37, 99, 235, 0.2);
    --color-success: #30d158;       /* iOS System Green */
    --color-success-glow: rgba(48, 209, 88, 0.2);
    --color-warning: #ff9f0a;       /* iOS System Orange */
    --color-warning-glow: rgba(255, 159, 10, 0.2);
    --color-danger: #ff453a;        /* iOS System Red / Blocker */
    --color-danger-glow: rgba(255, 69, 58, 0.2);
    
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
    --transition-smooth: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1); /* iOS liquid transition physics */
    --border-radius: 20px;          /* Continuous-curve squircle radius */
}

/* Light Theme Variable Overrides (Cupertino light materials) */
body.light-theme {
    --bg-gradient-start: #FFFFFF;   /* Solid pure white background */
    --bg-gradient-end: #FFFFFF;     /* Flat solid background */
    --glass-bg: #FFFFFF;            /* Solid pure white widget background */
    --glass-bg-hover: #faf9ff;      /* Premium soft hover state */
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-border-hover: rgba(0, 0, 0, 0.16);
    --text-primary: #000000;        /* Pure obsidian black */
    --text-secondary: #1c1c1e;      /* iOS dark text contrast */
    --text-muted: #8e8e93;

    --color-primary: #2563EB;       /* Royal Blue (light) */
    --color-primary-glow: rgba(37, 99, 235, 0.12);
    --color-success: #34c759;       /* iOS System Green (light) */
    --color-success-glow: rgba(52, 199, 89, 0.12);
    --color-warning: #ff9500;       /* iOS System Orange (light) */
    --color-warning-glow: rgba(255, 149, 0, 0.12);
    --color-danger: #ff3b30;        /* iOS System Red (light) */
    --color-danger-glow: rgba(255, 59, 48, 0.12);
}

/* Specific Light Theme Elements styling */
body.light-theme .dashboard-header {
    background: #00003F !important; /* Force top header widget to be Deep Midnight Blue (#00003F) */
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 63, 0.2) !important;
}

body.light-theme .dashboard-header .logo-text h1 {
    color: #FFFFFF !important;      /* Header title should be white on the blue background */
}

body.light-theme img[alt="Magellan Logo"] {
    filter: none !important;        /* Keep Magellan logo pure white on the header */
}

body.light-theme .dashboard-header #theme-toggle {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 2px solid #FFFFFF !important;
    color: #FFFFFF !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1) !important;
}

body.light-theme .dashboard-header .btn-refresh,
body.light-theme .dashboard-header #btn-export-pdf {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #FFFFFF !important;
}

body.light-theme .dashboard-header .btn-refresh:hover,
body.light-theme .dashboard-header #btn-export-pdf:hover {
    background: #FFFFFF !important;
    color: #00003F !important;
}

body.light-theme select {
    background: #ffffff !important;   /* Dropdown background colour should be white */
    color: #1e3a8a !important;        /* Dropdown font colour should be dark blue */
    border: 1px solid rgba(30, 58, 138, 0.3) !important;
}

body.light-theme select option {
    background: #ffffff !important;
    color: #1e3a8a !important;
}

body.light-theme .panel {
    background: #F8FAFC !important; /* Force all light-theme widgets to be solid near-white slate (slate-50 #F8FAFC) */
    border: 3px solid #1e3a8a !important; /* Thick blue border for all widgets */
    box-shadow: 0 8px 30px rgba(6, 72, 138, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04) !important; /* Multi-layered premium shadow */
}

/* Ensure all text inside light-theme panels is high-contrast dark text by default */
body.light-theme .panel h2,
body.light-theme .panel h1,
body.light-theme .panel span,
body.light-theme .panel p,
body.light-theme .panel div,
body.light-theme .panel td,
body.light-theme .panel strong {
    color: #1c1c1e !important; /* Default dark slate */
}

body.light-theme .panel .panel-subtitle {
    color: #475569 !important; /* Dark slate subtitle color */
    opacity: 0.85 !important;
}

/* 1. Issues Resolved Widget Theme (Green) */
body.light-theme #resolved-count-monthly {
    color: #16a34a !important; /* Vibrant Emerald Metric */
}

/* 2. Mean Time to Resolve (MTTR) Widget Theme (Purple) */
body.light-theme #resolve-mean-monthly {
    color: #7c3aed !important; /* Vibrant Violet Metric */
}

/* 3. Mean Time to Respond Widget Theme (Vibrant Pink/Purple) */
body.light-theme #respond-avg-monthly {
    color: #a855f7 !important; /* Vibrant Deep Purple Metric */
}

/* 4. Team Utilization - Maintenance Tax Widget Theme (Violet/Success Green) */
body.light-theme #tax-active-total {
    color: #9333ea !important; /* Vibrant Violet Hours Metric */
}
body.light-theme #tax-utilization-rate {
    color: #16a34a !important; /* Vibrant Success Green Rate */
}

/* 5. Team Utilization - Customer Tickets Widget Theme (Ocean Blue/Success Green) */
body.light-theme #customer-active-total {
    color: #0284c7 !important; /* Vibrant Sky Blue Hours Metric */
}
body.light-theme #customer-utilization-rate {
    color: #16a34a !important; /* Vibrant Success Green Rate */
}

/* 6. Overall Team Utilization Widget Theme (Royal Blue) */
body.light-theme #utilization-rate-monthly {
    color: #2563EB !important; /* Vibrant Royal Blue Rate Metric */
}
body.light-theme #utilization-hours-label {
    color: #475569 !important; /* Slate sub-label */
}

/* 7. Unassigned & Forgotten Tickets Daily Widgets */
body.light-theme #unassigned-center-count {
    color: #ef4444 !important; /* Vibrant Crimson Red */
}
body.light-theme #forgotten-center-count {
    color: #d97706 !important; /* Vibrant Amber/Orange */
}

/* 8. Dashboard Main Navigation Tabs Container & Classes */
.dashboard-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: -12px;
    margin-bottom: 24px;
}

.dashboard-tab {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-secondary) !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    padding: 6px 16px !important;
    border-radius: 20px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    display: inline-block !important;
    cursor: pointer !important;
    transition: var(--transition-smooth) !important;
    text-decoration: none !important;
}

.dashboard-tab:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.dashboard-tab.active {
    background: #00005E !important; /* Solid dark blue as requested */
    color: #FFFFFF !important; /* White text for optimal contrast on dark blue background */
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    padding: 6px 16px !important;
    border-radius: 20px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 94, 0.4) !important;
    border: 1px solid #00005E !important;
    display: inline-block !important;
    cursor: default !important;
}

/* Light Theme Variable Overrides */
body.light-theme .dashboard-tab {
    background: rgba(0, 0, 94, 0.08) !important; /* Soft blue background */
    color: #00005E !important;                     /* Dark blue text */
    border: 1px solid rgba(0, 0, 94, 0.25) !important; /* Soft outline */
}

body.light-theme .dashboard-tab:hover {
    background: rgba(0, 0, 94, 0.15) !important;
    color: #00005E !important;
}

body.light-theme .dashboard-tab.active {
    background: #00005E !important;                /* Solid dark blue background */
    color: #FFFFFF !important;                     /* Crisp white text for optimal readability */
    box-shadow: 0 4px 15px rgba(0, 0, 94, 0.3) !important;
    border: 1px solid #00005E !important;
}

body.light-theme #local-tax-tabs {
    background: #ffffff !important;   /* The July/June local tab box background should be white */
    border: 1px solid rgba(30, 58, 138, 0.3) !important;
}

body.light-theme .btn-tab-local {
    color: #1e3a8a !important;        /* Dark blue font for local tabs */
}

body.light-theme .btn-tab-local:hover {
    background: rgba(30, 58, 138, 0.05) !important;
}

body.light-theme .btn-tab-local.active {
    background: #1e3a8a !important;   /* Active tab has dark blue background */
    color: #ffffff !important;        /* Active tab has white text */
}

/* Global Reset & Core Styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    padding: 24px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dashboard-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Glassmorphism Panel Helper Class */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
}

/* Header Component */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    position: relative;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    color: var(--color-primary);
    filter: drop-shadow(0 0 8px var(--color-primary-glow));
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.logo-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.actions-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.data-mode-badge {
    background: var(--color-primary-glow);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
}

.last-updated {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.btn-refresh {
    background: var(--color-primary-glow);
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.btn-refresh:hover {
    background: var(--color-primary);
    color: #000;
    box-shadow: 0 0 15px var(--color-primary-glow);
}

.refresh-icon {
    transition: var(--transition-smooth);
}

/* Spinning Animation for Refresh button */
.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Filters Section */
.filters-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    padding: 18px 24px;
    background: #000082 !important; /* Solid dark blue as requested */
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
}

.filters-section .filter-group label {
    color: #e2e8f0 !important; /* High contrast silver-blue text for readability on dark blue background */
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.filter-group select {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
}

.filter-group select:hover, .filter-group select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary-glow);
}

.filter-group select:disabled {
    background: rgba(15, 23, 42, 0.3);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.03);
    cursor: not-allowed;
}

.filter-helper-text {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--color-warning);
}

/* Health Check-up Row */
.health-check-section {
    display: flex;
}

.health-card {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    padding: 18px 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
}

.health-status-light {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    position: relative;
}

.health-status-light::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.4;
    animation: pulse 2s infinite;
}

/* Light Statuses */
.status-green {
    background-color: var(--color-success);
    box-shadow: 0 0 10px var(--color-success);
}
.status-yellow {
    background-color: var(--color-warning);
    box-shadow: 0 0 10px var(--color-warning);
}
.status-red {
    background-color: var(--color-danger);
    box-shadow: 0 0 10px var(--color-danger);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.4); opacity: 0; }
    100% { transform: scale(1); opacity: 0.4; }
}

.health-details {
    flex-grow: 1;
}

.health-details h3 {
    font-size: 1rem;
    font-weight: 600;
}

.health-details p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.health-badges {
    display: flex;
    gap: 10px;
}

.badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 6px;
}

/* KPIs / Metric Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.kpi-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition-smooth);
}

.kpi-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.kpi-icon-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

#kpi-cycle-time .kpi-icon-wrapper { color: var(--color-primary); }
#kpi-rework .kpi-icon-wrapper { color: var(--color-warning); }
#kpi-fpy .kpi-icon-wrapper { color: var(--color-success); }
#kpi-mttr .kpi-icon-wrapper { color: var(--color-danger); }
#kpi-cfr .kpi-icon-wrapper { color: #d946ef; } /* purple-500 */

.kpi-data {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 4px 0;
    letter-spacing: -0.025em;
}

.kpi-trend {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.kpi-trend.positive { color: var(--color-success); }
.kpi-trend.negative { color: var(--color-danger); }

/* Dashboard Main Layout (Columns) */
.dashboard-main {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 20px;
}

@media (max-width: 1024px) {
    .dashboard-main {
        grid-template-columns: 1fr;
    }
}

.main-column-left, .main-column-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Reusable Panels */
.panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.panel-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.panel-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.panel-body {
    padding: 12px 24px 24px 24px;
}

.panel-body.scrollable {
    max-height: 380px;
    overflow-y: auto;
}

/* Stagnant Blockers Widget Styles */
.blocker-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.blocker-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(248, 113, 113, 0.05);
    border: 1px solid rgba(248, 113, 113, 0.15);
    transition: var(--transition-smooth);
}

.blocker-item:hover {
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.3);
}

.blocker-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blocker-key {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-danger);
    text-decoration: none;
}

.blocker-key:hover {
    text-decoration: underline;
}

.blocker-latency {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-warning);
    background: rgba(251, 191, 36, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.blocker-summary {
    font-size: 0.85rem;
    font-weight: 500;
}

.blocker-assignee {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.no-data {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    text-align: center;
    padding: 24px 0;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table th, .data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    background: #0f172a; /* prevents overlay issues when scrolling */
}

.data-table tbody tr {
    transition: var(--transition-smooth);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.data-table td.text-right, .data-table th.text-right {
    text-align: right;
}

.data-table td.text-center, .data-table th.text-center {
    text-align: center;
}

.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable:hover {
    color: var(--color-primary);
}

/* Issue Keys in tables */
.issue-key-link {
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}

.issue-key-link:hover {
    text-decoration: underline;
}

/* Effort Badge styles */
.effort-badge {
    background: rgba(56, 189, 248, 0.1);
    color: var(--color-primary);
    padding: 2px 6px;
    font-weight: 600;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Rework Alert Tag inside tables */
.rework-tag {
    background: var(--color-warning-glow);
    color: var(--color-warning);
    padding: 2px 6px;
    font-weight: 600;
    border-radius: 4px;
    font-size: 0.75rem;
}

.rework-tag-none {
    color: var(--text-muted);
}

/* Modal Styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.75); /* Dark overlay */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Ensure the generic Ticket Details modal always opens on top of primary summary modals */
#ticketModal {
    z-index: 1050;
}

.modal-content {
    background: var(--bg-gradient-start);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    margin: 10% auto;
    padding: 24px;
    width: 80%;
    max-width: 900px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.modal-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.close-btn {
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.close-btn:hover {
    color: var(--color-danger);
}

/* Matrix Table Styling */
.matrix-table {
    width: 100%;
    border-collapse: collapse;
}

.matrix-table th, .matrix-table td {
    padding: 12px;
    border: 1px solid #475569; /* Light grey/slate line border in Dark theme */
    text-align: center;
    font-size: 0.9em;
}

.matrix-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.data-table td.clickable-number {
    cursor: pointer;
    font-weight: bold;
    color: var(--color-primary);
    background: rgba(56, 189, 248, 0.04);
    text-align: center;
    transition: var(--transition-smooth);
}

.data-table td.clickable-number:hover {
    background: var(--color-primary-glow);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px var(--color-primary);
}

.data-table td.zero-value {
    text-align: center;
    color: var(--text-muted);
    opacity: 0.6;
}

.data-table td.total-value {
    font-weight: 700;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    color: var(--color-success);
    transition: var(--transition-smooth);
}

.data-table td.total-value:hover {
    background: var(--color-success-glow);
}

.data-table tr.total-row {
    background: rgba(255, 255, 255, 0.02);
    font-weight: bold;
}

/* Local Tab Buttons inside Matrix */
.btn-tab-local {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 6px 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-tab-local:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.btn-tab-local.active {
    background: var(--color-primary);
    color: #000000 !important;
}

/* Override data-table headers to white in Light Theme for optimal dark-bg contrast */
body.light-theme .data-table th {
    color: #ffffff !important;
}

/* Print Media Styles */
@media print {
    body {
        background: #ffffff !important;
        color: #0f172a !important;
    }
    
    .dashboard-container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    header.dashboard-header,
    .dashboard-tabs,
    .filters-section,
    #theme-toggle,
    #btn-refresh,
    #btn-export-pdf,
    .panel-header button,
    .filter-group,
    #local-tax-tabs,
    .btn-tab-local,
    #customer-utilization-local-month,
    #utilization-local-month {
        display: none !important;
    }
    
    .panel {
        background: #ffffff !important;
        border: 1px solid #cbd5e1 !important;
        color: #0f172a !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        margin-bottom: 24px !important;
        padding: 20px !important;
    }
    
    .panel-header {
        border-bottom: 1px solid #cbd5e1 !important;
        padding-bottom: 8px !important;
        margin-bottom: 16px !important;
    }
    
    .panel-header h2 {
        color: #0f172a !important;
    }
    
    .panel-subtitle {
        color: #475569 !important;
    }
    
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .data-table th,
    body.light-theme .data-table th {
        background: #f1f5f9 !important;
        color: #0f172a !important;
        border-bottom: 2px solid #cbd5e1 !important;
    }
    
    .data-table td {
        border-bottom: 1px solid #e2e8f0 !important;
        color: #334155 !important;
    }
}
