/* =========================================
   djoksonGIS — App CSS
   AdminLTE 4 + Leaflet WebGIS
   ========================================= */

/* ---- Base ---- */
html, body, .app-wrapper {
  height: 100%;
}

/* Global Light/Dark Theme Color Contrast & Legibility */
:root {
  --app-text-primary: #0f172a;
  --app-text-secondary: #334155;
  --app-text-muted: #64748b;
  --app-card-bg: #ffffff;
  --app-card-border: #e2e8f0;
}

[data-bs-theme="dark"], body.dark-mode {
  --app-text-primary: #f8fafc;
  --app-text-secondary: #cbd5e1;
  --app-text-muted: #94a3b8;
  --app-card-bg: #1e293b;
  --app-card-border: rgba(255, 255, 255, 0.12);
}

/* Sidebar Text Contrast in Light & Dark Mode */
.app-sidebar .nav-link {
  color: var(--app-text-secondary) !important;
  font-weight: 500;
  transition: all 0.15s ease;
}

.app-sidebar .nav-link:hover {
  color: var(--app-text-primary) !important;
  background-color: rgba(13, 110, 253, 0.08) !important;
}

.app-sidebar .nav-link.active {
  color: #ffffff !important;
  background-color: #0d6efd !important;
  font-weight: 600;
}

.app-sidebar .nav-header {
  color: var(--app-text-muted) !important;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* Sidebar Treeview Dropdown & Chevron Animation */
.app-sidebar .nav-treeview {
  display: none;
  list-style: none;
  padding-left: 0;
  transition: all 0.25s ease-in-out;
}

.app-sidebar .nav-item.menu-open > .nav-treeview {
  display: block;
}

.app-sidebar .nav-arrow {
  transition: transform 0.25s ease-in-out;
  float: right;
  margin-top: 4px;
}

.app-sidebar .nav-item.menu-open > .nav-link .nav-arrow {
  transform: rotate(90deg);
}

/* Leaflet Popup Light/Dark Mode Contrast */
.leaflet-popup-content-wrapper {
  background: var(--app-card-bg) !important;
  color: var(--app-text-primary) !important;
  border: 1px solid var(--app-card-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25) !important;
}

.leaflet-popup-tip {
  background: var(--app-card-bg) !important;
}

.leaflet-popup-content h6,
.leaflet-popup-content strong {
  color: var(--app-text-primary) !important;
}

.leaflet-popup-content p,
.leaflet-popup-content div {
  color: var(--app-text-secondary);
}

/* ---- Map ---- */
#map {
  width: 100%;
  height: 100%;
  background: #1a1a2e;
  z-index: 1;
}

/* ---- Map Card ---- */
#mapCard .card-body {
  padding: 0;
  overflow: hidden;
  height: 65vh;
  min-height: 400px;
}

/* ---- Status Bar ---- */
.status-bar {
  height: 36px;
  font-size: 0.78rem;
  border-top: 1px solid rgba(0,0,0,.1);
  overflow-x: auto;
  white-space: nowrap;
}

.status-item {
  display: inline-flex;
  align-items: center;
  color: var(--bs-secondary-color);
}

/* ---- Map Toolbar ---- */
.map-toolbar .btn {
  font-size: 0.78rem;
}

#mapCard .card-header {
  position: relative;
  z-index: 1020;
  overflow: visible !important;
}

.map-toolbar {
  position: relative;
  z-index: 1020;
}

.map-toolbar .dropdown-menu {
  z-index: 1060 !important;
}

/* ---- Feature Side Panel ---- */
.map-side-panel {
  width: 100%;
  background: rgba(255,255,255,0.97);
  display: flex;
  flex-direction: column;
}

[data-bs-theme="dark"] .map-side-panel {
  background: rgba(30,35,45,0.97);
}

.map-side-panel .panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem;
}

.map-side-panel .panel-header {
  background: rgba(0,0,0,.05);
  min-height: 38px;
}

[data-bs-theme="dark"] .map-side-panel .panel-header {
  background: rgba(255,255,255,.05);
}

/* Feature List Items */
.feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  border: 1px solid transparent;
  margin-bottom: 2px;
  transition: background .15s, border-color .15s;
}

.feature-item:hover {
  background: rgba(13,110,253,.08);
  border-color: rgba(13,110,253,.2);
}

.feature-item.selected {
  background: rgba(13,110,253,.15);
  border-color: rgba(13,110,253,.4);
}

.feature-item .feature-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  color: #0d6efd;
}

.feature-item .feature-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.feature-item .feature-actions {
  display: flex;
  gap: 3px;
  opacity: 0;
  transition: opacity .15s;
}

.feature-item:hover .feature-actions {
  opacity: 1;
}

.feature-item .btn-xs {
  padding: 1px 5px;
  font-size: 0.7rem;
  line-height: 1.4;
}

/* ---- Agent Chat Container ---- */
.agent-chat-container {
  display: flex;
  flex-direction: column;
  height: 250px;
  background: var(--bs-body-bg);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
}
.chat-bubble.bot {
  background: rgba(13,110,253,.1);
  color: var(--bs-body-color);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}
.chat-bubble.user {
  background: #0d6efd;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}
.chat-input-area {
  padding: 0.75rem;
  border-top: 1px solid rgba(0,0,0,.1);
}
[data-bs-theme="dark"] .chat-input-area {
  border-top-color: rgba(255,255,255,.1);
}

/* ---- Navbar ---- */
.brand-text {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

/* ---- Dashboard stat boxes ---- */
.small-box .small-box-icon {
  font-size: 3rem;
  opacity: 0.2;
}

/* ---- Leaflet Popup Override ---- */
.leaflet-popup-content-wrapper {
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  font-size: 0.85rem;
}

.popup-content h6 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.popup-content .coords {
  font-size: 0.75rem;
  color: #6c757d;
}

.popup-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

/* ---- Toast ---- */
#toastContainer .toast {
  min-width: 240px;
  border-radius: 8px;
}

/* ---- Fullscreen Map ---- */
.map-fullscreen #map {
  height: 100vh !important;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
}

.map-fullscreen #mapCard {
  position: fixed;
  inset: 0;
  z-index: 9998;
  border-radius: 0;
  margin: 0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  #map {
    height: 50vh;
  }

  .map-side-panel {
    width: 200px;
  }
}

@media (max-width: 576px) {
  .map-side-panel {
    display: none;
  }

  .status-bar .vr {
    display: none;
  }
}

/* ---- Leaflet Dark Mode fix ---- */
[data-bs-theme="dark"] .leaflet-control {
  filter: invert(1) hue-rotate(180deg);
}

[data-bs-theme="dark"] .leaflet-popup-content-wrapper,
[data-bs-theme="dark"] .leaflet-popup-tip {
  background: #2d3748;
  color: #e2e8f0;
  filter: none;
}

/* ---- Spinning icon for loading ---- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.spinning {
  display: inline-block;
  animation: spin .8s linear infinite;
}
/* ADS-B Tooltip & Icon Handling */
.adsb-tooltip {
  display: block !important;
  font-size: 0.72rem;
  padding: 3px 7px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.6);
  border-radius: 5px;
  color: #ffffff;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.adsb-label .adsb-callsign {
  font-weight: 700;
  color: #38bdf8;
  font-size: 0.75rem;
  line-height: 1.2;
}

.adsb-label .adsb-alt {
  font-size: 0.7rem;
  color: #fbbf24;
  line-height: 1.2;
}

.adsb-plane-icon {
  background: transparent;
  border: none;
}

.adsb-plane-icon .plane-marker-inner {
  color: #38bdf8;
  font-size: 1.15rem;
  filter: drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.9));
  transition: transform 0.4s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

/* Tourism Marker Styling */
.custom-tourism-div-icon {
  background: transparent;
  border: none;
}

.tourism-marker-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tourism-marker-icon:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

/* Real-time Volcano Alert Marker & Popup Styling */
@keyframes volcano-pulse-danger {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.9);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(220, 53, 69, 0);
    transform: scale(1.25);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    transform: scale(1);
  }
}

.volcano-danger-icon {
  background: #dc3545;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  animation: volcano-pulse-danger 1.5s infinite;
  cursor: pointer;
}

.volcano-danger-popup .leaflet-popup-content-wrapper {
  background: #2c0b0e !important;
  color: #ffffff !important;
  border: 2px solid #dc3545;
}

.volcano-danger-popup .leaflet-popup-tip {
  background: #2c0b0e !important;
}

/* =========================================
   HERO BANNER & LANDING EXPERIENCE
   ========================================= */
