/* ═══════════════════════════════════════════════════════
   WILDLIFE GUARDIAN – Rescue Map style1.css (PREMIUM)
   Full-screen 3D Map + Floating Glass Panel + Premium Modal
═══════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS – Đồng bộ 100% với Home.css ── */
:root {
  /* ── Nền chủ đạo: Dark Green Gradient (giống hệt hero Home) ── */
  --bg-deep:       #020c05;           /* nền sâu nhất */
  --bg-base:       #041a0a;           /* nền layer 1 */
  --bg-surface:    #061505;           /* nền card/panel */
  --bg-gradient:   linear-gradient(135deg, #020c05 0%, #041a0a 40%, #061505 100%);

  /* ── Màu nhấn chính: Vibrant Green (đúng Home palette) ── */
  --green-main:    #22c55e;
  --green-dark:    #15803d;
  --green-light:   #4ade80;
  --green-dim:     rgba(34, 197, 94, 0.12);   /* dùng cho badge nền */
  --green-border:  rgba(34, 197, 94, 0.28);   /* viền active */
  --green-glow:    rgba(34, 197, 94, 0.25);   /* box-shadow glow */

  /* ── CTA: Orange/Coral gradient + glow (giống btn-primary Home) ── */
  --orange:        #f97316;
  --orange-dark:   #dc2626;
  --orange-cta:    linear-gradient(135deg, #f97316, #dc2626);
  --orange-glow:   rgba(249, 115, 22, 0.4);
  --orange-glow-h: rgba(249, 115, 22, 0.55);  /* hover state */

  /* ── Status colors ── */
  --red:           #ef4444;
  --blue:          #3b82f6;
  --teal:          #2a9d8f;

  /* ── Typography (đúng contrast trên nền tối) ── */
  --text-light:    #f8fafc;           /* heading/title – trắng */
  --text-body:     #e2e8f0;           /* body text – gần trắng */
  --text-muted:    #94a3b8;           /* phụ: thời gian, mô tả */
  --text-subtle:   #64748b;           /* rất mờ */

  /* ── Glassmorphism panel (nâng cấp blur & opacity) ── */
  --glass-bg:      rgba(4, 26, 10, 0.60);    /* tối hơn, xanh hơn */
  --glass-bg-card: rgba(6, 21, 5, 0.45);     /* thẻ card nhẹ hơn */
  --glass-border:  rgba(255, 255, 255, 0.08);
  --glass-border-g:rgba(34, 197, 94, 0.18);  /* viền xanh cho card hover */
  --glass-blur:    blur(24px);
  --glass-blur-sm: blur(14px);

  /* ── Spacing & Shape ── */
  --radius-xs:     8px;
  --radius-sm:     10px;
  --radius-md:     16px;
  --radius-lg:     24px;
  --radius-pill:   99px;

  /* ── Layout ── */
  --font:          "Outfit", "Segoe UI", system-ui, sans-serif;
  --panel-width:   380px;
  --nav-height:    68px;

  /* ── Transitions ── */
  --ease-out:      cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast:      0.2s;
  --dur-mid:       0.35s;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font);
  overflow: hidden;
  /* Nền dark green gradient – đồng bộ Home hero */
  background: var(--bg-gradient);
  color: var(--text-light);
}

/* ── SCROLL PROGRESS ── */
.wg-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 100%;
  transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--green-main), var(--green-light), var(--orange));
  z-index: 9999; pointer-events: none;
  transition: transform 0.1s linear;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--green-main), var(--green-dark)); border-radius: 99px; }

/* ═══════════════════════════════
   FULL-SCREEN MAP WRAPPER
═══════════════════════════════ */
.map-wrapper {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
}

#interactiveMap {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

/* Cesium overrides – fill container */
#interactiveMap .cesium-viewer,
#interactiveMap .cesium-viewer-cesiumWidgetContainer,
#interactiveMap .cesium-widget,
#interactiveMap canvas {
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  top: 0; left: 0;
}


/* View Globe Button – !important needed to beat style2.css override */
.view-home-btn {
  position: absolute !important;
  bottom: 90px !important;
  right: 24px !important;
  top: auto !important;   /* neutralize style2.css top: 20px */
  left: auto !important;  /* neutralize style2.css left: 20px */
  z-index: 200 !important;
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid var(--glass-border) !important;
  color: var(--text-light) !important;
  padding: 12px 20px;
  border-radius: 99px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: all 0.3s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.view-home-btn:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
  transform: translateY(-2px);
}

