/* ═══════════════════════════════════════════
   PSMP — Operations Portal Stylesheet
   Version 1.0 | March 2026
═══════════════════════════════════════════ */

/* ─── CSS TOKENS ─── */
:root {
  --orange:       #E8762B;
  --orange-rgb:   232, 118, 43;
  --orange-dark:  #C45A0F;
  --orange-light: #F9A86C;
  --navy:         #1B3A5C;
  --navy-light:   #24527A;
  --red:          #C0392B;
  --red-dark:     #922B21;
  --green:        #2D7A4F;
  --green-light:  #3EAA6D;
  --amber:        #D4860B;
  --blue-auth:    #2980B9;
  --blue-light:   #3498DB;

  --bg-primary:   #0F1117;
  --bg-surface:   #1A1D27;
  --bg-elevated:  #222636;
  --bg-hover:     #2A2F45;
  --bg-active:    rgba(232,118,43,0.12);

  --border:       rgba(255,255,255,0.07);
  --border-focus: rgba(232,118,43,0.5);

  --text-primary:   #F0F2F8;
  --text-secondary: #8B92A8;
  --text-muted:     #555E75;
  --text-inverse:   #0F1117;

  --sidebar-width:    240px;
  --sidebar-rail:      60px;
  --header-height:     56px;
  --pos-topbar-height: 64px;
  --pos-bottombar-height: 40px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.7);

  --transition: 200ms ease;

  /* Legacy Bridge Variables (for inline style conversion) */
  --inline-white:      #FFFFFF;
  --inline-dim:        rgba(255,255,255,0.4);
  --inline-muted:      rgba(255,255,255,0.6);
  --inline-border:     rgba(255,255,255,0.1);
  --inline-bg-light:   rgba(255,255,255,0.02);
  --inline-bg-med:     rgba(255,255,255,0.05);
}
 
/* ─── LIGHT MODE OVERRIDES ─── */
.light-mode {
  --bg-primary:   #F8FAFC;
  --bg-surface:   #FFFFFF;
  --bg-elevated:  #FFFFFF;
  --bg-hover:     #F1F5F9;
  --bg-active:    rgba(232,118,43,0.08);
  --orange-rgb:   232, 118, 43;

  --border:       rgba(0,0,0,0.1);
  --border-focus: rgba(232,118,43,0.4);
  
  --text-primary:   #0F172A;
  --text-secondary: #334155;
  --text-muted:     #64748B;
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);

  /* Legacy Bridge Overrides */
  --inline-white:      var(--text-primary);
  --inline-dim:        var(--text-secondary);
  --inline-muted:      var(--text-muted);
  --inline-border:     rgba(0,0,0,0.08);
  --inline-bg-light:   var(--bg-hover);
  --inline-bg-med:     #F8FAFC;
}

.light-mode .glass {
  background: #FFFFFF !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1) !important;
}

.light-mode .form-card.glass {
   box-shadow: var(--shadow-md);
   background: #FFFFFF !important;
}

.light-mode .nav-link.active {
   background: rgba(232,118,43,0.1);
}

.theme-toggle {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
.theme-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.sun-icon { display: none; }
.moon-icon { display: block; }

.light-mode .moon-icon { display: none !important; }
.light-mode .sun-icon { display: block !important; }

.light-mode .pa-input, 
.light-mode .pa-select, 
.light-mode .form-input, 
.light-mode .form-select, 
.light-mode .form-textarea {
   background: #fff;
   color: #1A202C;
   border-color: rgba(0,0,0,0.1);
}

.light-mode .card, 
.light-mode .panel, 
.light-mode .modal-content, 
.light-mode .modal-card,
.light-mode .slide-panel {
   background: #fff;
   color: #1A202C;
}

.light-mode .pa-pump-hero {
  background: linear-gradient(160deg, #F8FAFC 0%, #F1F5F9 100%) !important;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.light-mode .pa-header,
.light-mode .panel-header,
.light-mode .category-strip-container {
  background: #FFFFFF !important;
  border-bottom: 1px solid rgba(0,0,0,0.05) !important;
}

.light-mode .pump-auth-panel {
  background: #FFFFFF !important;
}

.light-mode .modal-overlay {
  background: rgba(15, 23, 42, 0.15) !important;
  backdrop-filter: blur(6px);
}

.light-mode .pa-estimate-bar {
  background: rgba(232,118,43,0.04);
  border-color: rgba(232,118,43,0.1);
}

.light-mode .pos-bottombar {
  background: #FFFFFF !important;
  border-top: 1px solid rgba(0,0,0,0.05) !important;
}

.light-mode .cat-btn {
  background: #F8FAFC;
  border-color: rgba(0,0,0,0.05);
}

.light-mode .pump-tile.idle {
    background: #F8FAFC;
}

.light-mode .pump-tile {
    background: #FFFFFF;
    border-color: rgba(0,0,0,0.05);
    box-shadow: var(--shadow-sm);
}

.light-mode .product-tile {
    background: #FFFFFF;
    border-color: rgba(0,0,0,0.05);
}

.light-mode .product-tile .product-name {
    color: var(--text-primary);
}

.light-mode .basket-row, 
.light-mode .basket-totals,
.light-mode .loyalty-panel,
.light-mode .pa-pump-hero,
.light-mode .pa-header,
.light-mode .panel-header,
.light-mode .category-strip-container,
.light-mode .pos-topbar {
    border-color: rgba(0,0,0,0.06) !important;
}

.light-mode .basket-totals {
    background: #F8FAFC !important;
}

.light-mode .loyalty-scan-row {
    background: #F1F5F9 !important;
    border-color: rgba(0,0,0,0.05) !important;
}

.light-mode .basket-empty p {
    color: var(--text-secondary);
}

/* Global Inline Style Overrides */
.light-mode [style*="color: white"],
.light-mode [style*="color:white"],
.light-mode [style*="color: #fff"],
.light-mode [style*="color:#fff"],
.light-mode [style*="color: rgba(255,255,255"],
.light-mode [style*="color:rgba(255,255,255"] {
  color: var(--text-primary) !important;
}

.light-mode [style*="background: rgba(255,255,255,0.05)"],
.light-mode [style*="background:rgba(255,255,255,0.05)"],
.light-mode [style*="background: rgba(255,255,255,0.02)"],
.light-mode [style*="background:rgba(255,255,255,0.02)"],
.light-mode [style*="background: rgba(255,255,255,0.1)"] {
  background: var(--bg-hover) !important;
}

.light-mode .summary-card [style*="color:rgba(255,255,255,0.5)"],
.light-mode .summary-card [style*="color: rgba(255,255,255,0.5)"],
.light-mode [style*="color: rgba(255,255,255,0.6)"],
.light-mode [style*="color:rgba(255,255,255,0.6)"],
.light-mode [style*="color: rgba(255,255,255,0.4)"],
.light-mode [style*="color:rgba(255,255,255,0.4)"] {
  color: var(--text-secondary) !important;
}

.light-mode [style*="background: rgba(255,255,255,0.06)"],
.light-mode [style*="background:rgba(255,255,255,0.06)"],
.light-mode [style*="background: rgba(255,255,255,0.12)"],
.light-mode [style*="background:rgba(255,255,255,0.12)"],
.light-mode [style*="background: rgba(255,255,255,0.02)"],
.light-mode [style*="background:rgba(255,255,255,0.02)"],
.light-mode [style*="background: rgba(255,255,255,0.05)"],
.light-mode [style*="background:rgba(255,255,255,0.05)"],
.light-mode [style*="background: rgba(255,255,255,0.1)"],
.light-mode [style*="background:rgba(255,255,255,0.1)"] {
  background-color: #FFFFFF !important;
}

.light-mode [style*="border:1px solid rgba(255,255,255"],
.light-mode [style*="border: 1px solid rgba(255,255,255"],
.light-mode [style*="border-top:1px solid rgba(255,255,255"],
.light-mode [style*="border-top: 1px solid rgba(255,255,255"],
.light-mode [style*="border-bottom:1px solid rgba(255,255,255"],
.light-mode [style*="border-bottom: 1px solid rgba(255,255,255"] {
  border-color: rgba(0,0,0,0.12) !important;
}

.light-mode .pos-divider {
    color: var(--border);
}

.light-mode .cat-scroll-btn {
    background: #FFFFFF !important;
}

.light-mode .cat-scroll-btn.left {
  background: linear-gradient(to right, #FFFFFF 60%, transparent) !important;
}

.light-mode .cat-scroll-btn.right {
  background: linear-gradient(to left, #FFFFFF 60%, transparent) !important;
}

.light-mode ::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15) !important;
}

.light-mode * {
  scrollbar-color: rgba(0,0,0,0.15) transparent !important;
}

.light-mode .app-screen::-webkit-scrollbar-thumb,
.light-mode .sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.12) !important;
}

.light-mode .nav-section-label {
    color: var(--text-muted);
    font-weight: 700;
}

.light-mode .pump-number {
    color: var(--text-primary);
}

.light-mode .pump-grade {
    color: var(--text-secondary);
}

.light-mode .pump-tile.idle .pump-status-badge {
    background: #E2E8F0;
    color: #475569;
}

.light-mode .pump-tile.auth .pump-status-badge {
    background: #DBEAFE;
    color: #1E40AF;
}

.light-mode .pump-tile.fuelling .pump-status-badge {
    background: #DCFCE7;
    color: #166534;
}

.light-mode .pump-tile.complete .pump-status-badge {
    background: #FEF3C7;
    color: #92400E;
}

.light-mode .pump-tile.fault .pump-status-badge {
    background: #FEE2E2;
    color: #991B1B;
}

.light-mode .pump-litres {
    color: var(--text-muted);
}

.light-mode .basket-empty p {
    color: var(--text-secondary);
}

.light-mode .basket-empty span {
    color: var(--text-muted);
}

.light-mode .total-row {
    color: var(--text-secondary);
}

.light-mode .gst-row {
    color: var(--text-muted);
}

.light-mode .btn-tender:disabled {
    background: #E2E8F0 !important;
    color: #94A3B8 !important;
    box-shadow: none;
    opacity: 1;
}

.light-mode .btn-tender {
    text-shadow: none;
}

.light-mode .shortcut-hint {
    color: var(--text-muted);
}

.light-mode .shortcut-hint kbd {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--text-secondary);
}

/* Tank Dashboard Light Mode */
.light-mode .tank-card {
    background: #FFFFFF;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: var(--shadow-sm);
}

