/*
Theme Name: PSO Digital Station Theme
Theme URI: https://yourdomain.com
Author: Antigravity
Author URI: https://yourdomain.com
Description: A premium, cloud-based secure Petrol Station Management & Inventory Tracker theme for full-screen cPanel portals.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: pso-digital-station
*/

/* ==========================================================================
   PSO DIGITAL STATION - VISUAL DESIGN SYSTEM (app.css)
   Aesthetic Principles: Glassmorphism, Midnight Dark Mode, Harmonious HSL
   Optimized for: Desktop responsive & Samsung S25 Ultra (Android Native Feel)
   ========================================================================== */

/* --- CORE VARIABLES & PALETTES --- */
:root {
  /* HSL Tailored Colors */
  --hue-base: 222;
  --bg-primary: hsl(var(--hue-base), 47%, 7%);
  --bg-secondary: hsl(var(--hue-base), 40%, 12%);
  --card-bg: hsla(var(--hue-base), 35%, 15%, 0.7);
  --card-hover: hsla(var(--hue-base), 35%, 20%, 0.8);
  --text-primary: hsl(var(--hue-base), 20%, 96%);
  --text-secondary: hsl(var(--hue-base), 15%, 70%);
  --text-muted: hsl(var(--hue-base), 12%, 50%);
  
  /* Brand Fuel Glow Accents */
  --primary-accent: hsl(200, 100%, 50%); /* PSO Cyan */
  --primary-glow: hsla(200, 100%, 50%, 0.25);
  
  --accent-green: hsl(150, 80%, 40%); /* Excess / Profit */
  --accent-green-glow: hsla(150, 80%, 40%, 0.2);
  
  --accent-red: hsl(0, 84%, 60%); /* Shortage / Loss */
  --accent-red-glow: hsla(0, 84%, 60%, 0.2);
  
  --accent-blue: hsl(210, 100%, 56%); /* Normal / Net */
  --accent-blue-glow: hsla(210, 100%, 56%, 0.2);
  
  --accent-yellow: hsl(38, 92%, 50%); /* Warning / Alerts */
  --accent-yellow-glow: hsla(38, 92%, 50%, 0.2);
  
  /* Borders and Glass */
  --border-light: hsla(var(--hue-base), 30%, 25%, 0.5);
  --border-glow: hsla(var(--hue-base), 30%, 35%, 0.7);
  --glass-blur: blur(12px);
  
  /* Spacers & Interface Curves */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Light Theme Overrides (High Contrast Accessibility Mode) */
.light-theme {
  --bg-primary: hsl(var(--hue-base), 20%, 96%);
  --bg-secondary: hsl(var(--hue-base), 25%, 90%);
  --card-bg: hsla(var(--hue-base), 20%, 100%, 0.85);
  --card-hover: hsla(var(--hue-base), 20%, 98%, 0.9);
  --text-primary: hsl(var(--hue-base), 50%, 10%);
  --text-secondary: hsl(var(--hue-base), 30%, 25%);
  --text-muted: hsl(var(--hue-base), 20%, 45%);
  --border-light: hsla(var(--hue-base), 20%, 80%, 0.8);
  --border-glow: hsla(var(--hue-base), 20%, 70%, 0.9);
  --primary-glow: hsla(200, 100%, 40%, 0.15);
}

/* --- RESET & BASIC DECORATIONS --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease;
}

/* Dynamic glowing background blobs */
.bg-gradient-glow {
  position: fixed;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.22;
  transition: opacity 0.5s ease;
}
.bg-gradient-glow.top-left {
  background: radial-gradient(circle, var(--primary-accent), transparent 70%);
  top: -10%;
  left: -10%;
}
.bg-gradient-glow.bottom-right {
  background: radial-gradient(circle, var(--accent-green), transparent 70%);
  bottom: -10%;
  right: -10%;
}

/* --- SCROLLBAR SYSTEM --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-glow);
}

/* --- REUSABLE UTILITIES & BADGES --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.text-green { color: var(--accent-green) !important; }
.text-red { color: var(--accent-red) !important; }
.text-blue { color: var(--accent-blue) !important; }
.text-yellow { color: var(--accent-yellow) !important; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge.green {
  background: var(--accent-green-glow);
  color: var(--accent-green);
  border: 1px solid hsla(150, 80%, 40%, 0.3);
}
.badge.red {
  background: var(--accent-red-glow);
  color: var(--accent-red);
  border: 1px solid hsla(0, 84%, 60%, 0.3);
}
.badge.blue {
  background: var(--accent-blue-glow);
  color: var(--accent-blue);
  border: 1px solid hsla(210, 100%, 56%, 0.3);
}
.badge.yellow {
  background: var(--accent-yellow-glow);
  color: var(--accent-yellow);
  border: 1px solid hsla(38, 92%, 50%, 0.3);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.green { background-color: var(--accent-green); box-shadow: 0 0 8px var(--accent-green); }
.status-dot.red { background-color: var(--accent-red); box-shadow: 0 0 8px var(--accent-red); }
.status-dot.yellow { background-color: var(--accent-yellow); box-shadow: 0 0 8px var(--accent-yellow); }

.hidden { display: none !important; }
.margin-top { margin-top: 24px; }
.margin-bottom { margin-bottom: 24px; }
.span-full { grid-column: 1 / -1; }

/* --- CORE APP WRAPPER CONTROLLER --- */
.app-container {
  max-width: 1560px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  position: relative;
  transition: all 0.4s ease;
}

/* ==========================================================================
   SAMSUNG S25 ULTRA BEZEL FRAME WRAPPER (Visual Wow Emulator)
   ========================================================================== */
.app-container.emulator-mode {
  max-width: 412px;
  height: 915px; /* S25 Ultra exact aspect ratio scale */
  margin: 40px auto;
  border: 12px solid #1a1a1a;
  border-radius: 44px;
  background-color: var(--bg-primary);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 
              0 0 0 4px #2b2b2b,
              0 0 40px var(--primary-glow);
  overflow: hidden;
  padding: 0;
  position: relative;
}

/* Punch-hole camera simulator for Samsung S25 Ultra */
.app-container.emulator-mode::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background-color: #0b0b0b;
  border-radius: 50%;
  border: 1.5px solid #222;
  z-index: 1000;
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.2);
}