.f4h-product-nav { display: flex; gap: 1.25rem; align-items: center; }
.f4h-product-nav a { color: inherit; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-decoration: none; }
.f4h-product-nav a:hover { color: #38bdf8; }
.f4h-command-hero { background: radial-gradient(circle at 82% 8%, rgba(14, 165, 233, .25), transparent 28%), linear-gradient(125deg, #071a2c, #0b2941 58%, #123a4d); border: 1px solid rgba(125, 211, 252, .25); border-radius: 18px; box-shadow: 0 20px 55px rgba(2, 8, 23, .28); color: #f8fafc; overflow: hidden; }
.f4h-command-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(250px, .7fr); gap: 2rem; padding: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.f4h-eyebrow { color: #7dd3fc; font-size: .69rem; font-weight: 800; letter-spacing: .14em; margin-bottom: .65rem; }
.f4h-command-hero h1 { font-size: clamp(2rem, 4vw, 3.65rem); letter-spacing: -.055em; line-height: 1.02; margin: 0; max-width: 760px; }
.f4h-command-copy { color: #cbd5e1; font-size: 1.02rem; line-height: 1.65; margin: 1rem 0 1.5rem; max-width: 650px; }
.f4h-btn-primary, .f4h-btn-secondary { border-radius: .6rem; font-weight: 700; padding: .7rem 1rem; }
.f4h-btn-primary { background: #fbbf24; border-color: #fbbf24; color: #172033; }
.f4h-btn-primary:hover { background: #fcd34d; border-color: #fcd34d; color: #172033; }
.f4h-btn-secondary { border: 1px solid rgba(226,232,240,.42); color: #f8fafc; }
.f4h-btn-secondary:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.f4h-trust-panel { background: rgba(1, 12, 24, .36); border: 1px solid rgba(186,230,253,.18); border-radius: 12px; padding: 1.2rem; }
.f4h-trust-label { color: #94a3b8; font-size: .66rem; font-weight: 800; letter-spacing: .12em; }
.f4h-trust-live { color: #f8fafc; font-weight: 700; margin: .5rem 0 1rem; }
.f4h-trust-panel dl { margin: 0; }.f4h-trust-panel dl div { border-top: 1px solid rgba(226,232,240,.14); padding: .7rem 0; }.f4h-trust-panel dt { color: #94a3b8; font-size: .68rem; font-weight: 700; text-transform: uppercase; }.f4h-trust-panel dd { color: #e2e8f0; font-size: .78rem; margin: .22rem 0 0; }
.f4h-intelligence-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 1rem; }.f4h-intelligence-card { border: 1px solid rgba(148,163,184,.22); border-radius: 14px; min-height: 220px; padding: 1.3rem; }.f4h-live-card { background: var(--bs-body-bg); }.f4h-map-card { background: linear-gradient(145deg, #123c52, #0d2437); color: #f8fafc; }.f4h-public-mission-card { background: linear-gradient(145deg, #3b2811, #20190c); color: #f8fafc; }.f4h-intelligence-card h2 { font-size: 1.15rem; font-weight: 750; margin: 0 0 .65rem; }.f4h-intelligence-card p:not(.f4h-eyebrow) { color: inherit; opacity: .78; line-height: 1.55; }.f4h-card-heading { align-items: start; display: flex; justify-content: space-between; gap: 1rem; }.f4h-card-heading a, .f4h-card-action { color: #38bdf8; font-size: .78rem; font-weight: 700; text-decoration: none; white-space: nowrap; }.f4h-card-action { display: inline-block; margin-top: .6rem; }.f4h-incident-list { display: grid; gap: .25rem; }.f4h-incident-row { align-items: center; display: grid; gap: .65rem; grid-template-columns: 8px minmax(0,1fr) auto; padding: .55rem 0; border-top: 1px solid rgba(148,163,184,.14); }.f4h-incident-row strong, .f4h-incident-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.f4h-incident-row small, .f4h-incident-row time { color: #94a3b8; font-size: .72rem; }.f4h-severity { width: 8px; height: 8px; border-radius: 50%; background: #38bdf8; }.f4h-severity-critical { background: #fb7185; }.f4h-severity-warning { background: #fbbf24; }.f4h-severity-advisory { background: #fb923c; }
@media (max-width: 991.98px) { .f4h-command-grid, .f4h-intelligence-grid { grid-template-columns: 1fr; }.f4h-intelligence-card { min-height: auto; } }
@media (max-width: 575.98px) { .f4h-command-grid { gap: 1.25rem; padding: 1.35rem; }.f4h-command-hero h1 { font-size: 2rem; }.f4h-card-heading { display: block; }.f4h-card-heading a { display: inline-block; margin-top: .4rem; } }
.hero-banner {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.08) 0%, rgba(220, 53, 69, 0.05) 50%, rgba(25, 135, 84, 0.06) 100%);
  border: 1px solid rgba(13, 110, 253, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .hero-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 100%);
  border-color: rgba(255, 255, 255, 0.12);
}

.hero-banner-inner {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #0d6efd, #0dcaf0, #20c997);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-bs-theme="dark"] .hero-title {
  background: linear-gradient(90deg, #60a5fa, #38bdf8, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 0.9rem;
  line-height: 1.5;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 500;
  padding: 3px 10px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
}

[data-bs-theme="dark"] .hero-chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

/* CTA Action Cards */
.hero-cta-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

[data-bs-theme="dark"] .hero-cta-btn {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  background: #ffffff;
}

[data-bs-theme="dark"] .hero-cta-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.hero-cta-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Live Indicators */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #dc3545;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
  animation: live-dot-pulse 1.6s infinite;
}

@keyframes live-dot-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(220, 53, 69, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.live-pulse-dot {
  width: 10px;
  height: 10px;
  background: #dc3545;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #dc3545;
  animation: live-dot-pulse 1.4s infinite;
}

/* Hero Partner of Volunteers Strip */
.hero-partners-strip {
  background: rgba(0, 0, 0, 0.04);
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.3s ease;
}

[data-bs-theme="dark"] .hero-partners-strip {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.hero-partner-logos {
  display: flex;
  align-items: center;
  gap: 8px;
}

.partner-logo-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.72rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  transition: all 0.2s ease;
  height: 26px;
  box-sizing: border-box;
}

[data-bs-theme="dark"] .partner-logo-item {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.partner-logo-item:hover {
  background: rgba(13, 110, 253, 0.15);
  border-color: rgba(13, 202, 240, 0.5);
  color: #0dcaf0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero-partner-img {
  height: 18px;
  width: auto;
  max-width: 58px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  display: inline-block;
}

.partner-logo-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}


/* =========================================
   REAL-TIME EARTHQUAKE WARNING HUD BANNER
   ========================================= */
.earthquake-warning-hud {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 680px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 12px;
  z-index: 1005;
  box-shadow: 0 12px 35px rgba(239, 68, 68, 0.25), 0 4px 12px rgba(0, 0, 0, 0.6);
  animation: slide-down-fade 0.35s ease;
}

@keyframes slide-down-fade {
  from { opacity: 0; transform: translate(-50%, -15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* =========================================
   FLOATING EARTHQUAKE PANEL
   ========================================= */
.earthquake-panel {
  position: absolute;
  top: 75px;
  left: 12px;
  width: 320px;
  max-width: calc(100% - 24px);
  max-height: calc(100% - 90px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .earthquake-panel {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
}

.eq-panel-header {
  background: rgba(0, 0, 0, 0.03);
}

[data-bs-theme="dark"] .eq-panel-header {
  background: rgba(255, 255, 255, 0.04);
}

.eq-panel-list {
  padding: 6px;
  max-height: 280px;
}

.earthquake-item {
  padding: 8px 10px;
  margin-bottom: 5px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-bs-theme="dark"] .earthquake-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.07);
}

.earthquake-item:hover {
  background: rgba(13, 110, 253, 0.08);
  border-color: rgba(13, 110, 253, 0.3);
  transform: translateX(2px);
}

.earthquake-item.is-latest {
  border-left: 3px solid #dc3545;
  background: rgba(220, 53, 69, 0.05);
}

.eq-item-location {
  font-size: 0.82rem;
  color: var(--bs-body-color);
}

/* Leaflet Pulsing Marker for latest earthquake */
@keyframes leaflet-pulse {
  0% { r: 12px; fill-opacity: 0.9; stroke-width: 2px; }
  50% { r: 24px; fill-opacity: 0.3; stroke-width: 4px; }
  100% { r: 12px; fill-opacity: 0.9; stroke-width: 2px; }
}

.leaflet-pulsing-marker {
  animation: leaflet-pulse 2s infinite ease-in-out;
}

/* EQ Popup Styling */
.eq-popup {
  font-size: 0.85rem;
  line-height: 1.4;
}

/* =========================================
   FLY FOR HUMANITY STYLING
   ========================================= */
.custom-humanity-hub-icon {
  background: transparent;
  border: none;
}

.humanity-hub-marker {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0dcaf0, #0d6efd);
  border: 2px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.humanity-hub-marker:hover {
  transform: scale(1.25);
  box-shadow: 0 6px 16px rgba(13, 202, 240, 0.8);
}

.humanity-popup {
  font-size: 0.85rem;
  line-height: 1.45;
}

/* F4H Modal 3D Logo & Pillar Styling */
.f4h-modal-logo {
  width: 72px;
  height: auto;
  max-height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.f4h-modal-logo:hover {
  transform: scale(1.08) rotate(-2deg);
}

.f4h-hero-summary {
  background: rgba(13, 110, 253, 0.05);
  border-color: rgba(13, 110, 253, 0.15) !important;
}

[data-bs-theme="dark"] .f4h-hero-summary {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.f4h-pillar-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.08) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-bs-theme="dark"] .f4h-pillar-card {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.f4h-pillar-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.f4h-pillar-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* =========================================
   COMPREHENSIVE SMARTPHONE & MOBILE LAYOUT
   ========================================= */

@media (max-width: 991.98px) {
  .app-content-header {
    padding: 0.75rem 1rem !important;
  }
  .app-content-header h2 {
    font-size: 1.1rem !important;
  }
  #navSearchForm {
    max-width: 150px;
  }
}

@media (max-width: 768px) {
  /* Body & Wrapper Adjustments */
  body {
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
  }

  .app-content {
    padding: 0.5rem !important;
  }

  .container-fluid {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  /* Hero Banner */
  .hero-banner-inner {
    padding: 1rem !important;
  }

  .hero-title {
    font-size: 1.2rem !important;
    line-height: 1.3;
  }

  .hero-subtitle {
    font-size: 0.82rem !important;
    margin-bottom: 0.75rem !important;
  }

  .hero-chip {
    font-size: 0.72rem;
    padding: 2px 8px;
  }

  .hero-cta-btn {
    padding: 0.5rem 0.75rem !important;
  }

  .hero-cta-icon {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  /* Map Container */
  #mapCard .card-header {
    padding: 0.6rem 0.75rem;
    gap: 0.4rem;
  }

  #mapCard .card-title {
    font-size: 0.95rem;
  }

  #mapCard .card-body {
    height: calc(100dvh - 200px) !important;
    height: calc(100vh - 200px) !important;
    min-height: 350px !important;
    max-height: none;
  }

  #map {
    height: 100% !important;
    width: 100% !important;
  }

  /* Map Toolbar: Smooth horizontal thumb swipe */
  .map-toolbar {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding: 3px 0 5px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .map-toolbar::-webkit-scrollbar {
    display: none;
  }

  .map-toolbar .btn {
    white-space: nowrap;
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
    flex-shrink: 0;
  }

  .map-toolbar .vr {
    height: 18px;
    margin: 0 3px !important;
    opacity: 0.3;
  }

  /* Bottom status bar */
  .status-bar {
    height: 32px;
    font-size: 0.72rem;
    padding: 0 0.5rem !important;
    scrollbar-width: none;
  }

  .status-bar::-webkit-scrollbar {
    display: none;
  }

  /* Floating Earthquake Bottom Sheet on Mobile */
  .earthquake-panel {
    top: auto !important;
    bottom: 8px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 52vh !important;
    border-radius: 12px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    z-index: 1050;
  }

  .eq-panel-list {
    max-height: 32vh !important;
  }

  /* Leaflet Touch Optimization */
  .leaflet-touch .leaflet-control-layers-toggle {
    width: 38px;
    height: 38px;
  }

  .leaflet-touch .leaflet-bar a {
    width: 34px;
    height: 34px;
    line-height: 34px;
    font-size: 16px;
  }

  .leaflet-popup-content-wrapper {
    max-width: calc(100vw - 32px) !important;
    border-radius: 12px;
    padding: 4px;
  }

  .leaflet-popup-content {
    margin: 10px 12px !important;
    line-height: 1.4;
    max-height: 60vh;
    overflow-y: auto;
  }

  .humanity-popup, .eq-popup {
    min-width: unset !important;
    width: 100%;
  }

  /* Modals on Mobile */
  .modal-dialog {
    margin: 0.5rem !important;
    max-width: calc(100% - 1rem);
  }

  .modal-content {
    border-radius: 14px;
  }

  .modal-header, .modal-footer {
    padding: 0.75rem 1rem;
  }

  .modal-body {
    padding: 1rem;
    max-height: 75vh;
    overflow-y: auto;
  }

  /* Chat & Activity */
  .agent-chat-container {
    height: 220px;
  }

  .chat-bubble {
    max-width: 90%;
    font-size: 0.8rem;
  }

  .app-footer {
    flex-direction: column;
    gap: 4px;
    text-align: center;
    padding: 0.75rem !important;
  }
}

@media (max-width: 576px) {
  .brand-text {
    font-size: 0.9rem;
  }

  #navSearchForm {
    display: none !important;
  }

  #navSearchInput {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
  }

  #notifDropdown, #themeToggleBtn, #loginTrigger {
    padding: 0.25rem 0.4rem;
    font-size: 0.78rem;
  }

  .hero-chip {
    font-size: 0.68rem;
    padding: 1px 6px;
  }

  #mapCard .card-body {
    height: calc(100dvh - 88px) !important;
    height: calc(100vh - 88px) !important;
    min-height: 300px !important;
  }

  .earthquake-panel {
    max-height: 56vh !important;
  }
}

/* =========================================
   Admin Studio & Story Reader HUD Styles
   ========================================= */

/* Admin Studio Modal */
#adminStudioModal .modal-content {
  background: rgba(22, 27, 46, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
  color: #f1f5f9;
}

#adminStudioModal .nav-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#adminStudioModal .nav-tabs .nav-link {
  color: #94a3b8;
  border: none;
  padding: 0.65rem 1.25rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

#adminStudioModal .nav-tabs .nav-link:hover {
  color: #60a5fa;
  border-bottom-color: rgba(96, 165, 250, 0.4);
}

#adminStudioModal .nav-tabs .nav-link.active {
  color: #3b82f6;
  background: transparent;
  border-bottom-color: #3b82f6;
  font-weight: 600;
}

#adminStudioModal .card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

#adminStudioModal .form-control,
#adminStudioModal .form-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 0.85rem;
}

#adminStudioModal .form-control:focus,
#adminStudioModal .form-select:focus {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

#adminStudioModal .table {
  color: #e2e8f0;
  font-size: 0.84rem;
}

#adminStudioModal .table th {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#adminStudioModal .table td {
  border-bottom-color: rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

/* Interactive Story Player HUD */
.story-player-hud {
  display: none;
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 48px);
  z-index: 1050;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  color: #f1f5f9;
  animation: slideUpHud 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.story-hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px 16px 0 0;
}

.story-hud-body {
  padding: 1rem;
  max-height: 52vh;
  overflow-y: auto;
}

.story-hud-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.story-hud-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* =========================================================================
   LYLA AI ASSISTANT & VOICE STYLING
   ========================================================================= */
.agent-chat-container {
  display: flex;
  flex-direction: column;
  height: 380px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bs-tertiary-bg);
  scroll-behavior: smooth;
}

.chat-bubble {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.45;
  animation: fadeInBubble 0.2s ease-out;
  word-break: break-word;
}

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

.chat-bubble.bot {
  align-self: flex-start;
  background: var(--bs-body-bg);
  border: 1px solid rgba(13, 110, 253, 0.18);
  border-top-left-radius: 4px;
}

[data-bs-theme="dark"] .chat-bubble.bot {
  background: #1e2530;
  border-color: rgba(59, 130, 246, 0.25);
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
  color: #fff;
  border-top-right-radius: 4px;
  box-shadow: 0 2px 6px rgba(13, 110, 253, 0.25);
}

.chat-bubble.user .bubble-header,
.chat-bubble.user .bubble-footer {
  display: none;
}

.chat-bubble .bubble-body p:last-child {
  margin-bottom: 0;
}

.chat-bubble .bubble-body strong {
  color: var(--bs-primary);
}

.chat-bubble.user strong {
  color: #fff;
}

.quick-topics-bar {
  scrollbar-width: thin;
  white-space: nowrap;
}

.quick-topics-bar::-webkit-scrollbar {
  height: 4px;
}

.quick-topics-bar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

.topic-pill {
  font-size: 0.72rem;
  padding: 3px 10px;
  transition: all 0.15s ease;
  border-color: rgba(108, 117, 125, 0.25);
}

.topic-pill:hover {
  background: rgba(13, 110, 253, 0.1);
  color: var(--bs-primary);
  border-color: var(--bs-primary);
  transform: translateY(-1px);
}

.fs-8 { font-size: 0.78rem !important; }
.fs-9 { font-size: 0.70rem !important; }

.lyla-avatar-badge .avatar-icon {
  background: linear-gradient(135deg, #ffffff, #e0e7ff) !important;
}

/* Speaking Wave Pulse */
@keyframes voicePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); filter: brightness(1.2); }
  100% { transform: scale(1); }
}

.speaking-pulse {
  animation: voicePulse 1.2s infinite ease-in-out;
}

/* =========================================================================
   NAVBAR LANGUAGE SWITCHER (ID/EN)
   ========================================================================= */
#langToggleBtn {
  border-radius: 8px;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  user-select: none;
}

/* Light Theme: Default font in black */
html:not([data-bs-theme="dark"]) #langToggleBtn,
[data-bs-theme="light"] #langToggleBtn {
  color: #000000 !important;
  background-color: transparent !important;
  border: 1px solid #000000 !important;
}

