:root {
  --bg: #f3f5f9;
  --bg-grad: radial-gradient(1200px 600px at 10% -10%, #eef2ff 0%, transparent 60%), radial-gradient(1000px 500px at 100% 0%, #f0fdf9 0%, transparent 55%), #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e5e9f0;
  --text: #1c2333;
  --text-muted: #667085;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-light: #eff4ff;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #f59e0b;
  --gray: #6b7280;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-md: 0 4px 10px rgba(16, 24, 40, .08), 0 2px 4px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14), 0 4px 10px rgba(16, 24, 40, .06);
  --radius: 12px;
  --radius-sm: 8px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  background: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

::selection { background: rgba(37, 99, 235, .18); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d3d9e3; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #b9c1cf; background-clip: padding-box; }

/* ---------- Nav bar ---------- */

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(16, 24, 40, .03);
  flex-wrap: wrap;
  z-index: 1000;
  position: sticky;
  top: 0;
}

.nav-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.nav-brand__icon {
  font-size: 22px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  box-shadow: 0 4px 12px rgba(37, 99, 235, .35);
  flex: none;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.14s ease;
}
.nav-brand__icon:hover,
.nav-brand__icon:focus-visible {
  opacity: 0.82;
}
.nav-brand__text { display: grid; gap: 2px; }
.nav-brand__title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 1px 5px;
  margin: -1px -5px;
  font-family: inherit;
  min-width: 160px;
}
.nav-brand__subtitle {
  font-size: 12px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 1px 5px;
  margin: -1px -5px;
  font-family: inherit;
  min-width: 160px;
}
.nav-brand__title:hover, .nav-brand__subtitle:hover { border-color: var(--border); }
.nav-brand__title:focus, .nav-brand__subtitle:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.nav-back {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  margin-right: 4px;
}
.nav-back:hover { background: var(--surface-2); color: var(--text); }

.autosave-control { display: flex; align-items: center; gap: 6px; }
#autosave-btn.is-connected { border-color: #86efac; background: #f0fdf4; color: #15803d; }
#autosave-btn.is-connected:hover { background: #dcfce7; }
#autosave-btn.is-error { border-color: #fecaca; background: #fef2f2; color: var(--red); }
#restore-label input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.nav-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.nav-links { display: flex; gap: 4px; flex-wrap: wrap; background: var(--surface-2); padding: 4px; border-radius: 12px; border: 1px solid var(--border); }

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background .18s var(--ease), color .18s var(--ease), transform .15s var(--ease);
}

.nav-link:hover { background: rgba(37, 99, 235, .08); color: var(--text); }
.nav-link:active { transform: scale(.97); }
.nav-link--active { background: var(--brand); color: white; box-shadow: 0 2px 8px rgba(37, 99, 235, .35); }
.nav-link--active:hover { background: var(--brand-dark); color: white; }
.nav-link__icon { font-size: 14px; }

/* ---------- Page shell ---------- */

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.tab-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.page-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 22px;
  animation: fade-up .35s var(--ease) both;
}

.page-header {
  padding: 20px 22px 4px;
  animation: fade-up .3s var(--ease) both;
}

.page-header h1 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.01em; }
.page-header p { margin: 0; color: var(--text-muted); font-size: 13px; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(.85); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .12);
}