/* Android Status bar padding on mobile preview */
.app-container.emulator-mode .system-header {
  padding-top: 36px;
  border-radius: 32px 32px 0 0;
}

.app-container.emulator-mode .main-content {
  height: calc(100% - 105px);
  overflow-y: auto;
}

/* Make body dark slate when emulator runs to pop the frame */
body:has(.app-container.emulator-mode) {
  background-color: #05070c;
}

/* Switch off emulator mode on thin screens */
@media (max-width: 768px) {
  .app-container.emulator-mode {
    max-width: 100%;
    height: 100vh !important;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 8px;
  }
  .app-container.emulator-mode::before {
    display: none;
  }
  .app-container.emulator-mode .system-header {
    padding-top: 12px;
  }
}

/* --- SYSTEM GLOBAL HEADER --- */
.system-header {
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
  z-index: 100;
  background-color: transparent;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--text-primary), var(--primary-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.04em;
}
.logo-text span {
  font-weight: 400;
  opacity: 0.8;
}
.offline-badge {
  background: hsla(150, 80%, 40%, 0.1);
  border: 1px solid hsla(150, 80%, 40%, 0.2);
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language Selection wrapper */
.custom-select-wrapper select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: var(--transition-smooth);
}
.custom-select-wrapper select:focus {
  border-color: var(--primary-accent);
}

/* --- ICON & GENERAL BUTTONS --- */
.icon-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}
.icon-btn:hover {
  border-color: var(--border-glow);
  color: var(--text-primary);
  background-color: var(--card-hover);
}
.icon-btn .alert-count-indicator {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--accent-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
  outline: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary-accent), hsl(210, 100%, 46%));
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-secondary {
  background: var(--bg-secondary);
  border-color: var(--border-light);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: var(--card-hover);
}
.btn-block { width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* --- FORMS & INPUT FIELD ELEMENTS --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.form-group input, 
.form-group select, 
.form-group textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}
.form-group input:focus, 
.form-group select:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background-color: var(--bg-primary);
}
.form-group.flex-row {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   VIEW CONTROLS & ANIMATIONS
   ========================================================================== */
.main-content {
  flex: 1;
  position: relative;
}
.app-view {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  width: 100%;
}
.app-view.active {
  display: block;
  opacity: 1;
  animation: fadeIn 0.4s ease forwards;
}

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

/* ==========================================================================
   VIEW 1: CUSTOMER PORTAL AESTHETICS
   ========================================================================== */
.customer-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 24px;
  margin-top: 16px;
}
@media (max-width: 1024px) {
  .customer-layout {
    grid-template-columns: 1fr;
  }
}

