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

html,
body {
    height: 100%;
    overflow: hidden;
    font-family: var(--font-body);
    background: var(--neutral-200);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

html,
body {
    height: 100%;
    overflow: hidden;
    font-family: var(--font-body);
    font-feature-settings: 'tnum';
    font-variant-numeric: tabular-nums;
    background: var(--bg-secondary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════
   BI SHELL — 100vh root container
═══════════════════════════════════════ */
.bi-shell {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-secondary);
}

/* ═══════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════ */
.bi-sidebar {
    display: flex;
    flex-direction: column;
    width: var(--sidebar-expanded);
    min-width: var(--sidebar-collapsed);
    max-width: var(--sidebar-expanded);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-sidebar);
    transition: width var(--sidebar-transition), min-width var(--sidebar-transition);
    /* overflow: hidden; */
    position: relative;
    z-index: 100;
    flex-shrink: 0;
    box-shadow: 2px 0 24px rgba(0, 0, 0, 0.18);
}

.bi-sidebar.collapsed {
    width: var(--sidebar-collapsed);
    min-width: var(--sidebar-collapsed);
}

/* Sidebar top brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    height: var(--topbar-height);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    /* border-radius: var(--radius-3); */
    /* background: linear-gradient(135deg, var(--primary-500), var(--secondary-500), var(--tertiary-500));     */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-sidebar);
    font-family: var(--font-display);
    box-shadow: 0 0 16px rgba(99, 0, 237, 0.4);
    letter-spacing: -1px;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transition: opacity var(--sidebar-transition), transform var(--sidebar-transition);
    white-space: nowrap;
}

.bi-sidebar.collapsed .sidebar-brand-text {
    opacity: 0;
    transform: translateX(-8px);
    pointer-events: none;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    color: var(--text-sidebar-on);
    line-height: 1.1;
    letter-spacing: -0.3px;
}

.brand-sub {
    font-size: 10px;
    font-weight: 500;
    color: var(--tertiary-500);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1;
    margin-top: 2px;
}

/* Toggle button */
.sidebar-toggle {
    position: absolute;
    top: 16px;
    right: -12px;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: var(--bg-sidebar);
    border: 2px solid var(--sidebar-toggle-border);
    color: var(--text-sidebar);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 101;
    font-size: 11px;
}

.sidebar-toggle:hover {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: #fff;
    box-shadow: 0 0 12px rgba(99, 0, 237, 0.4);
}

/* Section label */
.sidebar-section-label {
    padding: 20px 16px 6px;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--neutral-600);
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--sidebar-transition);
}

.bi-sidebar.collapsed .sidebar-section-label {
    opacity: 0;
    height: 0;
    padding: 0;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar {
    display: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: var(--radius-4);
    border: 1px solid transparent;
    color: var(--text-sidebar);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-height: 40px;
    user-select: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid transparent;
    color: var(--text-sidebar-on);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(99, 0, 237, 0.25), rgba(71, 151, 255, 0.15));
    color: var(--text-sidebar-on);
    border: 1px solid rgba(99, 0, 237, 0.25);
}

.nav-item.active .nav-icon {
    color: var(--primary-400);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-600), var(--secondary-600));
    border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.18s;
}

.nav-label {
    font-size: 13.5px;
    font-weight: 500;
    flex: 1;
    opacity: 1;
    transition: opacity var(--sidebar-transition), transform var(--sidebar-transition);
}

.bi-sidebar.collapsed .nav-label {
    opacity: 0;
    transform: translateX(-6px);
    pointer-events: none;
    width: 0;
}

.nav-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-pill);
    background: var(--primary-500);
    color: #fff;
    line-height: 1.4;
    transition: opacity var(--sidebar-transition);
}

.bi-sidebar.collapsed .nav-badge {
    opacity: 0;
    width: 0;
    padding: 0;
    pointer-events: none;
}

/* Tooltip for collapsed state */
.bi-sidebar.collapsed .nav-item {
    position: relative;
}

.bi-sidebar.collapsed .nav-item::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--neutral-800);
    color: var(--neutral-100);
    padding: 5px 10px;
    border-radius: var(--radius-2);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 999;
    border: 1px solid var(--neutral-700);
    box-shadow: var(--shadow-md);
}