.light-mode .tank-title {
    color: var(--text-primary);
}

.light-mode .tank-grade {
    color: var(--text-secondary);
}

.light-mode .tank-reading-meta {
    color: var(--text-muted);
}

.light-mode .tank-stat-label {
    color: var(--text-muted);
}

.light-mode .tank-stat-value {
    color: var(--text-primary);
}

.light-mode .tank-stat-value .unit {
    color: var(--text-muted);
}

/* Task Board Light Mode */
.light-mode .task-card {
    background: #FFFFFF;
    border: 1px solid rgba(0,0,0,0.08);
}

.light-mode .task-card [style*="color:white"],
.light-mode .task-card [style*="color: white"] {
    color: var(--text-primary) !important;
}

.light-mode .task-card [style*="color:var(--inline-dim)"] {
    color: var(--text-secondary) !important;
}

/* Priority Badges in Light Mode */
.light-mode [style*="background:rgba(231,76,60,0.2)"] {
    background: #FEE2E2 !important;
    color: #991B1B !important;
}

.light-mode [style*="background:rgba(52,152,219,0.2)"] {
    background: #DBEAFE !important;
    color: #1E40AF !important;
}

/* Table Headers in Light Mode */
.light-mode tr[style*="color: var(--inline-muted)"],
.light-mode th[style*="color: var(--inline-muted)"],
.light-mode table thead tr {
    color: var(--text-secondary) !important;
}

.light-mode .price-table-wrapper table th {
    color: var(--text-secondary);
    border-bottom: 2px solid #F1F5F9;
}

.light-mode tr[style*="cursor:pointer"] td {
    border-bottom: 1px solid #F1F5F9;
}

.light-mode .status-badge[style*="color:var(--green-light)"] {
    background: #DCFCE7 !important;
    color: #166534 !important;
}

/* ─── Pump Authorisation Panel Light Mode ─── */
.light-mode .pa-title {
    color: var(--text-primary);
}

.light-mode .pa-route {
    color: var(--text-muted);
}

.light-mode .pa-field-label {
    color: var(--text-primary);
}

.light-mode .pa-req-tag.required {
    background: #FFEDD5;
    color: #9A3412;
}

.light-mode .pa-req-tag.readonly {
    background: #F1F5F9;
    color: #475569;
}

.light-mode .pa-field-hint {
    color: var(--text-muted);
}

.light-mode .pa-readonly-display {
    background: #F8FAFC;
    border-color: #E2E8F0;
}

.light-mode .pa-readonly-value {
    color: var(--text-primary);
}

.light-mode .pa-readonly-hint {
    color: var(--text-muted);
}

.light-mode .pa-radio-card {
    background: #FFFFFF;
    border-color: #E2E8F0;
}

.light-mode .pa-radio-card:hover {
    border-color: var(--orange);
    background: #FFF7ED;
}

.light-mode .pa-radio-card.active {
    background: #FFF7ED;
    border-color: var(--orange);
}

.light-mode .pa-radio-title {
    color: var(--text-primary);
}

.light-mode .pa-radio-desc {
    color: var(--text-muted);
}

.light-mode .pa-radio-icon-wrap {
    background: #F8FAFC;
    color: var(--text-secondary);
}

.light-mode .pa-radio-card.active .pa-radio-icon-wrap {
    background: #FFEDD5;
    color: var(--orange);
}

.light-mode .pa-est-label {
    color: var(--text-muted);
}

.light-mode .pa-est-value {
    color: var(--text-primary);
}

.light-mode .pa-estimate-divider {
    background: #E2E8F0;
}

.light-mode .pa-quick-presets .pa-preset-btn {
    background: #F1F5F9;
    border-color: #E2E8F0;
    color: var(--text-secondary);
}

.light-mode .pa-quick-presets .pa-preset-btn:hover {
    background: #E2E8F0;
    color: var(--text-primary);
}

.light-mode .pa-quick-presets .pa-preset-btn.selected {
    background: var(--orange);
    color: white;
    border-color: var(--orange);
}

.light-mode .pa-currency-symbol,
.light-mode .pa-litre-unit {
    color: var(--text-muted);
}

.light-mode .pa-input {
    background: #FFFFFF;
    border-color: #CBD5E1;
    color: var(--text-primary);
}

.light-mode .pa-input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(232,118,43,0.1);
}

.light-mode .pa-select {
    background-color: #FFFFFF !important;
    border-color: #CBD5E1 !important;
    color: var(--text-primary) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%23334155' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
}

.light-mode .pa-pump-hero.status-idle {
    background: linear-gradient(to bottom right, #F8FAFC, #F1F5F9);
}

.light-mode .pa-status-chip {
    background: rgba(0,0,0,0.05);
    color: var(--text-secondary);
}

.light-mode .pa-grade-chip {
    background: #DBEAFE;
    color: #1E40AF;
}

.light-mode .pa-site-chip {
    background: #F1F5F9;
    color: #64748B;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
ul { list-style: none; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; }
svg { flex-shrink: 0; }

/* ─── OFFLINE BANNER ─── */
.offline-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #7D3C00;
  color: #FFD580;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid #A0520A;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.offline-icon { font-size: 16px; }
.hidden { display: none !important; }

/* ─── APP SHELL ─── */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ═══════════════════════════════════════
   SIDEBAR NAVIGATION
═══════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width var(--transition);
  overflow: hidden;
  z-index: 100;
}
.sidebar.collapsed { width: var(--sidebar-rail); }
.sidebar.collapsed .brand-name,
.sidebar.collapsed .brand-logo,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .submenu-arrow,
.sidebar.collapsed .user-info,
.sidebar.collapsed .theme-toggle,
.sidebar.collapsed .user-menu-btn { display: none; }
.sidebar.collapsed .submenu { display: none; }
.sidebar.collapsed .sidebar-brand { padding: 16px 0; justify-content: center; }
.sidebar.collapsed .sidebar-toggle { margin: 0; }
.sidebar.collapsed .sidebar-nav .nav-link { justify-content: center; padding: 12px; }
.sidebar.collapsed .user-card { justify-content: center; padding: 12px; }
.sidebar.collapsed .sidebar-toggle svg { transform: rotate(180deg); }

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  min-height: var(--header-height);
}
.brand-logo { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-shrink: 0;
  cursor: pointer;
}
.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
}
.sidebar-toggle {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  margin-left: auto;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.sidebar-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-toggle svg { transition: transform var(--transition); }

/* Nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.nav-section { margin-bottom: 4px; }
.nav-section + .nav-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.nav-section-label {
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 8px;
  display: block;
  white-space: nowrap;
}
.nav-list { display: flex; flex-direction: column; gap: 2px; }

.nav-item { position: relative; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  position: relative;
}
.nav-link:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-link.active {
  background: var(--bg-active);
  color: var(--orange);
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 0; bottom: 0;
  width: 3px;
  background: var(--orange);
  border-radius: 0 2px 2px 0;
}

.nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-icon svg { width: 18px; height: 18px; }
.nav-label { flex: 1; }
.nav-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  background: var(--orange);
  color: #fff;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}
.submenu-arrow { color: var(--text-muted); flex-shrink: 0; transition: transform var(--transition); }
.nav-item.open > .nav-link .submenu-arrow { transform: rotate(180deg); }

/* Submenu */
.submenu {
  display: none;
  flex-direction: column;
  gap: 1px;
  padding: 4px 0 4px 28px;
}
.nav-item.open > .submenu { display: flex; }
.submenu-link {
  display: block;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.submenu-link:hover { background: var(--bg-hover); color: var(--text-primary); }
.submenu-link.active { color: var(--orange); background: var(--bg-active); }

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .nav-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(var(--sidebar-rail) - 4px);
  top: 50%; transform: translateY(-50%);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 200;
}
.sidebar.collapsed .nav-link:hover::after { opacity: 1; }

/* Sidebar Footer / User Card */
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 10px 8px;
  flex-shrink: 0;
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  cursor: pointer;
}
.user-card:hover { background: var(--bg-hover); }
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--navy));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-info { flex: 1; overflow: hidden; }
.user-name { font-size: 13px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-muted); display: block; }
.user-menu-btn { color: var(--text-muted); display: flex; align-items: center; flex-shrink: 0; }
.user-menu-btn:hover { color: var(--text-primary); }

/* ═══════════════════════════════════════
   MAIN WRAPPER + HEADER
═══════════════════════════════════════ */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* Top Header */
.top-header {
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
  z-index: 90;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.mobile-menu-btn {
  display: none;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: var(--radius-sm);
}
.mobile-menu-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Site Selector */
.site-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--text-secondary);
  position: relative;
}
.site-selector:hover { border-color: rgba(255,255,255,0.15); }
.site-selector select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 16px;
}
.select-chevron { position: absolute; right: 10px; pointer-events: none; color: var(--text-muted); }

/* Quick Search */
.quick-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--text-secondary);
  transition: border-color var(--transition);
}
.quick-search:focus-within { border-color: var(--border-focus); }
.quick-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
  width: 180px;
}
.quick-search input::placeholder { color: var(--text-muted); }
.quick-search kbd {
  font-size: 10px;
  padding: 2px 5px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
}

/* Notification Bell */
.notif-btn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.notif-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.notif-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 16px; height: 16px;
  background: var(--orange);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Connection Status */
.connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.connection-status.connected .status-dot { background: var(--green-light); box-shadow: 0 0 6px rgba(62,170,109,0.6); animation: pulse 2s infinite; }
.connection-status.offline .status-dot { background: #E97A1F; }
.status-label { color: var(--text-secondary); }
.status-dot.green { background: var(--green-light); box-shadow: 0 0 6px rgba(62,170,109,0.6); animation: pulse 2s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.header-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════ */
.main-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.app-screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.07) transparent;
}
.app-screen::-webkit-scrollbar { width: 6px; }
.app-screen::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.07); border-radius: 3px; }

/* ═══════════════════════════════════════
   POS SCREEN — SCR-POS-01
═══════════════════════════════════════ */
.pos-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-primary);
  overflow: hidden;
}