.customer-card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.rates-panel h2, .awareness-panel h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.rates-time-stamp {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Customer Price grid list */
.customer-rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.c-rate-card {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}
.c-rate-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
}
.c-rate-card.petrol {
  background: linear-gradient(135deg, hsla(200, 100%, 50%, 0.05), hsla(200, 100%, 50%, 0.15));
}
.c-rate-card.hsd {
  background: linear-gradient(135deg, hsla(150, 80%, 40%, 0.05), hsla(150, 80%, 40%, 0.15));
}
.c-rate-card.hobc {
  background: linear-gradient(135deg, hsla(38, 92%, 50%, 0.05), hsla(38, 92%, 50%, 0.15));
}

.c-rate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.product-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.c-rate-card.petrol .product-badge { color: var(--primary-accent); }
.c-rate-card.hsd .product-badge { color: var(--accent-green); }
.c-rate-card.hobc .product-badge { color: var(--accent-yellow); }

.c-rate-value {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 16px;
}

.c-rate-helper {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.c-rate-helper strong {
  color: var(--text-primary);
}

/* Interactive Calculator Box inside customer panel */
.fuel-calculator-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border-light);
}
.fuel-calculator-box h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--primary-accent);
}
.calc-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 500px) {
  .calc-form {
    grid-template-columns: 1fr;
  }
}
.calc-result-display {
  margin-top: 20px;
  padding: 16px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-sm);
  text-align: center;
  border: 1px dashed var(--border-light);
}
.result-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.result-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-green);
  font-family: 'Outfit', sans-serif;
}
.result-value .unit {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-secondary);
}
.result-formula {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Customer Awareness Panel visuals */
.tips-carousel {
  margin-top: 16px;
}
.tip-slide {
  animation: fadeIn 0.4s ease;
}
.tip-image-placeholder {
  height: 180px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--card-hover));
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  position: relative;
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
}
.tip-image-placeholder svg {
  stroke: var(--primary-accent);
  margin-bottom: 12px;
}
.slide-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
}
.slide-badge.green { background-color: var(--accent-green); }

.tip-slide h4 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.tip-slide p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 24px 0;
}
.carousel-indicators .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-light);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.carousel-indicators .dot.active {
  background: var(--primary-accent);
  transform: scale(1.2);
}

/* Video Mock Frame */
.video-mock-box {
  background: #000;
  height: 150px;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-light);
  cursor: pointer;
}
.video-thumbnail {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 100%);
  position: relative;
}
.play-btn {
  width: 50px;
  height: 50px;
  background-color: var(--primary-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--primary-glow);
  transition: var(--transition-smooth);
}
.play-btn:hover {
  transform: scale(1.1);
}
.video-duration {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,0.7);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
}
.video-caption {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  max-width: 70%;
}

/* ==========================================================================
   VIEW 2: SECURE USER LOGIN GATE
   ========================================================================== */
.login-wrapper {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-light);
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  position: relative;
}
.back-link-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  margin-bottom: 24px;
  transition: var(--transition-smooth);
}
.back-link-btn:hover {
  color: var(--text-primary);
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.logo-text.large {
  font-size: 2.2rem;
}
.login-logo p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.password-input-wrapper input {
  width: 100%;
  padding-right: 48px;
}
.password-toggle {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.password-toggle:hover {
  color: var(--text-primary);
}

.checkbox-group label {
  font-weight: 500 !important;
  cursor: pointer;
}
.checkbox-group input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.error-banner {
  background: var(--accent-red-glow);
  color: var(--accent-red);
  border: 1px solid hsla(0, 84%, 60%, 0.3);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  animation: shake 0.3s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ==========================================================================
   VIEW 3: DASHBOARD VIEW CORE SYSTEM
   ========================================================================== */
.dashboard-banner {
  background: linear-gradient(135deg, var(--bg-secondary), var(--card-bg));
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  .dashboard-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}
.banner-left h2 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}
.banner-left p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.banner-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.sync-status-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 768px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

/* --- DASHBOARD VERTICAL SIDEBAR TABS --- */
.dashboard-sidebar {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
}
.user-profile-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
}
.user-profile-summary .avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: var(--primary-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}
.profile-text {
  display: flex;
  flex-direction: column;
}
.profile-text .user-name {
  font-size: 0.9rem;
  font-weight: 600;
}
.profile-text .user-role {
  margin-top: 4px;
}

.nav-tabs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
@media (max-width: 768px) {
  .nav-tabs-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }
}