html:not([data-bs-theme="dark"]) #langToggleBtn #langLabel,
[data-bs-theme="light"] #langToggleBtn #langLabel {
  color: #000000 !important;
  font-weight: 700;
  transition: color 0.2s ease;
}

/* Light Theme Hover: Cursor move -> Background black, font white */
html:not([data-bs-theme="dark"]) #langToggleBtn:hover,
[data-bs-theme="light"] #langToggleBtn:hover {
  background-color: #000000 !important;
  border-color: #000000 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

html:not([data-bs-theme="dark"]) #langToggleBtn:hover #langLabel,
[data-bs-theme="light"] #langToggleBtn:hover #langLabel {
  color: #ffffff !important;
}

/* Dark Theme: Default font in white/light */
[data-bs-theme="dark"] #langToggleBtn {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

[data-bs-theme="dark"] #langToggleBtn #langLabel {
}

.story-hud-body {
  padding: 1rem;
  max-height: 52vh;
  overflow-y: auto;
}

.story-hud-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.story-hud-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* =========================================================================
   LYLA AI ASSISTANT & VOICE STYLING
   ========================================================================= */
.agent-chat-container {
  display: flex;
  flex-direction: column;
  height: 380px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bs-tertiary-bg);
  scroll-behavior: smooth;
}

