/* ============================================================
   SafeQR – Admin Design System v2.0
   Clean, calm, easy to use — same warm palette
   ============================================================ */

:root {
  --red:        #b71c1c;
  --red-deep:   #7f0000;
  --red-dark:   #931a1a;
  --red-mid:    #c62828;
  --red-pale:   #ffebee;

  --bg:         #f7f5f0;
  --bg-alt:     #f0ede7;
  --card-bg:    #ffffff;
  --surface:    #fafaf7;

  --text:       #1c1c1c;
  --text-soft:  #4a4a4a;
  --text-muted: #8a8a86;
  --text-hint:  #b0b0aa;

  --border:     #e8e4db;
  --border-alt: #f0ece4;

  --shadow-xs:  0 1px 2px rgba(47,30,20,0.04);
  --shadow-sm:  0 2px 6px rgba(47,30,20,0.05), 0 1px 3px rgba(47,30,20,0.04);
  --shadow:     0 4px 14px rgba(47,30,20,0.06), 0 2px 6px rgba(47,30,20,0.04);
  --shadow-lg:  0 8px 28px rgba(47,30,20,0.08), 0 3px 10px rgba(47,30,20,0.05);
  --shadow-xl:  0 14px 44px rgba(47,30,20,0.10), 0 6px 16px rgba(47,30,20,0.06);
  --shadow-red: 0 4px 16px rgba(183,28,28,0.18);

  --radius-xl:  20px;
  --radius-lg:  16px;
  --radius:     14px;
  --radius-sm:  10px;
  --radius-xs:  8px;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --ease: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
}

/* Subtle ambient texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(ellipse at 25% 20%, rgba(183,28,28,0.02) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 80%, rgba(183,28,28,0.015) 0%, transparent 50%);
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════ */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 440px;
  text-align: center;
  border: 1px solid var(--border-alt);
}

.login-logo {
  margin-bottom: 14px;
}
.login-logo svg {
  filter: drop-shadow(0 2px 6px rgba(183,28,28,0.20));
}

.login-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
  letter-spacing: -0.3px;
}
.login-sub {
  font-size: 0.81rem;
  color: var(--text-soft);
  margin-bottom: 28px;
  line-height: 1.5;
}
.login-form {
  text-align: left;
  margin-bottom: 20px;
}

.login-hint {
  background: #fffdf5;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.73rem;
  color: #7d6e40;
  line-height: 1.6;
  margin-bottom: 20px;
  border: 1px solid #f0eacc;
}
.login-hint code {
  background: #fef0c0;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #6d5e30;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--red);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.84rem;
  transition: opacity var(--ease);
}
.back-link:hover {
  opacity: 0.75;
}
.back-link:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD PAGE
   ═══════════════════════════════════════════════════════════════ */
.dashboard {
  max-width: 740px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.dash-header {
  background: rgba(183, 28, 28, 0.95);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  color: #fff;
  padding: 0 20px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow:
    0 4px 24px rgba(127,0,0,0.22),
    0 1px 4px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.dash-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-header-left svg {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.18));
}
.dash-header-left div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.dash-header-left strong {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.2px;
}
.dash-agency-label {
  font-size: 0.68rem;
  opacity: 0.78;
  font-weight: 500;
}

.btn-logout {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 7px 18px;
  border-radius: 22px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--ease);
}
.btn-logout:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.40);
}
.btn-logout:active {
  background: rgba(255,255,255,0.30);
  transform: scale(0.95);
}
.btn-logout:focus-visible {
  outline: 3px solid rgba(255,255,255,0.6);
  outline-offset: 3px;
}

.dash-main {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dash-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border-alt);
}
.dash-card h2 {
  font-size: 1.12rem;
  margin-bottom: 4px;
  font-weight: 800;
  letter-spacing: -0.2px;
}
.dash-card h3 {
  font-size: 0.95rem;
  margin-bottom: 14px;
  font-weight: 700;
}
.dash-card-sub {
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-bottom: 20px;
  font-weight: 440;
}

/* ─── Form fields ─── */
.form-field {
  margin-bottom: 16px;
}
.form-field label {
  display: block;
  font-weight: 700;
  font-size: 0.83rem;
  margin-bottom: 5px;
  color: var(--text);
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.90rem;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}
.form-field input:hover,
.form-field textarea:hover,
.form-field select:hover {
  border-color: #d0ccc2;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(183,28,28,0.06);
  background: #fff;
}
.form-field textarea {
  resize: vertical;
  min-height: 52px;
}
.form-hint {
  display: block;
  font-size: 0.71rem;
  color: var(--text-hint);
  margin-top: 4px;
}