.badge--green { background: linear-gradient(135deg, #22c55e, var(--green)); }
.badge--red { background: linear-gradient(135deg, #ef4444, var(--red)); }
.badge--amber { background: linear-gradient(135deg, #fbbf24, var(--amber)); }
.badge--gray { background: linear-gradient(135deg, #9ca3af, var(--gray)); }
.badge--blue { background: linear-gradient(135deg, #3b82f6, var(--brand)); }
.badge--outline { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: none; }

button.badge,
a.badge {
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
  transition: transform .12s var(--ease), filter .12s var(--ease), box-shadow .12s var(--ease);
}
button.badge:hover, a.badge:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: var(--shadow-md); }
button.badge:active { transform: scale(.95); }
button.badge.badge--outline, a.badge.badge--outline { border: 1px solid var(--border); }
button.badge.badge--outline:hover, a.badge.badge--outline:hover { background: var(--surface-2); }

/* ---------- Cards / surfaces ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background .16s var(--ease), box-shadow .16s var(--ease), transform .12s var(--ease), border-color .16s var(--ease);
}

.btn:hover { background: var(--surface-2); box-shadow: var(--shadow); }
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); border-color: var(--brand-dark); color: white; box-shadow: 0 2px 8px rgba(37, 99, 235, .3); }
.btn-primary:hover { background: linear-gradient(135deg, var(--brand-dark), var(--brand-dark)); box-shadow: 0 4px 14px rgba(37, 99, 235, .4); }
.btn-danger { color: var(--red); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Forms ---------- */

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

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field--full { grid-column: 1 / -1; }
.form-field label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }

.form-field input,
.form-field select,
.form-field textarea {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.form-field textarea { resize: vertical; min-height: 70px; }
.form-hint { font-size: 12px; color: var(--text-muted); }

.picker-input-group { display: flex; gap: 6px; }
.picker-input-group input[type="text"] { flex: 1; min-width: 0; }
.picker-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  flex: none;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.picker-icon-btn:hover { background: var(--surface-2); border-color: var(--brand); }
.picker-icon-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.form-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 20px; align-items: start; }
#pick-map { height: 320px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.form-actions { display: flex; gap: 10px; margin-top: 18px; }

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

/* ---------- Map tab ---------- */

.map-layout {
  flex: 1;
  display: flex;
  min-height: 0;
  position: relative;
}

#map { flex: 1; background: #eef1f5; min-height: 320px; }

.map-panel {
  position: absolute;
  z-index: 900;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  animation: fade-up .3s var(--ease) both;
}

.map-panel--legend {
  bottom: 16px;
  left: 16px;
  padding: 12px 14px;
  max-width: 240px;
}

.map-panel--legend h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.legend-row { display: flex; align-items: center; gap: 8px; margin: 5px 0; }
.legend-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.legend-chip { width: 18px; height: 18px; border-radius: 5px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 10px; color: white; }

.map-panel--filters {
  top: 16px;
  right: 16px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-check { display: flex; align-items: center; gap: 7px; font-size: 12px; cursor: pointer; user-select: none; }
.filter-check input { accent-color: var(--brand); }

.map-panel--stats {
  top: 16px;
  left: 16px;
  padding: 10px 16px;
  display: flex;
  gap: 20px;
}

.stat { text-align: center; }
.stat b { display: block; font-size: 19px; line-height: 1.1; background: linear-gradient(135deg, var(--text), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 11px; color: var(--text-muted); }

.incident-marker { position: relative; width: 34px; height: 34px; animation: marker-drop .4s var(--ease) both; }

@keyframes marker-drop {
  from { opacity: 0; transform: translateY(-14px) scale(.6); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.incident-marker__pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  animation: pulse-ring 2.2s var(--ease) infinite;
  pointer-events: none;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 var(--pulse-color, rgba(220, 38, 38, .45)); }
  70% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.incident-marker__circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid white;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.04);
  transition: transform .18s var(--ease);
  cursor: pointer;
}

.incident-marker:hover .incident-marker__circle { transform: scale(1.14); }

.incident-marker__cctv {
  position: absolute;
  top: -5px;
  right: -7px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid white;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  box-shadow: 0 1px 3px rgba(0,0,0,.45);
}

.popup-card { font-family: inherit; font-size: 13px; width: 300px; }
.popup-card h3 { margin: 0 0 8px; font-size: 15px; }
.popup-card table { border-collapse: collapse; width: 100%; }
.popup-card table td { padding: 3px 0; vertical-align: top; }
.popup-card table td:first-child { color: var(--text-muted); font-weight: 600; width: 40%; }
.popup-card .summary { margin-top: 8px; }
.popup-card .popup-actions { margin-top: 10px; display: flex; gap: 8px; }

.leaflet-popup-content-wrapper { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.leaflet-popup-content { margin: 14px 16px; }

.popup-offenders { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.popup-offenders__title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); margin-bottom: 6px; }
.popup-offenders__list { display: flex; flex-wrap: wrap; gap: 8px; }

.offender-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  text-decoration: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s var(--ease), transform .15s var(--ease);
}
.offender-chip:hover { background: var(--brand-light); transform: translateY(-1px); }
.offender-chip__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gray);
  flex: none;
}
.offender-chip__avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: white;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
}

/* ---------- Evidence (photo/video) attachments ---------- */

.evidence-section { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.evidence-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.evidence-count { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.evidence-empty { font-size: 12px; color: var(--text-muted); margin: 6px 0; }
.evidence-grid { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }

.evidence-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 12px;
  transition: background .15s var(--ease);
}
.evidence-chip:hover { background: #f1f4f8; }

.evidence-chip__icon { font-size: 15px; flex: none; }
.evidence-chip__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evidence-card { padding: 20px; margin-top: 16px; }
.evidence-card h2 { margin: 0 0 4px; font-size: 15px; }
.evidence-card p.form-hint { margin: 0 0 12px; }

/* ---------- CCTV tab ---------- */

.cctv-list { display: flex; flex-direction: column; gap: 14px; }
.cctv-card { padding: 16px 18px; }
.cctv-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cctv-card__title { font-weight: 700; font-size: 14px; }
.cctv-card__meta { font-size: 12px; color: var(--text-muted); }

/* ---------- Incident management table ---------- */

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.toolbar input[type="search"],
.toolbar select {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: var(--surface);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.toolbar input[type="search"]:focus,
.toolbar select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.toolbar input[type="search"] { flex: 1; min-width: 180px; }
.toolbar .spacer { flex: 1; }

.table-wrap {
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

table.incident-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.incident-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .03em;
  position: sticky;
  top: 0;
}
table.incident-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.incident-table tr:last-child td { border-bottom: none; }
table.incident-table tr { transition: background .12s var(--ease); }
table.incident-table tr:hover td { background: var(--surface-2); }

.row-actions { display: flex; gap: 6px; white-space: nowrap; }
.summary-cell { max-width: 260px; color: var(--text-muted); }
.empty-state { padding: 48px 20px; text-align: center; color: var(--text-muted); }
.empty-state__icon { font-size: 32px; display: block; margin-bottom: 8px; opacity: .6; }

/* ---------- Offender profiles ---------- */

.offender-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.offender-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: pop-in .3s var(--ease) both;
}
.offender-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.offender-card__header { display: flex; align-items: center; gap: 12px; }

.offender-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex: none;
}
.offender-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
}

.offender-card__name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.offender-card__alias { font-size: 12px; color: var(--text-muted); }

.offender-card__details { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text); }
.offender-card__details div { display: flex; gap: 6px; }
.offender-card__details span.label { color: var(--text-muted); min-width: 70px; flex: none; }

.offender-card__linked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.offender-card__actions { margin-top: auto; display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }

.avatar-picker { display: flex; align-items: center; gap: 16px; }
.avatar-picker__preview {
  width: 84px;
  height: 84px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex: none;
}
.avatar-picker__preview--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--text-muted);
}

.incident-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: var(--surface-2);
}
.incident-picker label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  cursor: pointer;
  transition: background .12s var(--ease);
}
.incident-picker label:hover { background: var(--surface); }
.incident-picker input { accent-color: var(--brand); }

@media (max-width: 720px) {
  .avatar-picker { flex-direction: column; align-items: flex-start; }
}

/* ---------- Offender modal ---------- */

dialog#offenderModal {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  width: min(720px, 92vw);
  max-height: 88vh;
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  color: var(--text);
}
dialog#offenderModal::backdrop {
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(2px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 { margin: 0; font-size: 16px; }
.modal-close {
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 8px;
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-body { padding: 20px; overflow: auto; max-height: calc(88vh - 60px); }

@media print {
  .nav-bar, .toolbar, .row-actions, .form-actions, .evidence-toolbar, .map-panel--filters {
    display: none !important;
  }
}

.legend-success { background: var(--green); }
.legend-danger { background: var(--red); }
.legend-warning { background: var(--amber); }
.legend-primary { background: var(--brand); }
.legend-muted { background: var(--gray); }
.legend-corridor {
  display: inline-block;
  width: 26px;
  height: 4px;
  background: var(--brand);
  border-radius: 2px;
}
.incident-form-card { padding: var(--ds-space-5, 20px); }
.avatar-picker-actions {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-2, 8px);
}
