* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  scrollbar-color: rgba(255,255,255,0.35) rgba(255,255,255,0.08);
  scrollbar-width: thin;
}
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
*::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
}
*::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.35);
  border-radius: 10px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.45);
}
    body {
      background: #020617;
      color: #e5e7eb;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      overflow: hidden;
    }
#ui {
  position: fixed;
  top: 12px;
  left: 12px;
      background: rgba(15,23,42,0.85);
      border-radius: 12px;
      padding: 10px 14px;
      border: 1px solid rgba(148,163,184,0.7);
      backdrop-filter: blur(8px);
      z-index: 10;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }
    button {
      border-radius: 999px;
      padding: 6px 14px;
      border: 1px solid rgba(148,163,184,.6);
      background: radial-gradient(circle at top, rgba(55,65,81,.9), rgba(15,23,42,1));
      color: #e5e7eb;
      font-size: .8rem;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.55);
      transition: background .15s ease, transform .08s ease, box-shadow .08s ease;
    }
    button span.dot {
      width: 8px;
      height: 8px;
      border-radius: 999px;
      background: #22c55e;
      box-shadow: 0 0 8px rgba(34,197,94,0.9);
    }
    button[data-active="false"] span.dot {
      background: #ef4444;
      box-shadow: 0 0 6px rgba(239,68,68,0.9);
    }
    button:hover {
      background: radial-gradient(circle at top, rgba(37,99,235,.85), rgba(15,23,42,1));
      transform: translateY(-1px);
      box-shadow: 0 14px 32px rgba(37,99,235,0.6);
    }
    button:active {
      transform: translateY(1px) scale(.98);
      box-shadow: 0 6px 12px rgba(0,0,0,0.75);
    }
    #hint {
      font-size: .75rem;
      color: #9ca3af;
      margin-left: 4px;
    }
    #game {
      width: 100vw;
      height: auto;
      display: block;
      background: #000;
    }
#coordDisplay, #modeDisplay {
  display: none;
  position: fixed;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(15,23,42,0.85);
  border: 1px solid rgba(148,163,184,0.6);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 14px;
  z-index: 25;
  pointer-events: none;
}
#modeDisplay {
  bottom: 44px;
}
#editPanel {
  position: fixed;
  top: 80px;
  left: 80px;
  width: 420px;
  max-width: 420px;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(148,163,184,0.6);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  z-index: 14;
}
#editPanel.hidden { display: none; }
#editPanel .edit-header { cursor: grab; }
#placePanel {
  position: fixed;
  bottom: 60px;
  left: 12px;
  padding: 8px 10px;
  background: rgba(15,23,42,0.85);
  border: 1px solid rgba(148,163,184,0.6);
  border-radius: 10px;
  font-size: 0.8rem;
  color: #e5e7eb;
  z-index: 11;
  display: flex;
  gap: 8px;
  align-items: center;
  user-select: none;
}
#placePanel.hidden {
  display: none;
}
#vehicleModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 12;
}
#vehicleModal .modal-content,
#playerModal .modal-content {
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(148,163,184,0.6);
  border-radius: 12px;
  padding: 16px;
  width: 420px;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  position: fixed;
  user-select: none;
}
#vehicleModal .close,
#playerModal .close,
.close,
.pager-close,
.radio-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e13232;
  border: none;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
}
#vehicleModal h4,
#playerModal h4 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #e5e7eb;
}
#vehicleModal .modal-header {
  cursor: grab;
}
#vehicleModal .list,
#playerModal .list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
}
#vehicleModal .place-controls {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  align-items: center;
}
#vehicleModal .place-controls span {
  text-align: center;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 8px;
  color: #e5e7eb;
}
#vehicleModal .place-controls button {
  width: 100%;
}
#vehicleModal .filters {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
#vehicleModal .filters input,
#vehicleModal .filters select {
  flex: 1;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,0.4);
  background: rgba(15,23,42,0.6);
  color: #e5e7eb;
}
#vehicleModal .list button,
#playerModal .list button {
  width: 100%;
  justify-content: flex-start;
  background: radial-gradient(circle at top, rgba(55,65,81,.9), rgba(15,23,42,1));
  display: flex;
  align-items: center;
  gap: 8px;
}
#vehicleModal .thumb,
#playerModal .thumb {
  width: 32px;
  height: 32px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 6px;
  border: 1px solid rgba(148,163,184,0.6);
}
#btnReleasePlayer {
  opacity: 0.9;
}
#playerModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 12;
}
#loginModal,
#adminModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}
#loginModal .modal-content,
#adminModal .modal-content {
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(148,163,184,0.6);
  border-radius: 12px;
  padding: 16px;
  width: 320px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