/* ─── Action buttons ─── */
.dash-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn-save {
  flex: 1;
  min-width: 150px;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 13px 24px;
  border-radius: 26px;
  font-size: 0.90rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--ease);
  box-shadow: var(--shadow-red);
}
.btn-save:hover {
  background: var(--red-dark);
  box-shadow: 0 6px 20px rgba(183,28,28,0.25);
}
.btn-save:active {
  opacity: 0.88;
  transform: scale(0.97);
}
.btn-save:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}
.btn-save:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.btn-reset {
  background: #fff;
  color: var(--text-soft);
  border: 1.5px solid #d4d0c8;
  padding: 13px 24px;
  border-radius: 26px;
  font-size: 0.86rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--ease);
}
.btn-reset:hover {
  background: var(--surface);
  border-color: #c0bbb0;
}
.btn-reset:active {
  background: var(--bg-alt);
  transform: scale(0.97);
}
.btn-reset:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.btn-login {
  width: 100%;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 26px;
  font-size: 0.96rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  margin-top: 6px;
  transition: all var(--ease);
  box-shadow: var(--shadow-red);
}
.btn-login:hover {
  background: var(--red-dark);
  box-shadow: 0 6px 20px rgba(183,28,28,0.28);
}
.btn-login:active {
  opacity: 0.88;
  transform: scale(0.97);
}
.btn-login:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}
.btn-login:disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ─── Last updated ─── */
.last-updated {
  margin-top: 16px;
  font-size: 0.73rem;
  color: var(--text-muted);
  text-align: right;
}

/* ─── Preview card ─── */
.preview-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 16px;
  border-top: 3.5px solid var(--card-color, var(--red));
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
  border: 1px solid var(--border-alt);
  border-top: 3.5px solid var(--card-color, var(--red));
}
.preview-card .pc-icon {
  font-size: 1.7rem;
  line-height: 1;
}
.preview-card .pc-name {
  font-weight: 800;
  font-size: 0.94rem;
}
.preview-card .pc-phone {
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--card-color, var(--red));
  font-variant-numeric: tabular-nums;
}
.preview-card .pc-address {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: pre-line;
  line-height: 1.45;
}
.preview-card .pc-desc {
  font-size: 0.73rem;
  color: var(--text-hint);
}

.btn-preview-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--red);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.83rem;
  transition: opacity var(--ease);
}
.btn-preview-link:hover {
  opacity: 0.75;
}
.btn-preview-link:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* ═══════════════════════════════════════════════════════════════
   TOAST — Consistent with main
   ═══════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%) translateY(18px);
  background: rgba(30,28,26,0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  padding: 11px 24px;
  border-radius: 26px;
  font-size: 0.81rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease);
  z-index: 300;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.08);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.error {
  background: rgba(183,28,28,0.94);
  border-color: rgba(255,255,255,0.12);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  .dash-main {
    padding: 28px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
  }
}

@media (max-width: 380px) {
  .login-card { padding: 28px 18px; }
  .dash-actions { flex-direction: column; }
  .dash-card { padding: 18px 16px; }
  .btn-save, .btn-reset { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD — Wide layout + Contact List
   ═══════════════════════════════════════════════════════════════ */
.dash-main-wide {
  padding: 24px 20px;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.dash-card-full { width: 100%; }
.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.dash-card-header h2 { margin: 0; }
.btn-add-contact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 9px 18px;
  border-radius: 22px;
  border: none;
  background: var(--red);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--ease);
}
.btn-add-contact:hover { background: var(--red-dark); }
.btn-add-contact:active { transform: scale(0.96); }

/* ── Contact List ── */
.contact-list { margin-top: 16px; }
.contact-list-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-hint);
  font-size: 0.85rem;
}

.contact-section {
  margin-bottom: 20px;
}
.contact-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border-alt);
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--ease);
  border: 1px solid transparent;
  margin-bottom: 4px;
}
.contact-row:hover {
  background: var(--surface);
  border-color: var(--border);
}
.contact-global {
  opacity: 0.75;
  background: #fafaf8;
}
.contact-local {
  border-left: 3px solid var(--red);
}

.contact-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}
.contact-info {
  flex: 1;
  min-width: 0;
}
.contact-info strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.contact-phone {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red);
  font-variant-numeric: tabular-nums;
  margin-right: 10px;
}
.contact-addr {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.contact-lock {
  font-size: 0.85rem;
  flex-shrink: 0;
  opacity: 0.5;
}
.contact-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.btn-icon-edit, .btn-icon-del {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease);
}
.btn-icon-edit:hover { background: #f0f7ff; border-color: #3498db; }
.btn-icon-del:hover { background: #fff0f0; border-color: var(--red); }

/* ── Modal Overlay ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.visible { display: flex; }

.modal-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 28px 24px 20px;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-alt);
}

.modal-card h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}
.btn-cancel {
  padding: 10px 22px;
  border-radius: 22px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--ease);
}
.btn-cancel:hover { background: #f5f5f0; }

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD NAVIGATION TABS
   ═══════════════════════════════════════════════════════════════ */
.dash-nav {
  display: flex;
  gap: 4px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-alt);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.dash-nav-btn {
  padding: 14px 22px;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: all var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dash-nav-btn:hover {
  color: var(--text);
}
.dash-nav-btn.active {
  color: var(--red);
  border-bottom-color: var(--red);
}
.dash-nav-btn:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: -3px;
}

/* ═══════════════════════════════════════════════════════════════
   EMERGENCY MAP PAGE
   ═══════════════════════════════════════════════════════════════ */
.emergency-layout {
  display: flex;
  height: calc(100vh - 58px - 50px); /* minus header and nav */
  overflow: hidden;
}

/* ── Map Container ── */
.emergency-map-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
  background: #f0ede7;
}
#emergencyMap {
  width: 100%;
  height: 100%;
}

