@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');

/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: 'Quicksand', sans-serif;
  background: #0d0f1a;
  color: #e2e8f0;
}

/* ─── Keyframes ────────────────────────────────────────────────────────────── */
@keyframes spin        { to { transform: rotate(360deg); } }
@keyframes blink       { 0%,100%{opacity:1} 50%{opacity:0.15} }
@keyframes cardSlide   { from{opacity:0;transform:translateX(12px)} to{opacity:1;transform:none} }
@keyframes markerPulse { 0%{transform:scale(1);opacity:0.9} 100%{transform:scale(3.5);opacity:0} }

/* ─── Navbar ───────────────────────────────────────────────────────────────── */
.navbar-custom {
  background: linear-gradient(135deg, #0d0f1a 0%, #111527 100%);
  padding: 0 1.25rem;
  box-shadow: 0 1px 0 rgba(79,142,247,0.2), 0 2px 12px rgba(0,0,0,0.6);
  border-bottom: 1px solid rgba(79,142,247,0.15);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  height: 56px;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.navbar-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.navbar-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ─── Nav HUD (live badge + clock) ────────────────────────────────────────── */
.nav-hud {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #00d4aa;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blink-dot {
  animation: blink 1.4s ease-in-out infinite;
  font-size: 0.7rem;
}

.nav-clock {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4f8ef7;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  min-width: 60px;
  text-align: right;
}

/* ─── Lang toggle ──────────────────────────────────────────────────────────── */
.lang-toggle {
  background: rgba(79,142,247,0.12);
  border: 1px solid rgba(79,142,247,0.3);
  color: #e2e8f0;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.lang-toggle:hover {
  background: rgba(79,142,247,0.22);
  border-color: rgba(79,142,247,0.5);
}

/* ─── Full-screen map ──────────────────────────────────────────────────────── */
#world-map {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

/* Dark background so empty tile slots don't flash white */
.leaflet-container {
  background: #0d0f1a !important;
}

/* ─── Map HUD overlays ─────────────────────────────────────────────────────── */
.map-grid-overlay {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(79,142,247,0.04) 0px, transparent 1px, transparent 40px, rgba(79,142,247,0.04) 40px),
    repeating-linear-gradient(90deg, rgba(79,142,247,0.04) 0px, transparent 1px, transparent 40px, rgba(79,142,247,0.04) 40px);
}

.map-vignette {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.55) 100%);
}

/* ─── Pulsing marker ───────────────────────────────────────────────────────── */
.pulse-marker {
  position: relative;
  width: 24px;
  height: 24px;
}

.pulse-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mc, #4f8ef7);
  border: 2px solid rgba(255,255,255,0.7);
  z-index: 2;
}

.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mc, #4f8ef7);
  animation: markerPulse 2s ease-out infinite;
  z-index: 1;
}

.pulse-ring.r2 {
  animation-delay: 1s;
}

/* ─── Floating country panel ───────────────────────────────────────────────── */
.country-panel {
  position: fixed;
  top: 72px;
  right: 16px;
  width: 296px;
  max-height: calc(100vh - 88px);
  background: rgba(10, 14, 35, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(79,142,247,0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(79,142,247,0.08);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Panel header */
.panel-header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(79,142,247,0.15);
  flex-shrink: 0;
  background: rgba(79,142,247,0.04);
}

.panel-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4f8ef7;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.panel-title-dot {
  color: #4f8ef7;
  animation: blink 1.4s ease-in-out infinite;
  margin-right: 4px;
}

/* Country flag grid */
.country-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px;
  flex-shrink: 0;
}

.country-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(79,142,247,0.1);
  border-radius: 8px;
  padding: 7px 4px 5px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  font-family: 'Quicksand', sans-serif;
  position: relative;
}

.country-btn:hover {
  background: rgba(79,142,247,0.1);
  border-color: rgba(79,142,247,0.3);
  transform: translateY(-1px);
}

