:root {
  color-scheme: light;
  --bg: #e8eef7;
  --panel: rgba(246, 249, 253, 0.78);
  --panel-strong: #eef4fb;
  --line: rgba(255, 255, 255, 0.78);
  --ink: #071936;
  --muted: #657895;
  --accent: #18c7b5;
  --blue: #26a9df;
  --danger: #ff666c;
  font-family: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 304px 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.18s ease;
}

.shell.menu-collapsed {
  grid-template-columns: 92px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 20px;
  background: rgba(239, 245, 252, 0.88);
  border-right: 1px solid var(--line);
  box-shadow: inset -1px 0 0 rgba(174, 195, 220, 0.28);
}

.brand-row {
  display: grid;
  grid-template-columns: 1fr 38px;
  gap: 10px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(119, 145, 176, 0.22);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.collapse-menu-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--blue);
  box-shadow: 7px 7px 15px rgba(124, 143, 164, 0.14), -7px -7px 15px rgba(255,255,255,0.8);
  cursor: pointer;
  font-weight: 950;
}

.brand-mark,
.profile-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f5f9ff;
  color: var(--danger);
  box-shadow: 12px 12px 24px rgba(110, 131, 158, 0.22), -10px -10px 20px #fff;
  font-weight: 800;
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand span,
.hero span,
.detail-head span,
.profile-card > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.theme-pill {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: center;
  font-weight: 700;
  box-shadow: 8px 8px 18px rgba(123, 145, 171, 0.12), -8px -8px 18px rgba(255,255,255,0.9);
}

.theme-short {
  display: none;
}

.menu-group {
  margin-bottom: 10px;
}

.menu-title,
.dashboard-link,
.menu-items button,
.hero-action,
.back-button,
.pager button,
.icon-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 7px 7px 15px rgba(124, 143, 164, 0.14), -7px -7px 15px rgba(255,255,255,0.8);
  cursor: pointer;
}

.menu-title {
  display: grid;
  grid-template-columns: 22px 1fr 22px 20px;
  align-items: center;
  width: 100%;
  gap: 8px;
  padding: 10px 12px;
  text-align: left;
  font-weight: 800;
}

.dashboard-link {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  width: 100%;
  gap: 10px;
  margin: 0 0 14px;
  padding: 14px 12px;
  text-align: left;
  font-weight: 850;
}

.menu-collapsed .sidebar {
  padding: 18px 14px;
  overflow-x: hidden;
}

.menu-collapsed .brand-row {
  grid-template-columns: 1fr;
  gap: 12px;
  justify-items: center;
  padding-bottom: 16px;
}

.menu-collapsed .brand {
  justify-content: center;
}

.menu-collapsed .brand div:not(.brand-mark),
.menu-collapsed .theme-full,
.menu-collapsed .dashboard-link > span:not(.icon-glyph),
.menu-collapsed .menu-title > span:not(.icon-glyph),
.menu-collapsed .menu-title small,
.menu-collapsed .menu-title .chev {
  display: none;
}

.menu-collapsed .theme-short {
  display: inline;
}

.menu-collapsed .theme-pill {
  padding: 12px 0;
  margin: 16px 0;
}

.menu-collapsed .dashboard-link,
.menu-collapsed .menu-title {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 0;
  min-height: 48px;
  padding: 12px;
}

.menu-collapsed .dashboard2-link {
  margin-top: 0;
}

.menu-collapsed .icon-glyph {
  min-width: 26px;
}

.dashboard-link.active {
  background: #f8fbff;
  box-shadow: inset 4px 4px 10px rgba(117, 139, 165, 0.14), inset -4px -4px 10px #fff;
}

.dashboard2-link {
  margin-top: -6px;
}

.icon-glyph,
.search-glyph {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 900;
}

.item-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  color: var(--blue);
  font-size: 14px;
}

.menu-title svg,
.menu-title i {
  color: var(--blue);
}

.menu-title small {
  color: var(--blue);
  text-align: center;
}

.chev {
  transform: rotate(-90deg);
  transition: transform 0.18s ease;
}

.chev.open {
  transform: rotate(0deg);
}

.menu-items {
  margin: 8px 0 8px 26px;
  padding-left: 12px;
  border-left: 1px solid rgba(116, 144, 174, 0.25);
}

.menu-items button {
  width: 100%;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  padding: 12px 14px;
  text-align: left;
  font-weight: 750;
}

