/*
 * AquaPod OS - Design System & Modular Tab Engine
 * Typography: Google Font Montserrat
 * Themes: Full High-Contrast Dark & Light Mode System
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

/* ==========================================================================
   GLOBAL RESET & UNIVERSAL BOX-SIZING ENFORCEMENT
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box !important;
}

html, body {
  max-width: 100vw !important;
  overflow-x: hidden !important;
  width: 100%;
}

/* ==========================================================================
   1. COLOR DESIGN TOKENS (LIGHT & DARK MODES)
   ========================================================================== */

:root, [data-color-theme="dark"], [data-bs-theme="dark"] {
  --font-family-base: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --aquapod-bg: #111827;
  --aquapod-surface: #1f2937;
  --aquapod-surface-raised: #263345;
  --aquapod-border: #374151;
  --aquapod-border-subtle: rgba(255, 255, 255, 0.08);
  --aquapod-teal: #0d9488;
  --aquapod-teal-hover: #14b8a6;
  --aquapod-cyan: #06b6d4;
  --aquapod-blue: #0284c7;
  --aquapod-amber: #f59e0b;
  --aquapod-danger: #ef4444;
  --aquapod-text: #f3f4f6;
  --aquapod-text-muted: #9ca3af;
  --aquapod-text-secondary: #cbd5e1;
  --aquapod-card-header: rgba(17, 24, 39, 0.45);
  --aquapod-navbar-bg: #0f172a;
  --aquapod-sidebar-bg: #0b0f19;
  --aquapod-metric-bg: #1e293b;
  --aquapod-pill-bg: #1e293b;
  --aquapod-table-th: rgba(17, 24, 39, 0.6);
  --aquapod-table-hover: rgba(255, 255, 255, 0.03);
  --aquapod-table-border: #374151;
  --aquapod-input-bg: #111827;
  --aquapod-tank-bg: #111827;
  --aquapod-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  --aquapod-dropdown-bg: #1f2937;
}

[data-color-theme="light"], [data-bs-theme="light"], .light-mode {
  --aquapod-bg: #f4f6f9;
  --aquapod-surface: #ffffff;
  --aquapod-surface-raised: #f8fafc;
  --aquapod-border: #e2e8f0;
  --aquapod-border-subtle: rgba(0, 0, 0, 0.06);
  --aquapod-teal: #0d9488;
  --aquapod-teal-hover: #0f766e;
  --aquapod-cyan: #0284c7;
  --aquapod-blue: #2563eb;
  --aquapod-amber: #d97706;
  --aquapod-danger: #dc2626;
  --aquapod-text: #0f172a;
  --aquapod-text-muted: #64748b;
  --aquapod-text-secondary: #475569;
  --aquapod-card-header: #f8fafc;
  --aquapod-navbar-bg: #ffffff;
  --aquapod-sidebar-bg: #1e293b;
  --aquapod-metric-bg: #ffffff;
  --aquapod-pill-bg: #f1f5f9;
  --aquapod-table-th: #f8fafc;
  --aquapod-table-hover: rgba(0, 0, 0, 0.02);
  --aquapod-table-border: #e2e8f0;
  --aquapod-input-bg: #ffffff;
  --aquapod-tank-bg: #f8fafc;
  --aquapod-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  --aquapod-dropdown-bg: #ffffff;
}

/* Light Mode Utility Overrides */
[data-color-theme="light"] .bg-dark,
[data-bs-theme="light"] .bg-dark,
.light-mode .bg-dark,
[data-color-theme="light"] .bg-dark-adapt,
[data-bs-theme="light"] .bg-dark-adapt,
.light-mode .bg-dark-adapt {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

[data-color-theme="light"] .bg-dark .text-white,
[data-bs-theme="light"] .bg-dark .text-white,
.light-mode .bg-dark .text-white,
[data-color-theme="light"] .text-white,
[data-bs-theme="light"] .text-white,
.light-mode .text-white {
  color: #0f172a !important;
}

[data-color-theme="light"] .border-secondary,
[data-bs-theme="light"] .border-secondary,
.light-mode .border-secondary {
  border-color: #e2e8f0 !important;
}

[data-color-theme="light"] .navbar-top,
[data-bs-theme="light"] .navbar-top,
.light-mode .navbar-top {
  background-color: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-color-theme="light"] .navbar-top .current-user-name,
[data-bs-theme="light"] .navbar-top .current-user-name,
.light-mode .navbar-top .current-user-name,
[data-color-theme="light"] .navbar-top .brand-title,
[data-bs-theme="light"] .navbar-top .brand-title,
.light-mode .navbar-top .brand-title {
  color: #0f172a !important;
}

/* Form Controls & Inputs for Light & Dark Consistency */
[data-color-theme="light"] .form-control,
[data-bs-theme="light"] .form-control,
.light-mode .form-control,
[data-color-theme="light"] .form-select,
[data-bs-theme="light"] .form-select,
.light-mode .form-select {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

[data-color-theme="light"] .form-control:focus,
[data-bs-theme="light"] .form-control:focus,
.light-mode .form-control:focus,
[data-color-theme="light"] .form-select:focus,
[data-bs-theme="light"] .form-select:focus,
.light-mode .form-select:focus {
  border-color: #0d9488 !important;
  box-shadow: 0 0 0 0.2rem rgba(13, 148, 136, 0.2) !important;
}

[data-color-theme="light"] .form-control::placeholder,
.light-mode .form-control::placeholder {
  color: #94a3b8 !important;
}

[data-color-theme="light"] .input-group-text,
.light-mode .input-group-text {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
  border-color: #cbd5e1 !important;
}

[data-color-theme="light"] .card,
.light-mode .card {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

[data-color-theme="light"] .card-header,
.light-mode .card-header {
  background-color: #f8fafc !important;
  border-bottom-color: #e2e8f0 !important;
  color: #0f172a !important;
}

.navbar-actions-wrapper .btn-outline-secondary {
  color: var(--aquapod-text) !important;
  background-color: var(--aquapod-pill-bg) !important;
  border-color: var(--aquapod-border) !important;
}

.navbar-actions-wrapper .btn-outline-secondary:hover {
  background-color: rgba(13, 148, 136, 0.15) !important;
  color: var(--aquapod-teal-hover) !important;
  border-color: var(--aquapod-teal) !important;
}

[data-color-theme="light"] .formula-banner,
[data-bs-theme="light"] .formula-banner,
.light-mode .formula-banner {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%) !important;
  border: 1px solid rgba(13, 148, 136, 0.35) !important;
}

[data-color-theme="light"] .tank-visual,
[data-bs-theme="light"] .tank-visual,
.light-mode .tank-visual {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

[data-color-theme="light"] .progress,
[data-bs-theme="light"] .progress,
.light-mode .progress {
  background-color: #e2e8f0 !important;
}

[data-color-theme="light"] .modal-content,
[data-bs-theme="light"] .modal-content,
.light-mode .modal-content {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

[data-color-theme="light"] .sidebar-main .bg-dark,
[data-bs-theme="light"] .sidebar-main .bg-dark,
.light-mode .sidebar-main .bg-dark {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

[data-color-theme="light"] .sidebar-main .bg-dark .text-white,
[data-bs-theme="light"] .sidebar-main .bg-dark .text-white,
.light-mode .sidebar-main .bg-dark .text-white {
  color: #ffffff !important;
}

/* ==========================================================================
   2. GLOBAL TYPOGRAPHY & BASE RESET
   ========================================================================== */

body, html, input, select, textarea, button, .nav-link, .btn, .card, .table, h1, h2, h3, h4, h5, h6, .badge {
  font-family: var(--font-family-base) !important;
}

body {
  background-color: var(--aquapod-bg) !important;
  color: var(--aquapod-text) !important;
  min-height: 100vh;
  letter-spacing: -0.01em;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Containers */
.card, .content-inner, .navbar, .sidebar {
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.card {
  background-color: var(--aquapod-surface);
  border-radius: 12px;
  box-shadow: var(--aquapod-shadow);
  margin-bottom: 1.25rem;
  border: 1px solid var(--aquapod-border) !important;
}

.card-header {
  background-color: var(--aquapod-card-header);
  border-bottom: 1px solid var(--aquapod-border);
  padding: 0.9rem 1.25rem;
  font-weight: 600;
  color: var(--aquapod-text);
}

.border-aquapod {
  border-color: var(--aquapod-border) !important;
}

/* ==========================================================================
   3. BASE STATUS PILL & LEGACY ROUTING HELPERS
   ========================================================================== */

/* Perfectly Centered Status Pill */
.navbar-center-status {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
}

.nav-routing-pill {
  background: var(--aquapod-pill-bg);
  border: 1px solid var(--aquapod-border);
  color: var(--aquapod-text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  padding: 6px 16px;
  transition: all 0.2s ease;
}

.nav-routing-pill:hover {
  border-color: var(--aquapod-teal);
}

/* Right Actions Container */
.navbar-actions-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 0.45rem;
}

/* Theme Toggle Button & Navbar Pill Controls */
.theme-toggle-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 32px !important;
  min-width: 82px;
  padding: 0 12px !important;
  border-radius: 9999px !important;
  background: var(--aquapod-pill-bg) !important;
  border: 1px solid var(--aquapod-border) !important;
  color: var(--aquapod-text) !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap !important;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.theme-toggle-btn:hover {
  background: rgba(13, 148, 136, 0.15) !important;
  color: var(--aquapod-teal-hover) !important;
  border-color: var(--aquapod-teal) !important;
}

.theme-toggle-btn i {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.theme-toggle-btn:hover i {
  transform: rotate(15deg);
}

.navbar-actions-wrapper .btn-outline-secondary,
.navbar-actions-wrapper .btn-outline-teal {
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 12px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  line-height: 1;
}

/* ==========================================================================
   4. SIDEBAR NAVIGATION & THEME INTEGRATION
   ========================================================================== */

.sidebar-main {
  background-color: var(--aquapod-sidebar-bg) !important;
  border-right: 1px solid var(--aquapod-border) !important;
}

.sidebar .nav-sidebar .nav-link {
  color: #cbd5e1;
  font-weight: 500;
  border-radius: 8px;
  margin: 3px 10px;
  padding: 9px 13px;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.85rem;
}

.sidebar .nav-sidebar .nav-link:hover {
  background-color: rgba(13, 148, 136, 0.15);
  color: #5eead4;
}

.sidebar .nav-sidebar .nav-link.active {
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.3) 0%, rgba(13, 148, 136, 0.1) 100%);
  color: #5eead4 !important;
  font-weight: 700;
  border-left: 3px solid #0d9488;
}

.sidebar .nav-sidebar .nav-link.active i {
  color: #14b8a6;
}

.sidebar-section-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 1rem 1.25rem 0.4rem 1.25rem;
}

/* ==========================================================================
   5. TAB-SWITCHED MODULAR LAYOUT (NO VERTICAL SCROLLING)
   ========================================================================== */

.tab-module {
  display: none !important;
}

.tab-module.active {
  display: block !important;
  animation: moduleFadeIn 0.22s ease-in-out forwards;
}

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

/* ==========================================================================
   6. METRIC BOXES & CARDS POLISH
   ========================================================================== */

.metric-box {
  background: var(--aquapod-metric-bg);
  border: 1px solid var(--aquapod-border);
  border-radius: 12px;
  padding: 1.15rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--aquapod-shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-box:hover {
  transform: translateY(-2px);
  border-color: var(--aquapod-teal);
}

.metric-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--aquapod-text-muted);
  font-weight: 600;
}

.metric-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--aquapod-text);
  margin: 6px 0;
  letter-spacing: -0.02em;
}

.metric-sub {
  font-size: 0.78rem;
  color: var(--aquapod-text-muted);
}

/* Badges & Dots */
.badge-aquapod {
  background-color: rgba(13, 148, 136, 0.15);
  color: #0d9488;
  border: 1px solid rgba(13, 148, 136, 0.3);
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  position: relative;
}

.status-dot.dot-teal {
  background-color: #14b8a6;
  box-shadow: 0 0 8px #14b8a6;
}

.status-dot.dot-yellow {
  background-color: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.status-dot.dot-blue {
  background-color: #0284c7;
  box-shadow: 0 0 8px #0284c7;
}

.status-dot.dot-red {
  background-color: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: redPulse 1.4s infinite;
}

@keyframes redPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* Scenario Buttons */
.btn-scenario {
  background-color: var(--aquapod-surface);
  border: 1px solid var(--aquapod-border);
  color: var(--aquapod-text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  border-radius: 20px;
  padding: 5px 14px;
  transition: all 0.2s ease;
}

.btn-scenario:hover {
  background-color: var(--aquapod-surface-raised);
  color: var(--aquapod-text);
}

.btn-scenario.active {
  background-color: #0d9488 !important;
  border-color: #0d9488 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(13, 148, 136, 0.35);
}

/* Chart Containers */
.echart-container {
  width: 100%;
  height: 330px;
}

.echart-container-lg {
  width: 100%;
  height: 380px;
}

/* 6-Step Architecture Cards */
.step-card {
  background: var(--aquapod-surface);
  border: 1px solid var(--aquapod-border);
  border-radius: 12px;
  padding: 1.35rem;
  position: relative;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  height: 100%;
  box-shadow: var(--aquapod-shadow);
}

.step-card:hover {
  transform: translateY(-3px);
  border-color: #14b8a6;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.step-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  background: rgba(13, 148, 136, 0.15);
  color: #0d9488;
  border: 1px solid rgba(13, 148, 136, 0.35);
  margin-bottom: 12px;
}

/* Dual Tank Visual */
.tank-visual {
  background: var(--aquapod-tank-bg);
  border: 2px solid var(--aquapod-border);
  border-radius: 16px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.tank-level {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.35) 0%, rgba(13, 148, 136, 0.6) 100%);
  transition: height 0.6s ease;
  border-top: 2px solid #22d3ee;
}

.tank-level-reject {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.3) 0%, rgba(185, 28, 28, 0.5) 100%);
  border-top: 2px solid #f87171;
}

/* Work Order Items */
.work-order-item {
  background: var(--aquapod-surface);
  border: 1px solid var(--aquapod-border);
  border-left: 4px solid #0d9488;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.work-order-item.urgent {
  border-left-color: #ef4444;
}

.work-order-item.pending {
  border-left-color: #f59e0b;
}

/* Formula Banner */
.formula-banner {
  background: linear-gradient(135deg, var(--aquapod-surface-raised) 0%, var(--aquapod-surface) 100%);
  border: 1px solid rgba(13, 148, 136, 0.35);
  border-radius: 12px;
  padding: 18px 22px;
  box-shadow: var(--aquapod-shadow);
}

/* Tables */
.table-dark-custom {
  --bs-table-bg: transparent;
  --bs-table-color: var(--aquapod-text);
  border-color: var(--aquapod-table-border);
}

.table-dark-custom th {
  background-color: var(--aquapod-table-th);
  color: var(--aquapod-text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  border-bottom: 1px solid var(--aquapod-table-border);
  padding: 12px 14px;
}

.table-dark-custom td {
  border-bottom: 1px solid var(--aquapod-table-border);
  padding: 12px 14px;
  vertical-align: middle;
  font-size: 0.85rem;
  color: var(--aquapod-text);
}

.table-dark-custom tbody tr:hover td {
  background-color: var(--aquapod-table-hover);
}

/* Dropdown Menus */
.dropdown-menu {
  background-color: var(--aquapod-dropdown-bg) !important;
  border: 1px solid var(--aquapod-border) !important;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.dropdown-item {
  color: var(--aquapod-text) !important;
  font-size: 0.82rem;
  padding: 8px 14px;
  transition: background-color 0.15s ease;
}

.dropdown-item:hover, .dropdown-item.active {
  background-color: rgba(13, 148, 136, 0.15) !important;
  color: #0d9488 !important;
}

.dropdown-divider {
  border-color: var(--aquapod-border) !important;
}

/* Modals */
.modal-content {
  background-color: var(--aquapod-surface) !important;
  border: 1px solid var(--aquapod-border) !important;
  color: var(--aquapod-text) !important;
  border-radius: 14px;
}

.modal-header, .modal-footer {
  border-color: var(--aquapod-border) !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--aquapod-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--aquapod-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}


/* ==========================================================================
   7. REDESIGNED VISUAL 6-STEP ARCHITECTURE FLOW DIAGRAM
   ========================================================================== */

.arch-flow-wrapper {
  position: relative;
  margin-bottom: 2rem;
}

/* Architecture Timeline Track (Desktop & Tablet) */
.arch-timeline-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.arch-timeline-track::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 2rem;
  right: 2rem;
  height: 3px;
  background: linear-gradient(90deg, #0d9488 0%, #06b6d4 50%, #0284c7 100%);
  z-index: 1;
  opacity: 0.4;
}

.arch-track-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.arch-track-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--aquapod-surface);
  border: 2px solid var(--aquapod-teal);
  color: var(--aquapod-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  box-shadow: 0 0 12px rgba(13, 148, 136, 0.25);
}

.arch-track-node:hover .arch-track-circle,
.arch-track-node.active .arch-track-circle {
  background: #0d9488;
  color: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 0 20px rgba(13, 148, 136, 0.6);
}

.arch-track-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--aquapod-text-muted);
  text-align: center;
  max-width: 90px;
}