.country-btn.active {
  border-color: var(--threat-color, #4f8ef7);
  background: rgba(79,142,247,0.15);
  box-shadow: 0 0 12px rgba(79,142,247,0.2), inset 0 0 8px rgba(79,142,247,0.06);
}

.country-btn .flag {
  font-size: 1.5rem;
  line-height: 1;
}

.country-btn .country-name {
  font-size: 0.58rem;
  font-weight: 600;
  color: #718096;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 68px;
}

.country-btn.active .country-name {
  color: #90bdff;
}

/* Threat dot on country buttons */
.threat-dot {
  position: absolute;
  bottom: 4px;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  opacity: 0.8;
}

/* Results section */
.panel-result {
  border-top: 1px solid rgba(79,142,247,0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.result-header {
  padding: 8px 12px 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4f8ef7;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

/* Loading */
.panel-loading {
  display: flex;
  justify-content: center;
  padding: 16px;
  flex-shrink: 0;
}

.mini-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(79,142,247,0.2);
  border-top-color: #4f8ef7;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Scrollable wanted list */
.wanted-list {
  overflow-y: auto;
  flex: 1;
  padding: 4px 8px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(79,142,247,0.4) transparent;
}

.wanted-list::-webkit-scrollbar { width: 4px; }
.wanted-list::-webkit-scrollbar-track { background: transparent; }
.wanted-list::-webkit-scrollbar-thumb {
  background: rgba(79,142,247,0.4);
  border-radius: 2px;
}

/* ─── Mini-card ────────────────────────────────────────────────────────────── */
.mini-card {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(79,142,247,0.1);
  border-radius: 8px;
  padding: 7px 9px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  min-height: 66px;
  /* Stagger slide-in */
  animation: cardSlide 0.35s ease both;
  animation-delay: calc(var(--i, 0) * 0.07s);
}

.mini-card:hover {
  background: rgba(79,142,247,0.1);
  border-color: rgba(79,142,247,0.3);
}

.mini-card:last-child { margin-bottom: 0; }

.mini-photo {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  object-fit: cover;
  background: #1a1f36;
  flex-shrink: 0;
  border: 1.5px solid rgba(79,142,247,0.15);
}

.mini-photo-placeholder {
  width: 46px;
  height: 46px;
  border-radius: 6px;
  background: #1a1f36;
  flex-shrink: 0;
  border: 1.5px solid rgba(79,142,247,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.mini-info {
  flex: 1;
  min-width: 0;
}

.mini-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 3px;
}

.mini-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
}

/* Danger badge */
.danger-badge {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 3px;
  padding: 1px 4px;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid currentColor;
}

.mini-crime {
  font-size: 0.65rem;
  color: #718096;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.mini-reward {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  background: rgba(0,212,170,0.12);
  color: #00d4aa;
  border: 1px solid rgba(0,212,170,0.25);
  border-radius: 4px;
  padding: 1px 5px;
}

.mini-reward.no-reward {
  background: rgba(113,128,150,0.1);
  color: #718096;
  border-color: rgba(113,128,150,0.2);
}

/* Reward progress bar */
.reward-bar {
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  margin-top: 5px;
  overflow: hidden;
}

.reward-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* No results message */
.panel-empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 0.78rem;
  color: #4a5568;
}

/* ─── Leaflet overrides ─────────────────────────────────────────────────────── */
.leaflet-control-attribution {
  font-size: 0.55rem !important;
  background: rgba(0,0,0,0.5) !important;
  color: #4a5568 !important;
}

.leaflet-control-attribution a { color: #4f8ef7 !important; }

.leaflet-popup-content-wrapper {
  background: #0d0f1a !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(79,142,247,0.25) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6) !important;
}

.leaflet-popup-tip { background: #0d0f1a !important; }

/* ─── Filter bar ────────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid rgba(79,142,247,0.12);
  border-bottom: 1px solid rgba(79,142,247,0.12);
  flex-shrink: 0;
}

.filter-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(79,142,247,0.2);
  border-radius: 6px;
  color: #e2e8f0;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.75rem;
  padding: 5px 9px;
  outline: none;
  transition: border-color 0.2s;
}

.filter-input::placeholder {
  color: #4a5568;
}

.filter-input:focus {
  border-color: rgba(79,142,247,0.5);
}

.filter-row {
  display: flex;
  gap: 6px;
}

.filter-select {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(79,142,247,0.2);
  border-radius: 6px;
  color: #e2e8f0;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.75rem;
  padding: 5px 9px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%234f8ef7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-color: rgba(255,255,255,0.05);
  padding-right: 24px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-select:focus {
  border-color: rgba(79,142,247,0.5);
}

.filter-select option {
  background: #0d0f1a;
  color: #e2e8f0;
}

.filter-reset-btn {
  width: 100%;
  background: rgba(79,142,247,0.08);
  border: 1px solid rgba(79,142,247,0.2);
  border-radius: 6px;
  color: #4f8ef7;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.filter-reset-btn:hover {
  background: rgba(79,142,247,0.18);
  border-color: rgba(79,142,247,0.4);
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .navbar-title { display: none; }
  .nav-clock    { display: none; }

  .country-panel {
    width: calc(100vw - 32px);
    right: 16px;
    top: 68px;
    max-height: 52vh;
  }

  .filter-input,
  .filter-select,
  .filter-reset-btn {
    font-size: 0.7rem;
  }
}

/* ─── Filter actions row ────────────────────────────────────────────────────── */
.filter-actions {
  display: flex;
  gap: 0.4rem;
}

.filter-actions .filter-reset-btn {
  flex: 1;
}

/* ─── Export CSV button ─────────────────────────────────────────────────────── */
.export-btn {
  flex: 0 0 auto;
  padding: 0.35rem 0.65rem;
  background: rgba(0, 212, 170, 0.12);
  color: #00d4aa;
  border: 1px solid rgba(0, 212, 170, 0.3);
  border-radius: 6px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.export-btn:hover {
  background: rgba(0, 212, 170, 0.22);
  color: #00ffcc;
}

/* ─── Toast notifications ────────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 340px;
  text-align: center;
  pointer-events: auto;
}

.toast.toast-show {
  opacity: 1;
  transform: translateY(0);
}

.toast-error {
  background: rgba(255, 59, 59, 0.88);
  border: 1px solid rgba(255, 59, 59, 0.5);
  box-shadow: 0 4px 16px rgba(255, 59, 59, 0.3);
}

.toast-warn {
  background: rgba(255, 215, 0, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.5);
  color: #1a1a2e;
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
}

.toast-info {
  background: rgba(79, 142, 247, 0.85);
  border: 1px solid rgba(79, 142, 247, 0.5);
  box-shadow: 0 4px 16px rgba(79, 142, 247, 0.3);
}

/* ─── Keyframes for modal ───────────────────────────────────────────────────── */
@keyframes modalIn  { from { opacity:0; transform: scale(0.94) translateY(10px); } to { opacity:1; transform: none; } }
@keyframes modalOut { from { opacity:1; transform: none; } to { opacity:0; transform: scale(0.94) translateY(10px); } }

/* ─── Mini-card improvements ────────────────────────────────────────────────── */
.mini-card {
  cursor: pointer;
}

.mini-photo-wrap {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
}

.mini-photo {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: #1a1f36;
  border: 2px solid rgba(79,142,247,0.2);
  display: block;
}

.mini-photo-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1a1f36, #0d1026);
  border: 2px solid rgba(79,142,247,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #4a5568;
}

.mini-photo-placeholder .fa-user-secret {
  font-size: 1.4rem;
  color: #4a5568;
}

.mini-threat-ring {
  position: absolute;
  inset: -3px;
  border-radius: 10px;
  border: 2px solid transparent;
  pointer-events: none;
}

.mini-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: 3px;
}

.mini-country-tag {
  font-size: 1rem;
  line-height: 1;
}

.crime-more {
  font-size: 0.58rem;
  color: #4f8ef7;
  font-weight: 700;
  background: rgba(79,142,247,0.12);
  border-radius: 3px;
  padding: 0 3px;
}

/* ─── Search highlight ──────────────────────────────────────────────────────── */
mark.hl {
  background: rgba(255, 215, 0, 0.3);
  color: #ffd700;
  border-radius: 2px;
  padding: 0 1px;
}

/* ─── Panel stats footer ────────────────────────────────────────────────────── */
.panel-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  border-top: 1px solid rgba(79,142,247,0.1);
  flex-shrink: 0;
  background: rgba(0,0,0,0.2);
  gap: 6px;
}

.stats-count {
  font-size: 0.65rem;
  color: #4f8ef7;
  font-weight: 700;
  white-space: nowrap;
}

.stats-reward {
  font-size: 0.62rem;
  color: #00d4aa;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Sort row ──────────────────────────────────────────────────────────────── */
.sort-row {
  width: 100%;
}

/* ─── Detail Modal ──────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-overlay.visible .modal-box {
  animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.modal-box {
  background: rgba(10, 14, 35, 0.98);
  border: 1px solid rgba(79,142,247,0.25);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(79,142,247,0.08);
  max-width: 640px;
  width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  display: flex;
  flex-direction: row;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(79,142,247,0.3) transparent;
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #718096;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background 0.15s, color 0.15s;
  z-index: 10;
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: rgba(255,59,59,0.15);
  color: #ff3b3b;
  border-color: rgba(255,59,59,0.3);
}

/* ─── Modal left column (photo) ─────────────────────────────────────────────── */
.modal-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 16px 24px 24px;
  flex-shrink: 0;
  width: 176px;
}

.modal-photo-frame {
  width: 140px;
  border: 2px solid rgba(255,59,59,0.6);
  border-radius: 8px;
  overflow: hidden;
  background: #0a0e23;
  box-shadow: 0 0 20px rgba(255,59,59,0.2);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.modal-wanted-label {
  background: #c41e1e;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-align: center;
  padding: 4px 0;
  font-family: 'Quicksand', sans-serif;
}

.modal-photo-wrap {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.modal-photo {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.modal-photo-ph {
  width: 100%;
  height: 160px;
  background: linear-gradient(160deg, #1a1f36, #0a0e23);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #2d3561;
}

.modal-danger-badge {
  margin-top: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1.5px solid;
  border-radius: 5px;
  padding: 3px 10px;
  text-align: center;
}

.modal-reward-display {
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
}

/* ─── Modal right column (info) ─────────────────────────────────────────────── */
.modal-right {
  flex: 1;
  padding: 28px 24px 24px 8px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0;
  padding-right: 32px;
  line-height: 1.3;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #a0aec0;
}

.modal-meta-sep {
  color: #4a5568;
}

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.modal-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: #4f8ef7;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-crimes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.crime-chip {
  display: inline-block;
  background: rgba(255,59,59,0.1);
  color: #ff6b6b;
  border: 1px solid rgba(255,59,59,0.25);
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  letter-spacing: 0.02em;
}

.modal-desc-text {
  font-size: 0.74rem;
  color: #a0aec0;
  line-height: 1.55;
  max-height: 90px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(79,142,247,0.3) transparent;
}

.modal-no-data {
  color: #4a5568;
  font-size: 0.72rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.modal-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 7px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  border: 1px solid rgba(79,142,247,0.25);
  background: rgba(79,142,247,0.08);
  color: #90bdff;
}

.modal-action-btn:hover {
  background: rgba(79,142,247,0.18);
  border-color: rgba(79,142,247,0.4);
}

.modal-action-btn.primary {
  background: rgba(0,212,170,0.1);
  border-color: rgba(0,212,170,0.3);
  color: #00d4aa;
}

.modal-action-btn.primary:hover {
  background: rgba(0,212,170,0.2);
}

/* ─── Responsive modal ──────────────────────────────────────────────────────── */
@media (max-width: 500px) {
  .modal-box {
    flex-direction: column;
    max-height: 90vh;
  }

  .modal-left {
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    padding: 20px 16px 8px;
    gap: 12px;
  }

  .modal-photo-frame {
    width: 100px;
    flex-shrink: 0;
  }

  .modal-photo-wrap,
  .modal-photo,
  .modal-photo-ph {
    height: 120px;
  }

  .modal-right {
    padding: 0 16px 20px;
  }

  .modal-name {
    font-size: 0.92rem;
    padding-right: 0;
  }
}