/* ═══════════════════════════════
   FLOATING GLASS PANEL (LEFT)
═══════════════════════════════ */
.floating-panel {
  position: absolute;
  top: 0; left: 0;
  width: var(--panel-width);
  height: 100%;
  z-index: 100;
  display: flex;
  flex-direction: column;
  /* Glassmorphism – nền xanh tối trong suốt như Home hero overlay */
  background:
    radial-gradient(ellipse 120% 60% at 50% 0%, rgba(5, 78, 22, 0.35) 0%, transparent 60%),
    var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-border);
  box-shadow: 4px 0 48px rgba(0, 0, 0, 0.4), inset -1px 0 0 rgba(34,197,94,0.06);
  padding-top: var(--nav-height);
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Panel Header */
.panel-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--glass-border);
}

.panel-title {
  display: flex; align-items: center; gap: 12px;
}

.panel-title-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--green-main), var(--green-dark));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}

.panel-title h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-light);
}

.panel-title p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Search Bar */
.panel-search {
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
}

.search-glass {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  padding: 4px 4px 4px 16px;
  transition: all 0.3s;
}

.search-glass:focus-within {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.08);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.search-glass i { color: var(--text-muted); font-size: 14px; }

.search-glass input {
  flex: 1;
  background: transparent;
  border: none; outline: none;
  color: var(--text-light);
  font-family: var(--font);
  font-size: 14px;
}

.search-glass input::placeholder { color: var(--text-muted); }

.search-glass button {
  background: var(--green-main);
  border: none; cursor: pointer;
  width: 34px; height: 34px;
  border-radius: 99px;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.search-glass button:hover { background: var(--green-dark); transform: scale(1.05); }

/* Filter Tabs – pill shape */
.panel-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--glass-border);
}

.tab-btn {
  padding: 7px 16px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.tab-btn:hover {
  background: rgba(255,255,255,0.09);
  color: var(--text-light);
  transform: translateY(-1px);
}
.tab-btn.active {
  background: var(--green-main);
  border-color: var(--green-main);
  color: #fff;
  box-shadow: 0 4px 14px var(--green-glow);
}
.tab-btn.emergency-tab.active {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 4px 14px rgba(239,68,68,0.35);
}
.tab-btn.progress-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 4px 14px rgba(59,130,246,0.35);
}

/* Legend */
.panel-legend {
  display: flex; gap: 16px; flex-wrap: wrap;
  padding: 10px 20px;
  border-bottom: 1px solid var(--glass-border);
  font-size: 12px; color: var(--text-muted);
}
.legend-dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; margin-right: 5px;
}
.emergency-dot { background: var(--red); box-shadow: 0 0 6px var(--red); }
.progress-dot { background: var(--blue); box-shadow: 0 0 6px var(--blue); }
.rescued-dot { background: var(--green-main); box-shadow: 0 0 6px var(--green-main); }

/* Scrollable Content */
.panel-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 100px;
}

/* Reports List inside Panel */
.reports-list { display: flex; flex-direction: column; gap: 12px; }

/* Report Card – glassmorphism dark, đồng bộ Home card style */
.report-card {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-md) !important;
  padding: 14px !important;
  color: var(--text-light) !important;
  transition: all var(--dur-mid) var(--ease-out) !important;
  cursor: pointer;
  /* Viền trái theo trạng thái – giữ nguyên colorful signal */
  border-left-width: 3px !important;
  border-left-style: solid !important;
}
.report-card.report-emergency { border-left-color: var(--red) !important; }
.report-card.report-progress  { border-left-color: var(--blue) !important; }
.report-card.report-rescued   { border-left-color: var(--green-main) !important; }

.report-card:hover {
  background: rgba(34, 197, 94, 0.05) !important;
  border-color: var(--glass-border-g) !important;
  transform: translateX(4px) !important;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25) !important;
}

/* Helpers Section */
.helpers-section {
  margin-top: 24px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.section-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  font-weight: 700;
  color: var(--green-light);
  font-size: 13px;
  border-bottom: 1px solid var(--glass-border);
  letter-spacing: 0.3px;
}

.helpers-list {
  padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
}

.helper-card {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,0.03);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  gap: 10px;
  transition: all var(--dur-fast) ease;
}
.helper-card:hover {
  background: rgba(34,197,94,0.06);
  border-color: var(--glass-border-g);
}