/* Architecture Visual Grid */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  position: relative;
}

@media (max-width: 1399.98px) {
  .arch-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 767.98px) {
  .arch-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .arch-timeline-track {
    display: none; /* Replaced by vertical flowchart on mobile */
  }
}

.arch-step-box {
  background: var(--aquapod-surface);
  border: 1px solid var(--aquapod-border);
  border-radius: 14px;
  padding: 1.25rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--aquapod-shadow);
  transition: all 0.25s ease;
  overflow: hidden;
}

.arch-step-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0d9488, #06b6d4);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.arch-step-box:hover {
  transform: translateY(-4px);
  border-color: #14b8a6;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.arch-step-box:hover::before {
  opacity: 1;
}

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

.arch-badge-num {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(13, 148, 136, 0.15);
  color: #14b8a6;
  border: 1px solid rgba(20, 184, 166, 0.3);
  letter-spacing: 0.05em;
}

.arch-icon-disc {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(13, 148, 136, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #14b8a6;
  transition: all 0.2s ease;
}

.arch-step-box:hover .arch-icon-disc {
  background: #0d9488;
  color: #ffffff;
  transform: rotate(5deg) scale(1.05);
}

.arch-step-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--aquapod-text);
  margin-bottom: 0.45rem;
  line-height: 1.3;
}

.arch-step-desc {
  font-size: 0.75rem;
  color: var(--aquapod-text-muted);
  line-height: 1.45;
  margin-bottom: 0.85rem;
  flex-grow: 1;
}

.arch-spec-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--aquapod-pill-bg);
  border: 1px solid var(--aquapod-border);
  color: var(--aquapod-text-secondary);
  margin-bottom: 4px;
}

/* Workflow Arrow Indicator between Cards */
.arch-flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--aquapod-teal);
  font-size: 1rem;
  margin-top: 0.5rem;
  opacity: 0.75;
}

/* ==========================================================================
   8. INTERACTIVE REGIONAL MAP & EXPANDED FLEET
   ========================================================================== */

/* Region Card Selectors */
.region-card {
  background: var(--aquapod-surface);
  border: 1px solid var(--aquapod-border);
  border-radius: 14px;
  padding: 1.25rem 1.35rem !important;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  height: 100%;
  min-height: 114px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.region-card:hover {
  transform: translateY(-2px);
  border-color: var(--aquapod-teal);
  background: var(--aquapod-surface-raised);
}

.region-card.active {
  border-color: #0d9488 !important;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.15) 0%, rgba(15, 23, 42, 0.4) 100%) !important;
  box-shadow: 0 0 16px rgba(13, 148, 136, 0.25);
}

[data-color-theme="light"] .region-card.active,
.light-mode .region-card.active {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.1) 0%, rgba(241, 245, 249, 0.9) 100%) !important;
}

.region-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--aquapod-text);
  margin-bottom: 2px;
}

.region-card-meta {
  font-size: 0.7rem;
  color: var(--aquapod-text-muted);
}

