@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,600;0,9..40,700;1,9..40,400&display=swap");

/* Responder Pager dispatch UI — dark surface, amber accent */

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #f0a030;
  --accent-dim: #b87a1f;
  --danger: #f85149;
  --radius: 10px;
  --font: "DM Sans", "Segoe UI", system-ui, sans-serif;
  /* Set by /js/branding.js from the same master / UI logo URL */
  --brand-mark-url: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: radial-gradient(ellipse 120% 80% at 10% 0%, #1a1420 0%, var(--bg) 55%);
  color: var(--text);
  position: relative;
}

/* Large faint logo watermark (same asset as header / favicon master) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--brand-mark-url);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: min(78vmin, min(90vw, 640px));
  opacity: 0.09;
}

body > * {
  position: relative;
  z-index: 1;
}

a {
  color: var(--accent);
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 0.9rem;
}

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.auth-card h1 {
  margin: 0 0 0.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.panel h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.hidden {
  display: none !important;
}

form label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

form input:not([type="checkbox"]):not([type="radio"]),
form select,
form textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

form input[type="checkbox"],
form input[type="radio"] {
  display: inline-block;
  width: auto;
  margin-top: 0;
  padding: 0;
  flex-shrink: 0;
  vertical-align: middle;
  accent-color: var(--accent);
}

form button,
button[type="submit"],
.nav-item,
#btn-set-webhook,
.btn-ghost {
  font: inherit;
  cursor: pointer;
}

form button,
#btn-set-webhook {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: #0d1117;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
}

.error {
  color: var(--danger);
  margin-top: 1rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(8px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.btn-sidebar-toggle {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.btn-sidebar-toggle:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.btn-sidebar-toggle__bars {
  display: block;
  width: 1.1rem;
  height: 1px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 960px) {
  body.sidebar-open {
    overflow: hidden;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    top: 52px;
    z-index: 199;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
  }

  body.sidebar-open .sidebar-backdrop:not(.hidden) {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 52px;
    left: 0;
    bottom: 0;
    width: min(280px, 88vw);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    border-right: 1px solid var(--border);
    border-bottom: none;
    padding: 1rem 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 8px 0 28px rgba(0, 0, 0, 0.45);
  }

  .nav-item {
    border-left: 3px solid transparent;
    border-bottom: none;
    padding: 0.65rem 1.25rem;
  }

  .nav-item.active {
    border-left-color: var(--accent);
    border-bottom-color: transparent;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.brand-text {
  line-height: 1.2;
}

.auth-brand {
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-brand h1 {
  margin: 0.35rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.auth-brand-logo {
  display: block;
  margin: 0 auto;
  width: 88px;
  height: 88px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - 52px);
  transition: grid-template-columns 0.2s ease;
}

@media (min-width: 961px) {
  .layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  body.sidebar-desktop-collapsed .layout {
    grid-template-columns: 0 minmax(0, 1fr);
  }

  body.sidebar-desktop-collapsed .sidebar {
    overflow: hidden;
    min-width: 0;
    padding: 0;
    border: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

.sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  padding: 1rem 0;
  background: var(--surface);
}

.nav-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 1.25rem;
  border: none;
  background: transparent;
  color: var(--muted);
  border-left: 3px solid transparent;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(240, 160, 48, 0.06);
}

.nav-item.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(240, 160, 48, 0.08);
}

.sidebar-download {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding: 0.6rem 1.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  border-top: 1px solid var(--border);
  transition: color 0.15s;
}

.sidebar-download:hover {
  color: var(--accent);
}

.sidebar-download svg {
  flex-shrink: 0;
}

.content {
  padding: 1.5rem 2rem 3rem;
  max-width: none;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.section:not(#sec-incidents) {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.section h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.card h3 {
  margin-top: 0;
  font-size: 1rem;
}

form.card.inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

form.card.inline input {
  flex: 1;
  min-width: 160px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.list li:last-child {
  border-bottom: none;
}

.list button {
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.pre-out {
  background: var(--bg);
  padding: 1rem;
  border-radius: 6px;
  overflow: auto;
  font-size: 0.8rem;
  margin-top: 1rem;
}

code {
  font-size: 0.85em;
  background: var(--bg);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  /* Above the station in-app full-screen black standby (see #station-standby-overlay) */
  z-index: 100001;
}

.modal-inner {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow: auto;
}

.modal-inner.modal-wide {
  max-width: 520px;
}

#form-edit-user label {
  display: block;
  margin-bottom: 0.85rem;
}

#form-edit-user input,
#form-edit-user select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.county-fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem 1rem;
  margin: 0 0 1rem;
}

.county-fieldset legend {
  padding: 0 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 180px;
  overflow-y: auto;
}

.checkbox-list label {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0 !important;
  font-size: 0.9rem;
  cursor: pointer;
}

