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

:root {
  --bg-deep: #f0f4f8;
  --bg-surface: rgba(255, 255, 255, 0.45);
  --bg-card: rgba(255, 255, 255, 0.85);
  --border-glass: rgba(0, 0, 0, 0.08);
  --glow-cyan: rgba(2, 136, 209, 0.1);
  
  --primary: #0288d1;
  --primary-glow: #03a9f4;
  --accent: #d81b60;
  
  --success: #2e7d32;
  --warning: #ef6c00;
  
  --success-marker: #2e7d32;
  --warning-marker: #ef6c00;
  --danger-marker: #c62828;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --font-main: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(at 0% 0%, rgba(224, 242, 254, 0.6) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(2, 136, 209, 0.05) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(216, 27, 96, 0.03) 0px, transparent 50%);
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Glassmorphism Classes */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.04);
}

.glass-interactive {
  composes: glass;
  transition: var(--transition);
}

.glass-interactive:hover {
  border-color: rgba(2, 136, 209, 0.3);
  box-shadow: 0 10px 25px rgba(2, 136, 209, 0.1);
  transform: translateY(-2px);
}

/* Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 20px;
  max-width: 1600px;
  margin: 0 auto;
  gap: 20px;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 24px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 10px rgba(2, 136, 209, 0.3);
}

.logo-text h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.logo-text p {
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.filter-box {
  padding: 6px 12px; 
  border-radius: 8px; 
  font-size: 0.9rem; 
  display: flex; 
  align-items: center; 
  gap: 8px;
}

.filter-box label {
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

.filter-box input, .filter-box select {
  padding: 4px 8px !important;
  font-size: 0.85rem !important;
  width: auto !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  background: #fff !important;
  color: var(--text-primary) !important;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(46, 125, 50, 0.08);
  border: 1px solid rgba(46, 125, 50, 0.15);
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.live-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  flex: 1;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* KPI Cards Row */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.kpi-card {
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.kpi-card.accent::before { background: var(--accent); }
.kpi-card.success::before { background: var(--success); }
.kpi-card.warning::before { background: var(--warning); }

.kpi-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 5px;
  letter-spacing: 0.02em;
}

.kpi-val {
  font-size: 2.1rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1.1;
  color: var(--text-primary);
}

.kpi-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* Map Panel */
.map-container {
  height: 480px;
  position: relative;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  border-radius: 15px;
  z-index: 1;
  background: #e5edf5;
}

/* Leaflet Light Theme Overrides */
.leaflet-container {
  background-color: #e5edf5 !important;
}
.leaflet-bar a {
  background-color: rgba(255, 255, 255, 0.9) !important;
  color: var(--text-primary) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}
.leaflet-bar a:hover {
  background-color: var(--primary) !important;
  color: #fff !important;
}
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15) !important;
}

.map-legend {
  padding: 8px 14px; 
  font-size: 0.8rem; 
  border-radius: 8px; 
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* Custom DivIcon Pulsing Markers (Light Map Adaptation) */
.map-pulsing-marker {
  position: absolute !important;
}
.marker-pin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--success-marker);
  border: 2px solid #fff;
  position: absolute;
  top: -8px;
  left: -8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.marker-pulse {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(46, 125, 50, 0.25);
  position: absolute;
  top: -16px;
  left: -16px;
  animation: marker-pulse-anim 1.5s ease-out infinite;
}

.map-pulsing-marker.normal .marker-pin { background: var(--success-marker); }
.map-pulsing-marker.normal .marker-pulse { background: rgba(46, 125, 50, 0.25); }

.map-pulsing-marker.warning .marker-pin { background: var(--warning-marker); }
.map-pulsing-marker.warning .marker-pulse { background: rgba(239, 108, 0, 0.25); }

.map-pulsing-marker.danger .marker-pin { background: var(--danger-marker); }
.map-pulsing-marker.danger .marker-pulse { background: rgba(198, 40, 40, 0.25); }

