/* Hide translatable text until i18n is applied to prevent flicker */
[data-i18n],
[data-i18n-placeholder] {
    opacity: 0;
    transition: opacity 0.05s ease-in;
}
body.i18n-ready [data-i18n],
body.i18n-ready [data-i18n-placeholder] {
    opacity: 1;
}

/* ==========================================================================
   1. Variables & Base
   ========================================================================== */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --success-color: #2ecc71;
    --warning-color: #f1c40f;
    --danger-color: #e74c3c;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --border-radius: 0.5rem;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

body {
    background-color: #f5f6f8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    padding-top: 0;
}

.container {
    padding: 1rem;
    max-width: none;
}

.container-fluid {
    padding: 20px;
}

/* ==========================================================================
   2. Sidebar Navigation
   ========================================================================== */
:root {
    --sidebar-width: 210px;
    --sidebar-bg: #1e2530;
    --sidebar-active-bg: rgba(52, 152, 219, 0.15);
    --sidebar-active-border: var(--accent-color);
    --sidebar-hover-bg: rgba(255, 255, 255, 0.07);
    --sidebar-text: rgba(255, 255, 255, 0.72);
    --sidebar-text-active: #ffffff;
}

.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 1030;
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Brand / Logo area */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1.2rem 1.1rem;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    letter-spacing: 0.3px;
    flex-shrink: 0;
}
.sidebar-brand i {
    font-size: 1.25rem;
    color: var(--accent-color);
}
.sidebar-logo {
    width: 20px;
    height: 20px;
    max-width: 20px;
    max-height: 20px;
    border-radius: 3px;
    object-fit: contain;
    flex-shrink: 0;
}
.sidebar-brand:hover {
    color: #ffffff;
    text-decoration: none;
}

/* Nav list */
.sidebar-nav {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    flex: 1;
}

.sidebar-nav li {
    width: 100%;
}

/* Each nav link row */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.72rem 1.1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.sidebar-link i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background-color: var(--sidebar-hover-bg);
    color: var(--sidebar-text-active);
    text-decoration: none;
    border-left-color: rgba(255, 255, 255, 0.25);
}

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

/* Log-out item gets a subtle red tint on hover */
.sidebar-link-danger:hover {
    background-color: rgba(231, 76, 60, 0.12);
    border-left-color: var(--danger-color);
    color: #ff8a80;
}

/* Separator between sections */
.sidebar-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.08);
    margin: 0.4rem 0.9rem;
}

/* Language badge */
.lang-badge {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    background-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    padding: 1px 5px;
    letter-spacing: 0.5px;
}

#langToggle.sidebar-link:hover .lang-badge {
    background-color: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* Content area pushed right of sidebar */
#content-wrapper {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    transition: margin-left 0.25s;
}

/* Sidebar collapse toggle button */
.sidebar-collapse-btn {
    position: fixed;
    top: 12px;
    left: calc(var(--sidebar-width) - 14px);
    z-index: 1031;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    transition: left 0.25s ease, transform 0.25s ease;
    padding: 0;
    font-size: 0.75rem;
}
.sidebar-collapse-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* Collapsed sidebar state (driven by body class) */
.sidebar-collapsed .sidebar {
    width: 56px;
}
.sidebar-collapsed .sidebar .sidebar-brand span,
.sidebar-collapsed .sidebar .sidebar-link span,
.sidebar-collapsed .sidebar .lang-badge,
.sidebar-collapsed .sidebar .sidebar-usage {
    display: none;
}
.sidebar-collapsed .sidebar .sidebar-brand {
    justify-content: center;
    padding: 1.2rem 0;
}
.sidebar-collapsed .sidebar .sidebar-link {
    justify-content: center;
    padding: 0.72rem 0;
    gap: 0;
    border-left-width: 0;
}
.sidebar-collapsed .sidebar .sidebar-link i {
    width: auto;
}
.sidebar-collapsed .sidebar .sidebar-divider {
    margin: 0.4rem 0.3rem;
}
.sidebar-collapsed #content-wrapper {
    margin-left: 56px;
    width: calc(100% - 56px);
}
.sidebar-collapsed .sidebar-collapse-btn {
    left: 42px;
}
.sidebar-collapsed .sidebar-collapse-btn i {
    transform: rotate(180deg);
}

/* Smooth transitions */
.sidebar,
#content-wrapper,
.sidebar-collapse-btn {
    transition: all 0.25s ease;
}

/* Suppress transitions during initial page load */
.no-sidebar-transition .sidebar,
.no-sidebar-transition #content-wrapper,
.no-sidebar-transition .sidebar-collapse-btn {
    transition: none !important;
}

