/* RAVI FUELS - PETROL PUMP MANAGEMENT SOFTWARE STYLES */
:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent-gold: #f59e0b;
  --accent-blue: #2563eb;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --petrol-color: #ea580c;
  --diesel-color: #0284c7;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================================================
   APPLICATION LAYOUT: MODERN SAAS SIDEBAR (DIGITAL ROKAR STYLE)
   ========================================================= */
.app-layout {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-main);
  position: relative;
}

/* SIDEBAR CONTAINER */
.sidebar {
  width: 260px;
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.02);
  user-select: none;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-x: hidden;
}

/* BRAND HEADER */
.sidebar-brand {
  padding: 1.15rem 1rem 1rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-bottom: 1px solid #f1f5f9;
}

.brand-logo-box {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  flex-shrink: 0;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-info h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.2px;
  line-height: 1.2;
  margin: 0;
}

.brand-tagline {
  font-size: 0.65rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* SCROLLABLE NAV BODY */
.sidebar-nav-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0.25rem 1rem 0.25rem;
  scrollbar-width: thin;
}

.sidebar-nav-scroll::-webkit-scrollbar {
  width: 5px;
}
.sidebar-nav-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.nav-group-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 1.15rem 1.15rem 0.4rem 1.15rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.58rem 0.95rem;
  margin: 2px 0.65rem;
  border-radius: 9px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-item i {
  width: 20px;
  font-size: 1rem;
  text-align: center;
  color: #64748b;
  transition: color 0.15s ease;
}

.nav-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.nav-item:hover i {
  color: #0f172a;
}

.nav-item.active {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
}
.nav-item.active i {
  color: #2563eb;
}

.nav-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 12px;
  margin-left: auto;
}

/* SIDEBAR FOOTER (USER PROFILE & ACTION ROW) */
.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid #f1f5f9;
  background: #ffffff;
}

.user-profile-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.user-avatar {
  background: #2563eb;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  text-transform: lowercase;
}

.user-role {
  font-size: 0.65rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.6px;
  margin-top: 2px;
}

.sidebar-action-row {
  display: flex;
  gap: 0.4rem;
}

.btn-sidebar-backup {
  flex: 1;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fee2e2;
  border-radius: 8px;
  padding: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-sidebar-backup:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.btn-sidebar-collapse {
  width: 100%;
  height: 36px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.8rem;
  font-weight: 600;
}

.btn-sidebar-collapse:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* =========================================================
   DESKTOP COLLAPSED SIDEBAR (SLIM ICON-ONLY RAIL: 72PX)
   ========================================================= */
@media screen and (min-width: 851px) {
  body.sidebar-collapsed .sidebar,
  .app-layout.sidebar-collapsed .sidebar,
  .sidebar.collapsed {
    width: 72px;
  }

  body.sidebar-collapsed .main-wrapper,
  .app-layout.sidebar-collapsed .main-wrapper,
  .sidebar.collapsed ~ .main-wrapper {
    margin-left: 72px;
    width: calc(100% - 72px);
  }

  /* Center dispenser logo box */
  body.sidebar-collapsed .sidebar-brand,
  .app-layout.sidebar-collapsed .sidebar-brand,
  .sidebar.collapsed .sidebar-brand {
    padding: 1.15rem 0.5rem;
    justify-content: center;
  }

  body.sidebar-collapsed .brand-info,
  .app-layout.sidebar-collapsed .brand-info,
  .sidebar.collapsed .brand-info {
    display: none !important;
  }

  /* Group labels turn into clean thin dividers */
  body.sidebar-collapsed .nav-group-label,
  .app-layout.sidebar-collapsed .nav-group-label,
  .sidebar.collapsed .nav-group-label {
    font-size: 0;
    height: 1px;
    padding: 0;
    margin: 0.75rem 0.85rem;
    background: #e2e8f0;
    opacity: 0.7;
    overflow: hidden;
  }

  /* Center icons, hide text */
  body.sidebar-collapsed .nav-item,
  .app-layout.sidebar-collapsed .nav-item,
  .sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.65rem 0;
    margin: 4px 8px;
    position: relative;
  }

  body.sidebar-collapsed .nav-item span:not(.nav-badge),
  .app-layout.sidebar-collapsed .nav-item span:not(.nav-badge),
  .sidebar.collapsed .nav-item span:not(.nav-badge) {
    display: none !important;
  }

  body.sidebar-collapsed .nav-item i,
  .app-layout.sidebar-collapsed .nav-item i,
  .sidebar.collapsed .nav-item i {
    font-size: 1.25rem;
    margin: 0;
    width: auto;
  }

  /* Nav badge indicator */
  body.sidebar-collapsed .nav-badge,
  .app-layout.sidebar-collapsed .nav-badge,
  .sidebar.collapsed .nav-badge {
    position: absolute;
    top: 3px;
    right: 4px;
    padding: 1px 4px;
    font-size: 0.55rem;
    min-width: 14px;
    text-align: center;
    line-height: 1.1;
    border-radius: 999px;
  }

  /* Collapsed user profile footer */
  body.sidebar-collapsed .sidebar-footer,
  .app-layout.sidebar-collapsed .sidebar-footer,
  .sidebar.collapsed .sidebar-footer {
    padding: 0.5rem 0.35rem;
  }

  body.sidebar-collapsed .user-profile-card,
  .app-layout.sidebar-collapsed .user-profile-card,
  .sidebar.collapsed .user-profile-card {
    justify-content: center;
    padding: 0.4rem 0;
    background: transparent;
    border: none;
    margin-bottom: 0.35rem;
  }

  body.sidebar-collapsed .user-details,
  .app-layout.sidebar-collapsed .user-details,
  .sidebar.collapsed .user-details {
    display: none !important;
  }

  body.sidebar-collapsed .sidebar-action-row,
  .app-layout.sidebar-collapsed .sidebar-action-row,
  .sidebar.collapsed .sidebar-action-row {
    flex-direction: column;
    gap: 0.4rem;
  }

  body.sidebar-collapsed .btn-sidebar-collapse span,
  .app-layout.sidebar-collapsed .btn-sidebar-collapse span,
  .sidebar.collapsed .btn-sidebar-collapse span,
  body.sidebar-collapsed .btn-sidebar-backup span,
  .app-layout.sidebar-collapsed .btn-sidebar-backup span,
  .sidebar.collapsed .btn-sidebar-backup span {
    display: none !important;
  }

  body.sidebar-collapsed .btn-sidebar-backup,
  .app-layout.sidebar-collapsed .btn-sidebar-backup,
  .sidebar.collapsed .btn-sidebar-backup {
    padding: 0.55rem 0;
    justify-content: center;
    width: 100%;
  }

  body.sidebar-collapsed .btn-sidebar-collapse,
  .app-layout.sidebar-collapsed .btn-sidebar-collapse,
  .sidebar.collapsed .btn-sidebar-collapse {
    width: 100%;
  }

  body.sidebar-collapsed .btn-sidebar-collapse i,
  .app-layout.sidebar-collapsed .btn-sidebar-collapse i,
  .sidebar.collapsed .btn-sidebar-collapse i {
    transform: rotate(180deg);
  }
}

/* MAIN VIEWPORT WRAPPER */
.main-wrapper {
  margin-left: 260px;
  width: calc(100% - 260px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
  transition: margin-left 0.25s cubic-bezier(0.16, 1, 0.3, 1), width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* TOP BAR */
.top-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.top-bar-left h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-toggle-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-bar-right .date-pill {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #1e293b;
}

.sidebar-backdrop {
  display: none;
}

/* MAIN CONTAINER */
.main-content {
  flex: 1;
  padding: 1rem 1.5rem;
  max-width: 100%;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.module-section {
  display: none;
}

.module-section.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

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

/* CARDS & GRIDS */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  margin-bottom: 0.95rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #f1f5f9;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  border-left: 5px solid #cbd5e1;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
}

.kpi-card.blue { border-left-color: var(--accent-blue); }
.kpi-card.green { border-left-color: var(--accent-green); }
.kpi-card.gold { border-left-color: var(--accent-gold); }
.kpi-card.red { border-left-color: var(--accent-red); }
.kpi-card.orange { border-left-color: var(--petrol-color); }
.kpi-card.cyan { border-left-color: var(--diesel-color); }

.kpi-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
}

.kpi-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.kpi-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* ALERT BANNER */
.alert-banner {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 5px solid var(--accent-gold);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.alert-banner.danger {
  background: #fef2f2;
  border-color: #fee2e2;
  border-left-color: var(--accent-red);
}

.alert-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.alert-item:last-child {
  border-bottom: none;
}

/* TABLES */
.table-responsive {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #ffffff;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

table.data-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  padding: 0.65rem 0.85rem;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

table.data-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

table.data-table tbody tr:hover {
  background: #f8fafc;
}

table.data-table tfoot td {
  background: #f1f5f9;
  font-weight: 700;
  border-top: 2px solid var(--border-color);
}

.text-right { text-align: right; }
.text-center { text-align: center; }

/* BADGES & TAGS */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-info { background: #e0f2fe; color: #0369a1; }
.badge-petrol { background: #ffedd5; color: #c2410c; }
.badge-diesel { background: #e0f2fe; color: #0284c7; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-blue);
  color: #ffffff;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-success {
  background: var(--accent-green);
  color: #ffffff;
}

.btn-success:hover {
  background: #059669;
}

.btn-gold {
  background: var(--accent-gold);
  color: #000;
  font-weight: 700;
}

.btn-gold:hover {
  background: #d97706;
}

.btn-outline {
  background: #ffffff;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.btn-outline-danger {
  background: #ffffff;
  border-color: #fecaca;
  color: #dc2626;
}

.btn-outline-danger:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #b91c1c;
}

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  font-weight: 700;
}

.btn-whatsapp:hover {
  background: #1eb956;
}

.btn-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  border-radius: 6px;
}

/* FORM CONTROLS */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.3rem;
}

.form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: #ffffff;
  color: var(--text-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.input-gold {
  background-color: #fefce8;
  border-color: #fde047;
}

.input-gold:focus {
  border-color: #eab308;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* NOZZLE ENTRY CARDS */
.nozzle-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem;
}

.nozzle-card.petrol {
  border-top: 4px solid var(--petrol-color);
}

.nozzle-card.diesel {
  border-top: 4px solid var(--diesel-color);
}

.nozzle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

/* MODAL DIALOGS */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: 12px;
  max-width: 850px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  padding: 1.5rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
}

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

/* PRINTABLE INVOICE / REPORT */
.invoice-container, .report-print-container {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 2.5rem;
  border-radius: 8px;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  font-size: 0.9rem;
}

.invoice-header {
  text-align: center;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.invoice-header h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 0.5px;
}

.invoice-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8f0;
  padding: 1rem;
  border-radius: 6px;
  background: #f8fafc;
}

