/* =========================================================
   GLOBAL
========================================================= */

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    overflow: hidden;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    height: 56px;
    position: relative;
    z-index: 10000;
}


/* =========================================================
   MAIN APPLICATION CONTAINER
========================================================= */

body > .container-fluid {
    width: 100%;
    height: calc(100vh - 56px);

    margin: 0;
    padding: 0;
}


/* =========================================================
   MAIN ROW
========================================================= */

body > .container-fluid > .row {
    width: 100%;
    height: 100%;

    margin: 0;
}


/* =========================================================
   SIDEBAR
========================================================= */

#sidebar {
    height: 100% !important;

    overflow-y: auto;
    overflow-x: hidden;

    position: relative;

    z-index: 100;

    padding: 1rem !important;
}


/* =========================================================
   MAP CONTAINER
========================================================= */

#mapContainer {
    position: relative;

    height: 100% !important;

    min-height: 0;

    padding: 0 !important;

    overflow: hidden;

    z-index: 1;
}


/* =========================================================
   LEAFLET MAP
========================================================= */

#map {
    position: absolute;

    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    width: 100% !important;
    height: 100% !important;

    min-height: 0;

    z-index: 1;
}


/* =========================================================
   COORDINATES
========================================================= */

#coordinates {
    position: fixed;

    bottom: 10px;
    right: 10px;

    background: white;

    padding: 8px 12px;

    border-radius: 5px;

    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);

    z-index: 10000;

    font-size: 14px;
}


/* =========================================================
   TOOLBAR
========================================================= */

#toolbar {
    position: absolute;

    top: 10px;
    left: 60px;

    z-index: 1000;

    pointer-events: auto;
}


/* =========================================================
   FLOATING LEGEND PANEL
========================================================= */

#legendPanel {
    position: absolute;

    bottom: 70px;
    right: 20px;

    width: 180px;
    max-height: 240px;

    background: white;

    border: 1px solid #ccc;

    border-radius: 6px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);

    z-index: 1000;

    overflow-y: auto;

    font-size: 12px;

    pointer-events: auto;
}


#legendHeader {
    background: #0d6efd;

    color: white;

    padding: 6px 8px;

    font-size: 13px;

    font-weight: bold;

    border-radius: 6px 6px 0 0;
}


#legendContent {
    padding: 7px 8px;

    line-height: 1.25;
}


/* =========================================================
   SEARCH RESULTS
========================================================= */

#searchResults {
    max-height: 160px;

    overflow-y: auto;

    border-radius: 6px;
}


#searchResults .list-group-item {
    cursor: pointer;

    transition: 0.2s;

    border-left: 4px solid transparent;

    padding: 5px 7px;

    font-size: 12px;
}


#searchResults .list-group-item:hover {
    background: #eef6ff;
}


#searchResults .active {
    background: #0d6efd;

    color: #fff;

    border-left: 4px solid #ffc107;
}


#searchResults .active small {
    color: #fff !important;
}


#clearSearch {
    border: none;

    background: white;
}


#clearSearch:hover {
    background: #f2f2f2;
}


.search-icon {
    font-size: 18px;

    margin-right: 8px;
}


#searchLoading {
    font-size: 11px;
}


#searchCount {
    font-weight: 600;
}


/* =========================================================
   FLOATING SEARCH PANEL
========================================================= */

#searchPanel {
    position: absolute;

    top: 20px;
    right: 20px;

    width: 220px;

    background: #ffffff;

    border-radius: 6px;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);

    z-index: 1000;

    overflow: hidden;

    font-size: 12px;

    pointer-events: auto;
}


.search-header {
    background: #0d6efd;

    color: white;

    padding: 6px 8px;

    font-size: 13px;

    font-weight: 600;
}


.search-body {
    padding: 8px;
}


#searchPanel .form-control {
    min-height: 30px;

    padding: 4px 8px;

    font-size: 12px;
}


#searchPanel #searchBtn {
    padding: 4px 8px;

    font-size: 12px;
}


/* =========================================================
   ASSET MANAGER
========================================================= */

#assetManagerPanel {
    position: absolute;

    top: 120px;
    left: 20px;

    width: 340px;

    height: 75%;

    max-height: 750px;

    background: #fff;

    border-radius: 8px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);

    display: none;

    z-index: 2000;

    overflow: hidden;

    pointer-events: auto;
}


.assetManagerHeader {
    background: #0d6efd;

    color: #fff;

    padding: 10px 15px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    font-weight: bold;
}


.assetManagerBody {
    padding: 15px;
}


#closeAssetManager {
    border: none;

    background: none;

    color: white;

    font-size: 22px;

    cursor: pointer;
}


#assetList {
    max-height: 400px;

    overflow-y: auto;
}

/* =========================================================
   CANAL NETWORK DASHBOARD
   INTERACTIVE OPERATIONS WORKSPACE
========================================================= */

#dashboardPanel {
    position: absolute;
    inset: 0;

    display: none;

    width: 100%;
    height: 100%;

    background: #f4f8fb;
    color: #243447;

    z-index: 1000005 !important;

    overflow: hidden;

    font-family: Arial, sans-serif;

    box-sizing: border-box;
}


/* =========================================================
   HEADER
========================================================= */

.canalDashboardHeader {
    height: 64px;

    background: #12344d;
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 20px;

    box-sizing: border-box;

    box-shadow: 0 2px 8px rgba(0,0,0,.18);

    position: relative;
    z-index: 10;
}


.canalDashboardTitle {
    display: flex;
    align-items: center;

    gap: 11px;

    font-size: 20px;
    font-weight: 700;
}


.canalDashboardTitle small {
    display: block;

    margin-top: 3px;

    font-size: 10px;
    font-weight: 400;

    opacity: .78;
}


.canalDashboardIcon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255,255,255,.12);

    border-radius: 8px;

    font-size: 21px;
}


.canalDashboardHeaderActions {
    display: flex;
    align-items: center;

    gap: 7px;
}


.canalHeaderButton {
    height: 34px;

    padding: 0 11px;

    border: 1px solid rgba(255,255,255,.18);
    border-radius: 6px;

    background: rgba(255,255,255,.09);

    color: #ffffff;

    font-size: 11px;
    font-weight: 600;

    cursor: pointer;

    transition: .15s ease;
}


.canalHeaderButton:hover {
    background: rgba(255,255,255,.18);
}


.canalCloseButton {
    width: 36px;
    height: 36px;

    border: none;
    border-radius: 6px;

    background: rgba(255,255,255,.10);

    color: #ffffff;

    font-size: 26px;
    line-height: 1;

    cursor: pointer;
}


.canalCloseButton:hover {
    background: rgba(255,255,255,.22);
}


/* =========================================================
   DASHBOARD BODY
========================================================= */

.canalDashboardBody {
    height: calc(100% - 64px);

    overflow-y: auto;
    overflow-x: hidden;

    padding: 14px 18px 28px;

    box-sizing: border-box;
}


.canalDashboardBody::-webkit-scrollbar {
    width: 8px;
}


.canalDashboardBody::-webkit-scrollbar-thumb {
    background: #b8c9d6;
    border-radius: 10px;
}