/* POS Topbar */
.pos-topbar {
  height: var(--pos-topbar-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  flex-shrink: 0;
}
.pos-site-info { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pos-site-name { font-weight: 600; color: var(--text-primary); }
.pos-divider { color: var(--text-muted); }
.pos-shift-info { color: var(--text-secondary); }
.pos-topbar-center { flex: 1; text-align: center; }
.pos-screen-title { font-size: 14px; font-weight: 700; letter-spacing: 0.5px; color: var(--text-muted); text-transform: uppercase; }
.pos-topbar-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.pos-alert-bell { position: relative; cursor: pointer; color: var(--text-secondary); transition: color var(--transition); }
.pos-alert-bell:hover { color: var(--text-primary); }
.pos-notif-dot {
  position: absolute; top: -2px; right: -2px;
  width: 8px; height: 8px;
  background: var(--orange);
  border-radius: 50%;
  border: 1px solid var(--bg-surface);
}
.pos-connection { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.pos-clock { font-family: 'Inter', monospace; font-size: 15px; font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

/* POS Three-Panel Layout */
.pos-panels {
  flex: 1;
  display: flex;
  overflow: hidden;
  gap: 0;
}

.pos-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border);
}
.pos-panel:last-child { border-right: none; }

.panel-pumps    { width: 38%; }
.panel-products { width: 38%; }
.panel-basket   { width: 24%; background: var(--bg-surface); }

.panel-header {
  padding: 16px 20px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 8px;
}
.panel-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
}

/* Pump Legend */
.pump-legend {
  display: flex;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}
.legend-item { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-muted); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-dot.idle { background: #555E75; }
.legend-dot.auth { background: var(--blue-light); }
.legend-dot.fuelling { background: var(--green-light); }
.legend-dot.complete { background: var(--amber); }

/* Pump Grid */
.pump-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  overflow-y: auto;
  flex: 1;
  align-content: start;
}

.pump-tile {
  background: var(--bg-elevated);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform 80ms;
  min-height: 110px;
  user-select: none;
}
.pump-tile:hover { border-color: rgba(255,255,255,0.15); transform: translateY(-1px); }
.pump-tile:active { transform: translateY(0); }

/* Status colours */
.pump-tile.idle    { border-color: rgba(85,94,117,0.4); }
.pump-tile.auth    { border-color: var(--blue-auth); background: rgba(41,128,185,0.1); }
.pump-tile.fuelling { border-color: var(--green-light); background: rgba(45,122,79,0.1); }
.pump-tile.complete { border-color: var(--amber); background: rgba(212,134,11,0.1); }
.pump-tile.fault   { border-color: var(--red); background: rgba(192,57,43,0.1); }
.pump-tile.driveoff {
  border-color: var(--red);
  background: rgba(192,57,43,0.15);
  animation: redFlash 0.8s ease-in-out infinite;
}
@keyframes redFlash {
  0%, 100% { border-color: var(--red); }
  50% { border-color: transparent; }
}

.pump-number {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}
.pump-grade    { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.pump-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.pump-tile.idle    .pump-status-badge { background: rgba(85,94,117,0.3); color: #8B92A8; }
.pump-tile.auth    .pump-status-badge { background: rgba(41,128,185,0.3); color: #3498DB; }
.pump-tile.fuelling .pump-status-badge { background: rgba(45,122,79,0.3); color: #3EAA6D; }
.pump-tile.complete .pump-status-badge { background: rgba(212,134,11,0.3); color: #F0B429; }
.pump-tile.fault   .pump-status-badge { background: rgba(192,57,43,0.3); color: #E74C3C; }
.pump-tile.driveoff .pump-status-badge { background: var(--red); color: #fff; }
.pump-amount   { font-size: 13px; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.pump-litres   { font-size: 11px; color: var(--text-muted); }

/* Product Search + Category Strip */
.product-search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--text-muted);
  margin-left: 4px;
}
.product-search-bar:focus-within { border-color: var(--border-focus); }
.product-search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
  flex: 1;
}
.product-search-bar input::placeholder { color: var(--text-muted); }

.category-strip-container {
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
}

.category-strip {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.category-strip::-webkit-scrollbar { display: none; }

.cat-scroll-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to right, #1A1D27, rgba(26, 29, 39, 0.8));
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s ease;
  opacity: 0;
  visibility: hidden;
}

.cat-scroll-btn:hover {
  color: var(--orange);
  background: linear-gradient(to right, #242836, rgba(36, 40, 54, 0.9));
}

.cat-scroll-btn.left {
  left: 0;
  background: linear-gradient(to right, #13141F 40%, transparent);
}

.cat-scroll-btn.right {
  right: 0;
  background: linear-gradient(to left, #13141F 40%, transparent);
}

.cat-btn {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.cat-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: rgba(255,255,255,0.15); }
.cat-btn.active { background: var(--orange); color: #fff; border-color: var(--orange); }

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 12px;
  overflow-y: auto;
  flex: 1;
  align-content: start;
}
.product-tile {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform 80ms;
  min-height: 76px;
}
.product-tile:hover { border-color: var(--orange); background: rgba(232,118,43,0.06); transform: translateY(-1px); }
.product-tile:active { transform: translateY(0); }
.product-name { font-size: 12px; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.product-price { font-size: 13px; font-weight: 700; color: var(--orange); font-variant-numeric: tabular-nums; }
.product-stock-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-top: auto;
  align-self: flex-start;
}
.product-stock-dot.in  { background: var(--green-light); }
.product-stock-dot.low { background: var(--amber); }
.product-stock-dot.out { background: var(--red); }

/* ─── BASKET PANEL ─── */
.basket-count { font-size: 12px; color: var(--text-muted); margin-left: auto; }

/* Loyalty Panel */
.loyalty-panel {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
}
.loyalty-scan-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  color: var(--text-muted);
}
.loyalty-scan-row:focus-within { border-color: rgba(232,118,43,0.4); }
.loyalty-scan-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 12px;
}
.loyalty-scan-row input::placeholder { color: var(--text-muted); }
.loyalty-scan-btn {
  color: var(--text-muted);
  padding: 3px;
  border-radius: 4px;
  transition: color var(--transition);
  display: flex; align-items: center;
}
.loyalty-scan-btn:hover { color: var(--orange); }
.loyalty-member-info { padding-top: 8px; }
.loyalty-member-name { font-size: 13px; font-weight: 600; color: var(--orange); }
.loyalty-member-balance { font-size: 12px; color: var(--text-secondary); display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.loyalty-earn-preview { color: var(--green-light); font-size: 11px; }

/* Basket Items */
.basket-items {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.basket-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  text-align: center;
  color: var(--text-muted);
  padding: 20px;
}
.basket-empty p { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.basket-empty span { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.basket-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.basket-row:last-child { border-bottom: none; }
.basket-item-name { font-size: 13px; font-weight: 500; flex: 1; color: var(--text-primary); }
.basket-item-tag { font-size: 10px; padding: 2px 6px; background: rgba(232,118,43,0.15); color: var(--orange); border-radius: 4px; }
.qty-stepper { display: flex; align-items: center; gap: 4px; }
.qty-btn {
  width: 22px; height: 22px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  flex-shrink: 0;
}
.qty-btn:hover { background: var(--orange); border-color: var(--orange); }
.qty-value { font-size: 13px; font-weight: 600; min-width: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.basket-line-total { font-size: 13px; font-weight: 700; color: var(--text-primary); min-width: 50px; text-align: right; font-variant-numeric: tabular-nums; }
.basket-remove-btn {
  color: var(--text-muted);
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 3px;
  transition: color var(--transition);
}
.basket-remove-btn:hover { color: var(--red); }

/* Basket Totals */
.basket-totals {
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  background: rgba(0,0,0,0.15);
}
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 3px 0;
}
.gst-row { font-size: 11px; color: var(--text-muted); }
.grand-total-row {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.grand-total-row span:last-child { color: var(--orange); font-variant-numeric: tabular-nums; }

/* Basket Action Buttons */
.basket-actions {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.secondary-actions { display: flex; gap: 6px; }
.secondary-actions .btn { flex: 1; font-size: 12px; padding: 9px 6px; }

/* Supervisor Toolbar */
.supervisor-toolbar {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(27, 58, 92, 0.3);
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
  flex-shrink: 0;
}
.sup-btn { flex: 1; min-width: 80px; font-size: 11px; padding: 8px 4px; }

/* POS Bottom Bar */
.pos-bottombar {
  height: var(--pos-bottombar-height);
  background: #0E0E1A;
  border-top: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 20px;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.pos-bottombar::-webkit-scrollbar { display: none; }
.shortcut-hint { font-size: 11px; color: var(--text-muted); white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.shortcut-hint kbd {
  font-size: 10px;
  padding: 1px 5px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
  color: var(--text-secondary);
}
.sup-pin-area { margin-left: auto; }

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition), opacity var(--transition), transform 80ms;
  white-space: nowrap;
  min-height: 44px;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }
.btn:not(:disabled):active { transform: scale(0.98); }

.btn-primary {
  background: var(--orange);
  color: #fff;
}
.btn-primary:not(:disabled):hover { background: var(--orange-dark); }

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.15);
}
.btn-secondary:not(:disabled):hover { background: var(--bg-hover); color: var(--text-primary); border-color: rgba(255,255,255,0.25); }

.light-mode .btn-secondary {
  background: #FFFFFF !important;
  color: #334155 !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

.light-mode .btn-secondary:hover {
  background: #F8FAFC !important;
  border-color: #94A3B8 !important;
  color: var(--text-primary) !important;
}

.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-danger:not(:disabled):hover { background: var(--red-dark); }

.btn-warning {
  background: var(--amber);
  color: #fff;
}
.btn-warning:not(:disabled):hover { background: #B8720A; }

.btn-tender {
  width: 100%;
  font-size: 15px;
  font-weight: 700;
  padding: 13px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  box-shadow: 0 4px 16px rgba(232,118,43,0.3);
}
.btn-tender:not(:disabled):hover { box-shadow: 0 4px 20px rgba(232,118,43,0.5); }

.btn-supervisor {
  width: 100%;
  font-size: 12px;
  padding: 9px;
}
.btn-drive-off {
  background: var(--red) !important;
  color: #fff !important;
}

/* ═══════════════════════════════════════
   MODALS + SLIDE PANELS
═══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}
.modal-overlay.center { justify-content: center; align-items: center; }

/* Frosted Glass Utility */
.glass {
  background: rgba(26, 29, 39, 0.7);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.light-mode .glass {
  background: rgba(255, 255, 255, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1) !important;
}

/* Pre-release Modal Special Styling */
#pre-release-modal .modal-content {
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  background: linear-gradient(165deg, var(--bg-surface) 0%, var(--bg-primary) 100%);
}

.light-mode #pre-release-modal .modal-content {
  background: #FFFFFF;
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 40px 80px rgba(0,0,0,0.15);
}

.pre-release-hint {
  background: rgba(var(--orange-rgb), 0.08);
  padding: 16px;
  border-radius: 14px;
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 1px solid rgba(var(--orange-rgb), 0.15);
}

.light-mode .pre-release-hint {
  background: rgba(var(--orange-rgb), 0.05);
  border-color: rgba(var(--orange-rgb), 0.1);
}

/* Slide Panel (Pump Auth) */
.slide-panel {
  width: 480px;
  max-width: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  animation: slideIn 200ms ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

.slide-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.slide-panel-header h3 { font-size: 18px; font-weight: 700; }
.slide-panel-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.close-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.close-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.pump-hero-number {
  font-size: 80px;
  font-weight: 900;
  color: var(--orange);
  text-align: center;
  padding: 24px 0 16px;
  line-height: 1;
  text-shadow: 0 0 60px rgba(232,118,43,0.3);
}

.auth-form { padding: 0 20px 20px; flex: 1; }

/* Form elements */
.form-group { margin-bottom: 18px; }
.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}
.req-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(192,57,43,0.2);
  color: #E74C3C;
}
.req-badge.amber { background: rgba(212,134,11,0.2); color: #F0B429; }
.req-badge.green { background: rgba(45,122,79,0.2); color: var(--green-light); }

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--border-focus); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%238B92A8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.form-select option { background: var(--bg-elevated); }
.form-textarea { resize: vertical; min-height: 80px; }

.field-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; display: block; }
.field-error { font-size: 12px; color: #E74C3C; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.field-error::before { content: '⚠'; }
.conditional-field { transition: opacity var(--transition); }

/* Radio Cards */
.radio-group { display: flex; gap: 8px; }
.radio-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: var(--bg-elevated);
}
.radio-card:hover { border-color: rgba(255,255,255,0.2); }
.radio-card.active { border-color: var(--orange); background: rgba(232,118,43,0.1); }
.radio-card input[type="radio"] { display: none; }
.radio-icon { font-size: 18px; }
.radio-text { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-align: center; }
.radio-card.active .radio-text { color: var(--orange); }

.auth-form-actions { display: flex; gap: 10px; margin-top: 24px; }
.auth-form-actions .btn { flex: 1; }

/* Modal Card (PIN, Drive-Off) */
.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 380px;
  max-width: calc(100% - 32px);
  box-shadow: var(--shadow-lg);
  animation: fadeScale 180ms ease;
}
@keyframes fadeScale { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.modal-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.modal-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

/* Numpad PIN */
.pin-display { display: flex; gap: 12px; justify-content: center; margin-bottom: 20px; }
.pin-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  transition: background var(--transition), border-color var(--transition);
}
.pin-dot.filled { background: var(--orange); border-color: var(--orange); }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.num-btn {
  height: 52px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  transition: background var(--transition), transform 80ms;
}
.num-btn:hover { background: var(--bg-hover); }
.num-btn:active { transform: scale(0.96); }
.clear-btn, .back-btn { font-size: 13px; color: var(--text-secondary); }
.pin-error { color: #E74C3C; font-size: 12px; text-align: center; padding: 6px; }

/* Drive-off modal */
.driveoff-modal { width: 460px; }
.driveoff-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.driveoff-header h3 { font-size: 18px; font-weight: 700; color: var(--red); }

/* ═══════════════════════════════════════
   TOAST NOTIFICATIONS
═══════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  pointer-events: all;
  box-shadow: var(--shadow-md);
  animation: toastIn 300ms ease;
  border-left: 4px solid transparent;
  background: var(--bg-elevated);
  max-width: 380px;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
.toast.success { border-left-color: var(--green-light); }
.toast.success .toast-icon { color: var(--green-light); }
.toast.warning { border-left-color: var(--amber); }
.toast.warning .toast-icon { color: var(--amber); }
.toast.error { border-left-color: var(--red); }
.toast.error .toast-icon { color: #E74C3C; }
.toast.info { border-left-color: var(--blue-light); }
.toast.info .toast-icon { color: var(--blue-light); }
.toast-msg { flex: 1; color: var(--text-primary); }
.toast-close { color: var(--text-muted); cursor: pointer; font-size: 16px; flex-shrink: 0; }
.toast-close:hover { color: var(--text-primary); }
.toast.removing { animation: toastOut 200ms ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

/* Mobile sidebar backdrop */
.sidebar-backdrop {
  display: none;
}
@media (max-width: 768px) {
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
    transition: opacity 0.3s ease;
  }
  .sidebar-backdrop.hidden { display: none; }
}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */

/* ── Global: Prevent any horizontal overflow ── */
.app-screen {
  overflow-x: hidden !important;
  max-width: 100%;
}

.app-screen > section,
.app-screen > div {
  max-width: 100%;
  overflow-x: hidden;
}

/* Any element with inline grid styles: ensure it never exceeds parent */
[style*="display:grid"],
[style*="display: grid"] {
  max-width: 100%;
}

/* Grid children MUST have min-width:0 to prevent intrinsic overflow */
[style*="display:grid"] > *,
[style*="display: grid"] > *,
.resp-grid > * {
  min-width: 0;
}

/* Tables must scroll inside their container, not overflow the page */
.form-card,
.form-card.glass,
div[class*="glass"][style*="padding"] {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
}

/* Inputs must never overflow their parent */
.pa-input,
.pa-select,
.form-input,
.form-select,
.form-textarea {
  max-width: 100%;
  box-sizing: border-box;
}

table {
  max-width: 100%;
}

/* Fixed-width modals should never exceed screen */
.modal-content.glass,
.driveoff-modal,
.void-modal,
.float-modal,
.cash-modal,
.age-modal,
.delivery-modal {
  max-width: calc(100vw - 32px) !important;
}

/* Kiosk container should not overflow */
.kiosk-container {
  max-width: calc(100vw - 32px) !important;
}

/* ── Wide Tablet / Small Desktop (≤1280px) ── */
@media (max-width: 1280px) {
  /* Slightly reduce the resp-grid to 2 columns when it has 3+ cols */
  .resp-grid[style*="repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .resp-grid[style*="repeat(5"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  /* Reduce tank grid min */
  .tank-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  }
}

/* ── Tablet (≤1024px) ── */
@media (max-width: 1024px) {
  .panel-pumps { width: 40%; }
  .panel-products { width: 34%; }
  .panel-basket { width: 26%; }
  .pump-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .quick-search { display: none; }

  /* Management screens */
  .app-screen { padding: 24px 16px !important; }
  .fuel-header { flex-direction: column; align-items: flex-start !important; gap: 12px; }

  /* Modals narrower */
  .driveoff-modal,
  .void-modal,
  .float-modal,
  .delivery-modal { width: 95vw !important; max-width: 600px; }

  /* Help Centre: stack */
  .help-layout { flex-direction: column !important; }
  .help-sidebar { width: 100% !important; border-right: none !important; border-bottom: 1px solid var(--inline-border); max-height: 260px; overflow-y: auto; }
  .help-content { padding: 32px 24px !important; }

  /* Notification panel */
  .notif-panel { width: 360px; right: 10px; }

  /* Multi-column layouts → 2 cols max */
  .resp-grid[style*="repeat(4"],
  .resp-grid[style*="repeat(5"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Ratio grids (2fr 1fr, 1fr 2fr, 1.5fr 1fr etc.) → stack */
  .resp-grid[style*="2fr"],
  .resp-grid[style*="1.5fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Fixed-width inline elements → full width */
  [style*="width:480px"],
  [style*="width:500px"],
  [style*="width:550px"],
  [style*="width:600px"],
  [style*="width: 480px"],
  [style*="width: 500px"],
  [style*="width: 550px"],
  [style*="width: 600px"] {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* BAS filters → 2 cols */
  .bas-filters[style*="grid-template-columns"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Receive header → stack */
  .receive-header-card[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {
  /* Sidebar: off-canvas overlay */
  .sidebar { 
    position: fixed; 
    left: -240px; 
    z-index: 200; 
    width: 240px; 
    height: 100vh; 
    height: 100dvh; /* Dynamic viewport height for mobile */
  }
  .sidebar.mobile-open { left: 0; box-shadow: 4px 0 20px rgba(0,0,0,0.6); }
  
  .sidebar-footer {
    padding-bottom: calc(env(safe-area-inset-bottom, 20px) + 24px); /* Move user profile up above mobile nav bars */
  }

  .mobile-menu-btn { display: flex; }

  /* POS panels: stack vertically */
  .pos-panels { flex-direction: column; overflow-y: auto; }
  .panel-pumps, .panel-products, .panel-basket { width: 100%; flex: none; border-right: none; border-bottom: 1px solid var(--border); }
  .panel-pumps { max-height: none; min-height: auto; }
  .panel-products { max-height: none; }
  .panel-basket { max-height: none; }
  .pump-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 8px; }

  /* POS topbar: compact */
  .pos-topbar { padding: 0 10px; gap: 8px; flex-wrap: wrap; height: auto; min-height: var(--pos-topbar-height); padding-top: 6px; padding-bottom: 6px; }
  .pos-site-info { font-size: 11px; }
  .pos-screen-title { font-size: 11px; }
  .pos-clock { font-size: 13px; }
  .pos-connection { font-size: 10px; }
  .pos-topbar-right { gap: 8px; }

  /* Top header: compact */
  .top-header { padding: 0 10px; gap: 8px; }
  .site-selector { padding: 4px 8px; }
  .site-selector select { font-size: 12px; }
  .connection-status { padding: 4px 8px; font-size: 11px; }
  .status-label { display: none; }
  .header-time { font-size: 12px; }

  /* Basket: full width optimisation */
  .basket-items { max-height: 260px; overflow-y: auto; }
  .tender-actions { flex-wrap: wrap; gap: 6px; }
  .tender-actions .btn { flex: 1 1 45%; font-size: 12px; padding: 10px 8px; }

  /* Management screens: tighter spacing */
  .app-screen { padding: 16px 12px !important; }
  .fuel-header { flex-direction: column; align-items: flex-start !important; gap: 10px; margin-bottom: 16px !important; }
  .fuel-header h2 { font-size: 20px !important; }
  .fuel-header .header-subtitle { font-size: 12px !important; }

  /* Tables: horizontal scroll inside containers */
  .form-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .delivery-table { min-width: 500px; }

  /* Modals: full-screen on mobile */
  .modal-overlay.center { align-items: flex-end; padding: 0; }
  .driveoff-modal,
  .void-modal,
  .float-modal { width: 100vw !important; max-width: 100vw !important; border-radius: 16px 16px 0 0 !important; max-height: 90vh; overflow-y: auto; }
  .modal-content.glass { width: 100% !important; max-width: 100% !important; border-radius: 16px 16px 0 0 !important; }
  .delivery-modal { width: 100vw !important; max-width: 100vw; border-radius: 0 !important; max-height: 100vh; }

  /* Pump Auth panel */
  .pump-auth-panel { width: 100% !important; }

  /* Form grids: single column */
  .form-grid { grid-template-columns: 1fr !important; }
  .form-row { flex-direction: column; }

  /* Category tabs: scroll horizontally */
  .cat-bar { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .cat-bar::-webkit-scrollbar { display: none; }
  .cat-pill { white-space: nowrap; flex-shrink: 0; }

  /* Notification panel: full width */
  .notif-panel { width: calc(100vw - 20px); right: 10px; left: 10px; max-height: 70vh; }

  /* Help Centre: fully stacked */
  .help-layout { flex-direction: column !important; height: auto !important; }
  .help-sidebar { width: 100% !important; border-right: none !important; border-bottom: 1px solid var(--inline-border); padding: 16px !important; max-height: 200px; overflow-y: auto; }
  .help-content { padding: 24px 16px !important; min-height: 60vh; }
  .help-support-card { margin-top: 16px !important; }

  /* Wizard modal: full screen */
  .wizard-steps { gap: 2px; padding: 0 16px; }
  .wizard-step { font-size: 10px; padding: 6px 4px; }
  .wizard-step-label { display: none; }

  /* Fuel cards / summary cards */
  .tank-grid { grid-template-columns: 1fr !important; }
  .summary-cards { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }

  /* Footer */
  .pos-footer { padding: 6px 10px; font-size: 10px; }

  /* Refund screen */
  .refund-details { grid-template-columns: 1fr !important; }

  /* ═══ UNIVERSAL RESPONSIVE GRID ═══
     Every inline grid container with class="resp-grid" → single column */
  .resp-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Reconciliation: keep 2-col summary for slightly better density */
  .recon-summary-grid.resp-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  /* Purchase Order: 4-column header → 2-col */
  .po-header-card > div {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  /* Task board: stack columns vertically */
  .task-board.resp-grid {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }

  /* Roster header: horizontal scroll */
  .roster-header-row.resp-grid {
    grid-template-columns: 120px repeat(7, 1fr) !important;
    min-width: 700px;
  }

  /* PO footer totals → full width */
  .po-footer-totals { justify-content: stretch !important; }
  .po-footer-totals > div { width: 100% !important; }

  /* Roster grid: horizontal scroll */
  .roster-body {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .roster-body > * { min-width: 700px; }

  /* ─── INLINE STYLE OVERRIDES ───
     Force inline grids that don't have resp-grid to also stack */
  div[style*="grid-template-columns: 1fr 1fr"]:not(.resp-grid),
  div[style*="grid-template-columns:1fr 1fr"]:not(.resp-grid) {
    grid-template-columns: 1fr !important;
  }

  /* Fixed-width containers → full width */
  [style*="width:480px"],
  [style*="width:500px"],
  [style*="width:550px"],
  [style*="width:600px"],
  [style*="width:300px"],
  [style*="width:240px"],
  [style*="width: 480px"],
  [style*="width: 500px"],
  [style*="width: 550px"],
  [style*="width: 600px"],
  [style*="width: 300px"],
  [style*="width: 240px"] {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* BAS filters → stack */
  .bas-filters[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Receive header → stack */
  .receive-header-card[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Fixed-width selects & inputs → adapt to parent */
  select[style*="width:160px"],
  select[style*="width:140px"],
  select[style*="width:200px"],
  input[style*="width:160px"],
  select[style*="width: 160px"],
  select[style*="width: 140px"],
  select[style*="width: 200px"],
  input[style*="width: 160px"] {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Tab bar header actions: wrap */
  div[style*="display:flex"][style*="gap"] {
    flex-wrap: wrap;
  }

  /* Kiosk container: full width */
  .kiosk-container {
    width: calc(100vw - 32px) !important;
    max-width: 100% !important;
    padding: 32px !important;
  }

  /* Fuel header action buttons: stack on mobile */
  .fuel-header > div[style*="display:flex"][style*="gap"] {
    flex-wrap: wrap;
    width: 100%;
  }
  .fuel-header > div[style*="display:flex"][style*="gap"] .btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  /* Loyalty CPL card: ensure button doesn't get clipped */
  .loyalty-cpl-card {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .loyalty-cpl-card > div[style*="text-align:right"] {
    text-align: left !important;
    width: 100%;
  }

  /* Any flex containers with space-between: allow wrapping */
  .form-card[style*="justify-content:space-between"] {
    flex-wrap: wrap !important;
    gap: 12px;
  }

  /* Ensure screens have padding so content doesn't touch edges */
  .app-screen { padding: 20px 16px !important; }

  /* ─── FORM FIELDS: Match reference design ───
     Generously spaced, full-width, comfortable touch targets */
  .form-group {
    margin-bottom: 24px !important;
  }

  .form-label {
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-bottom: 10px !important;
  }

  .pa-input,
  .pa-select,
  .form-input,
  .form-select,
  .form-textarea {
    width: 100% !important;
    padding: 14px 16px !important;
    font-size: 15px !important;
    border-radius: 10px !important;
    min-height: 50px;
  }

  .pa-select,
  .form-select {
    padding-right: 40px !important;
    background-position: right 14px center !important;
  }

  /* Section headings inside cards */
  .form-card h3 {
    font-size: 18px !important;
    margin-bottom: 24px !important;
  }

  /* Glass cards on mobile: generous padding */
  .form-card.glass {
    padding: 24px 20px !important;
    border-radius: 16px !important;
  }

  /* Req badge: slightly bigger for touch */
  .req-badge {
    font-size: 11px !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
  }

  /* Field hints: slightly bigger */
  .field-hint,
  .pa-field-hint {
    font-size: 12px !important;
    margin-top: 6px !important;
  }

  /* Radio group: stack on mobile */
  .radio-group {
    flex-direction: column !important;
  }
}

/* ── Small Phone (≤480px) ── */
@media (max-width: 480px) {
  .pump-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .pump-tile { padding: 10px 6px; min-height: 90px; }
  .pump-number { font-size: 20px; }

  /* Even tighter management screens */
  .app-screen { padding: 12px 8px !important; }
  .fuel-header h2 { font-size: 18px !important; }
  .btn { font-size: 12px; padding: 8px 12px; min-height: 38px; }

  /* Summary cards: single column */
  .summary-cards { grid-template-columns: 1fr !important; }

  /* Modals */
  .driveoff-modal,
  .void-modal,
  .float-modal { padding: 16px !important; }
  .modal-content.glass { padding: 24px !important; }
  .modal-footer { flex-direction: column; }
  .modal-footer .btn { width: 100%; }

  /* Notification panel */
  .notif-panel { width: calc(100vw - 16px); left: 8px; right: 8px; }

  /* Compact topbar */
  .pos-topbar-center { display: none; }
  .pos-site-info { display: none; }

  /* Tender */
  .tender-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .tender-actions .btn { flex: 1 1 100%; }

  /* Cash modal */
  .cash-main-input { width: 100% !important; font-size: 28px; }
  .cash-quick-denoms { grid-template-columns: repeat(2, 1fr) !important; padding: 0 16px 16px; }
  .cash-display-area { padding: 16px; }
  .cash-actions { padding: 16px; }

  /* PA panel: reduce hero sizing */
  .pa-pump-number { font-size: 48px !important; letter-spacing: -2px; }
  .pa-pump-icon-wrap { width: 56px !important; height: 56px !important; }
  .pa-pump-hero { padding: 16px !important; }
  .pa-form { padding: 16px !important; }

  /* Inline grids with repeat(3 or more) → 1 col */
  .resp-grid[style*="repeat(3"],
  .resp-grid[style*="repeat(4"],
  .resp-grid[style*="repeat(5"] {
    grid-template-columns: 1fr !important;
  }

  /* Recon summary: single col on phone */
  .recon-summary-grid.resp-grid {
    grid-template-columns: 1fr !important;
  }

  /* Float totals → single col */
  .float-totals {
    grid-template-columns: 1fr !important;
  }

  /* Dial down padding on cards */
  .form-card.glass[style*="padding:24px"],
  .form-card.glass[style*="padding: 24px"] {
    padding: 16px !important;
  }

  /* Slide panel header */
  .pa-header { padding: 12px 16px; }
  .pa-title { font-size: 14px; }
  .pa-screen-id { font-size: 9px; padding: 2px 6px; }
}

/* ═══════════════════════════════════════════════════════════
   SCR-POS-02 — PUMP AUTHORISATION PANEL
   Route: /pos/pump-auth
   Layout: Right-side slide-in panel, 480px wide
═══════════════════════════════════════════════════════════ */

/* ── Panel shell ── */
.pump-auth-panel {
  width: 480px;
  max-width: 100%;
  background: #13141F;
  border-left: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.07) transparent;
  animation: pa-slide-in 220ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes pa-slide-in {
  from { transform: translateX(100%); opacity: 0.8; }
  to   { transform: translateX(0);    opacity: 1;   }
}

/* ── Header ── */
.pa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  background: rgba(255,255,255,0.02);
}
.pa-header-left { display: flex; align-items: center; gap: 12px; }
.pa-screen-id {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 8px;
  background: rgba(232,118,43,0.1);
  color: var(--orange-dark);
  border: 1px solid rgba(232,118,43,0.2);
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}
.pa-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.pa-route {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  margin-top: 2px;
}

/* ── Pump Hero Block ── */
.pa-pump-hero {
  background: linear-gradient(160deg, #1A1F35 0%, #0F1320 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 20px 20px 16px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.pa-pump-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(232,118,43,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.pa-pump-hero-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
}
.pa-pump-icon-wrap {
  width: 70px; height: 70px;
  background: rgba(232,118,43,0.1);
  border: 1.5px solid rgba(232,118,43,0.2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.pa-pump-icon {
  width: 38px; height: 38px;
  color: var(--orange);
}
.pa-pump-number-wrap {
  display: flex;
  flex-direction: column;
}
.pa-pump-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.pa-pump-number {
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -3px;
  text-shadow: 0 0 40px rgba(232,118,43,0.2);
}

/* Meta chips */
.pa-pump-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pa-status-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}
.pa-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
/* Status dot colours — set via JS */
.pa-status-dot.idle  { background: #555E75; }
.pa-status-dot.auth  { background: var(--blue-light); box-shadow: 0 0 6px rgba(52,152,219,0.5); }
.pa-status-dot.fuelling { background: var(--green-light); box-shadow: 0 0 6px rgba(62,170,109,0.5); animation: pulse 1.5s infinite; }
.pa-status-dot.complete { background: var(--amber); }
.pa-status-dot.fault    { background: var(--red); }
.pa-status-dot.driveoff { background: var(--red); animation: pulse 0.8s infinite; }

.pa-grade-chip {
  padding: 4px 10px;
  background: rgba(41,128,185,0.15);
  border: 1px solid rgba(41,128,185,0.3);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--blue-light);
}
.pa-site-chip {
  padding: 4px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Live estimate bar */
.pa-estimate-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: rgba(232,118,43,0.08);
  border: 1px solid rgba(232,118,43,0.2);
  border-radius: var(--radius-sm);
  margin-top: 12px;
  overflow: hidden;
}
.pa-estimate-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  gap: 2px;
}
.pa-est-label { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.pa-est-value { font-size: 14px; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.pa-est-highlight { color: var(--orange); }
.pa-estimate-divider { width: 1px; background: rgba(232,118,43,0.15); flex-shrink: 0; }

/* ── Form ── */
.pa-form {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.07) transparent;
}

.pa-field-group { display: flex; flex-direction: column; gap: 6px; }
.pa-field-meta { display: flex; align-items: center; justify-content: space-between; }
.pa-field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.pa-req-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.pa-req-tag.required   { background: rgba(192,57,43,0.15);  color: #E74C3C; border: 1px solid rgba(192,57,43,0.25); }
.pa-req-tag.conditional{ background: rgba(212,134,11,0.15); color: #F0B429; border: 1px solid rgba(212,134,11,0.25); }
.pa-req-tag.optional   { background: rgba(45,122,79,0.12);  color: var(--green-light); border: 1px solid rgba(45,122,79,0.2); }
.pa-req-tag.readonly   { background: rgba(100,100,120,0.15); color: var(--text-muted); border: 1px solid rgba(100,100,120,0.2); }

/* Read-Only display */
.pa-readonly-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
}
.pa-readonly-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  min-width: 32px;
}
.pa-readonly-hint { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

/* Select */
.pa-select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 11px 36px 11px 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%238B92A8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color var(--transition);
}
.pa-select:focus { border-color: var(--border-focus); }
.pa-select option { background: var(--bg-elevated); }

/* ── Authorisation Type Radios ── */
.pa-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pa-radio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: var(--bg-elevated);
  border: 2px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  user-select: none;
}
.pa-radio-card:hover { border-color: rgba(255,255,255,0.18); background: var(--bg-hover); }
.pa-radio-card.active { border-color: var(--orange); background: rgba(232,118,43,0.07); }
.pa-radio-card input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

.pa-radio-icon-wrap {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}
.pa-radio-card.active .pa-radio-icon-wrap {
  background: rgba(232,118,43,0.15);
}
.pa-radio-icon-wrap svg { width: 20px; height: 20px; color: var(--text-secondary); }
.pa-radio-card.active .pa-radio-icon-wrap svg { color: var(--orange); }

.pa-radio-body { flex: 1; }
.pa-radio-title { font-size: 14px; font-weight: 600; color: var(--text-primary); display: block; }
.pa-radio-desc  { font-size: 11px; color: var(--text-muted); display: block; margin-top: 1px; }
.pa-radio-card.active .pa-radio-title { color: var(--orange); }

.pa-radio-check { flex-shrink: 0; }
.pa-radio-check svg { width: 18px; height: 18px; color: rgba(255,255,255,0.15); }
.pa-radio-card.active .pa-radio-check svg { color: var(--orange); }
.pa-radio-inner { display: none; }
.pa-radio-card.active .pa-radio-inner { display: inline; }

/* ── Currency / Litre Inputs ── */
.pa-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}
.pa-input::-webkit-inner-spin-button,
.pa-input::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; }
.pa-input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(232,118,43,0.1); }
.pa-input::placeholder { color: var(--text-muted); font-weight: 400; }

.pa-currency-input, .pa-litre-input {
  position: relative;
  display: flex;
  align-items: center;
}
.pa-currency-symbol {
  position: absolute;
  left: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
  pointer-events: none;
}
.pa-currency-input .pa-input { padding-left: 26px; }
.pa-litre-unit {
  position: absolute;
  right: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

/* Field hints / errors */
.pa-field-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}
.pa-field-hint-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pa-char-count {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.pa-char-count.warning { color: var(--amber); }
.pa-char-count.danger  { color: var(--red); }
.pa-field-error {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #E74C3C;
  font-weight: 500;
}

/* Quick preset buttons */
.pa-quick-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.pa-preset-btn {
  padding: 6px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform 80ms;
}
.pa-preset-btn:hover { background: rgba(232,118,43,0.12); border-color: rgba(232,118,43,0.3); color: var(--orange); }
.pa-preset-btn:active { transform: scale(0.95); }
.pa-preset-btn.selected { background: rgba(232,118,43,0.15); border-color: var(--orange); color: var(--orange); }

/* Conditional field fade-in */
.pa-conditional {
  animation: pa-field-appear 180ms ease;
}
@keyframes pa-field-appear {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Actions ── */
.pa-actions {
  display: flex;
  gap: 10px;
  padding-top: 4px;
}
.pa-btn-cancel    { flex: 1; }
.pa-btn-authorise { flex: 2; font-size: 15px; font-weight: 700; }
.pa-btn-authorise svg { flex-shrink: 0; }

/* ── IFSF Status Footer ── */
.pa-footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  background: rgba(0,0,0,0.2);
  flex-wrap: wrap;
}
.pa-footer-ifsf {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
}
.pa-footer-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green-light);
  box-shadow: 0 0 6px rgba(62,170,109,0.5);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
.pa-footer-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-muted);
  font-family: 'Courier New', monospace;
}
.pa-footer-pipe { color: var(--text-muted); }

/* Alert state: fault / drive-off — hero tint red */
.pa-pump-hero.status-fault::before,
.pa-pump-hero.status-driveoff::before {
  background: radial-gradient(circle, rgba(192,57,43,0.12) 0%, transparent 70%);
}
.pa-pump-hero.status-fault .pa-pump-icon-wrap,
.pa-pump-hero.status-driveoff .pa-pump-icon-wrap {
  background: rgba(192,57,43,0.12);
  border-color: rgba(192,57,43,0.25);
}
.pa-pump-hero.status-fault .pa-pump-icon,
.pa-pump-hero.status-driveoff .pa-pump-icon { color: var(--red); }

/* Fuelling status — hero tint green */
.pa-pump-hero.status-fuelling::before {
  background: radial-gradient(circle, rgba(45,122,79,0.1) 0%, transparent 70%);
}

/* ═══════════════════════════════════════════
   SCR-POS-04: TENDER PANEL
═══════════════════════════════════════════ */
.tender-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.tender-summary {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
}

.tender-total-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.tender-total-value {
  font-size: 40px;
  font-weight: 900;
  color: var(--orange);
  text-shadow: 0 0 30px rgba(232,118,43,0.3);
  line-height: 1;
}

.tender-loyalty-earn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 4px 12px;
  background: rgba(45,122,79,0.1);
  border: 1px solid rgba(45,122,79,0.2);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green-light);
}

.tender-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tender-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.tender-method-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 80px;
}

.tender-method-btn:hover {
  background: var(--bg-hover);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.tender-method-btn.active {
  background: rgba(232,118,43,0.1);
  border-color: var(--orange);
  box-shadow: 0 0 15px rgba(232,118,43,0.1);
}

.tender-method-btn .method-icon {
  font-size: 24px;
}

.tender-method-btn .method-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tender-method-btn.active .method-name {
  color: var(--orange);
}

.receipt-prefs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.receipt-opt {
  flex: 1;
  min-width: 70px;
  position: relative;
  cursor: pointer;
}

.receipt-opt input {
  position: absolute;
  opacity: 0;
}

.receipt-opt span {
  display: block;
  padding: 8px;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.receipt-opt input:checked + span {
  background: rgba(232,118,43,0.15);
  border-color: var(--orange);
  color: var(--orange);
}

/* ═══════════════════════════════════════════
   SCR-POS-05: CASH MODAL
═══════════════════════════════════════════ */
.cash-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 520px;
  max-width: calc(100% - 32px);
  box-shadow: var(--shadow-lg), 0 0 80px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 250ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.cash-modal-header h2 { font-size: 20px; font-weight: 800; }

.cash-display-area {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cash-display-box {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cash-display-box.highlight {
  background: rgba(232,118,43,0.05);
  border-color: rgba(232,118,43,0.2);
  padding: 16px 20px;
}

.cash-display-box.change-box {
  background: rgba(45,122,79,0.05);
  border-color: rgba(45,122,79,0.2);
  margin-top: 8px;
}

.cash-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.cash-value {
  font-size: 24px;
  font-weight: 700;
}

.cash-value.change {
  font-size: 32px;
  color: var(--green-light);
  text-shadow: 0 0 20px rgba(62,170,109,0.3);
}

.cash-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cash-symbol {
  font-size: 28px;
  font-weight: 800;
  color: var(--orange);
}

.cash-main-input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 40px;
  font-weight: 900;
  color: var(--text-primary);
  width: 180px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cash-quick-denoms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 24px 24px;
}

.denom-btn {
  height: 60px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 150ms;
}

.denom-btn:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.denom-btn#btn-cash-exact {
  grid-column: span 3;
  background: rgba(232,118,43,0.1);
  border-color: var(--orange);
  color: var(--orange);
}

.cash-actions {
  padding: 20px 24px;
  background: rgba(0,0,0,0.1);
  display: flex;
  gap: 12px;
}

.cash-actions .btn { flex: 1; }

.btn-success-tender {
  background: linear-gradient(135deg, #27AE60, #1E8449);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.btn-success-tender:hover:not(:disabled) {
  background: linear-gradient(135deg, #2ECC71, #27AE60);
  box-shadow: 0 4px 15px rgba(46,204,113,0.3);
}

/* ═══════════════════════════════════════════
   SCR-POS-06: AGE VERIFICATION
═══════════════════════════════════════════ */
.age-modal {
  background: var(--bg-surface);
  border: 1px solid var(--red);
  border-radius: var(--radius-lg);
  width: 440px;
  max-width: calc(100% - 32px);
  box-shadow: 0 0 100px rgba(192,57,43,0.2), var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.age-modal-header {
  padding: 24px;
  background: rgba(192,57,43,0.05);
  border-bottom: 1px solid rgba(192,57,43,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.age-warning-icon {
  font-size: 48px;
  animation: pulseWarning 2s infinite;
}

@keyframes pulseWarning {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.age-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.age-product-info {
  background: rgba(255,255,255,0.03);
  padding: 12px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.age-product-info label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.age-product-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.age-prompt {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
  text-align: center;
}

.age-modal-footer {
  padding: 24px;
  display: flex;
  gap: 12px;
  background: rgba(0,0,0,0.1);
}

.age-modal-footer .btn { flex: 1; }

/* ═══════════════════════════════════════════
   SCR-POS-08: VOID TRANSACTION
═══════════════════════════════════════════ */
.void-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 400px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.tx-summary-box {
  background: rgba(255,255,255,0.03);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  border: 1px dashed var(--border);
}

.tx-id-label { font-weight: 800; font-size: 16px; }
.tx-time-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ═══════════════════════════════════════════
   SCR-POS-09: DRIVE-OFF INCIDENT
═══════════════════════════════════════════ */
.driveoff-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 600px;
  max-width: calc(100% - 32px);
  box-shadow: var(--shadow-lg);
}

.driveoff-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to right, rgba(212,134,11,0.1), transparent);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.incident-badge {
  background: var(--amber);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-left: 12px;
  vertical-align: middle;
}

.driveoff-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-input { flex: 2; }
.form-row .form-select { flex: 1; }

/* ═══════════════════════════════════════════
   SCR-POS-10: FLOAT COUNT
═══════════════════════════════════════════ */
.float-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 480px;
  box-shadow: var(--shadow-lg);
}

.float-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.float-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.denom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
}

.denom-row label {
  font-weight: 600;
  font-size: 14px;
}

.float-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.float-total-box {
  background: var(--bg-elevated);
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.float-total-box .label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.float-total-box .value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.expected-box {
  border: 1px dashed var(--border);
  justify-content: center;
}

.btn-ghost {
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  text-decoration: underline;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
}

.btn-ghost:hover {
  background: rgba(232, 118, 43, 0.1);
  text-decoration: none;
}

.color-red { color: var(--red); }

/* ════════════════════════════════════════════════════════════
   MODULE 2: FUEL MANAGEMENT — STYLES
   ════════════════════════════════════════════════════════════ */

/* SCR-FUEL-01: Tank Dashboard */
.tank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.tank-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, background 0.2s ease;
}

.tank-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.tank-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.tank-title {
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.tank-grade {
  font-size: 12px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
}

.tank-reading-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

.tank-visual {
  display: flex;
  gap: 24px;
  align-items: flex-end;
}

/* Vertical Gauge */
.tank-gauge-container {
  width: 60px;
  height: 140px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

.tank-gauge-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, #3498DB, #2980B9);
  transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px rgba(52, 152, 219, 0.3);
}

.tank-gauge-fill.warning { background: linear-gradient(to top, #F1C40F, #D4AC0D); }
.tank-gauge-fill.critical { background: linear-gradient(to top, #E74C3C, #C0392B); }

.tank-stats {
  flex: 1;
}

.tank-stat-item {
  margin-bottom: 12px;
}

.tank-stat-label {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 2px;
}

.tank-stat-value {
  display: block;
  font-size: 18px;
  font-weight: 500;
  color: white;
}

.tank-stat-value .unit {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-left: 4px;
}

.tank-water-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 12px;
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 8px;
  color: #E74C3C;
  font-size: 12px;
  font-weight: 500;
}

/* SCR-FUEL-02: Delivery Wizard */
.delivery-modal {
  max-width: 800px;
  width: 90%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.light-mode .delivery-modal {
  background: #FFFFFF !important;
  border: 1px solid rgba(0,0,0,0.1) !important;
  box-shadow: var(--shadow-lg) !important;
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  padding: 0 40px;
  position: relative;
}

.wizard-steps::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 60px;
  right: 60px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  z-index: 1;
}

.light-mode .wizard-steps::after {
  background: #E2E8F0 !important;
}

.wizard-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.light-mode .wizard-step {
  background: #F1F5F9 !important;
  border-color: #E2E8F0 !important;
  color: #64748B !important;
}

.wizard-step.active {
  background: #3498DB;
  color: white;
  border-color: #3498DB;
  box-shadow: 0 0 15px rgba(52, 152, 219, 0.5);
}

.light-mode .wizard-step.active {
  background: var(--orange) !important;
  border-color: var(--orange) !important;
  color: white !important;
  box-shadow: 0 0 12px rgba(232, 118, 43, 0.3) !important;
}

.wizard-step.completed {
  background: #2ECC71;
  color: white;
  border-color: #2ECC71;
}

.wizard-step-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 8px;
  color: rgba(255,255,255,0.4);
}

.light-mode .wizard-step-label {
  color: var(--text-muted) !important;
}

.wizard-step.active .wizard-step-label { color: white; }
.light-mode .wizard-step.active .wizard-step-label { color: var(--orange) !important; font-weight: 700; }

/* Delivery Table */
.delivery-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.delivery-table th {
  text-align: left;
  padding: 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.light-mode .delivery-table th {
  color: var(--text-secondary) !important;
  border-bottom-color: var(--border) !important;
}

.delivery-table td {
  padding: 16px 12px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.light-mode .delivery-table td {
  border-bottom-color: rgba(0,0,0,0.05) !important;
  color: var(--text-primary) !important;
}

.light-mode #selected-price-grade {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
}

.price-row {
  transition: all 0.2s ease;
}

.price-row:hover {
  background: var(--bg-hover) !important;
}

.price-row.active-row {
  background: var(--bg-active) !important;
  border-left: 3px solid var(--orange);
}

.light-mode .price-row.active-row {
  background: rgba(232,118,43,0.08) !important;
  border-left-color: var(--orange);
}

#btn-close-wizard:hover {
  background: rgba(255,255,255,0.15) !important;
  border-color: rgba(255,255,255,0.2) !important;
  color: #fff !important;
}

.price-table th, .price-table td {
  padding: 18px 16px !important;
}

.variance-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.variance-badge.success { background: rgba(46, 204, 113, 0.2); color: #2ECC71; }
.variance-badge.danger { background: rgba(231, 76, 60, 0.2); color: #E74C3C; }

/* Switch Toggle Styling */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255,255,255,0.1);
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider { background-color: #3498DB; }
input:focus + .slider { box-shadow: 0 0 1px #3498DB; }
input:checked + .slider:before { transform: translateX(20px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* --- New Inventory & Fuel Report Styles --- */
.req-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(192, 57, 43, 0.15);
  color: #E74C3C;
  font-weight: 700;
  margin-left: 4px;
}
.req-badge.amber { background: rgba(243, 156, 18, 0.15); color: #F39C12; }
.req-badge.green { background: rgba(46, 204, 113, 0.15); color: #2ECC71; }

.form-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.form-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.summary-card {
  transition: transform 0.2s ease;
}
.summary-card:hover { transform: scale(1.02); }

.qty-stepper {
  display: flex;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}
.qty-btn {
  width: 32px;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.qty-btn:hover { background: rgba(255,255,255,0.1); }
.qty-input {
  width: 100%;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(255,255,255,0.1);
  border-right: 1px solid rgba(255,255,255,0.1);
  color: white;
  text-align: center;
  font-size: 13px;
  outline: none;
}

.file-upload-area:hover {
  background: rgba(255,255,255,0.05) !important;
  border-color: var(--orange) !important;
}

.pa-conditional.hidden { display: none; }

/* --- Shift & Handover Styles --- */
.mini-step {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transition: all 0.3s ease;
}
.light-mode .mini-step {
  background: #E2E8F0 !important;
}
.mini-step.active {
  background: var(--orange);
  box-shadow: 0 0 8px var(--orange);
}
.light-mode .mini-step.active {
  background: var(--orange) !important;
  box-shadow: 0 0 10px rgba(232, 118, 43, 0.4) !important;
}
.mini-step.completed {
  background: var(--green-light);
}

.roster-shift-block {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.roster-shift-block:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 10;
}

/* Kiosk Mode Adjustments */
#shifts-clock-screen .kiosk-container {
  animation: kioskFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes kioskFadeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Disable hover effects on staff screen */
#shifts-staff-screen .form-card:hover {
  transform: none;
  box-shadow: none;
}
/* --- Task Board Drag & Drop --- */
.task-card.dragging {
  opacity: 0.5;
  transform: scale(0.98);
  border: 1px dashed var(--orange);
}
.task-column:hover {
  background: rgba(255,255,255,0.04) !important;
}
.task-list {
  min-height: 100px;
  transition: background 0.3s ease;
}
.task-card {
  border: 1px solid rgba(255,255,255,0.08) !important;
}
/* ═══════════════════════════════════════
   NOTIFICATION PANEL (GLOBAL)
══════════════════════════════════════════ */
.notif-panel {
  position: fixed;
  top: 72px; /* Below header */
  right: 20px;
  width: 400px;
  max-height: calc(100vh - 100px);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  border: 1px solid var(--inline-border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.notif-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--inline-border);
}

.notif-header h3 { font-size: 16px; margin: 0; }

.notif-tabs {
  display: flex;
  padding: 4px;
  background: rgba(0,0,0,0.2);
  margin: 12px 24px;
  border-radius: 8px;
}

.notif-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--inline-dim);
  font-size: 11px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.notif-tab.active {
  background: var(--orange);
  color: white;
  font-weight: 600;
}

.notif-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.notif-card {
  padding: 16px 24px;
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--inline-border);
  transition: background 0.2s;
  cursor: pointer;
}

.notif-card:hover { background: rgba(255,255,255,0.03); }

.notif-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}

.notif-card.critical .notif-icon-wrap { background: rgba(231,76,60,0.2); }
.notif-card.task .notif-icon-wrap { background: rgba(52,152,219,0.2); }

.notif-body { flex: 1; }
.notif-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; color: white; }
.notif-desc { font-size: 12px; color: var(--inline-muted); line-height: 1.5; margin-bottom: 8px; }
.notif-meta { font-size: 10px; color: var(--inline-dim); }

.notif-footer {
  padding: 16px 24px;
  display: flex;
  gap: 12px;
  background: rgba(0,0,0,0.1);
  border-top: 1px solid var(--inline-border);
}

/* ═══════════════════════════════════════
   HELP CENTRE STYLES
══════════════════════════════════════════ */
.help-cat-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--inline-muted);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.help-cat-btn:hover { background: rgba(255,255,255,0.05); color: white; }
.help-cat-btn.active { background: rgba(232,118,43,0.1); color: var(--orange); font-weight: 600; }

.article-body h3 { border-bottom: 1px solid var(--inline-border); padding-bottom: 12px; margin-top: 48px !important; }

/* Light Mode Overrides for new screens */
.light-mode .notif-panel { background: #FFFFFF; border: 1px solid #E2E8F0; box-shadow: 0 20px 50px rgba(0,0,0,0.1); }
.light-mode .notif-title { color: #1E293B; }
.light-mode .notif-header { border-bottom-color: #F1F5F9; }
.light-mode .notif-tabs { background: #F1F5F9; }
.light-mode .notif-tab:not(.active) { color: #64748B; }
.light-mode .notif-card { border-bottom-color: #F1F5F9; }
.light-mode .notif-card:hover { background: #F8FAFC; }
.light-mode .notif-footer { background: #F8FAFC; border-top-color: #F1F5F9; }

.light-mode .help-sidebar { background: #FFFFFF; border-right-color: #E2E8F0; }
.light-mode .help-content { background: #F8FAFC; }
.light-mode .help-cat-btn:not(.active) { color: #64748B; }
.light-mode .help-cat-btn:hover { background: #F1F5F9; }
.light-mode .article-body { color: #334155; }
.light-mode .article-body h3 { color: #1E293B; border-bottom-color: #E2E8F0; }

/* Help Centre: mobile dropdown hidden by default */
.help-cat-dropdown {
  display: none;
}

@media (max-width: 768px) {
  /* On mobile, show the dropdown and hide the desktop button list */
  .help-cat-dropdown {
    display: block !important;
    width: 100%;
    font-size: 14px;
    margin-top: 8px;
  }

  .help-nav ul {
    display: none !important;
  }

  /* Also hide the "Categories" label — the dropdown is self-explanatory */
  .help-nav > div[style*="text-transform:uppercase"] {
    margin-bottom: 8px !important;
  }

  /* Hide the support card on mobile to save space */
  .help-support-card {
    display: none !important;
  }

  /* Help sidebar → compact strip */
  .help-sidebar {
    padding: 16px !important;
    gap: 12px !important;
  }
}

/* ═══════════════════════════════════════════
   DASHBOARD COMPONENTS (SCR-DSH-01)
═══════════════════════════════════════════ */

/* ── Component 05: Shift Status Strip ── */
.shift-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  height: 64px;
  color: white;
  background: var(--navy);
  transition: var(--transition);
}
.shift-strip.not-clocked-in { background: #7B341E; }
.shift-strip.on-break { background: #0D7377; }
.shift-strip.clocked-out { background: var(--green); }

.shift-status-container { display: flex; align-items: center; gap: 12px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.status-dot.green { background: var(--green-light); box-shadow: 0 0 8px var(--green-light); }
.status-dot.orange { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.status-dot.teal { background: #00FEDE; box-shadow: 0 0 8px #00FEDE; }

.shift-type-label { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.shift-times { font-size: 13px; opacity: 0.8; margin-left: 8px; border-left: 1px solid rgba(255,255,255,0.2); padding-left: 12px; }
.shift-timer { font-size: 14px; font-weight: 500; }

/* ── Component 06: Quick Actions Bar ── */
.quick-actions-bar {
  display: flex;
  gap: 12px;
  padding: 12px 32px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.qa-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  color: white;
  min-height: 36px;
}
.qa-btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
.qa-btn:active { transform: translateY(0); }
.qa-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.qa-btn.navy { background: var(--navy); }
.qa-btn.red { background: var(--red); }
.qa-btn.amber { background: var(--orange); }
.qa-btn.green { background: var(--green); }
.qa-btn.outline { background: transparent; border: 1.5px solid var(--border); }

/* ── Dashboard Grid Layouts ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.widget-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.tank-widget {
  grid-column: span 2;
}

/* ── Component 01: KPI Card ── */
.kpi-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  background: var(--bg-surface);
  border: 0.5px solid var(--border);
  transition: var(--transition);
}
.kpi-card.clickable:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--orange);
}
.kpi-card.info { border-left: 4px solid var(--navy); }
.kpi-card.warning { border-left: 4px solid var(--orange); }
.kpi-card.critical { border: 2px solid var(--red); background: rgba(192,57,43,0.05); }

.kpi-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-value { font-size: 28px; font-weight: 700; color: var(--text-primary); margin: 8px 0 4px; }
.kpi-subvalue { font-size: 13px; color: var(--text-muted); }
.kpi-trend { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.kpi-trend.up { color: var(--green-light); }
.kpi-trend.down { color: var(--red); }
.kpi-footer { font-size: 11px; color: var(--text-muted); margin-top: auto; opacity: 0.7; }

/* ── Component 02: Alert Card ── */
.widget-container {
  padding: 0;
  overflow: hidden;
}
.widget-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.widget-header h3 { font-size: 15px; font-weight: 600; margin: 0; }

.alert-feed { max-height: 400px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.alert-card {
  padding: 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border-left: 3px solid transparent;
  transition: var(--transition);
  position: relative;
}
.alert-card.critical { border-left-color: var(--red); background: rgba(192,57,43,0.08); }
.alert-card.warning { border-left-color: var(--orange); }
.alert-card.info { border-left-color: #0D7377; }
.alert-card.acknowledged { opacity: 0.4; filter: grayscale(0.5); }

.alert-title-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; }
.alert-dot.critical { background: var(--red); box-shadow: 0 0 6px var(--red); }
.alert-dot.warning { background: var(--orange); }
.alert-dot.info { background: #0D7377; }

.alert-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.alert-meta { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.alert-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.alert-actions { display: flex; gap: 8px; }
.alert-btn { font-size: 11px; padding: 4px 10px; border-radius: 4px; border: 1px solid var(--border); background: rgba(255,255,255,0.05); color: var(--text-secondary); cursor: pointer; }
.alert-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

/* ── Component 03: Tank Level Gauge ── */
.tank-gauge-list { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.tank-gauge-row { display: grid; grid-template-columns: 80px 1fr 50px; align-items: center; gap: 16px; }
.tank-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }

.gauge-track { height: 12px; background: rgba(255,255,255,0.05); border-radius: 6px; overflow: hidden; position: relative; }
.gauge-fill { height: 100%; transition: width 1s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 6px; }
.gauge-fill.green { background: linear-gradient(90deg, #2D7A4F, #3EAA6D); }
.gauge-fill.amber { background: linear-gradient(90deg, #E8762B, #F9A86C); }
.gauge-fill.red { background: linear-gradient(90deg, #C0392B, #E74C3C); box-shadow: 0 0 10px rgba(192,57,43,0.3); }

.tank-pct { font-size: 13px; font-weight: 700; color: var(--text-primary); text-align: right; }

/* ── Component 04: Dashboard Pump Tile ── */
.dash-pump-grid { padding: 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dash-pump-tile {
  aspect-ratio: 1/1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.dash-pump-tile:hover { transform: scale(1.05); z-index: 10; box-shadow: 0 10px 20px rgba(0,0,0,0.3); }

.dp-id { font-size: 24px; font-weight: 800; line-height: 1; }
.dp-grade { font-size: 10px; opacity: 0.8; font-weight: 600; margin: 2px 0; }
.dp-status { font-size: 9px; opacity: 0.7; font-weight: 500; }

.dp-idle { background: #6B7A8D; }
.dp-auth { background: #1B5E99; }
.dp-fuelling { background: #2D7A4F; }
.dp-complete { background: #E8762B; }
.dp-drive-off { background: #C0392B; animation: flash 0.5s infinite alternate; }
.dp-fault { background: #8B3A9B; }

@keyframes flash {
  from { opacity: 1; }
  to { opacity: 0.5; }
}

/* ── Dashboard Responsiveness ── */
@media (max-width: 1024px) {
  #dashboard-screen .widget-grid { grid-template-columns: 1fr !important; }
  #dashboard-screen .tank-widget { grid-column: span 1 !important; }
  .dashboard-content { padding: 20px 16px !important; }
  #dashboard-screen .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 768px) {
  #dashboard-screen .kpi-grid, 
  #dashboard-screen .widget-grid { grid-template-columns: 1fr !important; }
  #dashboard-screen .tank-widget { grid-column: span 1 !important; }
  .shift-strip { padding: 0 16px; flex-direction: column; height: auto; align-items: flex-start; gap: 8px; padding: 12px 16px; }
  .shift-times { border-left: none; padding-left: 0; margin-left: 0; display: block; }
  .quick-actions-bar { padding: 12px 16px; gap: 8px; }
  .qa-btn { flex: 1 1 calc(50% - 8px); }
  .dash-pump-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 480px) {
  #dashboard-screen .kpi-grid { grid-template-columns: 1fr !important; }
  .qa-btn { flex: 1 1 100%; }
}

/* Light Mode Dashboard Overrides */
.light-mode .shift-strip { color: white; }
.light-mode .quick-actions-bar { background: white; border-bottom: 1px solid #E2E8F0; }
.light-mode .qa-btn.outline { border-color: #E2E8F0; color: #64748B; }
.light-mode .kpi-card { background: white; border-color: #E2E8F0; }
.light-mode .kpi-value { color: #0F172A; }
.light-mode .widget-container { background: white; }
.light-mode .alert-card { background: #F8FAFC; }
.light-mode .alert-desc { color: #475569; }
.light-mode .gauge-track { background: #F1F5F9; }
.light-mode .tank-name, .light-mode .tank-pct { color: #1E293B; }