/* Leaflet overrides */
.emergency-map-wrap .leaflet-container {
  background: #f0ede7;
  font-family: var(--font);
}
.emergency-map-wrap .leaflet-control-zoom a {
  border-radius: var(--radius-xs);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.emergency-map-wrap .leaflet-control-attribution {
  font-size: 0.62rem;
  opacity: 0.6;
}

/* ── Custom Marker Icon ── */
.emergency-marker-icon {
  background: transparent !important;
  border: none !important;
}
.emergency-marker-inner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.30);
  position: relative;
  z-index: 2;
}
.emergency-marker-emoji {
  font-size: 1.1rem;
  line-height: 1;
}
.emergency-marker-pulse {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid;
  z-index: 1;
  animation: markerPulse 1.8s ease-out infinite;
  pointer-events: none;
}
@keyframes markerPulse {
  0%   { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ── Leaflet Popup Styling ── */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-sm) !important;
  font-family: var(--font) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 0 !important;
}
.leaflet-popup-content {
  margin: 14px 18px !important;
  font-size: 0.82rem !important;
  line-height: 1.5 !important;
  min-width: 200px;
}
.emergency-popup-type {
  font-weight: 800;
  font-size: 0.88rem;
  margin-bottom: 4px;
  color: var(--text);
}
.emergency-popup-address {
  color: var(--text-soft);
  font-size: 0.76rem;
  margin-bottom: 4px;
}
.emergency-popup-time {
  color: var(--text-hint);
  font-size: 0.7rem;
  margin-bottom: 2px;
}
.emergency-popup-accuracy {
  font-size: 0.72rem;
  font-weight: 600;
}

/* ── Report Sidebar ── */
.emergency-sidebar {
  width: 360px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--card-bg);
  overflow: hidden;
}
.emergency-sidebar-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-alt);
  background: var(--surface);
  flex-shrink: 0;
}
.emergency-sidebar-header h3 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.emergency-sidebar-header .last-poll {
  font-size: 0.68rem;
  color: var(--text-hint);
}
.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4caf50;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(76,175,80,0.5);
  animation: locPulse 1.4s ease-in-out infinite;
}
@keyframes locPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.8); }
  50%      { opacity: 1;   transform: scale(1.1); }
}

.emergency-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}
.emergency-sidebar-list:empty::after {
  content: 'Chưa có báo cáo khẩn cấp nào';
  display: block;
  text-align: center;
  color: var(--text-hint);
  padding: 48px 20px;
  font-size: 0.85rem;
}

/* ── Report Card (in sidebar) ── */
.report-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
  border-left: 4px solid var(--report-color, var(--red));
  transition: all var(--ease);
  animation: reportSlideIn 0.3s var(--ease-spring);
}
@keyframes reportSlideIn {
  from { transform: translateX(24px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.report-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateX(3px);
}

.report-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.report-card-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.report-card-type {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text);
}
.report-card-time {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
}
.report-card-address {
  font-size: 0.76rem;
  color: var(--text-soft);
  line-height: 1.45;
  margin-bottom: 6px;
}
.report-card-meta {
  display: flex;
  gap: 10px;
  font-size: 0.72rem;
  color: var(--text-hint);
  margin-bottom: 2px;
}
.report-card-accuracy {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
}
.report-card-accuracy.good { color: #27ae60; }
.report-card-accuracy.warn { color: #f39c12; }
.report-card-accuracy.bad  { color: #e74c3c; }

.report-card-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}
.btn-maps-mini {
  font-size: 0.7rem;
  padding: 6px 14px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-soft);
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-maps-mini:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-pale);
}

/* ── Responsive: Map + Sidebar ── */
@media (max-width: 768px) {
  .emergency-layout {
    flex-direction: column;
  }
  .emergency-map-wrap {
    height: 48vh;
  }
  .emergency-sidebar {
    width: 100%;
    max-height: 48vh;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .dash-nav {
    padding: 0 12px;
  }
  .dash-nav-btn {
    padding: 12px 16px;
    font-size: 0.78rem;
  }
}

/* Override .dashboard max-width for emergency map page */
.dashboard:has(.emergency-layout) {
  max-width: none;
}
