:root {
  color-scheme: light;
  --ink: #17231f;
  --muted: #5f7069;
  --soft-muted: #7c8c85;
  --canvas: #f2f6f2;
  --surface: #ffffff;
  --soft: #eaf2eb;
  --line: #d6e1d8;
  --line-strong: #b8c9bd;
  --green: #147a52;
  --green-dark: #0e5d3f;
  --lime: #a5cb54;
  --blue: #26708b;
  --blue-soft: #e4f0f3;
  --orange: #ca7227;
  --orange-soft: #fff1e4;
  --red: #bd3c3c;
  --red-soft: #fdeaea;
  --yellow: #c79527;
  --yellow-soft: #fff7df;
  --shadow: 0 10px 28px rgba(23, 35, 31, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.45;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 10px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 7px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; line-height: 1.2; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.main-nav { display: flex; align-items: center; gap: 3px; }
.main-nav a {
  padding: 8px 11px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.main-nav a:hover, .main-nav a.is-active { border-color: var(--green); color: var(--green-dark); }

.header-status { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.role-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--soft); color: var(--green-dark); font-size: 11px; font-weight: 800; white-space: nowrap; }
.role-chip svg { width: 13px; height: 13px; }
.data-state { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.data-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.data-state.is-live i { background: var(--green); box-shadow: 0 0 0 4px rgba(20, 122, 82, 0.12); }
.data-state.is-error i { background: var(--orange); }

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
}
.icon-button svg { width: 17px; height: 17px; }
.icon-button:hover { border-color: var(--green); color: var(--green); background: var(--soft); }
.icon-button.is-spinning svg { animation: spin 0.8s linear infinite; }

.workspace { display: grid; gap: 22px; max-width: 1600px; margin: 0 auto; padding: 26px 32px 52px; }

.status-band {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding: 4px 0 0;
}
.eyebrow { margin: 0 0 5px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: 0; }
.status-title h1, .panel-heading h2, .section-intro h2 { margin: 0; letter-spacing: 0; }
.status-title h1 { font-size: 28px; line-height: 1.2; }
.mission-subtitle { margin: 7px 0 0; color: var(--green-dark); font-size: 14px; font-weight: 700; }
.updated-copy { margin: 7px 0 0; color: var(--muted); font-size: 13px; }

.weather-readout { display: grid; grid-template-columns: repeat(4, minmax(100px, 1fr)); min-width: 500px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: 0 4px 18px rgba(23, 35, 31, 0.04); }
.weather-readout div { padding: 10px 16px; border-left: 1px solid var(--line); }
.weather-readout div:first-child { border-left: 0; }
.weather-readout span, .weather-readout strong { display: block; }
.weather-readout span { color: var(--muted); font-size: 11px; }
.weather-readout strong { margin-top: 2px; font-size: 19px; line-height: 1.2; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric-grid article { display: flex; align-items: center; gap: 11px; min-height: 91px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.metric-grid article > div { min-width: 0; }
.metric-grid article span:not(.metric-icon), .metric-grid small { display: block; color: var(--muted); font-size: 12px; }
.metric-grid strong { display: block; margin: 2px 0; font-size: 22px; line-height: 1.1; }
.metric-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 6px; }
.metric-icon svg { width: 18px; height: 18px; }
.tone-red { background: var(--red-soft); color: var(--red); }
.tone-orange { background: var(--orange-soft); color: var(--orange); }
.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-green { background: var(--soft); color: var(--green); }

.shift-strip { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 7px; background: var(--surface); }
.shift-copy { min-width: 0; }.shift-copy .eyebrow { margin-bottom: 2px; }.shift-copy strong, .shift-copy span { display: block; }.shift-copy strong { font-size: 14px; }.shift-copy span { margin-top: 3px; color: var(--muted); font-size: 12px; }.shift-actions { display: flex; flex: 0 0 auto; gap: 8px; }.shift-actions a { text-decoration: none; }.secondary-command { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; border: 1px solid var(--line-strong); border-radius: 5px; padding: 8px 12px; background: var(--surface); color: var(--green-dark); font-size: 12px; font-weight: 800; }.secondary-command:hover { border-color: var(--green); background: var(--soft); }.secondary-command svg { width: 15px; height: 15px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.74fr) minmax(320px, 0.76fr); gap: 16px; align-items: stretch; }
.map-panel, .insight-panel, .panel { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: 0 5px 18px rgba(23, 35, 31, 0.04); }
.map-panel { padding: 17px; }
.insight-panel { padding: 20px; }
.panel { padding: 18px; }
.panel-heading, .section-intro, .section-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.panel-heading h2, .section-intro h2 { font-size: 18px; line-height: 1.3; }
.map-heading { align-items: center; }
.map-actions { display: flex; gap: 7px; }

.segmented-control { display: inline-flex; margin: 15px 0 12px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--canvas); }
.segmented-control button, .task-filters button { border: 0; border-radius: 4px; padding: 7px 10px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.segmented-control button:hover, .task-filters button:hover { color: var(--green-dark); }
.segmented-control button.is-selected, .task-filters button.is-selected { background: var(--surface); color: var(--green-dark); box-shadow: 0 1px 4px rgba(23, 35, 31, 0.12); }
.map-ai-explanation { margin: 0 0 7px; color: var(--green-dark); font-size: 12px; font-weight: 700; line-height: 1.55; }.map-dimensions { margin: 0 0 12px; padding-left: 9px; border-left: 2px solid var(--blue); color: var(--muted); font-size: 11px; line-height: 1.55; }.map-dimensions strong { color: var(--blue); }

.three-map { position: relative; height: 480px; overflow: hidden; border: 1px solid #c9d8cc; border-radius: 6px; background: #e9f0ea; }
.three-map canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.three-map canvas:active { cursor: grabbing; }
.map-labels { position: absolute; inset: 0; pointer-events: none; }
.map-label { position: absolute; transform: translate(-50%, -50%); padding: 3px 5px; border: 1px solid rgba(255,255,255,0.7); border-radius: 3px; background: rgba(21, 35, 28, 0.72); color: #fff; font-size: 10px; font-weight: 700; white-space: nowrap; opacity: 0; transition: opacity 160ms ease; }
.map-label.is-visible { opacity: 1; }
.map-hint { position: absolute; right: 9px; bottom: 9px; display: flex; align-items: center; gap: 5px; padding: 6px 8px; border: 1px solid rgba(255,255,255,0.6); border-radius: 4px; background: rgba(255,255,255,0.83); color: var(--muted); font-size: 11px; pointer-events: none; }
.map-hint svg { width: 13px; height: 13px; }
.map-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.map-footer p { margin: 0; color: var(--soft-muted); font-size: 11px; }
.risk-legend { display: flex; flex-wrap: wrap; gap: 9px; }
.risk-legend span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; }
.risk-legend i { width: 8px; height: 8px; border-radius: 50%; }
.risk-legend .low { background: var(--green); }.risk-legend .moderate { background: var(--yellow); }.risk-legend .high { background: var(--orange); }.risk-legend .severe { background: var(--red); }

.risk-badge { display: inline-flex; align-items: center; min-height: 27px; padding: 4px 8px; border-radius: 4px; background: var(--yellow-soft); color: #83640c; font-size: 12px; font-weight: 800; }
.risk-badge.is-severe { background: var(--red-soft); color: var(--red); }.risk-badge.is-high { background: var(--orange-soft); color: var(--orange); }.risk-badge.is-low { background: var(--soft); color: var(--green-dark); }
.score-block { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 19px 0 14px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.score-block span, .score-block small { color: var(--muted); font-size: 12px; }
.score-block strong { display: inline-block; margin-top: 3px; color: var(--green-dark); font-size: 48px; line-height: 0.92; }
.score-detail { display: grid; justify-items: end; gap: 4px; padding-bottom: 4px; text-align: right; }.score-detail span { color: var(--ink); font-weight: 800; }
.district-summary { min-height: 63px; margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.signal-list { display: grid; gap: 8px; }
.signal { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.signal:last-child { border-bottom: 0; }.signal-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }.signal-dot.warning { background: var(--orange); }.signal-dot.critical { background: var(--red); }
.signal strong { font-size: 12px; }.signal span { color: var(--muted); font-size: 11px; }.signal b { font-size: 12px; }
.analysis-label { margin: 4px 0 0; color: var(--soft-muted); font-size: 11px; font-weight: 800; }
.panel-section { margin-top: 19px; padding-top: 16px; border-top: 1px solid var(--line); }.section-row { align-items: center; }.section-row h3 { margin: 0; font-size: 13px; }.text-button { padding: 0; border: 0; background: transparent; color: var(--green); font-size: 12px; font-weight: 800; }.text-button:hover { text-decoration: underline; }
.recommendation-list { display: grid; gap: 9px; margin: 12px 0 0; padding: 0; list-style: none; counter-reset: recommendation; }.recommendation-list li { display: grid; grid-template-columns: 21px 1fr; gap: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; counter-increment: recommendation; }.recommendation-list li::before { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; background: var(--soft); color: var(--green-dark); content: counter(recommendation); font-size: 11px; font-weight: 800; }

.analysis-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }.source-tag, .queue-count { padding: 4px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }.forecast-stat { display: flex; align-items: baseline; gap: 8px; margin: 17px 0 8px; }.forecast-stat strong { color: var(--green-dark); font-size: 30px; line-height: 1; }.forecast-stat span { color: var(--muted); font-size: 12px; }.forecast-chart { position: relative; height: 148px; overflow: hidden; border-bottom: 1px solid var(--line); background-image: linear-gradient(to bottom, transparent 49%, var(--line) 50%, transparent 51%); }.forecast-chart svg { width: 100%; height: 100%; overflow: visible; }.forecast-axis { display: flex; justify-content: space-between; padding-top: 7px; color: var(--soft-muted); font-size: 10px; }
.chart-empty, .empty-state { margin: 0; color: var(--soft-muted); font-size: 12px; line-height: 1.55; }.chart-empty { display: grid; height: 100%; place-items: center; }.empty-state { padding: 15px 3px; }
.district-list { display: grid; max-height: 233px; margin-top: 13px; overflow: auto; }.district-row { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 9px; width: 100%; padding: 9px 2px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }.district-row:last-child { border-bottom: 0; }.district-row:hover, .district-row.is-active { background: #f5f9f5; }.district-row .row-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }.district-row .row-dot.is-low { background: var(--green); }.district-row .row-dot.is-high { background: var(--orange); }.district-row .row-dot.is-severe { background: var(--red); }.district-row strong, .district-row small { display: block; }.district-row strong { font-size: 12px; }.district-row small { margin-top: 1px; color: var(--muted); font-size: 10px; }.district-row b { font-size: 13px; }

.operations-section, .data-section { padding-top: 6px; scroll-margin-top: 82px; }.section-intro { align-items: center; margin-bottom: 13px; }.command-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; border: 1px solid var(--green); border-radius: 5px; padding: 8px 12px; background: var(--green); color: #fff; font-size: 13px; font-weight: 800; }.command-button:hover { border-color: var(--green-dark); background: var(--green-dark); }.command-button svg { width: 15px; height: 15px; }
.operations-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr) minmax(280px, 0.7fr); gap: 16px; align-items: start; }.task-filters { display: flex; width: fit-content; margin-bottom: 10px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--canvas); }.task-list { display: grid; }.task-item { display: grid; grid-template-columns: 20px 1fr auto; align-items: start; gap: 10px; padding: 13px 3px; border-bottom: 1px solid var(--line); }.task-item:last-child { border-bottom: 0; }.task-item button { display: grid; width: 20px; height: 20px; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: #fff; }.task-item button svg { width: 13px; height: 13px; }.task-item.is-done button { border-color: var(--green); background: var(--green); }.task-item.is-done strong, .task-item.is-done p { color: var(--soft-muted); text-decoration: line-through; }.task-item strong { display: block; font-size: 13px; }.task-item p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }.task-meta { display: grid; justify-items: end; gap: 4px; }.task-meta small { color: var(--soft-muted); font-size: 10px; white-space: nowrap; }.task-priority { padding: 3px 5px; border-radius: 3px; background: var(--soft); color: var(--green-dark); font-size: 10px; font-weight: 800; }.task-priority.high { background: var(--orange-soft); color: var(--orange); }.task-priority.severe { background: var(--red-soft); color: var(--red); }
.report-form { display: grid; gap: 11px; margin-top: 14px; }.report-form label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 800; }.form-row { display: grid; grid-template-columns: 1fr 0.7fr; gap: 10px; }.report-form select, .report-form textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; color: var(--ink); padding: 8px; font-size: 12px; }.report-form select:focus, .report-form textarea:focus { outline: 2px solid rgba(20, 122, 82, 0.16); border-color: var(--green); }.report-form textarea { min-height: 74px; resize: vertical; }.report-form .command-button { width: 100%; }
.activity-feed { display: grid; max-height: 320px; overflow: auto; margin-top: 13px; }.activity { position: relative; padding: 0 0 15px 15px; border-left: 1px solid var(--line); }.activity::before { position: absolute; top: 3px; left: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); content: ""; }.activity.warning::before { background: var(--orange); }.activity strong, .activity small { display: block; }.activity strong { font-size: 11px; line-height: 1.45; }.activity small { margin-top: 3px; color: var(--soft-muted); font-size: 10px; }

.data-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }.data-grid article { display: grid; grid-template-columns: 33px 1fr; gap: 10px; padding: 17px 2px; border-top: 1px solid var(--line); }.data-grid article > svg { width: 21px; height: 21px; color: var(--blue); }.data-grid h3 { margin: 0; font-size: 14px; }.data-grid p { min-height: 54px; margin: 5px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.55; }.data-grid a { color: var(--green); font-size: 12px; font-weight: 800; text-decoration: none; }.data-grid a:hover { text-decoration: underline; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 40; max-width: min(360px, calc(100vw - 48px)); transform: translateY(16px); padding: 10px 13px; border-radius: 5px; background: var(--ink); color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity 160ms ease, transform 160ms ease; }.toast.is-visible { transform: translateY(0); opacity: 1; }
.map-unavailable { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; background: rgba(234, 242, 235, 0.95); color: var(--muted); font-size: 13px; text-align: center; }