.tab-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}
@media (max-width: 768px) {
  .tab-item {
    white-space: nowrap;
  }
}
.tab-item:hover {
  background-color: var(--card-hover);
  color: var(--text-primary);
}
.tab-item.active {
  background: linear-gradient(135deg, var(--bg-secondary), var(--border-light));
  color: var(--primary-accent);
  font-weight: 600;
  border-left: 3px solid var(--primary-accent);
}

/* --- DASHBOARD PANELS CONTROLLER --- */
.dashboard-panels-wrapper {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  min-height: 550px;
}

.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.panel-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.panel-section-header h3 {
  font-size: 1.3rem;
}

.panel-sub-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}
.panel-sub-card h4 {
  font-size: 1.05rem;
  margin-bottom: 16px;
  border-left: 3.5px solid var(--primary-accent);
  padding-left: 10px;
}

/* --- GRID LAYOUT FOR FORMS --- */
.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.grid-form.two-cols {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ==========================================================================
   MODULE 1: ADMIN OVERVIEW & DASHBOARD DETAILS
   ========================================================================== */
.metrics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition-smooth);
}
.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
}
.kpi-card.text-blue { border-top: 4px solid var(--accent-blue); }
.kpi-card.text-green { border-top: 4px solid var(--accent-green); }
.kpi-card.text-yellow { border-top: 4px solid var(--accent-yellow); }
.kpi-card.text-red { border-top: 4px solid var(--accent-red); }

.kpi-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.kpi-value {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 8px;
}
.kpi-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 1024px) {
  .charts-row {
    grid-template-columns: 1fr;
  }
}
.chart-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}
.chart-card h3 {
  font-size: 1rem;
  margin-bottom: 16px;
}
.chart-container {
  height: 220px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-grid-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 768px) {
  .kpi-grid-secondary {
    grid-template-columns: 1fr;
  }
}
.dashboard-kpi-subcard {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}
.dashboard-kpi-subcard h4 {
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.mini-pl-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mini-pl-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border-light);
}

.alert-list-embedded {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.alert-row-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  border-left: 3px solid transparent;
}
.alert-row-item.yellow { border-left-color: var(--accent-yellow); }
.alert-row-item.red { border-left-color: var(--accent-red); }
.alert-row-item.blue { border-left-color: var(--accent-blue); }

/* ==========================================================================
   MODULE 2: TANK STORAGE CARDS GRID
   ========================================================================== */
.tanks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.tank-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}
.tank-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
}
.tank-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.tank-card-title {
  font-weight: 700;
  font-size: 1rem;
}

/* Storage Bar Graphic visualization */
.tank-level-visualizer {
  height: 24px;
  background: var(--bg-primary);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  overflow: hidden;
  position: relative;
  margin-bottom: 16px;
}
.tank-fill-bar {
  height: 100%;
  transition: width 0.8s ease-in-out;
}
.tank-card.petrol .tank-fill-bar {
  background: linear-gradient(90deg, var(--accent-blue), var(--primary-accent));
}
.tank-card.hsd .tank-fill-bar {
  background: linear-gradient(90deg, var(--accent-green-glow), var(--accent-green));
}
.tank-card.hobc .tank-fill-bar {
  background: linear-gradient(90deg, var(--accent-yellow-glow), var(--accent-yellow));
}
.tank-fill-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.tank-kpi-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tank-kpi-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  padding-bottom: 4px;
  border-bottom: 1px solid hsla(var(--hue-base), 20%, 20%, 0.3);
}
.tank-kpi-row .value {
  font-weight: 600;
}

.ai-banner-overlay {
  background: hsla(200, 100%, 50%, 0.08);
  border: 1px dashed var(--primary-accent);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}
.ai-scanner-content h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}
.ai-scanner-content p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.progress-bar-container {
  height: 6px;
  background-color: var(--bg-primary);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}