.checkbox-list input[type="checkbox"] {
  width: auto !important;
  margin: 0 !important;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
}

/* Primary action in modal footers: submit, or type="button" when not using a form submit */
.form-actions > button:not(.btn-ghost) {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: #0d1117;
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  font-weight: 600;
  font: inherit;
  cursor: pointer;
}

.users-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.users-toolbar .users-county-label {
  flex: 1;
  min-width: 12rem;
  margin-bottom: 0;
}

.users-toolbar .users-county-label select {
  width: 100%;
  max-width: 28rem;
}

.users-toolbar .users-search-label {
  flex: 1 1 100%;
  min-width: 16rem;
  margin-bottom: 0;
}

.users-toolbar .users-search-label #users-search {
  width: 100%;
  max-width: 32rem;
}

.users-search-summary {
  margin: 0 0 0.75rem;
}

#users-agency-row.hidden {
  display: none;
}

.modal-inner .county-fieldset {
  margin-top: 0.5rem;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.incident-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.incident-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  background: rgba(0, 0, 0, 0.15);
}

.incident-card--closed {
  padding: 0;
  overflow: hidden;
}

.incident-card-closed-summary {
  cursor: pointer;
  list-style: none;
  padding: 0.8rem 1rem;
}

.incident-card-closed-summary::-webkit-details-marker {
  display: none;
}

.incident-card--closed[open] .incident-card-closed-summary {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.incident-card-closed-body {
  padding: 0.85rem 1rem 1rem;
}

.incident-card-head strong {
  display: block;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.incident-card-resends {
  margin-top: 0.45rem;
}

.incident-page-timeline__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.incident-page-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.incident-page-timeline li {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.35rem 0 0.35rem 0.65rem;
  border-left: 2px solid var(--accent-dim);
  border-radius: 0 4px 4px 0;
}

.incident-page-timeline__num {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text);
}

.incident-page-timeline__time {
  font-size: 0.78rem;
  color: var(--muted);
}

.incident-page-timeline__loc-detail {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text);
  word-break: break-word;
}

.incident-location-change {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text);
  word-break: break-word;
}

.incident-location-change__lead {
  font-weight: 600;
  color: var(--text);
}

.incident-location-change__line {
  color: var(--text);
  padding-left: 0.15rem;
}

.incident-location-change__quoted::before {
  content: '"';
}

.incident-location-change__quoted::after {
  content: '"';
}

.incident-recipients {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.recipient-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  align-items: flex-start;
}

.recipient-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  max-width: 100%;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
}

button.recipient-chip {
  font: inherit;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  appearance: none;
}

.recipient-chip__phone-pop {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
  width: 100%;
  max-width: 14rem;
}

.recipient-chip__phone-pop[hidden],
.recipient-chip__phone-pop.hidden {
  display: none !important;
}

.recipient-chip__phone-num {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  word-break: break-all;
}

.recipient-chip__name {
  max-width: 16rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recipient-chip__time {
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.15;
  opacity: 0.95;
  color: inherit;
  filter: brightness(0.92);
}

.recipient-chip--pending {
  border-style: dashed;
  opacity: 0.95;
  color: var(--muted);
  font-weight: 500;
}

.recipient-chip--responding {
  background: rgba(46, 160, 67, 0.28);
  border-color: rgba(63, 185, 80, 0.65);
  color: #3fb950;
}

.recipient-chip--unavailable {
  background: rgba(248, 81, 73, 0.18);
  border-color: rgba(248, 81, 73, 0.55);
  color: var(--danger);
  font-weight: 600;
}

.incident-actions {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.incident-actions button {
  font: inherit;
  cursor: pointer;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.incident-actions button.btn-danger {
  border-color: var(--danger);
  color: var(--danger);
}

.dispatch-alert-banner {
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent-dim);
  background: rgba(240, 160, 48, 0.12);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

.dispatch-alert-banner--flash {
  animation: dispatch-pulse 0.55s ease-in-out 3;
}

.app-toast {
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent-dim);
  background: rgba(240, 160, 48, 0.12);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-line;
}

.sec-incidents-inner--flash {
  animation: dispatch-pulse 0.55s ease-in-out 3;
}

@keyframes dispatch-pulse {
  0%,
  100% {
    opacity: 1;
    filter: brightness(1);
  }
  50% {
    opacity: 0.88;
    filter: brightness(1.15);
  }
}

.edit-county-bounds-help {
  margin: 0.5rem 0 0.35rem;
}

.edit-county-bounds-map-wrap {
  margin: 0.5rem 0 0.25rem;
}

.edit-county-bounds-map {
  width: 100%;
  min-height: 280px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.edit-county-bounds-actions {
  margin: 0.35rem 0 0.75rem;
}

.county-bbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1rem;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .county-bbox-grid {
    grid-template-columns: 1fr;
  }
}

.agency-fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem 1rem;
  margin: 0 0 1rem;
}

.agency-fieldset legend {
  padding: 0 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.agency-fieldset .checkbox-list label {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem !important;
  font-size: 0.9rem;
  cursor: pointer;
}

.agency-fieldset .checkbox-list input[type="checkbox"] {
  width: auto !important;
  margin: 0 !important;
}

.user-agency-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.12);
}