.care-section { padding-top: 6px; scroll-margin-top: 82px; }
.care-pulse { display: flex; align-items: center; gap: 8px; }
.care-pulse span { display: inline-flex; align-items: baseline; gap: 3px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 11px; }
.care-pulse b { color: var(--ink); font-size: 14px; }
.care-grid { display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(320px, 0.86fr); gap: 16px; align-items: start; }
.privacy-note { display: flex; align-items: flex-start; gap: 7px; margin: 13px 0; padding: 9px 10px; border-left: 3px solid var(--blue); background: var(--blue-soft); color: #466976; font-size: 11px; line-height: 1.5; }
.privacy-note svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--blue); }
.resident-profile { margin: 0 0 13px; padding: 11px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }.profile-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }.profile-heading .eyebrow { margin-bottom: 3px; color: var(--blue); }.profile-heading h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; }.profile-simulation { padding: 2px 5px; border: 1px solid var(--line); border-radius: 3px; color: var(--soft-muted); font-size: 9px; font-weight: 800; }.profile-risk { display: inline-flex; align-items: center; padding: 4px 6px; border-radius: 3px; background: var(--red-soft); color: var(--red); font-size: 10px; font-weight: 800; white-space: nowrap; }.profile-risk.is-confirmed { background: var(--soft); color: var(--green-dark); }.profile-identity { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 8px; }.profile-identity span { color: var(--soft-muted); font-size: 10px; }.profile-identity b { margin-left: 3px; color: var(--ink); font-weight: 800; }.profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }.profile-grid > div { min-width: 0; }.profile-grid span { color: var(--soft-muted); font-size: 10px; font-weight: 800; }.profile-grid p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.care-filters { display: flex; flex-wrap: wrap; width: fit-content; margin-bottom: 8px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--canvas); }
.care-filters button { border: 0; border-radius: 4px; padding: 7px 9px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; }
.care-filters button:hover { color: var(--green-dark); }
.care-filters button.is-selected { background: var(--surface); color: var(--green-dark); box-shadow: 0 1px 4px rgba(23, 35, 31, 0.12); }
.care-list { display: grid; max-height: 415px; overflow: auto; }
.care-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 12px 3px; border-bottom: 1px solid var(--line); }
.care-item:last-child { border-bottom: 0; }
.care-item.is-selected { background: #f5f9f5; }
.care-item-main { display: grid; grid-template-columns: 8px 1fr; gap: 8px; min-width: 0; text-align: left; }
.care-indicator { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--yellow); }
.care-indicator.service { background: var(--orange); }
.care-indicator.confirmed { background: var(--green); }
.care-item strong, .care-item small { display: block; }
.care-item strong { font-size: 12px; }
.care-item small { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.care-item-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.care-item-meta span { padding: 3px 5px; border-radius: 3px; background: var(--soft); color: var(--green-dark); font-size: 10px; font-weight: 700; }
.care-item-meta span.status-service { background: var(--orange-soft); color: var(--orange); }
.care-item-meta span.status-attention { background: var(--yellow-soft); color: #81620a; }
.care-actions { display: flex; align-items: center; align-self: center; gap: 6px; }
.care-actions button { border-radius: 4px; padding: 6px 8px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.care-confirm { border: 1px solid var(--line-strong); background: var(--surface); color: var(--green-dark); }
.care-confirm:hover { border-color: var(--green); background: var(--soft); }
.care-match { border: 1px solid var(--green); background: var(--green); color: #fff; }
.care-match:hover { background: var(--green-dark); }
.match-focus { display: grid; grid-template-columns: 28px 1fr; gap: 8px; margin: 14px 0 9px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.match-focus > svg { width: 18px; height: 18px; margin-top: 2px; color: var(--green); }
.match-focus strong, .match-focus span { display: block; }
.match-focus strong { font-size: 12px; }
.match-focus span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.resource-list { display: grid; }
.resource-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.resource-item:last-child { border-bottom: 0; }
.resource-item strong, .resource-item small { display: block; }
.resource-item strong { font-size: 12px; }
.resource-item small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.resource-capacity { display: inline-flex; margin-top: 5px; padding: 3px 5px; border-radius: 3px; background: var(--soft); color: var(--green-dark); font-size: 10px; font-weight: 800; }
.resource-capacity.is-low { background: var(--orange-soft); color: var(--orange); }
.resource-item button { border: 1px solid var(--line-strong); border-radius: 4px; padding: 6px 8px; background: var(--surface); color: var(--green-dark); font-size: 11px; font-weight: 800; white-space: nowrap; }
.resource-item button:hover:not(:disabled) { border-color: var(--green); background: var(--soft); }
.resource-item button:disabled { cursor: not-allowed; color: var(--soft-muted); opacity: 0.75; }
.resource-note { margin: 12px 0 0; color: var(--soft-muted); font-size: 10px; line-height: 1.5; }

.action-intelligence { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.75fr); gap: 16px; margin: 0 0 16px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }.action-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }.action-flow span { padding: 4px 0; color: var(--green-dark); font-size: 11px; font-weight: 800; white-space: nowrap; }.action-flow svg { width: 13px; height: 13px; color: var(--soft-muted); flex: 0 0 auto; }.care-schedule { display: flex; flex-wrap: wrap; align-content: center; gap: 5px 12px; padding-left: 16px; border-left: 1px solid var(--line); }.care-schedule > div { min-width: 100%; }.care-schedule .eyebrow { margin: 0 0 2px; color: var(--orange); }.care-schedule strong { font-size: 12px; }.care-schedule span { color: var(--muted); font-size: 10px; white-space: nowrap; }.care-schedule b { margin-right: 3px; color: var(--green-dark); }
.task-feedback { display: block; margin-top: 6px; color: var(--green-dark); font-size: 10px; font-weight: 800; text-decoration: none; }
.loop-section { padding-top: 6px; }.loop-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }.loop-flow > div { display: grid; gap: 5px; min-height: 116px; padding: 17px 13px; border-left: 1px solid var(--line); }.loop-flow > div:first-child { border-left: 0; }.loop-flow > div > svg { width: 20px; height: 20px; color: var(--green); }.loop-flow strong { font-size: 12px; }.loop-flow span { color: var(--muted); font-size: 10px; line-height: 1.45; }.flow-arrow { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1160px) {
  .app-header { grid-template-columns: 1fr auto; }.main-nav { order: 3; grid-column: 1 / -1; }.header-status { justify-self: end; }.dashboard-grid { grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr); }.operations-grid { grid-template-columns: 1fr 1fr; }.activity-panel { grid-column: 1 / -1; }.activity-feed { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }.activity { border-top: 1px solid var(--line); border-left: 0; padding: 13px 0 0; }.activity::before { top: -4px; left: 3px; }
}

@media (max-width: 700px) {
  .shift-strip { display: grid; gap: 12px; }.shift-actions { width: 100%; }.shift-actions > * { flex: 1 1 0; }.role-chip { display: none; }
}

@media (max-width: 900px) {
  .loop-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }.loop-flow > div:nth-of-type(4) { border-left: 0; }.action-intelligence { grid-template-columns: 1fr; }.care-schedule { padding: 12px 0 0; border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 600px) {
  .profile-grid, .loop-flow { grid-template-columns: 1fr; }.loop-flow > div, .loop-flow > div:nth-of-type(4) { min-height: auto; border-top: 1px solid var(--line); border-left: 0; }.loop-flow > div:first-child { border-top: 0; }.action-flow { display: grid; grid-template-columns: 1fr; gap: 2px; }.action-flow svg { display: none; }
}

@media (max-width: 900px) {
  .workspace { padding: 20px 18px 40px; }.app-header { padding: 10px 18px; }.status-band { display: grid; gap: 16px; }.weather-readout { min-width: 0; width: 100%; }.metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.dashboard-grid, .analysis-grid, .care-grid { grid-template-columns: 1fr; }.three-map { height: 455px; }.operations-grid { grid-template-columns: 1fr; }.activity-panel { grid-column: auto; }.activity-feed { grid-template-columns: 1fr; }.activity { border-top: 0; border-left: 1px solid var(--line); padding: 0 0 15px 15px; }.activity::before { top: 3px; left: -4px; }.data-grid { grid-template-columns: 1fr; }.data-grid article { padding: 14px 2px; }.data-grid p { min-height: 0; }
}

@media (max-width: 600px) {
  .app-header { display: flex; flex-wrap: wrap; gap: 8px; }.main-nav { order: 3; width: 100%; overflow-x: auto; }.main-nav a { padding: 7px 9px; white-space: nowrap; }.header-status { margin-left: auto; }.data-state { display: none; }.workspace { gap: 18px; padding: 18px 12px 32px; }.status-title h1 { font-size: 23px; }.weather-readout { grid-template-columns: repeat(2, 1fr); }.weather-readout div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }.weather-readout div:nth-child(4) { border-top: 1px solid var(--line); }.metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }.metric-grid article { min-height: 82px; padding: 11px; }.metric-icon { width: 30px; height: 30px; }.metric-grid strong { font-size: 18px; }.metric-grid article span:not(.metric-icon), .metric-grid small { font-size: 10px; }.map-panel, .insight-panel, .panel { padding: 14px; }.three-map { height: 370px; }.map-footer { display: grid; gap: 6px; }.map-hint { display: none; }.form-row { grid-template-columns: 1fr; }.section-intro { align-items: flex-start; }.section-intro h2 { font-size: 17px; }.care-pulse { flex-wrap: wrap; gap: 5px; }.care-pulse span { font-size: 10px; }.care-item { grid-template-columns: 1fr; gap: 8px; }.care-actions { justify-content: flex-end; }.command-button { min-height: 34px; padding: 7px 9px; font-size: 12px; }.task-item { grid-template-columns: 20px 1fr; }.task-meta { grid-column: 2; display: flex; justify-items: start; align-items: center; gap: 8px; }.forecast-chart { height: 122px; }
}