.menu-items button.active {
  background: #f8fbff;
  color: #03204d;
  box-shadow: inset 4px 4px 10px rgba(117, 139, 165, 0.14), inset -4px -4px 10px #fff;
}

.content {
  padding: 24px;
  min-width: 0;
}

.hero,
.panel,
.detail-head,
.tabs-card,
.profile-card,
.metrics {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 18px 22px 40px rgba(113, 134, 160, 0.18), -10px -10px 26px rgba(255,255,255,0.72);
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 22px;
}

.hero h1,
.detail-head h2 {
  margin: 4px 0 6px;
  font-size: 38px;
  line-height: 1.05;
}

.hero p,
.detail-head p {
  margin: 0;
  color: var(--muted);
}

.hero-action,
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  text-decoration: none;
  font-weight: 800;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
}

.metric {
  padding: 12px;
  border-radius: 8px;
  background: rgba(245, 249, 255, 0.65);
  text-align: center;
}

.metric strong {
  display: block;
  font-size: 24px;
}

.metric span,
.count-box span {
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
}

.panel {
  padding: 16px;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 16px;
  align-items: end;
}

.search-row label > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.82);
  box-shadow: inset 5px 5px 12px rgba(118, 138, 163, 0.13), inset -5px -5px 12px #fff;
}

.search-box svg {
  color: var(--muted);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.count-box {
  min-height: 68px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.82);
}

.count-box strong {
  margin-bottom: -10px;
  font-size: 28px;
}

.table-wrap {
  margin-top: 16px;
  overflow: auto;
  border-radius: 8px;
  background: rgba(249, 252, 255, 0.72);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(107, 135, 166, 0.16);
  text-align: left;
  vertical-align: top;
  max-width: 260px;
  overflow-wrap: anywhere;
}

th {
  font-size: 13px;
  color: var(--ink);
}

td {
  color: #10284d;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--ink);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 18px;
  color: var(--muted);
}

.pager button {
  padding: 12px 16px;
  font-weight: 800;
}

.pager button:disabled {
  cursor: default;
  opacity: 0.45;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  color: var(--muted);
}

.spin {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.detail {
  display: grid;
  gap: 18px;
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
}

.detail-body {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 20px;
}

.profile-card {
  overflow: hidden;
  text-align: center;
}

.profile-gradient {
  display: grid;
  place-items: center;
  height: 145px;
  background: linear-gradient(130deg, #f8efe1, #c8eef8 62%, #eaf2fb);
}

.profile-icon {
  color: var(--blue);
  width: 78px;
  height: 78px;
}

.profile-card h3 {
  margin: 14px 18px 6px;
  font-size: 21px;
}

.profile-card p {
  color: var(--muted);
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
}

.mini-grid div,
.field {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 251, 255, 0.7);
  padding: 12px;
}

.mini-grid span,
.field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mini-grid strong,
.field strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.tabs {
  display: flex;
  border-bottom: 1px solid rgba(113, 140, 170, 0.2);
}

.tabs button {
  min-width: 128px;
  padding: 14px 18px;
  border: 0;
  border-right: 1px solid rgba(113, 140, 170, 0.18);
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tabs button.selected {
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--danger);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.person-location-card {
  grid-column: 2;
  grid-row: 1 / span 4;
  overflow: hidden;
  min-height: 310px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 251, 255, 0.7);
  box-shadow: 6px 8px 14px rgba(113, 134, 160, .1), -6px -6px 14px rgba(255,255,255,.74);
}

.person-location-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 251, 255, 0.82);
}

.person-location-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.person-location-head strong {
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.person-location-map {
  width: 100%;
  height: 258px;
  min-height: 258px;
}

.person-map-pin-icon {
  background: transparent;
  border: 0;
}

.person-map-pin {
  position: relative;
  display: block;
  width: 28px;
  height: 28px;
  margin: 2px auto 0;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(135deg, #ff3048, #d9102e);
  box-shadow: 0 9px 18px rgba(217, 16, 46, .34);
  transform: rotate(-45deg);
}

.person-map-pin::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #fff;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.chart-card,
.insight-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 12%, rgba(38, 169, 223, 0.15), transparent 28%),
    radial-gradient(circle at 92% 0%, rgba(255, 102, 108, 0.12), transparent 30%),
    rgba(246, 249, 253, 0.78);
  box-shadow: 18px 22px 40px rgba(113, 134, 160, 0.18), -10px -10px 26px rgba(255,255,255,0.72);
}