.user-agency-row select {
  flex: 1;
  min-width: 140px;
  margin: 0 !important;
}

.user-agency-notify-wrap {
  display: flex !important;
  align-items: center;
  gap: 0.35rem;
  margin: 0 !important;
  font-size: 0.85rem;
  white-space: nowrap;
}

.user-agency-notify-wrap input[type="checkbox"] {
  width: auto !important;
  margin: 0 !important;
}

.user-agency-suspend-wrap {
  width: 100%;
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.user-agency-suspend-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 !important;
}

.user-agency-suspend-wrap input[type="datetime-local"] {
  font: inherit;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  max-width: 100%;
}

.new-incident-toolbar {
  margin-bottom: 1rem;
}

.btn-new-incident {
  font: inherit;
  cursor: pointer;
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-new-incident:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: rgba(240, 160, 48, 0.06);
}

.new-incident-heading {
  margin-top: 0;
  font-size: 1rem;
}

/* New incident: compact layout (spacing + column width), not typography */
#form-incident label {
  margin-bottom: 0.65rem;
}

#form-incident .agency-fieldset {
  padding: 0.5rem 0.65rem 0.65rem;
  margin: 0 0 0.65rem;
}

#form-incident .checkbox-list {
  gap: 0.35rem;
  max-height: 120px;
}

.new-incident-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

/* Location editor in dispatch modal — same grid as new incident */
#modal-incident-location .modal-incident-location-grid {
  max-height: min(72vh, 640px);
  overflow-y: auto;
}

.incident-map {
  width: 100%;
  height: clamp(200px, 42vh, 560px);
  min-height: 180px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  z-index: 0;
}

@media (min-width: 880px) {
  #new-incident-panel:not(.hidden) .new-incident-grid {
    grid-template-columns: minmax(0, 300px) minmax(280px, 1fr);
    align-items: stretch;
    min-height: calc(100vh - 52px - 9.5rem);
  }

  .new-incident-grid {
    grid-template-columns: minmax(0, 300px) minmax(280px, 1fr);
    align-items: start;
  }

  .new-incident-map-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .incident-map {
    flex: 1 1 auto;
    min-height: 280px;
    height: auto;
  }
}

/* Station kiosk: roughly 2× map area vs default dispatch modal */
#modal-incident-location.modal-incident-location--station-large .modal-inner.modal-wide {
  max-width: min(96vw, 1400px);
  width: min(96vw, 1400px);
  max-height: 92vh;
}

#modal-incident-location.modal-incident-location--station-large .modal-incident-location-grid {
  max-height: min(86vh, 1200px);
}

#modal-incident-location.modal-incident-location--station-large .incident-map {
  min-height: 360px;
  height: clamp(280px, 58vh, 720px);
}

@media (min-width: 880px) {
  #modal-incident-location.modal-incident-location--station-large .new-incident-grid {
    grid-template-columns: minmax(0, 320px) minmax(440px, 1fr);
  }

  #modal-incident-location.modal-incident-location--station-large .incident-map {
    min-height: 560px;
    height: clamp(440px, 68vh, 920px);
    flex: 1 1 auto;
  }
}

.new-incident-map-col .map-panel-title {
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}

.maps-fallback-banner {
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent-dim);
  background: rgba(240, 160, 48, 0.1);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.address-input-wrapper {
  position: relative;
}

.address-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 10050;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.address-suggestions li {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text);
}

.address-suggestions li:hover,
.address-suggestions li.address-suggestion-active {
  background: rgba(240, 160, 48, 0.08);
}

.address-suggestions li:last-child {
  border-bottom: none;
}

.address-hint {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.8rem;
}

label.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

/* Station monitor (kiosk): single column layout, large map, touch-friendly chips */
body.station-monitor {
  --st-font-incident-title: 1.125rem;
  --st-font-incident-meta: 0.875rem;
  --st-font-recipients: 0.875rem;
  --st-font-apparatus: 0.875rem;
  --st-font-panel-heading: 1.05rem;
  --st-font-panel-hint: 0.8rem;
  --st-font-weather: 0.95rem;
  --st-font-topbar: 0.875rem;
}

