/* MR Incident Platform - shared styles. "Field Paper" light theme, SARGRID brand. */

:root {
  --paper: #F7F8F6;
  --card: #FFFFFF;
  --ink: #1C2B33;
  --ink-soft: #5A6B74;
  --contour: #D9DEDA;
  --accent: #1F5C8B;      /* OS leisure blue - interactive */
  --navy: #002D4B;        /* SARGRID navy */
  --orange: #F05A22;      /* SARGRID orange - primary action */
  --rescue: #C8372D;
  --unsearched: #C8372D;
  --in-progress: #E0A100;
  --cleared: #2E7D4F;
  --re-search: #7B4FA6;
  --shadow: 0 2px 12px rgba(28, 43, 51, 0.08);
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', 'Consolas', 'SF Mono', monospace;
  /* Type scale — min 1.25 ratio between adjacent tiers */
  --text-xs: 11px;   /* pills, chips, eyebrows */
  --text-sm: 13px;   /* secondary text, compact UI */
  --text-base: 15px; /* body text */
  --text-lg: 18px;   /* section headings */
  --text-xl: 22px;   /* page titles */
}

/* ---- Dark / Night mode ---- */
:root[data-theme="dark"] {
  --paper: #0F1419;
  --card: #1A2128;
  --ink: #D8DFE4;
  --ink-soft: #8A9BA5;
  --contour: #2A363E;
  --accent: #5BA3D9;
  --navy: #5BA3D9;
  --shadow: 0 2px 12px rgba(0,0,0,.3);
}
:root[data-theme="dark"] .appbar { background: #0D1117; border-color: #1E2A32; }
:root[data-theme="dark"] .wordmark .o { color: #F05A22; }
:root[data-theme="dark"] .rail { background: #141B21; border-color: #1E2A32; }
:root[data-theme="dark"] .float-right { background: #1A2128; border-color: #2A363E; }
:root[data-theme="dark"] .modal-overlay, :root[data-theme="dark"] .modal-back { background: rgba(0,0,0,.65); }
:root[data-theme="dark"] .modal-card, :root[data-theme="dark"] .modal { background: #1A2128; }
:root[data-theme="dark"] .btn-orange { background: #F05A22; color: #fff; }
:root[data-theme="dark"] .btn-ghost { color: var(--ink-soft); }
:root[data-theme="dark"] .btn-ghost:hover { background: rgba(255,255,255,.06); color: var(--ink); }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: #0F1419; color: var(--ink); border-color: var(--contour); }
:root[data-theme="dark"] .ws-card { background: #1A2128; border-color: #2A363E; }
:root[data-theme="dark"] .inc-row { background: #1A2128; border-color: #2A363E; }
:root[data-theme="dark"] .inc-row:hover { background: #1E2830; }
:root[data-theme="dark"] .skeleton { background: linear-gradient(90deg, #2A363E 25%, rgba(42,54,62,.4) 50%, #2A363E 75%); background-size: 800px 100%; }
:root[data-theme="dark"] .loading-bar::after { background: var(--accent); }
:root[data-theme="dark"] .auth-card { background: #1A2128; border-color: #2A363E; }
:root[data-theme="dark"] .log-row:hover { background: rgba(255,255,255,.03); }
:root[data-theme="dark"] .sidebar-pane .ws-card { border-color: #2A363E; }
:root[data-theme="dark"] .chip-neutral { background: rgba(255,255,255,.08); color: var(--ink-soft); }
:root[data-theme="dark"] .pill-open { background: rgba(91,163,217,.15); color: #5BA3D9; }
:root[data-theme="dark"] .rail a.nav:hover { background: rgba(255,255,255,.05); }
:root[data-theme="dark"] .rail a.nav.active { background: rgba(91,163,217,.15); }
:root[data-theme="dark"] .sidebar-tab { color: var(--ink-soft); }
:root[data-theme="dark"] .sidebar-tabs { background: #141B21; border-color: #2A363E; }
:root[data-theme="dark"] .tools-menu { background: #1A2128; border-color: #2A363E; }
:root[data-theme="dark"] .toast { background: #1A2128; border-color: #2A363E; color: var(--ink); }
:root[data-theme="dark"] .train-card { background: #1A2128; border-color: #2A363E; }
:root[data-theme="dark"] .exp-row { background: #1A2128; border-color: #2A363E; }
:root[data-theme="dark"] .hours-card { background: #1A2128; border-color: #2A363E; }
:root[data-theme="dark"] .member-card { background: #1A2128; border-color: #2A363E; }
:root[data-theme="dark"] .team-card { background: #1A2128; border-color: #2A363E; }
:root[data-theme="dark"] .avail-section { background: #1A2128; border-color: #2A363E; }
:root[data-theme="dark"] #map { background: #0D1117; }
.theme-toggle { background: none; border: none; cursor: pointer; color: var(--ink-soft); padding: 4px; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: color 120ms ease, background 120ms ease; }
.theme-toggle:hover { color: var(--ink); background: rgba(90,107,116,.1); }
:root[data-theme="dark"] .theme-toggle:hover { background: rgba(255,255,255,.08); }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: 'Inter', system-ui, sans-serif; color: var(--ink); background: var(--paper); }
body.app { overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }

/* ---------- Brand wordmark ---------- */
.wordmark { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--navy); }
.wordmark .o { color: var(--orange); }

/* ---------- Buttons ---------- */
.btn { font-family: inherit; font-size: 14px; font-weight: 600; border-radius: 8px; padding: 9px 16px; cursor: pointer; border: 1px solid transparent; display: inline-flex; align-items: center; gap: 7px; transition: transform 140ms cubic-bezier(0.23,1,0.32,1), filter 120ms ease, background 120ms ease, box-shadow 120ms ease; }
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(31,92,139,.2); outline: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 2px 8px rgba(31,92,139,0.25); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { filter: brightness(1.05); box-shadow: 0 2px 8px rgba(240,90,34,0.25); transform: translateY(-0.5px); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--contour); }
.btn-ghost:hover { background: var(--paper); }
.btn-danger { background: var(--card); color: var(--rescue); border-color: rgba(200,55,45,.4); }
.btn-danger:hover { background: rgba(200,55,45,.06); }
.btn:active { transform: scale(0.97); }
.btn-sm { padding: 5px 11px; font-size: 13px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: var(--text-xs); font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 14px; color: var(--ink);
  border: 1px solid var(--contour); border-radius: 8px; padding: 10px 12px; background: var(--card); outline: none; width: 100%;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.field input.mono { font-family: var(--mono); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,92,139,.12); }
.field textarea { resize: vertical; min-height: 64px; }
.form-error { color: var(--rescue); font-size: 13px; min-height: 18px; }

/* ---------- Auth pages ---------- */
.auth-wrap { height: 100%; display: flex; align-items: center; justify-content: center; position: relative; }
.auth-bg { position: fixed; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.auth-card { position: relative; z-index: 1; width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--contour); border-radius: 12px; box-shadow: 0 12px 40px rgba(28,43,51,.18); overflow: hidden; animation: auth-card-in 300ms cubic-bezier(0.23,1,0.32,1) both; }
@keyframes auth-card-in { from { opacity: 0; transform: translateY(12px); } }
.auth-accent { height: 4px; display: flex; }
.auth-accent::before { content: ''; flex: 1; background: var(--navy); }
.auth-accent::after { content: ''; flex: 1; background: var(--orange); }
.auth-body { padding: 28px; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 20px; }
.auth-logo img { width: 100%; height: auto; display: block; }
.auth-foot { text-align: center; font-size: 13px; color: var(--ink-soft); margin-top: 16px; }

/* ---------- Top app bar ---------- */
.appbar { height: 56px; background: var(--card); border-bottom: 1px solid var(--contour); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; box-shadow: 0 1px 3px rgba(28,43,51,.04); }
.appbar-left { display: flex; align-items: center; gap: 14px; }
.appbar-logo { height: 26px; }
.appbar-right { display: flex; align-items: center; gap: 14px; }
.appbar-user { display: flex; flex-direction: column; line-height: 1.2; text-align: right; }
.appbar-user .nm { font-size: 13px; font-weight: 600; }
.appbar-user .rl { font-size: 11px; color: var(--ink-soft); }
.divider-v { width: 1px; height: 24px; background: var(--contour); }

/* ---------- Incidents home ---------- */
.page { height: calc(100% - 56px); overflow-y: auto; }
.container { max-width: 1100px; margin: 0 auto; padding: 28px 24px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.page-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.page-sub { color: var(--ink-soft); margin: 4px 0 0; font-size: var(--text-base); }

.incident-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.incident-card { background: var(--card); border: 1px solid var(--contour); border-radius: 12px; box-shadow: var(--shadow); padding: 18px; cursor: pointer; transition: border-color 150ms ease, transform 150ms cubic-bezier(0.23,1,0.32,1), box-shadow 150ms ease; position: relative; overflow: hidden; }
.incident-card::before { display: none; }
.incident-card:hover { border-color: var(--accent); }
.incident-card.closed::before { background: var(--ink-soft); }
.incident-card.closed { opacity: .8; }
.incident-card .ic-top { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.incident-card .ic-name { font-size: 17px; font-weight: 600; margin: 0; }
.incident-card .ic-number { font-family: var(--mono); font-size: var(--text-xs); color: var(--ink-soft); margin: 2px 0 0; }
.incident-card .ic-meta { display: flex; gap: 14px; margin-top: 14px; font-size: var(--text-xs); color: var(--ink-soft); }
.incident-card .ic-meta .mono { color: var(--ink); }
.empty-state { text-align: center; color: var(--ink-soft); padding: 60px 20px; border: 1px dashed var(--contour); border-radius: 12px; font-size: var(--text-sm); line-height: 1.5; }

/* Welcome banner (first-login onboarding) */
.welcome-banner { position: fixed; top: 68px; left: 50%; transform: translateX(-50%); z-index: 900; width: 440px; max-width: calc(100vw - 32px); animation: welcome-in 400ms cubic-bezier(0.23,1,0.32,1) both; }
.welcome-inner { background: var(--card); border: 1px solid var(--contour); border-radius: 12px; box-shadow: 0 8px 32px rgba(28,43,51,.16); padding: 18px 20px; }
.welcome-tip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--accent); background: rgba(31,92,139,.06); border: 1px solid rgba(31,92,139,.15); border-radius: 8px; padding: 5px 10px; }
@keyframes welcome-in { from { opacity: 0; transform: translateX(-50%) translateY(-12px); } }
@media (max-width: 768px) { .welcome-banner { top: 56px; width: calc(100% - 24px); } }

/* status pill */
.pill { font-family: var(--mono); font-size: 11px; padding: 2px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.pill-open { color: var(--cleared); border-color: rgba(46,125,79,.45); background: rgba(46,125,79,.12); }
.pill-closed { color: var(--ink-soft); border-color: var(--contour); background: var(--paper); }

/* ---------- Modal ---------- */

.modal { background: var(--card); border-radius: 12px; box-shadow: 0 20px 60px rgba(28,43,51,.3); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; animation: modal-in 200ms cubic-bezier(0.23,1,0.32,1) both; }
@keyframes modal-backdrop-in { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: scale(0.97); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--contour); }
.modal-head h3 { margin: 0; font-size: var(--text-lg); }
.modal-body { padding: 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--contour); }
.modal-close { cursor: pointer; color: var(--ink-soft); font-size: 22px; line-height: 1; background: none; border: none; display: flex; align-items: center; justify-content: center; padding: 4px; border-radius: 6px; transition: background 120ms ease, color 120ms ease, transform 140ms cubic-bezier(0.23,1,0.32,1); }
.modal-close:hover { background: var(--paper); color: var(--ink); }
.modal-close:active { transform: scale(0.9); }
.modal-close:focus-visible { box-shadow: 0 0 0 3px rgba(31,92,139,.2); outline: none; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* chips for sector/unit status */
.chip { font-family: var(--mono); font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.chip-neutral { color: var(--ink-soft); border-color: var(--contour); background: var(--paper); }
.chip-amber { color: #8a6500; border-color: rgba(224,161,0,.45); background: rgba(224,161,0,.12); }
.chip-green { color: var(--cleared); border-color: rgba(46,125,79,.45); background: rgba(46,125,79,.12); }
.chip-red { color: var(--rescue); border-color: rgba(200,55,45,.45); background: rgba(200,55,45,.12); }
.chip-purple { color: var(--re-search); border-color: rgba(123,79,166,.45); background: rgba(123,79,166,.12); }

/* ============== Workspace (control room) ============== */
.ws-appbar { position: fixed; top: 0; left: 0; right: 0; height: 56px; z-index: 1200; }
.ws-inc-name { font-weight: 600; font-size: 15px; }
.ws-inc-number { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.ws-stat { display: flex; flex-direction: column; line-height: 1.2; }
.ws-stat .lab { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.ws-stat .val { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.ws-weather { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); max-width: 280px; }

/* Connection status indicator */
.conn-status { display: flex; align-items: center; cursor: default; }
.conn-dot { width: 8px; height: 8px; border-radius: 50%; }
.conn-ok { background: var(--cleared); box-shadow: 0 0 0 2px rgba(46,125,79,.2); }
.conn-stale { background: var(--in-progress); box-shadow: 0 0 0 2px rgba(224,161,0,.2); animation: conn-pulse 1.5s ease-in-out infinite; }
.conn-lost { background: var(--rescue); box-shadow: 0 0 0 2px rgba(200,55,45,.2); animation: conn-pulse 1s ease-in-out infinite; }
@keyframes conn-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

#map { position: fixed; top: 56px; left: 232px; right: 0; bottom: 0; background: #eef0ec; z-index: 0; }
.leaflet-tile-pane { filter: saturate(0.72) brightness(0.99) contrast(1.02); }

.gridref-chip { position: fixed; left: 244px; bottom: 14px; background: var(--card); border: 1px solid var(--contour); box-shadow: var(--shadow); border-radius: 8px; padding: 5px 10px; font-size: 13px; font-weight: 500; z-index: 800; font-family: var(--mono); pointer-events: none; }

/* Leaflet layers control as "Map layers" button */
.leaflet-control-layers { border-radius: 8px !important; border: 1px solid var(--contour) !important; box-shadow: var(--shadow) !important; font-family: inherit !important; background: var(--card) !important; }
.leaflet-control-layers-toggle { display: none !important; }
.leaflet-control-layers-list { display: none; padding: 4px 0; }
.leaflet-control-layers-expanded .leaflet-control-layers-list { display: block; border-top: 1px solid var(--contour); }
.lc-toggle { display: block; width: 100%; padding: 7px 12px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--ink); background: none; border: none; border-radius: 8px; white-space: nowrap; font-family: inherit; text-align: left; }
.lc-toggle:hover { background: var(--paper); }
.boundary-label { background: none !important; border: none !important; }
.boundary-tip { font-family: inherit; font-size: 12px; font-weight: 600; }
.leaflet-control-layers label { display: flex; align-items: center; gap: 6px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.leaflet-control-layers label:hover { background: var(--paper); }
.leaflet-control-layers-base label:last-child { padding-bottom: 4px; }
.leaflet-control-layers-separator { display: none; }

/* ---- Left nav rail (shared across incident pages) ---- */
.rail { position: fixed; top: 56px; left: 0; bottom: 0; width: 232px; background: var(--card); border-right: 1px solid var(--contour); display: flex; flex-direction: column; padding: 14px 12px; gap: 3px; z-index: 1100; }
.rail-incident { padding: 4px 10px 14px; border-bottom: 1px solid var(--contour); margin-bottom: 10px; }
.rail-incident .ri-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.rail-incident .ri-number { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.rail a.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--ink-soft); font-weight: 500; font-size: 14px; transition: background 120ms ease, color 120ms ease, transform 140ms cubic-bezier(0.23,1,0.32,1); }
.rail a.nav:hover { background: var(--paper); color: var(--ink); }
.rail a.nav:active { transform: scale(0.97); }
.rail a.nav.active { background: rgba(31,92,139,.1); color: var(--accent); font-weight: 600; }
.rail a.nav .material-symbols-outlined { font-size: 20px; }
.rail-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--contour); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rail-user { line-height: 1.25; min-width: 0; }
.rail-user .nm { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-user .rl { font-size: 11px; color: var(--ink-soft); }
.material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

/* ---- Collapsed rail (dashboard icon-only mode) ---- */
body.rail-collapsed .rail { width: 56px; padding: 10px 6px; align-items: center; }
body.rail-collapsed .rail-incident { display: none; }
body.rail-collapsed .rail-foot { display: none; }
body.rail-collapsed .rail a.nav { gap: 0; padding: 10px; justify-content: center; overflow: hidden; }
body.rail-collapsed .rail a.nav .nav-label { display: none; }
body.rail-collapsed #map { left: 56px; }
body.rail-collapsed .main-content { left: 56px; }

/* ---- Floating panels over a map ---- */
.float-right { position: fixed; top: 68px; right: 12px; bottom: 12px; width: 360px; display: flex; flex-direction: column; gap: 0; z-index: 900; background: var(--card); border: 1px solid var(--contour); border-radius: 14px; box-shadow: 0 4px 20px rgba(28,43,51,.08); overflow: hidden; padding: 12px 12px 0; }

/* ---- Sidebar tab bar ---- */
.sidebar-tabs { display: flex; border-bottom: 1px solid var(--contour); flex-shrink: 0; background: var(--paper); }
.sidebar-tab { flex: 1; padding: 10px 0; font-family: inherit; font-size: var(--text-xs); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-soft); background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: color 120ms ease, border-color 120ms ease; }
.sidebar-tab:hover { color: var(--ink); }
.sidebar-tab:active { opacity: 0.7; }
.sidebar-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.sidebar-pane { display: none; flex-direction: column; gap: 10px; flex: 1; min-height: 0; overflow-y: auto; padding: 10px; }
.sidebar-pane.active { display: flex; }
.sidebar-pane .ws-card { box-shadow: none; border-radius: 10px; border: 1px solid rgba(217,222,218,.6); }
.sidebar-pane .ws-card-log { flex: 1; border: none; border-radius: 0; padding: 4px 6px; }
.sidebar-pane .ws-card-log .ws-card-head { display: none; }

/* ---- Scrolling content pages (pack / tasking / team) ---- */
.main-content { position: fixed; top: 56px; left: 232px; right: 0; bottom: 0; overflow-y: auto; }
.main-content .container { max-width: 1080px; }

/* ---- App-level pages with the global rail (incidents / roster / users) ---- */
body.has-rail { overflow: hidden; }
.app-main { position: fixed; top: 56px; left: 232px; right: 0; bottom: 0; overflow-y: auto; }
.roster-group { margin-bottom: 24px; }
.roster-group h2 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--contour); }

/* ---- Incident stats strip ---- */
.inc-stats { display: flex; gap: 6px; margin-bottom: 10px; }
.inc-stat { flex: 1; background: var(--card); border: 1px solid var(--contour); border-radius: 10px; padding: 10px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.inc-stat-val { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.inc-stat-lab { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }

/* Sector progress bar on incident cards */
.sector-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--contour); margin-top: 8px; }
.sector-bar span { display: block; min-width: 2px; }
.sector-bar .sb-cleared { background: #2E7D4F; }
.sector-bar .sb-inprog { background: #E0A100; }
.sector-bar .sb-unsearched { background: #C8372D; }
.sector-bar .sb-research { background: #7B4FA6; }
.sector-summary { font-size: 10px; color: var(--ink-soft); margin-top: 3px; display: flex; gap: 8px; }
.sector-summary span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 3px; vertical-align: 1px; }
.sector-summary .ss-cleared::before { background: #2E7D4F; }
.sector-summary .ss-inprog::before { background: #E0A100; }
.sector-summary .ss-unsearched::before { background: #C8372D; }

/* Team chips on incident cards */
.team-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.team-chip { font-size: 10px; font-weight: 500; padding: 1px 6px; border-radius: 4px; background: rgba(31,92,139,.08); color: var(--accent); white-space: nowrap; }

/* Cross-incident activity feed */
.activity-feed { display: flex; flex-direction: column; gap: 0; overflow-y: auto; max-height: 220px; }
.af-row { display: flex; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--contour); font-size: 12px; align-items: flex-start; border-radius: 4px; margin-bottom: 2px; transition: background .12s ease; }
.af-row:hover { background: var(--paper); }
.af-row:last-child { border-bottom: none; }
.af-time { font-size: 10px; color: var(--ink-soft); white-space: nowrap; min-width: 36px; padding-top: 2px; }
.af-body { flex: 1; min-width: 0; }
.af-head { display: flex; gap: 6px; align-items: baseline; margin-bottom: 1px; }
.af-num { font-size: 10px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.af-name { font-size: 10px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-msg { color: var(--ink); line-height: 1.3; font-size: 12px; }

/* ---- Live-incidents list on the operations map ---- */
.inc-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; min-height: 0; }
.inc-row { border: 1px solid var(--contour); border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: background .12s, border-color .12s, box-shadow .12s; position: relative; overflow: hidden; background: var(--card); }
.inc-row::before { display: none; }
.inc-row:hover { background: var(--paper); border-color: var(--accent); box-shadow: 0 2px 8px rgba(28,43,51,.06); }
.inc-row.closed::before { background: var(--ink-soft); }
.inc-row.closed { opacity: .75; }
.inc-row .ir-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.inc-row .ir-name { font-weight: 600; font-size: 14px; }
.inc-row .ir-number { font-size: 11px; color: var(--ink-soft); margin-top: 1px; }
.inc-row .ir-meta { display: flex; gap: 12px; margin-top: 7px; font-size: var(--text-xs); color: var(--ink-soft); }
.inc-row .ir-meta .mono { color: var(--ink); }
.inc-popup-name { font-weight: 600; font-size: 14px; }
.inc-popup-num { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin: 2px 0 6px; }
.inc-popup-open { display: inline-block; margin-top: 8px; color: var(--accent); font-weight: 600; font-size: 13px; cursor: pointer; }

.inc-pin-container { overflow: visible !important; }
.inc-map-pin { display: flex; flex-direction: column; align-items: center; position: relative; }
.inc-map-pin-label { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--ink); background: #ffffffdd; padding: 2px 8px; border-radius: 4px; border: 1px solid var(--contour); white-space: nowrap; margin-bottom: 2px; box-shadow: 0 1px 4px rgba(0,0,0,.1); text-align: center; }
.inc-map-pin-icon { font-size: 32px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }

/* ---- Teams & roster ---- */
.team-block { background: var(--card); border: 1px solid var(--contour); border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.team-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--contour); }
.team-head .th-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.team-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.team-name { font-weight: 600; font-size: var(--text-lg); }
.team-cs { font-family: var(--mono); font-size: var(--text-xs); color: var(--ink-soft); margin-left: 4px; }
.team-meta { font-size: var(--text-xs); color: var(--ink-soft); }
.team-actions { display: flex; gap: 8px; align-items: center; }
.team-members { padding: 14px 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.team-members.empty { color: var(--ink-soft); font-size: 13px; display: block; }

.member-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--contour); border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: background .12s; }
.member-row:hover { background: var(--paper); }
.member-row .mr-name { font-weight: 600; font-size: 14px; }
.member-row .mr-sub { font-size: var(--text-xs); color: var(--ink-soft); margin-top: 1px; }
.member-row .mr-skills { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }

.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--paper); border: 1px solid var(--contour); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); font-weight: 600; font-size: 15px; flex-shrink: 0; }
.avatar-lg { width: 76px; height: 76px; font-size: 26px; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 4px; }
.swatches .sw { width: 26px; height: 26px; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.swatches .sw.sel { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset; }
.map-footer { position: fixed; left: 50%; transform: translateX(-50%); bottom: 6px; font-size: 11px; color: var(--ink-soft); background: rgba(247,248,246,.85); padding: 2px 10px; border-radius: 6px; z-index: 800; white-space: nowrap; font-family: var(--mono); }

.ws-panel { position: fixed; top: 68px; bottom: 12px; display: flex; flex-direction: column; gap: 12px; z-index: 900; }
.ws-left { left: 12px; width: 272px; }
.ws-right { right: 12px; width: 340px; }
.ws-card { background: var(--card); border: 1px solid var(--contour); border-radius: 10px; box-shadow: none; padding: 14px 16px; display: flex; flex-direction: column; min-height: 0; transition: box-shadow .15s, border-color .15s; }
.ws-card:hover { border-color: rgba(31,92,139,.15); box-shadow: 0 2px 8px rgba(28,43,51,0.06); }
.ws-card[hidden] { display: none; }
.ws-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ws-card-head.ws-collapsible { cursor: pointer; user-select: none; -webkit-user-select: none; }
.ws-card-head.ws-collapsible::after { content: "\e5cf"; font-family: "Material Symbols Outlined"; font-size: 20px; color: var(--ink-soft); transition: transform 200ms cubic-bezier(0.23,1,0.32,1); }
.ws-card.collapsed .ws-card-head.ws-collapsible::after { transform: rotate(-90deg); }
.ws-card.collapsed .ws-card-body { max-height: 0; opacity: 0; overflow: hidden; pointer-events: none; }
.ws-card.collapsed .ws-card-head { margin-bottom: 0; }
.ws-card.collapsed { flex: 0 0 auto !important; }
.ws-card-title { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }

/* sector list */
.sector-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 32vh; }
.sector-row { border: 1px solid var(--contour); border-radius: 10px; padding: 8px 10px; position: relative; overflow: hidden; background: var(--card); }
.sector-row::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--contour); }
.sector-row.unsearched::before { background: var(--unsearched); }
.sector-row.in-progress::before { background: var(--in-progress); }
.sector-row.cleared::before { background: var(--cleared); }
.sector-row.re-search::before { background: var(--re-search); }
.sector-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; gap: 6px; }
.sector-name { font-weight: 600; font-size: 14px; }
.sector-controls { display: flex; gap: 6px; align-items: center; }
.sector-controls select { font-family: inherit; font-size: 11px; color: var(--ink); border: 1px solid var(--contour); border-radius: 6px; padding: 3px 4px; background: var(--card); flex: 1; min-width: 0; }
.icon-btn { background: none; border: none; cursor: pointer; color: var(--ink-soft); font-size: 16px; line-height: 1; padding: 4px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; transition: background 120ms ease, color 120ms ease, transform 140ms cubic-bezier(0.23,1,0.32,1); }
.icon-btn:hover { background: var(--paper); color: var(--ink); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn:focus-visible { box-shadow: 0 0 0 3px rgba(31,92,139,.2); outline: none; }
.icon-btn.icon-btn-danger:hover { color: var(--rescue); }
.icon-btn .material-symbols-outlined { font-size: 18px; }

.empty-hint { font-size: var(--text-xs); color: var(--ink-soft); margin: 4px 2px; line-height: 1.5; }

/* units */
.unit-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 22vh; }
.unit-row { display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: 8px; }
.unit-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.unit-cs { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.unit-sub { font-size: 11px; color: var(--ink-soft); }
.unit-stale { opacity: 0.7; }
.stale-tag { font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; background: var(--rescue); color: #fff; text-transform: uppercase; letter-spacing: .3px; vertical-align: 1px; margin-left: 4px; animation: stale-pulse 2s ease-in-out infinite; }
@keyframes stale-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* log — chat style */
.ws-card-log { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.ws-card-log .ws-card-body { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; max-height: none; }
.log-scroll { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 2px 4px 0; }
.log-row { display: flex; gap: 10px; padding: 6px 10px; border-radius: 8px; align-items: flex-start; transition: background .1s; }
.log-row:hover { background: rgba(28,43,51,.02); }
.log-row.system { background: var(--paper); }
.log-row.alert { background: rgba(200,55,45,.05); }
.log-row.agency { background: rgba(91,107,191,.05); }
.log-org-badge { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: #5B6BBF; color: #fff; text-transform: uppercase; letter-spacing: .3px; }
.log-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; text-transform: uppercase; }
.log-content { flex: 1; min-width: 0; }
.log-sender { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.log-cs { font-family: var(--mono); font-size: var(--text-xs); font-weight: 600; color: var(--ink); }
.log-time { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); }
.log-msg { font-size: 13px; line-height: 1.4; color: var(--ink); }
.log-grid-link { color: var(--accent); font-family: var(--mono); font-size: 12px; background: rgba(31,92,139,.08); padding: 1px 4px; border-radius: 3px; text-decoration: none; cursor: pointer; }
.log-grid-link:hover { background: rgba(31,92,139,.18); text-decoration: underline; }
.log-entry { display: flex; gap: 8px; margin-top: 10px; }
.log-entry input { flex: 1; font-family: inherit; font-size: 13px; border: 1px solid var(--contour); border-radius: 8px; padding: 8px 10px; color: var(--ink); outline: none; }
.log-entry input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,92,139,.12); }
.log-entry-row { display: flex; gap: 6px; align-items: center; margin-top: 10px; }
.log-entry-row .log-entry { flex: 1; margin-top: 0; min-width: 0; }
.log-filters { margin-bottom: 8px; }
.log-search { width: 100%; font-family: inherit; font-size: 12px; border: 1px solid var(--contour); border-radius: 6px; padding: 6px 8px; color: var(--ink); outline: none; margin-bottom: 6px; box-sizing: border-box; }
.log-search:focus { border-color: var(--accent); }
.log-filter-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip-filter { font-size: 10px; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--contour); background: transparent; color: var(--ink-soft); cursor: pointer; font-family: inherit; font-weight: 500; }
.chip-filter:hover { border-color: var(--accent); }
.chip-filter.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.log-row.pinned { background: rgba(31,92,139,0.05); }
.log-row.decision { background: rgba(124,92,191,0.05); }
.log-pin { opacity: 0; cursor: pointer; font-size: 12px; transition: opacity 0.15s; color: var(--ink-soft); background: none; border: none; padding: 0 2px; font-family: 'Material Symbols Outlined'; }
.log-row:hover .log-pin { opacity: 0.6; }
.log-pin.is-pinned { opacity: 1; color: var(--accent); }
.log-delete { opacity: 0; cursor: pointer; font-size: 12px; transition: opacity 0.15s; color: var(--ink-soft); background: none; border: none; padding: 0 2px; font-family: 'Material Symbols Outlined'; }
.log-row:hover .log-delete { opacity: 0.4; }
.log-delete:hover { opacity: 1 !important; color: var(--rescue); }
.decision-rationale { font-size: 11px; color: #7C5CBF; font-style: italic; margin-top: 2px; }

/* incident pack */
.pack-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--contour); }
.pack-row:last-child { border-bottom: none; }
.pack-row .k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.pack-row .v { font-size: 13px; text-align: right; }
.pack-row .v.mono { font-family: var(--mono); }
.pack-row .v.medical { color: var(--rescue); }

/* leaflet sector label + popup */
.sector-label { font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600; color: var(--ink); background: rgba(255,255,255,.82); border: 1px solid var(--contour); padding: 1px 6px; border-radius: 5px; white-space: nowrap; }
.unit-marker .shape { width: 16px; height: 16px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(28,43,51,.4); border-radius: 50%; }
.unit-marker .shape.vehicle { border-radius: 3px; }
.unit-marker .shape.dog { border: none; clip-path: polygon(50% 0,100% 100%,0 100%); filter: drop-shadow(0 1px 2px rgba(28,43,51,.45)); }
.unit-marker .marker-label { position: absolute; left: 20px; top: 0; font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--ink); background: rgba(255,255,255,.85); padding: 0 4px; border-radius: 3px; white-space: nowrap; line-height: 16px; }
.unit-photo-marker { background: none !important; border: none !important; }
.unit-photo-pin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--accent); overflow: hidden; box-shadow: 0 2px 6px rgba(28,43,51,.35); background: var(--card); }
.unit-photo-pin img { width: 100%; height: 100%; object-fit: cover; display: block; }
.unit-photo-marker .marker-label { position: absolute; left: 44px; top: 8px; font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--ink); background: rgba(255,255,255,.85); padding: 0 4px; border-radius: 3px; white-space: nowrap; line-height: 16px; }
.unit-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

.team-list { display: flex; flex-direction: column; gap: 8px; }
.team-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--contour); border-radius: 8px; padding: 10px 12px; }
.team-item .t-name { font-weight: 600; font-size: 14px; }
.team-item .t-sub { font-size: 12px; color: var(--ink-soft); }
.team-item .t-cs { font-family: var(--mono); font-size: 12px; }

/* ---- Content-page lists (tasking / team) ---- */
.list-stack { display: flex; flex-direction: column; gap: 10px; }
.list-card { background: var(--card); border: 1px solid var(--contour); border-radius: 12px; box-shadow: 0 1px 3px rgba(28,43,51,0.04); padding: 14px 16px; position: relative; overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.list-card:hover { box-shadow: 0 2px 8px rgba(28,43,51,0.07); border-color: rgba(31,92,139,.2); }
.list-card.pending::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--in-progress); }
.list-card.active::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); }
.list-card.complete::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--cleared); }
.list-card .lc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.list-card .lc-title { font-weight: 600; font-size: 15px; }
.list-card .lc-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 13px; color: var(--ink-soft); }
.list-card .lc-meta .mono { color: var(--ink); }
.list-card .lc-controls { display: flex; gap: 8px; align-items: center; }
.list-card select { font-family: inherit; font-size: 12px; border: 1px solid var(--contour); border-radius: 6px; padding: 4px 6px; background: var(--card); }

/* team directory grid */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.member-card { background: var(--card); border: 1px solid var(--contour); border-radius: 12px; box-shadow: var(--shadow); padding: 16px; transition: transform 150ms cubic-bezier(0.23,1,0.32,1), box-shadow 150ms ease; }
.member-card .mc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.member-card .mc-name { font-weight: 600; font-size: var(--text-lg); }
.member-card .mc-cs { font-family: var(--mono); font-size: 12px; color: var(--accent); background: rgba(31,92,139,.1); padding: 2px 7px; border-radius: 5px; }
.member-card .mc-role { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin: 8px 0 10px; }
.member-card .mc-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.member-card .skill { font-family: var(--mono); font-size: 10px; background: var(--paper); border: 1px solid var(--contour); color: var(--ink-soft); padding: 2px 6px; border-radius: 4px; }
.member-card .mc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { background: var(--card); border: 1px solid var(--contour); border-radius: 12px; box-shadow: var(--shadow); padding: 16px 18px; }
.stat-card .sc-label { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.stat-card .sc-value { font-family: var(--mono); font-size: 26px; font-weight: 600; color: var(--accent); margin-top: 6px; }
.stat-card { transition: transform 150ms cubic-bezier(0.23,1,0.32,1), box-shadow 150ms ease; }

/* incident pack (briefing) layout */
.pack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pack-card { background: var(--card); border: 1px solid var(--contour); border-radius: 12px; box-shadow: var(--shadow); padding: 18px; transition: transform 150ms cubic-bezier(0.23,1,0.32,1), box-shadow 150ms ease; }
.pack-card.span-2 { grid-column: 1 / -1; }
.pack-card h2, .pack-card h3 { margin: 0 0 12px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.pack-card h2.collapsible, .pack-card h3.collapsible { cursor: pointer; display: flex; align-items: center; justify-content: space-between; user-select: none; -webkit-user-select: none; }
.pack-card h2.collapsible::after, .pack-card h3.collapsible::after { content: "\e5cf"; font-family: "Material Symbols Outlined"; font-size: 20px; transition: transform 200ms cubic-bezier(0.23,1,0.32,1); }
.pack-card.collapsed h2.collapsible::after, .pack-card.collapsed h3.collapsible::after { transform: rotate(-90deg); }
.pack-card.collapsed .pack-card-body { display: none; }
.pack-kv { display: flex; flex-direction: column; gap: 10px; }
.pack-kv .k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.pack-kv .v { font-size: 15px; margin-top: 2px; }
.pack-kv .v.mono { font-family: var(--mono); }
.pack-kv .v.medical { color: var(--rescue); }
.pushed { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--cleared); background: rgba(46,125,79,.08); border: 1px solid rgba(46,125,79,.25); border-radius: 8px; padding: 7px 12px; }
.misper-photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--contour); background: var(--paper); display: block; }
.misper-photo-empty { aspect-ratio: 1 / 1; border: 1px dashed var(--contour); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); font-size: 13px; text-align: center; padding: 10px; }

/* RV points & hazards display */
.rv-display { padding: 8px 0; border-bottom: 1px solid var(--contour); }
.rv-display:last-child { border-bottom: none; }
.rv-display .rv-name { font-weight: 600; font-size: 14px; }
.rv-display .rv-grid { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.rv-display .rv-sub { font-size: 12px; color: var(--ink-soft); }
.rv-display.hazard .rv-name { color: var(--rescue); }

/* row editors in the pack modal */
.row-editor { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.editor-row { display: flex; gap: 6px; align-items: center; }
.editor-row input, .editor-row select { font-family: inherit; font-size: 13px; border: 1px solid var(--contour); border-radius: 6px; padding: 7px 9px; background: var(--card); min-width: 0; }
.editor-row .ed-del { background: none; border: none; cursor: pointer; color: var(--ink-soft); padding: 4px; border-radius: 6px; display: flex; align-items: center; transition: background 120ms ease, color 120ms ease; }
.editor-row .ed-del:hover { background: var(--paper); color: var(--rescue); }

/* attachments */
.attach-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.attach-thumb { position: relative; width: 96px; height: 96px; border-radius: 8px; border: 1px solid var(--contour); background-size: cover; background-position: center; }
.attach-del { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; background: var(--rescue); color: #fff; border: 2px solid #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 120ms ease; }
.attach-del:hover { background: #a82e24; }
.attach-del .material-symbols-outlined { font-size: 14px; }
.attach-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.attach-file { position: relative; display: flex; align-items: center; gap: 8px; border: 1px solid var(--contour); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.attach-file a { word-break: break-all; }
.attach-empty { font-size: 13px; color: var(--ink-soft); margin: 4px 0; }

/* ---- Map symbols (SARGRID markers) ---- */
.map-symbol { text-align: center; }
.map-symbol img { display: block; filter: drop-shadow(0 2px 3px rgba(28,43,51,.35)); }
.symbol-label { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600; color: var(--ink); background: rgba(255,255,255,.88); border: 1px solid var(--contour); border-radius: 4px; padding: 0 5px; margin: 2px auto 0; white-space: nowrap; display: table; line-height: 16px; }

/* tools menu + marker palette (top-right of the map, clear of the side panel) */
.map-tools-tr { position: fixed; top: 68px; right: 384px; z-index: 850; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.tools-menu { background: var(--card); border: 1px solid var(--contour); border-radius: 12px; box-shadow: 0 8px 32px rgba(28,43,51,.14), 0 1px 3px rgba(28,43,51,.06); padding: 8px; display: flex; flex-direction: column; gap: 1px; min-width: 210px; max-height: calc(100vh - 100px); overflow-y: auto; }
.tools-menu[hidden], .marker-palette[hidden], .place-hint[hidden] { display: none; }
.tools-search { width: 100%; box-sizing: border-box; margin: 0 0 6px; padding: 7px 10px; font: inherit; font-size: 13px; color: var(--ink); background: var(--paper); border: 1px solid var(--contour); border-radius: 8px; }
.tools-search:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.tools-menu button[hidden], .tools-menu .tools-group-label[hidden], .tools-menu .tools-divider[hidden] { display: none !important; }
.tools-group-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); padding: 10px 12px 4px; }
.tools-group-label:first-child { padding-top: 4px; }
.tools-menu button { display: flex; align-items: center; gap: 10px; background: none; border: none; padding: 7px 12px; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 13px; color: var(--ink); text-align: left; transition: background 100ms ease; }
.tools-menu button:hover { background: var(--paper); }
.tools-menu button:active { background: rgba(31,92,139,.08); }
.tools-menu button .material-symbols-outlined { font-size: 18px; color: var(--ink-soft); }
.tools-divider { height: 1px; background: var(--contour); margin: 4px 8px; }
.tools-more-toggle { color: var(--accent) !important; font-weight: 500; }
.tools-more-toggle .material-symbols-outlined { color: var(--accent) !important; font-size: 18px; transition: transform 200ms cubic-bezier(0.23,1,0.32,1); }
.tools-more-toggle.open .material-symbols-outlined { transform: rotate(180deg); }
.sector-popup .sp-name { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.sector-popup select { font-family: inherit; font-size: 12px; border: 1px solid var(--contour); border-radius: 6px; padding: 4px 6px; margin-bottom: 6px; width: 100%; }
.sp-theory { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.sp-theory label { font-size: 11px; color: var(--ink-soft); display: flex; align-items: center; gap: 3px; }
.sp-theory input { font-size: 12px; border: 1px solid var(--contour); border-radius: 4px; padding: 2px 4px; }
.pos-bar-wrap { height: 8px; background: var(--contour); border-radius: 4px; margin-bottom: 8px; overflow: hidden; }
.pos-bar { height: 100%; background: linear-gradient(90deg, #2E7D4F, #7C5CBF); border-radius: 4px; transition: width 0.5s ease; }
.pos-detail { font-size: 12px; color: var(--ink-soft); }
.pos-detail .pos-row { display: flex; justify-content: space-between; padding: 2px 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
.pos-detail .pos-row:last-child { border-bottom: none; }
.pos-detail .pos-label { font-weight: 500; }
.pos-detail .pos-val { font-family: var(--mono); font-size: 11px; }

/* inline field for maritime detail card */
.field-inline { width: 100%; border: 1px solid var(--contour); border-radius: 4px; padding: 3px 6px; font-size: 11px; background: var(--paper); color: var(--ink); font-family: inherit; }
.field-inline.mono { font-family: var(--mono); }
select.field-inline { appearance: auto; }
#maritime-detail-card .pos-label { display: block; font-size: 10px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 2px; }

/* workflow steps */
.wf-step { display: flex; align-items: flex-start; gap: 8px; padding: 6px 4px; border-radius: 6px; cursor: pointer; transition: background .15s; }
.wf-step:hover { background: var(--paper); }
.wf-step.done { opacity: 0.5; }
.wf-step.done .wf-num { background: var(--cleared); }
.wf-step.active .wf-num { background: var(--accent); }
.wf-num { width: 20px; height: 20px; border-radius: 50%; background: var(--contour); color: #fff; font-weight: 700; font-size: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wf-text { line-height: 1.4; }
.sector-pin { text-align: center; pointer-events: none; }
.sector-pin img { display: block; margin: 0 auto; filter: drop-shadow(0 2px 3px rgba(28,43,51,.35)); }

/* Search urgency assessment */
.urgency-pill { font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.urgency-pill.emergency { background: rgba(200,55,45,.12); color: var(--rescue); border: 1px solid rgba(200,55,45,.4); }
.urgency-pill.measured { background: rgba(224,161,0,.12); color: #9A7600; border: 1px solid rgba(224,161,0,.4); }
.urgency-pill.evaluate { background: rgba(46,125,79,.1); color: var(--cleared); border: 1px solid rgba(46,125,79,.35); }
.urgency-meta { font-size: 12px; color: var(--ink-soft); margin-top: 8px; }
.urgency-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; margin-top: 12px; }
.urgency-breakdown .ub-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--contour); font-size: 13px; }
.urgency-breakdown .ub-row .ub-val { font-family: var(--mono); font-weight: 600; min-width: 18px; text-align: right; }
.urgency-breakdown .ub-row .ub-val.ub-warn { color: var(--rescue); }
.urgency-total-bar { display: flex; align-items: center; justify-content: space-between; background: var(--paper); border: 1px solid var(--contour); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.urgency-total-bar span:first-child { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.urgency-cats { display: flex; flex-direction: column; gap: 0; }
.urgency-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--contour); }
.urgency-row:last-child { border-bottom: none; }
.urgency-label { flex: 0 0 180px; font-size: 13px; font-weight: 600; }
.urgency-row select { flex: 1; font-family: inherit; font-size: 13px; border: 1px solid var(--contour); border-radius: 6px; padding: 8px 10px; background: var(--card); }
.urgency-row select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,92,139,.12); outline: none; }
.urgency-row select.has-one { border-color: rgba(200,55,45,.5); background: rgba(200,55,45,.04); }

.map-tools { position: fixed; top: 68px; left: 244px; z-index: 850; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.place-hint { background: var(--navy); color: #fff; font-size: 12px; font-weight: 500; padding: 6px 12px; border-radius: 8px; box-shadow: var(--shadow); }
.marker-palette { background: var(--card); border: 1px solid var(--contour); border-radius: 10px; box-shadow: var(--shadow); padding: 10px; width: 300px; max-height: 60vh; overflow-y: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.palette-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; text-align: center; }
.palette-item:hover { background: var(--paper); border-color: var(--contour); }
.palette-item img { width: 26px; height: 32px; }
.palette-item span { font-size: 9px; line-height: 1.1; color: var(--ink-soft); }

/* mini location picker (pack casualty location) */
.mini-map { height: 200px; border: 1px solid var(--contour); border-radius: 8px; margin-top: 8px; background: #eef0ec; }

/* ---- User cards (users management) ---- */
.user-card-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--contour); flex-shrink: 0; }
.user-card-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.edit-photo-preview { width: 48px; height: 48px; flex-shrink: 0; }

.uc-card { background: var(--card); border: 1px solid var(--contour); border-radius: 12px; box-shadow: 0 1px 3px rgba(28,43,51,0.04); transition: box-shadow .15s ease, border-color .15s ease; }
.uc-card:hover { box-shadow: 0 2px 8px rgba(28,43,51,0.07); border-color: rgba(31,92,139,.18); }
.uc-body { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; }
.uc-photo { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid var(--contour); flex-shrink: 0; }
.uc-avatar { width: 46px; height: 46px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; flex-shrink: 0; }
.uc-info { min-width: 0; }
.uc-row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.uc-name { font-weight: 600; font-size: 15px; }
.uc-you { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: var(--paper); color: var(--ink-soft); border: 1px solid var(--contour); line-height: 1.4; }
.uc-agency-chip { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: #5B6BBF; color: #fff; line-height: 1.4; }
.uc-tier { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 4px; line-height: 1.4; }
.uc-row2 { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; }
.uc-sep { color: var(--contour); font-size: 12px; }
.uc-uid { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.uc-callsign { color: var(--accent); }
.uc-row3 { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.uc-team-chip { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: var(--paper); color: var(--ink-soft); border: 1px solid var(--contour); }
.uc-skill-chip { font-size: 11px; padding: 2px 8px; border-radius: 4px; background: rgba(31,92,139,0.08); color: var(--accent); }
.uc-actions { display: flex; gap: 2px; align-items: center; flex-shrink: 0; }
.uc-act-btn { width: 32px; height: 32px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 8px; border: none; background: transparent; color: var(--ink-soft); cursor: pointer; transition: background 120ms ease, color 120ms ease, transform 140ms cubic-bezier(0.23,1,0.32,1); }
.uc-act-btn .material-symbols-outlined { font-size: 18px; }
.uc-act-btn:hover { background: var(--paper); color: var(--ink); }
.uc-act-btn:active { transform: scale(0.92); }
.uc-act-btn:focus-visible { box-shadow: 0 0 0 3px rgba(31,92,139,.2); outline: none; }
.uc-del-btn:hover { background: rgba(200,55,45,0.08); color: #C8372D; }

/* ---- Member profile page ---- */
.profile-card { background: var(--card); border: 1px solid var(--contour); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; animation: cardFadeUp 300ms cubic-bezier(0.23,1,0.32,1) both; }
.profile-header { display: flex; align-items: center; gap: 20px; padding: 28px 28px 20px; border-bottom: 1px solid var(--contour); }
.profile-photo { width: 80px; height: 80px; border-radius: 50%; background: var(--paper); border: 2px solid var(--contour); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-identity { flex: 1; }
.profile-name { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.profile-meta { display: flex; align-items: center; gap: 10px; }
.profile-meta .mono { font-size: 14px; color: var(--accent); font-weight: 600; }
.profile-team { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.profile-sections { padding: 0 28px 28px; }
.profile-section { padding-top: 20px; }
.profile-section + .profile-section { border-top: 1px solid var(--contour); margin-top: 20px; }
.profile-section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin: 0 0 14px; display: flex; align-items: center; gap: 6px; }
.profile-section-title .material-symbols-outlined { font-size: 18px; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.profile-field label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 3px; }
.profile-field span { font-size: 14px; color: var(--ink); }
.profile-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-chip { font-size: 12px; font-weight: 500; padding: 4px 12px; border-radius: 6px; background: rgba(31,92,139,.08); color: var(--accent); border: 1px solid rgba(31,92,139,.15); }

/* ---- Response board (callout responses) ---- */
.resp-summary { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.resp-stat { display: flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 6px; background: var(--paper); }
.resp-stat .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.resp-stat .dot.green { background: #2E7D4F; }
.resp-stat .dot.amber { background: #E0A100; }
.resp-stat .dot.grey { background: #999; }
.resp-stat .dot.red { background: var(--rescue); }
.resp-list { display: flex; flex-direction: column; gap: 2px; max-height: 200px; overflow-y: auto; }
.resp-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: 13px; }
.resp-row:hover { background: var(--paper); }
.resp-row .resp-name { flex: 1; font-weight: 500; }
.resp-row .resp-cs { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); }
.resp-row .resp-status { font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.resp-row .resp-status.s-available { background: rgba(46,125,79,.12); color: #2E7D4F; }
.resp-row .resp-status.s-delayed { background: rgba(224,161,0,.12); color: #9A7600; }
.resp-row .resp-status.s-unavailable { background: rgba(90,107,116,.1); color: var(--ink-soft); }
.resp-row .resp-status.s-pending { background: var(--paper); color: #999; }
.resp-row .resp-eta { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); }

/* ---- Callout target checkboxes ---- */
.callout-team-list { display: flex; flex-direction: column; gap: 4px; }
.callout-team-list label { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.callout-team-list label:hover { background: var(--paper); }
.callout-team-list input { accent-color: var(--accent); }
.callout-all { font-weight: 600; border-bottom: 1px solid var(--contour); padding-bottom: 8px; margin-bottom: 4px; }

/* ---- Loading / skeleton states ---- */
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.skeleton { background: linear-gradient(90deg, var(--contour) 25%, rgba(217,222,218,.4) 50%, var(--contour) 75%); background-size: 800px 100%; animation: shimmer 1.5s infinite linear; border-radius: 6px; }
.skeleton-line { height: 14px; margin-bottom: 8px; border-radius: 4px; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w40 { width: 40%; }
.skeleton-card { height: 72px; border-radius: 10px; margin-bottom: 8px; }
.skeleton-stat { height: 64px; border-radius: 10px; }
.page-loading { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.page-loading-spinner { display: flex; align-items: center; justify-content: center; padding: 40px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--contour); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999; pointer-events: none; }
.loading-bar::after { content: ''; display: block; height: 100%; width: 30%; background: var(--accent); border-radius: 0 2px 2px 0; animation: loading-slide 1.2s ease-in-out infinite; }
@keyframes loading-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }
.loading-bar[hidden] { display: none; }

/* ---- Field validation ---- */
.field-error input, .field-error select, .field-error textarea { border-color: var(--rescue) !important; }
.field-error-msg { font-size: 11px; color: var(--rescue); margin-top: 3px; }

/* ============== Mobile responsive (<768px) ============== */
/* modals — unified overlay (works with both .modal-overlay and .modal-back) */
.modal-overlay, .modal-back { position: fixed; inset: 0; background: rgba(28,43,51,.5); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; animation: modal-backdrop-in 200ms ease-out both; }
.modal-overlay[hidden], .modal-back[hidden] { display: none; }
.modal-card, .modal > .modal-body { background: var(--card); border-radius: 14px; padding: 24px 28px; box-shadow: 0 12px 48px rgba(28,43,51,.22), 0 2px 6px rgba(28,43,51,.08); width: 100%; max-width: 520px; animation: modal-in 200ms cubic-bezier(0.23,1,0.32,1) both; }
.modal-card h3 { font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.01em; }
.modal-card > p { font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.modal-card-sm { max-width: 420px; }
.modal-card-md { max-width: 520px; }
.modal-card-lg { max-width: 580px; }
.modal-card-xl { max-width: 640px; }
.modal-card-scroll { max-height: 85vh; overflow-y: auto; }
.modal-panel { background: var(--card); border-radius: 14px; box-shadow: 0 12px 48px rgba(28,43,51,.22), 0 2px 6px rgba(28,43,51,.08); width: 100%; animation: modal-in 200ms cubic-bezier(0.23,1,0.32,1) both; overflow: hidden; }
.modal-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--contour); }
.modal-panel-head h3 { margin: 0; font-size: var(--text-lg); font-weight: 700; }
.modal-panel-body { padding: 20px 24px; }
.modal-panel-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--contour); }
.shared-link-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--contour); font-size: 12px; }
.shared-link-row .sl-name { font-weight: 600; font-family: var(--mono); }
.shared-link-row .sl-org { color: var(--ink-soft); }
.shared-link-row .sl-revoked { text-decoration: line-through; opacity: .5; }
.shared-link-row .btn { flex-shrink: 0; }

@media (max-width: 768px) {
  /* -- App bar: compact -- */
  .appbar { height: 48px; padding: 0 12px; }
  .appbar-left .wordmark { font-size: 16px; }
  .appbar-left .btn { font-size: 11px; padding: 4px 8px; }
  .appbar-left .divider-v { display: none; }
  .appbar-right { gap: 8px; }
  .appbar-right .divider-v { display: none; }
  .appbar-right .btn { font-size: 11px; padding: 4px 8px; }
  .ws-stat .lab { font-size: 9px; }
  .ws-stat .val { font-size: 12px; }
  .pill { font-size: 10px; padding: 1px 7px; }

  /* -- Nav rail → bottom tab bar -- */
  .rail { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 56px;
    flex-direction: row; padding: 0; gap: 0; border-right: none; border-top: 1px solid var(--contour);
    z-index: 1200; overflow: hidden; justify-content: space-around; }
  .rail-incident { display: none; }
  .rail-foot { display: none; }
  .rail a.nav, .rail .more-btn { flex: 1; flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 10px; text-align: center; justify-content: center; border-radius: 0; min-width: 0; }
  .rail a.nav .material-symbols-outlined, .rail .more-btn .material-symbols-outlined { font-size: 22px; }
  .rail .more-btn { display: flex; align-items: center; border: none; background: transparent; color: var(--ink-soft); cursor: pointer; font-family: inherit; font-weight: 500; transition: color 120ms ease; }
  .rail .more-btn.active { color: var(--accent); }

  /* -- More menu (slide-up sheet) -- */
  .more-menu-back { position: fixed; inset: 0; z-index: 1300; background: rgba(28,43,51,0); pointer-events: none; transition: background 200ms ease; }
  .more-menu-back.open { background: rgba(28,43,51,0.4); pointer-events: auto; backdrop-filter: blur(2px); }
  .more-menu { position: absolute; bottom: 0; left: 0; right: 0; background: var(--card); border-radius: 16px 16px 0 0; box-shadow: 0 -4px 24px rgba(28,43,51,0.15); transform: translateY(100%); transition: transform 280ms cubic-bezier(0.23,1,0.32,1); padding-bottom: env(safe-area-inset-bottom, 0); }
  .more-menu-back.open .more-menu { transform: translateY(0); }
  .more-menu-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; }
  .more-menu-title { font-weight: 600; font-size: var(--text-lg); color: var(--ink); }
  .more-menu-close { width: 32px; height: 32px; }
  .more-menu-items { padding: 4px 12px 16px; }
  .more-menu-item { display: flex; align-items: center; gap: 14px; padding: 14px 12px; border-radius: 10px; color: var(--ink-soft); font-size: 15px; font-weight: 500; transition: background 120ms ease, color 120ms ease; }
  .more-menu-item .material-symbols-outlined { font-size: 22px; color: var(--ink-soft); }
  .more-menu-item:hover, .more-menu-item:active { background: var(--paper); color: var(--ink); }
  .more-menu-item.active { color: var(--accent); }
  .more-menu-item.active .material-symbols-outlined { color: var(--accent); }

  /* -- Main content: remove rail offset, add bottom padding for tab bar -- */
  .main-content { left: 0; top: 48px; padding-bottom: 56px; }
  .main-content .container { padding: 16px 14px; }
  .app-main { left: 0; top: 48px; padding-bottom: 56px; }

  /* -- Page heads: stack on small screens -- */
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
  .page-title { font-size: 22px; }

  /* -- Grids → single column -- */
  .pack-grid { grid-template-columns: 1fr; overflow: hidden; }
  .pack-card { min-width: 0; overflow: hidden; }
  .pack-card.span-2 { grid-column: 1; }
  .row-2 { grid-template-columns: 1fr; gap: 0; }
  .container { overflow-x: hidden; }
  .incident-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .team-members { grid-template-columns: 1fr; }
  .urgency-breakdown { grid-template-columns: 1fr; }

  /* -- Dashboard map: relative, not fixed -- */
  body.app { overflow: auto; }
  #map { position: relative; top: auto; left: auto; right: auto; bottom: auto;
    width: 100%; height: 50vh; min-height: 280px; }
  .gridref-chip { position: absolute; left: 8px; bottom: 8px; font-size: 11px; padding: 3px 8px; z-index: 800; }
  .map-footer { position: fixed; left: 50%; bottom: 60px; font-size: 10px; }

  /* -- Dashboard panels: flow below map -- */
  .float-right { position: relative; top: auto; right: auto; bottom: auto; width: 100%;
    padding: 0 0 66px; gap: 0; border-radius: 0; border: none; box-shadow: none; }
  .sidebar-tabs { position: sticky; top: 0; z-index: 10; }
  .sidebar-pane { padding: 8px 10px; }
  .sidebar-pane .ws-card { border: 1px solid var(--contour); }
  .ws-card-log { max-height: 50vh; }
  .log-scroll { max-height: 30vh; }

  /* -- Map tools: reposition for mobile -- */
  .map-tools-tr { top: 56px; right: 8px; }
  .map-tools { left: 8px; top: 56px; }
  .marker-palette { width: 260px; }

  /* -- Workspace panels (incidents home left/right) -- */
  .ws-panel { position: relative; top: auto; left: auto; right: auto; bottom: auto; width: 100%; }
  .ws-left, .ws-right { width: 100%; }

  /* -- Modals: full-width on mobile -- */
  .modal-back { padding: 8px; align-items: flex-end; }
  .modal { max-width: 100%; max-height: 85vh; border-radius: 12px 12px 0 0; }
  .modal-body { padding: 16px; }
  .modal-head { padding: 14px 16px; }
  .modal-foot { padding: 12px 16px; }

  /* -- Search urgency: stack labels above dropdowns -- */
  .urgency-row { flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 0; }
  .urgency-label { flex: none; font-size: 12px; }
  .urgency-pill { white-space: normal; font-size: 10px; text-align: center; }
  #urgency-card > div:first-child { flex-wrap: wrap; gap: 6px; }

  /* -- Auth page: keep card padded from edges -- */
  .auth-card { max-width: calc(100% - 32px); }
  input, select, textarea { font-size: 16px !important; }

  /* -- Buttons: touch-friendly sizing -- */
  .btn { padding: 10px 16px; min-height: 42px; }
  .btn-sm { padding: 7px 12px; min-height: 36px; }

  /* -- Pack page specifics -- */
  .misper-photo { max-width: 200px; }
  .pushed { font-size: 11px; padding: 5px 10px; }

  /* -- Sectors page -- */
  .sector-list { max-height: none; }
  .unit-list { max-height: none; }

  /* -- User cards: compact for mobile -- */
  .uc-body { grid-template-columns: auto 1fr; gap: 10px; padding: 12px 14px; }
  .uc-actions { grid-column: 1 / -1; justify-content: flex-end; padding-top: 4px; border-top: 1px solid var(--contour); margin-top: 4px; }
  .uc-name { font-size: 14px; }
  .uc-row2 { font-size: 12px; }

  /* -- Profile page: compact header -- */
  .profile-header { flex-direction: column; align-items: center; text-align: center; padding: 20px 16px 16px; }
  .profile-sections { padding: 0 16px 16px; }
}

/* ---- Availability page ---- */
.avail-summary { display: flex; gap: 12px; margin-bottom: 20px; }
.avail-stat { flex: 1; background: var(--card); border: 1px solid var(--contour); border-radius: 12px; box-shadow: var(--shadow); padding: 16px; text-align: center; animation: cardFadeUp 300ms cubic-bezier(0.23,1,0.32,1) both; }
.avail-stat:nth-child(1) { animation-delay: 0ms; }
.avail-stat:nth-child(2) { animation-delay: 60ms; }
.avail-stat:nth-child(3) { animation-delay: 120ms; }
.avail-num { display: block; font-size: 26px; font-weight: 700; }
.avail-label { font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.5px; }
.avail-ok .avail-num { color: #2E7D4F; }
.avail-limited .avail-num { color: var(--amber-text); }
.avail-off .avail-num { color: #C8372D; }

.avail-grid-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--contour); border-radius: 8px; }
.avail-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.avail-grid th { padding: 10px 8px; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--ink-soft); border-bottom: 1px solid var(--contour); white-space: nowrap; }
.avail-grid td { padding: 8px; border-bottom: 1px solid var(--contour); }
.avail-grid tr:last-child td { border-bottom: none; }
.avail-name-col { text-align: left; min-width: 160px; position: sticky; left: 0; background: var(--card); z-index: 1; }
.avail-day-col { text-align: center; min-width: 70px; }
.avail-day-col.today { background: rgba(31, 92, 139, 0.06); }
.avail-cell { text-align: center; }
.avail-cell.today { background: rgba(31, 92, 139, 0.06); }
.avail-member-name { font-weight: 500; }

/* Team group headers in availability grid */
.avail-team-cell { padding: 0 !important; border-bottom: 1px solid var(--contour); background: var(--paper); }
.avail-team-toggle { display: flex; align-items: center; gap: 6px; width: 100%; padding: 10px 12px; border: none; background: transparent; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink); text-align: left; transition: background 120ms ease; }
.avail-team-toggle:hover { background: rgba(31,92,139,0.04); }
.avail-team-toggle:active { opacity: 0.7; }
.avail-chev { font-size: 20px; color: var(--ink-soft); transition: transform 200ms cubic-bezier(0.23,1,0.32,1); }
.avail-chev-closed { transform: rotate(-90deg); }
.avail-team-name { flex: 1; }
.avail-team-count { font-size: 12px; font-weight: 500; color: var(--ink-soft); background: var(--card); border: 1px solid var(--contour); border-radius: 10px; padding: 1px 8px; }
.avail-member-row td { transition: background 120ms ease; }

.avail-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.avail-dot-available { background: #2E7D4F; }
.avail-dot-limited { background: #E0A100; }
.avail-dot-unavailable { background: #C8372D; }

.avail-entry { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--contour); }
.avail-entry:last-child { border-bottom: none; }

/* ---------- Availability cards (Option C) ---------- */
.avc-section { margin-bottom: 16px; }
.avc-team-header { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 4px; border: none; background: transparent; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink); text-align: left; transition: background 120ms cubic-bezier(0.23,1,0.32,1), transform 140ms cubic-bezier(0.23,1,0.32,1); border-radius: 8px; }
.avc-team-header:hover { background: rgba(31,92,139,0.04); }
.avc-team-header:active { transform: scale(0.995); }
.avc-chev { font-size: 20px; color: var(--ink-soft); transition: transform 200ms cubic-bezier(0.23,1,0.32,1); }
.avc-chev-closed { transform: rotate(-90deg); }
.avc-team-name { flex: 1; }
.avc-team-frac { font-size: 12px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.avc-team-region { font-size: 11px; font-weight: 400; color: var(--ink-soft); margin-left: 6px; }
.avc-empty-team { font-size: 13px; color: var(--ink-soft); padding: 8px 4px 16px 32px; }
.avc-role { display: block; font-size: 11px; color: var(--ink-soft); }
.avc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 4px 0 12px; }
.avc-card { background: var(--card); border: 1px solid var(--contour); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px 12px; transition: box-shadow 200ms ease, transform 160ms ease-out; }
.avc-card { animation: cardFadeUp 300ms cubic-bezier(0.23,1,0.32,1) both; }
.avc-card:nth-child(1) { animation-delay: 0ms; }
.avc-card:nth-child(2) { animation-delay: 50ms; }
.avc-card:nth-child(3) { animation-delay: 100ms; }
.avc-card:nth-child(4) { animation-delay: 150ms; }
.avc-card:nth-child(n+5) { animation-delay: 200ms; }
.avc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.avc-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; font-family: var(--mono); flex-shrink: 0; }
.avc-info { flex: 1; min-width: 0; }
.avc-name { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avc-callsign { display: block; font-size: 11px; color: var(--accent); }
.avc-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap; flex-shrink: 0; }
.avc-badge.avc-ok { background: rgba(46,125,79,0.1); color: #2E7D4F; }
.avc-badge.avc-limited { background: rgba(224,161,0,0.12); color: #b88a00; }
.avc-badge.avc-off { background: rgba(200,55,45,0.1); color: #C8372D; }
.avc-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.avc-day { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 0; border-radius: 6px; }
.avc-day-letter { font-size: 10px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; }
.avc-day-num { font-size: 12px; font-weight: 600; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.avc-day-available .avc-day-num { background: rgba(46,125,79,0.12); color: #2E7D4F; }
.avc-day-limited .avc-day-num { background: rgba(224,161,0,0.14); color: #b88a00; }
.avc-day-unavailable .avc-day-num { background: rgba(200,55,45,0.12); color: #C8372D; }
.avc-day-today { position: relative; }
.avc-day-today .avc-day-num { outline: 2px solid var(--accent); outline-offset: 1px; }
.avc-view-toggle { display: inline-flex; background: var(--paper); border: 1px solid var(--contour); border-radius: 8px; overflow: hidden; }
.avc-view-btn { border: none; background: transparent; padding: 6px 14px; font-size: 13px; font-weight: 500; color: var(--ink-soft); cursor: pointer; font-family: inherit; transition: background 120ms cubic-bezier(0.23,1,0.32,1), color 120ms cubic-bezier(0.23,1,0.32,1), transform 140ms cubic-bezier(0.23,1,0.32,1); }
.avc-view-btn:active { transform: scale(0.96); }
.avc-view-btn:focus-visible { box-shadow: 0 0 0 3px rgba(31,92,139,.2); outline: none; }
.avc-view-btn.active { background: var(--accent); color: #fff; font-weight: 600; }
.avc-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.avc-month-head { font-size: 10px; font-weight: 600; color: var(--ink-soft); text-align: center; padding: 4px 0; text-transform: uppercase; }
.avc-month-day { font-size: 11px; font-weight: 500; text-align: center; padding: 4px 0; border-radius: 4px; min-height: 28px; display: flex; align-items: center; justify-content: center; }
.avc-month-day.avc-md-empty { background: transparent; }
.avc-month-day.avc-md-available { background: rgba(46,125,79,0.1); color: #2E7D4F; }
.avc-month-day.avc-md-limited { background: rgba(224,161,0,0.12); color: #b88a00; }
.avc-month-day.avc-md-unavailable { background: rgba(200,55,45,0.1); color: #C8372D; }
.avc-month-day.avc-md-today { outline: 2px solid var(--accent); outline-offset: -1px; }
.avc-card[data-uid] { cursor: pointer; }
.avc-day-edit { cursor: pointer; }
.avc-day-edit:hover .avc-day-num { box-shadow: 0 0 0 2px var(--accent); }
.avc-day-edit.avc-month-day:hover { box-shadow: 0 0 0 2px var(--accent); }

/* Availability quick-edit popover */
.avail-pop { position: absolute; z-index: 3000; transform: translateX(-50%); background: var(--card); border: 1px solid var(--contour); border-radius: 10px; box-shadow: 0 8px 24px rgba(28,43,51,.18), 0 2px 6px rgba(28,43,51,.08); padding: 6px; display: flex; flex-direction: column; gap: 2px; min-width: 140px; animation: modal-in 120ms cubic-bezier(0.23,1,0.32,1) both; }
.avail-pop-title { font-size: 11px; font-weight: 600; color: var(--ink-soft); padding: 4px 8px 2px; }
.avail-pop-opt { border: none; background: transparent; text-align: left; padding: 7px 10px; border-radius: 6px; font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer; transition: background 100ms ease, transform 140ms cubic-bezier(0.23,1,0.32,1); }
.avail-pop-opt:hover { background: var(--paper); }
.avail-pop-opt:active { transform: scale(0.97); }
.avail-pop-opt:focus-visible { box-shadow: 0 0 0 3px rgba(31,92,139,.2); outline: none; }
.avail-pop-available { color: #2E7D4F; }
.avail-pop-limited { color: #b88a00; }
.avail-pop-unavailable { color: #C8372D; }
@media (max-width: 768px) {
  .avc-grid { grid-template-columns: 1fr; }
}

/* Member profile modal fields */
.mm-fields { display: flex; flex-direction: column; gap: 0; }
.mm-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--contour); }
.mm-row:last-child { border-bottom: none; }
.mm-label { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.mm-val { font-size: 13px; color: var(--ink); text-align: right; }

.callout-avail-strip { font-size: 12px; color: var(--ink-soft); padding: 4px 0 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Settings page ---------- */
.settings-toggle { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--contour); cursor: pointer; }
.settings-toggle:last-child { border-bottom: none; }
.settings-toggle input[type="checkbox"] { margin-top: 3px; }
.toggle-info { display: flex; flex-direction: column; gap: 2px; }
.toggle-label { font-size: var(--text-sm); font-weight: 600; color: var(--ink); }
.toggle-desc { font-size: var(--text-xs); color: var(--ink-soft); line-height: 1.4; }
.toggle-desc code { font-size: 10px; background: var(--paper); padding: 1px 4px; border-radius: 3px; }

/* ---------- Hazard warnings ---------- */
.hazard-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 8px; margin-bottom: 4px; position: relative; overflow: hidden; border: none; }
.hazard-item::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; border-radius: 8px 8px 0 0; }
.hazard-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.hazard-body { flex: 1; min-width: 0; }
.hazard-title { font-size: 12px; font-weight: 600; margin: 0; }
.hazard-detail { font-size: 11px; color: var(--ink-soft); margin: 2px 0 0; line-height: 1.3; }

/* ---------- Drone feed panel ---------- */
.drone-feed-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--contour); font-size: 12px; cursor: pointer; border-radius: 6px; transition: background 120ms ease; }
.drone-feed-item:hover { background: var(--paper); }
.drone-feed-item:last-child { border-bottom: none; }
.drone-feed-name { font-weight: 600; }
.drone-feed-type { font-size: 10px; color: var(--ink-soft); font-family: var(--mono); }
.drone-feed-item.active { background: rgba(31,92,139,.08); }

/* Drone viewer floating panel */
.drone-viewer { position: fixed; top: 68px; left: 50%; transform: translateX(-50%); z-index: 1050; background: var(--card); border: 1px solid var(--contour); border-radius: 12px; box-shadow: 0 8px 32px rgba(28,43,51,.2); width: 560px; max-width: calc(100vw - 24px); overflow: hidden; animation: modal-in 200ms cubic-bezier(0.23,1,0.32,1) both; }
.drone-viewer-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--contour); cursor: move; }
.drone-viewer-head .dv-title { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.drone-viewer-head .dv-title .material-symbols-outlined { font-size: 16px; color: var(--accent); }
.drone-viewer-head .dv-type { font-family: var(--mono); font-size: 10px; color: var(--ink-soft); }
.drone-viewer-head .dv-controls { display: flex; align-items: center; gap: 4px; }
.drone-viewer-body { background: #111; position: relative; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; }
.drone-viewer-body img, .drone-viewer-body video { width: 100%; height: 100%; object-fit: contain; display: block; }
.drone-viewer-body .dv-placeholder { color: #888; font-size: 13px; text-align: center; padding: 20px; }
.drone-viewer-body .dv-placeholder code { display: block; font-size: 11px; margin-top: 6px; color: #666; word-break: break-all; }
.drone-viewer-foot { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px; font-size: 11px; color: var(--ink-soft); border-top: 1px solid var(--contour); }
.drone-viewer-foot .dv-live { display: flex; align-items: center; gap: 4px; font-weight: 600; color: var(--rescue); }
.drone-viewer-foot .dv-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rescue); animation: stale-pulse 2s ease-in-out infinite; }
@media (max-width: 768px) {
  .drone-viewer { width: calc(100vw - 16px); top: 56px; }
}

/* ---------- AI search plan ---------- */
.plan-sector { padding: 8px; border-radius: 6px; background: var(--paper); margin-bottom: 6px; }
.plan-sector-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.plan-sector-name { font-weight: 600; font-size: 13px; }
.plan-sector-rank { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.plan-sector-stats { display: flex; gap: 10px; font-size: 11px; color: var(--ink-soft); flex-wrap: wrap; }
.plan-sector-stats .mono { color: var(--accent); font-weight: 600; }
.plan-rationale { font-size: 11px; color: var(--ink-soft); margin-top: 3px; font-style: italic; }
.plan-apply-btn { font-size: 11px; margin-top: 4px; }

/* ---------- Training & hours page ---------- */
.tab-bar { display: flex; gap: 0; border-bottom: 2px solid var(--contour); margin-bottom: 20px; }
.tab-btn { padding: 8px 18px; font-size: 13px; font-weight: 600; border: none; background: none; cursor: pointer; color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color 120ms ease, border-color 120ms ease; }
.tab-btn:active { opacity: 0.7; }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.hours-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.hours-card { background: var(--card); border: 1px solid var(--contour); border-radius: 10px; padding: 14px; text-align: center; }
.hours-num { font-family: var(--mono); font-size: 24px; font-weight: 700; }
.hours-lbl { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.train-list { display: flex; flex-direction: column; gap: 6px; }
.train-card { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--card); border: 1px solid var(--contour); border-radius: 8px; }
.train-card .tc-title { font-weight: 500; font-size: var(--text-base); }
.train-card .tc-meta { font-size: var(--text-xs); color: var(--ink-soft); }
.type-chip { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 4px; text-transform: uppercase; }
.type-chip.training { background: rgba(31,92,139,0.12); color: var(--accent); }
.type-chip.cpd { background: rgba(124,92,191,0.12); color: #7C5CBF; }
.type-chip.exercise { background: rgba(46,125,79,0.12); color: #2E7D4F; }
.type-chip.cert { background: rgba(224,161,0,0.12); color: #B38300; }

/* ---------- Expenses page ---------- */
.exp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.exp-card { background: var(--card); border: 1px solid var(--contour); border-radius: 10px; padding: 14px; text-align: center; }
.exp-num { font-family: var(--mono); font-size: 24px; font-weight: 700; }
.exp-lbl { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.exp-list { display: flex; flex-direction: column; gap: 6px; }
.exp-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--card); border: 1px solid var(--contour); border-radius: 8px; }
.exp-row .er-desc { font-weight: 500; font-size: var(--text-base); }
.exp-row .er-meta { font-size: var(--text-xs); color: var(--ink-soft); }
.exp-row .er-amount { font-family: var(--mono); font-size: 16px; font-weight: 700; }
.status-pending { color: var(--amber-text); }
.status-approved { color: #2E7D4F; }
.status-rejected { color: #C8372D; }
.cat-bar { display: flex; gap: 6px; margin-bottom: 16px; }
.cat-chip { font-size: 11px; padding: 4px 10px; border-radius: 12px; background: var(--paper); border: 1px solid var(--contour); font-weight: 500; }

/* ---------- Reports page ---------- */
.stat-num { font-family: var(--mono); font-size: 28px; font-weight: 700; }
.stat-lbl { font-size: var(--text-xs); color: var(--ink-soft); margin-top: 2px; }
.chart-section { background: var(--card); border: 1px solid var(--contour); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.chart-section h3 { font-size: var(--text-base); margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-soft); }
.bar-chart { display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: flex; align-items: center; gap: 8px; }
.bar-label { font-size: 12px; min-width: 120px; max-width: 140px; text-align: right; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-fill { height: 22px; border-radius: 4px; background: var(--accent); display: flex; align-items: center; padding: 0 8px; min-width: 24px; }
.bar-fill span { font-family: var(--mono); font-size: 11px; color: #fff; font-weight: 600; }
.inc-report-list { display: flex; flex-direction: column; gap: 8px; }
.inc-report-card { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--card); border: 1px solid var(--contour); border-radius: 8px; }
.inc-report-card .irc-name { font-weight: 500; font-size: var(--text-base); }
.inc-report-card .irc-meta { font-size: var(--text-xs); color: var(--ink-soft); }

/* ---------- Respond page (public callout response) ---------- */
.respond-card { background: #fff; border: 1px solid var(--contour); border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.08); max-width: 420px; width: 100%; padding: 28px 24px; }
.respond-logo { font-weight: 800; font-size: 20px; color: var(--ink); margin-bottom: 20px; }
.respond-logo .o { color: var(--accent); }
.respond-alert { background: #FEF2F1; border: 1px solid #C8372D33; border-radius: 8px; padding: 14px 16px; margin-bottom: 20px; }
.respond-alert h2 { font-size: 15px; font-weight: 700; color: var(--rescue); margin: 0 0 4px; }
.respond-alert p { font-size: 13px; color: var(--ink); margin: 0; line-height: 1.5; }
.respond-incident { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin-bottom: 4px; }
.respond-name { font-size: var(--text-lg); font-weight: 600; margin-bottom: 16px; color: var(--ink); }
.respond-msg { font-size: 13px; color: var(--ink); margin-bottom: 20px; line-height: 1.6; background: var(--paper); border-radius: 8px; padding: 12px 14px; }
.respond-who { font-size: 13px; color: var(--ink-soft); margin-bottom: 20px; }
.respond-who strong { color: var(--ink); }
.respond-btns { display: flex; flex-direction: column; gap: 10px; }
.respond-btn { border: none; border-radius: 10px; padding: 16px; font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: transform 150ms cubic-bezier(0.23,1,0.32,1), box-shadow 150ms ease; }
.respond-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.respond-btn:active { transform: scale(0.97); box-shadow: none; }
.respond-btn.avail { background: #2E7D4F; color: #fff; }
.respond-btn.delayed { background: #E0A100; color: #fff; }
.respond-btn.unavail { background: var(--contour); color: var(--ink); }
.eta-row { display: none; align-items: center; gap: 10px; margin-top: 10px; }
.eta-row.show { display: flex; }
.eta-row label { font-size: 13px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.eta-row input { flex: 1; padding: 10px 12px; border: 1px solid var(--contour); border-radius: 8px; font-size: 14px; font-family: var(--mono); }
.eta-row button { padding: 10px 18px; border: none; border-radius: 8px; background: #E0A100; color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.respond-done { text-align: center; padding: 20px 0; }
.respond-done .check { font-size: 48px; margin-bottom: 8px; }
.respond-done h3 { margin: 0 0 4px; font-size: var(--text-lg); }
.respond-done p { margin: 0; font-size: 13px; color: var(--ink-soft); }
.respond-error { text-align: center; padding: 40px 0; color: var(--ink-soft); }
body.respond-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }

/* ---------- Request assistance page (public) ---------- */
body.req-page { display: flex; justify-content: center; padding: 24px 16px; }
.req-wrap { max-width: 640px; width: 100%; }
.req-header { text-align: center; margin-bottom: 24px; }
.req-header .wordmark { font-size: 22px; }
.req-header h1 { font-size: 20px; margin: 12px 0 4px; }
.req-header p { color: var(--ink-soft); font-size: 13px; margin: 0; }
.req-card { background: var(--card); border: 1px solid var(--contour); border-radius: 10px; padding: 24px; }
.req-section { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--contour); }
.req-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.req-section h2 { font-size: var(--text-base); text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-soft); margin: 0 0 12px; }
.req-urgency-row { display: flex; gap: 8px; }
.urgency-opt { flex: 1; text-align: center; padding: 10px 8px; border: 2px solid var(--contour); border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500; transition: all 0.15s; }
.urgency-opt:hover { border-color: var(--accent); }
.urgency-opt.selected { border-color: var(--accent); background: rgba(31,92,139,0.08); }
.urgency-opt.urgent.selected { border-color: #C8372D; background: rgba(200,55,45,0.08); }
.urgency-opt input { display: none; }
.req-confirm { display: none; text-align: center; padding: 40px 20px; }
.req-confirm .ref { font-family: var(--mono); font-size: 20px; font-weight: 600; color: var(--accent); }

/* ---------- Toast notifications ---------- */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 9000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; max-width: 380px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 10px; background: var(--card); border: 1px solid var(--contour); box-shadow: 0 8px 32px rgba(28,43,51,.16), 0 1px 3px rgba(28,43,51,.06); font-size: 13px; color: var(--ink); pointer-events: auto; opacity: 0; transform: translateX(20px); transition: opacity 200ms cubic-bezier(0.23,1,0.32,1), transform 200ms cubic-bezier(0.23,1,0.32,1); }
.toast.toast-in { opacity: 1; transform: translateX(0); }
.toast.toast-out { opacity: 0; transform: translateX(20px); }
.toast-icon { font-size: 20px; flex-shrink: 0; }
.toast-ok .toast-icon { color: var(--cleared); }
.toast-error .toast-icon { color: var(--rescue); }
.toast-warn .toast-icon { color: var(--in-progress); }
.toast-info .toast-icon { color: var(--accent); }
.toast-error { border-color: rgba(200,55,45,.3); background: rgba(200,55,45,.04); }
.toast-msg { flex: 1; line-height: 1.35; }
.toast-close { background: none; border: none; cursor: pointer; color: var(--ink-soft); padding: 2px; border-radius: 4px; display: flex; align-items: center; transition: color 120ms ease; }
.toast-close:hover { color: var(--ink); }
@media (max-width: 768px) { .toast-container { top: auto; bottom: 64px; right: 8px; left: 8px; max-width: none; } }

/* ============== Fix 3: prefers-reduced-motion ============== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .stale-tag { animation: none; }
}

/* ============== Fix 4: hover gating for touch devices ============== */
@media (hover: hover) and (pointer: fine) {
  .incident-card:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(28, 43, 51, 0.12); }
  .stat-card:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(28, 43, 51, 0.12); }
  .pack-card:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(28, 43, 51, 0.12); }
  .member-card:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(28, 43, 51, 0.12); }
  .avc-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
}

/* ============== Fix 5: collapsible section animation ============== */
.ws-card-body { transition: max-height 200ms cubic-bezier(0.23,1,0.32,1), opacity 150ms ease; max-height: 800px; overflow: hidden; }

/* ============== Fix 7: missing transition properties ============== */
.inc-row { transition: background .12s ease, border-color .12s ease, box-shadow .12s ease; }
.list-card { transition: box-shadow .15s ease, border-color .15s ease; }
.member-row { transition: background .12s ease; }
.chip-filter { transition: background 120ms ease, color 120ms ease, border-color 120ms ease; }

/* ============== Stagger animations on page load ============== */
@keyframes cardFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.incident-card { animation: cardFadeUp 300ms cubic-bezier(0.23,1,0.32,1) both; }
.incident-card:nth-child(1) { animation-delay: 0ms; }
.incident-card:nth-child(2) { animation-delay: 50ms; }
.incident-card:nth-child(3) { animation-delay: 100ms; }
.incident-card:nth-child(4) { animation-delay: 150ms; }
.incident-card:nth-child(5) { animation-delay: 200ms; }
.incident-card:nth-child(n+6) { animation-delay: 250ms; }

.stat-card { animation: cardFadeUp 300ms cubic-bezier(0.23,1,0.32,1) both; }
.stat-card:nth-child(1) { animation-delay: 0ms; }
.stat-card:nth-child(2) { animation-delay: 60ms; }
.stat-card:nth-child(3) { animation-delay: 120ms; }
.stat-card:nth-child(4) { animation-delay: 180ms; }

/* Bar chart fill animation — uses scaleX so inline width is preserved */
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.bar-fill { transform-origin: left center; animation: barGrow 500ms cubic-bezier(0.23,1,0.32,1) both; }
.bar-row:nth-child(1) .bar-fill { animation-delay: 100ms; }
.bar-row:nth-child(2) .bar-fill { animation-delay: 160ms; }
.bar-row:nth-child(3) .bar-fill { animation-delay: 220ms; }
.bar-row:nth-child(4) .bar-fill { animation-delay: 280ms; }
.bar-row:nth-child(5) .bar-fill { animation-delay: 340ms; }

/* User card stagger */
.uc-card { animation: cardFadeUp 300ms cubic-bezier(0.23,1,0.32,1) both; }
.uc-card:nth-child(1) { animation-delay: 0ms; }
.uc-card:nth-child(2) { animation-delay: 40ms; }
.uc-card:nth-child(3) { animation-delay: 80ms; }
.uc-card:nth-child(4) { animation-delay: 120ms; }
.uc-card:nth-child(5) { animation-delay: 160ms; }
.uc-card:nth-child(n+6) { animation-delay: 200ms; }

/* Toast stacking — offset older toasts */
.toast:nth-child(2) { transform: scale(0.98); opacity: 0.9; }
.toast:nth-child(3) { transform: scale(0.96); opacity: 0.8; }
.toast:nth-child(n+4) { transform: scale(0.94); opacity: 0.7; }
.toast.toast-in:nth-child(1) { transform: translateX(0) scale(1); }
.toast.toast-in:nth-child(2) { transform: translateX(0) scale(0.98); opacity: 0.9; }
.toast.toast-in:nth-child(3) { transform: translateX(0) scale(0.96); opacity: 0.8; }

/* ==========================================================================
   Field Paper refresh (direction A, Sep 2026)
   Actions are OS blue; SARGRID orange is the brand mark only. Red means an
   emergency or a sighting and nothing else. Placed last so it overrides the
   older rules above without rewriting them.
   ========================================================================== */
:root { --amber-text: #8A6200; --sighting-bg: #FBECEA; --sighting-ink: #9E2A22; }
:root[data-theme="dark"] { --amber-text: #E8B83A; --sighting-bg: rgba(200,55,45,.18); --sighting-ink: #F0A39C; }

/* Primary actions: blue. .btn-orange is kept as a class name for compatibility. */
.btn-orange, .btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-orange:hover, .btn-primary:hover { filter: none; background: #194D75; box-shadow: 0 2px 8px rgba(31,92,139,.25); transform: none; }
:root[data-theme="dark"] .btn-orange, :root[data-theme="dark"] .btn-primary { background: var(--accent); color: #0B1116; }
:root[data-theme="dark"] .btn-orange:hover, :root[data-theme="dark"] .btn-primary:hover { background: #79B6E2; }
.btn-danger { background: var(--rescue); color: #fff; border-color: var(--rescue); }
.btn-danger:hover { background: #A92D24; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: default; pointer-events: none; }

/* Browser surfaces */
:focus-visible { outline: 2px solid var(--accent) !important; outline-offset: 2px; box-shadow: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }
::selection { background: rgba(31,92,139,.22); }
.field-hint { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.field label .opt { font-weight: 400; color: var(--ink-soft); font-size: 12px; }

/* Readable minimums for functional text (was 9-10px) */
.chip-filter { font-size: 12px; padding: 4px 10px; }
.ws-stat .lab { font-size: 11px; letter-spacing: .01em; text-transform: none; }
.stale-tag { font-size: 10px; }
.log-org-badge { font-size: 11px; }
.pill { font-size: 12px; }
.text-amber { color: var(--amber-text) !important; }
.pos-bar { background: var(--accent); }

/* Pop-ups: quick, not theatrical */
.modal-overlay, .modal-back { transition: none; }
.sg-dialog-card { max-width: 460px; }
.sg-dialog-card h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.sg-dialog-intro { margin: 0 0 14px; color: var(--ink-soft); font-size: 14px; }
.sg-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.sg-dialog .field textarea { width: 100%; font: inherit; }

/* The station "More" sheet is a phone pattern; never render it on desktop. */
@media (min-width: 769px) { .more-menu-back { display: none !important; } }

/* Pack: an empty photo slot should not dominate the page */
.misper-photo-empty { aspect-ratio: auto; min-height: 96px; }

/* ---- Incident header: identity first ---- */
.ih-id { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.ih-num { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.ih-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38vw; }
.appbar-left { min-width: 0; }
.ih-facts { gap: 18px; }
.ih-facts .ws-stat .val { font-size: 14px; white-space: nowrap; }
.ih-wx .val { white-space: nowrap; }
.ih-menu-wrap { position: relative; }
.ih-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--card); border: 1px solid var(--contour); border-radius: 10px; box-shadow: 0 10px 30px rgba(28,43,51,.16); padding: 6px; z-index: 1500; display: flex; flex-direction: column; }
.ih-menu[hidden] { display: none; }
.ih-menu > button, .ih-menu > a { display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; font-size: 14px; color: var(--ink); background: none; border: 0; border-radius: 7px; padding: 9px 10px; cursor: pointer; text-decoration: none; }
.ih-menu > button:hover, .ih-menu > a:hover { background: var(--paper); }
.ih-menu > button .material-symbols-outlined, .ih-menu > a .material-symbols-outlined { font-size: 18px; color: var(--ink-soft); }
.ih-menu .danger, .ih-menu .danger .material-symbols-outlined { color: var(--rescue); }
.ih-menu hr { border: 0; border-top: 1px solid var(--contour); margin: 4px 2px; }

/* ---- Map quick actions (top of map, left of the side panel) ---- */
.map-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.map-act { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink); background: var(--card); border: 1px solid var(--contour); border-radius: 8px; box-shadow: var(--shadow); cursor: pointer; }
.map-act .material-symbols-outlined { font-size: 18px; }
.map-act:hover { border-color: var(--accent); }
.map-act.sighting { color: var(--rescue); border-color: rgba(200,55,45,.4); }
.map-act.sighting:hover { background: var(--sighting-bg); border-color: var(--rescue); }
.tools-hint { font-size: 12px; color: var(--ink-soft); padding: 8px 10px 4px; border-top: 1px solid var(--contour); margin-top: 4px; }

/* ---- Incident log as a radio log ---- */
.log-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; padding: 7px 8px; border-radius: 6px; align-items: start; }
.log-row .log-tcol { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); padding-top: 2px; font-variant-numeric: tabular-nums; }
.log-row .log-sender { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; flex-wrap: wrap; }
.cs-chip { font: 600 11px var(--mono); color: #fff; padding: 1px 6px; border-radius: 5px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-msg { font-size: 14px; }
.log-row.system { background: var(--paper); border-left: 3px solid #9AA8AF; border-radius: 0 6px 6px 0; }
.log-row.system .log-msg { color: var(--ink-soft); }
.log-row.st-cleared { border-left-color: var(--cleared); }
.log-row.st-progress { border-left-color: var(--in-progress); }
.log-row.decision { background: rgba(124,92,191,.06); border-left: 3px solid #7C5CBF; border-radius: 0 6px 6px 0; }
.log-row.agency { border-left: 3px solid #5B6BBF; border-radius: 0 6px 6px 0; }
.log-row.sighting, .log-row.alert { background: var(--sighting-bg); border-left: 3px solid var(--rescue); border-radius: 0 6px 6px 0; }
.log-row.sighting .log-msg, .log-row.alert .log-msg { color: var(--sighting-ink); font-weight: 600; }
.log-row.sighting-new { animation: sighting-pulse 1.6s ease-out 1; }
@keyframes sighting-pulse { 0% { box-shadow: 0 0 0 0 rgba(200,55,45,.5); } 100% { box-shadow: 0 0 0 12px rgba(200,55,45,0); } }
.log-day { text-align: center; font-size: 12px; color: var(--ink-soft); margin: 8px 0 2px; }
.log-pin, .log-delete { opacity: .35; min-width: 28px; min-height: 28px; font-size: 16px; }
.log-row:hover .log-pin, .log-row:focus-within .log-pin, .log-row:hover .log-delete, .log-row:focus-within .log-delete { opacity: .8; }
.log-pin.is-pinned { opacity: .9; }
@media (hover: none) { .log-pin, .log-delete { opacity: .6; } }
.log-sender .log-actions { margin-left: auto; display: inline-flex; }

/* ---- Phone: undo the desktop collapsed-rail rules (they out-rank the
   mobile block above) and give the incident screen a proper layout ---- */
@media (max-width: 768px) {
  body.rail-collapsed .rail { width: 100%; padding: 0; align-items: stretch; }
  body.rail-collapsed .rail a.nav { gap: 2px; padding: 6px 4px; justify-content: center; overflow: visible; }
  body.rail-collapsed .rail a.nav .nav-label { display: block; }
  body.rail-collapsed #map { left: auto; }
  body.rail-collapsed .main-content { left: 0; }
  .rail a.nav, .rail .more-btn { font-size: 11px; min-height: 52px; }

  /* incident header: two rows, identity then facts */
  .inc-appbar { height: auto; min-height: 48px; flex-wrap: wrap; padding: 6px 10px; row-gap: 4px; position: sticky; top: 0; z-index: 1100; }
  .inc-appbar .ih-wordmark, .inc-appbar .ih-back-lbl, .inc-appbar .divider-v { display: none; }
  .inc-appbar .appbar-left { flex: 1 1 0; min-width: 0; gap: 8px; }
  .inc-appbar > .ih-menu-wrap { order: 2; flex: none; }
  .inc-appbar .ih-name { max-width: none; font-size: 14px; }
  .inc-appbar .ih-facts { order: 3; width: 100%; justify-content: flex-start; gap: 14px; padding-top: 4px; border-top: 1px solid var(--contour); }
  .inc-appbar .ih-facts .ws-stat .val { font-size: 13px; }
  .inc-appbar .ih-facts { flex-wrap: wrap; row-gap: 4px; }
  .inc-appbar .ih-hide-phone { display: none; }
  .inc-appbar #shell-menu-btn .ih-menu-lbl { display: none; }
  .inc-appbar .ih-menu-wrap { position: static; }
  .inc-appbar .ih-menu { right: 8px; top: 52px; }

  /* incident dashboard: header / map / panel stack filling the screen, with
     the log input at the bottom of the panel, above the tab bar */
  body.app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  body.app > #appbar { flex: none; position: relative; }
  body.app #map { position: relative; flex: none; height: 32vh; min-height: 200px; left: auto; top: auto; right: auto; bottom: auto; width: 100%; }
  body.app .float-right { position: relative; flex: 1; min-height: 0; top: auto; right: auto; bottom: auto; width: 100%; padding: 0 0 56px; border: 0; border-radius: 0; box-shadow: none; display: flex; flex-direction: column; }
  body.app .sidebar-pane.active { flex: 1; min-height: 0; overflow-y: auto; }
  body.app .ws-card-log { max-height: none; }
  body.app .log-scroll { max-height: none; min-height: 0; }
  body.app .log-entry-row { margin-top: 6px; }
  #map > .map-tools-tr { position: absolute; top: 8px; right: 8px; z-index: 850; }
  #map > .gridref-chip { position: absolute; left: 8px; bottom: 8px; }
  .map-actions .map-act:not(.sighting):not(#tools-btn) { display: none; }
  .map-act { height: 40px; }
  .map-footer { display: none; }
  #map .leaflet-control-zoom { display: none; }

  /* other incident pages: content flows under the (taller) two-row header */
  #appbar.inc-appbar ~ .main-content { position: static; overflow: visible; padding-bottom: 72px; }
}

#callout-strip[hidden] { display: none !important; }

.is-zero { color: var(--ink-soft) !important; }

/* hidden always wins over component display rules (chips, strips, flex rows) */
[hidden] { display: none !important; }

/* Tablet / narrow laptop (769-1180px): the incident header can't fit the
   wordmark, five facts and the status pill — drop the decorative parts first. */
@media (min-width: 769px) and (max-width: 1180px) {
  .inc-appbar .ih-wordmark, .inc-appbar .divider-v, .inc-appbar .ih-hide-phone, .inc-appbar .ih-back-lbl { display: none; }
  .inc-appbar .ih-name { max-width: 28vw; }
  .inc-appbar .ih-facts { gap: 12px; }
  .inc-appbar .ih-facts .ws-stat .val { font-size: 13px; }
  .inc-appbar #shell-wx-wrap .lab { display: none; }
}

/* ---- Sentence case everywhere (spec: no uppercase shouting) ---- */
.eyebrow, .ws-stat .lab, .sidebar-tab, .roster-group h2, .inc-stat-lab, .log-org-badge, .pack-row .k,
.member-card .mc-role, .stat-card .sc-label, .pack-card h2, .pack-card h3, .pack-kv .k, .tools-group-label,
#maritime-detail-card .pos-label, .profile-section-title, .profile-field label, .avail-label, .avail-grid th,
.avc-month-head, .type-chip, .chart-section h3, .req-section h2, .stale-tag { text-transform: none; letter-spacing: 0; }
.sidebar-tab { font-size: 13px; }
.pack-card h2, .pack-card h3 { font-size: 14px; font-weight: 600; color: var(--ink); }
.conn-status { gap: 6px; }
.conn-text { font-size: 12px; color: var(--rescue); font-weight: 500; white-space: nowrap; }
.conn-text[hidden] { display: none; }
@media (max-width: 768px) { .conn-text { font-size: 11px; } }

.closed-banner { background: var(--paper); border-bottom: 1px solid var(--contour); color: var(--ink-soft); font-size: 13px; padding: 6px 16px; text-align: center; position: relative; z-index: 1100; }
body.app .closed-banner { position: fixed; top: 56px; left: 0; right: 0; }
@media (max-width: 768px) { body.app .closed-banner { position: relative; top: auto; } }
body.app.is-closed .map-tools-tr { top: 100px; }
body.app.is-closed .map-actions .map-act:not(#tools-btn) { display: none; }
@media (max-width: 768px) { body.app.is-closed .map-tools-tr { top: 56px; } }
body.app.is-closed .leaflet-top.leaflet-left { margin-top: 32px; }

/* Pass 5: hill parties, quiet incidents, respond next steps */
.party-section { margin-bottom: 18px; }
.party-head { font-size: 14px; font-weight: 600; color: var(--ink); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.party-head .party-count { font-size: 12px; font-weight: 400; color: var(--ink-soft); }
.member-card .sel-party { max-width: 110px; }
.stale-chip { font-size: 11px; color: var(--amber-text); background: rgba(224,161,0,.12); border: 1px solid rgba(224,161,0,.35); padding: 1px 7px; border-radius: 999px; }
.respond-next { margin-top: 18px; padding: 14px; border: 1px solid var(--contour); border-radius: 10px; background: var(--paper); text-align: left; }
.respond-next h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.respond-next p { margin: 6px 0; font-size: 14px; }
.respond-rv { padding: 6px 0; border-bottom: 1px solid var(--contour); font-size: 14px; }
.respond-rv:last-of-type { border-bottom: 0; }
.respond-rv-note { font-size: 13px; color: var(--ink-soft); }
.respond-deployed { color: #2E7D4F; font-weight: 600; }
.respond-open { display: block; margin-top: 12px; text-align: center; padding: 10px; border-radius: 8px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; }
