:root {
  --bg: #030608;
  --panel: rgba(5, 24, 28, 0.78);
  --panel-strong: rgba(8, 37, 43, 0.92);
  --cyan: #16f4ff;
  --cyan-soft: rgba(22, 244, 255, 0.46);
  --red: #ff3f2f;
  --orange: #ff8a22;
  --amber: #f7c542;
  --green: #46ff8f;
  --magenta: #ff4dd8;
  --ink: #d8fbff;
  --muted: #7aa8ad;
  --line: rgba(22, 244, 255, 0.28);
  --shadow: 0 0 32px rgba(22, 244, 255, 0.14);
  --font-ui: "Arial Narrow", "DIN Alternate", "Avenir Next Condensed", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-cn: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-cn);
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.city-backdrop {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(rgba(3, 6, 8, 0.16), rgba(3, 6, 8, 0.94)),
    url("./assets/night-city-command-v2.0.png") center top / cover no-repeat;
  filter: saturate(1.05) contrast(1.12);
  opacity: 0.35;
}

.city-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 63, 47, 0.18), transparent 22%),
    radial-gradient(circle at 82% 12%, rgba(255, 77, 216, 0.14), transparent 18%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), transparent 44%, rgba(0, 0, 0, 0.7));
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: screen;
  opacity: 0.24;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 12px clamp(14px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: rgba(1, 7, 9, 0.92);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-grid;
  grid-template-columns: 86px auto;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  min-width: 230px;
}

.brand-logo {
  width: 86px;
  height: 50px;
  object-fit: contain;
  padding: 3px 0;
  filter: drop-shadow(0 0 8px rgba(22, 244, 255, 0.44));
}

.brand strong,
.system-clock span,
.panel-heading,
.stat-card strong,
.eyebrow,
.command,
.nav-tab,
h1,
h2 {
  font-family: var(--font-ui);
  letter-spacing: 0;
}

.brand strong {
  display: block;
  font-size: 24px;
  line-height: 0.9;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
}

.nav-tabs {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--cyan) transparent;
}

.nav-tab,
.command,
.division-list button {
  min-height: 38px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(3, 17, 20, 0.75);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.nav-tab {
  flex: 0 0 auto;
  padding: 8px 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-tab:hover,
.nav-tab.active,
.command:hover,
.division-list button:hover {
  color: #031014;
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: 0 0 24px rgba(22, 244, 255, 0.24);
}

.nav-tab.alert {
  border-color: rgba(255, 63, 47, 0.54);
  color: #ffd8d4;
}

.nav-tab.alert.active,
.nav-tab.alert:hover {
  color: #160302;
  background: var(--red);
  border-color: var(--red);
}

.system-clock {
  display: grid;
  grid-template-columns: auto auto;
  gap: 3px 10px;
  align-items: center;
  justify-content: end;
  text-align: right;
  min-width: 116px;
}

.system-clock span {
  display: block;
  color: var(--green);
  font-size: 24px;
  line-height: 1;
}

.system-clock small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

.sound-toggle {
  min-width: 44px;
  min-height: 28px;
  padding: 4px 8px;
  color: var(--green);
  border: 1px solid rgba(70, 255, 143, 0.36);
  background: rgba(70, 255, 143, 0.08);
  font-family: var(--font-ui);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.sound-toggle[aria-pressed="false"] {
  color: var(--muted);
  border-color: rgba(122, 168, 173, 0.3);
  background: rgba(122, 168, 173, 0.06);
}

.mobile-sound-toggle {
  display: none;
}

main {
  width: min(1500px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 26px 0 40px;
}

.shell-panel {
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(22, 244, 255, 0.08), transparent 42%),
    linear-gradient(180deg, var(--panel-strong), var(--panel));
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.shell-panel::before {
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.8;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 1.05fr);
  gap: clamp(22px, 4vw, 54px);
  align-items: center;
  min-height: clamp(560px, 76vh, 760px);
  padding: clamp(24px, 5vw, 64px);
  overflow: hidden;
}

.hero-copy,
.hero-visual {
  min-width: 0;
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 5px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--red), var(--amber), transparent);
  box-shadow: 0 0 20px rgba(255, 63, 47, 0.48);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  color: #ffffff;
  font-size: clamp(48px, 9vw, 112px);
  line-height: 0.92;
  text-shadow:
    0 0 24px rgba(22, 244, 255, 0.22),
    2px 0 0 rgba(255, 63, 47, 0.36);
}

h1 span {
  display: block;
}

.hero-lead {
  max-width: 640px;
  margin: 18px 0 0;
  color: #bfe9ed;
  font-size: clamp(16px, 1.7vw, 22px);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.command {
  padding: 10px 18px;
  font-weight: 800;
  text-transform: uppercase;
}

.command.primary {
  color: #031014;
  border-color: var(--amber);
  background: var(--amber);
  box-shadow: 0 0 28px rgba(247, 197, 66, 0.22);
}

.command.primary:hover {
  background: var(--cyan);
  border-color: var(--cyan);
}

.hero-visual {
  position: relative;
  min-height: 430px;
}

.hero-visual > img:not(.hero-seal) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid rgba(22, 244, 255, 0.34);
  filter: saturate(1.15) contrast(1.15);
}

.hero-visual > img:not(.hero-seal) {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 92% 0, 100% 12%, 100% 100%, 8% 100%, 0 88%);
}