/* Contact button – pill shape, green gradient */
.contact-btn {
  background: linear-gradient(135deg, var(--green-main), var(--green-dark));
  color: #fff; border: none;
  padding: 7px 16px; border-radius: var(--radius-pill);
  cursor: pointer; font-size: 12px;
  font-family: var(--font); font-weight: 700;
  transition: transform var(--dur-fast), box-shadow var(--dur-fast);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--green-glow);
}
.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--green-glow);
}

/* Clinic Section */
.clinic-section {
  margin-top: 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* ═══════════════════════════════
   CAMERA / REPORT MODAL
═══════════════════════════════ */
.rm-modal-overlay {
  display: none;
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(2, 12, 5, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9000;
  align-items: center; justify-content: center;
}
.rm-modal-overlay.open { display: flex; }

.rm-modal {
  background: rgba(5, 20, 11, 0.9);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  width: 95%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Modal Header */
.rm-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky; top: 0;
  background: rgba(5, 20, 11, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 10;
}

.rm-modal-title {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.1rem;
}
.rm-modal-title i { color: var(--green-main); font-size: 1.2rem; }

.rm-modal-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.rm-modal-close:hover { background: rgba(239,68,68,0.15); color: var(--red); transform: rotate(90deg); }

/* Camera Viewfinder */
.rm-camera-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #000;
  overflow: hidden;
}

#video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.rm-preview-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Scanning Overlay */
.scan-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}

.scan-corners {
  position: absolute; inset: 20px;
}

.corner {
  position: absolute;
  width: 28px; height: 28px;
  border-color: var(--green-main);
  border-style: solid;
  border-width: 0;
}
.corner.tl { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; border-radius: 4px 0 0 0; }
.corner.tr { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; border-radius: 0 4px 0 0; }
.corner.bl { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; border-radius: 0 0 0 4px; }
.corner.br { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; border-radius: 0 0 4px 0; }

.scan-line {
  position: absolute;
  left: 20px; right: 20px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green-main), transparent);
  box-shadow: 0 0 10px var(--green-main);
  animation: scanMove 2.5s ease-in-out infinite;
  top: 20px;
}

@keyframes scanMove {
  0%   { top: 20px; }
  50%  { top: calc(100% - 22px); }
  100% { top: 20px; }
}

.scan-label {
  position: absolute;
  bottom: 28px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  color: var(--green-light);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid rgba(34,197,94,0.3);
  display: flex; align-items: center; gap: 6px;
}

/* Camera Action Buttons */
.rm-camera-actions {
  display: flex; justify-content: center; gap: 12px;
  padding: 16px 24px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.rm-btn-capture, .rm-btn-retake {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  border: none; border-radius: 99px;
  font-family: var(--font); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all 0.25s;
}

.rm-btn-capture {
  background: linear-gradient(135deg, var(--orange), #dc2626);
  color: #fff;
  box-shadow: 0 4px 16px rgba(249,115,22,0.35);
}
.rm-btn-capture:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(249,115,22,0.5); }

.rm-btn-retake {
  background: rgba(255,255,255,0.08);
  color: var(--text-light);
  border: 1px solid rgba(255,255,255,0.12);
}
.rm-btn-retake:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }

/* Form Section */
.rm-form-section { padding: 20px 24px; }

/* Floating Label Fields */
.rm-field { margin-bottom: 18px; }

.rm-input-wrap {
  position: relative;
  display: flex; align-items: center;
}

.rm-field-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  font-size: 14px;
  z-index: 2;
  pointer-events: none;
  transition: color 0.3s;
}

.rm-input {
  width: 100%;
  padding: 18px 16px 8px 42px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--text-light);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: all 0.3s;
  resize: none;
}

.rm-input:focus {
  border-color: var(--green-main);
  background: rgba(34,197,94,0.06);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}

.rm-input:focus + .rm-label,
.rm-input:not(:placeholder-shown) + .rm-label,
.rm-label-active {
  top: 6px !important;
  font-size: 11px !important;
  color: var(--green-main) !important;
}

.rm-input:focus ~ .rm-field-icon {
  color: var(--green-main);
}

.rm-label {
  position: absolute;
  left: 42px; top: 14px;
  font-size: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.25s;
  font-family: var(--font);
}

.rm-select { padding-top: 18px; padding-bottom: 8px; }
.rm-textarea { padding-top: 18px; min-height: 90px; }

/* Location */
.rm-location-loading {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-sm);
  color: var(--blue);
  font-size: 13px; font-weight: 500;
  margin-bottom: 14px;
}