/* Pre-paint collapsed state applied to <html> before body renders */
html.sidebar-collapsed .sidebar {
    width: 56px;
}
html.sidebar-collapsed #content-wrapper {
    margin-left: 56px;
}

/* Small screens: collapse sidebar to icons */
@media (max-width: 640px) {
    :root { --sidebar-width: 56px; }
    .sidebar-brand span,
    .sidebar-link span,
    .lang-badge { display: none; }
    .sidebar-brand { justify-content: center; padding: 1.2rem 0; }
    .sidebar-link { justify-content: center; padding: 0.9rem 0; gap: 0; }
    .sidebar-link i { width: auto; }
    .sidebar-divider { margin: 0.4rem 0.3rem; }
    .sidebar-collapse-btn { display: none; }
}

/* ==========================================================================
   3. Cards (General)
   ========================================================================== */
.card {
    margin-bottom: 1rem;
    box-shadow: var(--card-shadow);
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    background: white;
}

.card-header {
    padding: 0.75rem 1rem;
    background-color: rgba(0,0,0,0.02);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.card-body {
    padding: 1rem;
}

/* ==========================================================================
   4. Scenario Cards (Unified Design)
   ========================================================================== */
.scenario-item {
    margin-bottom: 1.25rem;
}

.scenario-card {
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #dee2e6;
    border-top-width: 4px; /* Thick colored top border */
    background: white;
    display: flex;
    flex-direction: column;
}

.scenario-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-hover-shadow);
}

.scenario-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Card Header Area (Icon + Title) */
.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.scenario-info {
    display: flex;
    align-items: flex-start;
    overflow: hidden;
}

.scenario-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.25rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.scenario-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.scenario-meta {
    font-size: 0.8rem;
    color: #95a5a6;
    display: flex;
    align-items: center;
}

.scenario-description {
    color: #6c757d;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
    min-height: 2.7em; /* Consistent height for alignment */
}

/* Variants */
.scenario-card.stock-card {
    border-top-color: #2196f3;
}
.scenario-card.stock-card .scenario-icon {
    color: #2196f3;
    background-color: rgba(33, 150, 243, 0.1);
}

.scenario-card.demand-card {
    border-top-color: #26c6da;
}
.scenario-card.demand-card .scenario-icon {
    color: #26c6da;
    background-color: rgba(38, 198, 218, 0.1);
}

/* Tags within card */
.tag-container {
    margin-bottom: 1rem;
}
.tag-container .badge {
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 6px 10px;
}

/* Dropdown no-arrow utility */
.no-arrow::after {
    display: none;
}

/* ==========================================================================
   5. Buttons & Controls
   ========================================================================== */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}
.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-info {
    background-color: var(--info-color);
    border-color: var(--info-color);
    color: white;
}
.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
    color: white;
}

.btn-square {
    width: 70px;
    height: 70px;
    padding: 8px 4px;
    text-align: center;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 4px;
    border: 1px solid #dee2e6;
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Category Filter Buttons */
.category-btn {
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border: none;
    color: white;
    border-radius: 4px;
    min-width: 40px;
    transition: opacity 0.2s;
    text-decoration: none;
}
.category-btn:hover { opacity: 0.9; color: white; }
.category-btn-red { background-color: #ef5350; }
.category-btn-yellow { background-color: #ffb300; }
.category-btn-green { background-color: #66bb6a; }
.category-btn-overflow { background-color: #4fc3f7; }

/* ==========================================================================
   6. Tables & DataTables
   ========================================================================== */
.table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 0;
}

.table thead th {
    background-color: var(--light-bg);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: var(--secondary-color);
}

/* Fix DataTables dropdowns being clipped */
.dataTables_wrapper {
    position: static !important;
}
.table-responsive {
    overflow-x: auto;
    min-height: 200px; /* Ensure space for dropdowns */
}
/* Ensure dropdowns inside tables show up */
.table .dropdown-menu {
    position: absolute !important;
    z-index: 1050;
    transform: translate3d(0, 0, 0);
}

/* Editable Cells */
.editable-cell {
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 3px;
    transition: background-color 0.2s;
}
.editable-cell:hover {
    background-color: rgba(0, 0, 0, 0.05);
}
.editable-cell:hover::after {
    content: " \270E"; /* Pencil */
    color: #999;
    font-size: 0.8em;
}

/* ==========================================================================
   7. Tabs & Navigation
   ========================================================================== */
.nav-tabs {
    border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: #6c757d;
    padding: 0.75rem 1rem;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--accent-color);
    background: transparent;
    border-bottom: 2px solid var(--accent-color);
    font-weight: 500;
}

/* Card Header Tabs fix */
.card-header-tabs {
    margin-bottom: -0.76rem; /* Align with bottom border of card header */
    border-bottom: 0;
}

/* ==========================================================================
   8. Simulation & Results
   ========================================================================== */
.simulation-result-card {
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #dee2e6;

    /* FIX: Changed from border-left to border-top to match scenario cards */
    border-top: 4px solid var(--accent-color);

    background: white;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.simulation-result-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-hover-shadow);
}

.simulation-result-card .card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-top: 1rem;
}

.model-params-container {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    border: 1px solid #e9ecef;
}

/* ==========================================================================
   8b. Drilldown Compact Layout
   ========================================================================== */
.drilldown-compact.container-fluid {
    padding: 10px 12px;
}

.drilldown-toolbar {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 6px 12px;
    box-shadow: var(--card-shadow);
}

.drilldown-back-btn {
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.drilldown-title-group {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ==========================================================================
   9. Charts & Visualizations
   ========================================================================== */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.distribution-chart-container {
    height: 80px;
    width: 80px;
    display: inline-block;
}

/* Vertical Semaphore */
#vertical-semaphore {
    width: 100%;
    overflow-x: auto;
}

/* Tooltips for D3 charts */
.semaphore-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.88);
    color: white;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: auto;
    z-index: 1000;
    max-width: 260px;
}