@media (min-width: 961px) {
  body.station-monitor .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

body.station-monitor .station-topbar-title {
  font-weight: 600;
  margin-left: 0.75rem;
  color: var(--text);
}

body.station-monitor.station-electron-compact .station-topbar-title,
body.station-monitor.station-electron-compact .brand-text {
  display: none;
}

body.station-monitor .station-widgets-container.station-grid-stack {
  min-height: 280px;
}

body.station-monitor .station-grid-stack > .grid-stack-item > .grid-stack-item-content {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
}

body.station-monitor .station-map-card-heading {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
}

body.station-monitor .station-grid-drag-handle {
  cursor: grab;
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  letter-spacing: -0.12em;
  touch-action: none;
  user-select: none;
}

body.station-monitor .station-grid-drag-handle:active {
  cursor: grabbing;
  opacity: 0.9;
}

body.station-monitor .station-grid-item-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
}

body.station-monitor .station-grid-item-body--single {
  flex: 1 1 auto;
  min-height: 0;
}

body.station-monitor .station-grid-item-body--single > .station-monitor-map-wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.station-monitor .station-grid-item-body--incident-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
}

body.station-monitor .station-grid-item-body--incident-panel > .station-monitor-map-wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.station-monitor .station-incident-grid-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.station-monitor .station-map-hint {
  margin: -0.25rem 0 0.65rem;
  font-size: var(--st-font-panel-hint);
}

body.station-monitor #station-poll-status,
body.station-monitor .user-bar .btn-ghost {
  font-size: var(--st-font-topbar);
}

body.station-monitor .station-incident-block {
  margin-bottom: 1.1rem;
}

body.station-monitor .station-incident-block:last-child {
  margin-bottom: 0;
}

body.station-monitor .station-incident-card-main {
  min-width: 0;
  max-width: none;
  width: 100%;
}

body.station-monitor .station-incident-card-responders {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

body.station-monitor .station-incident-card-trucks {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

body.station-monitor .station-side-card-heading {
  margin: 0 0 0.5rem;
  font-size: var(--st-font-panel-heading);
  font-weight: 600;
}

body.station-monitor .station-truck-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-content: flex-start;
}

body.station-monitor .station-truck-hint {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
}

body.station-monitor .station-truck-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.1rem;
  min-height: 44px;
  padding: 0.35rem 0.6rem;
  font: inherit;
  font-size: var(--st-font-apparatus);
  font-family: inherit;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  text-align: left;
  line-height: 1.2;
  font-weight: 600;
  max-width: 100%;
  appearance: none;
}

body.station-monitor .station-truck-chip__code {
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 12rem;
}

/* Match responder `recipient-chip__time`: time below the label, smaller */
body.station-monitor .station-truck-chip__time {
  font-size: max(0.7rem, calc(var(--st-font-apparatus) * 0.78));
  font-weight: 500;
  line-height: 1.15;
  opacity: 0.95;
  color: inherit;
  filter: brightness(0.92);
}

/* “On incident” (legacy rows without en_route) — same family as Responding. */
body.station-monitor .station-truck-chip--on {
  background: rgba(46, 160, 67, 0.28);
  border-color: rgba(63, 185, 80, 0.65);
  color: #3fb950;
  font-weight: 500;
}

/* In route (including station touch); matches .recipient-chip--responding */
body.station-monitor .station-truck-chip--enroute {
  background: rgba(46, 160, 67, 0.28);
  border-color: rgba(63, 185, 80, 0.65);
  color: #3fb950;
  font-weight: 600;
}

.agency-trucks-edit-list,
.station-trucks-settings-list {
  list-style: none;
  margin: 0.35rem 0;
  padding: 0;
}

.agency-trucks-edit-list li,
.station-trucks-settings-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

.agency-trucks-edit-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.agency-trucks-edit-add input {
  flex: 1 1 12rem;
  min-height: 40px;
  padding: 0.35rem 0.5rem;
}

.station-trucks-settings-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.35rem;
}

.incident-card-enroute {
  margin: 0.35rem 0 0.25rem;
}

.incident-card-apparatus-below {
  margin-top: 0.5rem;
}

.incident-card-apparatus-below .incident-card-enroute {
  margin-top: 0;
}

body.station-monitor .incident-card-station-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

body.station-monitor .station-wrapup-banner {
  margin: 0 0 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  background: rgba(180, 120, 0, 0.18);
  border: 1px solid rgba(180, 120, 0, 0.45);
  font-size: var(--st-font-incident-meta);
  line-height: 1.35;
}