.rm-location-info {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 12px 16px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius-sm);
  color: var(--green-light);
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* Submit Button */
.rm-btn-submit {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px;
  background: linear-gradient(135deg, var(--green-main), var(--green-dark));
  border: none; border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font); font-size: 16px; font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 6px 20px rgba(34,197,94,0.35);
  position: relative; overflow: hidden;
}
.rm-btn-submit::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.25) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}
.rm-btn-submit:hover::before { transform: translateX(120%); }
.rm-btn-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(34,197,94,0.5); }
.rm-btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ═══════════════════════════════
   REPORTER INFO BADGE (MODAL)
═══════════════════════════════ */
#reporterField {
  margin-bottom: 0; /* The wrap inside will have margin */
}

.rm-reporter-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 18px; /* Replaces .rm-field margin */
}

.rm-reporter-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background-color: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--text-muted);
  flex-shrink: 0;
}

.rm-reporter-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.rm-reporter-label { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.rm-reporter-name { 
  font-size: 14px; 
  color: var(--text-light); 
  font-weight: 600; 
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
}

.rm-reporter-badge {
  font-size: 10px;
  padding: 4px 8px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 99px;
  color: var(--green-light);
  font-weight: 600;
  flex-shrink: 0;
}


/* ═══════════════════════════════
   RESPONSIVE
═══════════════════════════════ */
@media (max-width: 768px) {
  :root { --panel-width: 100vw; }

  /* Cosmetic only – layout rules are in the media query after the CRITICAL block below */
  .view-home-btn {
    padding: 10px 14px;
    font-size: 12px;
  }
}

/* ═══════════════════════════════════════════════════════
   MERGE-CONFLICT FIXES
   These rules MUST come after style2.css overrides to win
   the cascade. style1.css is loaded BEFORE style2.css so
   normally style2 would win – but we use !important here
   for the critical layout properties only.
═══════════════════════════════════════════════════════ */

/* (1) CRITICAL: Body must be overflow:hidden + dark bg for full-screen map */
html, body {
  overflow: hidden !important;
  background: var(--green-bg) !important;
}

/* (2) CRITICAL: Navbar must be position:fixed above the map – never sticky */
.navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  background: rgba(2, 12, 5, 0.0) !important;  /* transparent by default */
  transition: background 0.4s ease, box-shadow 0.4s ease !important;
  backdrop-filter: none !important;
}

/* Navbar gets glass background once .scrolled class is added by JS */
.navbar.scrolled {
  background: rgba(2, 12, 5, 0.85) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

/* (3) CRITICAL: Map wrapper must be truly full-screen on desktop */
.map-wrapper {
  position: fixed !important;
  top: 0 !important; left: 0 !important;
  width: 100% !important; height: 100% !important;
  z-index: 0 !important;
}

/* Ensure Cesium canvas fills container */
#interactiveMap .cesium-viewer,
#interactiveMap .cesium-viewer-cesiumWidgetContainer,
#interactiveMap .cesium-widget,
#interactiveMap canvas {
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
}

/* (4) CRITICAL: Cesium canvas must NOT have pointer-events blocked */
#interactiveMap canvas {
  pointer-events: auto !important;
}

/* (5) Hide Cesium credits bar */
.cesium-widget-credits,
.cesium-credit-logoContainer,
.cesium-credit-textContainer {
  display: none !important;
}

/* (6) Chatbot always top-most – never blocked by Cesium or floating panel */
.rm-modal-overlay.open ~ .chat-bot-AI,
.rm-modal-overlay[style*="display: flex"] ~ .chat-bot-AI {
  display: none !important;
}
.wg-chatbot,
#chatbot-container,
.chat-bot-AI {
  z-index: 9500 !important;
  pointer-events: auto !important;
}

/* (7) Report card text color – must be readable over dark panel */
.report-card h4,
.report-card p,
.report-card span {
  color: var(--text-light) !important;
}
.report-card .report-action-btn {
  pointer-events: auto !important;
}

/* ══════════════════════════════════════════════
   FINAL OVERRIDE BLOCK – runs after ALL other CSS
   including style2.css (which loads after this file
   but whose !important rules we counteract here)
══════════════════════════════════════════════ */


/* Tab-btn: override Bao's light theme tabs that bleed through */
.panel-tabs .tab-btn {
  color: var(--text-muted) !important;
}
.panel-tabs .tab-btn.active {
  color: #fff !important;
  background: var(--green-main) !important;
}
.panel-tabs .tab-btn.emergency-tab.active {
  background: var(--red) !important;
}
.panel-tabs .tab-btn.progress-tab.active {
  background: var(--blue) !important;
}