.bi-sidebar.collapsed .nav-item:hover::after {
    opacity: 1;
}

/* User profile at bottom */
.sidebar-footer {
    padding: 12px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 7px;
    border-radius: var(--radius-4);
    cursor: pointer;
    transition: background 0.18s;
    overflow: hidden;
    position: relative;
}

.user-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary-500), var(--tertiary-500));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    font-family: var(--font-display);
    position: relative;
}

.user-avatar::after {
    content: '';
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--success-500);
    border: 2px solid var(--sidebar-toggle-border);
}

.user-info {
    flex: 1;
    min-width: 0;
    opacity: 1;
    transition: opacity var(--sidebar-transition), transform var(--sidebar-transition);
}

.bi-sidebar.collapsed .user-info {
    opacity: 0;
    transform: translateX(-6px);
    pointer-events: none;
    width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sidebar-on);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: var(--neutral-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.user-menu-icon {
    font-size: 14px;
    color: var(--neutral-600);
    flex-shrink: 0;
    opacity: 1;
    transition: opacity var(--sidebar-transition);
}

.bi-sidebar.collapsed .user-menu-icon {
    opacity: 0;
    pointer-events: none;
}

/* ═══════════════════════════════════════
   MAIN CONTENT AREA
═══════════════════════════════════════ */
.bi-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    min-width: 0;
}

/* ═══════════════════════════════════════
   TOPBAR
═══════════════════════════════════════ */
.bi-topbar {
    height: var(--topbar-height);
    min-height: var(--topbar-height);
    background: var(--neutral-50);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    flex-shrink: 0;
    z-index: 50;
    /* box-shadow: var(--shadow-sm); */
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.breadcrumb-sep {
    color: var(--neutral-400);
    font-size: 11px;
}

.breadcrumb-current {
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-spacer {
    flex: 1;
}

.topbar-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-select {
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 12.5px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: border-color 0.18s;
    outline: none;
}

.topbar-select:focus {
    border-color: var(--primary-400);
    box-shadow: var(--shadow-focus);
}

.topbar-btn {
    height: 32px;
    padding: 0 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-light);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s;
    white-space: nowrap;
}

.topbar-btn:hover {
    background: var(--neutral-200);
    border-color: var(--neutral-400);
    color: var(--text-primary);
}

.topbar-btn.primary {
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    /* border-color: transparent; */
    color: #fff;
}

.topbar-btn.primary:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    box-shadow: 0 3px 6px rgba(99, 0, 237, 0.3);
}

.topbar-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-light);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s;
    font-size: 15px;
    position: relative;
}

.topbar-icon-btn:hover {
    background: var(--neutral-200);
    color: var(--text-primary);
}

.topbar-notif-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    border-radius: var(--radius-full);
    background: var(--error-500);
    border: 1.5px solid var(--neutral-50);
}

/* ═══════════════════════════════════════
   CONTENT ROW — map + charts
═══════════════════════════════════════ */
.bi-content-row {
    flex: 1;
    display: flex;
    overflow: hidden;
    gap: 0;
    min-height: 0;
}

/* ═══════════════════════════════════════
   MAP CONTAINER
═══════════════════════════════════════ */
.bi-map-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    padding: 10px;
    gap: 10px;
}

/* KPI strip */
/* .kpi-strip {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.kpi-card {
    flex: 1;
    background: var(--neutral-50);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-4);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: default;
    overflow: hidden;
    position: relative;
    flex-wrap: wrap;
}

.kpi-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.kpi-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-4) var(--radius-4) 0 0;
}

.kpi-card.primary::after {
    background: linear-gradient(90deg, var(--primary-500), var(--secondary-500));
}

.kpi-card.success::after {
    background: var(--success-500);
}

.kpi-card.warning::after {
    background: var(--warning-500);
}

.kpi-card.k-info::after {
    background: var(--info-500);
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.kpi-card.primary .kpi-icon {
    background: var(--primary-100);
    color: var(--primary-600);
}

.kpi-card.success .kpi-icon {
    background: var(--bg-success);
    color: var(--text-success);
}

.kpi-card.warning .kpi-icon {
    background: var(--bg-warning);
    color: var(--text-warning);
}

.kpi-card.k-info .kpi-icon {
    background: var(--bg-info);
    color: var(--text-info);
}

.kpi-body {
    flex: 1;
    min-width: 0;
}

.kpi-value {
    font-size: 22px;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.5px;
}

.kpi-label {
    font-size: 11.5px;
    color: var(--text-tertiary);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-delta {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    flex-shrink: 0;
}

.kpi-delta.up {
    background: var(--bg-success);
    color: var(--text-success);
}

.kpi-delta.down {
    background: var(--bg-error);
    color: var(--text-error);
} */

