@font-face {
    font-family: "Material Symbols Outlined";
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url("../fonts/material-symbols-outlined.woff2") format("woff2");
}

html:not(.icons-ready) .material-symbols-outlined {
    color: transparent !important;
    /* An icon is exactly 1em wide, so the hidden icon holds the same space and nothing moves when the font arrives. */
    width: 1em;
    max-width: 1em;
    overflow: hidden;
}

.material-symbols-outlined {
    font-family: "Material Symbols Outlined";
    font-weight: normal;
    font-style: normal;
    font-size: 1.25rem;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

body {
    background-color: #f9f9ff;
    color: #011c39;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.sidebar-active {
    color: #ffffff !important;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.12);
    box-shadow: inset 4px 0 0 0 #39bfff;
}
.nav-item:hover:not(.sidebar-active) {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff !important;
}

.data-table-cell { font-size: 11px; padding: 10px 12px; }
.kpi-card { border-left: 4px solid; transition: transform 0.2s; }
.kpi-card:hover { transform: translateY(-2px); }
.kpi-card.status-card-idle:hover { transform: none; }
button[data-reg-tc-card].reg-tc-card-idle { cursor: default; }
button[data-reg-tc-card].reg-tc-card-idle:hover {
    border-color: rgb(217 220 232);
    box-shadow: none;
}
button[data-dump-status].dump-status-idle { cursor: default; }
/* The compiled sheet only has focus:ring-*, so the ring classes used to
   mark the selected complaint, service, and callback card otherwise draw nothing. */
.kpi-card.ring-2 { box-shadow: 0 0 0 2px #00244b; }
/* Five status cards. The compiled sheet only has a six-column wide layout,
   which left an empty column on the right of this row. */
@media (min-width: 1280px) {
    .xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.status-box-label { display: block; line-height: 1.15; min-height: 2.3em; }
.tab-panel.hidden { display: none; }
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

.gis-grid-cell { transition: all 0.2s; cursor: pointer; }
.gis-grid-cell:hover { outline: 2px solid #00244b; z-index: 10; transform: scale(1.02); }

.dashboard-font-boost .text-\[9px\]  { font-size: 11px !important; }
.dashboard-font-boost .text-\[10px\] { font-size: 12px !important; }
.dashboard-font-boost .text-\[11px\] { font-size: 13px !important; }
.dashboard-font-boost .text-\[12px\] { font-size: 14px !important; }
.dashboard-font-boost .text-\[13px\] { font-size: 15px !important; }
.dashboard-font-boost .text-xs   { font-size: 0.875rem !important; line-height: 1.25rem !important; }
.dashboard-font-boost .text-sm   { font-size: 1rem !important;     line-height: 1.4rem !important; }
.dashboard-font-boost .text-base { font-size: 1.125rem !important; line-height: 1.6rem !important; }
.dashboard-font-boost .text-lg   { font-size: 1.25rem !important;  line-height: 1.7rem !important; }
.dashboard-font-boost .text-xl   { font-size: 1.375rem !important; line-height: 1.8rem !important; }
.dashboard-font-boost .text-2xl  { font-size: 1.65rem !important;  line-height: 2rem !important; }
.dashboard-font-boost .text-3xl  { font-size: 2rem !important;     line-height: 2.3rem !important; }
.dashboard-font-boost .data-table-cell { font-size: 14px !important; padding: 12px 14px !important; }
.dashboard-font-boost [style*="font-size:10px"] { font-size: 12px !important; }
.dashboard-font-boost [style*="font-size:11px"] { font-size: 13px !important; }
.dashboard-font-boost [style*="font-size:12px"] { font-size: 14px !important; }
.dashboard-font-boost [style*="font-size:13px"] { font-size: 15px !important; }
.dashboard-font-boost [style*="font-size:14px"] { font-size: 16px !important; }
.dashboard-font-boost [style*="font-size:15px"] { font-size: 17px !important; }
.dashboard-font-boost .complaint-popup h5 { font-size: 14px !important; }
.dashboard-font-boost .complaint-popup table { font-size: 13px !important; }
.dashboard-font-boost .complaint-popup .badge { font-size: 11px !important; }

.kpi-ribbon-card {
    background-color: #fff;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e6e8f0;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
}


#gis-map, #dumping-map {
    width: 100%;
    height: 100%;
    background-color: #e6e8f0;
    z-index: 0;
}

.leaflet-container {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    border-radius: 0.75rem;
}

.map-reset-btn {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 500;
    background: #ffffff;
    color: #00244b;
    border: 1px solid #e6e8f0;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: background-color 0.15s;
}
.map-reset-btn:hover { background: #f0f2f8; }

.cluster-legend-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(10, 58, 110, 0.75);
    border: 2px solid rgba(10, 58, 110, 0.4);
    display: inline-block;
    flex-shrink: 0;
}

/* On-map status legend. Stays in the map frame at the starting zoom. */
.map-status-legend {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 500;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: center;
    max-width: calc(100% - 24px);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e6e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
    pointer-events: none;
    color: #011c39;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}
.map-status-legend-gis {
    bottom: 52px;
}
.dumping-map-frame .map-status-legend {
    max-width: calc(100% - 140px);
}
.map-status-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.map-status-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85);
}

/* Same halo as the green cluster bubbles, in the hotspot red. */
.hotspot-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    background: rgba(192, 57, 43, 0.95);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.28);
}
.hotspot-bubble-icon {
    background: transparent !important;
    border: none !important;
}
.hotspot-bubble {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    background-color: rgba(192, 57, 43, 0.35);
}
.hotspot-bubble div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 15px;
    background-color: rgba(192, 57, 43, 0.92);
    color: #fff;
    font: 700 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
}
.hotspot-bubble span {
    line-height: 30px;
}