.progress-bar-fill {
  height: 100%;
  background-color: var(--primary-accent);
  width: 0;
  transition: width 0.1s ease;
}
.scanner-results {
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   MODULE 3: NOZZLE SALES, DATA TABLES
   ========================================================================== */
.nozzle-layout {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 20px;
}
@media (max-width: 1024px) {
  .nozzle-layout {
    grid-template-columns: 1fr;
  }
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}
.data-table th, .data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
}
.data-table th {
  font-weight: 600;
  color: var(--text-secondary);
  background-color: var(--bg-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.data-table tbody tr:hover {
  background-color: var(--card-hover);
}
.data-table.small-text {
  font-size: 0.75rem;
}

/* ==========================================================================
   MODULE 4: STOCK REORDERING & DELIVERIES
   ========================================================================== */
.deliveries-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
}
@media (max-width: 1024px) {
  .deliveries-layout {
    grid-template-columns: 1fr;
  }
}

.planning-info-box {
  padding: 16px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
}
.planning-info-box p {
  font-size: 0.85rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.forecast-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.forecast-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}
.forecast-prod {
  font-weight: 700;
  font-size: 0.85rem;
}
.forecast-reorder {
  font-size: 0.85rem;
  text-align: right;
}

/* ==========================================================================
   MODULE 5: LUBE INVENTORY & PSO DRUMS
   ========================================================================== */
.drums-display-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.drum-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.drum-barrel-icon {
  width: 48px;
  height: 60px;
  background-color: var(--accent-blue-glow);
  border: 2px solid var(--accent-blue);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.drum-fill-indicator {
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: var(--accent-blue);
}
.drum-card-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.drum-title {
  font-weight: 700;
  font-size: 0.9rem;
}
.drum-stats {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.lube-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.lube-filters {
  display: flex;
  gap: 12px;
}
.search-box, .select-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
}

.lube-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.lube-item-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition-smooth);
}
.lube-item-card:hover {
  border-color: var(--border-glow);
}
.lube-item-name {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.lube-item-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}
.lube-item-margin {
  font-size: 0.75rem;
  background-color: var(--accent-green-glow);
  color: var(--accent-green);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 12px;
}
.lube-item-stock-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  border-top: 1px dashed var(--border-light);
  padding-top: 8px;
}

/* ==========================================================================
   MODULE 6: STAFF ATTENDANCE & SALARY FORECASTS
   ========================================================================== */