.semaphore-tooltip-add-btn:hover:not(:disabled) {
    background: #e8f5e9 !important;
}

/* ==========================================================================
   9b. Advanced Filters (Drilldown)
   ========================================================================== */
#advancedFiltersBody .slider-filter-item {
    padding: 0.15rem 0;
}

#advancedFiltersBody .form-label {
    font-size: 0.72rem;
    margin-bottom: 0.2rem;
}

#advancedFiltersBody .slider-values {
    font-size: 0.65rem;
    white-space: nowrap;
}

/* noUiSlider theme overrides — compact style */
.advanced-slider {
    height: 3px;
    margin: 4px 0 2px;
}

.advanced-slider .noUi-connect {
    background: #1976d2;
}

.advanced-slider .noUi-handle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid #1976d2;
    background: #fff;
    box-shadow: 0 0 2px rgba(0,0,0,0.12);
    top: -4px;
    right: -5px;
    cursor: pointer;
}

.advanced-slider .noUi-handle::before,
.advanced-slider .noUi-handle::after {
    display: none;
}

.advanced-slider .noUi-target {
    border: none;
    background: #eee;
    border-radius: 2px;
}

/* ==========================================================================
   9c. Priority Drawer (full-width, between chart and table)
   ========================================================================== */
.priority-drawer {
    border-left: 3px solid var(--accent-color);
}

.priority-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.75rem;
    background: #f8f9fa;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid #e9ecef;
}

.priority-drawer-header:hover {
    background: #f0f1f3;
}

.priority-drawer-chevron {
    transition: transform 0.25s ease;
    font-size: 0.75rem;
    color: #6c757d;
}

.priority-drawer-header[aria-expanded="false"] .priority-drawer-chevron {
    transform: rotate(180deg);
}

/* Data table collapsible chevron */
.data-table-chevron {
    transition: transform 0.25s ease;
    color: #6c757d;
}
[aria-expanded="true"] .data-table-chevron {
    transform: rotate(180deg);
}

.priority-drawer-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    max-height: 160px;
    overflow-y: auto;
}

.priority-drawer .priority-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 0.72rem;
    line-height: 1.3;
    white-space: nowrap;
}

.priority-drawer .priority-item:hover {
    border-color: #bbb;
    background: #f8f8f8;
}

.priority-drawer .priority-item .remove-btn {
    opacity: 0.4;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 0.65rem;
}

.priority-drawer .priority-item .remove-btn:hover {
    opacity: 1;
    color: #dc3545;
}

/* Priority rank badge */
.priority-drawer .priority-item .priority-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #424242;
    font-size: 0.58rem;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}

/* Days-left label */
.priority-days-left {
    font-size: 0.6rem;
    font-weight: 600;
    opacity: 0.85;
}

/* Purchase cost label */
.priority-cost {
    color: #616161;
    font-weight: 500;
}