body.station-monitor .station-incident-report {
  margin: 0.75rem 0 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

body.station-monitor .station-incident-report__notes {
  width: 100%;
  min-height: 5.5rem;
  margin: 0.35rem 0;
  padding: 0.5rem 0.6rem;
  font-size: var(--st-font-incident-meta);
  line-height: 1.35;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  resize: vertical;
}

body.station-monitor .station-incident-report__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

body.station-monitor .incident-card__main {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

body.station-monitor .incident-card__title {
  font-size: var(--st-font-incident-title);
  display: block;
  margin-bottom: 0.35rem;
}

body.station-monitor .station-incident-compact__time {
  margin: 0 0 0.2rem;
  line-height: 1.25;
}

body.station-monitor .station-incident-compact .incident-card__title {
  margin: 0 0 0.3rem;
}

body.station-monitor .station-incident-compact__addr {
  margin: 0 0 0.2rem;
  font-size: var(--st-font-incident-meta);
  line-height: 1.35;
  color: var(--text);
}

body.station-monitor .station-incident-compact__cross {
  margin: 0 0 0.25rem;
  line-height: 1.35;
}

body.station-monitor .incident-card__main .muted,
body.station-monitor .incident-card__main .small {
  font-size: var(--st-font-incident-meta);
}

body.station-monitor .station-incident-card-responders .incident-card__responders {
  flex: 1 1 auto;
  font-size: var(--st-font-recipients);
  min-height: 0;
}

@media (max-width: 900px) {
  body.station-monitor .station-incident-card-main {
    max-width: none;
  }
}

.btn-station-update-location,
.btn-station-close-incident {
  margin-top: 0.65rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  font-size: var(--st-font-incident-meta);
}

.btn-station-close-incident {
  border: 1px solid #f85149;
  background: rgba(248, 81, 73, 0.12);
  color: #ff7b72;
  border-radius: 8px;
  cursor: pointer;
  touch-action: manipulation;
}

.station-recent-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 1rem;
  margin-top: 0.75rem;
  align-items: start;
}

@media (max-width: 900px) {
  .station-recent-layout {
    grid-template-columns: 1fr;
  }
}

.station-recent-list {
  max-height: min(60vh, 520px);
  overflow: auto;
  padding: 0.35rem 0;
}

.station-recent-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.35rem;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: #0d1117;
  color: inherit;
  cursor: pointer;
  font: inherit;
  touch-action: manipulation;
}

.station-recent-row:hover,
.station-recent-row:focus-visible {
  border-color: #58a6ff;
  outline: none;
}

.station-recent-row--active {
  border-color: #58a6ff;
  background: rgba(88, 166, 255, 0.08);
}

.station-recent-detail {
  max-height: min(70vh, 620px);
  overflow: auto;
}

.inline-pair {
  display: inline-block;
  margin-right: 1rem;
  margin-top: 0.5rem;
}

.station-touch-num-input {
  min-height: 48px;
  font-size: 1.1rem;
  padding: 0.5rem 0.65rem;
  margin-top: 0.35rem;
  max-width: 10rem;
}

.station-touch-label {
  display: block;
  margin: 0.65rem 0;
}

.station-touch-btn,
.station-touch-btn-primary {
  min-height: 48px;
  padding: 0.55rem 1.1rem;
  font-size: 1rem;
  touch-action: manipulation;
}

.station-touch-btn-primary {
  min-width: 8rem;
}

/* Station settings → map zoom subsections (overview vs detail) */
.station-map-zoom-block-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0.5rem 0 0.15rem;
  color: var(--text);
}
.station-map-zoom-block-title--spaced {
  margin-top: 1.1rem;
}
p.station-map-zoom-hint {
  margin: 0.35rem 0 0.5rem;
  line-height: 1.45;
  max-width: 42rem;
}

.station-typo-touch-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.75rem 0;
}

.station-typo-touch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

.station-typo-touch-row:last-child {
  border-bottom: none;
}

.station-typo-touch-label {
  flex: 1 1 12rem;
  font-weight: 500;
  font-size: 1rem;
}

.station-typo-touch-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.station-typo-step-btn {
  min-width: 52px;
  min-height: 52px;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
}

.station-typo-touch-input {
  width: 5.5rem;
  min-height: 52px;
  font-size: 1.2rem;
  text-align: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.station-settings-hr {
  margin: 1rem 0;
  border: none;
  border-top: 1px solid var(--border);
}

#modal-station-settings .checkbox-row input[type="checkbox"] {
  width: 1.35rem;
  height: 1.35rem;
  min-width: 1.35rem;
  margin-top: 0.2rem;
}

.station-monitor-map {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  z-index: 0;
}

body.station-monitor .station-grid-item-body .station-monitor-map {
  flex: 1 1 auto;
  min-height: 140px;
  height: auto !important;
}

.station-monitor-map-wrap .station-map-card-heading h3 {
  margin: 0;
  font-size: var(--st-font-panel-heading);
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
  align-self: center;
}

.station-weather-panel {
  padding: 0;
  box-sizing: border-box;
}