.hero-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(3, 6, 8, 0.38), transparent),
    repeating-linear-gradient(90deg, transparent 0, transparent 38px, rgba(22, 244, 255, 0.12) 39px);
  clip-path: polygon(0 0, 92% 0, 100% 12%, 100% 100%, 8% 100%, 0 88%);
}

.map-ping {
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 18px;
  border: 2px solid var(--red);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(255, 63, 47, 0.8);
  animation: pulse 1.8s ease-out infinite;
}

.hero-seal {
  position: absolute;
  right: clamp(14px, 3vw, 38px);
  bottom: clamp(14px, 3vw, 34px);
  z-index: 2;
  width: clamp(92px, 11vw, 148px);
  height: auto;
  opacity: 0.9;
  filter: drop-shadow(0 0 16px rgba(247, 197, 66, 0.32));
}

.ping-a {
  left: 31%;
  top: 36%;
}

.ping-b {
  right: 24%;
  top: 47%;
  border-color: var(--amber);
}

.ping-c {
  left: 54%;
  bottom: 23%;
  border-color: var(--magenta);
}

@keyframes pulse {
  0% {
    transform: scale(0.85);
    opacity: 0.9;
  }
  100% {
    transform: scale(2.8);
    opacity: 0;
  }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.panel-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--cyan);
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel-heading strong {
  color: var(--amber);
  font-size: 14px;
}

.ticker,
.stat-card,
.briefing,
.threat-board,
.filters,
.crime-map,
.map-details,
.case-table,
.case-detail,
.wanted-toolbar,
.jobs,
.apply-panel,
.recruit-test,
.report-main,
.report-notes,
.dispatch-form,
.dispatch-result {
  padding: 18px;
}

.ticker {
  overflow: hidden;
}

.ticker-track {
  display: flex;
  gap: 12px;
  white-space: nowrap;
  animation: ticker 34s linear infinite;
}

.ticker-item {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: #bfe9ed;
  font-family: var(--font-ui);
  font-weight: 700;
  text-transform: uppercase;
}

.ticker-item b {
  color: var(--red);
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.stat-card {
  min-height: 122px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin: 8px 0 6px;
  color: white;
  font-size: clamp(32px, 3vw, 48px);
  line-height: 0.95;
}

.stat-card small {
  color: var(--green);
}

.stat-card.danger small {
  color: var(--red);
}

.stat-card.warning small {
  color: var(--amber);
}

.command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 14px;
  margin-top: 14px;
}

.briefing p,
.report-notes p,
.dispatch-result p {
  margin: 0;
  color: #bfe9ed;
  line-height: 1.75;
}

.agency-lockup {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(247, 197, 66, 0.22);
  background:
    linear-gradient(90deg, rgba(247, 197, 66, 0.12), transparent),
    rgba(0, 0, 0, 0.18);
  color: inherit;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.agency-lockup:hover,
.agency-lockup:focus-visible {
  border-color: rgba(247, 197, 66, 0.72);
  background:
    linear-gradient(90deg, rgba(247, 197, 66, 0.2), rgba(22, 244, 255, 0.06)),
    rgba(0, 0, 0, 0.22);
  box-shadow: 0 0 22px rgba(247, 197, 66, 0.14);
  transform: translateY(-1px);
}

.agency-lockup:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.agency-lockup img {
  width: 82px;
  height: 98px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(247, 197, 66, 0.26));
}