.chat-bubble {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.45;
  animation: fadeInBubble 0.2s ease-out;
  word-break: break-word;
}

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

.chat-bubble.bot {
  align-self: flex-start;
  background: var(--bs-body-bg);
  border: 1px solid rgba(13, 110, 253, 0.18);
  border-top-left-radius: 4px;
}

[data-bs-theme="dark"] .chat-bubble.bot {
  background: #1e2530;
  border-color: rgba(59, 130, 246, 0.25);
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
  color: #fff;
  border-top-right-radius: 4px;
  box-shadow: 0 2px 6px rgba(13, 110, 253, 0.25);
}

.chat-bubble.user .bubble-header,
.chat-bubble.user .bubble-footer {
  display: none;
}

.chat-bubble .bubble-body p:last-child {
  margin-bottom: 0;
}

.chat-bubble .bubble-body strong {
  color: var(--bs-primary);
}

.chat-bubble.user strong {
  color: #fff;
}

.quick-topics-bar {
  scrollbar-width: thin;
  white-space: nowrap;
}

.quick-topics-bar::-webkit-scrollbar {
  height: 4px;
}

.quick-topics-bar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

.topic-pill {
  font-size: 0.72rem;
  padding: 3px 10px;
  transition: all 0.15s ease;
  border-color: rgba(108, 117, 125, 0.25);
}

.topic-pill:hover {
  background: rgba(13, 110, 253, 0.1);
  color: var(--bs-primary);
  border-color: var(--bs-primary);
  transform: translateY(-1px);
}

.fs-8 { font-size: 0.78rem !important; }
.fs-9 { font-size: 0.70rem !important; }

.lyla-avatar-badge .avatar-icon {
  background: linear-gradient(135deg, #ffffff, #e0e7ff) !important;
}

/* Speaking Wave Pulse */
@keyframes voicePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); filter: brightness(1.2); }
  100% { transform: scale(1); }
}

.speaking-pulse {
  animation: voicePulse 1.2s infinite ease-in-out;
}

/* =========================================================================
   NAVBAR LANGUAGE SWITCHER (ID/EN)
   ========================================================================= */
#langToggleBtn {
  border-radius: 8px;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  user-select: none;
}

/* Light Theme: Default font in black */
html:not([data-bs-theme="dark"]) #langToggleBtn,
[data-bs-theme="light"] #langToggleBtn {
  color: #000000 !important;
  background-color: transparent !important;
  border: 1px solid #000000 !important;
}

html:not([data-bs-theme="dark"]) #langToggleBtn #langLabel,
[data-bs-theme="light"] #langToggleBtn #langLabel {
  color: #000000 !important;
  font-weight: 700;
  transition: color 0.2s ease;
}

/* Light Theme Hover: Cursor move -> Background black, font white */
html:not([data-bs-theme="dark"]) #langToggleBtn:hover,
[data-bs-theme="light"] #langToggleBtn:hover {
  background-color: #000000 !important;
  border-color: #000000 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

html:not([data-bs-theme="dark"]) #langToggleBtn:hover #langLabel,
[data-bs-theme="light"] #langToggleBtn:hover #langLabel {
  color: #ffffff !important;
}

/* =========================================
   Flores Timelapse — Mobile & Responsive HUD
   ========================================= */
.flores-timelapse-hud,
#map .flores-timelapse-hud,
.map-fullscreen #map .flores-timelapse-hud {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  z-index: 10005 !important;
}

.flores-timelapse-hud .form-range::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  background: #f59e0b;
  border: 2px solid #ffffff;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.8);
  border-radius: 50%;
  cursor: pointer;
}

.flores-timelapse-hud .form-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #f59e0b;
  border: 2px solid #ffffff;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.8);
  border-radius: 50%;
  cursor: pointer;
}

/* Smartphone & Tablet Mobile Optimizations */
@media (max-width: 768px) {
  .flores-timelapse-hud {
    width: calc(100vw - 12px) !important;
    bottom: max(6px, env(safe-area-inset-bottom)) !important;
    border-radius: 14px !important;
    border: 1px solid rgba(245, 158, 11, 0.5) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.9) !important;
    z-index: 10005 !important;
  }

  .fl-mob-btn {
    min-height: 36px;
    min-width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 8px;
  }

  .fl-mob-btn-play {
    min-height: 42px;
    min-width: 44px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5) !important;
  }

  .fl-mob-active-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
  }
}

/* =========================================================================
   ORTHOPHOTO SECTOR BOUNDING POLYGONS (DISASTER RESPONSE)
   No infill color, 100% transparent interior, interactive hover border
   ========================================================================= */
path.ortho-sector-polygon {
  fill: none !important;
  fill-opacity: 0 !important;
  pointer-events: all !important;
  cursor: pointer;
  transition: stroke 0.15s ease, stroke-width 0.15s ease;
}

/* =========================================================================
   MAP BEFORE-AFTER SWIPE & OPACITY COMPARISON SLIDER
   ========================================================================= */
.map-before-after-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.map-swipe-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #00e5ff, #0d6efd, #00e5ff);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.8), 0 0 24px rgba(13, 110, 253, 0.4);
  pointer-events: all;
  cursor: ew-resize;
  transform: translateX(-50%);
  user-select: none;
  touch-action: none;
}

.map-swipe-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid #00e5ff;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 16px rgba(0, 229, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00e5ff;
  font-size: 1rem;
  cursor: ew-resize;
  transition: transform 0.15s ease, background 0.15s ease;
}

.map-swipe-line:hover .map-swipe-handle,
.map-swipe-handle:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(13, 110, 253, 0.95);
  color: #ffffff;
}

.map-swipe-badge {
  position: absolute;
  top: 70px;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 30px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

.map-swipe-badge-before {
  left: 20px;
  background: rgba(15, 23, 42, 0.85);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.map-swipe-badge-after {
  right: 20px;
  background: rgba(13, 110, 253, 0.85);
  color: #ffffff;
  border: 1px solid rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 15px rgba(13, 110, 253, 0.4);
}

/* Floating Bottom Controls HUD */
.map-ba-hud {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 229, 255, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 229, 255, 0.2);
  border-radius: 40px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  z-index: 1005;
}

.map-ba-hud .form-range {
  width: 140px;
  accent-color: #00e5ff;
}

@media (max-width: 768px) {
  .map-ba-hud {
    bottom: 75px;
    width: 90%;
    max-width: 360px;
    justify-content: space-between;
    padding: 6px 14px;
  }
  .map-ba-hud .form-range {
    width: 90px;
  }
}

/* =========================================================================
   BEFORE-AFTER IMAGE COMPARISON SLIDER (STANDALONE & MODAL)
   ========================================================================= */
.ba-compare-box {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  user-select: none;
  touch-action: pan-y;
  background-color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.ba-compare-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ba-before-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  will-change: clip-path;
}

.ba-compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.8);
  cursor: ew-resize;
  transform: translateX(-50%);
  z-index: 20;
}

.ba-compare-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid #00e5ff;
  color: #00e5ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  cursor: ew-resize;
  transition: transform 0.15s ease, background 0.15s ease;
}

.ba-compare-line:hover .ba-compare-btn {
  transform: translate(-50%, -50%) scale(1.15);
  background: #0d6efd;
  color: #ffffff;
}

.ba-label-pill {
  position: absolute;
  top: 15px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 10;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ba-label-left {
  left: 15px;
  background: rgba(15, 23, 42, 0.85);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.ba-label-right {
  right: 15px;
  background: rgba(13, 110, 253, 0.85);
  color: #ffffff;
  border: 1px solid rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 12px rgba(13, 110, 253, 0.4);
}

/* =========================================================================
   LYLA DISASTER CARDS, STORYTELLING & INTERNET LEARNING STYLES
   ========================================================================= */

/* 1. Structured Disaster Card (6 Mandatory Dimensions) */
.disaster-card {
  border-radius: 10px;
  border-left: 4px solid #dc3545;
  background: rgba(220, 53, 69, 0.04);
  padding: 10px 12px;
  margin-top: 6px;
  margin-bottom: 6px;
}

[data-bs-theme="dark"] .disaster-card {
  background: rgba(220, 53, 69, 0.12);
  border-left-color: #ff6b6b;
}

.disaster-header {
  border-bottom: 1px dashed rgba(220, 53, 69, 0.25);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.disaster-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #b02a37;
  display: flex;
  align-items: center;
  gap: 6px;
}

[data-bs-theme="dark"] .disaster-title {
  color: #ff8787;
}

.disaster-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.disaster-row {
  display: flex;
  flex-direction: column;
}

.disaster-label {
  font-weight: 700;
  color: #495057;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.80rem;
}

[data-bs-theme="dark"] .disaster-label {
  color: #adb5bd;
}

.disaster-value {
  margin-left: 20px;
  color: inherit;
}

.btn-fly-disaster {
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 20px;
  padding: 3px 12px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-fly-disaster:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(13, 110, 253, 0.3);
}

/* 2. Historical & Ancient Storytelling Card */
.history-story-card {
  border-radius: 10px;
  border-left: 4px solid #b8860b;
  background: rgba(184, 134, 11, 0.05);
  padding: 10px 12px;
  margin-top: 6px;
  margin-bottom: 6px;
}

[data-bs-theme="dark"] .history-story-card {
  background: rgba(218, 165, 32, 0.1);
  border-left-color: #f1c40f;
}

.history-story-header {
  font-size: 0.92rem;
  font-weight: 700;
  color: #996515;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px dashed rgba(184, 134, 11, 0.25);
  padding-bottom: 5px;
  margin-bottom: 8px;
}

[data-bs-theme="dark"] .history-story-header {
  color: #f1c40f;
}

/* 3. Mountain Name & Legend Card */
.mountain-card {
  border-radius: 10px;
  border-left: 4px solid #fd7e14;
  background: rgba(253, 126, 20, 0.05);
  padding: 10px 12px;
  margin-top: 6px;
  margin-bottom: 6px;
}

[data-bs-theme="dark"] .mountain-card {
  background: rgba(253, 126, 20, 0.12);
  border-left-color: #ffa94d;
}

.mountain-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #d9480f;
  border-bottom: 1px dashed rgba(253, 126, 20, 0.3);
  padding-bottom: 5px;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}

[data-bs-theme="dark"] .mountain-card-title {
  color: #ff922b;
}

/* 3b. Fly For Humanity Humanitarian Mission Card */
.f4h-mission-card {
  border-radius: 10px;
  border-left: 4px solid #0d6efd;
  background: rgba(13, 110, 253, 0.04);
  padding: 10px 12px;
  margin-top: 6px;
  margin-bottom: 6px;
}

[data-bs-theme="dark"] .f4h-mission-card {
  background: rgba(13, 110, 253, 0.12);
  border-left-color: #38bdf8;
}

.f4h-mission-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0b5ed7;
  display: flex;
  align-items: center;
  gap: 6px;
}