/* Maritime SVG Map Canvas Container */
.maritime-map-container {
  position: relative;
  background: radial-gradient(circle at 50% 50%, #0d1e38 0%, #091224 85%);
  border: 1px solid var(--aquapod-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--aquapod-shadow);
  min-height: 420px;
}

[data-color-theme="light"] .maritime-map-container,
.light-mode .maritime-map-container {
  background: radial-gradient(circle at 50% 50%, #e0f2fe 0%, #bae6fd 85%);
  border-color: #cbd5e1;
}

.maritime-map-svg {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
}

/* Pulsing Radar Beacons */
.map-beacon {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.map-beacon:hover {
  transform: scale(1.3);
}

.map-beacon circle.ping-ring {
  transform-origin: center;
  animation: beaconPing 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes beaconPing {
  0% { r: 6px; opacity: 0.85; stroke-width: 2; }
  75% { r: 24px; opacity: 0; stroke-width: 0.5; }
  100% { r: 26px; opacity: 0; }
}

/* Node Floating Telemetry HUD Card */
.map-hud-overlay {
  position: absolute !important;
  bottom: 16px !important;
  right: 16px !important;
  width: 330px !important;
  max-width: calc(100% - 32px) !important;
  background: rgba(17, 24, 39, 0.94) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(20, 184, 166, 0.4) !important;
  border-radius: 14px !important;
  padding: 1.15rem 1.25rem !important;
  color: #f3f4f6 !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55) !important;
  z-index: 100 !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

[data-color-theme="light"] .map-hud-overlay,
.light-mode .map-hud-overlay {
  background: rgba(255, 255, 255, 0.95) !important;
  color: #0f172a !important;
  border-color: rgba(13, 148, 136, 0.35) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12) !important;
}

.btn-close-hud {
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: var(--aquapod-text-muted) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  transition: all 0.2s ease !important;
  outline: none !important;
  flex-shrink: 0 !important;
}

.btn-close-hud:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  transform: scale(1.08) !important;
}

[data-color-theme="light"] .btn-close-hud,
.light-mode .btn-close-hud {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
}

[data-color-theme="light"] .btn-close-hud:hover,
.light-mode .btn-close-hud:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

@media (max-width: 575.98px) {
  .map-hud-overlay {
    bottom: 10px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: none !important;
    padding: 0.95rem 1rem !important;
  }
}

/* Regional Cluster Pins Ribbon & Buttons */
.map-cluster-ribbon {
  padding: 0.85rem 1.25rem !important;
  background: var(--aquapod-surface-raised) !important;
  border-bottom: 1px solid var(--aquapod-border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
}

[data-color-theme="light"] .map-cluster-ribbon,
.light-mode .map-cluster-ribbon {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

.map-cluster-buttons {
  display: flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  flex-wrap: wrap !important;
}

@media (max-width: 767.98px) {
  .map-cluster-ribbon {
    padding: 0.75rem 1rem !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .map-cluster-buttons {
    width: 100% !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    padding-bottom: 4px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .map-cluster-buttons::-webkit-scrollbar {
    display: none !important;
  }
  .map-cluster-buttons .btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
}

/* ==========================================================================
   9. MOBILE & RESPONSIVE LAYOUT SYSTEM (< 992px)
   ========================================================================== */

@media (max-width: 991.98px) {
  /* Hide sidebar offscreen by default on mobile / tablet */
  .sidebar-main {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 280px !important;
    max-width: 85vw !important;
    z-index: 1060 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: none;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* When mobile hamburger toggle is clicked */
  .sidebar-main.sidebar-mobile-expanded,
  body.sidebar-mobile-open .sidebar-main {
    transform: translateX(0) !important;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.75) !important;
  }

  /* Tap Backdrop Overlay */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  body.sidebar-mobile-open .sidebar-backdrop {
    display: block;
    opacity: 1;
  }

  /* Navbar on Mobile */
  .navbar-top {
    padding: 0 0.85rem !important;
    min-height: 56px !important;
  }

  .brand-title {
    font-size: 1.1rem !important;
  }

  /* Responsive content padding */
  .content-inner {
    padding: 1rem !important;
  }

  .metric-value {
    font-size: 1.5rem !important;
  }

  .table-responsive {
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 575.98px) {
  /* Extra compact phone mode */
  .navbar-actions-wrapper {
    gap: 0.35rem !important;
  }

  .nav-routing-pill {
    display: none !important;
  }
}


/* ==========================================================================
   HOMEPAGE QUICK-ACCESS HUB & ADVERTISING MISSION SPOTLIGHT BANNER
   ========================================================================== */
.aquapod-mission-banner {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.18) 0%, rgba(15, 23, 42, 0.95) 50%, rgba(6, 182, 212, 0.15) 100%);
  border: 1px solid rgba(20, 184, 166, 0.35);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.aquapod-mission-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0d9488, #06b6d4, #3b82f6);
}

.mission-stat-pill {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.mission-stat-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.4);
}

/* Quick-Access Module Grid Hub */
.quick-access-hub {
  margin-bottom: 2rem;
}

.btn-quick-hub {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 1rem 1.15rem;
  background: var(--aquapod-card-bg);
  border: 1px solid var(--aquapod-border);
  border-radius: 12px;
  text-decoration: none !important;
  color: var(--aquapod-text-main);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.btn-quick-hub:hover {
  transform: translateY(-3px);
  border-color: var(--aquapod-teal);
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.2);
  color: var(--aquapod-text-main);
}

.btn-quick-hub.active {
  border-color: var(--aquapod-teal);
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.12) 0%, var(--aquapod-card-bg) 100%);
  box-shadow: 0 0 16px rgba(20, 184, 166, 0.3);
}

.btn-quick-hub.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--aquapod-teal);
}

.btn-quick-hub .hub-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-quick-hub .hub-title {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-quick-hub .hub-desc {
  font-size: 0.75rem;
  color: var(--aquapod-text-muted);
  line-height: 1.35;
}

/* ==========================================================================
   MODULE 1: LEAFLET & REAL GOOGLE MAPS EMBED INTEGRATION
   ========================================================================== */
#aquapod_gis_map_wrapper,
#aquapod_google_map_wrapper {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--aquapod-border);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

#fleet_leaflet_map {
  width: 100%;
  height: 520px;
  background: #0a192f;
  z-index: 10;
}

#google_maps_iframe {
  width: 100%;
  height: 520px;
  border: 0;
  display: block;
}

/* Leaflet Custom Glowing Radar Pins */
.aquapod-leaflet-pin {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.aquapod-leaflet-pin .pin-core {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: #ffffff;
  z-index: 2;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}

.aquapod-leaflet-pin.pin-teal .pin-core {
  background: #0d9488;
  border-color: #5eead4;
}

.aquapod-leaflet-pin.pin-amber .pin-core {
  background: #d97706;
  border-color: #fde68a;
}

.aquapod-leaflet-pin.pin-cyan .pin-core {
  background: #0284c7;
  border-color: #7dd3fc;
}

.aquapod-leaflet-pin .pin-pulse {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  animation: radar-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  opacity: 0.75;
  z-index: 1;
}

.aquapod-leaflet-pin.pin-teal .pin-pulse {
  border: 2px solid #14b8a6;
  background: rgba(20, 184, 166, 0.25);
}

.aquapod-leaflet-pin.pin-amber .pin-pulse {
  border: 2px solid #f59e0b;
  background: rgba(245, 158, 11, 0.25);
}

.aquapod-leaflet-pin.pin-cyan .pin-pulse {
  border: 2px solid #06b6d4;
  background: rgba(6, 182, 212, 0.25);
}

@keyframes radar-ping {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Leaflet Dark Popup Customization */
.leaflet-popup-content-wrapper {
  background: rgba(17, 24, 39, 0.95) !important;
  color: #f3f4f6 !important;
  border: 1px solid rgba(20, 184, 166, 0.4) !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(8px) !important;
  padding: 0.25rem !important;
}

.leaflet-popup-tip {
  background: rgba(17, 24, 39, 0.95) !important;
  border: 1px solid rgba(20, 184, 166, 0.4) !important;
}

.leaflet-popup-content {
  margin: 10px 14px !important;
  font-family: 'Montserrat', sans-serif !important;
  line-height: 1.4 !important;
}

.leaflet-container {
  font-family: 'Montserrat', sans-serif !important;
}

/* Light Mode Overrides for Banner & Hub */
.light-mode .aquapod-mission-banner {
  background: linear-gradient(135deg, rgba(204, 251, 241, 0.7) 0%, #ffffff 50%, rgba(224, 242, 254, 0.7) 100%) !important;
  border-color: rgba(13, 148, 136, 0.35) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

.light-mode .aquapod-mission-banner h3,
.light-mode .aquapod-mission-banner p {
  color: #1e293b !important;
}

.light-mode .mission-stat-pill {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

.light-mode .btn-quick-hub {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}

.light-mode .btn-quick-hub:hover {
  background: #f8fafc !important;
  border-color: var(--aquapod-teal) !important;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.15) !important;
}

.light-mode .btn-quick-hub.active {
  background: linear-gradient(180deg, rgba(204, 251, 241, 0.5) 0%, #ffffff 100%) !important;
  border-color: var(--aquapod-teal) !important;
}

.light-mode .leaflet-popup-content-wrapper {
  background: rgba(255, 255, 255, 0.95) !important;
  color: #0f172a !important;
  border-color: rgba(13, 148, 136, 0.5) !important;
}

.light-mode .leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.95) !important;
}

/* ==========================================================================
   SANOFI-INSPIRED CORPORATE TECH HEADER & CENTER HORIZONTAL NAVIGATION
   ========================================================================== */
.navbar-top {
  position: sticky;
  top: 0;
  z-index: 1020;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0.65rem 1.75rem !important;
  border-bottom: 1px solid var(--aquapod-border-subtle) !important;
  transition: all 0.25s ease;
}

[data-color-theme="light"] .navbar-top,
.light-mode .navbar-top {
  background-color: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05) !important;
}

[data-color-theme="dark"] .navbar-top,
[data-bs-theme="dark"] .navbar-top {
  background-color: rgba(15, 23, 42, 0.94) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.35) !important;
}

/* Center Horizontal Navigation Links (Sanofi Enterprise Style) */
.navbar-center-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 auto;
}