body.station-monitor .station-grid-item-body .station-weather-panel {
  flex: 1 1 auto;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.station-weather-panel .station-weather-inner {
  padding: 0.75rem 0.85rem 0.85rem;
  background: rgba(22, 27, 34, 0.65);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Large-screen "dashboard" layout: big temp + conditions + metric tiles */
.station-weather-inner--kiosk {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
}

.station-weather-hero {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin: 0.15rem 0 0.85rem;
  padding: 0.35rem 0 0.9rem;
  border-bottom: 1px solid var(--border);
}

.station-weather-hero__primary {
  min-width: 0;
  flex: 0 1 auto;
}

.station-weather-hero__temp {
  display: inline-block;
  font-size: clamp(2.2rem, calc(var(--st-font-weather) * 2.85), 3.9rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.station-weather-hero__unit {
  font-size: 0.5em;
  font-weight: 600;
  margin-left: 0.04em;
  opacity: 0.92;
}

.station-weather-hero__sublabel {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.28em;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.2;
  color: var(--muted);
}

.station-weather-hero__feelwrap {
  margin-top: 0.45rem;
}

.station-weather-hero__feel {
  display: block;
  font-size: var(--st-font-weather);
  font-weight: 500;
  color: var(--muted);
  line-height: 1.3;
}

.station-weather-hero__condonly {
  display: block;
  font-size: clamp(1.25rem, 1.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

.station-weather-hero__summary {
  margin: 0;
  max-width: 20rem;
  font-size: max(calc(var(--st-font-weather) * 1.2), 1.05rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  text-align: right;
  flex: 1 1 10rem;
}

/* Rich “weather site” layout */
.station-weather-hero--rich {
  align-items: center;
  border-bottom: none;
  margin-bottom: 0.35rem;
  padding: 0.5rem 0.6rem 0.85rem;
  border-radius: 10px;
}

.station-weather-hero--rich.station-weather-hero--day {
  background: linear-gradient(125deg, rgba(56, 139, 253, 0.14) 0%, rgba(22, 27, 34, 0) 60%);
  border: 1px solid rgba(88, 166, 255, 0.18);
}

.station-weather-hero--rich.station-weather-hero--night {
  background: linear-gradient(125deg, rgba(100, 108, 140, 0.18) 0%, rgba(22, 27, 34, 0) 60%);
  border: 1px solid rgba(130, 140, 170, 0.2);
}

.station-weather-hero__emoji {
  font-size: clamp(2.35rem, 3.2vw, 3rem);
  line-height: 1;
  flex: 0 0 auto;
  margin-right: 0.5rem;
  user-select: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.station-weather-hero__col {
  flex: 1 1 8rem;
  min-width: 0;
}

.station-weather-hero__deltahint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8em;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.25;
}

.station-weather-badge {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.2rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 6px;
  line-height: 1.2;
}

.station-weather-badge--day {
  background: rgba(56, 139, 253, 0.2);
  color: #79c0ff;
  border: 1px solid rgba(88, 166, 255, 0.25);
}

.station-weather-badge--night {
  background: rgba(100, 108, 150, 0.25);
  color: #b1b7d4;
  border: 1px solid rgba(130, 140, 180, 0.25);
}

.station-weather-subhead {
  margin: 0.4rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.station-weather-strapline {
  margin: 0 0 0.65rem;
  font-size: max(calc(var(--st-font-weather) * 0.88), 0.9rem);
  line-height: 1.4;
  color: var(--muted);
  font-weight: 500;
}

.station-weather-tiles--rich {
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.6rem 0.75rem;
}

.station-weather-tiles--rich .station-weather-tile {
  min-height: 3.75rem;
  background: linear-gradient(165deg, rgba(35, 42, 52, 0.95) 0%, rgba(22, 27, 34, 0.85) 100%);
  border-color: rgba(88, 166, 255, 0.12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.station-weather-tile__fr {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin: 0 0.1em;
}

.station-weather-wind {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 0.2rem;
}

.station-weather-wind__arrow {
  display: inline-block;
  font-size: 1.2em;
  line-height: 1;
  font-weight: 700;
  color: #79c0ff;
  text-shadow: 0 0 8px rgba(88, 166, 255, 0.35);
  transform: rotate(var(--station-wind-deg, 0deg));
}

.station-weather-wind__text {
  display: inline;
  vertical-align: middle;
}

.station-weather-tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.55rem 0.65rem;
}

.station-weather-tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.6rem 0.55rem;
  min-height: 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

.station-weather-tile__label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.2;
}

.station-weather-tile__value {
  display: block;
  margin-top: 0.2rem;
  font-size: max(calc(var(--st-font-weather) * 1.2), 1.05rem);
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  word-break: break-word;
}

.station-weather-tile__sub {
  font-size: 0.7em;
  font-weight: 600;
  opacity: 0.9;
  margin-left: 0.08em;
}

.station-weather-tile__detail {
  display: block;
  font-size: 0.8em;
  font-weight: 600;
  color: var(--muted);
  margin-top: 0.2rem;
  line-height: 1.3;
}

body.station-monitor .station-weather-tiles {
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
}

@media (min-width: 1200px) {
  body.station-monitor .station-weather-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1600px) {
  body.station-monitor .station-weather-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.station-weather-location {
  margin: 0 0 0.85rem;
  font-size: var(--st-font-panel-hint);
  color: var(--muted);
  line-height: 1.4;
}

.station-weather-dl {
  margin: 0;
  padding: 0;
}

.station-weather-pair {
  display: grid;
  grid-template-columns: minmax(7.5rem, 1fr) minmax(5rem, auto);
  gap: 0.5rem 1rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}

.station-weather-pair:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.station-weather-pair:first-child {
  padding-top: 0;
}

.station-weather-pair dt {
  margin: 0;
  padding: 0;
  font-size: var(--st-font-weather);
  font-weight: 500;
  color: var(--muted);
}

.station-weather-pair dt::after {
  content: ":";
}

.station-weather-pair dd {
  margin: 0;
  padding: 0;
  font-size: var(--st-font-weather);
  font-weight: 600;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  justify-self: end;
}

.station-weather-obs {
  margin: 1rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  line-height: 1.45;
}

.station-weather-obs a {
  color: var(--accent);
}

.station-weather-loading,
.station-weather-empty,
.station-weather-error {
  margin: 0;
  padding: 0.75rem 0.85rem;
  line-height: 1.45;
}

.station-weather-error {
  color: var(--danger);
}

.recipient-grid--station .recipient-chip {
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  font-size: var(--st-font-recipients);
}

#sec-station-monitor.section {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  position: relative;
}

/* No active incidents: true full-viewport black (in-app “screensaver”), above the top bar and station UI. */
#station-standby-overlay.station-standby-overlay {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 100000;
  box-sizing: border-box;
  margin: 0;
  border: none;
  padding: 0;
  /* Solid black; TV stays on 24/7 without a bright “no incidents” page. */
  background-color: #000;
  cursor: default;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
#station-standby-overlay.station-standby-overlay:focus {
  outline: none;
}
#station-standby-overlay.station-standby-overlay:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2);
}

#modal-app-info .app-info-meta {
  list-style: disc;
  margin: 0.5rem 0 0.75rem 1.2rem;
  padding: 0;
}

#modal-app-info .app-info-meta li {
  margin-bottom: 0.4rem;
}

#modal-app-info .app-info-vendor {
  margin: 0.65rem 0 0.85rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
}

#modal-app-info .app-info-vendor__line {
  margin: 0 0 0.4rem;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  line-height: 1.45;
}

#modal-app-info .app-info-vendor__line:last-child {
  margin-bottom: 0;
}

#modal-app-info .app-info-vendor__line:first-child {
  font-weight: 600;
  color: var(--text, inherit);
}