[data-bs-theme="dark"] .f4h-mission-title {
  color: #38bdf8;
}

/* 4. Badges & Learning Hub Elements */
.badge-learned-web {
  background: linear-gradient(135deg, #0dcaf0, #0d6efd);
  color: #ffffff;
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-archive {
  background: rgba(108, 117, 125, 0.15);
  color: #6c757d;
  border: 1px solid rgba(108, 117, 125, 0.3);
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

[data-bs-theme="dark"] .badge-archive {
  color: #ced4da;
}

.learning-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(13, 110, 253, 0.25);
  border-top-color: #0d6efd;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.internet-learning-hub-panel {
  border-radius: 8px;
  border: 1px solid rgba(13, 202, 240, 0.3);
  background: rgba(13, 202, 240, 0.05);
}

[data-bs-theme="dark"] .internet-learning-hub-panel {
  background: rgba(13, 202, 240, 0.08);
}

/* 5. Futuristic Neural Thinking & Deep Search Holographic Animation */
.lyla-thinking-bubble {
  position: relative;
  background: rgba(240, 249, 255, 0.95);
  border: 1.5px solid rgba(13, 110, 253, 0.35);
  border-radius: 16px 16px 16px 4px;
  box-shadow: 0 8px 24px rgba(13, 110, 253, 0.15), inset 0 0 12px rgba(13, 202, 240, 0.08);
  padding: 12px 16px;
  margin-bottom: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: thinkingGlow 2.4s ease-in-out infinite alternate;
  overflow: hidden;
}

[data-bs-theme="dark"] .lyla-thinking-bubble {
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), inset 0 0 16px rgba(56, 189, 248, 0.12);
}

@keyframes thinkingGlow {
  0% {
    box-shadow: 0 4px 18px rgba(13, 110, 253, 0.12), inset 0 0 8px rgba(56, 189, 248, 0.05);
    border-color: rgba(56, 189, 248, 0.3);
  }
  100% {
    box-shadow: 0 8px 28px rgba(56, 189, 248, 0.28), inset 0 0 16px rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.6);
  }
}

.lyla-thinking-hologram-beam {
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.18), rgba(168, 85, 247, 0.18), transparent);
  transform: skewX(-25deg);
  animation: hologramScan 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes hologramScan {
  0% { left: -150%; }
  50%, 100% { left: 150%; }
}