.amount-words-box {
  background: #f8fafc;
  border-left: 4px solid var(--accent-gold);
  padding: 0.8rem;
  margin: 1.25rem 0;
  font-weight: 600;
}

.signature-row {
  margin-top: 3.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

/* STATEMENT CONTROLS & DATE FILTER */
.statement-filter-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.statement-filter-bar .filter-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.statement-filter-bar label {
  font-weight: 700;
  font-size: 0.85rem;
  color: #334155;
  white-space: nowrap;
}

.date-preset-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.date-preset-btn:hover, .date-preset-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

/* OFFICIAL CUSTOMER STATEMENT DOCUMENT */
.printable-statement-container {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  font-size: 0.9rem;
}

.statement-doc-header {
  text-align: center;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
}

.statement-doc-header h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 0.5px;
  margin-bottom: 0.2rem;
}

.statement-kpi-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.statement-kpi-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.statement-kpi-box.closing {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.statement-kpi-box.overdue {
  background: #fef2f2;
  border-color: #fecaca;
}

.statement-kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.statement-kpi-box.closing .statement-kpi-label {
  color: #1d4ed8;
}

.statement-kpi-box.overdue .statement-kpi-label {
  color: #b91c1c;
}

.statement-kpi-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

/* IMPORT / EXPORT CENTRE */
.ie-nav-pills {
  display: flex;
  gap: 0.5rem;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
  width: fit-content;
}

.ie-nav-btn {
  padding: 0.45rem 1.15rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ie-nav-btn:hover {
  color: #0f172a;
}

.ie-nav-btn.active {
  background: #ffffff;
  color: #1e3a8a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ie-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.ie-export-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ie-export-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.ie-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.85rem;
}

.ie-card-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.ie-card-desc {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.35;
  margin-bottom: 1.25rem;
  flex: 1;
}

.ie-drop-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.2s ease;
  position: relative;
  margin-bottom: 1rem;
}

.ie-drop-zone:hover, .ie-drop-zone.dragover {
  border-color: #3b82f6;
  background: #eff6ff;
}

/* PRINT MEDIA QUERIES */
@media print {
  /* Set A4 page margins with safe printable boundaries */
  @page {
    size: A4 portrait;
    margin: 8mm 6mm 8mm 6mm !important;
  }

  html, body {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 8pt !important;
    overflow: visible !important;
  }

  /* RESET APPLICATION LAYOUT FOR PRINT */
  .app-layout {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: auto !important;
  }

  /* HIDE ALL APP CHROME, SIDEBARS, NAVIGATION, BUTTONS */
  .sidebar,
  .sidebar-backdrop,
  .top-bar,
  .top-header,
  .nav-bar,
  .no-print,
  .header-actions,
  .date-pill,
  .statement-filter-bar,
  .btn,
  .cust-sidebar,
  #cust-list-items,
  #cust-search,
  .card-header .btn,
  .modal-close,
  .modal-overlay:not(.print-active-modal) {
    display: none !important;
  }

  .modal-overlay.print-active-modal {
    display: block !important;
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    box-shadow: none !important;
  }
  .modal-overlay.print-active-modal .modal-card {
    box-shadow: none !important;
    border: 1px solid #94a3b8 !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 480px !important;
    background: #ffffff !important;
  }
  .modal-overlay.print-active-modal .modal-card .modal-footer,
  .modal-overlay.print-active-modal .modal-card .modal-header.no-print {
    display: none !important;
  }

  .main-wrapper,
  .main-content {
    padding: 0 !important;
    margin: 0 !important;
    margin-left: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  /* RESET SPLIT GRID SO SIDEBAR IS GONE AND STATEMENT TAKES 100% */
  .credit-split-grid {
    display: block !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    margin: 0 !important;
    width: 100% !important;
  }

  .cust-sidebar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  #customer-ledger-detail {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  .card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .printable-statement-container,
  .invoice-container,
  .report-print-container {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  .table-responsive {
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  table.data-table,
  table.statement-table {
    border-collapse: collapse !important;
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    box-sizing: border-box !important;
    margin: 0 0 0.5rem 0 !important;
  }

  table.data-table th,
  table.data-table td,
  table.statement-table th,
  table.statement-table td {
    border: 1px solid #475569 !important;
    padding: 2.5px 3px !important;
    font-size: 7pt !important;
    color: #000000 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    box-sizing: border-box !important;
  }

  table.data-table th,
  table.statement-table th {
    background-color: #f1f5f9 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    font-size: 7pt !important;
    font-weight: 800 !important;
  }

  .statement-kpi-summary {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 0.35rem !important;
    margin-bottom: 0.6rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .statement-kpi-box {
    padding: 0.35rem 0.45rem !important;
    border: 1px solid #cbd5e1 !important;
    box-sizing: border-box !important;
  }

  .statement-kpi-val {
    font-size: 0.95rem !important;
  }

  .invoice-meta-grid {
    display: grid !important;
    grid-template-columns: 1.15fr 0.85fr !important;
    gap: 0.5rem !important;
    padding: 0.45rem 0.6rem !important;
    margin-bottom: 0.6rem !important;
    font-size: 7.5pt !important;
    border: 1px solid #e2e8f0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .amount-words-box {
    padding: 0.35rem 0.5rem !important;
    margin: 0.5rem 0 !important;
    font-size: 7.5pt !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .signature-row {
    margin-top: 1.25rem !important;
    font-size: 8pt !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Ensure modal statement print preview is clean */
  body.printing-modal-statement .modal-overlay {
    display: block !important;
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
  }

  body.printing-modal-statement .modal-card {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/* TANK STOCK SYSTEM STYLES */
.tank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.tank-visual-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tank-visual-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.tank-cylinder-wrap {
  position: relative;
  height: 80px;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  border-radius: 40px;
  margin: 1rem 0;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.08);
}

.tank-cylinder-fill {
  height: 100%;
  border-radius: 38px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.tank-cylinder-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.15) 100%);
}

.tank-fill-ms {
  background: linear-gradient(90deg, #f97316 0%, #ea580c 50%, #c2410c 100%);
}

.tank-fill-hsd {
  background: linear-gradient(90deg, #10b981 0%, #059669 50%, #047857 100%);
}

.tank-safe-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 5%;
  width: 2px;
  background: #ef4444;
  z-index: 5;
}

.tank-safe-mark::before {
  content: '95% Safe';
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  color: #b91c1c;
  background: rgba(255, 255, 255, 0.85);
  padding: 1px 3px;
  border-radius: 3px;
  white-space: nowrap;
}

.tank-cylinder-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 800;
  font-size: 1.05rem;
  color: #0f172a;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.95);
  z-index: 6;
  white-space: nowrap;
}

.tank-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  font-size: 0.82rem;
  margin-top: 0.75rem;
}

.tank-metric-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  text-align: center;
}

.tank-metric-item .val {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 0.15rem;
}

.tank-metric-item .lbl {
  font-size: 0.7rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* KEYBOARD SHORTCUT BADGES & BULK ENTRY */
kbd {
  display: inline-block;
  padding: 0.15rem 0.35rem;
  font-size: 0.75rem;
  font-family: monospace;
  line-height: 1;
  color: #1e293b;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.bulk-cr-amt:focus, .shift-cr-amt:focus {
  background-color: #fffbeb !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2) !important;
}

/* =========================================================
   MOBILE & TOUCH-OPTIMIZED RESPONSIVE RATIO STYLES
   ========================================================= */

/* GLOBAL TABLET & MOBILE SIDEBAR (OFF-CANVAS DRAWER) */
@media screen and (max-width: 850px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
    width: 275px;
    z-index: 2200;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 2150;
    display: none;
  }

  .sidebar-backdrop.open {
    display: block;
  }

  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .sidebar-toggle-btn {
    display: flex !important;
  }

  .top-bar {
    padding: 0.6rem 0.85rem !important;
  }

  .top-bar-left h2 {
    font-size: 1rem !important;
  }

  .top-bar-right .date-pill {
    display: none !important;
  }

  .main-content {
    padding: 0.85rem 0.65rem;
  }
}

/* MOBILE & SMARTPHONE RATIOS (<= 768PX) */
@media screen and (max-width: 768px) {
  /* BODY & VIEWPORT */
  html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
  }

  /* INPUTS: CRITICAL 16PX RULE FOR iOS SAFARI (PREVENTS JARRING AUTO-ZOOM ON FOCUS) */
  input, select, textarea, .form-control {
    font-size: 16px !important;
    min-height: 42px;
  }

  /* TOP HEADER MOBILE RATIO */
  .top-header {
    padding: 0.65rem 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .brand-section {
    gap: 0.6rem;
    flex: 1 1 auto;
    min-width: 200px;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .brand-title h1 {
    font-size: 1.05rem;
    gap: 0.35rem;
  }

  .brand-title .badge-version {
    font-size: 0.65rem;
    padding: 1px 4px;
  }

  .brand-sub {
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70vw;
  }

  .header-actions {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.45rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .header-actions::-webkit-scrollbar {
    display: none;
  }

  .header-actions .date-pill {
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .header-actions .btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* NAVIGATION TABS: HORIZONTAL SWIPEABLE PILL BAR */
  .nav-bar {
    padding: 0.4rem 0.6rem;
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 52px;
    z-index: 999;
  }

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

  .nav-tab {
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 20px;
    border-bottom: none;
    background: #f1f5f9;
    flex-shrink: 0;
    transition: all 0.15s ease;
  }

  .nav-tab:hover {
    background: #e2e8f0;
  }

  .nav-tab.active {
    background: #2563eb;
    color: #ffffff;
  }

  .nav-tab.active .tab-badge {
    background: #ffffff;
    color: #dc2626;
  }

  /* MAIN CONTENT AREA */
  .main-content {
    padding: 0.75rem 0.5rem;
    width: 100%;
    max-width: 100vw;
  }

  /* CARD CONTAINERS */
  .card {
    padding: 0.85rem;
    border-radius: 10px;
    margin-bottom: 0.85rem;
  }

  .card-header {
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
  }

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

  /* RESPONSIVE SPLIT GRIDS (AUTO-COLLAPSE 2 COLS TO 1 COL) */
  .responsive-split-grid,
  .credit-split-grid,
  #settings-view > div,
  #billing-view > .no-print,
  #expenses-view > div {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* CUSTOMER CREDIT SIDEBAR IN 1-COL MODE */
  .cust-sidebar #cust-list-items {
    max-height: 220px !important;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.35rem;
  }

  /* KPI CARDS GRID (MOBILE 2-COLUMN HIGH-DENSITY RATIO) */
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.55rem !important;
    margin-bottom: 1rem !important;
  }

  .kpi-card {
    padding: 0.65rem 0.75rem !important;
    border-radius: 8px !important;
  }

  .kpi-label {
    font-size: 0.66rem !important;
    margin-bottom: 0.2rem !important;
    letter-spacing: 0.2px !important;
  }

  .kpi-value {
    font-size: 1.15rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0.25rem !important;
  }

  .kpi-sub {
    font-size: 0.68rem !important;
    flex-direction: column !important;
    gap: 0.15rem !important;
  }

  /* DASHBOARD CONTROL ROW & QUICK ACTION BUTTONS */
  .dash-ctrl-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  .dash-btn-group {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.4rem !important;
    width: 100% !important;
  }

  .dash-btn-group .btn {
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.74rem !important;
    padding: 0.45rem 0.35rem !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.2 !important;
    gap: 0.35rem !important;
  }

  /* TANK CONTROL ROW */
  .tank-ctrl-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
  }

  .tank-ctrl-row > div {
    width: 100% !important;
    justify-content: space-between !important;
  }

  .tank-ctrl-row select {
    width: 100% !important;
  }

  /* UNDERGROUND TANK CARDS */
  .tank-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .tank-visual-card {
    padding: 0.85rem !important;
  }

  .tank-cylinder-wrap {
    height: 64px !important;
    margin: 0.75rem 0 !important;
  }

  .tank-cylinder-text {
    font-size: 0.88rem !important;
  }

  .tank-metrics-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.35rem !important;
    margin-top: 0.5rem !important;
  }

  .tank-metric-item {
    padding: 0.35rem 0.3rem !important;
  }

  .tank-metric-item .val {
    font-size: 0.8rem !important;
  }

  .tank-metric-item .lbl {
    font-size: 0.62rem !important;
  }

  /* FORM LAYOUTS & TOUCH TARGETS */
  .form-row {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .form-group {
    margin-bottom: 0.65rem !important;
  }

  .form-label {
    font-size: 0.78rem !important;
    margin-bottom: 0.25rem !important;
  }

  .btn {
    min-height: 38px;
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
  }

  .btn-sm {
    min-height: 32px;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }

  /* SHIFT ENTRY: PUMP NOZZLE CARDS (2x2 GRID ON MOBILE) */
  .nozzle-grid-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  .nozzle-card {
    padding: 0.65rem !important;
  }

  .nozzle-header {
    font-size: 0.75rem !important;
    margin-bottom: 0.4rem !important;
  }

  .nozzle-header .badge {
    font-size: 0.65rem !important;
    padding: 1px 4px !important;
  }

  /* SHIFT ENTRY: COLLECTIONS & CASH (2-COLUMN GRID) */
  .collections-grid-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  /* MOBILE MODALS: SLIDE-UP BOTTOM SHEET (NATIVE APP FEEL) */
  .modal-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
    background: rgba(15, 23, 42, 0.75) !important;
  }

  .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 18px 18px 0 0 !important;
    max-height: 94vh !important;
    padding: 1.1rem 0.85rem !important;
    margin: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25) !important;
    animation: modalSlideUpMobile 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  @keyframes modalSlideUpMobile {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .modal-card::before {
    content: '';
    display: block;
    width: 44px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 3px;
    margin: 0 auto 0.85rem auto;
  }

  .modal-header {
    margin-bottom: 0.75rem !important;
    padding-bottom: 0.5rem !important;
  }

  .modal-header h3 {
    font-size: 1.05rem !important;
  }

  /* TABLES & HORIZONTAL SCROLL WRAPPERS */
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    margin-bottom: 0.75rem !important;
    border-radius: 8px !important;
    position: relative !important;
  }

  table.data-table {
    font-size: 0.78rem !important;
  }

  table.data-table th,
  table.data-table td {
    padding: 0.45rem 0.6rem !important;
    white-space: nowrap !important;
  }

  /* BULK CREDIT MODAL & SPREADSHEET FOOTER */
  #bulk-credit-modal .table-responsive table.data-table {
    min-width: 660px !important;
  }

  #bulk-credit-modal .modal-card > div:last-child {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  #bulk-credit-modal .modal-card > div:last-child > div:first-child {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    padding: 0.5rem 0.75rem !important;
  }

  #bulk-credit-modal .modal-card > div:last-child > div:last-child {
    display: flex !important;
    width: 100% !important;
  }

  #bulk-credit-modal .modal-card > div:last-child > div:last-child button {
    flex: 1 !important;
  }

  /* STATEMENTS & PRINT PREVIEW CONTAINERS ON MOBILE */
  .printable-statement-container,
  .invoice-container,
  .report-print-container {
    padding: 1rem 0.65rem !important;
    border-radius: 6px !important;
  }

  .statement-doc-header h2 {
    font-size: 1.15rem !important;
  }

  .statement-filter-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
    padding: 0.65rem 0.75rem !important;
  }

  .statement-filter-bar .filter-group {
    width: 100% !important;
    justify-content: space-between !important;
  }

  .statement-kpi-summary {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.45rem !important;
  }

  .statement-kpi-box {
    padding: 0.5rem 0.65rem !important;
  }

  .statement-kpi-val {
    font-size: 0.95rem !important;
  }

  .invoice-meta-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
    padding: 0.65rem !important;
  }
}