#adminModal .modal-content.large {
  width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}
#itemsModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}
#itemsModal .modal-content.large {
  width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(148,163,184,0.6);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
#itemsModal .assign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
#itemsModal .col h5 { margin: 0 0 6px; }
#itemsModal .assign-list {
  min-height: 120px;
  max-height: 300px;
  overflow-y: auto;
  background: rgba(30,41,59,0.5);
  border: 1px dashed rgba(148,163,184,0.6);
  border-radius: 8px;
  padding: 6px;
}
#itemsModal .assign-item {
  padding: 6px 8px;
  margin: 4px 0;
  background: rgba(55,65,81,0.9);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: grab;
}
#itemsModal .assign-item .thumb {
  width: 28px;
  height: 28px;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
}
.panel {
  min-width: 220px;
  background: rgba(15,23,42,0.92);
  border: 1px solid rgba(148,163,184,0.5);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.5);
  z-index: 14;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.panel .scroll {
  max-height: 260px;
  overflow-y: auto;
}
.panel .scroll.small { max-height: 140px; }
.panel .scroll.medium { max-height: 200px; }
.panel .item {
  padding: 6px;
  background: rgba(30,41,59,0.7);
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid rgba(148,163,184,0.25);
}
.status-display {
  padding: 6px;
  background: rgba(30,41,59,0.9);
  border-radius: 8px;
  border: 1px solid rgba(94,234,212,0.4);
  margin-bottom: 6px;
  font-weight: 600;
}
.radio-quick button.warn {
  border-color: rgba(248,113,113,0.8);
  color: #fca5a5;
}
.pager-flash {
  animation: flash 0.9s ease-in-out infinite;
}
@keyframes flash {
  0%,100% { box-shadow: 0 0 0 rgba(255,255,255,0); }
  50% { box-shadow: 0 0 22px rgba(251,191,36,0.8); }
}
.pager-shell {
  position: relative;
  background: #1f2937;
  border: 2px solid #111827;
  border-radius: 18px;
  padding: 10px;
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  cursor: move;
  user-select: none;
}
.pager-screen {
  background: transparent;
  color: #0f172a;
  border-radius: 10px;
  min-height: 200px;
  padding: 0;
  border: none;
}
.pager-page.hidden { display: none; }
.pager-screen {
  position: relative;
}
.pager-subs {
  background: #3d8c3d;
  border-radius: 10px;
  padding: 10px;
  color: #0f172a;
  min-height: 200px;
  height: 100%;
  border: none;
}
.pager-subs input {
  width: 100%;
  color: #0f172a;
  background: rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 6px;
  padding: 4px 6px;
}
.pager-subs select {
  width: 100%;
  color: #0f172a;
  background: rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 6px;
  padding: 4px 6px;
}
.pager-actions {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.pager-actions button {
  flex: 1;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.6);
  background: #374151;
  color: #e5e7eb;
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pager-actions button.accent {
  font-size: 18px;
  background: #4b5563;
  text-align: center;
}
.pager-nav {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.pager-nav .square-btn {
  width: 80px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.6);
  background: #374151;
  color: #e5e7eb;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.pager-single {
  background: #3d8c3d;
  border-radius: 10px;
  min-height: 200px;
  padding: 10px;
  color: #0f172a;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pager-single.alert {
  animation: pagerPulse 1s infinite alternate;
}
@keyframes pagerPulse {
  from { background: #3d8c3d; }
  to { background: #61c561; }
}
.pager-screen .item {
  background: transparent;
  border: none;
  color: #0f172a;
  padding: 2px 0;
}
.pager-close {
  position: absolute;
  right: 6px;
  top: 6px;
  border: none;
  background: #ef4444;
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  z-index: 10;
}
.round {
  border-radius: 50% !important;
}
.radio-form {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
#dispatchModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px;
  z-index: 21;
}
#dispatchModal .dispatch-shell {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  background: none;
  box-shadow: none;
  border-radius: 26px;
}
#dispatchModal .close {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  z-index: 2;
}
.dispatch-window {
  width: 95vw;
  height: 95vh;
  background: #1f1f1f;
  border-radius: 26px;
  box-shadow: 0 14px 40px rgba(0,0,0,.6);
  padding: 0;
  position: relative;
  overflow: hidden;
}
.dispatch-grid-new {
  position: absolute;
  inset: 18px;
  display: grid;
  grid-template-columns: 1.05fr 1.55fr 0.85fr;
  grid-template-rows: 1.4fr 0.6fr;
  gap: 14px;
}
.disp-left { grid-column: 1; grid-row: 1; }
.disp-center { grid-column: 2; grid-row: 1; }
.disp-right { grid-column: 3; grid-row: 1; }
.disp-bottom-left { grid-column: 1; grid-row: 2; }
.disp-bottom-center { grid-column: 2; grid-row: 2; }
.disp-bottom-right { grid-column: 3; grid-row: 2; }
.disp-panel {
  background: #2c2c2c;
  border-radius: 22px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  color: #f5f5f5;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  overflow: hidden;
}
.disp-right { display: flex; flex-direction: column; }
.disp-title { font-weight: 800; font-size: 1.05rem; margin-bottom: 10px; letter-spacing: 0.1px; }
.field-group { margin: 0; }
.field-row { display: grid; grid-template-columns: 2fr 0.9fr; gap: 10px; }
#dispatch-einsatzmaske{
      height: 100%;
    width: 100%;
    display: grid;
    padding: 10px;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 25px repeat(7, 1fr);
    gap: 10px;
}