.lyla-thinking-avatar-box {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lyla-thinking-halo {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #38bdf8, #818cf8, #c084fc, #06b6d4, #38bdf8);
  animation: rotateAura 2s linear infinite;
  filter: blur(2px);
  opacity: 0.85;
}

@keyframes rotateAura {
  to { transform: rotate(360deg); }
}

.lyla-thinking-orb {
  position: relative;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #38bdf8, #1e3a8a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.95rem;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

.thinking-neural-wave {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.thinking-neural-wave .neural-bar {
  display: inline-block;
  width: 3.5px;
  border-radius: 3px;
  background: linear-gradient(180deg, #38bdf8, #a855f7);
  animation: neuralWaveBounce 1.2s ease-in-out infinite;
}

.thinking-neural-wave .neural-bar:nth-child(1) { height: 8px; animation-delay: 0.0s; }
.thinking-neural-wave .neural-bar:nth-child(2) { height: 16px; animation-delay: 0.15s; }
.thinking-neural-wave .neural-bar:nth-child(3) { height: 22px; animation-delay: 0.3s; }
.thinking-neural-wave .neural-bar:nth-child(4) { height: 14px; animation-delay: 0.45s; }
.thinking-neural-wave .neural-bar:nth-child(5) { height: 9px; animation-delay: 0.6s; }

@keyframes neuralWaveBounce {
  0%, 100% {
    transform: scaleY(0.4);
    opacity: 0.5;
  }
  50% {
    transform: scaleY(1.2);
    opacity: 1;
    filter: drop-shadow(0 0 4px #38bdf8);
  }
}

.thinking-step-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(56, 189, 248, 0.15);
  color: #0284c7;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

[data-bs-theme="dark"] .thinking-step-badge {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.thinking-step-main {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}

[data-bs-theme="dark"] .thinking-step-main {
  color: #f1f5f9;
}

.thinking-step-sub {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 2px;
}

[data-bs-theme="dark"] .thinking-step-sub {
  color: #94a3b8;
}

/* =========================================================================
   INA-SIAM BMKG AVIATION & METEOROLOGICAL VISUAL STYLES
   ========================================================================= */

/* Top Satellite Thumbnail Button (Top-Right) */
.inasiam-top-satellite-selector {
  position: fixed;
  top: 75px;
  right: 18px;
  z-index: 10005;
}

.satelit-thumb-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 4px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease;
}

.satelit-thumb-btn:hover {
  border-color: #38bdf8;
  transform: translateY(-2px);
}

.satelit-thumb-img {
  width: 44px;
  height: 32px;
  border-radius: 4px;
  background: linear-gradient(135deg, #0ea5e9, #059669, #eab308, #dc2626);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.5);
}

.satelit-thumb-btn span {
  font-size: 0.65rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.5px;
}

/* Krakatau VONA Alert Banner */
.inasiam-krakatau-alert-banner {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: min(780px, calc(100vw - 32px));
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(239, 68, 68, 0.6);
  border-radius: 12px;
  z-index: 10004;
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.25);
  animation: slideDownBanner 0.3s ease-out;
}

@keyframes slideDownBanner {
  from { transform: translate(-50%, -20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* Bottom Center Timeline Player Pill (Matching screenshot) */
.inasiam-bottom-player-pill {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(580px, calc(100vw - 28px));
  background: rgba(13, 20, 36, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50px;
  z-index: 10005;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 16px rgba(56, 189, 248, 0.1);
  padding: 4px;
}

.btn-inasiam-player {
  background: transparent;
  border: none;
  color: #94a3b8;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s;
  font-size: 0.8rem;
}

.btn-inasiam-player:hover {
  color: #ffffff;
}

.btn-inasiam-play-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #0284c7;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.8);
  transition: all 0.2s ease;
}

.btn-inasiam-play-circle:hover {
  background: #0369a1;
  transform: scale(1.06);
}

.btn-inasiam-play-circle.playing {
  background: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.8);
}

.inasiam-time-display {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}

.inasiam-time-display .time-main {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.inasiam-time-display .time-sub {
  font-size: 0.65rem;
  color: #94a3b8;
}

.inasiam-date-label {
  font-size: 0.72rem;
  color: #cbd5e1;
  padding-right: 4px;
}

.inasiam-slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.inasiam-timeline-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  outline: none;
}

.inasiam-timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2px solid #ffffff;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.9);
  cursor: pointer;
}

.inasiam-timeline-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2px solid #ffffff;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.9);
  cursor: pointer;
}

.btn-inasiam-live-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 4px 10px;
  color: #ffffff;
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-inasiam-live-badge:hover,
.btn-inasiam-live-badge.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
}

.live-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: livePulseAnim 1.5s infinite;
}

@keyframes livePulseAnim {
  0% { transform: scale(0.9); opacity: 0.9; }
  50% { transform: scale(1.3); opacity: 0.4; }
  100% { transform: scale(0.9); opacity: 0.9; }
}

/* Bottom Right Action Controls Pill (+, -, compass, pin, fullscreen) */
.inasiam-bottom-right-controls {
  position: fixed;
  bottom: 24px;
  right: 20px;
  background: rgba(13, 20, 36, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  display: flex;
  align-items: center;
  padding: 4px 6px;
  gap: 2px;
  z-index: 10005;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.btn-inasiam-ctrl {
  background: transparent;
  border: none;
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.btn-inasiam-ctrl:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.btn-inasiam-ctrl.active {
  color: #ef4444;
}

/* Krakatau Beacon (Selat Sunda) */
.inasiam-krakatau-beacon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.beacon-core {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.95);
  z-index: 2;
  cursor: pointer;
}

.beacon-pulse {
  position: absolute;
  top: 0;
  left: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.6);
  animation: beaconPulseAnim 1.8s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1;
}

@keyframes beaconPulseAnim {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(3.2); opacity: 0; }
}

.beacon-label {
  margin-top: 2px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  white-space: nowrap;
}

/* Ash Plume Directional Arrow */
.inasiam-ash-arrow {
  color: #ffffff;
  font-size: 14px;
  text-shadow: 0 0 6px #ef4444;
  opacity: 0.9;
}

/* FIR Airspace Label */
.inasiam-fir-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  opacity: 0.75;
  letter-spacing: 1px;
  white-space: nowrap;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9);
}

/* Dense Weather Station Dot Markers */
.inasiam-stn-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.inasiam-stn-dot:hover {
  transform: scale(2.2);
  border-color: #ffffff;
}

.inasiam-stn-dot.vfr { background-color: #10b981 !important; box-shadow: 0 0 6px #10b981; }
.inasiam-stn-dot.mvfr { background-color: #f59e0b !important; box-shadow: 0 0 6px #f59e0b; }
.inasiam-stn-dot.ifr { background-color: #ef4444 !important; box-shadow: 0 0 6px #ef4444; }

/* Ash Popup */
.inasiam-ash-popup {
  color: #f8fafc;
  line-height: 1.4;
}

@media (max-width: 768px) {
  /* ---- INA-SIAM: Bottom Player Pill ---- */
  .inasiam-bottom-player-pill {
    width: calc(100vw - 16px) !important;
    bottom: env(safe-area-inset-bottom, 8px) !important;
    bottom: 8px !important;
    border-radius: 16px !important;
    padding: 2px !important;
  }
  .inasiam-bottom-player-pill > div {
    gap: 6px !important;
    padding: 4px 8px !important;
  }
  /* Hide redundant date label on small screens — time is enough */
  .inasiam-date-label {
    display: none !important;
  }
  /* Shrink play circle slightly */
  .btn-inasiam-play-circle {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.8rem !important;
  }
  /* Shrink time display */
  .inasiam-time-display .time-main {
    font-size: 0.75rem !important;
  }
  .inasiam-time-display .time-sub {
    font-size: 0.6rem !important;
  }
  /* Hide redundant right-side controls pill */
  .inasiam-bottom-right-controls {
    display: none !important;
  }
  /* ---- INA-SIAM: Alert Banner ---- */
  .inasiam-krakatau-alert-banner {
    top: 56px !important;
    border-radius: 10px !important;
  }
  .inasiam-krakatau-alert-banner .small {
    font-size: 0.72rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  /* ---- INA-SIAM: Lapisan Data Panel → full-width bottom sheet on mobile ---- */
  .inasiam-lapisan-data-panel {
    top: auto !important;
    bottom: 70px !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-height: 65vh !important;
    border-radius: 18px 18px 0 0 !important;
    border-bottom: none !important;
  }
  /* ---- INA-SIAM: Top satellite thumb — shift down to clear navbar ---- */
  .inasiam-top-satellite-selector {
    top: 60px !important;
    right: 10px !important;
  }
  .satelit-thumb-img {
    width: 36px !important;
    height: 26px !important;
  }
}

/* =========================================================================
   LAPISAN DATA FLOATING CONTROL PANEL (Matching BMKG INA-SIAM)
   ========================================================================= */

.inasiam-lapisan-data-panel {
  position: fixed;
  top: 75px;
  right: 74px;
  width: 290px;
  background: rgba(18, 20, 24, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 1px rgba(255, 255, 255, 0.2);
  z-index: 10006;
  color: #f8fafc;
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.inasiam-lapisan-data-panel.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.inasiam-lapisan-data-panel.closed {
  display: none !important;
  opacity: 0;
  transform: translateY(-8px);
}

.lapisan-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-lapisan-toggle {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s;
}

.btn-lapisan-toggle:hover {
  color: #ffffff;
}

.lapisan-body {
  max-height: 480px;
  overflow-y: auto;
}

/* iOS Style Switch */
.switch-ios {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  margin-bottom: 0;
}

.switch-ios input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-ios {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 20px;
}

.slider-ios:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.switch-ios input:checked + .slider-ios {
  background-color: #0284c7;
}

.switch-ios input:checked + .slider-ios:before {
  transform: translateX(16px);
}

.badge-checked-green {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #10b981;
  color: #10b981;
  font-size: 8px;
}

/* Custom Select Trigger */
.custom-inasiam-select {
  background: rgba(30, 34, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 5px 8px;
  color: #ffffff;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.15s;
}

.custom-inasiam-select:hover {
  border-color: rgba(56, 189, 248, 0.6);
}

/* Custom Dropdown Menu */
.custom-inasiam-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 160px;
  background: #111419;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
  z-index: 10010;
  padding: 4px 0;
  max-height: 220px;
  overflow-y: auto;
}

.custom-inasiam-dropdown-menu.show {
  display: block;
}

.custom-inasiam-dropdown-menu .dropdown-opt {
  padding: 6px 10px;
  font-size: 0.75rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background 0.1s;
}

.custom-inasiam-dropdown-menu .dropdown-opt:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #ffffff;
}

.custom-inasiam-dropdown-menu .dropdown-opt.active {
  color: #38bdf8;
  font-weight: 700;
}

/* Satellite Temperature Gradient Bar */
.sat-temp-gradient-bar {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #22c55e, #38bdf8, #2563eb, #1e40af);
}

.btn-info-icon {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 0;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-info-icon:hover {
  color: #38bdf8;
}

/* Mini Weather Badges */
.badge-mini-wx {
  background: rgba(30, 34, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.badge-mini-wx.active {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.dot-green {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #22c55e;
}

.dot-orange {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f97316;
}

/* Lightning Gradient Bar */
.lightning-gradient-bar {
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, #06b6d4 0%, #3b82f6 40%, #ef4444 80%, #78350f 100%);
}

.btn-sound-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.85rem;
}

/* Lightning Map Bolt */
.inasiam-lightning-bolt {
  font-size: 14px;
  text-shadow: 0 0 6px currentColor;
  animation: lightningFlicker 1.2s infinite;
}

@keyframes lightningFlicker {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}

/* =========================================
   REAL-TIME DISASTER BEACONS & PULSE EFFECTS
   ========================================= */
.live-pulse-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(239, 68, 68, 0.7);
  animation: liveDotPulse 1.8s infinite;
}

@keyframes liveDotPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 7px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.spinning {
  animation: spinSlow 1s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Custom Volcano Danger Beacon (Level IV AWAS) */
.custom-volcano-danger-div {
  background: transparent;
  border: none;
}

.volcano-danger-beacon {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #dc3545;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 0 0 14px rgba(220, 53, 69, 0.9);
  border: 2px solid #ffffff;
  cursor: pointer;
  animation: beaconPulseRed 1.6s infinite ease-in-out;
}

.volcano-danger-beacon::after {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  border: 2px solid #dc3545;
  animation: radarWave 1.8s infinite linear;
  pointer-events: none;
}

/* Custom Volcano Warning Beacon (Level III SIAGA) */
.volcano-warning-beacon {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fd7e14;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 0 10px rgba(253, 126, 20, 0.8);
  border: 2px solid #ffffff;
  cursor: pointer;
  animation: beaconPulseOrange 2s infinite ease-in-out;
}

@keyframes beaconPulseRed {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.15); filter: brightness(1.25); }
}

@keyframes beaconPulseOrange {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.1); filter: brightness(1.2); }
}

@keyframes radarWave {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* Emergency Danger Popups */
.volcano-danger-popup .leaflet-popup-tip {
  background: #dc3545;
}

/* =========================================
   COMPREHENSIVE SMARTPHONE COMPACT LAYOUT
   Covers all pages: cuaca-radar-satelit,
   fly-for-humanity, peta-gempa, banjir, etc.
   ========================================= */

@media (max-width: 768px) {

  /* ---- Navbar: compact on mobile ---- */
  .app-header {
    padding: 0 !important;
  }
  .app-header .container-fluid {
    padding-left: 8px !important;
    padding-right: 8px !important;
    gap: 4px;
  }
  /* Hide search on very small screens */
  #navSearchForm {
    display: none !important;
  }
  /* Compact notification/theme/login buttons */
  #notifDropdown,
  #themeToggleBtn,
  #loginTrigger {
    padding: 0.25rem 0.35rem !important;
    font-size: 0.8rem !important;
  }
  /* Reduce gap between right nav items */
  .app-header .navbar-nav.ms-auto {
    gap: 2px !important;
  }

  /* ---- Sidebar: hidden on mobile, shown as overlay on toggle ---- */
  .app-sidebar {
    z-index: 1050 !important;
  }

  /* ---- App Content Header ---- */
  .app-content-header {
    padding: 0.5rem 0.75rem !important;
  }
  .app-content-header h3,
  .app-content-header h2 {
    font-size: 1rem !important;
    margin-bottom: 0 !important;
  }
  #pageTitle {
    font-size: 0.95rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60vw;
  }

  /* ---- Map Card: fill viewport below navbar ---- */
  #mapCard {
    margin-bottom: 0 !important;
    border-radius: 0 !important;
  }
  #mapCard .card-header {
    padding: 4px 8px !important;
    flex-wrap: nowrap;
    min-height: 40px;
  }
  #mapCard .card-title {
    font-size: 0.85rem !important;
    white-space: nowrap;
  }
  #mapCard .card-body {
    height: calc(100dvh - 96px) !important;
    min-height: 300px !important;
    max-height: none !important;
  }

  /* ---- Map Toolbar: horizontal scroll, no wrap ---- */
  .map-toolbar {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .map-toolbar::-webkit-scrollbar { display: none; }
  .map-toolbar .btn {
    font-size: 0.7rem !important;
    padding: 0.25rem 0.5rem !important;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .map-toolbar .btn [data-i18n],
  .map-toolbar .btn-text {
    display: none; /* icon-only on mobile — hide text labels */
  }
  .map-toolbar .vr {
    height: 16px !important;
    margin: 0 2px !important;
  }

  /* ---- Status Bar: ultra-compact ---- */
  .status-bar {
    height: 26px !important;
    font-size: 0.65rem !important;
    padding: 0 6px !important;
    overflow: hidden;
  }
  .status-bar .status-item:nth-child(n+4) {
    display: none; /* show only first 3 items on mobile */
  }

  /* ---- Earthquake Panel: proper bottom sheet ---- */
  .earthquake-panel {
    top: auto !important;
    bottom: 6px !important;
    left: 6px !important;
    right: 6px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 48vh !important;
    border-radius: 14px !important;
  }
  .eq-panel-list {
    max-height: 28vh !important;
  }

  /* ---- Volcano Warning HUD: compact banner ---- */
  #volcanoWarningHud {
    top: 56px !important;
    left: 6px !important;
    right: 6px !important;
    width: auto !important;
    max-width: none !important;
    font-size: 0.72rem !important;
    padding: 6px 10px !important;
  }
  #volcanoWarningHud h6,
  #volcanoWarningHud .volcano-hud-title {
    font-size: 0.8rem !important;
  }

  /* ---- Volcano Panel (sidebar): bottom sheet ---- */
  #volcanoPanel {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 55vh !important;
    border-radius: 16px 16px 0 0 !important;
    overflow-y: auto;
  }

  /* ---- Flores Ortho HUD Panel ---- */
  #floresOrthoHudPanel {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 60vh !important;
    border-radius: 16px 16px 0 0 !important;
    overflow-y: auto;
  }

  /* ---- Flood / Wildfire panel ---- */
  .flood-panel,
  .wildfire-panel {
    top: auto !important;
    bottom: 6px !important;
    left: 6px !important;
    right: 6px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 50vh !important;
    border-radius: 14px !important;
  }

  /* ---- Modals: edge-to-edge ---- */
  .modal-dialog {
    margin: 0.25rem !important;
    max-width: calc(100% - 0.5rem) !important;
  }
  .modal-content {
    border-radius: 16px !important;
  }
  .modal-header {
    padding: 0.6rem 1rem !important;
  }
  .modal-body {
    padding: 0.75rem 1rem !important;
    max-height: 72vh;
    overflow-y: auto;
  }

  /* ---- Toast notifications: bottom center ---- */
  #toastContainer {
    bottom: 80px !important;
    top: auto !important;
    right: 8px !important;
    left: 8px !important;
    width: auto !important;
  }
  #toastContainer .toast {
    min-width: unset !important;
    width: 100%;
    font-size: 0.8rem;
  }

  /* ---- App Footer: hidden on mobile to save space ---- */
  .app-footer {
    display: none !important;
  }

  /* ---- Agent Chat Panel ---- */
  .agent-chat-container {
    height: 180px !important;
  }

  /* ---- Leaflet Controls: larger touch targets ---- */
  .leaflet-touch .leaflet-bar a {
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 15px !important;
  }
  .leaflet-control-zoom {
    margin-bottom: 80px !important; /* avoid overlap with bottom pill */
  }
}

