:root {
  --bg: #0f172a;
  --panel: #111827;
  --card: #1f2937;
  --text: #f9fafb;
  --muted: #9ca3af;
  --line: #374151;
  --blue: #2563eb;
  --green: #16a34a;
  --yellow: #ca8a04;
  --orange: #ea580c;
  --red: #dc2626;
  --gray: #6b7280;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #020617;
  border-bottom: 1px solid var(--line);
}

h1, h2, h3 { margin: 0 0 10px; }
h1 { font-size: 1.3rem; }
h2 { font-size: 1.05rem; }
h3 { font-size: 0.92rem; color: var(--muted); }

.subtle, .small { color: var(--muted); font-size: 0.86rem; }

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px;
  background: #020617;
  border-bottom: 1px solid var(--line);
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  color: white;
  background: var(--blue);
  cursor: pointer;
}

button.secondary { background: var(--gray); }
button.warn { background: var(--yellow); }
button.complete { background: var(--green); }
button.danger { background: var(--red); }
button.tab { background: var(--card); white-space: nowrap; }
button.tab.active { background: var(--blue); }
button.small-btn { padding: 7px 9px; font-size: 0.82rem; }

main { padding: 12px; }
.panel { display: none; }
.panel.active { display: block; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}

.template-banner {
  background: #020617;
  border: 1px solid var(--line);
  border-left: 6px solid var(--blue);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-weight: 800;
}

.board-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 12px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