.agency-lockup span,
.agency-lockup strong {
  display: block;
  font-family: var(--font-ui);
  font-weight: 900;
  text-transform: uppercase;
}

.agency-lockup span {
  color: var(--cyan);
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1;
}

.agency-lockup strong {
  margin-top: 6px;
  color: var(--amber);
  font-size: 16px;
}

.division-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.division-list button {
  padding: 12px;
  font-weight: 700;
}

.district-list {
  display: grid;
  gap: 9px;
}

.district-button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid rgba(22, 244, 255, 0.22);
  background: rgba(0, 0, 0, 0.16);
  text-align: left;
}

.district-button.active,
.district-button:hover {
  border-color: var(--cyan);
  background: rgba(22, 244, 255, 0.12);
}

.district-button span {
  color: white;
  font-weight: 800;
}

.district-button small {
  color: var(--muted);
}

.badge {
  display: inline-grid;
  min-width: 74px;
  min-height: 28px;
  place-items: center;
  padding: 4px 8px;
  color: #06080a;
  background: var(--green);
  font-family: var(--font-ui);
  font-weight: 900;
  text-transform: uppercase;
}

.badge.high {
  background: var(--amber);
}

.badge.extreme,
.badge.maxtac {
  color: white;
  background: var(--red);
}

.view-shell {
  padding: clamp(18px, 3vw, 34px) 0 0;
}

.view-title {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.view-title h2 {
  color: white;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1;
}

.map-layout,
.case-layout,
.recruit-layout,
.report-layout,
.dispatch-layout {
  display: grid;
  gap: 14px;
}

.map-layout {
  grid-template-columns: 250px minmax(0, 1fr) 310px;
}

.filters {
  display: grid;
  align-content: start;
  gap: 14px;
}

.filters label,
.apply-panel label,
.dispatch-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.filters input[type="checkbox"],
.check-row input {
  accent-color: var(--layer-color, var(--cyan));
}

.filters input:not([type="checkbox"]),
.filters select,
.apply-panel input,
.apply-panel select,
.dispatch-form select {
  width: 100%;
  min-height: 42px;
  color: var(--ink);
  border: 1px solid rgba(22, 244, 255, 0.34);
  background: rgba(1, 8, 10, 0.86);
  padding: 8px 10px;
}

.filters label:has(input[type="checkbox"]) {
  --layer-color: var(--cyan);
  display: flex;
  gap: 10px;
  align-items: center;
  color: color-mix(in srgb, var(--layer-color) 72%, var(--ink));
  font-weight: 700;
}

.filters label:has(input[value="violence"]) {
  --layer-color: var(--orange);
}

.filters label:has(input[value="cyber"]) {
  --layer-color: var(--cyan);
}

.filters label:has(input[value="gang"]) {
  --layer-color: var(--amber);
}

.filters label:has(input[value="psycho"]) {
  --layer-color: var(--red);
}

.filters label:has(input[value="corp"]) {
  --layer-color: var(--magenta);
}

.filters label:has(input[type="checkbox"])::after {
  width: 12px;
  height: 12px;
  margin-left: auto;
  content: "";
  border: 2px solid var(--layer-color);
  background: color-mix(in srgb, var(--layer-color) 34%, transparent);
  box-shadow: 0 0 14px var(--layer-color);
}

.filters input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.range-block {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(22, 244, 255, 0.16);
}

.range-block span,
.range-block output {
  color: var(--muted);
  font-size: 13px;
}

.crime-map {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
}

.map-canvas {
  position: relative;
  width: min(100%, 720px);
  aspect-ratio: 1900 / 2300;
  max-width: 100%;
  border: 1px solid rgba(22, 244, 255, 0.34);
  background: rgba(0, 0, 0, 0.58);
  box-shadow: 0 0 34px rgba(22, 244, 255, 0.12);
  overflow: hidden;
}

.map-canvas::after {
  position: absolute;
  inset: 0;
  z-index: 8;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(22, 244, 255, 0.1), transparent 18%, transparent 82%, rgba(255, 63, 47, 0.08)),
    repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(255, 255, 255, 0.035) 4px);
}