/* Map container proper */
.map-container {
    flex: 1;
    background: var(--neutral-50);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-5);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
    min-height: 0;
    /* display: flex;
    align-items: center;
    justify-content: center; */
}

.mapsvg-legend {
    font-size: .5rem;
    fill: var(--text-secondary);
    font-family: var(--font-body);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(99, 0, 237, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 70%, rgba(71, 151, 255, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 20%, rgba(3, 218, 198, 0.05) 0%, transparent 40%),
        linear-gradient(160deg, var(--primary-50) 0%, var(--secondary-50) 40%, var(--tertiary-50) 100%);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .map-placeholder {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(99, 0, 237, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 70%, rgba(71, 151, 255, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 20%, rgba(3, 218, 198, 0.05) 0%, transparent 40%),
        linear-gradient(160deg, var(--neutral-100) 0%, var(--neutral-50) 100%);
    position: relative;
    overflow: hidden;
}

/* SVG world map hint */
.map-grid {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image:
        linear-gradient(rgba(99, 0, 237, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 0, 237, 0.3) 1px, transparent 1px);
    background-size: 40px 40px;
}

.map-overlay-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    pointer-events: none;
}

.map-legend {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--frosted));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-4);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
}

.map-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.map-controls {
    margin-left: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--frosted));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-4);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: var(--shadow-sm);
}

.map-ctrl-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-2);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.15s;
}

.map-ctrl-btn:hover {
    background: var(--neutral-200);
    color: var(--text-primary);
}

/* Map pins */
.map-pins {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.map-pin {
    position: absolute;
    transform: translate(-50%, -50%);
}

.pin-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    border: 2px solid var(--neutral-50);
    box-shadow: 0 0 0 3px currentColor, 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: pinPulse 2.5s ease-in-out infinite;
}

.show-only-mobile {
    display: none;
}

@keyframes pinPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.85;
    }
}

.pin-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--neutral-900);
    color: var(--neutral-50);
    padding: 4px 10px;
    border-radius: var(--radius-2);
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
}

.pin-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--neutral-900);
}

/* ═══════════════════════════════════════
   BI CHARTS PANEL
═══════════════════════════════════════ */

.bi-charts-panel {
    width: var(--charts-panel-width);
    min-width: var(--charts-panel-min);
    /* max-width: var(--charts-panel-max); */
    height: 100%;
    background: var(--neutral-50);
    border-left: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.05);
}

/* [data-theme="dark"] .bi-charts-panel {
    background: var(--neutral-100);
} */

.charts-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    height: 48px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    background: var(--neutral-100);
}

.charts-panel-title {
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--text-primary);
    flex: 1;
    letter-spacing: -0.2px;
}

.indn-page__subtitle {
    font-size: 12px;
    font-family: var(--font-display);
    color: var(--neutral-500);
}

.chart-tab-group {
    display: flex;
    background: var(--neutral-200);
    border-radius: var(--radius-pill);
    padding: 2px;
    gap: 1px;
}

.chart-tab {
    padding: 4px 10px;
    border-radius: calc(var(--radius-pill) - 1px);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    background: transparent;
    font-family: var(--font-body);
}

.chart-tab.active {
    background: var(--neutral-50);
    color: var(--primary-600);
    box-shadow: var(--shadow-sm);

}

.charts-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--neutral-300) transparent;
}

.charts-scroll::-webkit-scrollbar {
    width: 4px;
}