/* =========================================================
   FILTER BAR
========================================================= */

.canalFilterBar {
    display: flex;
    align-items: flex-end;

    gap: 10px;

    background: #ffffff;

    border: 1px solid #d9e3eb;
    border-radius: 9px;

    padding: 10px 12px;

    margin-bottom: 12px;

    box-shadow: 0 2px 6px rgba(31,60,80,.05);

    box-sizing: border-box;
}


.canalFilterGroup,
.canalSearchGroup {
    display: flex;
    flex-direction: column;

    gap: 4px;

    min-width: 150px;
}


.canalSearchGroup {
    flex: 1;
}


.canalFilterGroup label,
.canalSearchGroup label {
    font-size: 9px;

    font-weight: 800;

    color: #718393;

    text-transform: uppercase;

    letter-spacing: .5px;
}


.canalFilterGroup select,
.canalSearchBox input {
    height: 34px;

    border: 1px solid #d5e0e7;

    border-radius: 6px;

    background: #ffffff;

    color: #243447;

    padding: 0 9px;

    font-size: 11px;

    box-sizing: border-box;

    outline: none;
}


.canalFilterGroup select:focus,
.canalSearchBox input:focus {
    border-color: #0d6efd;

    box-shadow: 0 0 0 2px rgba(13,110,253,.08);
}


.canalSearchBox {
    position: relative;

    display: flex;
    align-items: center;
}


.canalSearchBox input {
    width: 100%;

    padding-right: 32px;
}


#canalSearchClear {
    position: absolute;

    right: 5px;

    width: 25px;
    height: 25px;

    border: none;

    background: transparent;

    color: #8a99a5;

    font-size: 17px;

    cursor: pointer;
}


#canalSearchClear:hover {
    color: #243447;
}


.canalResetButton {
    height: 34px;

    padding: 0 12px;

    border: 1px solid #d5e0e7;

    border-radius: 6px;

    background: #f8fafc;

    color: #526675;

    font-size: 11px;

    font-weight: 600;

    cursor: pointer;

    white-space: nowrap;
}


.canalResetButton:hover {
    background: #eaf2f8;

    color: #0d6efd;
}


/* =========================================================
   KPI STRIP
========================================================= */

.canalKpiStrip {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 10px;

    margin-bottom: 12px;
}


.canalKpiCard {
    min-height: 76px;

    display: flex;
    align-items: center;

    gap: 11px;

    padding: 11px 13px;

    background: #ffffff;

    border: 1px solid #d9e3eb;

    border-radius: 9px;

    box-shadow: 0 2px 6px rgba(31,60,80,.05);

    box-sizing: border-box;
}


.canalKpiIcon {
    width: 36px;
    height: 36px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    font-size: 17px;
}


.canalKpiIcon.blue {
    background: #e8f2ff;
    color: #1769aa;
}


.canalKpiIcon.green {
    background: #e8f7ef;
    color: #2f8f5b;
}


.canalKpiIcon.orange {
    background: #fff3e2;
    color: #c47700;
}


.canalKpiIcon.purple {
    background: #f0ebff;
    color: #7656d6;
}


.canalKpiLabel {
    display: block;

    font-size: 9px !important;

    color: #7a8b9a !important;

    font-weight: 700 !important;

    letter-spacing: .5px;
}


.canalKpiCard strong {
    display: block;

    margin-top: 4px;

    color: #183b56;

    font-size: 20px;

    line-height: 1.1;
}


.canalKpiCard small {
    display: block;

    margin-top: 3px;

    color: #8a99a5;

    font-size: 9px;
}


/* =========================================================
   MAIN CONTENT GRID
========================================================= */

.canalDashboardGrid {
    display: grid;

    grid-template-columns: minmax(0, 1.55fr) minmax(360px, .95fr);

    gap: 12px;

    margin-bottom: 12px;

    min-height: 450px;
}


/* =========================================================
   COMMON PANEL
========================================================= */

.canalMapCard,
.canalAnalyticsCard,
.canalSelectedAssetCard {
    background: #ffffff;

    border: 1px solid #d9e3eb;

    border-radius: 10px;

    box-shadow: 0 2px 7px rgba(31,60,80,.05);

    box-sizing: border-box;
}


.canalPanelHeading {
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    padding: 0 12px;

    border-bottom: 1px solid #e5edf3;

    box-sizing: border-box;
}


.canalPanelHeading > div {
    display: flex;
    align-items: center;

    gap: 5px;
}


.canalPanelHeading strong {
    font-size: 12px;

    font-weight: 800;

    color: #183b56;
}


.canalPanelHeading > span {
    font-size: 9px;

    color: #80909f;

    font-weight: 600;
}


.canalSectionIcon {
    font-size: 13px;
}


/* =========================================================
   MAP
========================================================= */

.canalMapCard {
    min-width: 0;

    overflow: hidden;
}


#canalDashboardMap {
    width: 100%;

    height: 407px;

    background: #eef4f7;
}


#canalDashboardMap .leaflet-control {
    font-size: 11px;
}


#canalDashboardMap .leaflet-popup-content {
    font-size: 11px;
}


/* =========================================================
   ANALYTICS COLUMN
========================================================= */

.canalAnalyticsColumn {
    min-width: 0;

    display: grid;

    grid-template-rows: auto 1fr;

    gap: 12px;
}


.canalDistributionCard {
    min-height: 205px;
}


.canalDistributionBody {
    display: grid;

    grid-template-columns: 145px 1fr;

    align-items: center;

    gap: 10px;

    padding: 8px 12px 12px;

    box-sizing: border-box;
}


.canalDonutWrap {
    position: relative;

    width: 140px;
    height: 140px;

    margin: auto;
}


.canalDonutWrap canvas {
    width: 140px !important;
    height: 140px !important;
}


.canalDonutCenter {
    position: absolute;

    inset: 0;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    pointer-events: none;
}


.canalDonutCenter strong {
    color: #183b56;

    font-size: 18px;

    line-height: 1.1;
}


.canalDonutCenter span {
    margin-top: 2px;

    color: #7a8b9a;

    font-size: 9px;
}


.canalDistributionLegend {
    display: flex;

    flex-direction: column;

    gap: 5px;

    max-height: 145px;

    overflow-y: auto;
}


.canalLegendItem {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 7px;

    font-size: 9px;
}


.canalLegendName {
    display: flex;

    align-items: center;

    gap: 5px;

    color: #526675;

    min-width: 0;
}


.canalLegendDot {
    width: 8px;
    height: 8px;

    flex-shrink: 0;

    border-radius: 50%;
}


.canalLegendValue {
    color: #183b56;

    font-weight: 700;

    white-space: nowrap;
}


/* =========================================================
   LOWER CHARTS
========================================================= */

.canalChartRow {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 12px;

    min-height: 0;
}


.canalChartRow .canalAnalyticsCard {
    min-width: 0;

    overflow: hidden;
}


.canalChartWrap {
    position: relative;

    height: 190px;

    padding: 8px 10px 10px;

    box-sizing: border-box;
}


.canalChartWrap canvas {
    max-width: 100%;
}


/* =========================================================
   SELECTED ASSET
========================================================= */