.map-canvas img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.9;
  filter: saturate(1.12) contrast(1.08) brightness(0.86);
}

.district-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.district-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.district-boundary {
  cursor: pointer;
  fill: transparent;
  stroke: transparent;
  stroke-width: 0;
  vector-effect: non-scaling-stroke;
  pointer-events: all;
  transition: fill 140ms ease;
}

.district-boundary:hover,
.district-boundary.active {
  fill: rgb(var(--district-color) / 0.035);
}

.district-label-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.restricted-boundary {
  cursor: pointer;
  fill: rgba(255, 63, 47, 0.16);
  stroke: rgba(255, 63, 47, 0.94);
  stroke-dasharray: 2 1.4;
  stroke-width: 0.75;
  vector-effect: non-scaling-stroke;
  pointer-events: auto;
  transition:
    fill 140ms ease,
    stroke-width 140ms ease,
    filter 140ms ease;
}

.restricted-boundary:hover,
.restricted-boundary.active {
  fill: rgba(255, 63, 47, 0.3);
  stroke-width: 1;
  filter: drop-shadow(0 0 4px rgba(255, 63, 47, 0.9));
}

.restricted-label {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 3px;
  min-height: 34px;
  padding: 5px 7px;
  color: #fff7f4;
  border: 1px solid rgba(255, 63, 47, 0.86);
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 16px rgba(255, 63, 47, 0.2);
  font-family: var(--font-ui);
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  pointer-events: auto;
}

.restricted-label span,
.restricted-label strong {
  display: block;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}

.restricted-label span {
  font-size: 12px;
  font-weight: 900;
}

.restricted-label strong {
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
}

.restricted-label:hover,
.restricted-label.active {
  background: rgba(255, 63, 47, 0.28);
}

.service-limit {
  display: inline-block;
  padding: 4px 8px;
  color: #fff7f4;
  background: rgba(255, 63, 47, 0.18);
  border: 1px solid rgba(255, 63, 47, 0.48);
  font-family: var(--font-ui);
  font-weight: 900;
  text-transform: uppercase;
}

.incident-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.incident-marker {
  position: absolute;
  z-index: 5;
  appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 2px solid currentColor;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.56);
  box-shadow: 0 0 16px currentColor;
  color: var(--cyan);
  line-height: 0;
  pointer-events: auto;
}

.incident-marker::after {
  position: absolute;
  inset: 3px;
  content: "";
  background: currentColor;
  pointer-events: none;
}

.incident-marker:hover,
.incident-marker:focus-visible,
.incident-marker.active {
  z-index: 8;
  outline: 0;
  background: currentColor;
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.76),
    0 0 22px currentColor;
}

.incident-marker:hover::after,
.incident-marker:focus-visible::after,
.incident-marker.active::after {
  background: rgba(0, 0, 0, 0.82);
}

.incident-marker.violence {
  color: var(--orange);
}

.incident-marker.psycho {
  color: var(--red);
}

.incident-marker.cyber {
  color: var(--cyan);
}

.incident-marker.gang {
  color: var(--amber);
}

.incident-marker.corp {
  color: var(--magenta);
}

.incident-popup {
  position: absolute;
  z-index: 9;
  transform: translate(14px, -18px);
  width: 268px;
  max-width: calc(100% - 24px);
  padding: 10px 11px 11px;
  color: var(--ink);
  border: 1px solid rgba(22, 244, 255, 0.68);
  background:
    linear-gradient(135deg, rgba(22, 244, 255, 0.18), transparent 42%),
    rgba(1, 10, 13, 0.94);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.58),
    0 0 24px rgba(22, 244, 255, 0.24);
  font-size: 12px;
  line-height: 1.45;
  pointer-events: auto;
}

.incident-popup.flip-x {
  transform: translate(calc(-100% - 14px), -18px);
}

.incident-popup.flip-y {
  transform: translate(14px, calc(-100% + 18px));
}

.incident-popup.flip-x.flip-y {
  transform: translate(calc(-100% - 14px), calc(-100% + 18px));
}