.nav-header-link {
  background: transparent;
  border: 1px solid transparent;
  color: var(--aquapod-text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.nav-header-link:hover {
  color: var(--aquapod-teal-hover);
  background-color: rgba(13, 148, 136, 0.1);
  border-color: rgba(13, 148, 136, 0.25);
}

.nav-header-link.active {
  color: #ffffff !important;
  background-color: #0d9488 !important;
  border-color: #0d9488 !important;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.35);
}

.light-mode .nav-header-link {
  color: #475569;
}

.light-mode .nav-header-link:hover {
  color: #0d9488;
  background-color: rgba(13, 148, 136, 0.08);
  border-color: rgba(13, 148, 136, 0.25);
}

.light-mode .nav-header-link.active {
  color: #ffffff !important;
  background-color: #0d9488 !important;
  border-color: #0d9488 !important;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
}

/* ==========================================================================
   SANOFI-INSPIRED IMMERSIVE ENTERPRISE HERO & MISSION SPOTLIGHT SECTION
   ========================================================================== */
.sanofi-hero-section {
  position: relative;
  border-radius: 20px;
  padding: 3rem 2.5rem;
  margin-bottom: 2rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: radial-gradient(circle at 85% 15%, rgba(13, 148, 136, 0.22) 0%, rgba(2, 132, 199, 0.14) 35%, rgba(15, 23, 42, 0.98) 75%), #0a1120;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.45);
}

.light-mode .sanofi-hero-section {
  background: radial-gradient(circle at 85% 15%, rgba(204, 251, 241, 0.85) 0%, rgba(224, 242, 254, 0.65) 40%, #ffffff 85%), #ffffff;
  border: 1px solid rgba(13, 148, 136, 0.2);
  box-shadow: 0 16px 36px -10px rgba(13, 148, 136, 0.12), 0 4px 12px rgba(0, 0, 0, 0.03);
}

.sanofi-hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(13, 148, 136, 0.15);
  color: #14b8a6;
  border: 1px solid rgba(20, 184, 166, 0.35);
  margin-bottom: 1.25rem;
}

.light-mode .sanofi-hero-badge {
  background: rgba(13, 148, 136, 0.1);
  color: #0f766e;
  border-color: rgba(13, 148, 136, 0.3);
}

.sanofi-hero-title {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 1rem;
}

.light-mode .sanofi-hero-title {
  color: #0f172a;
}

.sanofi-hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #94a3b8;
  max-width: 820px;
  margin-bottom: 1.75rem;
}

.light-mode .sanofi-hero-subtitle {
  color: #475569;
}

/* Rounded Cards & Generous Whitespace */
.card {
  border-radius: 16px !important;
}

.metric-box {
  border-radius: 14px !important;
}

/* Coway / Cuckoo Style Public Water Station Badges */
.dispenser-badge-available {
  background: rgba(16, 185, 129, 0.18) !important;
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  width: fit-content !important;
  max-width: fit-content !important;
  padding: 0.25rem 0.6rem !important;
  line-height: 1.2 !important;
  border-radius: 9999px !important;
  font-size: 0.72rem !important;
  display: inline-flex !important;
  align-items: center !important;
  letter-spacing: 0.04em !important;
}

.dispenser-badge-busy {
  background: rgba(2, 132, 199, 0.18) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(2, 132, 199, 0.35) !important;
  font-weight: 700;
}

.temp-pill-cold {
  background: rgba(56, 189, 248, 0.15);
  color: #0284c7;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
}

.temp-pill-ambient {
  background: rgba(13, 148, 136, 0.15);
  color: #0d9488;
  border: 1px solid rgba(13, 148, 136, 0.3);
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
}

.temp-pill-hot {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
}

/* Personal CWaaS Quota Ring & Simulator */
.quota-circle-hud {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 8px solid rgba(13, 148, 136, 0.2);
  border-top-color: #0d9488;
  border-right-color: #0d9488;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  transition: all 0.5s ease;
}

.quota-val-num {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #ffffff;
  line-height: 1;
}

.light-mode .quota-val-num {
  color: #0f172a;
}

.cwaas-sim-panel {
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(13, 148, 136, 0.08) 0%, rgba(2, 132, 199, 0.05) 100%);
  border: 1px solid rgba(13, 148, 136, 0.25);
  padding: 1.5rem;
}

.dispense-btn-vol {
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.6);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  transition: all 0.2s ease;
  cursor: pointer;
  width: 100%;
}