.charts-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.charts-scroll::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: 2px;
}

/* Chart cards */
.chart-card-on-modal {
    z-index: 999;
    position: fixed;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    height: 100%;
    max-height: calc(100vh - 2rem);
    background: var(--neutral-50);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-6);
    overflow: hidden;
    animation: expandModal 0.4s forwards;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@keyframes expandModal {
    from {
        transform: scale(0.95);
        opacity: 0.8;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.chart-card {
    background: var(--neutral-50);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-4);
    overflow: hidden;
    transition: box-shadow 0.2s;
    min-height: fit-content;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chart-card:hover {
    box-shadow: var(--shadow-md);
}

.chart-card-header {
    display: flex;
    align-items: center;
    padding: 12px 14px 10px;
    gap: 8px;
    justify-content: space-between;
}

.chart-card-header-cmd {
    display: flex;
    gap: .2rem;
}

.chart-card-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    font-family: var(--font-display);
}

.chart-card-subtitle {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 1px;
}

.chart-card-menu {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-2);
    border: none;
    background: transparent;
    color: var(--neutral-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s;
}

.chart-card-menu:hover {
    background: var(--neutral-200);
    color: var(--text-primary);
}

.chart-body {
    padding: 0 14px 14px;
}

.chart-body.mode-table {
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
}

.chart-body-scroll {
    overflow: auto;
    height: calc(100% - 10px - 54px);
}

/* Bar chart visual */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 100px;
    padding-bottom: 4px;
}

.bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.bar-fill {
    width: 100%;
    border-radius: var(--radius-2) var(--radius-2) 0 0;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(180deg, var(--primary-400), var(--primary-600));
    min-height: 4px;
}

.bar-fill.secondary {
    background: linear-gradient(180deg, var(--secondary-400), var(--secondary-600));
}

.bar-fill.tertiary {
    background: linear-gradient(180deg, var(--tertiary-400), var(--tertiary-600));
}

.bar-label {
    font-size: 9.5px;
    color: var(--text-tertiary);
    font-weight: 500;
    text-align: center;
}

/* Line chart (sparkline) */
.sparkline-container {
    position: relative;
    height: 70px;
    overflow: hidden;
}

.sparkline-svg {
    width: 100%;
    height: 100%;
}

/* Donut/Ring chart */
.ring-chart-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 4px 0 8px;
}

.ring-chart {
    flex-shrink: 0;
}

.ring-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ring-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: var(--text-secondary);
}

.ring-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.ring-legend-val {
    margin-left: auto;
    font-weight: 700;
    font-size: 12px;
    color: var(--text-primary);
    font-family: var(--font-mono);
}



/* ═══════════════════════════════════════
   SCROLLBAR RESIZE HANDLE (charts panel)
═══════════════════════════════════════ */
.panel-resize-handle {
    width: 4px;
    cursor: col-resize;
    background: transparent;
    transition: background 0.2s;
    flex-shrink: 0;
    position: relative;
}

.panel-resize-handle:hover,
.panel-resize-handle.dragging {
    background: var(--primary-300);
}

/* ═══════════════════════════════════════
   LOADING & SKELETON
═══════════════════════════════════════ */
@keyframes shimmer {
    0% {
        background-position: -400px 0;
    }

    100% {
        background-position: 400px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg,
            var(--neutral-200) 25%,
            var(--neutral-100) 50%,
            var(--neutral-200) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius-2);
}

/* ═══════════════════════════════════════
   OSM Leaflet
═══════════════════════════════════════ */
/******** OSM Leaflet *********/
.grayscale {
    filter: grayscale(100%);
}

.leaflet-container {
    font-family: inherit;
    font-size: 12px;
    font-size: 0.75rem;
    line-height: 1.5;
}

.info {
    padding: 6px 8px;
    font-size: 14px;
    border-radius: var(--radius-2);
    /* background: var(--glass-bg);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border: 1px solid transparent;
    backdrop-filter: blur(8px) saturate(190%) brightness(0.88) contrast(1.08) hue-rotate(-5deg);
    font-weight: 300; */
    box-shadow: var(--shadow-sm);
}