.field {
  width: 100%;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 10px;
  padding: 14px;
  background: #8b8b8b;
  color: #f3f3f3;
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.field.textarea { resize: none; height: 130px; background: #7b7b7b; }
.field.select { appearance: none; }
.field-small { max-width: 120px; }
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.btn-row .btn { flex: 1; min-width: 110px; }
.mask-actions,
.mask-main-actions {
  grid-column: 1 / span 3;
  width: 100%;
}
.mask-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}
.mask-actions .btn { flex: none; min-width: 0; width: 100%; }
.mask-main-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 6px;
}
.mask-main-actions .btn { flex: none; min-width: 0; width: 100%; }
.mask-city,
.mask-street,
.mask-keyword,
.mask-notes {
  grid-column: 1 / span 3;
}
.btn,
.square-btn,
.micro-btn,
.mission-remove,
.incident-actions .btn-small {
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  background: #6a6a6a;
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  transition: background 0.12s ease, transform 0.08s ease;
  cursor: pointer;
}
.btn:hover,
.square-btn:hover,
.micro-btn:hover,
.mission-remove:hover,
.incident-actions .btn-small:hover { background: #767676; }
.btn:active,
.square-btn:active,
.micro-btn:active,
.mission-remove:active,
.incident-actions .btn-small:active { transform: translateY(1px); }
.btn-danger { background: #e13232; }
.btn-danger:hover { background: #ed3f3f; }
.btn-ghost { background: #6a6a6a; }
.square-btn { width: 38px; height: 38px; padding: 0; font-size: 1.1rem; }
.micro-btn { padding: 8px 12px; font-size: .85rem; }
.mission-remove { width: 28px; height: 28px; padding: 0; font-size: 1rem; }
.subpanel {
  margin-top: 16px;
  background: #2f2f2f;
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.subpanel-title { font-size: .9rem; font-weight: 600; margin-bottom: 4px; }
.unit-bottom-row { display: flex; gap: 8px; align-items: center; }
.square-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: none;
  background: #555;
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}
.board-add {
  background: #4b4f55;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #c7c7c7;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.05);
}
.middle-top {
  background: #3b3b3b;
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 360px;
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  overflow: hidden;
}
.middle-bottom {
  margin-top: 10px;
  background: #3b3b3b;
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  flex: 0 0 240px;
  overflow: hidden;
}
.unit-overview-row {
  background: #8a8a8a;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  border: 1px solid rgba(0,0,0,0.2);
}
.row-actions { display: flex; gap: 6px; align-items: center; }
.micro-btn {
  background: #5d5d5d;
  border-radius: 10px;
  border: none;
  padding: 6px 10px;
  font-size: .85rem;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.badge {
  min-width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  padding: 0 8px;
  color: #fff;
}
.badge.red { background: #e13232; }
.badge.green { background: #4caf50; }
.badge.orange { background: #f97316; }
.badge.status { border-radius: 8px; }
.badge.status.s1,
.badge.status.s2 { background: #4caf50; }
.badge.status.s3 { background: #3b82f6; }
.badge.status.s4 { background: #e13232; }
.badge.status.s6 { background: #6b7280; }
.badge.status.s7 { background: #8b5cf6; }
.badge.status.s8 { background: #f97316; }
.badge.status.s9 { background: #facc15; color: #111; }
.badge.status.s0 { background: #e13232; }
.badge.status.s5 { background: #9ca3af; }
.board-list { display: flex; flex-direction: column; gap: 8px; }
.board-scroll {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}
.board-card {
  background: #8a8a8a;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(0,0,0,0.15);
}
.board-card .name { font-weight: 700; }
.board-card .status { font-size: 0.9rem; color: #e5e7eb; opacity: 0.9; }
.board { display: flex; flex-direction: column; gap: 10px; }
.board-wide { padding: 0; }
.board-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.board-scroll {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}
.board-head {
  background: #4f4f4f;
  padding: 10px;
  border-radius: 10px;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(0,0,0,0.15);
}
.overview-footer,
.overview-top {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}
.overview-search {
  flex: 1;
  height: 44px;
  font-weight: 700;
  color: #f5f5f5;
  background: #6f6f6f;
  border: 1px solid rgba(0,0,0,0.2);
}
.overview-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.disp-center { display: flex; flex-direction: column; }
#dispatchBoard { flex: 1; margin-bottom: 8px; }
.overview-stack { margin-top: auto; }
.overview-row { display: flex; align-items: center; gap: 10px; }
.overview-btns { display: flex; gap: 8px; }
.overview-row .square-btn { width: 38px; height: 38px; padding: 0; }
.square-btn.danger {
  background: #e13232;
}
.helper-note {
  font-size: 0.85rem;
  color: #c7c7c7;
  opacity: 0.9;
}
.helper-note.slim-note { margin-top: 4px; font-size: 0.8rem; }
#assignMissionList {
  max-height: 160px;
  overflow-y: auto;
}
#missionList {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}
.status-alerts {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 16px;
  padding: 10px;
}
.status-alerts-title {
  font-weight: 700;
  margin-bottom: 6px;
}
.status-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.main-actions .btn-danger { flex: 1; font-size: 1rem; }
.main-actions .btn-ghost { flex: 1; min-width: 150px; line-height: 1.2; }
.overview-add {
  background: #4b4f55;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #c7c7c7;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.05);
}
.plus-circle {
  width: 26px;
  height: 26px;
  border: 2px solid #c7c7c7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-row { display: flex; gap: 8px; align-items: center; }
.filter-select { min-width: 90px; }
.incident-list { display: flex; flex-direction: column; gap: 8px; }
.incident-card {
  background: #6b6b6b;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(0,0,0,0.15);
}
.incident-card.active {
  border: 2px solid rgba(255,255,255,0.5);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.1);
}
.incident-main { display: flex; flex-direction: column; gap: 4px; }
.incident-title { font-weight: 700; }
.incident-sub { font-size: .85rem; color: #c7c7c7; }
.incident-actions { display: flex; align-items: center; gap: 8px; }
.incident-actions .btn-small {
  background: #6a6a6a;
  padding: 8px 12px;
}
.mission-unit {
  background: #6f6f6f;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  border: 1px solid rgba(0,0,0,0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
}
.mission-unit .left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.mission-remove {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: #444;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.status-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.status-entry {
  background: #7f7f7f;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(0,0,0,0.2);
}
.status-entry-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#dispatchRadioList {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.status-alerts {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 16px;
  padding: 0;
  border: none;
  min-height: 80px;
}
.status-alerts-title {
  font-weight: 700;
  margin-bottom: 6px;
}
.status-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.status-alerts-list.scroll.small { max-height: 220px; }
.status-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #6b6b6b;
  border-radius: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,0.15);
}
.status-alert.danger {
  background: #e13232;
  color: #fff;
}
.status-alert .left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.status-alert button {
  background: #374151;
  color: #e5e7eb;
  border: 1px solid rgba(148,163,184,0.6);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

#loginModal input,
#adminModal input {
  width: 100%;
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,0.4);
  background: rgba(15,23,42,0.7);
  color: #e5e7eb;
}
#loginModal .actions {
  display: flex;
  justify-content: flex-end;
}
#loginModal .error {
  color: #f87171;
  min-height: 18px;
}
#adminUserList {
  max-height: 240px;
  overflow: auto;
  margin-bottom: 10px;
}
#adminUserList .user-row {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 4px 0;
}
#adminUserList .user-row span {
  flex: 1;
}
#adminUserList button {
  padding: 4px 8px;
}
.hidden { display: none !important; }
#mainMenu {
  position: fixed;
  top: 70px;
  left: 12px;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(148,163,184,0.7);
  border-radius: 10px;
  padding: 8px;
  z-index: 14;
  min-width: 200px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
#mainMenu.hidden {
  display: none;
}
#mainMenu .menu-item {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease, transform .08s ease;
}
#mainMenu .menu-item:hover {
  background: rgba(59,130,246,0.15);
  transform: translateY(-1px);
}
#touchControls {
  position: fixed;
  width: 100%;
  left: 0;
  bottom: 70px;
  display: none;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 13;
  pointer-events: none;
}
#touchControls .touch-left,
#touchControls .touch-right {
  display: flex;
  gap: 6px;
  pointer-events: auto;
}
#touchControls .touch-left {
  flex-direction: column;
}
#touchControls .touch-right {
  flex-direction: row;
}
#touchControls .touch-action {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  pointer-events: auto;
}
#touchControls button {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.6);
  background: radial-gradient(circle at top, rgba(55,65,81,.9), rgba(15,23,42,1));
  color: #e5e7eb;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (pointer: coarse), (max-width: 900px) {
  #touchControls {
    display: flex;
  }
  .desktop-only {
    display: none !important;
  }
}
@media (max-width: 720px) {
  #editPanel {
    max-width: 90vw;
  }
}
    #placePanel {
      position: fixed;
      bottom: 60px;
      left: 12px;
      padding: 8px 10px;
      background: rgba(15,23,42,0.85);
      border: 1px solid rgba(148,163,184,0.6);
      border-radius: 10px;
      font-size: 0.8rem;
      color: #e5e7eb;
      z-index: 11;
      display: flex;
      gap: 8px;
      align-items: center;
    }
    #editPanel {
      position: fixed;
      top: 12px;
      right: 12px;
      background: rgba(15,23,42,0.85);
      border: 1px solid rgba(148,163,184,0.7);
      border-radius: 12px;
      padding: 10px 14px;
      backdrop-filter: blur(8px);
      z-index: 10;
      display: flex;
      flex-direction: column;
      gap: 8px;
      min-width: 230px;
    }
    #editPanel.hidden {
      display: none;
}
#editPanel h3 {
  font-size: .95rem;
      font-weight: 600;
      margin-bottom: 2px;
    }
    #editPanel p {
      font-size: .78rem;
      color: #cbd5e1;
      line-height: 1.3;
    }
    #editPanel .row {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }
    #editPanel button {
      flex: 1;
      justify-content: center;
    }
    #editPanel button.secondary {
      background: radial-gradient(circle at top, rgba(51,65,85,.85), rgba(15,23,42,1));
    }
    #editStatus {
      font-size: .78rem;
      color: #f8fafc;
    }
    #editStatus span.label {
      display: inline-block;
      padding: 2px 7px;
      border-radius: 999px;
      font-weight: 600;
      background: rgba(14,165,233,0.15);
      border: 1px solid rgba(14,165,233,0.5);
      color: #7dd3fc;
      margin-right: 6px;
    }