.canalSelectedAssetCard {
    margin-bottom: 4px;

    overflow: hidden;
}


.canalPanelHeading.selected {
    height: 45px;
}


.canalAssetDetails {
    padding: 12px;

    box-sizing: border-box;
}


.canalAssetPrompt {
    display: flex;

    align-items: center;

    gap: 9px;

    margin-bottom: 11px;
}


.canalAssetPin {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: #fff0eb;

    color: #e45b3c;

    font-size: 13px;
}


.canalAssetPrompt strong {
    display: block;

    color: #183b56;

    font-size: 13px;
}


.canalAssetPrompt small {
    display: block;

    margin-top: 2px;

    color: #7a8b9a;

    font-size: 9px;
}


.canalAssetGrid {
    display: grid;

    grid-template-columns: repeat(6, 1fr);

    gap: 8px;

    margin-bottom: 10px;
}


.canalAssetGrid > div {
    min-width: 0;

    background: #f8fbfd;

    border: 1px solid #e0e8ee;

    border-radius: 6px;

    padding: 8px;

    box-sizing: border-box;
}


.canalAssetGrid span {
    display: block;

    color: #80909f;

    font-size: 8px;

    text-transform: uppercase;

    font-weight: 700;

    letter-spacing: .35px;
}


.canalAssetGrid strong {
    display: block;

    margin-top: 4px;

    color: #314b61;

    font-size: 11px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================================
   ASSET ACTIONS
========================================================= */

.canalAssetActions {
    display: flex;

    justify-content: flex-end;

    gap: 7px;
}


.canalAssetActions button {
    height: 30px;

    padding: 0 11px;

    border-radius: 5px;

    font-size: 10px;

    font-weight: 700;

    cursor: pointer;
}


.canalActionPrimary {
    border: 1px solid #0d6efd;

    background: #0d6efd;

    color: #ffffff;
}


.canalActionPrimary:hover {
    background: #0b5ed7;
}


.canalActionSecondary {
    border: 1px solid #d5e0e7;

    background: #f7fafc;

    color: #526675;
}


.canalActionSecondary:hover {
    background: #edf3f7;
}


.canalActionOutline {
    border: 1px solid #0d6efd;

    background: #ffffff;

    color: #0d6efd;
}


.canalActionOutline:hover {
    background: #eef5ff;
}


/* =========================================================
   SELECTED MAP FEATURE
========================================================= */

.canal-selected-feature {
    stroke: #ff6b35 !important;

    stroke-width: 5 !important;

    opacity: 1 !important;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    .canalDashboardGrid {
        grid-template-columns: 1fr;
    }


    #canalDashboardMap {
        height: 400px;
    }


    .canalAnalyticsColumn {
        grid-template-rows: auto auto;
    }


    .canalAssetGrid {
        grid-template-columns: repeat(3, 1fr);
    }

}


@media (max-width: 800px) {

    .canalDashboardHeader {
        padding: 0 12px;
    }


    .canalDashboardTitle {
        font-size: 16px;
    }


    .canalDashboardTitle small {
        display: none;
    }


    .canalHeaderButton span {
        display: none;
    }


    .canalFilterBar {
        flex-wrap: wrap;
    }


    .canalFilterGroup,
    .canalSearchGroup {
        flex: 1 1 180px;
    }


    .canalKpiStrip {
        grid-template-columns: repeat(2, 1fr);
    }


    .canalChartRow {
        grid-template-columns: 1fr;
    }


    .canalAssetGrid {
        grid-template-columns: repeat(2, 1fr);
    }

}


@media (max-width: 520px) {

    .canalDashboardBody {
        padding: 10px;
    }


    .canalKpiStrip {
        grid-template-columns: 1fr;
    }


    .canalDistributionBody {
        grid-template-columns: 1fr;
    }


    .canalAssetGrid {
        grid-template-columns: 1fr;
    }


    .canalAssetActions {
        justify-content: stretch;
    }


    .canalAssetActions button {
        flex: 1;
    }

}
/* =========================================================
   DIVISION VIEW PANEL
========================================================= */

#divisionViewPanel {
    display: none;

    position: absolute;

    top: 80px;
    left: 20px;

    width: 340px;

    max-height: 500px;

    background: white;

    border-radius: 8px;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);

    z-index: 2000;

    overflow: hidden;

    pointer-events: auto;
}


/* =========================================================
   DIVISION VIEW HEADER
========================================================= */

.divisionViewHeader {
    background: #198754;

    color: white;

    padding: 12px 15px;

    font-size: 16px;

    font-weight: bold;

    display: flex;

    justify-content: space-between;

    align-items: center;
}


/* =========================================================
   DIVISION CLOSE BUTTON
========================================================= */

#closeDivisionView {
    background: transparent;

    border: none;

    color: white;

    font-size: 22px;

    cursor: pointer;
}


/* =========================================================
   DIVISION VIEW BODY
========================================================= */

.divisionViewBody {
    padding: 15px;

    max-height: 430px;

    overflow-y: auto;
}


/* =========================================================
   THEMATIC MAPS
========================================================= */

.sidebar-section {
    margin-top: 10px;

    margin-bottom: 10px;
}


.sidebar-section-title {
    color: #0d6efd;

    font-weight: 600;

    margin-bottom: 8px;
}


.sidebar-checkbox {
    margin-bottom: 5px;
}


/* =========================================================
   SIDEBAR INTERACTION
========================================================= */

#sidebar button,
#sidebar input,
#sidebar label,
#sidebar select,
#sidebar .form-check,
#sidebar .list-group-item {
    pointer-events: auto;
}


/* =========================================================
   LEAFLET CONTROLS
========================================================= */

/*
   Do NOT override Leaflet's internal panes.
   Leaflet manages these z-index values itself.
*/

.leaflet-control-container {
    z-index: 1000;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {

    #dashboardPanel {
        width: 320px;

        max-width: calc(100% - 30px);

        top: 60px;
    }

    .dashboardCards {
        grid-template-columns: repeat(2, 1fr);
    }

    #searchPanel {
        width: 200px;

        right: 10px;
    }

    #legendPanel {
        width: 160px;

        right: 10px;
    }

}
/* =========================================================
   TEMPORARY UI OVER MAP TEST
========================================================= */

#toolbar,
#searchPanel,
#legendPanel,
#assetManagerPanel,
#divisionViewPanel,
#dashboardPanel {
    z-index: 999999 !important;
}
#map {
    z-index: 1 !important;
}
/* =========================================================
   MAP UI OVERLAY
========================================================= */

#mapUIOverlay {
    position: absolute;

    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    width: 100%;
    height: 100%;

    z-index: 999999;

    pointer-events: none;
}


/* Allow individual UI panels to receive clicks */

#mapUIOverlay #toolbar,
#mapUIOverlay #legendPanel,
#mapUIOverlay #searchPanel,
#mapUIOverlay #assetManagerPanel,
#mapUIOverlay #divisionViewPanel,
#mapUIOverlay #dashboardPanel {

    pointer-events: auto;

    z-index: 1000000 !important;
}
/* =========================================================
   DIVISION DASHBOARD - ORGANIZED UI
========================================================= */