.dispense-btn-vol:hover, .dispense-btn-vol.active {
  background: #0d9488;
  border-color: #0d9488;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}

.light-mode .dispense-btn-vol {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.light-mode .dispense-btn-vol:hover, .light-mode .dispense-btn-vol.active {
  background: #0d9488;
  border-color: #0d9488;
  color: #ffffff;
}

/* Interactive 6-Step Visual Cards */
.arch-visual-step-card {
  border-radius: 16px;
  padding: 1.5rem;
  background: var(--aquapod-surface);
  border: 1px solid var(--aquapod-border);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.arch-visual-step-card:hover {
  transform: translateY(-4px);
  border-color: var(--aquapod-teal);
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.2);
}

.arch-visual-step-card.active {
  border-color: var(--aquapod-teal);
  background: linear-gradient(160deg, rgba(13, 148, 136, 0.12) 0%, var(--aquapod-surface) 100%);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.4), 0 12px 28px rgba(13, 148, 136, 0.25);
}


/* ==========================================================================
   ENTERPRISE UI/UX REFINEMENTS & COLLISION MITIGATION (SANOFI STYLE)
   ========================================================================== */

/* Layout & Box Collision Fixes */
.tab-module {
  animation: fadeInModule 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.metric-box {
  min-height: 110px;
  padding: 1.25rem 1.5rem !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.region-card {
  min-height: 114px;
  padding: 1.25rem 1.35rem !important;
}

/* Isolated Single Station Pin on Map */
.map-interactive-pin.isolated-single-pin {
  z-index: 50 !important;
}

.map-interactive-pin.isolated-single-pin .pin-pulse-ring {
  width: 58px;
  height: 58px;
  background: rgba(13, 148, 136, 0.55);
  animation: pinPulseRing 1.5s infinite ease-out;
}

.map-interactive-pin.isolated-single-pin .pin-marker-core {
  width: 32px;
  height: 32px;
  background: #0d9488;
  border: 3px solid #ffffff;
  font-size: 15px;
  box-shadow: 0 0 22px rgba(13, 148, 136, 0.85);
}

.map-interactive-pin.isolated-single-pin .pin-marker-label {
  margin-top: 6px;
  padding: 5px 12px;
  font-size: 11.5px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #0d9488;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

[data-color-theme="light"] .map-interactive-pin.isolated-single-pin .pin-marker-label,
.light-mode .map-interactive-pin.isolated-single-pin .pin-marker-label {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  border-color: #0d9488;
  box-shadow: 0 4px 18px rgba(13, 148, 136, 0.25);
}

.btn-quick-hub {
  min-height: 128px;
  padding: 1.25rem 1.15rem !important;
}

.sanofi-hero-section {
  padding: 2.5rem 2rem !important;
  border-radius: 18px !important;
}

/* Streamlined Navbar Utility Layout */
.navbar-top {
  min-height: 64px;
}

.navbar-center-nav .nav-header-link {
  padding: 0.45rem 0.85rem !important;
  font-size: 0.82rem !important;
  white-space: nowrap;
}

.navbar-actions-wrapper {
  gap: 0.5rem !important;
}

/* Camera QR Scanner Viewport & Laser HUD */
.qr-scanner-viewport {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: #000000;
  border: 1px solid var(--aquapod-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

#qr_video_feed {
  width: 100%;
  height: 290px;
  object-fit: cover;
  display: block;
}

.qr-overlay-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.qr-viewfinder {
  position: relative;
  width: 200px;
  height: 200px;
  border: 2px solid #0d9488;
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.65);
}

.qr-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: #14b8a6;
  border-style: solid;
}
.qr-corner-tl { top: -2px; left: -2px; border-width: 3px 0 0 3px; border-top-left-radius: 14px; }
.qr-corner-tr { top: -2px; right: -2px; border-width: 3px 3px 0 0; border-top-right-radius: 14px; }
.qr-corner-bl { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; border-bottom-left-radius: 14px; }
.qr-corner-br { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; border-bottom-right-radius: 14px; }

.qr-laser-line {
  position: absolute;
  left: 5%;
  width: 90%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #14b8a6, #2dd4bf, #14b8a6, transparent);
  box-shadow: 0 0 12px #14b8a6, 0 0 4px #2dd4bf;
  animation: qrLaserScan 2.2s infinite ease-in-out;
}

@keyframes qrLaserScan {
  0% { top: 8%; opacity: 0.8; }
  50% { top: 92%; opacity: 1; }
  100% { top: 8%; opacity: 0.8; }
}

/* Dedicated Settings Module & Radio Cards */
.settings-section-card {
  border-radius: 16px;
  background: var(--aquapod-surface);
  border: 1px solid var(--aquapod-border);
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.settings-radio-pill {
  cursor: pointer;
  border: 1px solid var(--aquapod-border);
  background: var(--aquapod-bg);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.settings-radio-pill:hover {
  border-color: var(--aquapod-teal);
  background: rgba(13, 148, 136, 0.05);
}

.settings-radio-pill.active {
  border-color: #0d9488;
  background: rgba(13, 148, 136, 0.12);
  box-shadow: 0 0 0 1px #0d9488;
}

.region-select-card {
  cursor: pointer;
  border: 1px solid var(--aquapod-border);
  background: var(--aquapod-bg);
  border-radius: 14px;
  padding: 1.25rem;
  transition: all 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.region-select-card:hover {
  border-color: var(--aquapod-teal);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.region-select-card.active {
  border-color: #0d9488;
  background: linear-gradient(145deg, rgba(13, 148, 136, 0.14) 0%, var(--aquapod-bg) 100%);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.35);
}

/* Segmented Control Pills for Health & Maintenance */
.segmented-pill-group {
  display: inline-flex;
  padding: 4px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--aquapod-border);
  border-radius: 9999px;
  gap: 4px;
}

.light-mode .segmented-pill-group {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-segmented-pill {
  border: none;
  background: transparent;
  color: var(--aquapod-text-muted);
  padding: 0.45rem 1.15rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 9999px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.btn-segmented-pill:hover {
  color: var(--aquapod-text-primary);
}

.btn-segmented-pill.active {
  background: #0d9488;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.4);
}

/* ==========================================================================
   SANOFI-INSPIRED FLAWLESS SYMMETRICAL HEADER & HORIZONTAL STEP FLOW
   ========================================================================== */

/* ==========================================================================
   1. ROOT SCROLLABILITY & OVERFLOW FIX (ENSURE FULL NATURAL SCROLLING)
   ========================================================================== */

/* Completely hide sidebar and backdrops */
.sidebar, .sidebar-main, .sidebar-backdrop {
  display: none !important;
}

html {
  height: 100% !important;
  min-height: 100% !important;
  max-width: 100vw !important;
  width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

body {
  min-height: 100vh !important;
  height: auto !important;
  max-width: 100vw !important;
  width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
}

.page-content {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 0 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 0 !important;
  margin: 0 !important;
}

.content-wrapper {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 0 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 0 !important;
  margin: 0 !important;
}

.content-inner {
  display: block !important;
  width: 100% !important;
  max-width: 1680px !important;
  margin: 0 auto !important;
  padding: 2rem 2.5rem !important;
  height: auto !important;
  min-height: 100% !important;
  overflow: visible !important;
}

@media (max-width: 768px) {
  .content-inner {
    padding: 1.25rem 1rem !important;
  }
}

/* ==========================================================================
   2. FLAWLESS DUAL-TIER SANOFI ENTERPRISE HEADER & HORIZONTAL SWIPE NAVIGATION
   ========================================================================== */

.navbar-top {
  position: sticky !important;
  top: 0 !important;
  z-index: 1050 !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--aquapod-surface) !important;
  border-bottom: 1px solid var(--aquapod-border) !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.25), 0 2px 6px -1px rgba(0, 0, 0, 0.12) !important;
  padding: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

[data-color-theme="light"] .navbar-top,
.light-mode .navbar-top {
  background-color: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
}

/* Tier 1: Brand & Profile Primary Row */
.navbar-header-primary {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 68px !important;
  padding: 0.35rem 1.25rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border-bottom: 1px solid var(--aquapod-border-subtle) !important;
  gap: 0.75rem !important;
}

[data-color-theme="light"] .navbar-header-primary,
.light-mode .navbar-header-primary {
  border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

/* Brand Lockup */
.navbar-brand-wrapper {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  overflow: visible !important;
}

.brand-link,
.brand-link:focus,
.brand-link:hover,
.brand-link:active {
  display: inline-flex !important;
  align-items: center !important;
  text-decoration: none !important;
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

/* Strictly Constrain AquaPod Header Logo Image Dimensions */
.brand-logo-img,
.navbar-brand-wrapper img,
.brand-link img,
header .brand-logo-img,
img.brand-logo-img {
  height: 54px !important;
  width: auto !important;
  max-height: 60px !important;
  max-width: 180px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: middle !important;
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.brand-link:hover .brand-logo-img {
  transform: scale(1.03);
}

@media (max-width: 767.98px) {
  .brand-logo-img,
  .navbar-brand-wrapper img,
  .brand-link img,
  header .brand-logo-img,
  img.brand-logo-img {
    height: 50px !important;
    max-height: 56px !important;
    width: auto !important;
    max-width: 165px !important;
    display: block !important;
    border: none !important;
    box-shadow: none !important;
  }
}

@media (max-width: 480px) {
  .brand-logo-img,
  .navbar-brand-wrapper img,
  .brand-link img,
  header .brand-logo-img,
  img.brand-logo-img {
    height: 46px !important;
    max-height: 50px !important;
    width: auto !important;
    max-width: 150px !important;
    display: block !important;
    border: none !important;
    box-shadow: none !important;
  }
}

.brand-logo-mark {
  width: 32px !important;
  height: 32px !important;
  border-radius: 9px !important;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.22) 0%, rgba(6, 182, 212, 0.12) 100%) !important;
  border: 1px solid rgba(20, 184, 166, 0.4) !important;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.15) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  outline: none !important;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.brand-link:hover .brand-logo-mark {
  transform: scale(1.05);
  border-color: rgba(20, 184, 166, 0.65) !important;
}

.brand-title {
  font-size: 1.125rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.025em !important;
  line-height: 1.1 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--aquapod-text) !important;
}

.brand-title .accent {
  color: var(--aquapod-teal-hover) !important;
}

.brand-badge {
  background: rgba(13, 148, 136, 0.15) !important;
  color: #14b8a6 !important;
  border: 1px solid rgba(20, 184, 166, 0.35) !important;
  font-size: 0.58rem !important;
  font-weight: 700 !important;
  padding: 1.5px 5px !important;
  border-radius: 4px !important;
  margin-top: 2px !important;
  letter-spacing: 0.05em !important;
  line-height: 1.1 !important;
  display: inline-flex !important;
  align-items: center !important;
  text-transform: uppercase !important;
}

/* Center Status Pill */
.header-status-pill {
  background: var(--aquapod-pill-bg) !important;
  border: 1px solid var(--aquapod-border) !important;
  border-radius: 9999px !important;
  padding: 4px 14px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
}

/* User Profile & Dropdown */
.navbar-profile-wrapper {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
}

.header-profile-link {
  display: inline-flex !important;
  align-items: center !important;
  padding: 2px 8px !important;
  border-radius: 9999px !important;
  text-decoration: none !important;
  transition: background-color 0.2s ease !important;
  border: 1px solid transparent !important;
}

.header-profile-link:hover {
  background: rgba(13, 148, 136, 0.1) !important;
  border-color: rgba(13, 148, 136, 0.2) !important;
}

.header-avatar-circle {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  background: var(--aquapod-metric-bg) !important;
  border: 1px solid var(--aquapod-border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

/* Tier 2: Horizontal Swipeable Module & Utility Bar */
.navbar-swipe-row {
  width: 100% !important;
  background: var(--aquapod-surface-raised) !important;
  padding: 0 !important;
  position: relative !important;
  min-height: 44px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  border-bottom: 1px solid var(--aquapod-border) !important;
}

[data-color-theme="light"] .navbar-swipe-row,
.light-mode .navbar-swipe-row {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.nav-swipe-container {
  width: 100% !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  white-space: nowrap !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  scroll-behavior: smooth !important;
  gap: 0.75rem !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
  cursor: grab;
  user-select: none;
  touch-action: pan-x !important;
  pointer-events: auto !important;
}

.nav-swipe-container:active,
.nav-swipe-container.is-dragging {
  cursor: grabbing !important;
}

.nav-swipe-container::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.navbar-center-nav {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.35rem !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-wrap: nowrap !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

.navbar-center-nav .nav-header-link {
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--aquapod-text-muted) !important;
  padding: 0.3rem 0.7rem !important;
  border-radius: 9999px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-decoration: none !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.01em !important;
}

.navbar-center-nav .nav-header-link:hover {
  color: var(--aquapod-text) !important;
  background: rgba(13, 148, 136, 0.1) !important;
  border-color: rgba(13, 148, 136, 0.25) !important;
}

.navbar-center-nav .nav-header-link.active {
  background: #0d9488 !important;
  color: #ffffff !important;
  border-color: #0d9488 !important;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.35) !important;
}

/* Nav Swipe Vertical Divider */
.nav-swipe-divider {
  width: 1px !important;
  height: 20px !important;
  background: var(--aquapod-border) !important;
  margin: 0 0.45rem !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

/* Actions in Swipeable Bar */
.navbar-actions-wrapper {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

.navbar-actions-wrapper .btn,
.navbar-actions-wrapper .dropdown-toggle,
.navbar-actions-wrapper .theme-toggle-btn {
  height: 29px !important;
  font-size: 0.74rem !important;
  padding: 0.2rem 0.65rem !important;
  border-radius: 9999px !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
}

/* Multi-Device Mobile-First Responsive Breakpoints */
@media (max-width: 991.98px) {
  .navbar-header-primary {
    padding: 0.35rem 0.85rem !important;
  }
  .navbar-swipe-row {
    padding: 0.25rem 0.5rem !important;
  }
}

@media (max-width: 767.98px) {
  .navbar-header-primary {
    padding: 0.35rem 0.85rem !important;
    min-height: 64px !important;
  }
  .brand-title {
    font-size: 1.05rem !important;
  }
  .brand-badge {
    font-size: 0.55rem !important;
    padding: 1px 4px !important;
  }
  .sanofi-hero-section {
    padding: 1.35rem 1rem !important;
    border-radius: 14px !important;
    margin-bottom: 1.25rem !important;
  }
  .sanofi-hero-title {
    font-size: 1.45rem !important;
    line-height: 1.25 !important;
  }
  .sanofi-hero-subtitle {
    font-size: 0.875rem !important;
    line-height: 1.55 !important;
    margin-bottom: 1rem !important;
  }
  .hero-cta-button-group {
    gap: 8px !important;
  }
  .hero-cta-btn {
    font-size: 0.75rem !important;
    padding: 6px 12px !important;
  }
  .content-inner {
    padding: 0.85rem !important;
  }
  .echart-container {
    height: 260px !important;
  }
  .echart-container-lg {
    height: 300px !important;
  }
}

@media (max-width: 480px) {
  .navbar-header-primary {
    padding: 0.3rem 0.65rem !important;
    min-height: 62px !important;
  }
  .brand-logo-img {
    width: auto !important;
    height: 46px !important;
    max-height: 50px !important;
    max-width: 150px !important;
  }
  .brand-logo-mark {
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
  }
  .brand-title {
    font-size: 0.96rem !important;
  }
  .brand-badge {
    font-size: 0.52rem !important;
  }
  .metric-box {
    padding: 0.9rem 1rem !important;
    min-height: 96px !important;
  }
  .metric-value {
    font-size: 1.45rem !important;
  }
}

/* ==========================================================================
   3. GOOGLE MAPS MULTI-PIN & LEFT-HAND STATION DIRECTORY SIDEBAR
   ========================================================================== */

.station-directory-card {
  background: var(--aquapod-surface);
  border: 1px solid var(--aquapod-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

.station-directory-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(13, 148, 136, 0.35) transparent;
}

.station-directory-list::-webkit-scrollbar {
  width: 5px;
}

.station-directory-list::-webkit-scrollbar-thumb {
  background: rgba(13, 148, 136, 0.35);
  border-radius: 999px;
}

.station-item-card {
  background: var(--aquapod-bg);
  border: 1px solid var(--aquapod-border);
  border-radius: 9px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.45rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.station-item-card:hover {
  background: rgba(13, 148, 136, 0.08);
  border-color: rgba(13, 148, 136, 0.4);
  transform: translateX(2px);
}

.station-item-card.active {
  background: rgba(13, 148, 136, 0.16) !important;
  border-color: #0d9488 !important;
  border-left: 3px solid #0d9488 !important;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.22);
}

.station-item-card.asean-expansion-card {
  border-left: 3px solid rgba(245, 158, 11, 0.45) !important;
}

.station-item-card.asean-expansion-card:hover {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.5) !important;
  transform: translateX(2px);
}

.station-item-card.asean-expansion-card.active {
  background: rgba(245, 158, 11, 0.16) !important;
  border-color: #f59e0b !important;
  border-left: 3px solid #f59e0b !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}

.station-category-header {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--aquapod-teal);
  padding: 0.4rem 0.5rem 0.25rem 0.5rem;
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Google Maps Multi-Pin Interactive Layer */
.google-maps-pins-overlay {
  position: absolute;
  top: 48px;
  left: 0;
  width: 100%;
  height: calc(100% - 48px);
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.map-interactive-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-interactive-pin:hover {
  transform: translate(-50%, -50%) scale(1.15);
  z-index: 25;
}

.map-interactive-pin.active {
  transform: translate(-50%, -50%) scale(1.22);
  z-index: 35;
}

.map-interactive-pin .pin-pulse-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(13, 148, 136, 0.45);
  position: absolute;
  animation: pinPulseRing 2s infinite ease-out;
}

.map-interactive-pin.active .pin-pulse-ring {
  background: rgba(56, 189, 248, 0.6);
  animation: pinPulseRing 1.4s infinite ease-out;
}

@keyframes pinPulseRing {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

.map-interactive-pin .pin-marker-core {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0d9488;
  border: 2px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 10px rgba(13, 148, 136, 0.6);
  z-index: 2;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-interactive-pin:hover .pin-marker-core,
.map-interactive-pin.active .pin-marker-core {
  width: 26px;
  height: 26px;
  background: #0284c7;
  border-color: #38bdf8;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.85);
}

.map-interactive-pin .pin-marker-label {
  margin-top: 4px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(20, 184, 166, 0.45);
  border-radius: 6px;
  padding: 2.5px 8px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
  z-index: 2;
  transition: all 0.2s ease;
}

.map-interactive-pin:hover .pin-marker-label,
.map-interactive-pin.active .pin-marker-label {
  background: #0d9488;
  border-color: #2dd4bf;
  color: #ffffff;
}

/* ==========================================================================
   4. HORIZONTAL 6-STEP FLOW (STRICTLY SIDE-BY-SIDE BUTTONS)
   ========================================================================== */

.step-selector-ribbon {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 0.75rem !important;
  width: 100% !important;
  background: var(--aquapod-pill-bg) !important;
  padding: 0.65rem !important;
  border-radius: 14px !important;
  border: 1px solid var(--aquapod-border) !important;
  box-sizing: border-box !important;
}

@media (max-width: 991.98px) {
  .step-selector-ribbon {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.6rem !important;
  }
}

@media (max-width: 575.98px) {
  .step-selector-ribbon {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }
}

.step-ribbon-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.6rem !important;
  padding: 0.65rem 0.75rem !important;
  border-radius: 10px !important;
  border: 1px solid transparent !important;
  background: rgba(15, 23, 42, 0.45) !important;
  color: var(--aquapod-text-muted) !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  width: 100% !important;
  min-height: 48px !important;
  line-height: 1.25 !important;
  box-sizing: border-box !important;
}

.step-ribbon-btn .step-num {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--aquapod-teal) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.95rem !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
}

.step-ribbon-btn .step-label {
  display: flex !important;
  align-items: center !important;
  gap: 0.25rem !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

.step-ribbon-btn:hover {
  color: var(--aquapod-text-primary) !important;
  background: rgba(13, 148, 136, 0.12) !important;
  border-color: rgba(13, 148, 136, 0.35) !important;
}

.step-ribbon-btn.active {
  background: #0d9488 !important;
  color: #ffffff !important;
  border-color: #0d9488 !important;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35) !important;
}

.step-ribbon-btn.active .step-num {
  background: #ffffff !important;
  color: #0d9488 !important;
}

/* Focused Architecture Spotlight Display Card */
.arch-spotlight-card {
  border-radius: 14px;
  background: var(--aquapod-surface);
  border: 1px solid var(--aquapod-border);
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.25s ease;
}

.arch-spec-box {
  background: var(--aquapod-bg);
  border: 1px solid var(--aquapod-border);
  border-radius: 10px;
  padding: 1.15rem 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.arch-spec-box:hover {
  border-color: var(--aquapod-teal);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.15);
}

/* ==========================================================================
   5. SANOFI LIGHT SURFACE AESTHETIC & ENERGY HEALTH TREND GRAPHICS
   ========================================================================== */

/* Clean Light Surface Cards for Dispenser Chiller Dynamics & Active Station Matrix */
.energy-light-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.02) !important;
  overflow: hidden !important;
  transition: all 0.25s ease !important;
}

[data-color-theme="dark"] .energy-light-card {
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.energy-light-card .card-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

[data-color-theme="dark"] .energy-light-card .card-header {
  background: #182234 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}

.chiller-metric-tile {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 1.25rem !important;
  transition: all 0.2s ease !important;
}

[data-color-theme="dark"] .chiller-metric-tile {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.chiller-metric-tile:hover {
  transform: translateY(-2px);
  border-color: #14b8a6 !important;
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.12) !important;
}

.energy-matrix-table {
  background: #ffffff !important;
  color: #1e293b !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100% !important;
  margin-bottom: 0 !important;
}

[data-color-theme="dark"] .energy-matrix-table {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

.energy-matrix-table thead th {
  background: #f8fafc !important;
  color: #64748b !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 0.85rem 1rem !important;
  border-bottom: 1px solid #e2e8f0 !important;
  font-size: 0.72rem !important;
}

[data-color-theme="dark"] .energy-matrix-table thead th {
  background: #182234 !important;
  color: #94a3b8 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.energy-matrix-table tbody td {
  padding: 0.95rem 1rem !important;
  border-bottom: 1px solid #f1f5f9 !important;
  vertical-align: middle !important;
}

[data-color-theme="dark"] .energy-matrix-table tbody td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.energy-matrix-table tbody tr:hover td {
  background-color: rgba(13, 148, 136, 0.04) !important;
}

[data-color-theme="dark"] .energy-matrix-table tbody tr:hover td {
  background-color: rgba(13, 148, 136, 0.08) !important;
}

/* 100% Full-Width Graphics & Zero Left-Squeeze */
#chart_energy_dynamics,
#chart_energy_dynamics > div,
#chart_energy_dynamics canvas,
#chart_tds_dynamics,
#chart_tds_dynamics > div,
#chart_tds_dynamics canvas,
#chart_quality_process,
#chart_quality_process > div,
#chart_quality_process canvas,
#chart_pressure_profile,
#chart_pressure_profile > div,
#chart_pressure_profile canvas {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  display: block !important;
}

/* ==========================================================================
   5. STRICT ROLE-BASED ACCESS CONTROL (RBAC) STYLING
   ========================================================================== */
body.role-viewer .rbac-operator-only,
body[data-user-role="viewer"] .rbac-operator-only,
body.role-viewer .operator-only,
body[data-user-role="viewer"] .operator-only {
  display: none !important;
}

/* ==========================================================================
   6. HOMEPAGE HERO CTA BUTTONS REFINEMENT (BREATHABLE WHITESPACE & ZERO COLLISION)
   ========================================================================== */
.hero-cta-button-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-cta-btn {
  font-size: 0.825rem !important; /* 13.2px */
  padding: 7px 16px !important;
  line-height: 1.45 !important;
  letter-spacing: -0.15px !important;
  white-space: nowrap !important;
  border-radius: 9999px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.hero-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
}

.hero-cta-btn:active {
  transform: translateY(0);
}

/* ==========================================================================
   OFFICIAL PHOSPHOR VECTOR BOTTLE GLYPH DEFINITION
   ========================================================================== */
.ph-bottle, i.ph-bottle {
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M152,72V40h8a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16h8V72a40,40,0,0,0-24,36.72V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V108.72A40,40,0,0,0,152,72ZM120,40h16V72H120ZM192,216a8,8,0,0,1-8,8H88a8,8,0,0,1-8-8V108.72A24,24,0,0,1,96,88h64a24,24,0,0,1,16,20.72Z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M152,72V40h8a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16h8V72a40,40,0,0,0-24,36.72V216a24,24,0,0,0,24,24h96a24,24,0,0,0,24-24V108.72A40,40,0,0,0,152,72ZM120,40h16V72H120ZM192,216a8,8,0,0,1-8,8H88a8,8,0,0,1-8-8V108.72A24,24,0,0,1,96,88h64a24,24,0,0,1,16,20.72Z'/%3E%3C/svg%3E") no-repeat center / contain;
  vertical-align: -0.125em;
}

/* ==========================================================================
   GLOBAL ENTERPRISE SPACING & CARD/BOX PADDING (GENEROUS WHITESPACE)
   ========================================================================== */
.card, .metric-box, .card-body {
  padding: 1.5rem !important;
}

.card-header {
  padding: 1.15rem 1.6rem !important;
}

.card-footer {
  padding: 1rem 1.6rem !important;
}

.metric-box {
  min-height: 120px !important;
}

.region-card {
  padding: 1.25rem 1.5rem !important;
  min-height: 120px !important;
}

.cwaas-sim-panel {
  padding: 1.5rem 1.75rem !important;
}

.station-item-card {
  padding: 0.85rem 1.15rem !important;
}

.mission-stat-pill {
  padding: 1.25rem 1.45rem !important;
}

.data-stat-box,
.stat-pill-box {
  padding: 1.25rem 1.5rem !important;
}

.aquapod-mission-banner {
  padding: 1.75rem 2rem !important;
}

.nav-swipe-container {
  display: flex !important;
  flex-direction: row !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  white-space: nowrap !important;
  padding-left: 1.5rem !important;
  gap: 0.75rem !important;
}

.navbar-swipe-row {
  display: flex !important;
  flex-direction: row !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  white-space: nowrap !important;
  padding-left: 1.5rem !important;
  gap: 0.75rem !important;
}

@media (max-width: 991.98px) {
  .aquapod-mission-banner {
    padding: 1.4rem 1.5rem !important;
  }
}

@media (max-width: 767.98px) {
  .cwaas-sim-panel {
    padding: 1.25rem 1.35rem !important;
  }
  .aquapod-mission-banner {
    padding: 1.25rem 1.25rem !important;
  }
}

@media (max-width: 480px) {
  .cwaas-sim-panel {
    padding: 1.1rem 1.15rem !important;
  }
  .mission-stat-pill {
    padding: 1rem 1.15rem !important;
  }
  .nav-swipe-container {
    padding-left: 1.5rem !important;
    gap: 0.75rem !important;
  }
}

/* Generous Whitespace Overrides for Data Stat Boxes & Sub-Cards */
.p-2.5.rounded-3,
.p-2.5.rounded,
.p-2.rounded {
  padding: 1.25rem 1.5rem !important;
}

.card.p-3,
.card.p-4 {
  padding: 1.5rem !important;
}

.card-body.p-3 {
  padding: 1.5rem !important;
}

@media (max-width: 767.98px) {
  .p-2.5.rounded-3,
  .p-2.5.rounded,
  .p-2.rounded {
    padding: 1.15rem 1.25rem !important;
  }
}

/* ==========================================================================
   Clean Hydration Impact Card & Sub-Stat Boxes (Contrast & Whitespace)
   ========================================================================== */
.impact-card {
  padding: 1.25rem 1.25rem !important;
  background: var(--aquapod-surface) !important;
  border: 1px solid var(--aquapod-border) !important;
  border-radius: 16px !important;
}

[data-color-theme="light"] .impact-card,
.light-mode .impact-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

.impact-stat-box {
  padding: 1rem 1.25rem !important;
  border-radius: 12px !important;
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: all 0.2s ease !important;
}

.impact-stat-box:hover {
  border-color: rgba(13, 148, 136, 0.35) !important;
  transform: translateY(-1px);
}

[data-color-theme="light"] .impact-stat-box,
.light-mode .impact-stat-box {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

[data-color-theme="light"] .impact-stat-val,
.light-mode .impact-stat-val {
  color: #0f172a !important;
}

/* ==========================================================================
   GLOBAL UNIVERSAL BOX-SIZING & MOBILE BOX-FITTING OVERHAUL
   ========================================================================== */

/* Universal Fluid Width & Box Containment Across All Modules */
.card,
.metric-box,
.card-body,
.table td,
.table th,
.form-control,
.form-select,
.module-content,
.tab-module,
.sanofi-hero-section,
.aquapod-mission-banner,
.quick-access-hub,
.cwaas-sim-panel,
.impact-card,
.impact-stat-box,
.mission-stat-pill,
.arch-visual-step-card,
.btn-quick-hub,
.formula-banner,
.region-card,
.station-item-card,
.station-select-wrapper {
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Fluid Flex & Grid Containment */
.row,
.col,
[class*="col-"] {
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Map Containers Desktop Base */
.map-viewport-container {
  min-height: 540px;
  width: 100% !important;
  max-width: 100% !important;
}

.map-embed-iframe {
  width: 100% !important;
  height: 490px;
  border: 0;
  display: block;
}

.station-select-wrapper {
  max-width: 100% !important;
  min-width: 0 !important;
}

.station-select-wrapper select,
.form-select {
  max-width: 100% !important;
  min-width: 0 !important;
  word-break: break-word !important;
}

/* Global Text Wrapping and Word-Break Hygiene */
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6,
.card p, .card-body p,
.card span:not(.status-dot):not(.nav-header-link span),
.card-body span:not(.status-dot):not(.nav-header-link span),
.metric-label, .metric-value, .metric-sub,
.hub-title, .hub-desc,
.sanofi-hero-title, .sanofi-hero-subtitle,
.table td, .table th,
.badge:not(.status-dot):not(.badge-nowrap) {
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

/* Protected Horizontal Scroll & Explicit No-Wrap Elements */
.nav-swipe-container,
.navbar-swipe-row,
.nav-header-link,
.nav-header-link span,
#map_cluster_buttons,
.map-cluster-buttons,
.map-cluster-buttons .btn {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.status-dot {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  display: inline-block !important;
}

/* ==========================================================================
   MOBILE SURGICAL OVERHAUL (@media max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {

  /* 1. Universal Flex & Grid Wrapping Enforcements */
  .card .d-flex:not(.nav-swipe-container):not(.navbar-swipe-row):not(.map-cluster-buttons):not(#map_cluster_buttons),
  .card-header.d-flex,
  .card-body .d-flex:not(.nav-swipe-container):not(.navbar-swipe-row):not(.map-cluster-buttons):not(#map_cluster_buttons),
  .metric-box .d-flex,
  .sanofi-hero-section .d-flex,
  .aquapod-mission-banner .d-flex,
  .quick-access-hub .d-flex,
  .cwaas-sim-panel .d-flex,
  .impact-card .d-flex,
  .impact-stat-box .d-flex,
  .mission-stat-pill .d-flex,
  .tab-module .d-flex:not(.nav-swipe-container):not(.navbar-swipe-row):not(.navbar-header-primary):not(#map_cluster_buttons):not(.map-cluster-buttons),
  .content-inner .d-flex:not(.nav-swipe-container):not(.navbar-swipe-row):not(.navbar-header-primary):not(#map_cluster_buttons):not(.map-cluster-buttons),
  .d-flex.flex-mobile-wrap,
  .d-flex.align-items-center.justify-content-between:not(.navbar-header-primary):not(.navbar-swipe-row) {
    flex-wrap: wrap !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* Ensure no flex child forces an expanding inline min-content */
  .card .d-flex > *:not(.status-dot):not(.flex-shrink-0),
  .card-body .d-flex > *:not(.status-dot):not(.flex-shrink-0),
  .metric-box .d-flex > *:not(.status-dot):not(.flex-shrink-0),
  .tab-module .d-flex > *:not(.status-dot):not(.nav-header-link):not(.flex-shrink-0),
  .content-inner .d-flex > *:not(.status-dot):not(.flex-shrink-0) {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* 2. Strict Elimination of Text Clipping & Overflow */
  .card h1, .card h2, .card h3, .card h4, .card h5, .card h6,
  .card p,
  .card-body p,
  .card span:not(.status-dot):not(.nav-header-link span),
  .card-body span:not(.status-dot):not(.nav-header-link span),
  .card div:not(.nav-swipe-container):not(.navbar-swipe-row):not(#map_cluster_buttons):not(.map-cluster-buttons),
  .metric-value,
  .metric-label,
  .metric-sub,
  .hub-title,
  .hub-desc,
  .sanofi-hero-title,
  .sanofi-hero-subtitle,
  .table td,
  .table th,
  .table td span,
  .alert span,
  .mission-stat-pill div,
  .mission-stat-pill span,
  .badge:not(.status-dot),
  span.badge,
  .badge {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    max-width: 100% !important;
  }

  /* Dynamic font-size scaling for metric values */
  .metric-value {
    font-size: clamp(1.2rem, 5vw, 1.45rem) !important;
    line-height: 1.25 !important;
  }

  .metric-label,
  .metric-sub {
    font-size: 0.75rem !important;
    line-height: 1.35 !important;
  }

  /* 3. Form Selects, Dropdowns, and Badges Box-Fitting */
  .form-select,
  select.form-select,
  .station-select-wrapper select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
    font-size: 0.82rem !important;
  }

  .station-select-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.35rem !important;
  }

  .station-select-wrapper span {
    white-space: normal !important;
    word-break: break-word !important;
    max-width: 100% !important;
  }

  .dropdown-menu {
    max-width: calc(100vw - 1.5rem) !important;
    box-sizing: border-box !important;
  }

  .badge:not(.status-dot),
  span.badge,
  .badge {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1.35 !important;
    box-sizing: border-box !important;
    padding: 0.3rem 0.55rem !important;
    font-size: 0.72rem !important;
  }

  /* Button Groups Mobile Stacking */
  .btn-group[role="group"]:not(.btn-group-nowrap) {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .btn-group[role="group"]:not(.btn-group-nowrap) .btn {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 8px !important;
    margin-bottom: 4px !important;
    white-space: normal !important;
    word-break: break-word !important;
    text-align: left !important;
    font-size: 0.75rem !important;
    padding: 0.5rem 0.75rem !important;
    box-sizing: border-box !important;
  }

  /* 4. Viewport & Universal Margin/Padding Hygiene */
  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    width: 100% !important;
  }

  .page-content,
  .content-wrapper,
  .content-inner,
  .container,
  .container-fluid {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    box-sizing: border-box !important;
  }

  .row {
    margin-left: -0.375rem !important;
    margin-right: -0.375rem !important;
    width: calc(100% + 0.75rem) !important;
    max-width: calc(100% + 0.75rem) !important;
  }

  .row > * {
    padding-left: 0.375rem !important;
    padding-right: 0.375rem !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* 5. Card, Metric Box, and Container Whitespace Hygiene */
  .card,
  .card-body,
  .metric-box,
  .card.p-3,
  .card.p-4,
  .card.p-3.5,
  .card-body.p-3,
  .card-body.p-4,
  .card-body.p-3.5 {
    padding: 1rem !important;
    min-height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .card-header {
    padding: 0.75rem 0.85rem !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .metric-box {
    min-height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: hidden !important;
  }

  /* 6. Sanofi-Inspired Hero & Mission Spotlight Banner Mobile Adaptations */
  .sanofi-hero-section {
    padding: 1.25rem 1rem !important;
    border-radius: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .sanofi-hero-title {
    font-size: 1.35rem !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
  }

  .sanofi-hero-subtitle {
    font-size: 0.82rem !important;
    line-height: 1.5 !important;
    word-break: break-word !important;
  }

  .hero-cta-button-group {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }

  .hero-cta-btn {
    width: 100% !important;
    font-size: 0.82rem !important;
    padding: 0.55rem 1rem !important;
    justify-content: center !important;
  }

  .aquapod-mission-banner {
    padding: 1.25rem 1rem !important;
    border-radius: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .mission-stat-pill {
    padding: 0.75rem 0.85rem !important;
    min-height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 7. Quick-Access Subsystem Hub Mobile Sizing */
  .quick-access-hub {
    width: 100% !important;
    max-width: 100% !important;
  }

  .btn-quick-hub {
    padding: 0.85rem 0.75rem !important;
    min-height: 110px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .btn-quick-hub .hub-title {
    font-size: 0.8rem !important;
    word-break: break-word !important;
  }

  .btn-quick-hub .hub-desc {
    font-size: 0.7rem !important;
    word-break: break-word !important;
  }

  /* 8. Map Viewport & Regional Cluster Pins Mobile Refactor */
  .map-viewport-container {
    min-height: auto !important;
    height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 1.25rem !important;
  }

  #aquapod_google_map_wrapper,
  #aquapod_gis_map_wrapper {
    min-height: auto !important;
    height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 12px !important;
    touch-action: pan-x pan-y !important;
    margin-bottom: 1.25rem !important;
  }

  #google_maps_iframe,
  .map-embed-iframe,
  #fleet_leaflet_map {
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
  }

  .map-cluster-ribbon {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0.65rem 0.85rem !important;
    position: relative !important;
    z-index: 20 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
    margin-bottom: 1.25rem !important;
  }

  .map-cluster-buttons,
  #map_cluster_buttons {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    white-space: nowrap !important;
    padding: 0.2rem 0.2rem 0.45rem 0.2rem !important;
    margin: 0 !important;
    gap: 0.4rem !important;
  }

  .map-cluster-buttons::-webkit-scrollbar,
  #map_cluster_buttons::-webkit-scrollbar {
    display: none !important;
  }

  .map-cluster-buttons .btn,
  #map_cluster_buttons .btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 0.75rem !important;
    padding: 0.35rem 0.75rem !important;
    border-radius: 9999px !important;
  }

  .map-hud-overlay {
    bottom: 8px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: calc(100% - 16px) !important;
    padding: 0.75rem 0.85rem !important;
    border-radius: 12px !important;
    max-height: 280px !important;
    overflow-y: auto !important;
    z-index: 1050 !important;
    box-sizing: border-box !important;
  }

  /* Water Quality & Telemetry Chart Graphics Repair */
  .echarts-telemetry-canvas,
  #chart_tds_dynamics,
  #chart_quality_process,
  .chart-canvas-wrapper,
  .telemetry-chart-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 240px !important;
    min-height: 240px !important;
    max-height: 240px !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: hidden !important;
  }

  .echarts-telemetry-canvas > div,
  .echarts-telemetry-canvas canvas,
  #chart_tds_dynamics > div,
  #chart_tds_dynamics canvas,
  #chart_quality_process > div,
  #chart_quality_process canvas {
    width: 100% !important;
    max-width: 100% !important;
    height: 240px !important;
    max-height: 240px !important;
  }

  #chart_energy_dynamics,
  #chart_pressure_profile {
    width: 100% !important;
    max-width: 100% !important;
    height: 260px !important;
    min-height: 260px !important;
  }

  /* 9. Sub-cards, Metric Boxes, and Personal CWaaS Consistency */
  .p-2.5.rounded-3,
  .p-2.5.rounded,
  .p-2.rounded {
    padding: 0.75rem 0.85rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .impact-card {
    padding: 0.85rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .impact-stat-box {
    padding: 0.75rem 0.85rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .cwaas-sim-panel {
    padding: 0.85rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .dispense-btn-vol {
    padding: 0.5rem 0.35rem !important;
    font-size: 0.78rem !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .quota-circle-hud {
    width: 140px !important;
    height: 140px !important;
    margin: 0.5rem auto !important;
  }

  .quota-val-num {
    font-size: 1.75rem !important;
  }

  /* 10. 6-Step Visual Architecture Ribbon Mobile Fluidity (2 Columns of 3) */
  .step-selector-ribbon {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0.75rem !important;
  }

  .step-ribbon-btn {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.6rem !important;
    min-height: 52px !important;
    padding: 0.65rem 0.75rem !important;
    border-radius: 10px !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.25 !important;
    text-align: left !important;
    box-sizing: border-box !important;
  }

  .step-ribbon-btn .step-num {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    font-size: 0.95rem !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .step-ribbon-btn .step-label {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    min-width: 0 !important;
    white-space: normal !important;
    word-break: break-word !important;
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
  }

  /* 11. Tables & Data Grids Responsiveness */
  .table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 8px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 0.5rem !important;
    box-sizing: border-box !important;
  }

  .table-responsive table {
    width: 100% !important;
    min-width: 520px;
    table-layout: auto !important;
  }

  .table-dark-custom th,
  .table-dark-custom td,
  .energy-matrix-table th,
  .energy-matrix-table td {
    padding: 0.55rem 0.7rem !important;
    font-size: 0.78rem !important;
  }

  /* 12. Component Progress Bars & Health Indicators */
  .progress {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}

/* ==========================================================================
   CARD & INNER SPACING FLUID SCALING FOR SCREENS BELOW 576px
   ========================================================================== */
@media (max-width: 576px) {
  /* Enforce 1rem padding across all cards and metric boxes */
  .card,
  .card-body,
  .metric-box,
  .card.p-3,
  .card.p-4,
  .card.p-3.5,
  .card-body.p-3,
  .card-body.p-4,
  .card-body.p-3.5,
  .content-inner {
    padding: 1rem !important;
  }

  .card-header {
    padding: 0.75rem 1rem !important;
  }

  .sanofi-hero-section,
  .aquapod-mission-banner,
  .cwaas-sim-panel,
  .impact-card {
    padding: 1rem !important;
  }

  .p-2.5.rounded-3,
  .p-2.5.rounded,
  .p-2.rounded,
  .p-3.rounded-3 {
    padding: 0.75rem 0.85rem !important;
  }

  .btn-quick-hub {
    padding: 0.7rem 0.65rem !important;
    min-height: 100px !important;
  }

  .mission-stat-pill {
    padding: 0.65rem 0.75rem !important;
  }

  .quota-circle-hud {
    width: 135px !important;
    height: 135px !important;
  }

  .quota-val-num {
    font-size: 1.65rem !important;
  }

  /* Inner grids use fluid percentages / flex */
  .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .row > * {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex-shrink: 0 !important;
  }

  .col-6 {
    width: 50% !important;
    max-width: 50% !important;
  }
}

/* ==========================================================================
   VIEWPORTS UNDER 480px (e.g., iPhone 16 Pro Max, Standard Android Phablets)
   ========================================================================== */
@media (max-width: 480px) {
  /* Strict enforcement of uniform 1rem padding across all cards and metric boxes */
  .card,
  .card-body,
  .metric-box,
  .card.p-3,
  .card.p-4,
  .card.p-3.5,
  .card-body.p-3,
  .card-body.p-4,
  .card-body.p-3.5,
  .content-inner {
    padding: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .card h1, .card h2, .card h3, .card h4, .card h5, .card h6,
  .card-title,
  .card p,
  .card-body p,
  .card span:not(.status-dot):not(.nav-header-link span),
  .card-body span:not(.status-dot):not(.nav-header-link span),
  .badge:not(.status-dot):not(.badge-nowrap) {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
}

/* ==========================================================================
   EXTRA-NARROW MOBILE SCREENS (<= 380px, e.g. iPhone SE, Small Android)
   ========================================================================== */
@media (max-width: 380px) {
  .card,
  .card-body,
  .metric-box,
  .card.p-3,
  .card.p-4,
  .card.p-3.5,
  .card-body.p-3,
  .card-body.p-4,
  .card-body.p-3.5,
  .content-inner {
    padding: 1rem !important;
    box-sizing: border-box !important;
  }

  .metric-value {
    font-size: 1.15rem !important;
  }

  .quota-circle-hud {
    width: 125px !important;
    height: 125px !important;
  }

  .quota-val-num {
    font-size: 1.45rem !important;
  }

  .dispense-btn-vol {
    padding: 0.45rem 0.2rem !important;
    font-size: 0.72rem !important;
  }

  .btn-quick-hub {
    padding: 0.55rem 0.45rem !important;
    min-height: 95px !important;
  }

  .btn-quick-hub .hub-icon-box {
    width: 34px !important;
    height: 34px !important;
    font-size: 1.15rem !important;
    margin-bottom: 0.45rem !important;
  }
}

/* ========================================================================== */
/* AQUAPOD OS: MASTER CROSS-DEVICE UI/UX UNIFICATION STYLESHEET INTEGRATION   */
/* ========================================================================== */

/* 1. Universal Fluid Layouts & Containers */
.page-container, 
.dashboard-wrapper {
  width: 100% !important;
  max-width: 1440px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1rem !important;
  padding-right: 1.0rem !important;
}

@media (min-width: 640px) {
  .page-container, .dashboard-wrapper {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
}

@media (min-width: 1024px) {
  .page-container, .dashboard-wrapper {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
}

/* 2. Typography & Scale Consistency */
.page-title {
  font-size: clamp(1.35rem, 4vw, 2.25rem) !important;
  line-height: 1.25 !important;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.15rem, 3vw, 1.75rem) !important;
  line-height: 1.3 !important;
  font-weight: 600;
}

.sensor-metric-value {
  font-size: clamp(1.5rem, 5vw, 2.75rem) !important;
  font-weight: 800;
  line-height: 1.1;
}

/* 3. Boxes, Cards & Uniform Grid Alignment */
.module-panel, 
.sensor-card, 
.control-box {
  width: 100% !important;
  max-width: 100% !important;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem !important;
  padding: 1.125rem !important;
  margin-bottom: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .module-panel, .sensor-card, .control-box {
    padding: 1.5rem !important;
  }
}

.aquapod-grid {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 1rem !important;
  width: 100% !important;
}

@media (min-width: 640px) {
  .aquapod-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (min-width: 1024px) {
  .aquapod-grid.three-col {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .aquapod-grid.four-col {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* 4. Graphic Design, Charts, & Data Visualization Wrappers */
.chart-container {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 240px;
  max-height: 360px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 0.75rem;
  padding: 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
  max-height: 340px;
}

/* 5. Touch Targets & Interactive UX (Minimum 44x44px) */
.btn-action, 
.interactive-toggle {
  min-height: 44px !important;
  min-width: 44px !important;
  padding: 0.75rem 1rem !important;
  font-size: 1rem !important;
  border-radius: 0.625rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-in-out;
}

.btn-action:active, 
.interactive-toggle:active {
  transform: scale(0.98);
}

/* ========================================================================== */
/* 6. FULL-WIDTH GEOGRAPHIC MAP WRAPPER & RESPONSIVE CANVAS                   */
/* ========================================================================== */
/* Force the map container and Leaflet canvas to take 100% full width */
.map-section-wrapper, 
.map-container {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Ensure the map element takes full screen width and proper responsive height */
#map, .leaflet-container {
  width: 100% !important;
  max-width: 100% !important;
  height: 480px !important;
}

@media (min-width: 768px) {
  #map, .leaflet-container {
    height: 600px !important; /* Expands nicely on larger tablet & desktop displays */
  }
}

/* Leaflet Dark Custom Popup Styling */
.leaflet-popup-content-wrapper {
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

.leaflet-popup-tip {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}