.staff-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
}
@media (max-width: 1024px) {
  .staff-layout {
    grid-template-columns: 1fr;
  }
}
.active-shift-badge {
  background-color: var(--accent-blue-glow);
  color: var(--accent-blue);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.attendance-actions-cell {
  display: flex;
  gap: 6px;
}
.attendance-btn {
  border: none;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.attendance-btn.present.active { background-color: var(--accent-green); color: #fff; }
.attendance-btn.absent.active { background-color: var(--accent-red); color: #fff; }

.salary-forecast-kpis {
  display: flex;
  gap: 12px;
}
.forecast-mini-card {
  flex: 1;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.forecast-mini-card span { font-size: 0.7rem; color: var(--text-secondary); }
.forecast-mini-card strong { font-size: 1.1rem; font-family: 'Outfit'; }

/* ==========================================================================
   MODULE 7: EXPENSES & LEDGER RECORDS
   ========================================================================== */
.expenses-layout {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 20px;
}
@media (max-width: 1024px) {
  .expenses-layout {
    grid-template-columns: 1fr;
  }
}
.simulated-upload-wrapper {
  background-color: var(--bg-primary);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.simulated-upload-wrapper input[type="file"] {
  display: none;
}
.simulated-upload-wrapper::before {
  content: '📎 Select Image';
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

/* ==========================================================================
   MODULE 8: PROFIT & LOSS REPORTS
   ========================================================================== */
.admin-only-alert {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 350px;
  text-align: center;
  gap: 16px;
}
.admin-only-alert svg {
  color: var(--accent-red);
}
.admin-only-alert h4 { font-size: 1.3rem; }
.admin-only-alert p { max-width: 400px; color: var(--text-secondary); font-size: 0.9rem; }

.report-filters-card {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 24px;
}
@media (max-width: 768px) {
  .report-filters-card {
    flex-direction: column;
    align-items: stretch;
  }
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.filter-group input {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
}

.financial-statement-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 32px;
}
.statement-header {
  text-align: center;
  border-bottom: 2px solid var(--border-glow);
  padding-bottom: 20px;
  margin-bottom: 28px;
}
.statement-header h3 {
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  color: var(--primary-accent);
}
.statement-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.statement-header .date-range {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.statement-section-title {
  font-size: 1rem;
  border-bottom: 1.5px solid var(--border-light);
  padding-bottom: 6px;
  margin-bottom: 14px;
  color: var(--text-primary);
}
.statement-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 20px;
}
.statement-table th, .statement-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
}
.statement-table th {
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 2px solid var(--border-light);
}
.statement-table tr.highlight-row {
  background-color: var(--bg-primary);
}

.financial-statement-summary-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 768px) {
  .financial-statement-summary-layout {
    grid-template-columns: 1fr;
  }
}
.summary-card-block {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.summary-card-block h5 {
  font-size: 0.85rem;
  margin-bottom: 12px;
  color: var(--primary-accent);
}
.summary-details-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.8rem;
}
.summary-details-list li {
  display: flex;
  justify-content: space-between;
}

.statement-grand-total {
  margin-top: 28px;
  border-top: 2px dashed var(--border-glow);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.statement-grand-total .total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}
.statement-grand-total .net-profit-highlight {
  font-size: 1.25rem;
  font-weight: 800;
  border-top: 2px solid var(--accent-green);
  padding-top: 12px;
  font-family: 'Outfit';
}

/* ==========================================================================
   MODULE 9: BROADCAST RATE CONSOLE
   ========================================================================== */
.rates-layout {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 20px;
}
@media (max-width: 1024px) {
  .rates-layout {
    grid-template-columns: 1fr;
  }
}

.broadcast-console-grid {
  display: grid;
  grid-template-columns: 1fr;
}
.console-box {
  background-color: #0b0b0b;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  overflow: hidden;
}
.console-title {
  background-color: var(--bg-secondary);
  padding: 8px 12px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}
.console-logs {
  padding: 12px;
  font-size: 0.75rem;
  color: var(--accent-green);
  height: 110px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ==========================================================================
   MODULE 10: SETTINGS, BACKUPS & SECURITY
   ========================================================================== */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.settings-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.settings-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

/* Toggle Switch Style */
.toggle-switch-wrapper {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}
.toggle-switch {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-switch + label {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  transition: .3s;
  border-radius: 34px;
}
.toggle-switch + label:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-secondary);
  transition: .3s;
  border-radius: 50%;
}
.toggle-switch:checked + label {
  background-color: var(--primary-accent);
}
.toggle-switch:checked + label:before {
  transform: translateX(22px);
  background-color: #fff;
}

.backup-action-row {
  display: flex;
  gap: 12px;
}
@media (max-width: 500px) {
  .backup-action-row {
    flex-direction: column;
  }
}
.backup-log-box h5 {
  font-size: 0.8rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.backup-history-list {
  font-size: 0.75rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-secondary);
}

/* ==========================================================================
   MODULE 11: FLOATING AI CHATBOT WIDGET
   ========================================================================== */
.ai-chatbot-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 360px;
  height: 480px;
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease;
}

.ai-chatbot-widget.closed {
  transform: translateY(calc(100% - 58px)) scale(0.95);
  opacity: 0.9;
  height: 58px;
}
@media (max-width: 500px) {
  .ai-chatbot-widget {
    width: calc(100% - 32px);
    right: 16px;
    bottom: 16px;
  }
}

.chatbot-header {
  height: 58px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  cursor: pointer;
}
.header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bot-icon {
  font-size: 1.3rem;
}
.bot-text h4 {
  font-size: 0.85rem;
}
.bot-text span {
  font-size: 0.65rem;
  color: var(--accent-green);
}
.bot-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.chatbot-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px;
  overflow: hidden;
}
.message-logs {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
}
.msg-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  line-height: 1.4;
}
.msg-bubble.bot {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.msg-bubble.user {
  background-color: var(--primary-accent);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.quick-chips-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.chip-btn {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}
.chip-btn:hover {
  border-color: var(--primary-accent);
  color: var(--text-primary);
}

.chatbot-input-row {
  display: flex;
  gap: 8px;
}
.chatbot-input-row input {
  flex: 1;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  outline: none;
}
.send-btn {
  background-color: var(--primary-accent);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.send-btn:hover {
  background-color: hsl(200, 100%, 40%);
}

/* ==========================================================================
   MODULE 12: ALERTS NOTIFICATION DRAWER
   ========================================================================== */
.alerts-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  height: 100vh;
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  border-left: 1px solid var(--border-glow);
  box-shadow: -10px 0 40px rgba(0,0,0,0.5);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.alerts-drawer.closed {
  transform: translateX(100%);
}
@media (max-width: 500px) {
  .alerts-drawer {
    width: 100%;
  }
}

.drawer-header {
  padding: 20px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-header h4 { font-size: 1.1rem; }
.drawer-header .close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.alert-drawer-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  border-left: 4px solid transparent;
}
.alert-drawer-card.red { border-left-color: var(--accent-red); }
.alert-drawer-card.yellow { border-left-color: var(--accent-yellow); }
.alert-drawer-card.blue { border-left-color: var(--accent-blue); }

.alert-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.75rem;
}
.alert-card-time { color: var(--text-muted); }
.alert-card-body {
  font-size: 0.8rem;
  color: var(--text-primary);
  line-height: 1.3;
}

/* ==========================================================================
   MODULE 13: PREVIEW NATIVE PUSH TOAST
   ========================================================================== */
.mobile-push-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 360px;
  background-color: hsla(222, 40%, 15%, 0.95);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glow);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 10000;
  animation: slideDownIn 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes slideDownIn {
  from { top: -80px; opacity: 0; }
  to { top: 24px; opacity: 1; }
}

.toast-icon { font-size: 1.4rem; }
.toast-content h5 { font-size: 0.8rem; color: var(--primary-accent); margin-bottom: 2px; }
.toast-content p { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.3; }

/* ==========================================================================
   PRINT STYLES (PDF Engine Optimizer)
   ========================================================================== */
@media print {
  body {
    background-color: #fff !important;
    color: #000 !important;
  }
  .system-header, 
  .dashboard-sidebar, 
  .report-filters-card, 
  .header-actions,
  #aiChatbotContainer,
  #alertsDrawerContainer,
  #toggleNetworkSimulationBtn {
    display: none !important;
  }
  .app-container, .dashboard-panels-wrapper {
    max-width: 100% !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .tab-panel {
    display: none !important;
  }
  /* Explicit printable zones */
  #tabReports.active {
    display: block !important;
  }
  #tabReports.active #reportsMainContent {
    display: block !important;
  }
  #tabDocumentation.active {
    display: block !important;
  }
  .financial-statement-container, .manual-container {
    background-color: #fff !important;
    color: #000 !important;
    border: none !important;
    padding: 0 !important;
  }
  .statement-table th {
    background-color: #f0f0f0 !important;
    color: #000 !important;
    border-bottom: 2px solid #000 !important;
  }
  .statement-table td {
    border-bottom: 1px solid #ddd !important;
  }
  .statement-grand-total {
    border-top: 2px dashed #000 !important;
  }
}