/* Budget & sort controls bar */
.priority-budget-bar {
    padding: 0.35rem 0.75rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.priority-sort-select {
    width: auto !important;
    min-width: 130px;
    font-size: 0.72rem !important;
    padding: 0.15rem 1.5rem 0.15rem 0.4rem !important;
}

.priority-budget-input-group {
    max-width: 140px;
}

.priority-budget-input-group .input-group-text {
    padding: 0.15rem 0.35rem;
    font-size: 0.7rem;
}

.priority-budget-input-group .form-control {
    font-size: 0.72rem;
    padding: 0.15rem 0.35rem;
}

/* Budget summary bar */
.priority-budget-summary {
    padding: 0.25rem 0.75rem;
    background: #f0f4f8;
    border-bottom: 1px solid #e0e7ef;
}

.priority-budget-progress-wrap {
    width: 80px;
    flex-shrink: 0;
}

.priority-budget-progress {
    height: 6px;
    border-radius: 3px;
}

/* In-budget / out-of-budget item states */
.priority-drawer .priority-item.in-budget {
    border-left: 2px solid #66bb6a;
}

.priority-drawer .priority-item.in-budget .priority-rank {
    background: #c8e6c9;
    color: #2e7d32;
}

.priority-drawer .priority-item.out-of-budget {
    opacity: 0.5;
    border-style: dashed;
    border-color: #ccc;
}

.priority-drawer .priority-item.out-of-budget .priority-cost {
    text-decoration: line-through;
}

.in-priority-list::after {
    content: '\f00c';
    font-family: 'bootstrap-icons';
    font-size: 0.55rem;
    color: #1976d2;
    margin-left: 0.25rem;
}

/* ==========================================================================
   9d. Filter Toggle Button Active State
   ========================================================================== */
#filtersToggleBtn.filters-active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

#filtersToggleBtn.filters-active:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

/* ==========================================================================
   9e. Add-to-List Button (Evolution Panel)
   ========================================================================== */
#add-to-list-btn {
    font-size: 0.72rem;
    transition: all 0.2s ease;
}

#add-to-list-btn .add-btn-label {
    font-size: 0.68rem;
}

/* Zone overview checkboxes */
.zone-select-all,
.product-checkbox {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

#zoneAccordion .accordion-header {
    display: flex;
    align-items: center;
}

#zoneAccordion .accordion-button {
    flex: 1;
    min-width: 0;
}

#add-to-list-btn.btn-added {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: #fff;
    pointer-events: none;
}

/* ==========================================================================
   10. Modals & Toasts
   ========================================================================== */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    background-color: var(--light-bg);
    border-bottom: 1px solid #e9ecef;
}

/* Toast Container */
.toast-container {
    position: fixed !important;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1060;
}

/* ==========================================================================
   11. Utilities & Misc
   ========================================================================== */
.filters-bar {
    background-color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    margin-bottom: 1.5rem;
}

.no-scenarios {
    padding: 4rem 0;
    text-align: center;
    color: #6c757d;
}
.no-scenarios i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

/* Category Labels */
.category-label {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}
.category-label.red { background-color: #ef5350; color: white; }
.category-label.yellow { background-color: #ffb300; color: #212529; }
.category-label.green { background-color: #66bb6a; color: white; }
.category-label.overflow { background-color: #4fc3f7; color: white; }

/* ==========================================================================
   12. Sidebar Usage Panel
   ========================================================================== */
.sidebar-usage {
    padding: 0.7rem 1rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.sidebar-usage-title {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.55rem;
}

.sidebar-usage-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}
.sidebar-usage-row:last-child { margin-bottom: 0; }

.sidebar-usage-label {
    font-size: 0.69rem;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    flex-shrink: 0;
    width: 62px;
}

.sidebar-usage-bar {
    flex: 1;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.sidebar-usage-fill {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.sidebar-usage-count {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
    min-width: 32px;
    text-align: right;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .sidebar-usage { display: none; }
}

/* ==========================================================================
   13. User Management
   ========================================================================== */

/* Stat cards */
.um-stat-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f4f8;
    border-radius: 10px;
    flex-shrink: 0;
}

.um-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--primary-color);
}

.um-stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 1px;
}

/* Modal section headings */
.um-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #adb5bd;
    margin-bottom: 0.6rem;
}

/* Table: compact limits cell */
.um-limits, .um-usage {
    font-size: 0.78rem;
    white-space: nowrap;
}

.um-dot {
    color: #ced4da;
    margin: 0 0.2rem;
}

/* Clickable status badge */
.um-toggle-badge {
    cursor: pointer;
    user-select: none;
}
.um-toggle-badge:hover {
    opacity: 0.82;
}