.incident-popup-heading {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--cyan);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.incident-close {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  margin: 0;
  padding: 0;
  color: #031014;
  border: 1px solid var(--cyan);
  background: var(--cyan);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.incident-close:hover,
.incident-close:focus-visible {
  color: #160302;
  border-color: var(--red);
  background: var(--red);
  outline: 0;
}

.incident-popup strong,
.incident-popup code {
  display: block;
}

.incident-popup strong {
  color: white;
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 900;
  text-transform: uppercase;
}

.incident-popup code {
  margin: 2px 0 8px;
  color: var(--amber);
  font-family: var(--font-ui);
  font-size: 12px;
}

.incident-popup dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 4px 8px;
  margin: 0;
}

.incident-popup dt {
  color: var(--muted);
}

.incident-popup dd {
  min-width: 0;
  margin: 0;
  color: white;
}

.incident-popup p {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(22, 244, 255, 0.16);
  color: #bfe9ed;
}

.map-details dl,
.case-detail dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px 12px;
  margin: 0;
}

.map-details dt,
.case-detail dt {
  color: var(--muted);
}

.map-details dd,
.case-detail dd {
  margin: 0;
  color: white;
}

.case-layout {
  grid-template-columns: 250px minmax(0, 1fr) 340px;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(22, 244, 255, 0.16);
  text-align: left;
}

th {
  color: var(--cyan);
  font-family: var(--font-ui);
  font-size: 14px;
  text-transform: uppercase;
}

td {
  color: #d8fbff;
}

tr {
  transition: background 140ms ease;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.active {
  background: rgba(22, 244, 255, 0.09);
}

.case-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(22, 244, 255, 0.16);
}

.page-number-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.page-arrow,
.page-number,
.page-go {
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  padding: 0 9px;
  color: var(--ink);
  border: 1px solid rgba(22, 244, 255, 0.28);
  background: rgba(0, 0, 0, 0.24);
  font-family: var(--font-ui);
  font-weight: 900;
  line-height: 1;
}

.page-arrow {
  color: var(--cyan);
  font-size: 24px;
}

.page-number:hover,
.page-number.active,
.page-arrow:hover,
.page-go:hover {
  color: #031014;
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(22, 244, 255, 0.2);
}

.page-arrow:disabled,
.page-number:disabled,
.page-go:disabled {
  cursor: not-allowed;
  color: rgba(122, 168, 173, 0.52);
  border-color: rgba(122, 168, 173, 0.18);
  background: rgba(0, 0, 0, 0.14);
  box-shadow: none;
}

.page-gap,
.page-status {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 800;
}

.page-jump {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-left: 6px;
}

.page-jump label {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.page-jump input {
  width: 68px;
  height: 34px;
  color: var(--ink);
  border: 1px solid rgba(22, 244, 255, 0.32);
  background: rgba(1, 8, 10, 0.86);
  padding: 6px 8px;
  font-family: var(--font-ui);
  font-weight: 900;
}

.case-detail h3,
.wanted-card h3,
.job-card h3 {
  margin: 0 0 10px;
  color: white;
  font-family: var(--font-ui);
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
}

.case-detail p,
.wanted-card p,
.job-card p {
  color: #bfe9ed;
  line-height: 1.65;
}

.redacted {
  color: var(--red);
  background: rgba(255, 63, 47, 0.12);
  font-family: var(--font-ui);
  font-weight: 800;
}

.wanted-toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.wanted-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.wanted-controls label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.wanted-controls select {
  width: 100%;
  min-height: 42px;
  color: var(--ink);
  border: 1px solid rgba(22, 244, 255, 0.34);
  background: rgba(1, 8, 10, 0.86);
  padding: 8px 10px;
}

.wanted-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  gap: 14px;
}

.wanted-pagination {
  margin-top: 16px;
}

.wanted-card {
  min-height: 440px;
  padding: 18px;
}

.mugshot {
  position: relative;
  display: grid;
  height: 190px;
  margin-bottom: 16px;
  place-items: center;
  border: 1px solid rgba(22, 244, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(22, 244, 255, 0.08), rgba(255, 63, 47, 0.1)),
    repeating-linear-gradient(0deg, transparent, transparent 12px, rgba(255, 255, 255, 0.04) 13px);
  overflow: hidden;
}

.mugshot span {
  color: rgba(216, 251, 255, 0.72);
  font-family: var(--font-ui);
  font-size: 82px;
  font-weight: 900;
}