/* EXTRA SMALL PHONE SCREENS (<= 480PX: iPhone SE, Galaxy A series, etc.) */
@media screen and (max-width: 480px) {
  .brand-sub {
    display: none !important;
  }

  .top-header {
    padding: 0.5rem 0.65rem !important;
  }

  .brand-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 1.1rem !important;
  }

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

  .kpi-value {
    font-size: 1.05rem !important;
  }

  .kpi-label {
    font-size: 0.62rem !important;
  }

  .nozzle-grid-row {
    grid-template-columns: 1fr !important;
  }

  .tank-metrics-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.2rem !important;
  }

  .tank-metric-item {
    padding: 0.25rem 0.15rem !important;
  }

  .tank-metric-item .val {
    font-size: 0.72rem !important;
  }

  .tank-metric-item .lbl {
    font-size: 0.55rem !important;
  }

  .statement-kpi-summary {
    grid-template-columns: 1fr 1fr !important;
  }

  #dash-date-picker {
    width: 100% !important;
  }
}

/* ========================================================== */
/* FUELNEX SAAS AUTHENTICATION & GOOGLE-THEMED PLATFORM UI    */
/* ========================================================== */

:root {
  --google-blue: #4285F4;
  --google-red: #EA4335;
  --google-yellow: #FBBC05;
  --google-green: #34A853;
  --google-surface: #0b1329;
}

.login-portal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: #060b18;
  overflow-y: auto;
  min-height: 100vh;
}

/* AMBIENT GOOGLE COLOR LIGHT BLOBS */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.28;
  animation: ambientFloat 8s infinite alternate ease-in-out;
}

.ambient-glow-blue {
  width: 480px;
  height: 480px;
  background: #4285F4;
  top: -100px;
  left: -80px;
}

.ambient-glow-red {
  width: 400px;
  height: 400px;
  background: #EA4335;
  bottom: -60px;
  left: 20%;
  animation-delay: -2s;
}

.ambient-glow-yellow {
  width: 360px;
  height: 360px;
  background: #FBBC05;
  top: 15%;
  right: 15%;
  animation-delay: -4s;
  opacity: 0.20;
}

.ambient-glow-green {
  width: 420px;
  height: 420px;
  background: #34A853;
  bottom: -80px;
  right: -80px;
  animation-delay: -6s;
}

@keyframes ambientFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.08); }
  100% { transform: translate(-20px, 30px) scale(0.95); }
}