.division-dashboard {
    width: 100%;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}


/* =========================================================
   DIVISION HEADING
========================================================= */

.division-dashboard-heading {
    padding: 4px 0 14px 0;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 12px;
}

.division-dashboard-name {
    font-size: 18px;
    font-weight: 700;
    color: #198754;
    line-height: 1.3;
}

.division-dashboard-description {
    margin-top: 3px;
    font-size: 12px;
    color: #6c757d;
}


/* =========================================================
   CANAL TYPE GRID
========================================================= */

.division-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}


/* =========================================================
   CANAL TYPE CARD
========================================================= */

.division-type-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    background: #ffffff;
    box-sizing: border-box;
}


/* Distributary */

.distributary-card {
    border-top: 4px solid #32CD32;
}


/* Minor */

.minor-card {
    border-top: 4px solid #FF8C00;
}


/* =========================================================
   CARD ICON
========================================================= */

.division-type-icon {
    font-size: 18px;
    margin-bottom: 4px;
}


/* =========================================================
   CARD TITLE
========================================================= */

.division-type-title {
    font-size: 12px;
    font-weight: 600;
    color: #343a40;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* =========================================================
   CARD COUNT
========================================================= */

.division-type-count {
    margin-top: 5px;
    font-size: 25px;
    line-height: 1;
    font-weight: 700;
    color: #0d6efd;
}


/* =========================================================
   CARD UNIT
========================================================= */

.division-type-unit {
    font-size: 11px;
    color: #6c757d;
    margin-top: 3px;
}


/* =========================================================
   CARD LENGTH
========================================================= */

.division-type-length {
    margin-top: 9px;
    font-size: 16px;
    font-weight: 700;
    color: #212529;
}


/* =========================================================
   CARD LENGTH LABEL
========================================================= */

.division-type-label {
    font-size: 10px;
    color: #6c757d;
    margin-top: 2px;
}


/* =========================================================
   TOTAL NETWORK CARD
========================================================= */

.division-total-card {
    background: #0d6efd;
    color: #ffffff;
    border-radius: 9px;
    padding: 14px;
    text-align: center;
    margin-bottom: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.12);
}


/* =========================================================
   TOTAL HEADING
========================================================= */

.division-total-heading {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.9;
}


/* =========================================================
   TOTAL COUNT
========================================================= */

.division-total-main {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 5px;
    margin-top: 4px;
}


.division-total-number {
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
}


.division-total-unit {
    font-size: 12px;
    opacity: 0.9;
}


/* =========================================================
   TOTAL LENGTH
========================================================= */

.division-total-length {
    margin-top: 7px;
    font-size: 20px;
    font-weight: 700;
}


/* =========================================================
   TOTAL LABEL
========================================================= */

.division-total-label {
    font-size: 10px;
    opacity: 0.85;
    margin-top: 2px;
}


/* =========================================================
   DIVISION INFORMATION
========================================================= */

.division-information {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 7px;
    overflow: hidden;
}


/* =========================================================
   INFORMATION ROW
========================================================= */

.division-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid #e1e4e7;
    font-size: 11px;
}


.division-info-row:last-child {
    border-bottom: none;
}


/* =========================================================
   INFORMATION LABEL
========================================================= */

.division-info-label {
    color: #6c757d;
    font-weight: 600;
    white-space: nowrap;
}


/* =========================================================
   INFORMATION VALUE
========================================================= */

.division-info-value {
    color: #212529;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 500px) {

    .division-type-grid {
        grid-template-columns: 1fr;
    }

}
/* =========================================================
   DIVISION DASHBOARD
========================================================= */

#divisionDashboardPanel {

    position: absolute;

    top: 75px;
    left: 20px;

    width: 720px;
    max-width: calc(100% - 380px);

    max-height: calc(100% - 100px);

    background: #ffffff;

    border-radius: 10px;

    box-shadow: 0 4px 18px rgba(0,0,0,0.25);

    overflow: hidden;

    z-index: 1000;

    display: none;

}


/* =========================================================
   HEADER
========================================================= */

.divisionDashboardHeader {

    height: 50px;

    background: #198754;

    color: #ffffff;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 16px;

    font-size: 18px;

    font-weight: 600;

}


/* CLOSE BUTTON */

#closeDivisionDashboard {

    border: none;

    background: transparent;

    color: #ffffff;

    font-size: 28px;

    line-height: 1;

    cursor: pointer;

    padding: 0 4px;

}


#closeDivisionDashboard:hover {

    opacity: 0.75;

}


/* =========================================================
   BODY
========================================================= */

.divisionDashboardBody {

    padding: 14px;

    max-height: calc(100vh - 180px);

    overflow-y: auto;

}


/* =========================================================
   SUMMARY CARDS
========================================================= */

.divisionSummaryCards {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 10px;

    margin-bottom: 14px;

}


.divisionSummaryCard {

    background: #f8f9fa;

    border: 1px solid #dee2e6;

    border-radius: 8px;

    padding: 12px;

    text-align: center;

}


.divisionSummaryTitle {

    font-size: 13px;

    color: #6c757d;

    margin-bottom: 4px;

}


.divisionSummaryValue {

    font-size: 22px;

    font-weight: 700;

    color: #198754;

}


/* =========================================================
   TABLE WRAPPER
========================================================= */

.divisionTableWrapper {

    width: 100%;

    overflow-x: auto;

    overflow-y: visible;

    border: 1px solid #dee2e6;

    border-radius: 6px;

}


/* =========================================================
   TABLE
========================================================= */

.divisionDashboardTable {

    width: 100%;

    min-width: 850px;

    border-collapse: collapse;

    font-size: 13px;

}


/* HEADER */

.divisionDashboardTable thead th {

    background: #198754;

    color: #ffffff;

    padding: 9px 8px;

    text-align: center;

    white-space: nowrap;

    font-weight: 600;

    position: sticky;

    top: 0;

    z-index: 2;

}


/* BODY */

.divisionDashboardTable tbody td {

    padding: 8px;

    border-bottom: 1px solid #e5e5e5;

    text-align: center;

    white-space: nowrap;

}


/* DIVISION NAME */

.divisionDashboardTable tbody td:first-child {

    text-align: left;

    font-weight: 600;

    color: #198754;

}


/* ALTERNATING ROWS */

.divisionDashboardTable tbody tr:nth-child(even) {

    background: #f8f9fa;

}


/* HOVER */

.divisionDashboardTable tbody tr:hover {

    background: #e9f7ef;

}


/* =========================================================
   DASHBOARD NOTE
========================================================= */

.divisionDashboardNote {

    margin-top: 10px;

    padding: 9px 11px;

    background: #f8f9fa;

    border-left: 4px solid #198754;

    font-size: 11px;

    color: #6c757d;

}


/* =========================================================
   SEARCH PANEL
========================================================= */

#searchPanel {

    z-index: 1200 !important;

}


/* =========================================================
   LEGEND
========================================================= */

#legendPanel {

    z-index: 1200 !important;

}


/* =========================================================
   TOOLBAR
========================================================= */

#toolbar {

    z-index: 1300 !important;

}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1000px) {

    #divisionDashboardPanel {

        width: 650px;

        max-width: calc(100% - 300px);

    }

}