/* Ensure the map wrapper z-index is 0 so navbar (z:1000) is above it */
.map-wrapper {
  z-index: 0 !important;
}

/* The floating panel must NOT intercept mouse events on the map outside its area */
.floating-panel {
  pointer-events: auto;
}
/* But the map area to the right of the panel must be fully interactive */
#interactiveMap {
  pointer-events: auto !important;
}


/* ══════════════════════════════════════════════════════════
   Z-INDEX FIX – CUSTOM CESIUM POPUP (popupDiv)
   ══════════════════════════════════════════════════════════

   VẤN ĐỀ:
   • popupDiv được append vào #interactiveMap (z-index: 0)
   • popupDiv.style.zIndex = '1000' → bằng với navbar (1000)
     → navbar đè lên hoặc popup bị kẹp dưới stacking context

   GIẢI PHÁP (3 tầng):
   1. popupDiv inline z-index được script1.js set lên 1050
      (script sẽ được patch bên dưới bằng CSS override)
   2. Ta dùng CSS override trực tiếp bằng ID selector #cesiumPopup
      (script1.js đặt id này sau khi tạo div)
   3. Đảm bảo .map-wrapper tạo stacking context đúng để popup
      không bị clip bởi overflow:hidden của các element cha

   THỨ TỰ Z-INDEX:
   #interactiveMap(0) < .floating-panel(100) < .navbar(1000)
   < popupDiv(1050) < .rm-modal-overlay(9000) < chatbot(9500)
   ══════════════════════════════════════════════════════════ */

/* Override: bất kỳ div trực tiếp con của #interactiveMap
   mà có class rescue-popup-container (JS sẽ add class này)
   phải nằm TRÊN navbar */
#interactiveMap > div[style*="position: absolute"][style*="z-index"] {
  z-index: 1050 !important;
}

/* Hoặc nếu script không thể patch: class helper */
.cesium-popup-overlay {
  position: absolute !important;
  z-index: 1050 !important;
  pointer-events: auto !important;
}

/* Đảm bảo #interactiveMap không clip con trực tiếp */
#interactiveMap {
  overflow: visible !important;
}

/* .map-wrapper phải là stacking context NHƯNG không clip children */
.map-wrapper {
  overflow: visible !important;
}


/* ══════════════════════════════════════════════════════════
   PANEL ACTION BUTTONS (Support + Feedback)
   Đồng bộ với glass-panel dark style
   ══════════════════════════════════════════════════════════ */
.panel-action-row {
  display: flex;
  gap: 8px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--glass-border);
  margin-top: 8px;
  flex-shrink: 0;
}

.panel-support-btn,
.panel-feedback-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.2px;
}

/* Lực lượng hỗ trợ – màu xanh */
.panel-support-btn {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.panel-support-btn:hover {
  background: #3b82f6;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}
.panel-support-btn i { font-size: 13px; }

/* Phản hồi – màu cam/đỏ nổi bật */
.panel-feedback-btn {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(220, 38, 38, 0.15));
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.3);
}
.panel-feedback-btn:hover {
  background: linear-gradient(135deg, #f97316, #dc2626);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
}
.panel-feedback-btn i { font-size: 13px; }


/* ══════════════════════════════════════════════════════════
   FEEDBACK MODAL – glassmorphism, đồng bộ dark theme
   ══════════════════════════════════════════════════════════ */
.feedback-modal-box {
  max-width: 500px;
}

/* Header icon cam */
.feedback-modal-box .rm-modal-title i {
  color: var(--orange) !important;
}

/* Star Rating */
.fb-rating-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 24px 10px;
  background: rgba(249, 115, 22, 0.06);
  border-bottom: 1px solid rgba(249, 115, 22, 0.12);
}
.fb-rating-label {
  font-size: 13px;
  color: var(--text-muted);
}
.fb-stars {
  display: flex;
  gap: 8px;
}
.fb-star {
  font-size: 26px;
  color: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.15s;
}
.fb-star:hover,
.fb-star.fb-star-lit {
  color: #fbbf24;
  transform: scale(1.15);
}
.fb-star.fb-star-selected {
  color: #f97316;
}

/* Form fields: reuse rm-modal styles; no extra padding needed */
.fb-form .rm-form-section {
  padding-top: 0;
}

/* Action buttons row */
.fb-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.fb-btn-cancel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s;
}
.fb-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-light);
}

.fb-btn-submit {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #f97316, #dc2626);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.3);
}
.fb-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.45);
}
.fb-btn-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ═══════════════════════════════════════════════════════
   PRIORITY SELECT MODAL & NEARBY RESCUERS STYLES