@keyframes marker-pulse-anim {
  0% { transform: scale(0.1); opacity: 0; }
  50% { opacity: 0.5; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Charts Panel */
.charts-row {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
}

@media (max-width: 800px) {
  .charts-row {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.chart-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-primary);
  border-left: 4px solid var(--primary);
  padding-left: 10px;
}

.chart-wrapper {
  flex: 1;
  position: relative;
  min-height: 250px;
}

/* Sidebar Live Monitor Panels */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-panel {
  padding: 20px;
  display: flex;
  flex-direction: column;
  max-height: 480px;
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-title-badge {
  font-size: 0.75rem;
  background: rgba(2, 136, 209, 0.08);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.list-container {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

/* Live Feed / Active Cards Item */
.active-site-card {
  padding: 12px 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0,0,0,0.01);
}

.active-site-card:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(2, 136, 209, 0.2);
  box-shadow: 0 4px 12px rgba(2, 136, 209, 0.08);
}

.active-site-details .site-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.active-site-details .center-name {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.diver-count-badge {
  background: rgba(2, 136, 209, 0.08);
  color: var(--primary);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(2, 136, 209, 0.15);
}

/* Live Ticker Card */
.ticker-card {
  padding: 12px 14px;
  background: #fff;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  border-top: 1px solid rgba(0, 0, 0, 0.02);
  border-right: 1px solid rgba(0, 0, 0, 0.02);
  border-bottom: 1px solid rgba(0, 0, 0, 0.02);
  box-shadow: 0 2px 4px rgba(0,0,0,0.01);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ticker-header {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.ticker-body {
  color: var(--text-primary);
  font-weight: 600;
}

.ticker-body span {
  color: var(--primary);
  font-weight: 700;
}

.ticker-footer {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

/* Button & Form Elements */
.btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-main);
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(2, 136, 209, 0.2);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(2, 136, 209, 0.3);
}

.btn-secondary {
  background: #fff;
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.15);
  transform: none;
  box-shadow: none;
}

.btn-danger {
  background: linear-gradient(135deg, var(--accent), #e91e63) !important;
  color: white !important;
  box-shadow: 0 4px 10px rgba(216, 27, 96, 0.2);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #c2185b, #d81b60) !important;
  color: white !important;
  box-shadow: 0 6px 15px rgba(216, 27, 96, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #4caf50) !important;
  color: white !important;
  box-shadow: 0 4px 10px rgba(46, 125, 50, 0.2);
}

.btn-success:hover {
  background: linear-gradient(135deg, #1b5e20, #2e7d32) !important;
  color: white !important;
  box-shadow: 0 6px 15px rgba(46, 125, 50, 0.3);
}

/* Login Page Styling */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 40px 30px;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo {
  display: inline-flex;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1.5rem;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: #fff;
  box-shadow: 0 4px 15px rgba(2, 136, 209, 0.4);
  margin-bottom: 15px;
}

.login-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 5px;
}

.login-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 600;
}

.input-control {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: var(--transition);
}

.input-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(2, 136, 209, 0.15);
}

.alert {
  padding: 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  display: none;
}

.alert-danger {
  background: rgba(216, 27, 96, 0.08);
  border: 1px solid rgba(216, 27, 96, 0.15);
  color: #c2185b;
  display: block;
}

.demo-credentials {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-glass);
}

.demo-credentials h4 {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  font-weight: 700;
}

.demo-credentials p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 5px;
  font-weight: 500;
}

/* Member Portal Styling */
.member-container {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .member-container {
    grid-template-columns: 1fr;
  }
}

.form-panel {
  padding: 24px;
}

.panel-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  padding: 12px 16px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  border-bottom: 2px solid var(--border-glass);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-glass);
  font-size: 0.95rem;
}

tr:hover td {
  background: rgba(0, 0, 0, 0.01);
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-weight: 500;
}

.flag-icon {
  display: inline-block;
  margin-right: 8px;
  border-radius: 2px;
}

/* Custom interactive animation for form success */
@keyframes success-pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(46, 125, 50, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0); }
}

.success-pulse {
  animation: success-pulse 1.2s infinite;
}