.chart-card.wide,
.insight-card.wide {
  grid-column: span 2;
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 0;
}

.chart-head span,
.insight-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.chart-head h3 {
  margin: 4px 0 0;
  font-size: 20px;
}

.chart-canvas {
  width: 100%;
  height: 340px;
}

.chart-card.wide .chart-canvas {
  height: 380px;
}

.insight-card {
  display: flex;
  min-height: 210px;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
}

.insight-card strong {
  display: block;
  margin: 8px 0;
  font-size: 56px;
  line-height: 1;
}

.insight-card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.signal-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(24,199,181,.2), rgba(38,169,223,.16));
  box-shadow: inset 12px 12px 24px rgba(111, 132, 157, .14), inset -12px -12px 24px rgba(255,255,255,.85);
}

.signal-orbit i {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(24, 199, 181, .36);
}

.signal-orbit i:nth-child(1) {
  width: 118px;
  height: 118px;
}

.signal-orbit i:nth-child(2) {
  width: 86px;
  height: 86px;
  border-color: rgba(255, 102, 108, .32);
}

.signal-orbit i:nth-child(3) {
  width: 142px;
  height: 142px;
  border-color: rgba(38, 169, 223, .28);
}

.signal-orbit b {
  font-size: 30px;
}

.program-dashboard {
  display: grid;
  gap: 14px;
}

.program-topbar,
.kpi-ribbon,
.program-section,
.coverage-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.84);
  box-shadow: 14px 18px 34px rgba(113, 134, 160, 0.16), -8px -8px 22px rgba(255,255,255,0.78);
}

.program-topbar {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(120px, .7fr)) 1.2fr;
  gap: 14px;
  align-items: end;
  padding: 14px;
}

.date-filter,
.select-filter,
.updated {
  display: grid;
  gap: 6px;
}

.date-filter {
  grid-template-columns: repeat(2, 1fr);
}