/* ---- Extra Small (< 480px): maximum compactness ---- */
@media (max-width: 480px) {
  .app-content-header {
    padding: 0.35rem 0.5rem !important;
  }
  #mapCard .card-body {
    height: calc(100dvh - 88px) !important;
  }
  .inasiam-bottom-player-pill {
    border-radius: 12px !important;
  }
  .btn-inasiam-live-badge span:last-child {
    display: none; /* hide "LIVE" text, keep dot only */
  }
  .btn-inasiam-player {
    width: 24px !important;
    height: 24px !important;
  }
  /* Hide map toolbar text labels */
  .map-toolbar .d-none-xs { display: none !important; }
}

/* =========================================================================
   F4H MISSION-READY LANDING PAGE REDESIGN STYLES
   ========================================================================= */

/* Hero Dynamic Metrics Panel */
.f4h-metrics-panel {
  background: rgba(8, 17, 34, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 16px;
  padding: 1.4rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.f4h-metric-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 0;
}
.f4h-metric-item:first-child {
  padding-top: 0;
}
.f4h-metric-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.f4h-metric-val {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.f4h-metric-lbl {
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.7);
  animation: livePulseAnim 1.8s infinite;
}

@keyframes livePulseAnim {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Telemetry Operations Grid */
.f4h-ops-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 991.98px) {
  .f4h-ops-grid {
    grid-template-columns: 1fr;
  }
}

.f4h-ops-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.25rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.f4h-ops-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
}

.f4h-ops-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

/* UAV Before & After Showcase Slider */
.f4h-ba-showcase {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.f4h-sector-tabs-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.f4h-sector-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  border-radius: 100px;
  padding: 0.4rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.f4h-sector-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.4);
}

.f4h-sector-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4);
}

.f4h-ba-canvas {
  position: relative;
  width: 100%;
  height: 520px;
  min-height: 380px;
  overflow: hidden;
  background: #030712;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}

@media (max-width: 767.98px) {
  .f4h-ba-canvas {
    height: 360px;
  }
}

.f4h-ba-canvas img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.f4h-ba-before-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: inset(0 50% 0 0);
  pointer-events: none;
  transition: none;
}

.f4h-ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffffff;
  left: 50%;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.85);
}

.f4h-ba-handle-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(15, 23, 42, 0.92);
  border: 2px solid #00d2ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00d2ff;
  font-size: 0.95rem;
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.65);
}

.f4h-ba-badge {
  position: absolute;
  top: 1rem;
  z-index: 5;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.f4h-ba-badge-left {
  left: 1rem;
  border-color: rgba(56, 189, 248, 0.4);
}

.f4h-ba-badge-right {
  right: 1rem;
  border-color: rgba(245, 158, 11, 0.4);
}

/* Quick-Query Bar (Lyla AI) */
.f4h-ai-bar {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(99, 102, 241, 0.05));
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
}

.f4h-ai-input-group {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(10, 15, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  padding: 0.35rem 0.5rem 0.35rem 1.2rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.f4h-ai-input-group:focus-within {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.f4h-ai-input {
  background: transparent;
  border: none;
  color: #ffffff;
  outline: none;
  width: 100%;
  font-size: 0.92rem;
}

.f4h-ai-input::placeholder {
  color: #64748b;
  font-size: 0.85rem;
}

.f4h-ai-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  border-radius: 100px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.f4h-ai-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

/* Floating AI Launcher */
#lylaFloatingLauncher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1070;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  padding: 0.65rem 1.1rem 0.65rem 0.75rem;
  border-radius: 100px;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.45);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#lylaFloatingLauncher:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.6);
  color: #ffffff;
}

.lyla-float-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

/* Pilot Hub Section */
.f4h-protocol-step {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  height: 100%;
  transition: border-color 0.2s ease;
}

.f4h-protocol-step:hover {
  border-color: rgba(56, 189, 248, 0.3);
}

.f4h-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
}

/* =========================================
   LIGHT THEME OVERRIDES (Full Portal Support)
   Active when html[data-bs-theme="light"] or body:not(.dark-mode)
   ========================================= */