.login-portal-backdrop {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

/* DUAL COLUMN SAAS WRAPPER */
.login-dual-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1080px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 35px 90px -15px rgba(0, 0, 0, 0.8), 0 0 50px rgba(66, 133, 244, 0.15);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  animation: loginFadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginFadeUp {
  from { opacity: 0; transform: translateY(25px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* LEFT SHOWCASE PANEL */
.login-showcase-panel {
  padding: 2.5rem;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.8) 0%, rgba(11, 19, 41, 0.95) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.showcase-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  color: #e2e8f0;
  font-weight: 700;
  align-self: flex-start;
  margin-bottom: 1.5rem;
}

.google-dots {
  display: inline-flex;
  gap: 4px;
}

.g-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.g-blue   { background: #4285F4; }
.g-red    { background: #EA4335; }
.g-yellow { background: #FBBC05; }
.g-green  { background: #34A853; }

.showcase-brand-center {
  margin-bottom: 1.75rem;
}

.showcase-logo-frame {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.showcase-logo-img {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 35px rgba(66, 133, 244, 0.4);
}

.showcase-title {
  font-size: 2.25rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.8px;
  margin: 0;
  line-height: 1.1;
}

.title-highlight {
  color: #4285F4;
}

.google-accent-bar {
  width: 84px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #4285F4 25%, #EA4335 25% 50%, #FBBC05 50% 75%, #34A853 75% 100%);
  margin: 0.6rem 0 0.85rem 0;
}

.showcase-tagline {
  font-size: 1rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 0.4rem 0;
  letter-spacing: -0.2px;
}

.showcase-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

/* 4 FEATURES GRID */
.showcase-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.showcase-feat-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  transition: all 0.2s;
}

.showcase-feat-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.feat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.feat-blue   .feat-icon { background: rgba(66, 133, 244, 0.15); color: #60a5fa; }
.feat-green  .feat-icon { background: rgba(52, 168, 83, 0.15);  color: #4ade80; }
.feat-yellow .feat-icon { background: rgba(251, 188, 5, 0.15);  color: #facc15; }
.feat-red    .feat-icon { background: rgba(234, 67, 53, 0.15);   color: #f87171; }

.feat-text strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.2;
}

.feat-text span {
  display: block;
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.3;
  margin-top: 2px;
}

/* OMC STRIP */
.showcase-omc-strip {
  padding-top: 1rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.omc-title {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.6px;
  margin-bottom: 0.45rem;
}

.omc-tags-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.omc-chip {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
  color: #ffffff;
}

.chip-iocl   { background: #ea580c; }
.chip-hpcl   { background: #0284c7; }
.chip-bpcl   { background: #16a34a; }
.chip-nayara { background: #9333ea; }
.chip-jio    { background: #2563eb; }
.chip-shell  { background: #dc2626; }

/* RIGHT SIGN-IN FORM PANEL */
.login-form-panel {
  position: relative;
  background: rgba(15, 23, 42, 0.95);
  padding: 2.5rem 2.25rem 1.75rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.google-card-accent-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4285F4 25%, #EA4335 25% 50%, #FBBC05 50% 75%, #34A853 75% 100%);
}

.login-form-header {
  margin-bottom: 1.5rem;
}

.form-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.3px;
}

.form-subtitle {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0.35rem 0 0 0;
}

.login-input-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
}

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

.login-input-wrap .input-prefix-icon {
  position: absolute;
  left: 14px;
  color: #64748b;
  font-size: 1rem;
  pointer-events: none;
}

.login-input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.6rem;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  outline: none;
}

.login-input:focus {
  border-color: #4285F4;
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.25);
  background: #243248;
}

.btn-login-submit {
  width: 100%;
  padding: 0.9rem 1.25rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #4285F4 0%, #2563eb 100%);
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(66, 133, 244, 0.4);
}

.btn-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(66, 133, 244, 0.55);
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.btn-login-submit:active {
  transform: translateY(1px);
}

.login-quick-access {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.quick-access-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quick-login-pills {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.quick-login-pill {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.quick-login-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(66, 133, 244, 0.4);
  transform: translateX(3px);
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  display: inline-block;
}

.pill-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.login-card-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* RESPONSIVE LAYOUT FOR MOBILE / SMALLER SCREENS */
@media (max-width: 860px) {
  .login-dual-wrapper {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
  .login-showcase-panel {
    display: none; /* Hide heavy showcase on mobile, focus on sign-in */
  }
  .login-form-panel {
    padding: 2rem 1.5rem;
  }
}

/* ========================================================== */
/* SUPER ADMIN SELLER PORTAL (GOOGLE PALETTE & SUBSCRIPTIONS) */
/* ========================================================== */

.super-admin-header {
  position: relative;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 1.5rem 1.75rem;
  border-radius: 14px;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.super-admin-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4285F4 25%, #EA4335 25% 50%, #FBBC05 50% 75%, #34A853 75% 100%);
}

.sa-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.sa-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s;
}

.sa-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sa-kpi-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.sa-kpi-card.blue   .sa-kpi-icon { background: #e8f0fe; color: #4285F4; }
.sa-kpi-card.green  .sa-kpi-icon { background: #e6f4ea; color: #34A853; }
.sa-kpi-card.yellow .sa-kpi-icon { background: #fef7e0; color: #f29900; }
.sa-kpi-card.red    .sa-kpi-icon { background: #fce8e6; color: #EA4335; }

.sa-kpi-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.sa-kpi-lbl {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* SUBSCRIPTION TABLE & CARDS */
.dealer-table-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dealer-table-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: #f8fafc;
}

.dealer-table {
  width: 100%;
  border-collapse: collapse;
}

.dealer-table th {
  background: #f8fafc;
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.dealer-table td {
  padding: 0.95rem 1rem;
  font-size: 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.dealer-table tr:hover td {
  background: #f8fafc;
}

.days-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.days-pill.green  { background: #e6f4ea; color: #137333; }
.days-pill.yellow { background: #fef7e0; color: #b06000; }
.days-pill.red    { background: #fce8e6; color: #c5221f; }

.status-badge-active {
  background: #e6f4ea;
  color: #137333;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-badge-suspended {
  background: #fce8e6;
  color: #c5221f;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dealer-action-btn {
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.dealer-action-btn.renew {
  background: #e8f0fe;
  color: #1a73e8;
  border-color: #c2e7ff;
}
.dealer-action-btn.renew:hover { background: #c2e7ff; }

.dealer-action-btn.whatsapp {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}
.dealer-action-btn.whatsapp:hover { background: #bbf7d0; }

.dealer-action-btn.preview {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}
.dealer-action-btn.preview:hover { background: #e2e8f0; }

.dealer-action-btn.toggle {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}
.dealer-action-btn.toggle:hover { background: #fde68a; }

.dealer-action-btn.delete {
  background: #fce8e6;
  color: #c5221f;
  border-color: #fad2cf;
}
.dealer-action-btn.delete:hover { background: #fad2cf; }

.dealer-action-btn.restore {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fdba74;
}
.dealer-action-btn.restore:hover { background: #fed7aa; }

/* RENEWAL RADIO CARDS */
.renew-radio-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s;
}

.renew-radio-card:hover {
  border-color: #4285F4;
  background: #f8fafc;
}

.renew-radio-card input:checked ~ .radio-content strong {
  color: #4285F4;
}

.renew-radio-card input:checked {
  accent-color: #4285F4;
}

.radio-content strong {
  display: block;
  font-size: 0.85rem;
  color: #0f172a;
}

.radio-content span {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
}

/* =========================================================
   SELLER PLATFORM SUBNAV & SUBSCRIPTION PLANS STYLES
   ========================================================= */

.seller-subnav-bar {
  display: flex;
  gap: 0.5rem;
  background: #ffffff;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.seller-subnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #475569;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.seller-subnav-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.seller-subnav-btn.active {
  background: #4285F4;
  color: #ffffff;
  border-color: #4285F4;
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.35);
}

.seller-subnav-btn.active.green {
  background: #34A853;
  border-color: #34A853;
  box-shadow: 0 2px 8px rgba(52, 168, 83, 0.35);
}

/* SUBSCRIPTION PLANS GRID */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.plan-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
  border-color: #cbd5e1;
}

.plan-card.featured {
  border: 2px solid #34A853;
  box-shadow: 0 4px 18px rgba(52, 168, 83, 0.15);
}

.plan-card-badge {
  position: absolute;
  top: -12px;
  right: 18px;
  background: linear-gradient(135deg, #34A853 0%, #15803d 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(52, 168, 83, 0.4);
}

.plan-card-badge.gold {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

.plan-card-badge.blue {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
}

.plan-card-badge.purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.4);
}

.plan-card-header {
  margin-bottom: 1rem;
}

.plan-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.35rem 0;
}

.plan-card-desc {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
  margin: 0;
  min-height: 38px;
}

.plan-card-pricing {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.plan-amount-val {
  font-size: 1.85rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.plan-amount-val span.rupee {
  font-size: 1.3rem;
  font-weight: 700;
  color: #34A853;
  margin-right: 2px;
}

.plan-cycle-lbl {
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
}

.plan-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem 0;
  flex: 1;
}

.plan-features-list li {
  font-size: 0.82rem;
  color: #334155;
  margin-bottom: 0.55rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.35;
}

.plan-features-list li i {
  color: #34A853;
  margin-top: 3px;
  font-size: 0.85rem;
}

.plan-card-footer {
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* QUICK AMOUNT SETTER TABLE */
.plans-quick-table-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.plans-quick-table-header {
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.plan-amt-input {
  width: 130px;
  padding: 0.45rem 0.65rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: #15803d;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  text-align: right;
  transition: all 0.15s;
}

.plan-amt-input:focus {
  border-color: #34A853;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 168, 83, 0.2);
}

/* TOP BAR DEALER STATUS PILL */
.dealer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
}

.omc-tag {
  background: #ea580c;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* =========================================================
   DARK THEME / LIGHT THEME SYSTEM
   ========================================================= */

/* THEME TOGGLE BUTTON IN TOP BAR */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.theme-toggle-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}
.theme-toggle-btn .theme-moon-icon {
  display: inline-block;
  color: #4f46e5;
  font-size: 0.85rem;
}
.theme-toggle-btn .theme-sun-icon {
  display: none;
  color: #f59e0b;
  font-size: 0.9rem;
}

/* =========================================================
   DARK THEME COLOR OVERRIDES ([data-theme="dark"])
   ========================================================= */
[data-theme="dark"] {
  --primary: #f8fafc;
  --primary-light: #cbd5e1;
  --bg-main: #0b1120;
  --card-bg: #111a2e;
  --border-color: #1e2c45;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

[data-theme="dark"] body,
[data-theme="dark"] .app-layout {
  background-color: #0b1120;
  color: #f8fafc;
}

/* THEME TOGGLE IN DARK MODE */
[data-theme="dark"] .theme-toggle-btn {
  background: #18233a;
  border-color: #293a57;
  color: #f8fafc;
}
[data-theme="dark"] .theme-toggle-btn:hover {
  background: #22334f;
  border-color: #3b82f6;
}
[data-theme="dark"] .theme-toggle-btn .theme-moon-icon {
  display: none;
}
[data-theme="dark"] .theme-toggle-btn .theme-sun-icon {
  display: inline-block;
}

/* SIDEBAR & BRAND */
[data-theme="dark"] .sidebar {
  background: #0f172a;
  border-right-color: #1e293b;
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .sidebar-brand {
  border-bottom-color: #1e293b;
}
[data-theme="dark"] .brand-info h2 {
  color: #ffffff;
}
[data-theme="dark"] .nav-group-label {
  color: #64748b;
}
[data-theme="dark"] .nav-item {
  color: #94a3b8;
}
[data-theme="dark"] .nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}
[data-theme="dark"] .nav-item.active {
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
}
[data-theme="dark"] .sidebar-footer {
  background: #0f172a;
  border-top-color: #1e293b;
}
[data-theme="dark"] .user-profile-card {
  background: #1e293b;
  border-color: #334155;
}
[data-theme="dark"] .user-name {
  color: #ffffff;
}
[data-theme="dark"] .user-role {
  color: #94a3b8;
}
[data-theme="dark"] .btn-sidebar-backup,
[data-theme="dark"] .btn-sidebar-collapse {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}
[data-theme="dark"] .btn-sidebar-backup:hover,
[data-theme="dark"] .btn-sidebar-collapse:hover {
  background: #334155;
  color: #ffffff;
}

/* TOP BAR */
[data-theme="dark"] .top-bar {
  background: #0f172a;
  border-bottom-color: #1e293b;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .top-bar-left h2 {
  color: #ffffff;
}
[data-theme="dark"] .sidebar-toggle-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
[data-theme="dark"] .top-bar-right .date-pill {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
[data-theme="dark"] .dealer-status-pill {
  background: #1e293b;
  border-color: #334155;
  color: #ffffff;
}

/* CARDS & CONTAINERS */
[data-theme="dark"] .card {
  background: #111a2e;
  border-color: #1e2c45;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  color: #f1f5f9;
}
[data-theme="dark"] .card-header {
  border-bottom-color: #1e2c45;
}
[data-theme="dark"] .card-title {
  color: #ffffff;
}
[data-theme="dark"] .kpi-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .summary-card,
[data-theme="dark"] .tank-card,
[data-theme="dark"] .shift-card {
  background: #111a2e;
  border-color: #1e2c45;
  color: #f1f5f9;
}
[data-theme="dark"] .kpi-card-title,
[data-theme="dark"] .kpi-label {
  color: #94a3b8;
}
[data-theme="dark"] .kpi-val,
[data-theme="dark"] .kpi-value {
  color: #ffffff;
}

/* TABLES */
[data-theme="dark"] .data-table,
[data-theme="dark"] table {
  background: #111a2e;
  color: #e2e8f0;
}
[data-theme="dark"] .data-table th,
[data-theme="dark"] table th {
  background: #18233a;
  color: #94a3b8;
  border-bottom-color: #243452;
}
[data-theme="dark"] .data-table td,
[data-theme="dark"] table td {
  border-bottom-color: #1e2c45;
  color: #e2e8f0;
}
[data-theme="dark"] .data-table tbody tr:hover,
[data-theme="dark"] table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .data-table tr.total-row,
[data-theme="dark"] table tfoot tr {
  background: #18233a;
  color: #ffffff;
}

/* INPUTS & SELECTS */
[data-theme="dark"] .form-control,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background-color: #18233a;
  border-color: #293a57;
  color: #ffffff;
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  border-color: #3b82f6;
  background-color: #1c2a44;
  color: #ffffff;
}
[data-theme="dark"] .form-label,
[data-theme="dark"] label {
  color: #cbd5e1;
}

/* MODALS */
[data-theme="dark"] .modal-overlay {
  background: rgba(0, 0, 0, 0.75);
}
[data-theme="dark"] .modal-card {
  background: #111a2e;
  border: 1px solid #243452;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  color: #f1f5f9;
}
[data-theme="dark"] .modal-header {
  border-bottom-color: #1e2c45;
}
[data-theme="dark"] .modal-header h3,
[data-theme="dark"] .modal-header h4 {
  color: #ffffff;
}
[data-theme="dark"] .modal-close {
  color: #94a3b8;
}
[data-theme="dark"] .modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* CUSTOMER CREDIT & KHATA IN DARK THEME */
[data-theme="dark"] .cust-card-item {
  background: #131d31 !important;
  border-color: #1e2c45 !important;
  color: #f1f5f9;
}
[data-theme="dark"] .cust-card-item.selected-cust {
  background: #1a2c4e !important;
  border-color: #2563eb !important;
}
[data-theme="dark"] .cust-card-item:hover {
  background: #18263f !important;
}
[data-theme="dark"] .statement-filter-bar {
  background: #111a2e;
  border-color: #1e2c45;
}
[data-theme="dark"] .date-preset-btn {
  background: #18233a;
  border-color: #293a57;
  color: #94a3b8;
}
[data-theme="dark"] .date-preset-btn:hover {
  color: #ffffff;
  background: #243452;
}
[data-theme="dark"] .date-preset-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}
[data-theme="dark"] .printable-statement-container {
  background: #111a2e;
  border-color: #1e2c45;
  color: #f1f5f9;
}
[data-theme="dark"] .statement-doc-header h2 {
  color: #ffffff;
}
[data-theme="dark"] .statement-doc-header p {
  color: #94a3b8;
}
[data-theme="dark"] .statement-kpi-box {
  background: #18233a;
  border-color: #243452;
}
[data-theme="dark"] .statement-kpi-val {
  color: #ffffff;
}

/* BUTTONS */
[data-theme="dark"] .btn-outline {
  border-color: #334155;
  color: #cbd5e1;
  background: transparent;
}
[data-theme="dark"] .btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* SUPER ADMIN CONSOLE */
[data-theme="dark"] .dealer-row-card {
  background: #111a2e;
  border-color: #1e2c45;
  color: #f1f5f9;
}

/* PRINT PRESERVATION: PURE CLEAN WHITE ON PAPER */
@media print {
  [data-theme="dark"] {
    --bg-main: #ffffff !important;
    --card-bg: #ffffff !important;
    --text-main: #000000 !important;
  }
  [data-theme="dark"] body,
  [data-theme="dark"] .app-layout {
    background: #ffffff !important;
    color: #000000 !important;
  }
  [data-theme="dark"] .printable-statement-container,
  [data-theme="dark"] .invoice-container,
  [data-theme="dark"] .report-print-container {
    background: #ffffff !important;
    color: #000000 !important;
    border: none !important;
    box-shadow: none !important;
  }
}

/* =========================================================
   LOGIN SCREEN THEME TOGGLE & LIGHT/DARK ADAPTATIONS
   ========================================================= */

.login-theme-toggle-bar {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 100000;
}

.login-theme-btn {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 0.45rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-theme-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* LOGIN SCREEN IN LIGHT THEME */
html:not([data-theme="dark"]) .login-portal-overlay {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #f8fafc 100%);
}

html:not([data-theme="dark"]) .login-theme-btn {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #cbd5e1;
  color: #1e293b;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

html:not([data-theme="dark"]) .login-theme-btn:hover {
  background: #ffffff;
  border-color: #94a3b8;
  color: #0f172a;
}

html:not([data-theme="dark"]) .login-dual-wrapper {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
}

html:not([data-theme="dark"]) .login-showcase-panel {
  background: linear-gradient(145deg, #f8fafc 0%, #edf2f7 100%);
  border-right-color: #e2e8f0;
}

html:not([data-theme="dark"]) .showcase-top-badge {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #475569;
}

html:not([data-theme="dark"]) .showcase-title {
  color: #0f172a;
}

html:not([data-theme="dark"]) .showcase-tagline {
  color: #2563eb;
}

html:not([data-theme="dark"]) .showcase-desc {
  color: #64748b;
}

html:not([data-theme="dark"]) .showcase-feat-item {
  background: #ffffff;
  border-color: #e2e8f0;
}

html:not([data-theme="dark"]) .showcase-feat-item .feat-text strong {
  color: #0f172a;
}

html:not([data-theme="dark"]) .showcase-feat-item .feat-text span {
  color: #64748b;
}

html:not([data-theme="dark"]) .omc-title {
  color: #64748b;
}

html:not([data-theme="dark"]) .login-form-panel {
  background: #ffffff;
}

html:not([data-theme="dark"]) .form-title {
  color: #0f172a;
}

html:not([data-theme="dark"]) .form-subtitle {
  color: #64748b;
}

html:not([data-theme="dark"]) .login-input-label {
  color: #334155;
}

html:not([data-theme="dark"]) .login-input {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

html:not([data-theme="dark"]) .login-input:focus {
  background: #ffffff;
  border-color: #4285F4;
  color: #0f172a;
}

html:not([data-theme="dark"]) .input-prefix-icon {
  color: #94a3b8;
}

html:not([data-theme="dark"]) .quick-access-title span {
  color: #64748b;
}

html:not([data-theme="dark"]) .quick-login-pill {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #1e293b;
}

html:not([data-theme="dark"]) .quick-login-pill strong {
  color: #0f172a;
}

html:not([data-theme="dark"]) .login-card-footer {
  border-top-color: #f1f5f9;
}

html:not([data-theme="dark"]) .login-card-footer span {
  color: #64748b;
}

/* =========================================================
   DARK THEME: SELLER PLATFORM & SUBSCRIPTIONS
   ========================================================= */
[data-theme="dark"] .seller-subnav-bar {
  background: #111a2e;
  border-color: #1e2c45;
}
[data-theme="dark"] .seller-subnav-btn {
  color: #94a3b8;
}
[data-theme="dark"] .seller-subnav-btn:hover {
  background: #18233a;
  color: #f8fafc;
}
[data-theme="dark"] .plan-card {
  background: #111a2e;
  border-color: #1e2c45;
}
[data-theme="dark"] .plan-card:hover {
  border-color: #3b82f6;
}
[data-theme="dark"] .plan-card-title {
  color: #f8fafc;
}
[data-theme="dark"] .plan-card-pricing {
  background: #18233a;
  border-color: #293a57;
}
[data-theme="dark"] .plan-amount-val {
  color: #f8fafc;
}
[data-theme="dark"] .plan-features-list li {
  color: #cbd5e1;
}
[data-theme="dark"] .plans-quick-table-card {
  background: #111a2e;
  border-color: #1e2c45;
}
[data-theme="dark"] .plans-quick-table-header {
  background: #18233a;
  border-color: #293a57;
}
[data-theme="dark"] .plan-amt-input {
  background: #0b1120;
  border-color: #293a57;
  color: #4ade80;
}

/* =========================================================
   COMPREHENSIVE DARK THEME REFINEMENTS & COLOR HARMONIZATION
   Eliminates light merging in cells, provides crisp borders,
   and ensures 100% visible, high-contrast text across all screens.
   ========================================================= */

/* 1. SELLER PLATFORM / SUPER ADMIN KPI METRIC CARDS */
[data-theme="dark"] .sa-kpi-card {
  background: #111a2e !important;
  border: 1px solid #1e2c45 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25) !important;
}
[data-theme="dark"] .sa-kpi-card:hover {
  border-color: #3b82f6 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}
[data-theme="dark"] .sa-kpi-val {
  color: #f8fafc !important;
}
[data-theme="dark"] .sa-kpi-lbl {
  color: #94a3b8 !important;
}
[data-theme="dark"] .sa-kpi-card.blue .sa-kpi-icon {
  background: rgba(66, 133, 244, 0.18) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(66, 133, 244, 0.3) !important;
}
[data-theme="dark"] .sa-kpi-card.green .sa-kpi-icon {
  background: rgba(52, 168, 83, 0.18) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(52, 168, 83, 0.3) !important;
}
[data-theme="dark"] .sa-kpi-card.yellow .sa-kpi-icon {
  background: rgba(251, 188, 5, 0.18) !important;
  color: #facc15 !important;
  border: 1px solid rgba(251, 188, 5, 0.3) !important;
}
[data-theme="dark"] .sa-kpi-card.red .sa-kpi-icon {
  background: rgba(234, 67, 53, 0.18) !important;
  color: #f87171 !important;
  border: 1px solid rgba(234, 67, 53, 0.3) !important;
}

/* 2. DEALER SUBSCRIPTION TABLE & CARD WRAPPER */
[data-theme="dark"] .dealer-table-card {
  background: #111a2e !important;
  border: 1px solid #1e2c45 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}
[data-theme="dark"] .dealer-table-card-header {
  background: #152238 !important;
  border-bottom: 1px solid #1e2c45 !important;
}
[data-theme="dark"] .dealer-card-title,
[data-theme="dark"] .dealer-table-card-header h3 {
  color: #f8fafc !important;
}
[data-theme="dark"] .sa-filter-pills-bar {
  background: #0b1120 !important;
  border: 1px solid #1e2c45 !important;
}
[data-theme="dark"] .sa-filter-pills-bar .btn-outline {
  color: #94a3b8 !important;
  background: transparent !important;
}
[data-theme="dark"] .sa-filter-pills-bar .btn-outline:hover {
  color: #ffffff !important;
  background: #1e293b !important;
}
[data-theme="dark"] .sa-filter-pills-bar .btn-primary {
  background: #2563eb !important;
  color: #ffffff !important;
}
[data-theme="dark"] #sa-search-input {
  background: #0b1120 !important;
  border: 1px solid #293a57 !important;
  color: #f8fafc !important;
}
[data-theme="dark"] #sa-search-input:focus {
  border-color: #3b82f6 !important;
  background: #0f172a !important;
}

/* 3. DEALER TABLE CELLS & TEXT HIGH-CONTRAST */
[data-theme="dark"] .dealer-table {
  background: #111a2e !important;
}
[data-theme="dark"] .dealer-table th {
  background: #18233a !important;
  color: #94a3b8 !important;
  border-bottom: 1px solid #1e2c45 !important;
  font-weight: 800;
}
[data-theme="dark"] .dealer-table td {
  background: #111a2e !important;
  color: #e2e8f0 !important;
  border-bottom: 1px solid #1e2c45 !important;
}
[data-theme="dark"] .dealer-table tr:hover td {
  background: #16233b !important;
}
[data-theme="dark"] .dealer-table tr.dealer-current-row td {
  background: #162744 !important;
  border-bottom-color: #2563eb !important;
}
[data-theme="dark"] .dealer-station-name {
  color: #f8fafc !important;
}
[data-theme="dark"] .dealer-station-sub {
  color: #94a3b8 !important;
}
[data-theme="dark"] .dealer-station-sub code {
  background: #0b1120 !important;
  color: #93c5fd !important;
  border: 1px solid #1e2c45 !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
}
[data-theme="dark"] .dealer-owner-name {
  color: #f8fafc !important;
}
[data-theme="dark"] .dealer-owner-phone {
  color: #cbd5e1 !important;
}
[data-theme="dark"] .dealer-owner-email {
  color: #94a3b8 !important;
}
[data-theme="dark"] .dealer-cred-user {
  color: #93c5fd !important;
}
[data-theme="dark"] .dealer-cred-pass {
  color: #4ade80 !important;
}
[data-theme="dark"] .dealer-plan-name {
  color: #f8fafc !important;
}
[data-theme="dark"] .dealer-plan-price {
  color: #4ade80 !important;
}
[data-theme="dark"] .dealer-plan-validity {
  color: #94a3b8 !important;
}
[data-theme="dark"] .dealer-plan-validity strong {
  color: #f8fafc !important;
}

/* 4. DEALER ACTION BUTTONS IN DARK MODE (LUMINOUS TINTED) */
[data-theme="dark"] .dealer-action-btn.renew {
  background: rgba(66, 133, 244, 0.18) !important;
  color: #93c5fd !important;
  border: 1px solid rgba(66, 133, 244, 0.4) !important;
}
[data-theme="dark"] .dealer-action-btn.renew:hover {
  background: rgba(66, 133, 244, 0.35) !important;
  color: #ffffff !important;
}
[data-theme="dark"] .dealer-action-btn.whatsapp {
  background: rgba(34, 197, 94, 0.18) !important;
  color: #86efac !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
}
[data-theme="dark"] .dealer-action-btn.whatsapp:hover {
  background: rgba(34, 197, 94, 0.35) !important;
  color: #ffffff !important;
}
[data-theme="dark"] .dealer-action-btn.preview {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
[data-theme="dark"] .dealer-action-btn.preview:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
}
[data-theme="dark"] .dealer-action-btn.toggle {
  background: rgba(234, 179, 8, 0.18) !important;
  color: #fde047 !important;
  border: 1px solid rgba(234, 179, 8, 0.4) !important;
}
[data-theme="dark"] .dealer-action-btn.toggle:hover {
  background: rgba(234, 179, 8, 0.35) !important;
  color: #ffffff !important;
}
[data-theme="dark"] .dealer-action-btn.delete {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}
[data-theme="dark"] .dealer-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.35) !important;
  color: #ffffff !important;
}
[data-theme="dark"] .dealer-action-btn.restore {
  background: rgba(234, 88, 12, 0.18) !important;
  color: #fdba74 !important;
  border: 1px solid rgba(234, 88, 12, 0.4) !important;
}
[data-theme="dark"] .dealer-action-btn.restore:hover {
  background: rgba(234, 88, 12, 0.35) !important;
  color: #ffffff !important;
}
[data-theme="dark"] .dealer-action-btn.passkey {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
[data-theme="dark"] .dealer-action-btn.passkey:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
}

/* 5. QUICK SHIFT & HARDWARE NOZZLE CARDS IN DARK MODE */
[data-theme="dark"] .nozzle-card {
  background: #141f36 !important;
  border: 1px solid #233554 !important;
  color: #f8fafc !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}
[data-theme="dark"] .nozzle-card span {
  color: #cbd5e1 !important;
}
[data-theme="dark"] .nozzle-card strong {
  color: #ffffff !important;
}
[data-theme="dark"] .nozzle-card input {
  background: #0b1120 !important;
  border: 1px solid #293a57 !important;
  color: #ffffff !important;
}
[data-theme="dark"] .nozzle-card input:focus {
  border-color: #3b82f6 !important;
}

/* 6. PREVENTS LIGHT BLEED / MERGING IN ALL CELLS ACROSS ALL TABLES */
[data-theme="dark"] .table-responsive,
[data-theme="dark"] .table-container {
  background: #111a2e !important;
  border: 1px solid #1e2c45 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="dark"] .data-table,
[data-theme="dark"] .dealer-table,
[data-theme="dark"] table.data-table,
[data-theme="dark"] table.statement-table,
[data-theme="dark"] table {
  background: #111a2e !important;
  border: 1px solid #1e2c45 !important;
}

[data-theme="dark"] .data-table th,
[data-theme="dark"] .dealer-table th,
[data-theme="dark"] table.data-table th,
[data-theme="dark"] table.statement-table th,
[data-theme="dark"] table th {
  background: #151f33 !important;
  color: #94a3b8 !important;
  border-bottom: 2px solid #243452 !important;
  border-right: 1px solid #18233a !important;
}

[data-theme="dark"] .data-table td,
[data-theme="dark"] .dealer-table td,
[data-theme="dark"] table.data-table td,
[data-theme="dark"] table.statement-table td,
[data-theme="dark"] table td {
  border-bottom: 1px solid #1e2c45 !important;
  border-right: 1px solid #18233a !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .data-table th:last-child,
[data-theme="dark"] .data-table td:last-child,
[data-theme="dark"] .dealer-table th:last-child,
[data-theme="dark"] .dealer-table td:last-child,
[data-theme="dark"] table th:last-child,
[data-theme="dark"] table td:last-child {
  border-right: none !important;
}

[data-theme="dark"] .data-table tbody tr:hover td,
[data-theme="dark"] .dealer-table tbody tr:hover td,
[data-theme="dark"] table tbody tr:hover td,
[data-theme="dark"] table tbody tr:hover > td {
  background: #16243d !important;
}

[data-theme="dark"] .data-table tfoot td,
[data-theme="dark"] table tfoot td,
[data-theme="dark"] table tr.total-row td {
  background: #18233a !important;
  color: #ffffff !important;
  border-top: 2px solid #243452 !important;
  border-bottom: 1px solid #1e2c45 !important;
}

/* 7. ROBUST INLINE STYLE OVERRIDES IN DARK MODE (TEXT COLORS) */
[data-theme="dark"] [style*="color: #0f172a"],
[data-theme="dark"] [style*="color:#0f172a"],
[data-theme="dark"] [style*="color: #1e293b"],
[data-theme="dark"] [style*="color:#1e293b"],
[data-theme="dark"] [style*="color: #334155"],
[data-theme="dark"] [style*="color:#334155"],
[data-theme="dark"] [style*="color: #111827"],
[data-theme="dark"] [style*="color:#111827"],
[data-theme="dark"] [style*="color: #000"],
[data-theme="dark"] [style*="color:#000"],
[data-theme="dark"] [style*="color: black"] {
  color: #f8fafc !important;
}

[data-theme="dark"] [style*="color: #475569"],
[data-theme="dark"] [style*="color:#475569"],
[data-theme="dark"] [style*="color: #64748b"],
[data-theme="dark"] [style*="color:#64748b"] {
  color: #94a3b8 !important;
}

[data-theme="dark"] [style*="color: #1e3a8a"],
[data-theme="dark"] [style*="color:#1e3a8a"],
[data-theme="dark"] [style*="color: #1e40af"],
[data-theme="dark"] [style*="color:#1e40af"],
[data-theme="dark"] [style*="color: #1d4ed8"],
[data-theme="dark"] [style*="color:#1d4ed8"] {
  color: #93c5fd !important;
}

[data-theme="dark"] [style*="color: #14532d"],
[data-theme="dark"] [style*="color:#14532d"],
[data-theme="dark"] [style*="color: #166534"],
[data-theme="dark"] [style*="color:#166534"],
[data-theme="dark"] [style*="color: #15803d"],
[data-theme="dark"] [style*="color:#15803d"] {
  color: #86efac !important;
}

[data-theme="dark"] [style*="color: #7f1d1d"],
[data-theme="dark"] [style*="color:#7f1d1d"],
[data-theme="dark"] [style*="color: #991b1b"],
[data-theme="dark"] [style*="color:#991b1b"],
[data-theme="dark"] [style*="color: #b91c1c"],
[data-theme="dark"] [style*="color:#b91c1c"],
[data-theme="dark"] [style*="color: #dc2626"],
[data-theme="dark"] [style*="color:#dc2626"] {
  color: #fca5a5 !important;
}

[data-theme="dark"] [style*="color: #78350f"],
[data-theme="dark"] [style*="color:#78350f"],
[data-theme="dark"] [style*="color: #92400e"],
[data-theme="dark"] [style*="color:#92400e"],
[data-theme="dark"] [style*="color: #b45309"],
[data-theme="dark"] [style*="color:#b45309"],
[data-theme="dark"] [style*="color: #a16207"],
[data-theme="dark"] [style*="color:#a16207"],
[data-theme="dark"] [style*="color: #ea580c"],
[data-theme="dark"] [style*="color:#ea580c"],
[data-theme="dark"] [style*="color: #d97706"],
[data-theme="dark"] [style*="color:#d97706"] {
  color: #fde047 !important;
}

[data-theme="dark"] [style*="color: #581c87"],
[data-theme="dark"] [style*="color:#581c87"],
[data-theme="dark"] [style*="color: #6b21a8"],
[data-theme="dark"] [style*="color:#6b21a8"],
[data-theme="dark"] [style*="color: #7c3aed"],
[data-theme="dark"] [style*="color:#7c3aed"] {
  color: #d8b4fe !important;
}

/* 8. ROBUST INLINE STYLE OVERRIDES IN DARK MODE (SURFACE BACKGROUNDS) */
[data-theme="dark"] [style*="background: #ffffff"],
[data-theme="dark"] [style*="background:#ffffff"],
[data-theme="dark"] [style*="background: white"],
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background: #f8fafc"],
[data-theme="dark"] [style*="background:#f8fafc"],
[data-theme="dark"] [style*="background: #f1f5f9"],
[data-theme="dark"] [style*="background:#f1f5f9"] {
  background-color: #111a2e !important;
}

[data-theme="dark"] [style*="background: #eff6ff"],
[data-theme="dark"] [style*="background:#eff6ff"],
[data-theme="dark"] [style*="background: #e0f2fe"],
[data-theme="dark"] [style*="background:#e0f2fe"],
[data-theme="dark"] [style*="background: #e8f0fe"],
[data-theme="dark"] [style*="background:#e8f0fe"],
[data-theme="dark"] [style*="background: #f0f9ff"],
[data-theme="dark"] [style*="background:#f0f9ff"],
[data-theme="dark"] [style*="background: #dbeafe"],
[data-theme="dark"] [style*="background:#dbeafe"] {
  background-color: rgba(37, 99, 235, 0.16) !important;
}

[data-theme="dark"] [style*="background: #f0fdf4"],
[data-theme="dark"] [style*="background:#f0fdf4"],
[data-theme="dark"] [style*="background: #dcfce7"],
[data-theme="dark"] [style*="background:#dcfce7"],
[data-theme="dark"] [style*="background: #ecfdf5"],
[data-theme="dark"] [style*="background:#ecfdf5"],
[data-theme="dark"] [style*="background: #e6f4ea"],
[data-theme="dark"] [style*="background:#e6f4ea"] {
  background-color: rgba(34, 197, 94, 0.16) !important;
}

[data-theme="dark"] [style*="background: #fef2f2"],
[data-theme="dark"] [style*="background:#fef2f2"],
[data-theme="dark"] [style*="background: #fee2e2"],
[data-theme="dark"] [style*="background:#fee2e2"],
[data-theme="dark"] [style*="background: #fff5f5"],
[data-theme="dark"] [style*="background:#fff5f5"],
[data-theme="dark"] [style*="background: #fce8e6"],
[data-theme="dark"] [style*="background:#fce8e6"],
[data-theme="dark"] [style*="background: #fad2cf"],
[data-theme="dark"] [style*="background:#fad2cf"],
[data-theme="dark"] [style*="background: #fecaca"],
[data-theme="dark"] [style*="background:#fecaca"] {
  background-color: rgba(239, 68, 68, 0.16) !important;
}

[data-theme="dark"] [style*="background: #fffbeb"],
[data-theme="dark"] [style*="background:#fffbeb"],
[data-theme="dark"] [style*="background: #fff7ed"],
[data-theme="dark"] [style*="background:#fff7ed"],
[data-theme="dark"] [style*="background: #fff3cd"],
[data-theme="dark"] [style*="background:#fff3cd"],
[data-theme="dark"] [style*="background: #fef3c7"],
[data-theme="dark"] [style*="background:#fef3c7"],
[data-theme="dark"] [style*="background: #fef7e0"],
[data-theme="dark"] [style*="background:#fef7e0"],
[data-theme="dark"] [style*="background: #fde68a"],
[data-theme="dark"] [style*="background:#fde68a"] {
  background-color: rgba(234, 179, 8, 0.16) !important;
}

[data-theme="dark"] [style*="background: #ede9fe"],
[data-theme="dark"] [style*="background:#ede9fe"],
[data-theme="dark"] [style*="background: #f3e8ff"],
[data-theme="dark"] [style*="background:#f3e8ff"],
[data-theme="dark"] [style*="background: #f5f3ff"],
[data-theme="dark"] [style*="background:#f5f3ff"] {
  background-color: rgba(168, 85, 247, 0.16) !important;
}

[data-theme="dark"] [style*="background: #e2e8f0"],
[data-theme="dark"] [style*="background:#e2e8f0"],
[data-theme="dark"] [style*="background: #cbd5e1"],
[data-theme="dark"] [style*="background:#cbd5e1"] {
  background-color: #1e2c45 !important;
}

/* 9. ROBUST INLINE STYLE OVERRIDES IN DARK MODE (BORDERS & EDGES) */
[data-theme="dark"] [style*="border: 1px solid #e2e8f0"],
[data-theme="dark"] [style*="border:1px solid #e2e8f0"],
[data-theme="dark"] [style*="border: 1px solid #cbd5e1"],
[data-theme="dark"] [style*="border:1px solid #cbd5e1"],
[data-theme="dark"] [style*="border: 1px solid #dcfce7"],
[data-theme="dark"] [style*="border:1px solid #dcfce7"],
[data-theme="dark"] [style*="border: 1px solid #bbf7d0"],
[data-theme="dark"] [style*="border:1px solid #bbf7d0"],
[data-theme="dark"] [style*="border: 1px solid #fde68a"],
[data-theme="dark"] [style*="border:1px solid #fde68a"],
[data-theme="dark"] [style*="border: 1px solid #dbeafe"],
[data-theme="dark"] [style*="border:1px solid #dbeafe"],
[data-theme="dark"] [style*="border: 1px solid #fecaca"],
[data-theme="dark"] [style*="border:1px solid #fecaca"],
[data-theme="dark"] [style*="border: 1.5px solid #e2e8f0"],
[data-theme="dark"] [style*="border:1.5px solid #e2e8f0"],
[data-theme="dark"] [style*="border-bottom: 1px solid #f1f5f9"],
[data-theme="dark"] [style*="border-bottom:1px solid #f1f5f9"],
[data-theme="dark"] [style*="border-top: 1px solid #e2e8f0"],
[data-theme="dark"] [style*="border-top:1px solid #e2e8f0"],
[data-theme="dark"] [style*="border-top: 2px solid #0f172a"],
[data-theme="dark"] [style*="border-top:2px solid #0f172a"] {
  border-color: #1e2c45 !important;
}

/* 10. CRISP CONTRAST FOR SIDEBAR, CONTAINERS, MODALS & BADGES */
[data-theme="dark"] .sidebar {
  border-right: 1px solid #1e2c45 !important;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.5) !important;
}
[data-theme="dark"] .top-bar {
  border-bottom: 1px solid #1e2c45 !important;
}
[data-theme="dark"] .card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .kpi-card,
[data-theme="dark"] .tank-card,
[data-theme="dark"] .shift-card {
  border: 1px solid #1e2c45 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

/* Alert Banner in Dark Mode */
[data-theme="dark"] .alert-banner {
  background: #172136 !important;
  border: 1px solid #243452 !important;
  border-left: 5px solid #eab308 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}
[data-theme="dark"] .alert-banner.danger {
  background: #24141e !important;
  border: 1px solid #3d1f2e !important;
  border-left: 5px solid #ef4444 !important;
}
[data-theme="dark"] .alert-item {
  border-bottom: 1px dashed #243452 !important;
  color: #cbd5e1 !important;
}
[data-theme="dark"] .alert-item span,
[data-theme="dark"] .alert-banner div {
  color: #cbd5e1 !important;
}

/* Button Outlines in Dark Mode */
[data-theme="dark"] .btn-outline {
  background: #151f33 !important;
  border: 1px solid #293a57 !important;
  color: #cbd5e1 !important;
}
[data-theme="dark"] .btn-outline:hover {
  background: #1e2c45 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}
[data-theme="dark"] .btn-outline-danger {
  background: #1f1522 !important;
  border: 1px solid #3b1d28 !important;
  color: #fca5a5 !important;
}
[data-theme="dark"] .btn-outline-danger:hover {
  background: #2d1622 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

/* Sidebar & User Profile in Dark Mode */
[data-theme="dark"] .user-profile-card {
  background: #151f33 !important;
  border: 1px solid #1e2c45 !important;
  color: #f8fafc !important;
}
[data-theme="dark"] .sidebar-footer {
  background: #0b1120 !important;
  border-top: 1px solid #1e2c45 !important;
}
[data-theme="dark"] .btn-sidebar-collapse {
  background: #151f33 !important;
  border: 1px solid #1e2c45 !important;
  color: #94a3b8 !important;
}
[data-theme="dark"] .btn-sidebar-collapse:hover {
  background: #1e2c45 !important;
  color: #ffffff !important;
}
[data-theme="dark"] .btn-sidebar-backup {
  background: #1f1522 !important;
  border: 1px solid #3b1d28 !important;
  color: #fca5a5 !important;
}
[data-theme="dark"] .btn-sidebar-backup:hover {
  background: #2d1622 !important;
  color: #ffffff !important;
}
[data-theme="dark"] .nav-item:hover {
  background: #18233a !important;
  color: #ffffff !important;
}
[data-theme="dark"] .nav-item.active {
  background: rgba(66, 133, 244, 0.2) !important;
  color: #60a5fa !important;
  border-left: 3px solid #3b82f6 !important;
}
[data-theme="dark"] .top-bar-right .date-pill {
  background: #151f33 !important;
  border: 1px solid #1e2c45 !important;
  color: #cbd5e1 !important;
}
[data-theme="dark"] .amount-words-box {
  background: #151f33 !important;
  border: 1px solid #1e2c45 !important;
  color: #f8fafc !important;
}
[data-theme="dark"] .modal-header {
  border-bottom: 1px solid #1e2c45 !important;
}
[data-theme="dark"] .modal-footer {
  border-top: 1px solid #1e2c45 !important;
}

[data-theme="dark"] .renew-radio-card {
  background: #111a2e !important;
  border: 1px solid #1e2c45 !important;
}
[data-theme="dark"] .renew-radio-card:hover {
  background: #16243d !important;
  border-color: #3b82f6 !important;
}
[data-theme="dark"] .renew-radio-card input:checked ~ .radio-content strong {
  color: #60a5fa !important;
}
[data-theme="dark"] .renew-radio-card .radio-content strong {
  color: #f8fafc !important;
}
[data-theme="dark"] .renew-radio-card .radio-content span {
  color: #94a3b8 !important;
}

[data-theme="dark"] .seller-subnav-bar {
  background: #111a2e !important;
  border: 1px solid #1e2c45 !important;
}

/* Form selects & options in Dark Mode */
[data-theme="dark"] select,
[data-theme="dark"] .form-control {
  background-color: #151f33 !important;
  border-color: #293a57 !important;
  color: #f8fafc !important;
}
[data-theme="dark"] select:focus,
[data-theme="dark"] .form-control:focus {
  background-color: #1a2742 !important;
  border-color: #3b82f6 !important;
}
[data-theme="dark"] option {
  background-color: #111a2e !important;
  color: #f8fafc !important;
}
[data-theme="dark"] ::placeholder {
  color: #64748b !important;
}

/* Status & Days Pills */
[data-theme="dark"] .status-badge-active {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
}
[data-theme="dark"] .status-badge-suspended {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}
[data-theme="dark"] .days-pill.green {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
}
[data-theme="dark"] .days-pill.yellow {
  background: rgba(234, 179, 8, 0.15) !important;
  color: #fde047 !important;
  border: 1px solid rgba(234, 179, 8, 0.3) !important;
}
[data-theme="dark"] .days-pill.red {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

/* Badges & Gold Inputs */
[data-theme="dark"] .badge-success { background: rgba(34, 197, 94, 0.2) !important; color: #86efac !important; border: 1px solid rgba(34, 197, 94, 0.35) !important; }
[data-theme="dark"] .badge-danger  { background: rgba(239, 68, 68, 0.2) !important; color: #fca5a5 !important; border: 1px solid rgba(239, 68, 68, 0.35) !important; }
[data-theme="dark"] .badge-warning { background: rgba(234, 179, 8, 0.2) !important; color: #fde047 !important; border: 1px solid rgba(234, 179, 8, 0.35) !important; }
[data-theme="dark"] .badge-info    { background: rgba(14, 165, 233, 0.2) !important; color: #7dd3fc !important; border: 1px solid rgba(14, 165, 233, 0.35) !important; }
[data-theme="dark"] .badge-petrol  { background: rgba(249, 115, 22, 0.2) !important; color: #fdba74 !important; border: 1px solid rgba(249, 115, 22, 0.35) !important; }
[data-theme="dark"] .badge-diesel  { background: rgba(59, 130, 246, 0.2) !important; color: #93c5fd !important; border: 1px solid rgba(59, 130, 246, 0.35) !important; }

[data-theme="dark"] .input-gold {
  background-color: #1e293b !important;
  border-color: #eab308 !important;
  color: #facc15 !important;
}
[data-theme="dark"] .input-gold:focus {
  background-color: #0f172a !important;
  border-color: #facc15 !important;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.25) !important;
}

/* ========================================================== */
/* COMPREHENSIVE ALL-DEVICE & CROSS-PLATFORM RESPONSIVENESS   */
/* Ensures 100% flawless compatibility on:                    */
/* Smartphones (320px-480px), Phablets (481px-768px),        */
/* Tablets (769px-1024px), Laptops & High-DPI Desktop Monitors*/
/* ========================================================== */

/* 1. GLOBAL TOUCH & FLUID RESILIENCE */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  min-width: 320px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

button, a, input, select, textarea, .nav-item, .pill, .btn {
  touch-action: manipulation;
}

/* 2. TABLET ADAPTATIONS (769px to 1024px: iPad, Android Tablets, Surface) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }
  .main-wrapper {
    margin-left: 240px;
  }
  .kpi-grid,
  .sa-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.85rem;
  }
  .responsive-split-grid {
    grid-template-columns: 1fr !important;
  }
  .plans-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* 3. MOBILE & PHABLET OPTIMIZATIONS (<= 768px: iPhone Pro Max, Pixel, Galaxy) */
@media screen and (max-width: 768px) {
  .app-layout {
    width: 100%;
    overflow-x: hidden;
  }

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

  .card, .stat-card {
    padding: 0.85rem !important;
    border-radius: 10px !important;
    margin-bottom: 0.85rem !important;
  }

  .card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }

  /* KPI Grids: Clean 2-column mobile cards */
  .kpi-grid,
  .sa-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }

  .sa-kpi-card {
    padding: 0.85rem !important;
    gap: 0.65rem !important;
  }

  .sa-kpi-icon {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.15rem !important;
  }

  .sa-kpi-val {
    font-size: 1.15rem !important;
  }

  .sa-kpi-lbl {
    font-size: 0.65rem !important;
  }

  /* Super Admin Header on Mobile */
  .super-admin-header {
    padding: 1rem !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  .super-admin-header .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Horizontal Scrolling Tab Bars with Touch Momentum */
  .seller-subnav-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    display: flex;
    padding: 4px;
    gap: 0.35rem;
  }

  .seller-subnav-btn {
    flex: 0 0 auto;
    padding: 0.5rem 0.85rem !important;
    font-size: 0.82rem !important;
  }

  /* Subscription Plans on Mobile */
  .plans-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Fluid Table Scrolling on All Touch Devices */
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 8px !important;
    position: relative;
  }

  .data-table, .dealer-table {
    min-width: 580px;
  }

  /* Modals: Full Touch Device Adaptation */
  .modal-overlay {
    padding: 0.5rem !important;
    align-items: flex-start !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100vh - 1rem) !important;
    margin: 0.5rem auto !important;
    padding: 1rem !important;
    border-radius: 12px !important;
  }

  .modal-header h3 {
    font-size: 1rem !important;
  }

  .modal-footer {
    flex-direction: column-reverse !important;
    gap: 0.5rem !important;
  }

  .modal-footer .btn {
    width: 100% !important;
  }

  /* Mobile Form Controls */
  input, select, textarea, .form-control {
    font-size: 16px !important; /* Prevents iOS auto-zoom */
    min-height: 42px !important;
    border-radius: 6px !important;
  }

  /* Top Bar & Floating Theme Buttons */
  .login-theme-toggle-bar {
    top: 0.75rem !important;
    right: 0.75rem !important;
  }

  .theme-toggle-btn {
    padding: 0.45rem 0.75rem !important;
    font-size: 0.75rem !important;
  }
}

/* 4. COMPACT MOBILE SCREENS (<= 480px: iPhone SE, Galaxy Mini) */
@media screen and (max-width: 480px) {
  .kpi-grid,
  .sa-kpi-grid {
    grid-template-columns: 1fr !important;
  }

  .dash-ctrl-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .dash-btn-group {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    width: 100% !important;
  }

  .dash-btn-group .btn {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .login-card {
    padding: 1.5rem 1rem !important;
  }

  .login-header h1 {
    font-size: 1.35rem !important;
  }

  .dealer-action-btn {
    padding: 4px 6px !important;
    font-size: 0.75rem !important;
  }
}

/* HIGH-PRIORITY MODALS OVER LOGIN OVERLAY */
#forgot-password-modal {
  z-index: 100005 !important;
}

/* ========================================================
   MODERN PROFESSIONAL SAAS FLOATING TOAST NOTIFICATIONS
   ======================================================== */
.fuelnex-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
  width: calc(100% - 48px);
}

.fuelnex-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.18), 0 4px 6px -2px rgba(15, 23, 42, 0.08);
  border-left: 4px solid #10b981;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  border-right: 1px solid rgba(226, 232, 240, 0.8);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  font-family: inherit;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.fuelnex-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.fuelnex-toast.hide {
  opacity: 0;
  transform: translateY(10px) scale(0.95);
}

.fuelnex-toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.fuelnex-toast-content {
  flex-grow: 1;
  line-height: 1.35;
}

.fuelnex-toast-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
}

.fuelnex-toast-desc {
  font-weight: 500;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 3px;
}

.fuelnex-toast.success {
  border-left-color: #10b981;
}
.fuelnex-toast.success .fuelnex-toast-icon {
  color: #10b981;
}

.fuelnex-toast.error {
  border-left-color: #ef4444;
}
.fuelnex-toast.error .fuelnex-toast-icon {
  color: #ef4444;
}

.fuelnex-toast.info {
  border-left-color: #3b82f6;
}
.fuelnex-toast.info .fuelnex-toast-icon {
  color: #3b82f6;
}

.fuelnex-toast.warning {
  border-left-color: #f59e0b;
}
.fuelnex-toast.warning .fuelnex-toast-icon {
  color: #f59e0b;
}

.fuelnex-toast-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 1.1rem;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s;
  margin-left: 4px;
  flex-shrink: 0;
}
.fuelnex-toast-close:hover {
  color: #0f172a;
}

body.dark-mode .fuelnex-toast {
  background: #1e293b;
  border-top-color: #334155;
  border-right-color: #334155;
  border-bottom-color: #334155;
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.45);
}
body.dark-mode .fuelnex-toast-title {
  color: #f8fafc;
}
body.dark-mode .fuelnex-toast-desc {
  color: #94a3b8;
}
body.dark-mode .fuelnex-toast-close {
  color: #64748b;
}
body.dark-mode .fuelnex-toast-close:hover {
  color: #f8fafc;
}