/* ==========================================================================
   MODULE 14: PUBLIC MARKETING LANDING PAGE STYLES
   ========================================================================== */
.marketing-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: hsla(222, 40%, 7%, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 999;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.m-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--primary-accent), #4fc3f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.marketing-nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-link-m {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}
.nav-link-m:hover, .nav-link-m.active {
  color: var(--primary-accent);
  text-shadow: 0 0 10px var(--border-glow);
}
.login-portal-btn {
  font-size: 0.8rem;
  padding: 6px 14px;
}

.marketing-hero-section {
  position: relative;
  padding: 80px 40px;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(2, 119, 189, 0.15), transparent 70%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}
.hero-main-title {
  font-family: 'Outfit', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.hero-glow-blob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--border-glow) 0%, transparent 70%);
  opacity: 0.2;
  pointer-events: none;
  z-index: 1;
}

/* Common Branding Helpers */
.pre-title {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--primary-accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section-title-m {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 8px;
}
.subsection-title-m {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

/* About Us Section */
.marketing-about-section {
  padding: 60px 40px;
  background-color: rgba(255,255,255,0.01);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.about-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .about-container {
    grid-template-columns: 1fr;
  }
}
.about-p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}
.about-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat-card-m {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  padding: 16px;
  border-radius: var(--radius-sm);
  text-align: center;
}
.stat-card-m h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-accent);
}
.stat-card-m p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.about-visual-content {
  display: flex;
  justify-content: center;
}
.visual-glow-shield {
  background: linear-gradient(135deg, rgba(2,119,189,0.1), rgba(2,119,189,0.02));
  border: 1px solid var(--border-glow);
  padding: 32px;
  border-radius: var(--radius-md);
  text-align: center;
  max-width: 320px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: transform 0.4s ease;
}
.visual-glow-shield:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(2, 119, 189, 0.2);
}
.visual-glow-shield svg {
  color: var(--primary-accent);
  margin-bottom: 16px;
}
.visual-glow-shield h4 {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
  color: #fff;
}
.visual-glow-shield p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Services Section */
.marketing-services-section {
  padding: 60px 40px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-header-m {
  text-align: center;
  margin-bottom: 40px;
}
.services-grid-m {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.service-card-m {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  padding: 24px;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.service-card-m:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.s-icon {
  font-size: 2rem;
}
.service-card-m h3 {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}
.service-card-m p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Quality & Purity Accordion Section */
.marketing-purity-section {
  padding: 60px 40px;
  background-color: rgba(255,255,255,0.01);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.purity-wrapper {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: flex-start;
}
@media (max-width: 768px) {
  .purity-wrapper {
    grid-template-columns: 1fr;
  }
}
.purity-left {
  position: sticky;
  top: 100px;
}
.purity-left p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.accordion-item-m {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition-smooth);
}
.accordion-header-m {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.accordion-header-m .acc-num {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--primary-accent);
  margin-right: 12px;
}
.accordion-header-m h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  flex: 1;
}
.accordion-header-m .acc-icon {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.accordion-content-m {
  max-height: 0;
  padding: 0 20px;
  opacity: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-top: 1px solid transparent;
}
.accordion-item-m.active {
  border-color: var(--border-glow);
}
.accordion-item-m.active .accordion-content-m {
  max-height: 200px;
  padding-bottom: 20px;
  opacity: 1;
  border-top-color: var(--border-light);
}
.accordion-content-m p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-top: 12px;
}

/* FAQs Section */
.marketing-faq-section {
  padding: 60px 40px;
  max-width: 900px;
  margin: 0 auto;
}
.faq-container-m {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.faq-item-m {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition-smooth);
}
.faq-question-m {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.faq-question-m h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}
.faq-icon {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.faq-answer-m {
  max-height: 0;
  padding: 0 20px;
  opacity: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-top: 1px solid transparent;
}
.faq-item-m.active {
  border-color: var(--border-glow);
}
.faq-item-m.active .faq-answer-m {
  max-height: 150px;
  padding-bottom: 16px;
  opacity: 1;
  border-top-color: var(--border-light);
}
.faq-answer-m p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-top: 12px;
}

/* Contact & Footer Section */
.marketing-contact-section {
  padding: 60px 40px 20px 40px;
  background-color: rgba(0,0,0,0.2);
  border-top: 1px solid var(--border-light);
}
.contact-grid-m {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .contact-grid-m {
    grid-template-columns: 1fr;
  }
}
.contact-info-panel-m h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}
.contact-desc-m {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}
.contact-details-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}
.cd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.cd-icon {
  font-size: 1.1rem;
}
.btn-whatsapp {
  background-color: #25d366;
  color: #fff !important;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  transition: var(--transition-smooth);
}
.btn-whatsapp:hover {
  background-color: #20ba59;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}
.wa-icon {
  font-size: 1rem;
}

/* Map Mock Rendering */
.map-mock-box {
  background: radial-gradient(circle at center, hsla(200, 100%, 30%, 0.1), transparent 80%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath d='M0 10h100M0 30h100M0 50h100M0 70h100M0 90h100M10 0v100M30 0v100M50 0v100M70 0v100M90 0v100' stroke='rgba(255,255,255,0.03)' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  height: 280px;
  border-radius: var(--radius-md);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.6);
  overflow: hidden;
}
.map-glow-dot {
  width: 14px;
  height: 14px;
  background-color: var(--primary-accent);
  border-radius: 50%;
  position: absolute;
  top: 45%;
  left: 48%;
  box-shadow: 0 0 12px var(--primary-accent), 0 0 24px var(--primary-accent);
  animation: mapPulse 2s infinite ease-in-out;
}
@keyframes mapPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.5; box-shadow: 0 0 20px var(--primary-accent); }
  100% { transform: scale(1); opacity: 1; }
}
.map-inner-text {
  position: absolute;
  bottom: 20px;
  background: hsla(222, 40%, 7%, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-light);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  max-width: 280px;
}
.map-inner-text h4 {
  font-size: 0.8rem;
  color: #fff;
  margin-bottom: 2px;
}
.map-inner-text p {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: monospace;
}
.map-inner-text span {
  font-size: 0.7rem;
  color: var(--primary-accent);
  font-weight: 500;
}

.marketing-footer-sub-m {
  margin-top: 40px;
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.footer-links-m {
  display: flex;
  gap: 16px;
}
.footer-links-m a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
}
.footer-links-m a:hover {
  color: var(--primary-accent);
}

/* Adjust scroll target styling on emulator */
.scroll-btn {
  cursor: pointer;
}