#modal-app-info .app-info-vendor__emoji {
  flex-shrink: 0;
  width: 1.35rem;
  text-align: center;
}

#modal-app-info .app-info-vendor__line a {
  color: var(--accent, #58a6ff);
}

.block-label {
  display: block;
  margin-bottom: 0.75rem;
}

.block-label input[type="file"] {
  display: block;
  margin-top: 0.35rem;
}

.branding-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-top: 0.75rem;
}

.branding-preview-row figure {
  margin: 0;
  text-align: center;
}

.branding-preview-row figcaption {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.branding-preview-ui {
  object-fit: contain;
  max-height: 64px;
  width: auto;
}

.branding-status-line {
  margin-top: 0.75rem;
}

/* Radio desk */
.table-wrap {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table th,
.data-table td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.5rem;
  vertical-align: middle;
}
.data-table th {
  text-align: left;
  background: var(--surface-2, #1e293b);
}
.data-table input[type="number"],
.data-table input[type="text"] {
  width: 100%;
  max-width: 5.5rem;
  box-sizing: border-box;
}
.radio-log-entries {
  max-height: 50vh;
  overflow-y: auto;
  font-size: 0.85rem;
}
.radio-log-entries .radio-log-line {
  border-bottom: 1px solid var(--border);
  padding: 0.4rem 0;
}
.radio-log-entries .radio-log-line time {
  color: var(--muted);
  font-size: 0.75rem;
}

.radio-desk-log-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.35rem;
}

.btn-danger-text {
  color: #f85149;
}

.btn-danger-text:hover {
  color: #ff7b72;
}

.app-info-dispatch-prefs {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
}

.app-info-dispatch-prefs__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.app-info-dispatch-prefs__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.app-info-dispatch-prefs__row select {
  min-width: 12rem;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Admin user list — structured cards (collapsed by default; click to expand) */
#user-table-wrap .user-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.user-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface, #161b22);
  overflow: hidden;
}

.user-card__details {
  /* Wraps the whole card so the row is a single click-target. */
}

.user-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  user-select: none;
  /* Native <summary> shows a default disclosure triangle; we use a custom
   * chevron via ::before on identity below, so hide the default. */
  list-style: none;
}
.user-card__head::-webkit-details-marker {
  display: none;
}