.info h4 {
    margin: 0 0 5px;
    font-family: var(--font-display);
    color: var(--text-primary);
}

.info-box {
    position: absolute;
    pointer-events: none;
    display: none;
}

.legend {
    line-height: 18px;
    font-size: 12px;
    color: var(--text-primary);
}

.legend i {
    width: 18px;
    height: 18px;
    float: left;
    margin-right: 8px;
    opacity: 0.7;
}

.leaflet-container .leaflet-control-attribution {
    background: var(--bg-primary);
}

.loading-map {
    position: absolute;
    z-index: 999;
    width: calc(40% - 12px);
}

.visible-on {
    display: flex !important;
}

.visible-off {
    display: none !important;
}

.scroll {
    overflow: auto;
}

/* .leaflet-touch .leaflet-bar a {
    width: 25px;
    height: 25px;
    line-height: 25px;
    font-size: 14px;
} */

.leaflet-top.leaflet-left {
    top: 44px;
    /* left: 4px; */
}

.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
    border: 0px solid rgba(0, 0, 0, 0.2);
    background-clip: padding-box;
}

.leaflet-control-zoom.leaflet-bar.leaflet-control {
    display: flex;
    /* gap: 8px; */
    /* border: 0; */
}

.leaflet-bar a {
    color: var(--text-primary);
    background: var(--glass-bg);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border: 1px solid transparent;
    backdrop-filter: blur(8px) saturate(190%) brightness(0.88) contrast(1.08) hue-rotate(-5deg);
    font-weight: 300;
    box-shadow: var(--shadow-sm);
}

.leaflet-bar a:hover {
    background: var(--bg-tertiary);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border: 1px solid transparent;
}

.leaflet-bar a:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    border-bottom: 1px solid transparent;
    border-left: none;
}

.leaflet-touch .leaflet-bar a:first-child {
    border-top-right-radius: unset;
    border-top-left-radius: var(--radius-2);
    border-bottom-left-radius: var(--radius-2);
}

.leaflet-touch .leaflet-bar a:last-child {
    border-bottom-left-radius: unset;
    border-top-right-radius: var(--radius-2);
    border-bottom-right-radius: var(--radius-2);
}

.leaflet-bar a.leaflet-disabled {
    cursor: default;
    background-color: var(--neutral-500);
    color: var(--neutral-800);
}

.legend-mobile {
    display: block;
}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 1100px) {
    .bi-charts-panel {
        --charts-panel-width: 50%;
        min-width: 320px;
    }

    .kpi-strip {
        flex-wrap: wrap;
    }

    .kpi-card {
        min-width: calc(50% - 5px);
    }
}

@media (max-width: 860px) {

    .bi-content-row {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: auto;
        gap: 0;
        min-height: 0;
    }

    .bi-map-area {
        min-height: 80vh;
    }

    .bi-charts-panel {
        height: unset;
        --charts-panel-width: 100%;
        min-width: 320px;
        max-width: unset;
    }

    .bi-sidebar {
        width: var(--sidebar-collapsed);
    }

    .sidebar-section-label,
    .brand-name,
    .brand-sub,
    .sidebar-toggle {
        display: none;
    }

    /*## Leaflet ##*/
    .legend-mobile {
        display: flex;
        flex-wrap: wrap;
        width: 100dvw;
        border-radius: 0px;
        padding: 2px !important;
        border: unset;
        border-top: 1px solid var(--glass-border);
    }

    .legend-mobile>div {
        flex: 1;
    }

    .legend-mobile>div:nth-child(1) {
        flex: 0 0 100%;
    }

    .legend i {
        width: 100%;
        height: 9px;
        float: left;
        margin-right: unset;
        opacity: 0.7;
    }

    .leaflet-bottom .leaflet-control {
        margin: 0 !important;
    }

    .leaflet-control-attribution.leaflet-control {
        display: none;
    }

    .leaflet-control-zoom.leaflet-bar.leaflet-control {
        top: -50px;
        display: flex;
        /* gap: 8px; */
        /* border: 0; */
    }

    .info-box {
        display: none;
    }

    .show-only-mobile {
        display: flex;
    }

}