@media (max-width: 800px) {

    #divisionDashboardPanel {

        left: 10px;

        right: 10px;

        width: auto;

        max-width: none;

        top: 70px;

    }


    .divisionSummaryCards {

        grid-template-columns:
            repeat(3, 1fr);

    }

}


@media (max-width: 600px) {

    .divisionSummaryCards {

        grid-template-columns: 1fr;

    }

}
/* =========================================================
   COMPACT SIDEBAR FONT
========================================================= */

/* Main sidebar text */
#sidebar {
    font-size: 13px;
}

/* Sidebar menu buttons */
#sidebar .list-group-item {
    font-size: 13px;
    padding: 9px 12px;
}

/* Layer headings */
#sidebar h6 {
    font-size: 13px;
    margin-top: 8px;
    margin-bottom: 6px;
}

/* Layer checkbox labels */
#sidebar .form-check-label {
    font-size: 13px;
}

/* Checkbox spacing */
#sidebar .form-check {
    margin-bottom: 4px;
}

/* Thematic map text */
#sidebar .sidebar-checkbox {
    font-size: 13px;
}

/* Thematic map section title */
#sidebar .sidebar-section-title {
    font-size: 13px;
}

/* Main UGCAMS heading */
#sidebar h3 {
    font-size: 20px;
}
/* =========================================================
   UGCAMS - NEW INTERACTIVE SIDEBAR
========================================================= */

.ugcams-sidebar {
    width: 100%;
    padding-bottom: 15px;
}


/* =========================================================
   SIDEBAR BRAND
========================================================= */

.sidebar-brand {
    padding: 4px 5px 14px 5px;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 8px;
}

.sidebar-brand-title {
    font-size: 21px;
    font-weight: 700;
    color: #0d6efd;
}

.sidebar-brand-subtitle {
    font-size: 11px;
    color: #6c757d;
    margin-top: 1px;
}

.demo-badge {
    display: inline-block;
    margin-top: 7px;
    padding: 3px 8px;
    border-radius: 12px;
    background: #e8f3ff;
    color: #0d6efd;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.4px;
}


/* =========================================================
   MAIN SIDEBAR BUTTONS
========================================================= */

.sidebar-main-button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;

    border: none;
    background: transparent;

    padding: 9px 10px;

    margin-bottom: 2px;

    border-radius: 6px;

    color: #343a40;

    font-size: 13px;
    font-weight: 600;

    text-align: left;

    transition: all 0.15s ease;
}

.sidebar-main-button:hover {
    background: #e9f2ff;
    color: #0d6efd;
}

.sidebar-main-button.active {
    background: #0d6efd;
    color: white;
}


/* =========================================================
   SIDEBAR ICON
========================================================= */

.sidebar-icon {
    width: 20px;
    text-align: center;
    font-size: 15px;
}


/* =========================================================
   ARROW
========================================================= */

.sidebar-arrow {
    margin-left: auto;
    font-size: 12px;
    color: #6c757d;
}

.sidebar-main-button.active .sidebar-arrow {
    color: white;
}


/* =========================================================
   SIDEBAR SUBMENU
========================================================= */

.sidebar-submenu {
    padding-left: 8px;
}


/* =========================================================
   SUBSECTION BUTTON
========================================================= */

.sidebar-subsection-button {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 7px;

    border: none;
    background: transparent;

    padding: 7px 9px;

    color: #495057;

    font-size: 12px;
    font-weight: 600;

    text-align: left;

    border-radius: 5px;
}

.sidebar-subsection-button:hover {
    background: #f0f5fa;
    color: #0d6efd;
}


/* =========================================================
   LAYER GROUP
========================================================= */

.sidebar-layer-group {
    padding: 4px 8px 7px 27px;
}


/* =========================================================
   CHECKBOXES
========================================================= */

.sidebar-checkbox {
    display: flex;
    align-items: center;

    gap: 7px;

    margin-bottom: 4px;

    min-height: 22px;
}

.sidebar-checkbox input {
    margin: 0;
    flex-shrink: 0;
}

.sidebar-checkbox label {
    font-size: 12px;
    color: #495057;
    cursor: pointer;
    line-height: 1.25;
}

.sidebar-checkbox label:hover {
    color: #0d6efd;
}


/* =========================================================
   SECTION DIVIDER
========================================================= */

.sidebar-divider {
    height: 1px;

    background: #dee2e6;

    margin: 10px 2px;
}


/* =========================================================
   SECTION HEADING
========================================================= */

.sidebar-section-heading {
    padding: 4px 8px 6px 8px;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.7px;

    color: #6c757d;
}
/* Hide sidebar category headings and separators */
.sidebar-section-heading,
.sidebar-divider {
    display: none !important;
}

/* =========================================================
   ACTION BUTTON
========================================================= */

.sidebar-action-button {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 9px;

    border: none;

    background: transparent;

    padding: 8px 9px;

    margin-bottom: 3px;

    border-radius: 7px;

    color: #343a40;

    text-align: left;

    transition: all 0.15s ease;
}

.sidebar-action-button:hover {
    background: #e9f2ff;
    color: #0d6efd;
    transform: translateX(2px);
}

.sidebar-action-button > span:first-child {
    width: 23px;

    text-align: center;

    font-size: 16px;
}

.sidebar-action-button > span:nth-child(2) {
    flex: 1;
    min-width: 0;
}

.sidebar-action-button > span:last-child {
    font-size: 16px;
    color: #adb5bd;
}


/* =========================================================
   ACTION BUTTON TEXT
========================================================= */

.sidebar-action-button strong {
    display: block;

    font-size: 12px;

    font-weight: 600;

    line-height: 1.2;
}

.sidebar-action-button small {
    display: block;

    margin-top: 2px;

    font-size: 9px;

    color: #868e96;

    line-height: 1.2;
}

.sidebar-action-button:hover small {
    color: #6c757d;
}


/* =========================================================
   REPORT BUTTON
========================================================= */

.report-button {
    background: #ffffff;

    border: 1px solid transparent;
}

.report-button:hover {
    border-color: #cfe2ff;
}


/* =========================================================
   SIDEBAR FOOTER
========================================================= */

.sidebar-footer {
    display: flex;

    align-items: center;

    gap: 7px;

    margin-top: 14px;

    padding: 8px 9px;

    border-top: 1px solid #dee2e6;

    color: #6c757d;

    font-size: 10px;
}


/* =========================================================
   STATUS DOT
========================================================= */

.status-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #198754;

    box-shadow: 0 0 0 3px rgba(25,135,84,0.12);
}


/* =========================================================
   SIDEBAR SCROLLBAR
========================================================= */

#sidebar::-webkit-scrollbar {
    width: 5px;
}

#sidebar::-webkit-scrollbar-track {
    background: #f8f9fa;
}

#sidebar::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 5px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .sidebar-brand-title {
        font-size: 18px;
    }

    .sidebar-main-button {
        font-size: 12px;
    }

    .sidebar-action-button strong {
        font-size: 11px;
    }

}

/* =========================================================
   ASSETS & STRUCTURES - DEMO / FUTURE DATA
========================================================= */