label {
  display: block;
  margin: 10px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

input, textarea, select {
  width: 100%;
  display: block;
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px;
  background: #020617;
  color: var(--text);
  font-size: 1rem;
}

textarea {
  min-height: 300px;
  resize: vertical;
}

.quick-grid, .button-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-add {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.status-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.count-card {
  background: #020617;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  width: 100%;
}

.count-card.active-filter {
  outline: 3px solid var(--blue);
}

.filter-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #020617;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  margin: 10px 0;
}


.filter-text {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-label {
  color: var(--muted);
  font-weight: 700;
}

.filter-name {
  color: var(--text);
  font-weight: 800;
}

.count-card b { font-size: 1.4rem; display: block; }

.status-section { margin-top: 14px; }

.status-heading {
  padding: 8px 10px;
  border-radius: 10px;
  background: #020617;
  border: 1px solid var(--line);
  margin-bottom: 8px;
  font-weight: 800;
}

.apparatus-card { background: #020617; }

.app-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.app-id { font-size: 1.25rem; font-weight: 900; }
.assignment { font-size: 1.05rem; font-weight: 800; margin-bottom: 6px; }

.can-box {
  border-left: 4px solid var(--blue);
  background: #111827;
  border-radius: 10px;
  padding: 9px;
  margin: 8px 0;
  line-height: 1.35;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.benchmark-list { display: grid; gap: 7px; }

.benchmark-btn {
  text-align: left;
  background: #020617;
  border: 1px solid var(--line);
}

.benchmark-btn.done { background: #064e3b; }
.benchmark-btn.progress { background: #78350f; }
.benchmark-btn.not-started { background: #020617; }

.alert-item {
  background: #451a03;
  border: 1px solid #92400e;
  border-radius: 10px;
  padding: 9px;
  margin-bottom: 7px;
}

.alert-ok { background: #052e16; border: 1px solid #166534; }
.alert-critical { background: #450a0a; border-color: #991b1b; }
.alert-progress { background: #451a03; border-color: #92400e; }

.apparatus-card.status-available { border-left: 6px solid var(--green); }
.apparatus-card.status-committed { border-left: 6px solid var(--red); }
.apparatus-card.status-rehab { border-left: 6px solid var(--yellow); }
.apparatus-card.status-cleared { border-left: 6px solid var(--gray); opacity: 0.85; }

.count-card.status-available { border-color: var(--green); background: #052e16; }
.count-card.status-committed { border-color: var(--red); background: #450a0a; }
.count-card.status-rehab { border-color: var(--yellow); background: #451a03; }
.count-card.status-cleared { border-color: var(--gray); }

.status-pill {
  display: inline-block;
  margin-top: 5px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 900;
  border: 1px solid var(--line);
}

.status-pill.status-available { background: #052e16; border-color: var(--green); }
.status-pill.status-committed { background: #450a0a; border-color: var(--red); }
.status-pill.status-rehab { background: #451a03; border-color: var(--yellow); }
.status-pill.status-cleared { background: #111827; border-color: var(--gray); }

.quick-assign-box {
  background: #111827;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 8px 0;
}

.quick-assign-box summary { cursor: pointer; font-weight: 800; }

.quick-assignment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.timeline-item { padding: 9px 0; border-bottom: 1px solid var(--line); }

@media (max-width: 850px) {
  .board-grid { grid-template-columns: 1fr; }
  .status-counts { grid-template-columns: repeat(2, 1fr); }
  .app-header { align-items: flex-start; }
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mayday-button {
  background: #b91c1c;
  border: 2px solid #fecaca;
  letter-spacing: 0.05em;
}

body.mayday-active .app-header,
body.mayday-active .tabs {
  box-shadow: 0 0 0 3px #dc2626 inset;
}

body.mayday-active .mayday-button {
  animation: maydayPulse 1.2s infinite;
}

@keyframes maydayPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.55); }
}

.mayday-card {
  border: 2px solid #dc2626;
  background: #1f1111;
}

.mayday-status {
  border-radius: 12px;
  border: 1px solid #991b1b;
  background: #450a0a;
  padding: 12px;
  margin: 10px 0;
  font-weight: 800;
}

.mayday-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mayday-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.mayday-check {
  text-align: left;
  background: #020617;
  border: 1px solid var(--line);
}

.mayday-check.done {
  background: #052e16;
  border-color: #16a34a;
}

@media (max-width: 850px) {
  .mayday-grid { grid-template-columns: 1fr; }
  .header-actions { flex-direction: column; align-items: stretch; }
}

/* v3.3 polish */
.setting-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #020617;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  color: var(--text);
}
.setting-row input {
  width: auto;
  margin: 0;
}
.settings-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.status-section .status-heading.status-available,
.status-section .status-heading.status-rehab {
  font-size: 1rem;
}
.apparatus-card.status-available .assignment {
  color: #86efac;
}
.apparatus-card.status-rehab .assignment {
  color: #fde68a;
}
.apparatus-card.status-committed .assignment {
  color: #fecaca;
}
.apparatus-card.status-cleared .assignment {
  color: #d1d5db;
}

/* v4.0 reporting and command transfer polish */
.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.short-textarea {
  min-height: 95px;
}
.report-output {
  min-height: 420px;
  margin-top: 12px;
  font-family: Consolas, Monaco, monospace;
  line-height: 1.35;
}
@media (max-width: 850px) {
  .mini-grid { grid-template-columns: 1fr; }
}


/* v4.1 additional tasks */
.task-box {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
}
.task-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.task-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #111827;
  font-size: 0.85rem;
}
.task-chip button {
  padding: 0 5px;
  min-height: 0;
  border-radius: 999px;
  background: transparent;
  border: 0;
  color: var(--muted);
}
.task-chip button:hover {
  color: var(--text);
}
.task-details {
  margin-top: 6px;
}

/* v4.4 release polish */
.incident-clock {
  margin: 4px 0 0;
  color: #bfdbfe;
  font-size: 0.9rem;
  font-weight: 800;
}
.outstanding-card {
  border-left: 6px solid var(--red);
}
.outstanding-item {
  border-radius: 10px;
  padding: 9px;
  margin-bottom: 7px;
  border: 1px solid var(--line);
}
.outstanding-critical {
  background: #450a0a;
  border-color: #991b1b;
}
.outstanding-progress {
  background: #451a03;
  border-color: #92400e;
}
.count-card-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 8px;
}
.count-card-list span {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 0.75rem;
  background: rgba(2, 6, 23, 0.45);
}


.priority-btn {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.priority-btn:hover {
  filter: brightness(1.12);
}

.tiny {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.72rem;
  opacity: 0.78;
}


/* v4.7 final polish */
.priority-card {
  border-left: 6px solid var(--blue);
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
}
.priority-card h2::before {
  content: '🎯 ';
}
.priority-item {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
  background: #020617;
}
.priority-needed {
  border-left: 6px solid var(--red);
  background: #2b0b0b;
}
.priority-progress {
  border-left: 6px solid var(--yellow);
  background: #2b1903;
}
.priority-complete {
  border-left: 6px solid var(--green);
  background: #052e16;
}
.outstanding-card {
  border-left: 6px solid var(--orange);
  background: #130f0a;
}
.outstanding-card h2::before {
  content: '⚠️ ';
}
.outstanding-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: 10px;
  padding: 9px;
  margin-bottom: 7px;
  border: 1px solid var(--line);
}
.outstanding-icon {
  font-size: 1.1rem;
  line-height: 1.2;
}
.outstanding-row-critical {
  background: #3b0a0a;
  border-color: #991b1b;
}
.outstanding-row-progress {
  background: #3a2104;
  border-color: #92400e;
}
.outstanding-done {
  border-radius: 10px;
  padding: 10px;
  background: #052e16;
  border: 1px solid #166534;
}

/* v4.8 Critical Benchmarks cleanup */
.critical-card {
  border-left: 5px solid #b91c1c;
}

.critical-item {
  width: 100%;
  text-align: left;
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.85rem;
  margin-bottom: 0.55rem;
  border-radius: 12px;
  border: 1px solid #ddd;
  background: #fff;
}

.critical-item:hover,
.critical-chip:hover {
  transform: translateY(-1px);
}

.critical-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.critical-needed {
  border-color: #fecaca;
  background: #fff1f2;
}

.critical-progress {
  border-color: #fde68a;
  background: #fffbeb;
}

.critical-all-clear {
  padding: 0.85rem;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  margin-bottom: 0.75rem;
}

.critical-complete-group {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #6b7280;
}

.critical-chip {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0.35rem 0;
  padding: 0.55rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #14532d;
}

/* v4.9 final cosmetic polish */
:root {
  --bg: #08111f;
  --panel: #0f172a;
  --card: #162033;
  --card-strong: #1e293b;
  --text: #f8fafc;
  --muted: #a8b3c7;
  --line: #334155;
  --blue: #2563eb;
  --blue-soft: #1e3a8a;
  --green: #16a34a;
  --yellow: #d97706;
  --orange: #ea580c;
  --red: #dc2626;
  --gray: #64748b;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top, #14213d 0, #08111f 48%, #050a13 100%);
}

.app-header {
  background: linear-gradient(90deg, #020617 0%, #0f172a 100%);
  border-bottom: 1px solid #26364f;
  position: sticky;
  top: 0;
  z-index: 20;
}

h1 { letter-spacing: 0.02em; }
h2 { letter-spacing: 0.01em; }

.tabs {
  background: rgba(2, 6, 23, 0.96);
  position: sticky;
  top: 76px;
  z-index: 18;
}

button {
  transition: transform 0.08s ease, filter 0.12s ease, background 0.12s ease;
  box-shadow: 0 1px 0 rgba(255,255,255,0.07) inset;
}

button:hover { filter: brightness(1.08); }
button:active { transform: translateY(1px); }

button.tab {
  border: 1px solid #26364f;
  background: #111827;
  color: #dbeafe;
}

button.tab.active {
  background: #1d4ed8;
  color: #fff;
  border-color: #60a5fa;
}

.card {
  background: linear-gradient(180deg, #172033 0%, #111827 100%);
  border-color: #334155;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.template-banner {
  background: linear-gradient(90deg, #0f172a 0%, #111827 100%);
  border-color: #334155;
  border-left-color: #3b82f6;
}

.count-card {
  background: #0b1220;
  border-color: #334155;
  min-height: 94px;
}

.count-card b {
  font-size: 1.7rem;
  margin-bottom: 2px;
}

.count-card-list span {
  color: #f8fafc;
  background: rgba(15,23,42,0.78);
}

.status-heading {
  background: #0b1220;
  border-color: #334155;
  letter-spacing: 0.02em;
}

.apparatus-card {
  background: #0b1220;
  border-color: #334155;
}

.app-id {
  color: #f8fafc;
  letter-spacing: 0.015em;
}

.assignment {
  line-height: 1.25;
}

.can-box,
.quick-assign-box,
.task-box {
  background: rgba(15,23,42,0.95);
  border-color: #334155;
}

/* Critical Benchmarks: darker, higher contrast, command-board style */
.priority-card.critical-card {
  border-left: 7px solid #ef4444;
  background: linear-gradient(180deg, #1c2434 0%, #101827 100%);
}

.priority-card.critical-card h2::before {
  content: '🚨 ';
}

.critical-item {
  color: #f8fafc;
  border: 1px solid #334155;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.critical-needed {
  border-left: 7px solid #ef4444;
  border-color: #7f1d1d;
  background: linear-gradient(90deg, #450a0a 0%, #1f1218 100%);
}

.critical-progress {
  border-left: 7px solid #f59e0b;
  border-color: #92400e;
  background: linear-gradient(90deg, #451a03 0%, #221707 100%);
}

.critical-icon {
  font-size: 1.45rem;
  margin-top: 2px;
}

.critical-item b,
.critical-chip b {
  color: #ffffff;
}

.critical-all-clear {
  color: #dcfce7;
  background: linear-gradient(90deg, #052e16 0%, #0b1f17 100%);
  border: 1px solid #15803d;
  border-left: 7px solid #22c55e;
}

.critical-complete-group {
  border-top-color: #334155;
}

.section-label {
  color: #cbd5e1;
  font-size: 0.75rem;
}

.critical-chip {
  color: #dcfce7;
  border-color: #166534;
  background: linear-gradient(90deg, #052e16 0%, #0b1f17 100%);
}

.benchmark-btn {
  border-color: #334155;
  background: #0b1220;
}

.benchmark-btn.done {
  background: #064e3b;
  border-color: #16a34a;
}

.benchmark-btn.progress {
  background: #78350f;
  border-color: #f59e0b;
}

.filter-banner {
  background: #0b1220;
  border-color: #334155;
}

input, textarea, select {
  background: #07101f;
  border-color: #334155;
}

input:focus, textarea:focus, select:focus {
  outline: 2px solid #2563eb;
  border-color: #60a5fa;
}

.report-output {
  background: #07101f;
  color: #e5e7eb;
}

.mayday-button,
button.danger {
  background: #b91c1c;
}

@media (max-width: 850px) {
  .tabs { top: 108px; }
  button { padding: 11px 12px; }
  .card { padding: 12px; }
}

/* DC Command 1.0 settings polish */
.settings-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0 14px;
}

.settings-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.critical-setting-row {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
}

.recommended-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  color: inherit;
}

/* v5.1 command responsibilities and high-rise considerations */
.responsibilities-card {
  overflow: hidden;
}

.responsibilities-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 800;
  list-style: none;
}

.responsibilities-card > summary::-webkit-details-marker { display: none; }
.responsibilities-card > summary::after { content: '▾'; font-size: 1rem; opacity: .7; }
.responsibilities-card[open] > summary::after { transform: rotate(180deg); }
.summary-count {
  margin-left: auto;
  padding: .3rem .65rem;
  border-radius: 999px;
  background: #e8eef7;
  color: #22344d;
  font-size: .78rem;
  white-space: nowrap;
}

.responsibility-group { margin-top: 1rem; }
.responsibility-group h3 {
  margin: 0 0 .55rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid #d7dee8;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #516174;
}

.responsibility-row,
.consideration-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .8rem;
  align-items: center;
  padding: .8rem;
  margin-bottom: .55rem;
  border: 1px solid #d5dde8;
  border-left: 5px solid #9aa8ba;
  border-radius: 10px;
  background: #fff;
}
.responsibility-row.status-required,
.consideration-row.status-required { border-left-color: #d48b00; background: #fff8e8; }
.responsibility-row.status-complete,
.consideration-row.status-complete { border-left-color: #1f8a4c; background: #eef9f2; }
.responsibility-row.status-na,
.consideration-row.status-na { border-left-color: #6d7a8a; background: #f3f5f8; }

.responsibility-copy { display: flex; flex-direction: column; gap: .2rem; }
.responsibility-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.responsibility-actions .active-choice { outline: 3px solid rgba(26, 78, 140, .25); font-weight: 800; }
.consideration-card { border: 2px solid #355d8b; background: linear-gradient(180deg, #f4f8fd, #ffffff); }
.consideration-status { margin-top: .25rem; font-weight: 800; color: #274c75; }

@media (max-width: 720px) {
  .responsibility-row,
  .consideration-row { grid-template-columns: 1fr; }
  .responsibility-actions { justify-content: flex-start; }
  .responsibility-actions button { flex: 1 1 30%; min-height: 44px; }
}


/* v5.2 Command Responsibilities workspace */
.responsibilities-workspace {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.responsibility-progress-wrap {
  margin: 14px 0 18px;
  padding: 14px;
  border: 1px solid #3f4c5f;
  border-radius: 12px;
  background: #111827;
}

.responsibility-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  font-weight: 800;
}

.responsibility-progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #374151;
}

.responsibility-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #16a34a);
  transition: width .2s ease;
}

.responsibility-row.status-unset {
  border-left-color: #64748b;
  background: #1f2937;
}

.responsibility-row.status-unset .small {
  color: #cbd5e1;
}

.responsibility-row.status-required {
  border-left-color: #f59e0b;
  background: #3a2b0d;
}

.responsibility-row.status-complete {
  border-left-color: #22c55e;
  background: #0f2d1d;
}

.responsibility-row.status-na {
  border-left-color: #94a3b8;
  background: #273244;
}

.responsibility-actions .active-choice {
  box-shadow: 0 0 0 3px rgba(255,255,255,.22);
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .responsibility-progress-copy { flex-direction: column; gap: 3px; }
}


/* v5.3 incident-template operational options */
.incident-options-card {
  margin: 14px 0;
  padding: 12px;
  background: #0b1220;
  border: 1px solid #1d4ed8;
  border-left: 6px solid #2563eb;
  border-radius: 12px;
}

.consideration-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px;
  background: #020617;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.consideration-row.status-required { border-left: 5px solid var(--yellow); }
.consideration-row.status-complete { border-left: 5px solid var(--green); }
.consideration-row.status-na { border-left: 5px solid var(--gray); }
.consideration-status { display: block; margin-top: 5px; font-weight: 800; }

@media (max-width: 700px) {
  .consideration-row { align-items: stretch; flex-direction: column; }
  .consideration-row .responsibility-actions button { flex: 1 1 30%; }
}


/* DC Command 1.0 Release Candidate — Home Dashboard */
.eyebrow { margin: 0 0 .35rem; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted, #64748b); }
.home-hero { display: flex; justify-content: space-between; align-items: center; gap: 1.25rem; background: linear-gradient(135deg, #0f2942 0%, #173f61 100%); color: #fff; }
.home-hero h2 { margin: 0; font-size: clamp(1.25rem, 3vw, 2rem); color: #fff; }
.home-hero .subtle, .home-hero .eyebrow { color: #d8e7f5; }
.home-clock-wrap { min-width: 190px; text-align: center; padding: .85rem 1rem; border-radius: 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); }
.home-clock-label { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .11em; color: #cfe0ef; }
.home-clock { display: block; margin-top: .2rem; font-variant-numeric: tabular-nums; font-size: clamp(1.65rem, 4vw, 2.5rem); letter-spacing: .03em; }
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.home-section { margin: 0; }
.home-critical { border-top: 5px solid #b42318; }
.link-button { width: auto; padding: .45rem .7rem; background: transparent; color: #15527a; border: 1px solid #9db8cb; }
.home-resource-counts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .65rem; }
.home-count-card { text-align: left; min-height: 104px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; gap: .15rem .5rem; background: #f8fafc; color: #162738; border: 1px solid #d7e0e8; }
.home-count-card span { font-weight: 800; }
.home-count-card strong { font-size: 1.45rem; }
.home-count-card small { grid-column: 1 / -1; color: #536577; overflow-wrap: anywhere; }
.home-count-card.status-available { border-left: 5px solid #27864b; }
.home-count-card.status-committed { border-left: 5px solid #b42318; }
.home-count-card.status-rehab { border-left: 5px solid #c77900; }
.home-count-card.status-cleared { border-left: 5px solid #64748b; }
.home-summary-number { font-size: 1.35rem; font-weight: 850; margin-bottom: .55rem; }
.home-list-item { width: 100%; display: flex; justify-content: space-between; gap: 1rem; margin: .35rem 0; padding: .7rem .8rem; color: #172333; background: #fff5f3; border: 1px solid #e8aaa2; }
.home-list-item.progress { background: #fff8df; border-color: #dfbe54; }
.home-list-item b { white-space: nowrap; }
.home-complete-message { padding: 1rem; border-radius: 12px; background: #eaf7ef; color: #17643a; font-weight: 800; text-align: center; }
.command-status-buttons { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .55rem; }
.command-status-choice { background: #eef3f7; color: #213649; border: 1px solid #c8d4df; }
.command-status-choice.active { background: #164e72; color: #fff; border-color: #164e72; box-shadow: 0 0 0 3px rgba(22,78,114,.15); }
.quick-actions-card { margin-top: 1rem; }
.quick-action-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .65rem; }

@media (max-width: 760px) {
  .home-hero { align-items: stretch; flex-direction: column; }
  .home-clock-wrap { min-width: 0; }
  .home-grid { grid-template-columns: 1fr; }
  .quick-action-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .home-resource-counts { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 430px) {
  .home-resource-counts, .command-status-buttons { grid-template-columns: 1fr; }
  .quick-action-grid { grid-template-columns: 1fr; }
}

/* RC2 workflow polish */
.home-command-status {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  background: #eef3f8;
  border: 1px solid #c8d3df;
  font-size: 1.15rem;
  font-weight: 800;
  color: #17324d;
}

.home-primary-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.home-resume-button {
  min-width: 190px;
  min-height: 52px;
  font-size: 1.05rem;
  font-weight: 800;
}

@media (max-width: 700px) {
  .home-primary-action {
    align-items: stretch;
    flex-direction: column;
  }

  .home-resume-button {
    width: 100%;
    min-width: 0;
  }

  .tabs {
    gap: 0.35rem;
    padding-bottom: 0.35rem;
  }

  .tab {
    min-height: 44px;
    padding: 0.65rem 0.8rem;
  }

  button, select, input, textarea {
    font-size: 16px;
  }
}

.template-applied-notice {
  margin: 0.75rem 0;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: #e8f1fb;
  border: 1px solid #9db9d6;
  font-weight: 700;
}


/* RC6 benchmark and command-responsibility feedback */
.responsibility-outstanding-panel,
.responsibility-clear-panel {
  border-radius: 12px;
  padding: 12px 14px;
  margin: 4px 0 16px;
}
.responsibility-outstanding-panel {
  background: #3a2b0d;
  border: 2px solid #f59e0b;
  color: #fff7d6;
}
.responsibility-outstanding-panel > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}
.responsibility-outstanding-panel span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #5b4210;
  border: 1px solid #fbbf24;
  font-size: .84rem;
  font-weight: 800;
}
.responsibility-clear-panel {
  background: #0f2d1d;
  border: 2px solid #22c55e;
  color: #dcfce7;
  font-weight: 800;
}
.responsibility-row.status-required {
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .5);
}
.responsibility-row.status-complete {
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .45);
}
.responsibility-actions .active-choice {
  outline: 3px solid #f8fafc;
  outline-offset: 2px;
}


/* RC7 shift and task polish */
.section-divider { border: 0; border-top: 1px solid var(--border, #d7dde5); margin: 1.1rem 0; }
.task-subheading { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin: .65rem 0 .35rem; opacity: .75; }
.search-task-details { border-left: 4px solid #2563eb; }


/* DC Command 1.0 workflow and template context */
.template-context-card {
  background: linear-gradient(135deg, #111827 0%, #0b1220 100%);
  border-color: #475569;
  padding: 12px 14px;
}

.template-context-header {
  align-items: stretch;
}

.template-context-card .template-banner {
  flex: 1;
  margin: 0;
  border: 0;
  border-left: 5px solid var(--blue);
  background: transparent;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px 12px;
}

.template-kicker {
  color: #93c5fd;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  font-weight: 900;
}

.template-context-card .template-banner strong {
  font-size: 1.12rem;
}

.board-highrise-options {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #475569;
}

.highrise-options-heading h3 {
  color: #bfdbfe;
  margin-bottom: 3px;
}

.board-highrise-options .consideration-row {
  margin-top: 8px;
  background: #0f1c32;
  border-color: #31517d;
}

.workflow-card {
  border-color: #334155;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 8px;
}

.workflow-steps button {
  min-height: 94px;
  text-align: left;
  background: #0b1220;
  border: 1px solid #334155;
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-areas:
    "number title"
    "number help";
  align-content: center;
  gap: 2px 8px;
}

.workflow-steps button:hover,
.workflow-steps button:focus-visible {
  border-color: #60a5fa;
  background: #111f36;
}

.workflow-steps button b {
  grid-area: number;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue);
}

.workflow-steps button span {
  grid-area: title;
  font-weight: 900;
}

.workflow-steps button small {
  grid-area: help;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.2;
}

@media (max-width: 900px) {
  .workflow-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .template-context-header { align-items: flex-start; }
  .template-context-header > button { flex: 0 0 auto; }
  .workflow-steps { grid-template-columns: 1fr; }
  .workflow-steps button { min-height: 74px; }
}


.command-identity-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #020617;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
}

.command-identity-card span { color: var(--muted); font-weight: 700; }
.command-identity-card strong { font-size: 1.1rem; }
.assume-command-button { width: 100%; min-height: 54px; font-size: 1.05rem; margin-top: 10px; }
.command-display-line { margin: 0; }
.terminate-command-wrap { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.terminate-command-button { width: 100%; min-height: 48px; }


/* DC Command 1.1.1 — compact mobile resource and DVRS polish */
.status-counts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.count-card {
  min-height: 78px;
  padding: 9px 7px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  align-items: center;
  gap: 3px 6px;
  text-align: left;
}

.count-card-title {
  font-weight: 900;
  font-size: .84rem;
}

.count-card b {
  font-size: 1.35rem;
  line-height: 1;
  text-align: right;
}

.count-card-list {
  grid-column: 1 / -1;
  justify-content: flex-start;
  margin-top: 2px;
  max-height: 42px;
  overflow: hidden;
}

.count-card-list span {
  padding: 1px 5px;
  font-size: .68rem;
}

.empty-board-message {
  margin: 12px 0 2px;
  padding: 12px;
  text-align: center;
  color: var(--muted);
  background: #0b1220;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.board-highrise-options {
  margin-top: 8px;
  padding-top: 8px;
}

.dvrs-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #0f1c32;
  border: 1px solid #31517d;
  border-left: 5px solid var(--gray);
}

.dvrs-compact > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 9px;
}

.dvrs-compact b { font-size: 1rem; }
.dvrs-compact span { color: var(--muted); font-weight: 800; font-size: .82rem; }
.dvrs-compact.status-complete { border-left-color: var(--green); }
.dvrs-compact.status-required { border-left-color: var(--yellow); }
.dvrs-compact.status-na { border-left-color: var(--gray); }

@media (max-width: 520px) {
  .status-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .count-card { min-height: 72px; padding: 8px 6px; }
  .count-card-title { font-size: .75rem; }
  .count-card b { font-size: 1.2rem; }
  .count-card-list { display: none; }
  .status-section { margin-top: 10px; }
  .status-heading { padding: 7px 9px; font-size: .88rem; }
  .dvrs-compact { padding: 8px 9px; }
}


/* DC Command 1.2 — mobile command-board polish */
.template-context-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.template-context-card .template-banner {
  min-width: 0;
  padding: 4px 10px;
}

.template-context-card .template-banner strong {
  font-size: 1.18rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.template-change-button {
  flex: 0 0 auto;
  max-width: 100%;
  white-space: nowrap;
  padding: 8px 11px;
}

.apparatus-quick-pick {
  min-width: 72px;
  border: 2px solid #64748b;
  background: #64748b;
  transition: background-color .15s ease, border-color .15s ease, transform .08s ease;
}

.apparatus-quick-pick:active { transform: scale(.97); }
.apparatus-quick-pick.quick-pick-not-arrived { background: #64748b; border-color: #64748b; }
.apparatus-quick-pick.quick-pick-available { background: #15803d; border-color: #22c55e; }
.apparatus-quick-pick.quick-pick-committed { background: #991b1b; border-color: #ef4444; }
.apparatus-quick-pick.quick-pick-rehab { background: #9a3412; border-color: #f59e0b; }

/* Keep the command header useful without consuming too much phone space. */
@media (max-width: 520px) {
  .app-header {
    padding: 10px 12px;
    gap: 8px;
    align-items: flex-start;
  }
  .app-header h1 { font-size: 1.12rem; margin-bottom: 5px; }
  .app-header .subtle { margin: 0 0 5px; font-size: .78rem; line-height: 1.25; }
  .incident-clock { margin: 0; font-size: .82rem; line-height: 1.25; }
  .header-actions { gap: 7px; }
  .header-actions button { padding: 9px 10px; min-height: 42px; }
  .mayday-button { font-size: .95rem; }

  .template-context-card { padding: 10px 11px; }
  .template-context-header { grid-template-columns: minmax(0, 1fr) auto; }
  .template-kicker { font-size: .64rem; }
  .template-context-card .template-banner strong { font-size: 1.05rem; }
  .template-change-button { padding: 7px 9px; font-size: .76rem; }

  .status-counts { margin: 9px 0; gap: 7px; }
  .count-card { min-height: 62px; padding: 7px 6px; }
  .count-card-title { font-size: .72rem; }
  .count-card b { font-size: 1.12rem; }
}

/* v1.2.1: robust quick-pick status colours */
.apparatus-quick-pick[data-apparatus-status="not-arrived"] {
  background: #64748b !important;
  border-color: #94a3b8 !important;
}
.apparatus-quick-pick[data-apparatus-status="available"] {
  background: #15803d !important;
  border-color: #4ade80 !important;
}
.apparatus-quick-pick[data-apparatus-status="committed"] {
  background: #991b1b !important;
  border-color: #f87171 !important;
}
.apparatus-quick-pick[data-apparatus-status="rehab"] {
  background: #9a3412 !important;
  border-color: #fbbf24 !important;
}

/* DC Command 1.4 — mobile lifecycle and compact resource cards */
button:disabled {
  cursor: not-allowed;
  opacity: .72;
}
.header-actions .incident-active-button {
  background: #334155;
  border-color: #64748b;
  color: #e2e8f0;
}
.lifecycle-notice {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid #334155;
  border-radius: 10px;
  background: #0f172a;
}
.apparatus-card {
  padding: 12px;
  margin-bottom: 10px;
}
.apparatus-card .app-top {
  margin-bottom: 7px;
}
.apparatus-card .app-id {
  font-size: 1.15rem;
}
.apparatus-card .compact-assignment {
  margin: 7px 0;
  font-size: 1rem;
  line-height: 1.25;
}
.apparatus-card .card-actions {
  margin-top: 9px;
}
.terminate-command-button[hidden] {
  display: none !important;
}
@media (max-width: 620px) {
  .apparatus-card {
    padding: 10px;
  }
  .apparatus-card .status-pill {
    padding: 3px 8px;
    font-size: .76rem;
  }
  .apparatus-card details {
    margin-top: 7px;
  }
  .apparatus-card .task-box,
  .apparatus-card .can-box {
    margin-top: 8px;
  }
  .apparatus-card .card-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .apparatus-card .card-actions button {
    min-width: 0;
    padding: 8px 5px;
  }
}


/* DC Command 1.5 — Home resource quick view */
.home-resource-view-card { margin-top: 1rem; }
.home-resource-view-card .section-title-row { align-items: flex-start; }
.home-resource-view-card h2 { margin-bottom: .15rem; }
.home-resource-quick-view {
  display: grid;
  gap: .55rem;
  margin-top: .8rem;
}
.resource-quick-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(4.6rem, .65fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: .75rem;
  padding: .72rem .8rem;
  border: 1px solid var(--border);
  border-left-width: 5px;
  border-radius: .8rem;
  background: rgba(4, 13, 30, .72);
  color: var(--text);
  text-align: left;
}
.resource-quick-row.status-committed { border-left-color: #ef4444; }
.resource-quick-row.status-available { border-left-color: #22c55e; }
.resource-quick-row.status-rehab { border-left-color: #f59e0b; }
.resource-quick-unit { font-size: 1.05rem; font-weight: 900; letter-spacing: .02em; }
.resource-quick-detail { min-width: 0; }
.resource-quick-detail strong { display: block; overflow-wrap: anywhere; }
.resource-quick-tasks {
  margin-top: .18rem;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.resource-quick-status {
  padding: .25rem .45rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}
.resource-quick-row.status-committed .resource-quick-status { color: #fecaca; background: rgba(127, 29, 29, .42); }
.resource-quick-row.status-available .resource-quick-status { color: #bbf7d0; background: rgba(20, 83, 45, .42); }
.resource-quick-row.status-rehab .resource-quick-status { color: #fde68a; background: rgba(120, 53, 15, .45); }
.home-resource-empty { margin: .75rem 0 0; color: var(--muted); }
@media (max-width: 520px) {
  .resource-quick-row { grid-template-columns: 4.25rem minmax(0, 1fr); gap: .6rem; }
  .resource-quick-status { display: none; }
}

/* DC Command 1.6 — decluttered Home dashboard */
.home-primary-resource-card { margin-top: 1rem; }
.home-primary-resource-card .section-title-row { align-items: center; }
.home-primary-resource-card .eyebrow { margin-bottom: .15rem; }
.home-support-grid { margin-top: 1rem; }
@media (max-width: 720px) {
  .home-primary-resource-card { margin-top: .75rem; }
  .home-support-grid { grid-template-columns: 1fr; gap: .75rem; }
  .home-primary-resource-card .section-title-row { gap: .5rem; }
  .home-primary-resource-card h2 { font-size: 1.12rem; }
}


/* v1.9 Command Dashboard */
.home-completed-benchmarks { margin-top: 1rem; }
.home-completed-list { display: grid; gap: .55rem; }
.home-completed-item {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
  padding: .7rem .8rem;
  border: 1px solid #166534;
  border-radius: 10px;
  background: #052e16;
}
.home-completed-check { color: #4ade80; font-size: 1.05rem; font-weight: 900; }
.home-completed-name { font-weight: 800; min-width: 0; }
.home-completed-item time { color: #bbf7d0; font-size: .8rem; white-space: nowrap; }
.quick-pick-group + .quick-pick-group { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.quick-pick-group h3 { margin-bottom: .55rem; }
.incident-quick-picks h3 { color: #93c5fd; }


/* Benchmark ordering settings */
.settings-divider {
  height: 1px;
  background: rgba(255,255,255,.12);
  margin: 22px 0;
}
.benchmark-order-tools {
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.benchmark-order-tools h3 { margin: 0 0 5px; }
.benchmark-order-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.benchmark-order-row {
  display: grid;
  grid-template-columns: 32px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
}
.order-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  font-weight: 800;
  font-size: .82rem;
}
.benchmark-order-name { font-weight: 750; line-height: 1.2; }
.order-actions { display: flex; gap: 6px; }
.order-button {
  min-width: 42px;
  width: 42px;
  min-height: 40px;
  padding: 5px;
  font-size: 1.15rem;
  line-height: 1;
}
.order-button:disabled { opacity: .3; }
.compact-button { width: auto; white-space: nowrap; }
@media (max-width: 520px) {
  .benchmark-order-tools { align-items: stretch; flex-direction: column; }
  .compact-button { width: 100%; }
  .benchmark-order-row { grid-template-columns: 28px minmax(0,1fr) auto; padding: 7px 8px; }
  .order-button { min-width: 40px; width: 40px; }
}


/* DC Command 1.12 — compact incident lifecycle header */
.incident-start-row {
  align-items: flex-start;
  margin-bottom: 12px;
}
.start-incident-button {
  flex: 0 0 auto;
  background: #2563eb;
  border: 1px solid #60a5fa;
  color: #fff;
  min-height: 44px;
}
body.incident-active .app-header {
  border-bottom-color: #dc2626;
  box-shadow: 0 2px 0 rgba(220,38,38,.72);
}
#incidentSummary strong { color: #fff; font-size: .95rem; }
#incidentSummary span { color: #cbd5e1; }
@media (max-width: 520px) {
  .incident-start-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 10px;
  }
  .incident-start-row .small { margin: 0; }
  .start-incident-button {
    padding: 9px 10px;
    font-size: .78rem;
    max-width: 118px;
  }
  #incidentSummary { max-width: 250px; }
}


/* DC Command 2.0 */
.strategy-badge {
  display: inline-flex;
  width: auto;
  min-height: 30px;
  margin-top: .35rem;
  padding: .25rem .65rem;
  border-radius: 999px;
  border: 1px solid #4ade80;
  background: #052e16;
  color: #86efac;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
}
.strategy-badge.defensive { border-color: #60a5fa; background: #172554; color: #bfdbfe; }
.cad-import-card {
  margin: 1rem 0;
  padding: .9rem;
  border: 1px solid #334155;
  border-radius: 12px;
  background: rgba(15,23,42,.74);
}
.cad-import-card h3 { margin: 0; }
.cad-incident-list { display: grid; gap: .55rem; margin-top: .7rem; }
.cad-incident-row {
  display: grid;
  gap: .25rem;
  width: 100%;
  text-align: left;
  background: #111c34;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: .75rem;
}
.cad-incident-row span { color: #dbeafe; }
.cad-incident-row small { color: #94a3b8; line-height: 1.3; }
.inline-link { display: inline; width: auto; padding: 0; margin: 0; min-height: 0; }
.alarm-control-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: .65rem;
  align-items: end;
}
.alarm-control-card button { width: auto; white-space: nowrap; }
.board-alarm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-top: .65rem;
  padding-top: .65rem;
  border-top: 1px solid rgba(255,255,255,.12);
}
.board-alarm-display { font-weight: 800; color: #fde68a; }
.active-quick-nav {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: max(.6rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(360px, calc(100% - 1rem));
  gap: .35rem;
  padding: .38rem;
  border: 1px solid #334155;
  border-radius: 14px;
  background: rgba(2,6,23,.96);
  box-shadow: 0 10px 28px rgba(0,0,0,.42);
}
.active-quick-nav[hidden] { display: none !important; }
.active-quick-nav button { min-height: 42px; padding: .55rem .65rem; font-size: .85rem; }
body.incident-active main { padding-bottom: 5.5rem; }
.app-version { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid rgba(255,255,255,.12); color: #94a3b8; font-size: .78rem; }
@media (max-width: 520px) {
  .alarm-control-card { grid-template-columns: 1fr; }
  .alarm-control-card button { width: 100%; }
  .cad-import-card .section-title-row { align-items: center; }
  .cad-import-card .compact-button { width: auto; }
}


/* Version 2.1: compact command reminders */
.command-reminders-card {
  border-color: rgba(245, 158, 11, .48);
  background: linear-gradient(180deg, rgba(120, 53, 15, .22), rgba(15, 23, 42, .96));
}
.command-reminder-list { display: grid; gap: .55rem; }
.command-reminder-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .7rem;
  text-align: left;
  padding: .7rem .8rem;
  min-height: 54px;
  border: 1px solid rgba(245, 158, 11, .42);
  background: rgba(120, 53, 15, .32);
  color: #fff7ed;
}
.command-reminder-item small { display: block; margin-top: .15rem; color: #fed7aa; font-weight: 500; }
.command-reminder-icon { font-size: 1.1rem; }
.command-reminders-clear {
  padding: .8rem;
  border-radius: 12px;
  border: 1px solid rgba(34, 197, 94, .38);
  background: rgba(20, 83, 45, .3);
  color: #bbf7d0;
  font-weight: 800;
}


/* DC Command Live CAD import */
.cad-import-card {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid #315178;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(14, 38, 68, .96), rgba(8, 23, 45, .96));
}
.cad-import-card h3 { margin: .1rem 0 0; }
.cad-status {
  margin-top: .75rem;
  padding: .7rem .8rem;
  border-radius: 10px;
  background: rgba(8, 17, 34, .72);
  color: #cbd5e1;
  font-size: .92rem;
}
.cad-incident-list { display: grid; gap: .7rem; margin-top: .75rem; }
.cad-incident-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .85rem;
  border: 1px solid #334e70;
  border-radius: 13px;
  background: #09162a;
}
.cad-incident-copy { min-width: 0; display: grid; gap: .2rem; }
.cad-incident-copy strong { color: #f8fafc; font-size: 1rem; }
.cad-incident-copy span { color: #aebbd0; font-size: .82rem; line-height: 1.25; }
.cad-incident-copy .cad-units { color: #93c5fd; font-weight: 700; overflow-wrap: anywhere; }
.cad-import-button { flex: 0 0 auto; padding: .65rem .8rem; }
.cad-imported-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .65rem;
  align-items: baseline;
  margin: 0 0 1rem;
  padding: .7rem .85rem;
  border-left: 4px solid #38bdf8;
  border-radius: 9px;
  background: rgba(14, 116, 144, .18);
}
.cad-imported-summary span { color: #b9c8dc; font-size: .86rem; }
@media (max-width: 520px) {
  .cad-import-card .section-title-row { align-items: flex-start; }
  .cad-import-card .section-title-row button { width: auto; }
  .cad-incident-card { align-items: flex-start; }
  .cad-import-button { padding: .6rem .7rem; }
}


/* CAD Smart 3.1 */
.cad-controls { display: grid; gap: .65rem; margin-top: .75rem; }
.cad-filter-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.cad-filter-chip { width: auto; padding: .5rem .72rem; border-radius: 999px; background: #14233a; border: 1px solid #49627f; color: #dbeafe; font-size: .82rem; }
.cad-filter-chip.active { background: #2563eb; border-color: #60a5fa; color: white; }
.cad-district-toggle { display: flex; align-items: center; gap: .5rem; font-size: .86rem; color: #dbeafe; }
.cad-district-toggle input { width: auto; margin: 0; }
.cad-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.cad-alarm-badge { display: inline-flex; width: fit-content; padding: .18rem .45rem; border-radius: 999px; font-size: .72rem !important; font-weight: 800; border: 1px solid transparent; }
.cad-alarm-badge.alarm-initial { background: rgba(22,163,74,.18); color: #86efac; border-color: #22c55e; }
.cad-alarm-badge.alarm-2 { background: rgba(234,179,8,.18); color: #fde047; border-color: #eab308; }
.cad-alarm-badge.alarm-3 { background: rgba(249,115,22,.18); color: #fdba74; border-color: #f97316; }
.cad-alarm-badge.alarm-4plus { background: rgba(220,38,38,.2); color: #fca5a5; border-color: #ef4444; }
.cad-unit-pills { display: flex; flex-wrap: wrap; gap: .32rem; margin-top: .25rem; }
.cad-unit-pill { display: inline-flex; padding: .22rem .48rem; border-radius: 999px; background: #1d2b42; border: 1px solid #4b617d; color: #bfdbfe; font-size: .75rem; font-weight: 800; }
.cad-unit-pill.is-daily { background: rgba(22,163,74,.24); border-color: #22c55e; color: #bbf7d0; box-shadow: 0 0 0 1px rgba(34,197,94,.18); }
.cad-no-units, .cad-empty { color: #94a3b8; font-size: .84rem; }

/* 3.4 termination safeguards */
.dc-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(1, 6, 18, 0.82);
  backdrop-filter: blur(5px);
}
.dc-dialog {
  width: min(560px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 18px;
  padding: 20px;
  background: #0b1730;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.dc-dialog h2 { margin-top: 0; }
.dc-dialog-body p:first-child { margin-top: 0; }
.dc-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.dc-dialog-actions button { min-height: 46px; }
.termination-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(30, 64, 175, 0.2);
}
.termination-warning,
.termination-ok {
  margin: 10px 0;
  padding: 11px 12px;
  border-radius: 10px;
}
.termination-warning {
  border: 1px solid rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.12);
}
.termination-warning ul { margin: 8px 0 0; padding-left: 20px; }
.termination-ok {
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
}
@media (max-width: 600px) {
  .dc-dialog-overlay { align-items: flex-end; padding: 10px; }
  .dc-dialog { border-radius: 18px 18px 10px 10px; max-height: 90vh; }
  .dc-dialog-actions { flex-direction: column-reverse; }
  .dc-dialog-actions button { width: 100%; }
}


/* Version 3.5 completed-incident review mode */
body.incident-completed .app-header {
  border-bottom-color: #64748b;
  box-shadow: inset 0 -3px 0 #64748b;
}
body.incident-completed .strategy-badge { opacity: .72; }
.completed-incident-actions {
  border-color: #64748b;
  background: linear-gradient(145deg, rgba(30,41,59,.98), rgba(15,23,42,.98));
}
.completed-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin-top: .9rem;
}
body.incident-completed #board button:disabled,
body.incident-completed #responsibilities button:disabled,
body.incident-completed #incident button:disabled,
body.incident-completed #board input:disabled,
body.incident-completed #responsibilities input:disabled,
body.incident-completed #incident input:disabled,
body.incident-completed #incident select:disabled {
  opacity: .58;
  cursor: not-allowed;
}
body.incident-completed #board::before,
body.incident-completed #responsibilities::before {
  content: 'Completed incident — review only';
  display: block;
  margin: 0 0 .75rem;
  padding: .65rem .85rem;
  border: 1px solid #64748b;
  border-radius: .75rem;
  color: #cbd5e1;
  background: rgba(51,65,85,.45);
  font-weight: 700;
}
@media (max-width: 560px) {
  .completed-action-grid { grid-template-columns: 1fr; }
}


/* Version 4.0 completed incident and local archive */
.rms-ready { font-size: 1.15rem; font-weight: 800; margin: .35rem 0; }
.past-incidents-list { display: grid; gap: .75rem; margin: .75rem 0 1.5rem; }
.past-incident-row { display: grid; grid-template-columns: 1fr auto; gap: .65rem; align-items: stretch; }
.past-incident-open { text-align: left; display: grid; gap: .2rem; }
.past-incident-open span, .past-incident-open small { font-weight: 500; opacity: .85; }
button.compact { padding: .65rem .8rem; min-height: 48px; }
.incident-completed .home-primary-resource-card .resource-quick-row { cursor: default; }
@media (max-width: 620px) {
  .completed-action-grid { grid-template-columns: 1fr 1fr; }
  .past-incident-row { grid-template-columns: 1fr; }
}

/* Version 4.1 access control */
.access-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(180deg, #10243b 0%, #07131f 100%);
  overflow-y: auto;
}
.access-gate[hidden] { display: none !important; }
.access-card {
  width: min(440px, 100%);
  background: #fff;
  color: #17202a;
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 18px 55px rgba(0,0,0,.38);
  text-align: center;
}
.access-logo { width: 82px; height: 82px; border-radius: 18px; }
.access-card h1 { margin: 12px 0 2px; }
.access-subtitle { margin: 0 0 22px; color: #5d6d7e; }
.access-card form, .admin-access-panel { text-align: left; }
.access-card input { text-transform: none; font-size: 1.05rem; }
#activationCodeInput { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.access-admin-button { margin-top: 14px; width: 100%; }
.admin-access-panel { margin-top: 18px; border-top: 1px solid #dfe6e9; padding-top: 18px; }
.admin-access-panel h2 { text-align: center; }
.generated-code-box {
  margin: 14px 0;
  padding: 14px;
  border: 2px solid #1769aa;
  border-radius: 12px;
  background: #eef7ff;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: .08em;
  word-break: break-word;
}
.activation-code-list { margin: 14px 0; display: grid; gap: 10px; }
.activation-code-row {
  border: 1px solid #dfe6e9;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.activation-code-row.inactive { opacity: .58; }
.activation-code-row button { width: auto; margin: 0; }
.license-status { margin: 8px 0 12px; padding: 10px; border-radius: 10px; background: rgba(20, 115, 160, .1); }


/* v4.1.1 Critical Benchmark visibility update
   Dashboard-style white cards with status shown by a strong left border. */
.priority-card.critical-card {
  background: #f8fafc;
  border: 1px solid #dbe3ec;
  border-left: 5px solid #26364d;
  color: #172033;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.09);
}

.priority-card.critical-card h2,
.priority-card.critical-card .small {
  color: #172033;
}

.priority-card.critical-card h2::before {
  content: '';
}

.critical-item,
.critical-chip {
  min-height: 84px;
  display: flex;
  align-items: center;
  width: 100%;
  border-radius: 13px;
  background: #ffffff;
  color: #172033;
  text-align: left;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.critical-item:active,
.critical-chip:active {
  transform: scale(0.99);
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.12);
}

.critical-needed {
  border: 1px solid #e2e8f0;
  border-left: 9px solid #c62828;
  background: #ffffff;
}

.critical-progress {
  border: 1px solid #e2e8f0;
  border-left: 9px solid #d97706;
  background: #ffffff;
}

.critical-card-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.critical-title {
  color: #172033 !important;
  font-size: 1.08rem;
  line-height: 1.15;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.critical-status {
  font-size: 1rem;
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: 0.025em;
}

.critical-needed .critical-status { color: #a61b1b; }
.critical-progress .critical-status { color: #a45300; }

.critical-detail {
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.3;
}

.critical-action {
  color: #64748b;
  font-size: 0.73rem;
  font-weight: 650;
}

.critical-all-clear {
  color: #14532d;
  background: #ffffff;
  border: 1px solid #dbe3ec;
  border-left: 9px solid #2e7d32;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}

.critical-complete-group {
  border-top-color: #dbe3ec;
}

.priority-card.critical-card .section-label {
  color: #64748b;
}

.critical-chip {
  min-height: 64px;
  margin: 0.45rem 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-left: 9px solid #2e7d32;
  color: #172033;
  border-radius: 13px;
}

.critical-chip b {
  display: block;
  color: #172033 !important;
  font-size: 0.98rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.critical-complete-status {
  display: block;
  margin-top: 3px;
  color: #1f6b35;
  font-weight: 850;
  font-size: 0.85rem;
  letter-spacing: 0.025em;
}

@media (max-width: 720px) {
  .critical-item { min-height: 90px; padding: 0.82rem 0.75rem; }
  .critical-title { font-size: 1.05rem; }
  .critical-status { font-size: 0.96rem; }
}