.user-card__details[open] > .user-card__head {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.user-card__head:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Tiny chevron in front of the identity that rotates open/closed. */
.user-card__head::before {
  content: "";
  flex: 0 0 auto;
  width: 0;
  height: 0;
  margin-right: 0.15rem;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid var(--muted, #8b949e);
  transition: transform 0.15s ease;
}

.user-card__details[open] > .user-card__head::before {
  transform: rotate(90deg);
}

.user-card__body {
  padding: 0.6rem 0.85rem 0.75rem;
}

.user-card__identity {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.4rem;
}

.user-card__identity .badge {
  vertical-align: middle;
}

.user-card__tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

/* Tag chips shown in user summary row (agencies + option flags). */
.utag {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted, #8b949e);
  white-space: nowrap;
  line-height: 1.45;
  font-weight: 600;
}

.utag__suffix {
  margin-left: 0.3rem;
  opacity: 0.75;
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: 0;
}

.utag--agency {
  background: hsl(var(--utag-h, 200) 55% 22%);
  border-color: hsl(var(--utag-h, 200) 55% 38%);
  color: hsl(var(--utag-h, 200) 65% 82%);
}

.utag--fyi {
  border-style: dashed;
  opacity: 0.85;
}

.utag--off-duty {
  filter: saturate(0.55);
  opacity: 0.7;
}

.utag--sms-off .utag__suffix {
  color: #ff9b9b;
  opacity: 1;
}

.utag--danger {
  background: rgba(220, 60, 60, 0.18);
  border-color: rgba(220, 60, 60, 0.55);
  color: #ff9b9b;
}

.utag--info {
  background: rgba(70, 160, 220, 0.16);
  border-color: rgba(70, 160, 220, 0.55);
  color: #8ecbe8;
}

.utag--success {
  background: rgba(60, 180, 100, 0.18);
  border-color: rgba(60, 180, 100, 0.55);
  color: #93dcab;
}

.utag--reporting {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.55);
  color: #d7b2ff;
}

.reports-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem 0.8rem;
  margin-bottom: 0.9rem;
}

.reports-toolbar > button {
  align-self: end;
}

.reports-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.75rem;
  margin-bottom: 0.9rem;
}

#reports-summary {
  margin-left: auto;
}

.report-row {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.55rem;
  background: rgba(0, 0, 0, 0.12);
}

.report-row > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.report-row > summary::-webkit-details-marker {
  display: none;
}

.report-row__meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.report-row-detail-grid {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.55rem 0.8rem;
}

.report-row-detail-grid h4 {
  margin: 0 0 0.35rem;
  font-size: 0.86rem;
}

.report-row-detail-grid p {
  margin: 0.2rem 0;
  font-size: 0.82rem;
}

.report-row-detail-grid ul {
  margin: 0;
  padding-left: 1.05rem;
  font-size: 0.8rem;
}

.report-row-detail-span {
  grid-column: 1 / -1;
}

.report-station-notes {
  white-space: pre-wrap;
  font-size: 0.82rem;
}

#reports-print-header {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

@media print {
  body.printing-reports .topbar,
  body.printing-reports .sidebar,
  body.printing-reports .sidebar-backdrop,
  body.printing-reports .reports-toolbar,
  body.printing-reports .reports-actions,
  body.printing-reports .modal,
  body.printing-reports #btn-sidebar-toggle {
    display: none !important;
  }

  body.printing-reports .layout {
    display: block;
  }

  body.printing-reports .content {
    padding: 0;
  }

  body.printing-reports .section {
    display: none !important;
  }

  body.printing-reports #sec-reports {
    display: block !important;
  }

  body.printing-reports #reports-print-header {
    display: block !important;
    margin: 0 0 0.6rem;
    color: #000;
    font-size: 12pt;
  }

  body.printing-reports #reports-results {
    border: none;
    padding: 0;
    background: #fff;
  }

  body.printing-reports .report-row {
    border: 1px solid #cfcfcf;
    break-inside: avoid;
    page-break-inside: avoid;
    page-break-after: always;
    background: #fff;
  }

  body.printing-reports .report-row:last-child {
    page-break-after: auto;
  }
}

.user-card__actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.5rem;
}

.user-card__id {
  margin: 0.55rem 0 0;
  font-size: 0.75rem;
}

.user-card__id summary {
  cursor: pointer;
  color: var(--muted);
  user-select: none;
}

.user-card__id summary:hover {
  color: var(--fg-muted, #8b949e);
}

.user-card__id code {
  display: block;
  margin-top: 0.25rem;
  word-break: break-all;
  font-size: 0.7rem;
}

.user-card__dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(4.5rem, auto) 1fr;
  gap: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

.user-card__dl dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.user-card__dl dd {
  margin: 0;
  min-width: 0;
}

.user-card__agencies {
  margin: 0.15rem 0 0;
  padding-left: 1.1rem;
}

.user-card__agencies li {
  margin: 0.15rem 0;
}