#adminAssign {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
#adminAssign .col {
  background: rgba(15,23,42,0.6);
  border: 1px solid rgba(148,163,184,0.4);
  border-radius: 8px;
  padding: 8px;
  min-height: 140px;
  max-height: 300px;
  overflow-y: auto;
}
#adminAssign h5 {
  margin: 0 0 6px;
  font-size: 0.9rem;
  color: #e5e7eb;
}
.assign-list {
  min-height: 100px;
  background: rgba(30,41,59,0.5);
  border: 1px dashed rgba(148,163,184,0.5);
  border-radius: 6px;
  padding: 6px;
  max-height: 220px;
  overflow-y: auto;
}
.assign-item {
  padding: 4px 6px;
  margin: 4px 0;
  background: rgba(55,65,81,0.9);
  border-radius: 6px;
  cursor: grab;
  display: flex;
  align-items: center;
  gap: 6px;
}
.assign-item .thumb {
  width: 24px;
  height: 24px;
  background-size: cover;
  background-position: center;
  border-radius: 4px;
}
.assign-item.selected {
  outline: 2px solid rgba(94,234,212,0.8);
}
.assign-item .mini {
  margin-left: auto;
  background: #444;
  color: #eee;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}
.assign-item .mini.danger { background: #b91c1c; }
.assign-drop {
  min-height: 80px;
}
.assign-drop.drag-over {
  border-color: rgba(94,234,212,0.8);
  background: rgba(94,234,212,0.1);
}
#touchItemRotate {
  position: fixed;
  bottom: 140px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  gap: 10px;
  z-index: 14;
  pointer-events: none;
  align-items: center;
}
#touchItemRotate.active {
  display: flex;
}
#touchItemPreview {
  width: 64px;
  height: 64px;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(148,163,184,0.6);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