/* Small category heading inside dropdown */
.sidebar-group-label {
    margin: 9px 0 5px 0;
    padding: 3px 0 3px 0;

    font-size: 10px;
    font-weight: 700;
    color: #6c757d;

    text-transform: uppercase;
    letter-spacing: 0.45px;

    border-bottom: 1px solid #edf0f2;
}


/* Demo Data heading */
.sidebar-demo-heading {
    display: flex;
    align-items: center;
    gap: 6px;

    margin: 2px 0 6px 0;
    padding: 4px 6px;

    background: #fff8e1;
    border: 1px solid #ffe08a;
    border-radius: 5px;

    color: #9a6700;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 0.7px;
}


/* Small amber dot */
.sidebar-demo-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #f0ad00;

    flex-shrink: 0;
}


/* Actual demo layer */
.sidebar-checkbox.demo-layer {
    padding: 2px 4px;

    border-radius: 4px;

    background: rgba(255, 193, 7, 0.08);

    border-left: 3px solid #f0ad00;
}


/* Demo layer hover */
.sidebar-checkbox.demo-layer:hover {
    background: rgba(255, 193, 7, 0.16);
}


/* Future / not-yet-populated layers */
.sidebar-checkbox.future-layer {
    opacity: 0.55;
}


/* Disabled future checkbox */
.sidebar-checkbox.future-layer input:disabled {
    cursor: not-allowed;
}


/* Disabled future label */
.sidebar-checkbox.future-layer label {
    color: #8a9198;
    cursor: default;
}


/* Demo note at bottom of dropdown */
.sidebar-demo-note {
    display: flex;
    flex-direction: column;
    gap: 3px;

    margin-top: 10px;
    padding: 8px 9px;

    background: #f8f9fa;

    border-left: 3px solid #f0ad00;
    border-radius: 4px;

    font-size: 9px;
    line-height: 1.35;

    color: #6c757d;
}


.sidebar-demo-note strong {
    color: #8a6500;
    font-size: 9px;
}


/* Make long dropdowns compact enough for the sidebar */
#assetsSection,
#structureSection {
    max-height: none;
}


/* Slightly tighter spacing inside these two menus */
#assetsSection .sidebar-checkbox,
#structureSection .sidebar-checkbox {
    min-height: 21px;
    margin-bottom: 3px;
}


/* Mobile */
@media (max-width: 768px) {

    .sidebar-group-label {
        font-size: 9px;
    }

    .sidebar-demo-heading {
        font-size: 8px;
    }

    .sidebar-demo-note {
        font-size: 8px;
    }

}


/* =========================================================
   DIVISION ANALYTICS / DSS
   New full-map analytics workspace
========================================================= */

#divisionAnalyticsPanel {
    position: absolute;
    inset: 0;
    display: none;
    z-index: 1000005 !important;
    background: #f4f8fb;
    color: #243447;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

.divisionAnalyticsHeader {
    min-height: 72px;
    background: #0d6efd;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 20px;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.divisionAnalyticsTitle {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 21px;
    font-weight: 700;
}

.divisionAnalyticsTitle small {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 400;
    opacity: .88;
}

.divisionAnalyticsIcon {
    font-size: 25px;
}

.divisionAnalyticsControls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.divisionAnalyticsControls label {
    font-size: 11px;
    font-weight: 700;
    opacity: .9;
}

#divisionAnalyticsSelect {
    width: 255px;
    min-height: 38px;
    border: 0;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
}

#closeDivisionAnalytics {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 7px;
    background: rgba(255,255,255,.16);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

#closeDivisionAnalytics:hover {
    background: rgba(255,255,255,.28);
}

.divisionAnalyticsBody {
    height: calc(100% - 72px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px 40px;
    box-sizing: border-box;
}

.divisionAnalyticsBody::-webkit-scrollbar {
    width: 9px;
}
.divisionAnalyticsBody::-webkit-scrollbar-thumb {
    background: #b8c9d6;
    border-radius: 10px;
}

.divisionAnalyticsLoading {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #66788a;
    font-weight: 600;
}

.dss-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #fff;
    border: 1px solid #d9e3eb;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 14px;
    box-shadow: 0 2px 7px rgba(31,60,80,.06);
}

.dss-eyebrow {
    font-size: 10px;
    font-weight: 800;
    color: #0d6efd;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.dss-hero h2 {
    margin: 0;
    font-size: 23px;
    color: #183b56;
}

.dss-hero p {
    margin: 5px 0 0;
    color: #6b7c8d;
    font-size: 12px;
}

.dss-status-badge {
    padding: 7px 11px;
    border-radius: 20px;
    background: #e7f1ff;
    color: #0d6efd;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.dss-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.dss-kpi-card {
    background: #fff;
    border: 1px solid #d9e3eb;
    border-radius: 10px;
    padding: 14px;
    min-height: 84px;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(31,60,80,.05);
}

.dss-kpi-card span {
    display: block;
    font-size: 11px;
    color: #6b7c8d;
    font-weight: 600;
}

.dss-kpi-card strong {
    display: inline-block;
    margin-top: 8px;
    font-size: 24px;
    color: #0d6efd;
}

.dss-kpi-card small {
    color: #7a8b9a;
    font-size: 10px;
    margin-left: 4px;
}

.dss-section {
    background: #fff;
    border: 1px solid #d9e3eb;
    border-radius: 12px;
    margin-bottom: 14px;
    padding: 16px;
    box-shadow: 0 2px 7px rgba(31,60,80,.05);
}

.dss-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5edf3;
    padding-bottom: 10px;
    margin-bottom: 13px;
}

.dss-section-heading > div {
    font-size: 16px;
    font-weight: 800;
    color: #183b56;
}

.dss-section-heading > span {
    font-size: 10px;
    color: #80909f;
    font-weight: 600;
}

.dss-section-icon {
    margin-right: 6px;
}

/* =========================================================
   LOCATION / MAP
========================================================= */

.dss-location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}


.dss-mini-map {
    height: 330px;
    min-height: 330px;
    background: #ffffff;
    border: 1px solid #ccdce5;
    border-radius: 5px;
    overflow: hidden;
}


/* =========================================================
   LOCATION KPI PANEL
========================================================= */

.dss-location-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0;
    background: transparent;
    border: 0;
}


.dss-location-summary .dss-kpi-grid {
    display: contents;
}


.dss-location-summary .dss-kpi-card {
    min-height: 150px;
}


/* Keep the old text/stat block hidden */
.dss-location-summary h3,
.dss-location-summary p,
.dss-mini-stat-row {
    display: none;
}

.dss-mini-stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 20px;
}

.dss-mini-stat-row div {
    background: #fff;
    border: 1px solid #dce6ed;
    border-radius: 7px;
    padding: 10px;
}

.dss-mini-stat-row span,
.dss-stat-strip span {
    display: block;
    font-size: 10px;
    color: #7a8b9a;
}

.dss-mini-stat-row strong {
    display: block;
    margin-top: 4px;
    color: #0d6efd;
    font-size: 14px;
}

.dss-stat-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
    margin-bottom: 13px;
}