/* Leaflet popup styling to match dashboard look */
.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.leaflet-popup-content {
    margin: 12px 14px;
    min-width: 220px;
}
.complaint-popup h5 {
    font-size: 12px;
    font-weight: 700;
    color: #00244b;
    margin-bottom: 6px;
}
.complaint-popup table { width: 100%; font-size: 11px; }
.complaint-popup table td { padding: 2px 0; vertical-align: top; }
.complaint-popup table td.label { color: #5a6a85; padding-right: 8px; white-space: nowrap; }
.complaint-popup .badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 999px;
}
.complaint-popup .popup-btn {
    margin-top: 8px;
    width: 100%;
    background: #00244b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 6px 0;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}
.complaint-popup .popup-btn:hover { background: #013a73; }

/* Custom marker pin */
.complaint-marker-pin {
    width: 22px;
    height: 22px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 2px solid rgba(255,255,255,0.9);
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.complaint-marker-pin::after {
    content: '';
    position: absolute;
    top: 5px; left: 5px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
}


#complaint-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(1, 28, 57, 0.55);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
#complaint-modal-backdrop.hidden { display: none; }

.complaint-modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.modal-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.modal-field .modal-label {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    color: #5a6a85;
    letter-spacing: 0.03em;
}
.modal-field .modal-value {
    font-size: 13px;
    color: #00244b;
    font-weight: 600;
}

.mini-map {
    width: 100%;
    height: 160px;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 12px;
}

/* Keep Status and the time column only as wide as their text. Status is
   right-aligned so a short label such as Overdue sits against the time,
   which starts at the left of its own column. */
.reg-tc-cases-table col.reg-tc-fit { width: 1%; }
.reg-tc-cases-table th:nth-child(5),
.reg-tc-cases-table td:nth-child(5),
.reg-tc-cases-table th:nth-child(6),
.reg-tc-cases-table td:nth-child(6) {
    width: 1%;
    white-space: nowrap;
}
.reg-tc-cases-table th:nth-child(6) { line-height: 1.15; }

.reg-tc-map-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    color: #5a6a85;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}
.reg-tc-map-icon-btn:hover {
    color: #00244b;
    background: #eef1f8;
}

/* Export-in-progress spinner - swapped into a download button's own
   content while an export is running (see _withExportSpinner in
   exports.js), so the button itself shows a spinning circle instead of
   just going quiet, no matter how long PDF/Excel generation takes. */
@keyframes btn-spin {
    to { transform: rotate(360deg); }
}
.btn-spinner {
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
    vertical-align: middle;
}
.btn-spinner.btn-spinner-dark {
    border-color: rgba(0, 36, 75, 0.25);
    border-top-color: #00244b;
}

/* Sortable table headers. The click target fills the cell. The unsorted
   mark stays faint; the active arrow is solid white on the navy header. */
th[data-sort-key] {
    padding: 0;
}
th[data-sort-key] .table-sort-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    width: 100%;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-align: inherit;
    line-height: inherit;
    cursor: pointer;
    padding: 8px;
}
th.data-table-cell[data-sort-key] .table-sort-btn {
    padding: 11px 14px;
}
.dashboard-font-boost th.data-table-cell[data-sort-key] {
    padding: 0 !important;
}
.dashboard-font-boost th.data-table-cell[data-sort-key] .table-sort-btn {
    padding: 12px 14px;
}
th[data-sort-key].text-right .table-sort-btn {
    justify-content: flex-end;
}
th[data-sort-key] .table-sort-btn:hover,
th[data-sort-key] .table-sort-btn:focus-visible {
    background: rgba(255, 255, 255, 0.08);
}
th[data-sort-key] .table-sort-btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: -2px;
}
.table-sort-label {
    min-width: 0;
}
.table-sort-icon {
    font-size: 14px;
    line-height: 1;
    opacity: 0.45;
    flex-shrink: 0;
    text-transform: none;
    font-family: "Material Symbols Outlined";
}
th[data-sort-key] .table-sort-btn:hover .table-sort-icon,
th[data-sort-key] .table-sort-btn:focus-visible .table-sort-icon,
th.table-sort-active .table-sort-icon {
    opacity: 1;
}