.mugshot::before,
.mugshot::after {
  position: absolute;
  content: "";
  border: 2px solid var(--red);
  inset: 18px;
  opacity: 0.75;
}

.mugshot::after {
  inset: 42px 36px;
  border-color: var(--cyan);
}

.wanted-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.recruit-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.job-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px;
}

.job-card {
  padding: 16px;
  border: 1px solid rgba(22, 244, 255, 0.18);
  background: rgba(0, 0, 0, 0.18);
}

.job-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #bfe9ed;
  line-height: 1.6;
}

.apply-panel,
.dispatch-form {
  align-content: start;
  display: grid;
  gap: 14px;
}

.recruit-test {
  display: grid;
  grid-column: 1 / -1;
  gap: 14px;
}

.test-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.test-meta span {
  min-height: 64px;
  padding: 10px;
  color: #bfe9ed;
  border: 1px solid rgba(22, 244, 255, 0.16);
  background: rgba(0, 0, 0, 0.18);
  line-height: 1.4;
}

.test-meta b {
  display: block;
  margin-bottom: 4px;
  color: var(--cyan);
  font-family: var(--font-ui);
  font-size: 12px;
  text-transform: uppercase;
}

.test-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.test-actions .command:disabled {
  cursor: not-allowed;
  color: rgba(122, 168, 173, 0.52);
  border-color: rgba(122, 168, 173, 0.18);
  background: rgba(0, 0, 0, 0.16);
  box-shadow: none;
}

.test-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.test-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.test-question {
  min-width: 0;
  margin: 0;
  padding: 13px;
  border: 1px solid rgba(22, 244, 255, 0.18);
  background: rgba(0, 0, 0, 0.18);
}

.test-question legend {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  color: white;
  font-weight: 800;
  line-height: 1.45;
}

.test-question legend span {
  display: inline-grid;
  min-width: 30px;
  min-height: 24px;
  place-items: center;
  margin-right: 8px;
  color: #031014;
  background: var(--cyan);
  font-family: var(--font-ui);
  font-weight: 900;
}

.test-question label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  margin-top: 8px;
  color: #bfe9ed;
  line-height: 1.45;
}

.test-question input {
  margin-top: 3px;
  accent-color: var(--cyan);
}

.test-question input:disabled + span {
  color: rgba(191, 233, 237, 0.55);
}

.result-box {
  display: block;
  min-height: 104px;
  padding: 14px;
  color: var(--green);
  border: 1px solid rgba(70, 255, 143, 0.28);
  background: rgba(70, 255, 143, 0.06);
  font-family: var(--font-ui);
  font-weight: 800;
  white-space: pre-line;
}

.test-result {
  white-space: normal;
}

.test-result dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 7px 12px;
  margin: 10px 0 0;
}

.test-result dt {
  color: var(--muted);
}

.test-result dd {
  margin: 0;
  color: white;
}

.test-result p {
  margin: 10px 0 0;
  color: #bfe9ed;
  line-height: 1.55;
}

.test-score {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: end;
}

.test-score span,
.test-score small {
  color: var(--green);
  font-family: var(--font-ui);
  font-weight: 900;
  text-transform: uppercase;
}

.test-score strong {
  grid-row: span 2;
  color: white;
  font-family: var(--font-ui);
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.9;
}

.report-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.report-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.report-controls button {
  min-height: 36px;
  padding: 8px 12px;
  color: var(--ink);
  border: 1px solid rgba(22, 244, 255, 0.26);
  background: rgba(0, 0, 0, 0.24);
  font-family: var(--font-ui);
  font-weight: 900;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.report-controls button:hover,
.report-controls button.active {
  color: #041012;
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(22, 244, 255, 0.22);
}

.report-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.report-kpi {
  min-height: 104px;
  padding: 12px;
  border: 1px solid rgba(22, 244, 255, 0.18);
  background: rgba(0, 0, 0, 0.2);
}

.report-kpi span,
.report-kpi small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.report-kpi strong {
  display: block;
  margin: 8px 0 4px;
  color: white;
  font-family: var(--font-ui);
  font-size: clamp(25px, 2.7vw, 42px);
  line-height: 1;
}

.report-kpi small {
  color: var(--green);
  font-family: var(--font-ui);
  font-weight: 900;
}

.bar-chart {
  display: grid;
  gap: 18px;
}

.bar-row {
  display: grid;
  grid-template-columns: 180px 1fr 104px 72px;
  gap: 12px;
  align-items: center;
}

.bar-row span {
  color: var(--muted);
}

.bar-row small {
  color: var(--green);
  font-family: var(--font-ui);
  font-weight: 900;
  text-align: right;
}

.bar-track {
  height: 24px;
  border: 1px solid rgba(22, 244, 255, 0.18);
  background: rgba(0, 0, 0, 0.32);
}

.bar-fill {
  width: var(--value);
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--amber), var(--red));
  box-shadow: 0 0 22px rgba(22, 244, 255, 0.2);
}