.dss-stat-strip div {
    background: #f7fafc;
    border: 1px solid #dfe8ee;
    border-radius: 8px;
    padding: 10px;
}

.dss-stat-strip strong {
    display: block;
    margin-top: 5px;
    color: #0d6efd;
    font-size: 17px;
}

.dss-chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px;
}

.dss-chart-card {
    min-width: 0;
    border: 1px solid #dfe7ed;
    border-radius: 9px;
    padding: 12px;
    background: #fbfdff;
}

.dss-chart-title {
    font-size: 12px;
    font-weight: 800;
    color: #41566a;
    margin-bottom: 8px;
}

.dss-chart-wrap {
    position: relative;
    height: 270px;
}

.dss-data-note {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 7px;
    background: #f2f7fb;
    border-left: 4px solid #0d6efd;
    color: #607386;
    font-size: 11px;
    line-height: 1.5;
}

.dss-table-wrap {
    margin-top: 13px;
    overflow-x: auto;
}

.dss-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.dss-table th {
    background: #0d6efd;
    color: #fff;
    text-align: left;
    padding: 9px;
    white-space: nowrap;
}

.dss-table td {
    border-bottom: 1px solid #e4ebf0;
    padding: 8px 9px;
}

.dss-table tr:hover td {
    background: #f4f9fd;
}

.dss-decision-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.dss-decision-card {
    border: 1px solid #dfe7ed;
    border-radius: 8px;
    padding: 12px;
    background: #f9fbfd;
}

.dss-decision-card strong {
    display: block;
    font-size: 12px;
    color: #314b61;
}

.dss-decision-card p {
    margin: 6px 0 0;
    font-size: 11px;
    line-height: 1.5;
    color: #6c7e8e;
}

.dss-decision-card.neutral {
    border-left: 4px solid #7a8b9a;
}

.dss-validation-note {
    margin-top: 12px;
    padding: 11px 13px;
    background: #fff8e7;
    border: 1px solid #f0dfad;
    border-radius: 7px;
    color: #6f5a25;
    font-size: 11px;
    line-height: 1.5;
}

.dss-module-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.dss-module-grid div {
    background: #f8fbfd;
    border: 1px solid #e0e8ee;
    border-radius: 8px;
    padding: 12px;
}

.dss-module-grid b {
    display: block;
    color: #183b56;
    font-size: 12px;
}

.dss-module-grid span {
    display: block;
    margin-top: 5px;
    color: #728496;
    font-size: 10px;
}

@media (max-width: 900px) {
    .divisionAnalyticsHeader {
        align-items: flex-start;
        flex-direction: column;
    }

    .divisionAnalyticsControls {
        width: 100%;
    }

    #divisionAnalyticsSelect {
        flex: 1;
    }

    .divisionAnalyticsBody {
        height: calc(100% - 124px);
    }

    .dss-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dss-location-grid,
    .dss-chart-grid {
        grid-template-columns: 1fr;
    }

    .dss-decision-grid,
    .dss-module-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .divisionAnalyticsBody {
        padding: 12px;
    }

    .dss-kpi-grid,
    .dss-stat-strip,
    .dss-decision-grid,
    .dss-module-grid {
        grid-template-columns: 1fr;
    }

    .dss-location-grid {
        grid-template-columns: 1fr;
    }

    .dss-mini-map {
        height: 250px;
    }
}
/* =========================================================
   CANAL DASHBOARD - FINAL Z-INDEX
========================================================= */

#dashboardPanel {
    z-index: 1000005 !important;
}
/* =========================================================
   DIVISION-WISE L-SECTION DASHBOARD
========================================================= */

.lsection-dashboard-overlay {

    position: fixed;

    inset: 0;

    z-index: 99999;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 24px;

    background:
        rgba(3, 20, 35, 0.78);

    backdrop-filter: blur(7px);

    -webkit-backdrop-filter: blur(7px);
}


.lsection-dashboard-overlay.active {

    display: flex;

    animation:
        lsectionFadeIn 0.2s ease;
}


@keyframes lsectionFadeIn {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* =========================================================
   MAIN WINDOW
========================================================= */

.lsection-dashboard {

    width: min(1180px, 96vw);

    height: min(780px, 92vh);

    display: flex;

    flex-direction: column;

    overflow: hidden;

    border-radius: 16px;

    background: #f5f8fc;

    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.38);

    animation:
        lsectionSlideUp 0.25s ease;
}


@keyframes lsectionSlideUp {

    from {

        opacity: 0;

        transform:
            translateY(18px)
            scale(0.98);
    }

    to {

        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}


/* =========================================================
   HEADER
========================================================= */

.lsection-header {

    min-height: 82px;

    padding: 0 26px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    background:
        linear-gradient(
            135deg,
            #062746,
            #0a3b63
        );

    color: white;
}


.lsection-title-area {

    display: flex;

    align-items: center;

    gap: 15px;
}


.lsection-title-icon {

    width: 46px;
    height: 46px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background:
        rgba(255,255,255,0.13);

    font-size: 23px;

    border:
        1px solid rgba(255,255,255,0.14);
}


.lsection-title-area h2 {

    margin: 0;

    font-size: 21px;

    font-weight: 700;

    letter-spacing: 0.2px;
}


.lsection-title-area p {

    margin: 4px 0 0;

    color:
        rgba(255,255,255,0.70);

    font-size: 12px;
}


.lsection-close-button {

    width: 38px;
    height: 38px;

    border: none;

    border-radius: 9px;

    background:
        rgba(255,255,255,0.10);

    color: white;

    font-size: 18px;

    cursor: pointer;

    transition:
        0.2s ease;
}


.lsection-close-button:hover {

    background:
        rgba(255,255,255,0.20);

    transform: rotate(90deg);
}


/* =========================================================
   BODY
========================================================= */

.lsection-body {

    flex: 1;

    overflow-y: auto;

    padding: 25px 28px;

    background:
        #f5f8fc;
}


/* =========================================================
   SUMMARY CARDS
========================================================= */

.lsection-summary {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 16px;

    margin-bottom: 22px;
}


.lsection-summary-card {

    min-height: 76px;

    display: flex;

    align-items: center;

    gap: 13px;

    padding: 15px 18px;

    border-radius: 12px;

    background: white;

    border:
        1px solid #dce5ef;

    box-shadow:
        0 3px 12px rgba(8,43,73,0.05);
}


.summary-icon {

    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background:
        #eaf2f9;

    font-size: 19px;
}


.summary-label {

    display: block;

    margin-bottom: 3px;

    color: #708196;

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: 0.6px;
}


.lsection-summary-card strong {

    display: block;

    color: #082b49;

    font-size: 20px;
}


/* =========================================================
   TOOLBAR
========================================================= */

.lsection-toolbar {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;
}


.lsection-search {

    width: 310px;

    height: 42px;

    display: flex;

    align-items: center;

    gap: 9px;

    padding: 0 13px;

    border-radius: 9px;

    background: white;

    border:
        1px solid #d5e0eb;

    transition:
        0.2s ease;
}


.lsection-search:focus-within {

    border-color:
        #0a4b7a;

    box-shadow:
        0 0 0 3px
        rgba(10,75,122,0.10);
}


.lsection-search span {

    font-size: 14px;

    opacity: 0.65;
}


.lsection-search input {

    width: 100%;

    border: none;

    outline: none;

    background: transparent;

    color: #17324a;

    font-size: 13px;
}


.lsection-toolbar-info {

    color: #718195;

    font-size: 12px;
}


/* =========================================================
   DIVISION GRID
========================================================= */

.lsection-division-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 13px;
}