═══════════════════════════════════════════════════════ */
.priority-modal-overlay {
  z-index: 9500 !important;
}

.priority-modal-box {
  max-width: 520px !important;
  background: rgba(4, 18, 9, 0.96) !important;
  border: 1px solid rgba(34, 197, 94, 0.25) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(34, 197, 94, 0.15) !important;
}

.priority-modal-body {
  padding: 24px !important;
}

.priority-desc {
  font-size: 14px;
  color: var(--text-body);
  margin-bottom: 20px;
  line-height: 1.5;
}

.priority-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.priority-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

.priority-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.priority-card.emergency-card {
  border-left: 4px solid var(--red);
}
.priority-card.emergency-card:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.25);
}

.priority-card.progress-card {
  border-left: 4px solid var(--blue);
}
.priority-card.progress-card:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.25);
}

.priority-card.safe-card {
  border-left: 4px solid var(--green-main);
}
.priority-card.safe-card:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.25);
}

.priority-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.priority-card.emergency-card .priority-icon { background: rgba(239, 68, 68, 0.15); }
.priority-card.progress-card .priority-icon  { background: rgba(59, 130, 246, 0.15); }
.priority-card.safe-card .priority-icon      { background: rgba(34, 197, 94, 0.15); }

.priority-info {
  flex: 1;
}

.priority-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 4px;
}

.priority-info p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.priority-action {
  color: var(--text-muted);
  font-size: 16px;
  transition: transform 0.2s;
}

.priority-card:hover .priority-action {
  transform: translateX(4px);
  color: var(--text-light);
}

/* ==========================================
   NEARBY RESCUERS BOX (5M LIGHT RED ZONE)
========================================== */
.rm-nearby-rescuers {
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  border-radius: 12px !important;
  padding: 14px !important;
  margin-bottom: 16px !important;
  animation: pulseRedBorder 2s infinite !important;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15) !important;
}