.dispatch-layout {
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1fr);
}

.notice {
  margin: 0;
  padding: 12px;
  color: #ffd8d4;
  border: 1px solid rgba(255, 63, 47, 0.3);
  background: rgba(255, 63, 47, 0.08);
  line-height: 1.65;
}

.check-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.dispatch-result strong.case-id {
  display: block;
  margin: 12px 0;
  color: var(--amber);
  font-family: var(--font-ui);
  font-size: clamp(34px, 5vw, 66px);
  line-height: 0.9;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(14px, 3vw, 34px) 28px;
  color: var(--muted);
  border-top: 1px solid rgba(22, 244, 255, 0.14);
  background: rgba(0, 0, 0, 0.32);
  font-size: 12px;
}

.footer img {
  width: 94px;
  height: 42px;
  object-fit: contain;
  opacity: 0.72;
  filter: drop-shadow(0 0 7px rgba(22, 244, 255, 0.24));
}

[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav-tabs {
    grid-column: 1 / -1;
    order: 3;
  }

  .hero,
  .dashboard-grid,
  .command-grid,
  .map-layout,
  .case-layout,
  .recruit-layout,
  .report-layout,
  .dispatch-layout {
    grid-template-columns: 1fr;
  }

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

  .ticker {
    grid-column: 1 / -1;
  }

  .crime-map {
    min-height: 0;
  }

  .wanted-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 720px) {
  main {
    width: min(100vw - 18px, 1500px);
    padding-top: 12px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100vw;
    max-width: 100vw;
    gap: 10px;
    overflow: hidden;
    padding: 10px;
  }

  .brand {
    grid-template-columns: 56px auto;
    min-width: 124px;
    gap: 8px;
  }

  .brand-logo {
    width: 56px;
    height: 36px;
  }

  .brand small,
  .system-clock small {
    display: none;
  }

  .system-clock {
    display: none;
    min-width: 44px;
    grid-template-columns: auto;
    justify-items: end;
  }

  .sound-toggle {
    min-height: 24px;
    font-size: 11px;
  }

  .mobile-sound-toggle {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    min-width: 48px;
    min-height: 42px;
  }

  .system-clock span {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 22px;
  }

  h1 {
    font-size: clamp(40px, 13vw, 48px);
    overflow-wrap: anywhere;
  }

  .hero-visual {
    min-height: 300px;
  }

  .hero-seal {
    display: none;
  }

  .dashboard-grid,
  .division-list,
  .wanted-grid,
  .wanted-controls,
  .test-form,
  .test-meta,
  .job-list,
  .report-kpis {
    grid-template-columns: 1fr;
  }

  .view-title {
    display: block;
  }

  .crime-map {
    min-height: 0;
  }

  .map-canvas {
    width: min(100%, 390px);
  }

  .restricted-label {
    min-height: 28px;
    padding: 4px 5px;
  }

  .restricted-label span,
  .restricted-label strong {
    font-size: 8px;
  }

  .map-details dl,
  .case-detail dl {
    grid-template-columns: 1fr;
  }

  .case-pagination,
  .page-jump {
    justify-content: flex-start;
  }

  .case-pagination {
    gap: 7px;
  }

  .page-jump {
    width: 100%;
    margin-left: 0;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(22, 244, 255, 0.12);
  }

  .bar-row small {
    text-align: left;
  }

  .report-main > .panel-heading {
    display: grid;
    gap: 4px;
    justify-content: start;
  }

  .report-main > .panel-heading strong {
    justify-self: start;
  }
}