/* =========================================================
   DIVISION CARD
========================================================= */

.lsection-division-card {

    position: relative;

    min-height: 128px;

    padding: 17px;

    border-radius: 12px;

    border:
        1px solid #d9e3ed;

    background: white;

    cursor: pointer;

    overflow: hidden;

    transition:
        transform 0.20s ease,
        box-shadow 0.20s ease,
        border-color 0.20s ease;
}


.lsection-division-card::before {

    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 4px;

    background:
        #b9c8d6;
}


.lsection-division-card.has-data::before {

    background:
        #0a4f82;
}


.lsection-division-card:hover {

    transform:
        translateY(-3px);

    border-color:
        #8eabc3;

    box-shadow:
        0 9px 25px
        rgba(8,43,73,0.12);
}


.lsection-division-card.has-data:hover {

    border-color:
        #0a4f82;

    box-shadow:
        0 10px 28px
        rgba(6,55,92,0.17);
}


.lsection-card-top {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 10px;
}


.lsection-card-number {

    color: #8ca0b2;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 0.5px;
}


.lsection-card-status {

    padding: 4px 8px;

    border-radius: 20px;

    background:
        #edf1f5;

    color:
        #718195;

    font-size: 10px;

    font-weight: 600;
}


.has-data .lsection-card-status {

    background:
        #e7f1f8;

    color:
        #075083;
}


.lsection-card-name {

    margin-top: 17px;

    color:
        #092e4d;

    font-size: 15px;

    font-weight: 700;
}


.lsection-card-count {

    margin-top: 7px;

    color:
        #718195;

    font-size: 11px;
}


.lsection-card-arrow {

    position: absolute;

    right: 17px;
    bottom: 16px;

    color:
        #7d91a4;

    font-size: 16px;

    transition:
        transform 0.2s ease;
}


.has-data .lsection-card-arrow {

    color:
        #075083;
}


.lsection-division-card:hover
.lsection-card-arrow {

    transform:
        translateX(4px);
}


/* =========================================================
   DETAIL VIEW
========================================================= */

.lsection-detail-view {

    animation:
        lsectionFadeIn 0.2s ease;
}


.lsection-detail-header {

    display: flex;

    align-items: center;

    gap: 22px;

    margin-bottom: 20px;
}


.lsection-back-button {

    border: none;

    background: transparent;

    color: #075083;

    font-size: 12px;

    font-weight: 600;

    cursor: pointer;

    padding: 8px 0;
}


.lsection-back-button:hover {

    color: #042f50;

    text-decoration: underline;
}


.detail-kicker {

    color: #8092a4;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 1px;
}


.lsection-detail-header h3 {

    margin: 3px 0 0;

    color: #082b49;

    font-size: 24px;
}


/* =========================================================
   DETAIL SUMMARY
========================================================= */

.lsection-detail-summary {

    display: flex;

    align-items: center;

    gap: 14px;

    padding: 17px;

    margin-bottom: 18px;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #eaf2f8,
            #f5f9fc
        );

    border:
        1px solid #d6e2ec;
}


.detail-summary-icon {

    width: 43px;
    height: 43px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background:
        #082b49;

    color: white;

    font-size: 18px;
}


.lsection-detail-summary strong {

    display: block;

    color: #082b49;

    font-size: 14px;
}


.lsection-detail-summary span {

    display: block;

    margin-top: 3px;

    color: #728498;

    font-size: 11px;
}


/* =========================================================
   CANAL LIST
========================================================= */

.lsection-canal-list {

    display: flex;

    flex-direction: column;

    gap: 10px;
}


.lsection-canal-item {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding: 16px 18px;

    background: white;

    border:
        1px solid #dbe4ed;

    border-radius: 10px;

    transition:
        0.2s ease;
}


.lsection-canal-item:hover {

    border-color:
        #90abc1;

    box-shadow:
        0 5px 18px
        rgba(8,43,73,0.08);

    transform:
        translateX(3px);
}


.lsection-canal-info {

    display: flex;

    align-items: center;

    gap: 13px;
}


.lsection-pdf-icon {

    width: 40px;
    height: 40px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background:
        #edf3f8;

    font-size: 18px;
}


.lsection-canal-name {

    color:
        #082b49;

    font-size: 14px;

    font-weight: 700;
}


.lsection-canal-type {

    margin-top: 3px;

    color:
        #7b8c9d;

    font-size: 10px;
}


.lsection-open-button {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding: 9px 14px;

    border: none;

    border-radius: 7px;

    background:
        #082b49;

    color: white;

    font-size: 11px;

    font-weight: 600;

    cursor: pointer;

    text-decoration: none;

    transition:
        0.2s ease;
}


.lsection-open-button:hover {

    background:
        #0b4d7d;

    transform:
        translateY(-1px);
}


/* =========================================================
   EMPTY STATE
========================================================= */

.lsection-empty-state {

    padding: 55px 20px;

    text-align: center;

    border:
        1px dashed #cbd8e4;

    border-radius: 12px;

    background:
        #fafcfe;
}


.lsection-empty-icon {

    width: 55px;
    height: 55px;

    margin: 0 auto 14px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        #edf2f6;

    font-size: 23px;
}


.lsection-empty-state h4 {

    margin: 0;

    color: #183b57;

    font-size: 15px;
}


.lsection-empty-state p {

    margin: 7px 0 0;

    color: #8190a0;

    font-size: 12px;
}


/* =========================================================
   NO SEARCH RESULTS
========================================================= */

.lsection-no-results {

    grid-column: 1 / -1;

    padding: 40px;

    text-align: center;

    color: #77899b;

    font-size: 13px;
}


/* =========================================================
   FOOTER
========================================================= */

.lsection-footer {

    min-height: 38px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 25px;

    border-top:
        1px solid #dce5ed;

    background:
        #eef3f7;

    color:
        #7a8b9b;

    font-size: 10px;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {

    .lsection-division-grid {

        grid-template-columns:
            repeat(2, 1fr);
    }

    .lsection-summary {

        grid-template-columns:
            repeat(3, 1fr);
    }

}


@media (max-width: 650px) {

    .lsection-dashboard {

        width: 96vw;

        height: 94vh;

        border-radius: 12px;
    }

    .lsection-body {

        padding: 18px;
    }

    .lsection-summary {

        grid-template-columns: 1fr;
    }

    .lsection-division-grid {

        grid-template-columns: 1fr;
    }

    .lsection-toolbar {

        align-items: stretch;

        flex-direction: column;
    }

    .lsection-search {

        width: 100%;
    }

    .lsection-canal-item {

        align-items: flex-start;

        flex-direction: column;
    }

    .lsection-open-button {

        width: 100%;

        justify-content: center;
    }

    .lsection-footer {

        display: none;
    }

}