@keyframes pulseRedBorder {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.rm-nearby-header {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #fca5a5 !important;
  margin-bottom: 10px !important;
}

.rm-nearby-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

/* ==========================================
   SOS DISPATCH (UBER FOR RESCUE)
========================================== */
.rm-sos-dispatch {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.sos-radar-container {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 30px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sos-radar-center {
  width: 50px;
  height: 50px;
  background: #ef4444;
  border-radius: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

.sos-radar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(239, 68, 68, 0.8);
  opacity: 0;
}

.sos-radar-ring.ring-1 { width: 100%; height: 100%; animation: radarWave 2s infinite linear; }
.sos-radar-ring.ring-2 { width: 100%; height: 100%; animation: radarWave 2s infinite linear 0.6s; }
.sos-radar-ring.ring-3 { width: 100%; height: 100%; animation: radarWave 2s infinite linear 1.2s; }

@keyframes radarWave {
  0% { width: 50px; height: 50px; opacity: 1; border-width: 3px; }
  100% { width: 200px; height: 200px; opacity: 0; border-width: 1px; }
}

.sos-dispatch-title {
  color: #fca5a5;
  font-size: 20px;
  margin-bottom: 10px;
  font-weight: bold;
}

.sos-dispatch-subtitle {
  color: #94a3b8;
  font-size: 14px;
  max-width: 280px;
  line-height: 1.5;
}

.sos-match-card {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  max-width: 350px;
  margin-top: 20px;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideUpFade 0.5s ease;
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.match-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px dashed rgba(255,255,255,0.1);
  padding-bottom: 10px;
}

.match-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
}

.match-eta {
  color: #fbbf24;
  font-size: 13px;
  font-weight: bold;
}

.match-card-body {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.match-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #34d399;
}

.match-info h4 {
  color: #fff;
  margin: 0 0 5px 0;
  font-size: 16px;
}

.match-info p {
  color: #cbd5e1;
  font-size: 12px;
  margin: 0 0 5px 0;
  line-height: 1.4;
}

.match-status-text {
  color: #34d399 !important;
  font-weight: 600;
  margin-top: 8px !important;
}

.match-action-btn {
  width: 100%;
  background: #3b82f6;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 10px;
  color: var(--text-light);
}

/* ==========================================
   NEARBY RESCUERS BOX (5M LIGHT RED ZONE)
========================================== */
.rm-nearby-rescuers {
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
  border-radius: 12px !important;
  padding: 14px !important;
  margin-bottom: 16px !important;
  animation: pulseRedBorder 2s infinite !important;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15) !important;
}

@keyframes pulseRedBorder {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.rm-nearby-header {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #fca5a5 !important;
  margin-bottom: 10px !important;
}

.rm-nearby-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

/* ==========================================
   SOS DISPATCH (UBER FOR RESCUE)
========================================== */
.rm-sos-dispatch {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.sos-radar-container {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 30px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sos-radar-center {
  width: 50px;
  height: 50px;
  background: #ef4444;
  border-radius: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

.sos-radar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(239, 68, 68, 0.8);
  opacity: 0;
}

.sos-radar-ring.ring-1 { width: 100%; height: 100%; animation: radarWave 2s infinite linear; }
.sos-radar-ring.ring-2 { width: 100%; height: 100%; animation: radarWave 2s infinite linear 0.6s; }
.sos-radar-ring.ring-3 { width: 100%; height: 100%; animation: radarWave 2s infinite linear 1.2s; }

@keyframes radarWave {
  0% { width: 50px; height: 50px; opacity: 1; border-width: 3px; }
  100% { width: 200px; height: 200px; opacity: 0; border-width: 1px; }
}

.sos-dispatch-title {
  color: #fca5a5;
  font-size: 20px;
  margin-bottom: 10px;
  font-weight: bold;
}

.sos-dispatch-subtitle {
  color: #94a3b8;
  font-size: 14px;
  max-width: 280px;
  line-height: 1.5;
}

.sos-match-card {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  max-width: 350px;
  margin-top: 20px;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideUpFade 0.5s ease;
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.match-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px dashed rgba(255,255,255,0.1);
  padding-bottom: 10px;
}

.match-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
}

.match-eta {
  color: #fbbf24;
  font-size: 13px;
  font-weight: bold;
}

.match-card-body {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.match-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #34d399;
}

.match-info h4 {
  color: #fff;
  margin: 0 0 5px 0;
  font-size: 16px;
}

.match-info p {
  color: #cbd5e1;
  font-size: 12px;
  margin: 0 0 5px 0;
  line-height: 1.4;
}

.match-status-text {
  color: #34d399 !important;
  font-weight: 600;
  margin-top: 8px !important;
}

.match-action-btn {
  width: 100%;
  background: #3b82f6;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.match-action-btn:hover {
  background: #2563eb;
}

/* ==========================================
   MOBILE DRAG HANDLE & BOTTOM SHEET
========================================== */
.mobile-drag-handle {
  display: none;
  width: 100%;
  padding: 16px 0 26px; /* 16 + 2 + 26 = 44px */
  justify-content: center;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 10;
  touch-action: none; /* Ngăn trình duyệt chặn sự kiện cuộn */
}
.handle-bar {
  width: 36px;
  height: 2px;
  background: rgba(255,255,255,0.4);
  border-radius: 2px;
  position: relative;
}
.handle-bar::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.4);
  border-radius: 2px;
}

@media (max-width: 768px) {
  html, body {
    overflow: hidden !important;
    height: 100% !important;
    width: 100% !important;
  }

  .map-wrapper {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    background: #020c05 !important;
  }

  /* Globe is always mounted and visible underneath */
  #interactiveMap {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10 !important;
    pointer-events: auto !important;
  }

  /* Floating Bottom Sheet */
  .floating-panel {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    height: calc(100dvh - 68px) !important;
    height: calc(100vh - 68px) !important;
    max-height: calc(100dvh - 68px) !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 24px 24px 0 0 !important;
    border: 1px solid rgba(34, 197, 94, 0.25) !important;
    border-bottom: none !important;
    background: rgba(4, 20, 10, 0.94) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6) !important;
    z-index: 900 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    will-change: transform !important;
    box-sizing: border-box !important;
    pointer-events: auto !important;
  }

  /* Mobile Drag Handle */
  .mobile-drag-handle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    cursor: grab !important;
    touch-action: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    background: transparent !important;
    flex-shrink: 0 !important;
  }

  .handle-bar {
    width: 44px !important;
    height: 5px !important;
    background: rgba(255, 255, 255, 0.4) !important;
    border-radius: 99px !important;
    transition: width 0.2s ease, background-color 0.2s ease !important;
  }

  .mobile-drag-handle:active .handle-bar,
  .mobile-drag-handle.dragging .handle-bar {
    width: 56px !important;
    background: #22c55e !important;
  }

  /* Compact Panel Header on Mobile */
  .panel-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 2px 16px 8px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    flex-shrink: 0 !important;
    touch-action: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }
  .panel-title {
    gap: 8px !important;
  }
  .panel-title-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 15px !important;
  }
  .panel-title h2 {
    font-size: 17px !important;
    margin: 0 !important;
  }
  .panel-title p {
    font-size: 12px !important;
    color: #94a3b8 !important;
    margin: 0 !important;
  }

  .panel-search {
    padding: 8px 16px 4px !important;
    flex-shrink: 0 !important;
  }
  .search-glass {
    padding: 6px 12px !important;
  }
  .search-glass input {
    font-size: 13.5px !important;
  }

  .panel-tabs {
    padding: 4px 16px !important;
    flex-shrink: 0 !important;
  }
  .tab-btn {
    padding: 6px 12px !important;
    font-size: 12.5px !important;
  }

  .panel-legend {
    padding: 4px 16px 6px !important;
    flex-shrink: 0 !important;
  }

  .panel-scroll {
    flex: 1 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    padding: 8px 16px 40px !important;
  }

  .view-home-btn {
    position: fixed !important;
    top: 80px !important;
    right: 16px !important;
    bottom: auto !important;
    z-index: 50 !important;
    display: flex !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   LIGHT THEME OVERRIDES ([data-theme="light"]) — RESCUE MAP
   Note: Cesium 3D Globe (#interactiveMap) is intentionally kept dark!
   Only UI Panels, Cards, Modals, Buttons & Overlays switch to Light.
   ═══════════════════════════════════════════════════════════════════ */

[data-theme="light"] {
  --bg-deep:       #f8fafc;
  --bg-base:       #f0fdf4;
  --bg-surface:    #ffffff;
  --bg-gradient:   linear-gradient(135deg, #f8fafc 0%, #f0fdf4 100%);

  --text-light:    #0f172a;
  --text-body:     #1e293b;
  --text-muted:    #475569;
  --text-subtle:   #64748b;

  --glass-bg:      rgba(255, 255, 255, 0.94);
  --glass-bg-card: #ffffff;
  --glass-border:  #e2e8f0;
  --glass-border-g:rgba(16, 185, 129, 0.35);
}

/* ── Floating Left Panel in Light Mode ── */
[data-theme="light"] .floating-panel {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(25px) !important;
  -webkit-backdrop-filter: blur(25px) !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: 6px 0 40px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .panel-header {
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .panel-title h2 {
  color: #0f172a !important;
}

[data-theme="light"] .panel-title p {
  color: #475569 !important;
}

[data-theme="light"] .panel-search {
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .search-glass {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .search-glass input {
  color: #0f172a !important;
}

[data-theme="light"] .search-glass input::placeholder {
  color: #64748b !important;
}

[data-theme="light"] .panel-tabs {
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .tab-btn {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

[data-theme="light"] .tab-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .tab-btn.active {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35) !important;
}

[data-theme="light"] .tab-btn.emergency-tab.active {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
}

[data-theme="light"] .tab-btn.progress-tab.active {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
}

[data-theme="light"] .panel-legend {
  border-bottom: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}

/* ── Report Cards in Light Mode ── */
[data-theme="light"] .report-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .report-card:hover {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .report-card h4,
[data-theme="light"] .report-card .rc-name {
  color: #0f172a !important;
}

[data-theme="light"] .report-card p,
[data-theme="light"] .report-card .rc-desc {
  color: #475569 !important;
}

[data-theme="light"] .report-card .rc-time,
[data-theme="light"] .report-card .rc-meta {
  color: #64748b !important;
}

/* ── Helpers Section in Light Mode ── */
[data-theme="light"] .helpers-section {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .helpers-section .section-header {
  border-bottom: 1px solid #e2e8f0 !important;
  color: #047857 !important;
}

[data-theme="light"] .helper-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
}

[data-theme="light"] .helper-card:hover {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
}

/* ── Map Controls & Buttons in Light Mode ── */
[data-theme="light"] .view-home-btn {
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .view-home-btn:hover {
  background: #ffffff !important;
  border-color: #059669 !important;
  color: #059669 !important;
}

[data-theme="light"] .handle-bar {
  background: rgba(0, 0, 0, 0.25) !important;
}

[data-theme="light"] .mobile-collapse-btn {
  background: rgba(0, 0, 0, 0.06) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #475569 !important;
}

[data-theme="light"] .floating-open-panel-btn {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

/* ── Modals in Light Mode ── */
[data-theme="light"] .rm-modal {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18) !important;
}

[data-theme="light"] .rm-modal-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .rm-modal-title {
  color: #0f172a !important;
}

[data-theme="light"] .rm-modal-close {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