html[data-bs-theme="light"],
html[data-bs-theme="light"] body,
body:not(.dark-mode) {
  --app-text-primary: #0f172a;
  --app-text-secondary: #334155;
  --app-text-muted: #64748b;
  --app-card-bg: #ffffff;
  --app-card-border: #e2e8f0;
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

html[data-bs-theme="light"] .app-main,
body:not(.dark-mode) .app-main {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

html[data-bs-theme="light"] .app-header.navbar,
body:not(.dark-mode) .app-header.navbar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

html[data-bs-theme="light"] .app-header.navbar .nav-link,
body:not(.dark-mode) .app-header.navbar .nav-link {
  color: #334155 !important;
}

html[data-bs-theme="light"] .app-header.navbar .nav-link:hover,
body:not(.dark-mode) .app-header.navbar .nav-link:hover {
  color: #0284c7 !important;
}

html[data-bs-theme="light"] .f4h-product-nav a,
body:not(.dark-mode) .f4h-product-nav a {
  color: #475569 !important;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
}

html[data-bs-theme="light"] .f4h-product-nav a:hover,
body:not(.dark-mode) .f4h-product-nav a:hover {
  color: #0284c7 !important;
  border-color: #0284c7 !important;
}

html[data-bs-theme="light"] .app-sidebar,
body:not(.dark-mode) .app-sidebar {
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
}

html[data-bs-theme="light"] .app-sidebar .brand-link,
body:not(.dark-mode) .app-sidebar .brand-link {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

html[data-bs-theme="light"] .app-sidebar .brand-text,
body:not(.dark-mode) .app-sidebar .brand-text {
  color: #0f172a !important;
}

html[data-bs-theme="light"] .f4h-ops-card,
body:not(.dark-mode) .f4h-ops-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

html[data-bs-theme="light"] .f4h-ops-card strong.text-white,
body:not(.dark-mode) .f4h-ops-card strong.text-white {
  color: #0f172a !important;
}

html[data-bs-theme="light"] .f4h-ops-card .text-light,
body:not(.dark-mode) .f4h-ops-card .text-light {
  color: #334155 !important;
}

html[data-bs-theme="light"] .f4h-ba-showcase,
body:not(.dark-mode) .f4h-ba-showcase {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

html[data-bs-theme="light"] .f4h-ba-showcase h3.text-white,
body:not(.dark-mode) .f4h-ba-showcase h3.text-white {
  color: #0f172a !important;
}

html[data-bs-theme="light"] .f4h-sector-btn,
body:not(.dark-mode) .f4h-sector-btn {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

html[data-bs-theme="light"] .f4h-sector-btn.active,
body:not(.dark-mode) .f4h-sector-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

html[data-bs-theme="light"] .f4h-pilot-card,
body:not(.dark-mode) .f4h-pilot-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

html[data-bs-theme="light"] .f4h-pilot-card h3.text-white,
body:not(.dark-mode) .f4h-pilot-card h3.text-white {
  color: #0f172a !important;
}

html[data-bs-theme="light"] .f4h-protocol-step,
body:not(.dark-mode) .f4h-protocol-step {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

html[data-bs-theme="light"] .f4h-protocol-step strong.text-white,
body:not(.dark-mode) .f4h-protocol-step strong.text-white {
  color: #0f172a !important;
}

html[data-bs-theme="light"] .glass-card,
body:not(.dark-mode) .glass-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

html[data-bs-theme="light"] .glass-card h2.text-white,
html[data-bs-theme="light"] .glass-card h3.text-white,
html[data-bs-theme="light"] .glass-card h4.text-white,
html[data-bs-theme="light"] .glass-card h5.text-white,
body:not(.dark-mode) .glass-card h2.text-white,
body:not(.dark-mode) .glass-card h3.text-white,
body:not(.dark-mode) .glass-card h4.text-white,
body:not(.dark-mode) .glass-card h5.text-white {
  color: #0f172a !important;
}

html[data-bs-theme="light"] .partner-logo-item,
body:not(.dark-mode) .partner-logo-item {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

html[data-bs-theme="light"] footer,
body:not(.dark-mode) footer {
  background: #f1f5f9 !important;
  border-top: 1px solid #e2e8f0 !important;
  color: #64748b !important;
}

html[data-bs-theme="light"] footer h6.text-white,
html[data-bs-theme="light"] footer span.text-white,
body:not(.dark-mode) footer h6.text-white,
body:not(.dark-mode) footer span.text-white {
  color: #0f172a !important;
}

/* Compact dashboard on phones; roomy touch layout on tablets. */
.f4h-mobile-nav { display: none; }
@media (max-width: 991.98px) {
  .app-main, .app-content, .app-content > .container-fluid { min-width: 0; }
  .app-header .nav-link { min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .app-sidebar { max-width: min(290px, 85vw); }
  .f4h-ops-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .f4h-ops-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .f4h-command-grid { gap: 1rem; padding: 1.25rem; }
  .f4h-metrics-panel { padding: 1rem; }
  .chat-input-area input, .f4h-ai-input { min-width: 0; font-size: 16px; }
  .chat-input-area button, .f4h-ai-input-group button, .topic-pill { min-height: 44px; }
  #agentCard { scroll-margin-top: 65px; }
  #agentCard .agent-chat-container { height: clamp(320px, 55dvh, 600px) !important; }
  #agentChatMessages { min-height: 0; overscroll-behavior: contain; }
  .map-toolbar .btn { min-width: 44px; min-height: 44px; }
  #mapCard .card-header { flex-wrap: wrap; }
  #mapCard .card-body { height: 65dvh !important; min-height: 280px !important; }
  #lylaSourceList, #lylaQuickAnswer, .chat-bubble { overflow-wrap: anywhere; }
}
@media (max-width: 767.98px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .app-main { padding-bottom: 8px; }
  .app-content > .container-fluid { padding-inline: 10px; }
  .app-header .container-fluid { flex-wrap: nowrap; }
  .app-header .navbar-nav { flex-shrink: 0; }
  .app-header .brand-text { padding-inline: 4px; font-size: .8rem; }
  .app-header .brand-text img { width: 22px !important; }
  .f4h-mobile-nav {
    position: fixed; inset: auto 0 0; z-index: 1035;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
    background: var(--bs-body-bg, #0f172a); border-top: 1px solid var(--bs-border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .15);
  }
  .f4h-mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; min-height: 48px; color: var(--bs-body-color); font-size: .68rem; text-decoration: none; border-radius: 10px; }
  .f4h-mobile-nav a i { font-size: 1.1rem; }
  .f4h-mobile-nav a:hover, .f4h-mobile-nav a[aria-current], .f4h-mobile-nav a:focus-visible { color: #38bdf8; background: rgba(14, 165, 233, .12); }
  .f4h-mobile-nav a:focus-visible { outline: 2px solid #38bdf8; outline-offset: -2px; }
  .f4h-homepage .app-content-header { display: none; }
  .f4h-command-hero { border-radius: 12px; }
  .f4h-command-grid { padding: 1rem; gap: .9rem; }
  .f4h-command-hero h1 { font-size: clamp(1.5rem, 6vw, 2rem); line-height: 1.12; }
  .f4h-command-copy { font-size: .82rem; margin-block: .7rem; }
  .f4h-eyebrow { font-size: .65rem; letter-spacing: .04em; }
  .f4h-command-grid .btn { padding: .65rem .8rem !important; min-height: 44px; font-size: .78rem !important; }
  .f4h-command-grid > div > .d-flex { gap: .5rem !important; }
  .f4h-metrics-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: .75rem; gap: .5rem; }
  .f4h-metrics-panel > :not(.f4h-metric-item) { grid-column: 1 / -1; }
  .f4h-metric-item { border: 0; padding: 0; min-width: 0; }
  .f4h-metric-val { font-size: 1rem; }
  .f4h-metric-lbl { font-size: .6rem; letter-spacing: .02em; overflow-wrap: anywhere; }
  .f4h-ops-card { padding: .75rem; border-radius: 12px; }
  .f4h-ops-header { gap: .3rem; flex-wrap: wrap; margin-bottom: .5rem; }
  .f4h-ops-card .fs-3 { font-size: 1.35rem !important; }
  #live-ops h2 { font-size: 1rem !important; }
  .f4h-ai-bar { padding: 1rem !important; }
  .f4h-ai-input-group { padding: .4rem .5rem; }
  .f4h-ai-input-group button { padding-inline: .85rem !important; }
  .f4h-ai-chip { min-height: 44px; }
  .f4h-ba-canvas { height: 260px; min-height: 240px; }
  #lylaFloatingLauncher { display: none !important; }
  #agentCard .chat-bubble { max-width: 95%; font-size: .85rem; padding: 9px 11px; }
  #agentCard .card-header { gap: .5rem; flex-wrap: wrap; }
  #agentCard .chat-messages { padding: .75rem !important; }
  #agentCard .topic-pill { flex: 0 0 auto; }
  #agentCard .chat-input-area { padding-bottom: max(.5rem, env(safe-area-inset-bottom)) !important; }
  .earthquake-panel { max-height: 43dvh !important; }
  .eq-panel-list { max-height: 25dvh !important; }
  .inasiam-bottom-player-pill, .inasiam-bottom-right-controls { bottom: 8px !important; }
  .modal-dialog { margin-bottom: calc(72px + env(safe-area-inset-bottom)) !important; }
  .form-control, .form-select { font-size: 16px; }
}
@media (max-width: 379.98px) {
  .app-header .brand-text span { display: none; }
  .f4h-ops-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .live-pulse-dot { animation: none; }
  .chat-messages { scroll-behavior: auto; }
}

@media (max-width: 991.98px) {
  .f4h-workspace #heroBanner, .f4h-workspace #live-intelligence { display: none; }
  .f4h-workspace #mapCard { scroll-margin-top: 60px; }
}
@media (max-width: 767.98px) {
  .app-header .f4h-mobile-brand, .app-header .f4h-mobile-brand .brand-text { display: flex !important; }
  .f4h-workspace .quick-topics-bar { flex-wrap: nowrap !important; overflow-x: auto; }
}

.f4h-drawer-backdrop { display: none; }
@media (max-width: 991.98px) {
  .f4h-drawer-open { overflow: hidden; }
  .f4h-drawer-open .app-sidebar { width: min(290px, 85vw) !important; transform: none !important; margin-left: 0 !important; left: 0 !important; }
  .f4h-drawer-open .app-sidebar .nav-link p, .f4h-drawer-open .app-sidebar .brand-text { display: inline !important; width: auto !important; opacity: 1 !important; visibility: visible !important; }
  .f4h-drawer-open .sidebar-wrapper { height: calc(100dvh - 65px); overflow-y: auto; }
  .f4h-drawer-open .sidebar-menu .nav-link { min-height: 44px; }
  .f4h-drawer-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 1045; border: 0; background: rgba(0, 0, 0, .55); }
}
@media (max-width: 767.98px) {
  .app-main { padding-bottom: calc(90px + env(safe-area-inset-bottom)) !important; }
  #agentChatInput { min-height: 44px; }
  #agentCard { scroll-margin-bottom: calc(80px + env(safe-area-inset-bottom)); }
  #mapCard .card-header > .d-flex:first-child button { min-height: 44px; padding: .4rem .5rem; }
}