#touchItemRotate button {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.6);
  background: radial-gradient(circle at top, rgba(55,65,81,.9), rgba(15,23,42,1));
  color: #e5e7eb;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
#vehicleContext,
#itemContext,
#patientContext {
  position: fixed;
  z-index: 15;
  display: none;
  flex-direction: column;
  gap: 6px;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(148,163,184,0.5);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
#vehicleContext button,
#itemContext button,
#patientContext button {
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,0.6);
  background: radial-gradient(circle at top, rgba(55,65,81,.9), rgba(15,23,42,1));
  color: #e5e7eb;
  cursor: pointer;
  font-size: 14px;
}
#adminCreate {
  margin-top: 12px;
  border-top: 1px solid rgba(148,163,184,0.3);
  padding-top: 10px;
}
#adminCreate h5 { margin: 0 0 6px; }
#adminCreate .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px;
}
#adminCreate input {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,0.4);
  background: rgba(15,23,42,0.7);
  color: #e5e7eb;
}

#radioPanel {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* Minimap */
#minimap {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 240px;
  height: 160px;
  background: rgba(15,23,42,0.92);
  border: 1px solid rgba(148,163,184,0.5);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.4);
  z-index: 40;
  user-select: none;
}
#minimap.hidden { display: none; }
#minimap .minimap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-weight: 700;
  color: #e5e7eb;
  cursor: grab;
}
#minimapCanvas {
  width: 100%;
  height: calc(100% - 44px);
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.1);
  background: #0f172a;
}
#minimapResizer {
  position: absolute;
  width: 14px;
  height: 14px;
  right: 6px;
  bottom: 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.35);
  cursor: se-resize;
}
.radio-shell {
  width: 260px;
  background: #1f2937;
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  border: 2px solid #111827;
  position: relative;
  cursor: move;
}
.radio-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.radio-grip {
  width: 74px;
  height: 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255,255,255,0.25), rgba(255,255,255,0.1));
  border: 1px solid rgba(255,255,255,0.25);
  cursor: grab;
  touch-action: none;
}
.radio-screen {
  background: #3d8c3d;
  color: #0f172a;
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  border: 2px solid #0f172a;
}
.radio-title { font-size: 18px; font-weight: 700; }
.radio-name { font-size: 14px; font-weight: 600; }
.radio-group { font-size: 12px; font-weight: 600; opacity: 0.9; }
.radio-speaker-line { font-size: 12px; font-weight: 600; opacity: 0.9; min-height: 14px; }
.radio-screen-right { font-size: 26px; font-weight: 800; }
.radio-speaker-line { font-size: 12px; font-weight: 600; opacity: 0.9; }
.radio-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.radio-keypad button {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.6);
  background: #374151;
  color: #e5e7eb;
  font-size: 18px;
  font-weight: 700;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  -webkit-user-drag: none;
}
.radio-info {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.radio-info.hidden { display: none; }
.radio-users {
  font-size: 0.78rem;
  color: #9ca3af;
}
.radio-speaker {
  flex: 1;
  text-align: right;
  font-size: 0.85rem;
  color: #fde68a;
  min-height: 18px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.radio-keypad button.small { font-size: 14px; }
.radio-keypad button.warn {
  border-color: rgba(248,113,113,0.8);
  color: #fca5a5;
}
.radio-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: none;
  background: #e13232;
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.radio-back {
  margin-top: 10px;
  background: rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 8px;
}
.radio-back select {
  width: 100%;
  color: #0f172a;
  background: #3d8c3d;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  appearance: none;
}
.radio-back button {
  width: 100%;
  margin-top: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.6);
  background: #374151;
  color: #e5e7eb;
  font-weight: 700;
}
.radio-back .row {
  display: flex;
  align-items: center;
}
.radio-back .row select {
  flex: 1;
}
.radio-back .row button {
  flex: 1;
}
.scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.scroll::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
}
.scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 10px;
}
.scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.35);
}