.date-filter span,
.select-filter span,
.updated span {
  grid-column: 1 / -1;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.date-filter button,
.select-filter select {
  height: 36px;
  border: 1px solid rgba(101, 120, 149, .18);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.updated {
  text-align: right;
  color: var(--ink);
  font-size: 12px;
}

.kpi-ribbon {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.kpi-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 110px;
  padding: 12px;
  border-right: 1px solid rgba(101, 120, 149, .12);
}

.kpi-card span,
.program-metric span,
.sis-wide span {
  display: block;
  color: #061846;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.kpi-card strong {
  display: block;
  margin: 4px 0;
  font-size: 28px;
}

.kpi-card em,
.program-metric em,
.sis-wide strong {
  display: block;
  color: #008b20;
  font-style: normal;
  font-weight: 900;
}

.kpi-card small,
.program-metric small {
  color: var(--ink);
  font-size: 12px;
}

.kpi-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  font-size: 13px;
  font-weight: 950;
}

.kpi-card.blue .kpi-icon,
.metric-symbol.blue { color: #0057c8; }
.kpi-card.teal .kpi-icon,
.metric-symbol.teal { color: #0a8c96; }
.kpi-card.red .kpi-icon { color: #ff3348; }
.kpi-card.purple .kpi-icon,
.metric-symbol.purple { color: #5b2abf; }
.kpi-card.orange .kpi-icon,
.metric-symbol.orange { color: #ff650f; }
.kpi-card.cyan .kpi-icon { color: #067f91; }
.metric-symbol.green { color: #139929; }

.program-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.program-section {
  overflow: hidden;
}

.program-section header {
  padding: 10px 14px;
  color: #fff;
  font-size: 16px;
  font-weight: 950;
  text-transform: uppercase;
}

.program-section.blue header { background: linear-gradient(90deg, #0057c8, #0977de); }
.program-section.green header { background: linear-gradient(90deg, #0c8d21, #20a63d); }
.program-section.purple header { background: linear-gradient(90deg, #4b24a4, #7336d4); }
.program-section.orange header { background: linear-gradient(90deg, #ff4d00, #ff870e); }
.program-section.teal header { background: linear-gradient(90deg, #07808d, #16aaa7); }
.program-section.gold header { background: linear-gradient(90deg, #e09f00, #efb900); }

.program-metrics,
.sis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.program-metric {
  display: grid;
  grid-template-columns: 42px 1fr 82px;
  min-height: 126px;
  gap: 8px;
  align-items: center;
  padding: 14px;
  border-right: 1px solid rgba(101, 120, 149, .12);
  border-bottom: 1px solid rgba(101, 120, 149, .12);
}

.metric-symbol {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 950;
}

.program-metric strong {
  display: block;
  margin: 5px 0;
  font-size: 24px;
}

.metric-viz,
.mini-chart {
  width: 82px;
  height: 76px;
}

.sis-wide {
  grid-column: span 2;
  padding: 14px;
  border-top: 1px solid rgba(101, 120, 149, .12);
}

.sis-wide strong {
  margin: 4px 0;
  font-size: 26px;
}

.sis-wide .mini-chart {
  width: 100%;
  height: 96px;
}

.strategic-list {
  display: grid;
  gap: 0;
}

.strategic-row {
  display: grid;
  grid-template-columns: 1.7fr .6fr .7fr 1.3fr;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(101, 120, 149, .14);
}

.strategic-row span {
  color: #061846;
  font-size: 13px;
  font-weight: 850;
}

.strategic-row strong {
  color: #008b20;
  font-size: 18px;
}

.strategic-row small {
  color: #061846;
}

.strategic-row div {
  height: 8px;
  border-radius: 999px;
  background: rgba(101, 120, 149, .18);
  overflow: hidden;
}

.strategic-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #07921f, #68bd32);
}

.bottom-analytics {
  display: grid;
  grid-template-columns: 1.1fr 1.8fr 1.2fr;
  gap: 12px;
}

.program-wide {
  grid-column: auto;
}

.coverage-card {
  padding: 16px;
}

.coverage-card h3 {
  margin: 0 0 14px;
  font-size: 15px;
  text-transform: uppercase;
}

.coverage-map {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  min-height: 190px;
  align-content: center;
  padding: 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(38,169,223,.08), rgba(255,255,255,.62));
}

.coverage-map span {
  aspect-ratio: 1;
  border-radius: 35% 55% 42% 48%;
  background: color-mix(in srgb, #dce9f8 calc((1 - var(--level)) * 100%), #2478d4 calc(var(--level) * 100%));
  border: 1px solid rgba(24, 80, 150, .18);
  transform: rotate(calc(var(--level) * 18deg));
  animation: tileIn .5s ease both;
  animation-delay: var(--delay);
}

@keyframes tileIn {
  from { opacity: 0; transform: scale(.82); }
  to { opacity: 1; }
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: #061846;
  font-size: 11px;
}

.legend i {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #2478d4;
}

.pill-dashboard {
  display: grid;
  gap: 18px;
}

.pill-hero,
.pill-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 8%, rgba(24,199,181,.13), transparent 26%),
    radial-gradient(circle at 92% 0%, rgba(255,102,108,.10), transparent 28%),
    rgba(248, 251, 255, .84);
  box-shadow: 18px 22px 40px rgba(113, 134, 160, 0.18), -10px -10px 26px rgba(255,255,255,0.72);
}

.pill-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 170px;
  padding: 24px;
}

.pill-hero span,
.pill-group header span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pill-hero h2 {
  margin: 6px 0;
  font-size: 34px;
}

.pill-hero p {
  margin: 0;
  color: var(--muted);
}

.pill-orbit {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, #18c7b5, #26a9df, #6c7ae0, #ff666c, #18c7b5);
  color: white;
  box-shadow: 0 20px 40px rgba(38, 169, 223, .25);
}

.pill-orbit b {
  margin-bottom: -28px;
  font-size: 42px;
}

.pill-orbit small {
  font-weight: 900;
}

.pill-group {
  overflow: hidden;
}

.pill-group header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  color: #fff;
}

.pill-group.blue header { background: linear-gradient(90deg, #0057c8, #26a9df); }
.pill-group.green header { background: linear-gradient(90deg, #139929, #4ecca3); }
.pill-group.purple header { background: linear-gradient(90deg, #5b2abf, #8b4de8); }
.pill-group.orange header { background: linear-gradient(90deg, #ff650f, #f1a33b); }
.pill-group.teal header { background: linear-gradient(90deg, #0a8c96, #18c7b5); }
.pill-group.gold header { background: linear-gradient(90deg, #e2a600, #75b843); }

.pill-group header span,
.pill-group header strong {
  color: #fff;
}

.pill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.indicator-pill {
  position: relative;
  overflow: hidden;
  min-height: 246px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(239,246,255,.76)),
    var(--panel);
  box-shadow: 10px 14px 26px rgba(105, 126, 153, .16), -8px -8px 20px rgba(255,255,255,.84);
}

.indicator-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .16;
  background: radial-gradient(circle at 50% 0%, currentColor, transparent 48%);
  pointer-events: none;
}

.indicator-pill.blue { color: #0057c8; }
.indicator-pill.green { color: #139929; }
.indicator-pill.purple { color: #5b2abf; }
.indicator-pill.orange { color: #ff650f; }
.indicator-pill.teal { color: #0a8c96; }
.indicator-pill.gold { color: #b48900; }

.pill-main {
  display: grid;
  place-items: center;
  min-height: 94px;
  text-align: center;
}

.pill-code {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: currentColor;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.pill-main strong {
  margin: 6px 0 0;
  color: #071936;
  font-size: 32px;
  line-height: 1;
}

.pill-main em {
  max-width: 88%;
  color: #071936;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.pill-progress {
  height: 8px;
  margin: 6px 16px 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(101, 120, 149, .18);
}

.pill-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
}

.pill-meta,
.pill-variables,
.pill-formula,
.pill-columns {
  margin: 0 18px 8px;
  color: #071936;
}

.pill-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.pill-meta span,
.pill-variables span,
.pill-formula span,
.pill-columns span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.pill-variables p {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 6px;
  margin: 2px 0 0;
  color: #10284d;
  font-size: 12px;
  line-height: 1.25;
}

.pill-variables b {
  font-weight: 900;
}

.assistant-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  height: calc(100vh - 333px);
  min-height: 360px;
  overflow: hidden;
}

.assistant-shell.empty {
  height: calc(100vh - 333px);
}

.assistant-chat {
  overflow-y: auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 16% 10%, rgba(38,169,223,.14), transparent 32%),
    radial-gradient(circle at 88% 8%, rgba(24,199,181,.14), transparent 30%),
    rgba(248, 251, 255, .82);
  box-shadow: 18px 22px 40px rgba(113, 134, 160, 0.18), -10px -10px 26px rgba(255,255,255,0.72);
}

.assistant-empty {
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  max-width: 560px;
  min-height: 220px;
  text-align: center;
  color: var(--muted);
}

.assistant-empty span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #18c7b5, #26a9df);
  color: #fff;
  font-weight: 950;
  box-shadow: 12px 16px 28px rgba(38, 169, 223, .22);
}

.assistant-empty h2 {
  margin: 18px 0 8px;
  color: var(--ink);
  font-size: 32px;
}

.assistant-message {
  display: flex;
}

.assistant-message.user {
  justify-content: flex-end;
}

.assistant-message.assistant {
  justify-content: flex-start;
}

.assistant-bubble {
  max-width: min(920px, 86%);
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 255, .86);
  color: #10284d;
  box-shadow: 8px 10px 20px rgba(113, 134, 160, .12), -6px -6px 14px rgba(255,255,255,.76);
}

.assistant-message.user .assistant-bubble {
  border-color: rgba(24, 199, 181, .34);
  background: linear-gradient(135deg, rgba(24,199,181,.16), rgba(38,169,223,.12)), rgba(248,251,255,.9);
}

.assistant-message.error .assistant-bubble {
  border-color: rgba(255, 77, 95, .35);
}

.ai-text {
  display: grid;
  gap: 10px;
}

.ai-text p {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

.ai-text ul,
.ai-text ol {
  margin: 0;
  padding-left: 22px;
  line-height: 1.5;
}

.ai-text strong {
  font-weight: 950;
}

.ai-text em {
  font-style: italic;
}

.ai-text code {
  display: inline;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(7, 25, 54, .08);
  color: #071936;
  white-space: normal;
}

.assistant-bubble details {
  margin-top: 12px;
}

.assistant-bubble summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.assistant-bubble code {
  display: block;
  overflow-x: auto;
  margin-top: 8px;
  padding: 12px;
  border-radius: 8px;
  background: #071936;
  color: #dff8ff;
  white-space: pre;
}

.assistant-thinking {
  color: var(--muted);
  font-weight: 800;
}

.assistant-composer {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 255, .86);
  box-shadow: 10px 14px 26px rgba(113, 134, 160, .14), -8px -8px 18px rgba(255,255,255,.8);
}

.assistant-composer textarea {
  resize: none;
  min-height: 58px;
  max-height: 110px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 251, 255, .8);
  color: var(--ink);
  font: inherit;
  padding: 11px 13px;
  outline: none;
}

.assistant-composer textarea:focus {
  border-color: rgba(24, 199, 181, .45);
  box-shadow: 0 0 0 3px rgba(24,199,181,.12);
}

.assistant-composer button {
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #18c7b5, #26a9df);
  color: #fff;
  font-weight: 950;
  box-shadow: 8px 12px 22px rgba(38, 169, 223, .22);
}

.assistant-composer button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.assistant-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.assistant-chart-card {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(24,199,181,.12), transparent 34%),
    rgba(248, 251, 255, .78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

.assistant-chart-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 0;
}

.assistant-chart-title span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.assistant-chart-title strong {
  color: var(--ink);
  font-size: 15px;
}

.assistant-chart-canvas {
  width: 100%;
  height: 310px;
}

.assistant-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  background: rgba(248, 251, 255, .8);
}

.assistant-table th,
.assistant-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(113, 140, 170, .18);
  text-align: left;
  vertical-align: top;
}

.assistant-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.assistant-table td {
  color: #10284d;
  font-size: 13px;
}

.heat-shell {
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: calc(100vh - 230px);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(248, 251, 255, .82);
  box-shadow: 18px 22px 40px rgba(113, 134, 160, 0.18), -10px -10px 26px rgba(255,255,255,0.72);
}

.heat-panel {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 77, 95, .12), transparent 30%),
    radial-gradient(circle at 84% 6%, rgba(11, 143, 211, .15), transparent 34%),
    rgba(239, 245, 252, .96);
  border-right: 1px solid rgba(101, 120, 149, .18);
}

.heat-card-head,
.heat-stats div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 255, .82);
  box-shadow: 8px 10px 22px rgba(113, 134, 160, .12), -8px -8px 18px rgba(255,255,255,.82);
}

.heat-card-head {
  padding: 18px;
}

.heat-card-head span,
.heat-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.heat-card-head h2 {
  margin: 7px 0;
  font-size: 26px;
}

.heat-card-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.heat-selector {
  display: grid;
  gap: 9px;
}

.heat-selector button {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 255, .74);
  color: #10284d;
  font-weight: 900;
  text-align: left;
  box-shadow: 6px 8px 14px rgba(113, 134, 160, .1), -6px -6px 14px rgba(255,255,255,.74);
}

.heat-selector button.selected {
  border-color: color-mix(in srgb, var(--layer-color) 58%, #ffffff);
  box-shadow: inset 4px 0 0 var(--layer-color), 8px 10px 20px rgba(64, 87, 115, .12);
}

.heat-selector i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--layer-color);
  box-shadow: 0 4px 10px color-mix(in srgb, var(--layer-color) 35%, transparent);
}

.heat-selector strong {
  color: var(--muted);
  font-size: 12px;
}

.heat-stats {
  display: grid;
  gap: 10px;
}

.heat-stats div {
  padding: 13px 14px;
}

.heat-stats strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 22px;
}

.heat-map-wrap {
  position: relative;
  min-height: 620px;
}

.heat-map {
  min-height: 620px;
}

.heat-scale {
  position: absolute;
  z-index: 500;
  right: 16px;
  bottom: 18px;
  display: grid;
  grid-template-columns: auto 150px auto;
  gap: 9px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 8px;
  background: rgba(248, 251, 255, .92);
  box-shadow: 10px 14px 26px rgba(64, 87, 115, .18);
}

.heat-scale span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.heat-scale i {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--heat-a), var(--heat-b), var(--heat-c), var(--heat-d));
}

.map-shell {
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: calc(100vh - 230px);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(248, 251, 255, .82);
  box-shadow: 18px 22px 40px rgba(113, 134, 160, 0.18), -10px -10px 26px rgba(255,255,255,0.72);
}

.map-info {
  position: relative;
  z-index: 2;
  padding: 18px;
  background:
    radial-gradient(circle at 18% 8%, rgba(38,169,223,.16), transparent 30%),
    rgba(239, 245, 252, .96);
  border-right: 1px solid rgba(101, 120, 149, .18);
  overflow-y: auto;
}

.map-canvas-wrap {
  position: relative;
  min-height: 620px;
}

.leaflet-map {
  width: 100%;
  height: 100%;
  min-height: 620px;
}

.map-toolbar {
  position: absolute;
  z-index: 500;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  min-width: 138px;
  min-height: 70px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 8px;
  background: rgba(248, 251, 255, .9);
  box-shadow: 10px 14px 26px rgba(64, 87, 115, .18);
}

.map-toolbar strong {
  font-size: 26px;
}

.map-toolbar span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.map-legend {
  position: absolute;
  z-index: 500;
  right: 16px;
  bottom: 18px;
  display: grid;
  gap: 8px;
  width: 190px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 8px;
  background: rgba(248, 251, 255, .92);
  box-shadow: 10px 14px 26px rgba(64, 87, 115, .18);
}

.map-legend strong {
  color: var(--ink);
  font-size: 12px;
  text-transform: uppercase;
}

.map-legend div {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px;
  align-items: center;
  color: #10284d;
  font-size: 12px;
  font-weight: 800;
}

.map-legend i {
  display: block;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--legend-color);
  box-shadow: 0 4px 10px rgba(64, 87, 115, .2);
}

.map-legend b {
  color: var(--muted);
  font-size: 12px;
}

.map-pin-icon {
  background: transparent;
  border: 0;
}

.map-pin {
  position: relative;
  display: block;
  width: 25px;
  height: 25px;
  margin: 2px auto 0;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: var(--pin-color);
  box-shadow: 0 2px 4px rgba(28, 45, 68, .18);
  transform: rotate(-45deg);
}

.map-pin::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #fff;
}

.map-cluster-icon {
  background: transparent;
  border: 0;
}

.map-cluster-icon span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 3px solid #fff;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.26) 0 34%, transparent 35%),
    var(--cluster-color);
  color: #fff;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 8px 20px rgba(28, 45, 68, .24);
}

.map-cluster-icon.medium span {
  width: 46px;
  height: 46px;
  font-size: 15px;
}

.map-cluster-icon.large span {
  width: 52px;
  height: 52px;
  font-size: 16px;
}

.leaflet-marker-icon.leaflet-marker-draggable,
.leaflet-marker-icon {
  will-change: transform;
}

.leaflet-cluster-spider-leg {
  stroke: rgba(7, 25, 54, .35);
  stroke-width: 1.5;
}

.map-card {
  display: grid;
  gap: 14px;
}

.map-card-head {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 255, .82);
  box-shadow: 8px 10px 22px rgba(113, 134, 160, .14), -8px -8px 18px rgba(255,255,255,.82);
}

.map-card-head span,
.map-fields span,
.map-empty span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.map-card-head h2 {
  margin: 6px 0;
  font-size: 26px;
}

.map-card-head p {
  margin: 0;
  color: var(--muted);
}

.map-person {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 255, .78);
}

.map-avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #18c7b5, #26a9df);
  color: #fff;
  font-weight: 950;
  box-shadow: 8px 10px 18px rgba(38, 169, 223, .24);
}

.map-person strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.map-person small {
  color: var(--muted);
}

.map-fields {
  display: grid;
  gap: 10px;
}

.map-fields div {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 255, .72);
  box-shadow: 6px 8px 14px rgba(113, 134, 160, .1), -6px -6px 14px rgba(255,255,255,.74);
}

.map-fields strong {
  display: block;
  margin-top: 5px;
  color: #10284d;
  overflow-wrap: anywhere;
}

.map-empty {
  display: grid;
  place-items: center;
  min-height: 260px;
  text-align: center;
}

.map-empty strong {
  font-size: 44px;
}

.leaflet-control-zoom a {
  color: #071936;
}

.leaflet-container {
  font-family: "Segoe UI", Arial, sans-serif;
}

.pill-meta b {
  text-align: right;
}

.pill-formula p,
.pill-columns p {
  margin: 2px 0 0;
  color: #10284d;
  font-size: 12px;
  line-height: 1.25;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .metrics,
  .dashboard-grid,
  .detail-body,
  .search-row,
  .field-grid,
  .assistant-composer {
    grid-template-columns: 1fr;
  }

  .chart-card.wide,
  .insight-card.wide,
  .program-topbar,
  .kpi-ribbon,
  .program-sections,
  .bottom-analytics,
  .pill-grid {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .insight-card,
  .pill-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .map-shell,
  .heat-shell {
    grid-template-columns: 1fr;
  }

  .map-info,
  .heat-panel {
    max-height: none;
  }

  .heat-scale {
    left: 14px;
    right: 14px;
    grid-template-columns: auto 1fr auto;
  }
}