/* Tab Navigation Styles */
.tabs-container {
  display: flex;
  justify-content: flex-end;
  margin-top: -10px;
  margin-bottom: 15px;
}

.dashboard-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border-glass);
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.4);
}

.tab-btn.active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(2, 136, 209, 0.25);
}

/* Tab Content Visibility */
.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

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

/* Admin Tab UI Elements */
.admin-tab-container {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .admin-tab-container {
    grid-template-columns: 1fr;
  }
}

.form-box {
  padding: 24px;
}

.table-box {
  padding: 24px;
  min-height: 400px;
}

/* Filter controls for tables */
.filter-row {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}

/* Modal and Inline Edit Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 100%;
  max-width: 500px;
  padding: 28px;
  transform: scale(0.95);
  transition: var(--transition);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 12px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* Accordion Table Styles */
.accordion-toggle {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.accordion-toggle:hover td {
  background-color: rgba(2, 136, 209, 0.04) !important;
}

.accordion-details-row {
  display: none;
  background-color: rgba(248, 250, 252, 0.7);
}

.accordion-details-row.active {
  display: table-row;
}

.accordion-details-content {
  padding: 16px 20px;
  animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  padding: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.01);
}

@media (max-width: 768px) {
  .details-grid {
    grid-template-columns: 1fr;
  }
}

.details-block-title {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding-bottom: 4px;
}

.details-divers-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.details-diver-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(0,0,0,0.04);
  font-size: 0.9rem;
}

.details-meta-item {
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.details-meta-item strong {
  color: var(--text-primary);
}

.chevron-icon {
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 0.75rem;
  margin-left: 6px;
}

.accordion-toggle.active .chevron-icon {
  transform: rotate(180deg);
}

/* Pagination load more button */
.load-more-container {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  margin-bottom: 15px;
}

/* Export button */
.btn-export {
  background: linear-gradient(135deg, #2e7d32, #4caf50);
  box-shadow: 0 4px 10px rgba(46, 125, 50, 0.2);
}

.btn-export:hover {
  background: linear-gradient(135deg, #1b5e20, #388e3c);
  box-shadow: 0 6px 15px rgba(46, 125, 50, 0.3);
}

/* ====================================================================
   Diver & Bubbles Loading Overlay
   ==================================================================== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(240, 244, 248, 0.82); /* Semitransparent light theme bg */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999; /* Ensure it is above everything (Leaflet overlays, modals) */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-in-out;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.diver-wrapper {
  position: relative;
  width: 180px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diver-img {
  width: 120px;
  height: auto;
  animation: float-diver 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 16px rgba(2, 136, 209, 0.3));
}

@keyframes float-diver {
  0%, 100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-10px) rotate(3deg);
  }
}


/* Bubbles */
.bubble {
  position: absolute;
  background: rgba(2, 136, 209, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  pointer-events: none;
  animation: float-bubble 2.5s infinite ease-in;
}

/* Bubbles positioning & swaying delay mapping */
.bubble-1 { width: 8px; height: 8px; left: 125px; bottom: 30px; animation-duration: 2.0s; animation-delay: 0.1s; --sway: 12px; }
.bubble-2 { width: 11px; height: 11px; left: 130px; bottom: 30px; animation-duration: 2.6s; animation-delay: 0.6s; --sway: -18px; }
.bubble-3 { width: 6px; height: 6px; left: 120px; bottom: 30px; animation-duration: 1.7s; animation-delay: 0s; --sway: 6px; }
.bubble-4 { width: 9px; height: 9px; left: 135px; bottom: 30px; animation-duration: 2.3s; animation-delay: 1.1s; --sway: -10px; }
.bubble-5 { width: 7px; height: 7px; left: 115px; bottom: 30px; animation-duration: 1.9s; animation-delay: 0.4s; --sway: 15px; }

@keyframes float-bubble {
  0% {
    transform: translateY(0) scale(0.6);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-85px) translateX(var(--sway)) scale(1.15);
    opacity: 0;
  }
}

.loader-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.03em;
  font-family: var(--font-main);
  animation: pulse-text 1.4s ease-in-out infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}


