/* KPI Dashboard - Professional Styles */

:root {
    --sidebar-width: 260px;
    --navbar-height: 60px;
    --primary-color: #4e73df;
    --primary-dark: #2e59d9;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-info: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --border-radius: 12px;
}

/* Dark Theme Variables */
[data-bs-theme="dark"] {
    --bs-body-bg: #0f172a;
    --bs-card-bg: #1e293b;
    --sidebar-bg: #0f172a;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #1e3a5f 0%, #0d1b2a 100%);
    z-index: 1030;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

[data-bs-theme="dark"] .sidebar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

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

.sidebar-brand {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand i {
    font-size: 1.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.sidebar-toggle:hover {
    opacity: 1;
}

.sidebar-nav {
    padding: 1rem;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.875rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    transition: all 0.25s ease;
    font-weight: 500;
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.sidebar-nav .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(78, 115, 223, 0.9) 0%, rgba(34, 74, 190, 0.9) 100%);
    box-shadow: 0 4px 12px rgba(78, 115, 223, 0.4);
}

.sidebar-nav .nav-link i {
    font-size: 1.2rem;
    width: 1.75rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
}

[data-bs-theme="dark"] .main-content {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Top Navbar */
.main-content .navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

[data-bs-theme="dark"] .main-content .navbar {
    background: rgba(30, 41, 59, 0.95);
    border-bottom-color: rgba(255,255,255,0.05);
}

/* Content Wrapper */
.content-wrapper {
    padding: 1.5rem;
}

/* Dashboard Header */
.dashboard-header {
    padding: 1rem 0;
}

.header-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(78, 115, 223, 0.4);
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

[data-bs-theme="dark"] .page-title {
    color: #f1f5f9;
}

/* Filter Form */
.filter-form .input-group-text {
    background: #fff;
    border-right: none;
}

.filter-form .form-select {
    border-left: none;
    padding-left: 0;
}

/* Empty State */
.empty-state-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 3rem;
    color: #94a3b8;
}

/* Stat Cards - Modern Design */
.stat-card {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

[data-bs-theme="dark"] .stat-card {
    background: var(--bs-card-bg);
}

.stat-card-body {
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
}

.stat-card-primary .stat-card-icon { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-card-success .stat-card-icon { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.stat-card-info .stat-card-icon { background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%); }
.stat-card-warning .stat-card-icon { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

[data-bs-theme="dark"] .stat-card-value {
    color: #f1f5f9;
}

.stat-card-label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 0;
}

.stat-card-footer {
    padding: 0.75rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

[data-bs-theme="dark"] .stat-card-footer {
    background: rgba(0,0,0,0.2);
    border-top-color: rgba(255,255,255,0.05);
}

.stat-change {
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.up { color: var(--success-color); }
.stat-change.down { color: var(--danger-color); }

.stat-period, .stat-info {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Budget Card */
.budget-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

[data-bs-theme="dark"] .budget-card {
    background: var(--bs-card-bg);
}

.budget-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
}

.progress-lg {
    height: 12px;
    border-radius: 6px;
    background: #e2e8f0;
}

.progress-lg .progress-bar {
    border-radius: 6px;
}

/* Cards */
.card {
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius);
}

.chart-card {
    background: #fff;
}

[data-bs-theme="dark"] .chart-card {
    background: var(--bs-card-bg);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #1e293b;
    padding: 1rem 1.5rem;
}

[data-bs-theme="dark"] .card-header {
    border-color: rgba(255,255,255,0.1);
    color: #f1f5f9;
}

/* Chart Legend */
.chart-legend {
    display: flex;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Channel Stats */
.channel-stat {
    padding: 0.5rem;
}

.channel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-bottom: 0.25rem;
}

.channel-value {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.85rem;
}

[data-bs-theme="dark"] .channel-value {
    color: #f1f5f9;
}

.channel-label {
    color: #94a3b8;
    font-size: 0.7rem;
}

/* Data Table Card */
.data-table-card {
    background: #fff;
}

[data-bs-theme="dark"] .data-table-card {
    background: var(--bs-card-bg);
}

/* KPI Table */
.kpi-table {
    font-size: 0.875rem;
}

.kpi-table thead th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    padding: 1rem 0.75rem;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

[data-bs-theme="dark"] .kpi-table thead th {
    background: rgba(0,0,0,0.2);
    color: #94a3b8;
    border-bottom-color: rgba(255,255,255,0.1);
}

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

[data-bs-theme="dark"] .kpi-table tbody td {
    border-bottom-color: rgba(255,255,255,0.05);
}

.kpi-table tbody tr:hover {
    background: #f8fafc;
}

[data-bs-theme="dark"] .kpi-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

.sticky-col {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 1;
}

[data-bs-theme="dark"] .sticky-col {
    background: var(--bs-card-bg);
}

.branch-badge {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
}

.bg-light-blue { background: rgba(78, 115, 223, 0.1) !important; }
.bg-light-green { background: rgba(28, 200, 138, 0.1) !important; }
.bg-light-orange { background: rgba(246, 194, 62, 0.1) !important; }
.bg-light-cyan { background: rgba(54, 185, 204, 0.1) !important; }

/* Tables */
.table th {
    font-weight: 600;
    white-space: nowrap;
}

.table-responsive {
    overflow-x: auto;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: #fff;
    border-radius: 1.5rem;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: block;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

/* Progress Bar */
.progress {
    border-radius: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .dashboard-header .header-icon {
        display: none;
    }

    .stat-card-value {
        font-size: 1.25rem;
    }
}

@media print {
    .sidebar, .navbar, .filter-form {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
    .stat-card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}

/* Budget Table */
#budgetTable .budget-input {
    width: 100px;
    font-size: 0.85rem;
}

/* Badge styles */
.badge {
    font-weight: 500;
    padding: 0.5em 0.85em;
}

/* Alert positioning */
.content-wrapper > .alert {
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 8px;
    padding: 0.625rem 1rem;
    border-color: #e2e8f0;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.15);
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
}

/* Channel Breakdown Bars */
.channel-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.channel-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.channel-item:last-child {
    border-bottom: none;
}

.channel-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.channel-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--bar-width);
    background: var(--bar-color);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.channel-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.channel-name {
    color: #64748b;
    font-weight: 500;
}

.channel-pct {
    color: #1e293b;
    font-weight: 600;
}

.channel-amount {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}

/* Sub-channel Stats */
.subchannel-stat {
    text-align: center;
    padding: 0.5rem;
}

.subchannel-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.subchannel-icon.kasse {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.subchannel-icon.kiosk {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.subchannel-icon.weborder {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
}

.subchannel-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}

.subchannel-label {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
}

.subchannel-pct {
    font-size: 0.75rem;
    font-weight: 600;
    color: #667eea;
}

/* Metric Cards */
.metric-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.metric-card .card-body {
    padding: 1.5rem;
}

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

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
}

.bg-gradient-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.bg-gradient-success { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.bg-gradient-info { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.bg-gradient-warning { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }

.metric-trend {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.metric-trend.up {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.metric-trend.down {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.metric-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.metric-comparison {
    font-size: 0.8rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

/* KPI Table Enhanced */
.kpi-table-wrapper {
    max-height: 600px;
    overflow: auto;
}

.kpi-table {
    font-size: 0.8rem;
}

.table-header-row th {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d1b2a 100%);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    padding: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-subheader-row th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.7rem;
    padding: 0.5rem 0.75rem;
    position: sticky;
    top: 36px;
    z-index: 9;
    border-bottom: 2px solid #e2e8f0;
}

.th-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.th-content small {
    font-weight: 400;
    color: #94a3b8;
    font-size: 0.65rem;
}

/* Column backgrounds */
.bg-channel-dinein { background: rgba(102, 126, 234, 0.08) !important; }
.bg-channel-takeaway { background: rgba(16, 185, 129, 0.08) !important; }
.bg-channel-foodora { background: rgba(245, 158, 11, 0.08) !important; }
.bg-channel-wolt { background: rgba(6, 182, 212, 0.08) !important; }
.bg-subchannel-kasse { background: rgba(102, 126, 234, 0.05) !important; }
.bg-subchannel-kiosk { background: rgba(240, 147, 251, 0.05) !important; }
.bg-subchannel-weborder { background: rgba(79, 172, 254, 0.05) !important; }

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

.kpi-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, transparent 100%);
}

/* Branch Cell */
.branch-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.branch-rank {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
}

.branch-name {
    font-weight: 600;
    color: #1e293b;
}

/* Values */
.value-primary {
    font-weight: 700;
    color: #1e293b;
}

.value-muted {
    color: #94a3b8;
}

/* Change Badge */
.change-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.change-badge.positive {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.change-badge.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Metric Cell */
.metric-cell {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.metric-cell .value {
    font-weight: 600;
    color: #1e293b;
}

.mini-change {
    font-size: 0.65rem;
    font-weight: 500;
}

.mini-change.up { color: #10b981; }
.mini-change.down { color: #ef4444; }

/* Budget Cell */
.budget-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mini-progress {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.mini-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Channel Cell */
.channel-cell {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.ch-value {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.75rem;
}

.ch-pct {
    font-size: 0.65rem;
    color: #64748b;
    font-weight: 500;
}

/* Totals Row */
.totals-row {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d1b2a 100%);
    color: #fff;
    position: sticky;
    bottom: 0;
}

.totals-row th {
    padding: 1rem 0.75rem;
    font-weight: 600;
}

.total-label {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: #1e293b;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #475569;
}

/* Dark mode overrides */
[data-bs-theme="dark"] .channel-pct,
[data-bs-theme="dark"] .channel-amount,
[data-bs-theme="dark"] .subchannel-value,
[data-bs-theme="dark"] .metric-value,
[data-bs-theme="dark"] .value-primary,
[data-bs-theme="dark"] .branch-name,
[data-bs-theme="dark"] .metric-cell .value,
[data-bs-theme="dark"] .ch-value {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .table-subheader-row th {
    background: #1e293b;
    border-bottom-color: #334155;
}

[data-bs-theme="dark"] .kpi-table tbody td {
    border-bottom-color: #334155;
}

[data-bs-theme="dark"] .metric-comparison {
    border-top-color: #334155;
}

/* Distribution Bars - Horizontal Style */
.distribution-bars {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.dist-item {
    display: grid;
    grid-template-columns: 80px 1fr 100px;
    align-items: center;
    gap: 0.5rem;
}

.dist-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.dist-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dist-bar-wrap {
    height: 20px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.dist-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 2px;
}

.dist-values {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.dist-pct {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1e293b;
}

.dist-amt {
    font-size: 0.65rem;
    color: #64748b;
}

[data-bs-theme="dark"] .dist-label {
    color: #94a3b8;
}

[data-bs-theme="dark"] .dist-bar-wrap {
    background: #334155;
}

[data-bs-theme="dark"] .dist-pct {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .dist-amt {
    color: #94a3b8;
}

