:root {
  --iets-blue: #4299c6;
  --iets-red: #f23d4f;
  --iets-dark: #252525;
  --iets-teal: #18aaa5;
  --iets-light: #edf5fa;
  --shadow: 0 8px 26px rgba(27, 58, 77, 0.10);
}
* { box-sizing: border-box; }
body { margin: 0; background: #f4f7f9; color: var(--iets-dark); font-family: "Segoe UI", Arial, sans-serif; }
.header-wrap { position: relative; background: white; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.institutional-banner { width: 100%; height: 100px; object-fit: cover; object-position: center; display: block; }
.title-overlay { position: absolute; left: 26%; top: 21px; color: white; text-shadow: 0 2px 8px rgba(0,0,0,.25); }
.dashboard-title { font-size: clamp(1.25rem, 2.2vw, 2rem); font-weight: 800; letter-spacing: .2px; }
.dashboard-subtitle { font-size: clamp(.8rem, 1.1vw, 1rem); opacity: .96; margin-top: 3px; }
.dashboard-container { padding: 0 2.2% 12px; max-width: 1880px; }
.custom-tab { border: 0 !important; background: transparent !important; padding: 13px 18px !important; font-weight: 700; color: #58656e !important; }
.custom-tab-selected { color: var(--iets-red) !important; border-bottom: 4px solid var(--iets-red) !important; background: white !important; }
.action-buttons .btn { font-weight: 700; border-radius: 8px; }
.filter-card, .panel-card, .kpi-card { border: 0; border-radius: 14px; box-shadow: var(--shadow); }
.filter-card { border-left: 6px solid var(--iets-blue); }
.filter-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .45px; font-weight: 800; color: #4b5962; margin-bottom: 5px; }
.filter-help { margin-top: 10px; color: #77858f; font-size: .78rem; }
.metric-switch .form-check { margin-right: 10px; }
.metric-switch .form-check-input { display: none; }
.metric-switch .form-check-label { cursor: pointer; border: 1px solid #cddbe3; border-radius: 999px; padding: 7px 14px; color: #596b76; font-size: .8rem; font-weight: 750; background: white; transition: .2s ease; }
.metric-switch .form-check-input:checked + .form-check-label { background: var(--iets-dark); color: white; border-color: var(--iets-dark); box-shadow: 0 4px 12px rgba(37,37,37,.18); }
.report-message { min-height: 20px; color: var(--iets-red); font-weight: 700; font-size: .86rem; padding: 4px 3px 0; }
.dashboard-loading-indicator { min-height: 26px; display: flex; align-items: center; justify-content: center; }
.kpi-card { overflow: hidden; position: relative; }
.kpi-card::after { content: ""; position: absolute; height: 5px; bottom: 0; left: 0; right: 0; background: linear-gradient(90deg, var(--iets-blue), var(--iets-red)); }
.kpi-body { display: flex; align-items: center; gap: 12px; min-height: 118px; padding: 15px; }
.kpi-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 1.35rem; color: white; background: linear-gradient(145deg, var(--iets-blue), #2b769e); flex: 0 0 auto; }
.kpi-value { font-size: clamp(1.25rem, 1.75vw, 1.85rem); font-weight: 850; line-height: 1.05; color: var(--iets-dark); }
.kpi-label { font-size: .7rem; color: #61717b; margin-top: 5px; font-weight: 800; text-transform: uppercase; letter-spacing: .35px; }
.kpi-helper { font-size: .7rem; color: #8a98a1; line-height: 1.2; margin-top: 3px; }
.panel-card .card-header { background: white; border-bottom: 1px solid #e7eef2; padding: 13px 17px; display: flex; justify-content: space-between; align-items: center; }
.panel-title { font-weight: 800; color: var(--iets-dark); }
.panel-context { color: #77858f; font-size: .78rem; }
.main-map { height: 620px; width: 100%; border-radius: 10px; overflow: hidden; }
.bubble-map { height: 420px; width: 100%; border-radius: 10px; overflow: hidden; }
.chart { height: 280px; }
.map-tip { min-width: 185px; font-size: 12px; line-height: 1.45; }
.map-tip hr { margin: 5px 0; border-color: #dfe7ec; }
.footer-wrap { background: white; margin-top: 12px; }
.footer-image { width: 100%; max-height: 48px; object-fit: cover; display: block; }
.Select-control, .dash-dropdown { border-radius: 8px !important; }
@media (max-width: 991px) {
  .institutional-banner { height: 85px; }
  .title-overlay { left: 34%; top: 17px; }
  .main-map { height: 470px; }
  .action-buttons { margin-top: 8px; }
}
@media (max-width: 650px) {
  .title-overlay { left: 28%; right: 4%; top: 15px; }
  .dashboard-subtitle { display: none; }
  .institutional-banner { height: 72px; }
  .dashboard-container { padding-left: 10px; padding-right: 10px; }
}
.profile-chart { height: 330px; }
.composition-chart { height: 420px; }
#breakdown-table .dash-table-container { border-radius: 8px; overflow: hidden; }
@media (max-width: 991px) {
  .profile-chart { height: 300px; }
}
.insight-card { border: 0; border-radius: 14px; color: white; background: linear-gradient(115deg, #202f39, #2e596f 62%, #4299c6); box-shadow: var(--shadow); overflow: hidden; }
.insight-title { font-size: .75rem; text-transform: uppercase; font-weight: 850; letter-spacing: .8px; color: #91d9f5; margin-bottom: 10px; }
.insight-item { font-size: .9rem; line-height: 1.4; padding-left: 12px; border-left: 3px solid var(--iets-red); min-height: 42px; }
.map-shell { position: relative; }
.map-legend { position: absolute; z-index: 900; right: 12px; bottom: 12px; width: 188px; background: rgba(255,255,255,.96); border-radius: 10px; box-shadow: 0 4px 18px rgba(25,52,68,.22); padding: 11px 13px; font-size: .72rem; line-height: 1.65; }
.legend-title { font-weight: 850; color: var(--iets-dark); font-size: .76rem; margin-bottom: 4px; }
.legend-swatch { display: inline-block; width: 15px; height: 11px; margin-right: 7px; border: 1px solid rgba(0,0,0,.08); border-radius: 2px; vertical-align: -1px; }
.legend-note { font-size: .62rem; color: #74838c; line-height: 1.3; border-top: 1px solid #e2e9ed; padding-top: 5px; margin-top: 5px; }
.bubble-legend { left: 12px; right: auto; width: 210px; }
.bubble-sample { display: inline-block; border-radius: 999px; background: rgba(242,61,79,.72); border: 1.5px solid white; box-shadow: 0 0 0 1px rgba(242,61,79,.4); margin: 0 9px 0 4px; vertical-align: middle; }
.bubble-sm { width: 10px; height: 10px; }
.bubble-lg { width: 22px; height: 22px; }
.territory-profile { padding: 2px 3px; }
.profile-row { display: flex; justify-content: space-between; gap: 22px; padding: 12px 4px; border-bottom: 1px solid #e8eef2; font-size: .84rem; }
.profile-row span { color: #6d7b85; }
.profile-row b { text-align: right; color: var(--iets-dark); max-width: 58%; }
.profile-progress-label { font-weight: 800; font-size: .78rem; margin: 15px 4px 7px; color: #596872; }
.profile-progress { height: 22px; border-radius: 999px; }
.detail-accordion .accordion-item { border: 0; border-radius: 14px !important; overflow: hidden; box-shadow: var(--shadow); }
.detail-accordion .accordion-button { font-weight: 800; color: var(--iets-dark); }
@media (max-width: 991px) {
  .main-map, .bubble-map { height: 470px; }
  .map-legend { max-width: 170px; }
}
