/*
 * FilUpGo customer app styles.
 *
 * Loaded by includes/app_head.php on every customer page in place of
 * style.css (which stays for the staff portal). Organised as:
 *   1. Tokens (light, then dark)      7. Lists, pills and status
 *   2. Base and Bootstrap bridge      8. Customer screens
 *   3. Buttons and forms              9. Landing page
 *   4. App header, menu and tab bar  10. Legal and help pages
 *   5. Footer                        11. Splash screen
 *   6. Page layout and cards         12. Motion and print
 *
 * Colours are only ever read from the tokens, so light and dark mode stay
 * in step. Text colours meet WCAG AA (4.5:1) on the surfaces they sit on.
 */

/* 1. Tokens ------------------------------------------------------------ */

:root {
  --navy: #0f2d47;
  --navy-900: #0b2238;
  --navy-text: #b9ccdd;
  --blue: #2178bd;
  --blue-700: #185f98;
  --blue-800: #123b5d;
  --yellow: #fdcd21;
  --yellow-600: #e8b90f;

  --bg: #f4f7fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-sunken: #eef3f7;
  --border: #e2e9f0;
  --border-strong: #cfdae4;
  --divider: #eef2f6;
  --text: #12263a;
  --text-muted: #5b6b7b;
  --link: #185f98;
  --accent-soft: #eaf4fb;
  --accent-soft-text: #123b5d;
  --icon-soft: #e3eef7;
  --icon-soft-text: #185f98;

  --success: #16794a;
  --success-bg: #e3f4ea;
  --warning: #7a5a00;
  --warning-bg: #fff4d6;
  --danger: #b42318;
  --danger-bg: #fdecec;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 45, 71, 0.06);
  --shadow: 0 12px 32px rgba(15, 45, 71, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 45, 71, 0.14);
  --focus-ring: 0 0 0 3px rgba(33, 120, 189, 0.28);

  --header-h: 64px;
  --tabbar-h: 68px;
  --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Names used by help.css and older markup. */
  --brand-blue: var(--blue);
  --brand-blue-dark: var(--blue-700);
  --brand-blue-deep: var(--text);
  --brand-blue-soft: var(--accent-soft);
  --brand-yellow: var(--yellow);
  --brand-yellow-soft: var(--warning-bg);
  --text-primary: var(--text);
  --border-color: var(--border);
  --surface-muted: var(--surface-2);

  /* Bootstrap bridge. */
  --bs-font-sans-serif: var(--font-sans);
  --bs-body-font-family: var(--font-sans);
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-secondary-color: var(--text-muted);
  --bs-border-color: var(--border);
  --bs-primary: var(--blue);
  --bs-primary-rgb: 33, 120, 189;
  --bs-link-color: var(--link);
  --bs-link-color-rgb: 24, 95, 152;
  --bs-link-hover-color: var(--blue-800);
  --bs-link-hover-color-rgb: 18, 59, 93;
  --bs-heading-color: var(--text);
  --bs-emphasis-color: var(--text);
  --bs-tertiary-bg: var(--surface-2);
  color-scheme: light;
}

html[data-theme='dark'] {
  --bg: #08141f;
  --surface: #0f2233;
  --surface-2: #0c1c2b;
  --surface-sunken: #0a1825;
  --border: #1d3347;
  --border-strong: #2b455c;
  --divider: #172a3c;
  --text: #e6eef5;
  --text-muted: #9fb3c5;
  --link: #7cbcec;
  --accent-soft: #13324c;
  --accent-soft-text: #cfe5f6;
  --icon-soft: #16385a;
  --icon-soft-text: #9dd0f5;

  --success: #5fd39a;
  --success-bg: #0f3426;
  --warning: #f5d06a;
  --warning-bg: #352b0c;
  --danger: #ff9b92;
  --danger-bg: #3a1716;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);
  --focus-ring: 0 0 0 3px rgba(124, 188, 236, 0.4);

  --bs-link-color-rgb: 124, 188, 236;
  --bs-link-hover-color-rgb: 170, 212, 244;
  color-scheme: dark;
}

/* 2. Base and Bootstrap bridge ---------------------------------------- */

/* No double-tap zoom anywhere (taps also respond without the 300 ms
   double-tap wait); scrolling and, in a browser tab, pinch zoom still work.
   The installed app also turns pinch zoom off (js/app.js section 7). */
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body { touch-action: manipulation; }
/* Busy buttons (js/app.js section 5): spinner + "working" label. */
.is-busy { pointer-events: none; cursor: progress; }
.btn.is-busy { opacity: 0.92; }
.btn-spinner { width: 1em; height: 1em; border-width: 0.15em; margin-right: 0.5em; vertical-align: -0.15em; flex: none; }
@media (prefers-reduced-motion: reduce) { .btn-spinner { animation-duration: 1.5s; } }
/* iOS zooms into any field with text smaller than 16px when it is focused. */
@media (pointer: coarse) {
  :where(input:not([type='checkbox']):not([type='radio']):not([type='range']), select, textarea) { font-size: 16px; }
  .form-control-sm, .form-select-sm, .footer-theme select { font-size: 16px; }
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--bs-link-hover-color); }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 6px; }

::selection { color: #fff; background: var(--blue); }

.text-muted, .text-body-secondary { color: var(--text-muted) !important; }

.tabular { font-variant-numeric: tabular-nums; }

.visually-hidden-focusable:focus { position: fixed !important; top: 8px; left: 8px; z-index: 2000; padding: 10px 14px; color: #fff; background: var(--navy); border-radius: var(--radius-sm); }

/* 3. Buttons and forms ------------------------------------------------- */

.btn {
  --bs-btn-font-weight: 600;
  --bs-btn-padding-x: 1.1rem;
  --bs-btn-padding-y: 0.6rem;
  --bs-btn-border-radius: 12px;
  --bs-btn-focus-box-shadow: var(--focus-ring);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  font-size: 0.95rem;
  letter-spacing: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn:active { transform: translateY(1px); }
.btn.w-100, .d-grid > .btn { display: flex; }
.btn-lg { --bs-btn-border-radius: 14px; min-height: 52px; font-size: 1rem; --bs-btn-padding-x: 1.4rem; }
.btn-sm { --bs-btn-border-radius: 10px; min-height: 36px; font-size: 0.85rem; --bs-btn-padding-x: 0.8rem; --bs-btn-padding-y: 0.35rem; }
.btn i.me-1, .btn i.me-2, .btn i.ms-1, .btn i.ms-2 { margin: 0 !important; }

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--blue);
  --bs-btn-border-color: var(--blue);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--blue-700);
  --bs-btn-hover-border-color: var(--blue-700);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--blue-800);
  --bs-btn-active-border-color: var(--blue-800);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--blue);
  --bs-btn-disabled-border-color: var(--blue);
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-secondary-app {
  --bs-btn-color: var(--text);
  --bs-btn-bg: var(--surface);
  --bs-btn-border-color: var(--border-strong);
  --bs-btn-hover-color: var(--text);
  --bs-btn-hover-bg: var(--surface-2);
  --bs-btn-hover-border-color: var(--border-strong);
  --bs-btn-active-color: var(--text);
  --bs-btn-active-bg: var(--surface-sunken);
  --bs-btn-active-border-color: var(--border-strong);
  --bs-btn-disabled-color: var(--text-muted);
  --bs-btn-disabled-bg: var(--surface);
  --bs-btn-disabled-border-color: var(--border);
}

.btn-outline-primary.active,
.btn-check:checked + .btn-outline-primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.btn-accent,
.btn-nav-cta {
  --bs-btn-color: var(--navy);
  --bs-btn-bg: var(--yellow);
  --bs-btn-border-color: var(--yellow);
  --bs-btn-hover-color: var(--navy);
  --bs-btn-hover-bg: #ffd84a;
  --bs-btn-hover-border-color: #ffd84a;
  --bs-btn-active-color: var(--navy);
  --bs-btn-active-bg: var(--yellow-600);
  --bs-btn-active-border-color: var(--yellow-600);
}

.btn-light,
.btn-ghost {
  --bs-btn-color: var(--text);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--text);
  --bs-btn-hover-bg: var(--surface-sunken);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: var(--surface-sunken);
  --bs-btn-active-border-color: transparent;
}

.btn-on-dark {
  --bs-btn-color: #fff;
  --bs-btn-bg: transparent;
  --bs-btn-border-color: rgba(255, 255, 255, 0.32);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: rgba(255, 255, 255, 0.08);
  --bs-btn-hover-border-color: rgba(255, 255, 255, 0.5);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: rgba(255, 255, 255, 0.14);
}

.btn-danger-outline {
  --bs-btn-color: var(--danger);
  --bs-btn-bg: var(--surface);
  --bs-btn-border-color: var(--danger);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--danger);
  --bs-btn-hover-border-color: var(--danger);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--danger);
  border-width: 1.5px;
}

.btn-danger { --bs-btn-bg: #c62828; --bs-btn-border-color: #c62828; --bs-btn-hover-bg: #a91f1f; --bs-btn-hover-border-color: #a91f1f; }
.btn-link { --bs-btn-color: var(--link); --bs-btn-hover-color: var(--bs-link-hover-color); font-weight: 600; text-decoration: none; }

.form-control,
.form-select,
.bootstrap-select > .dropdown-toggle {
  min-height: 48px;
  padding: 0.65rem 0.95rem;
  color: var(--text);
  font-size: 1rem; /* 16px stops iOS zooming into the field */
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control-lg { min-height: 56px; font-size: 1.15rem; border-radius: 14px; }
.form-control::placeholder { color: var(--text-muted); opacity: 0.75; }
textarea.form-control { min-height: 120px; }

.form-control:focus,
.form-select:focus,
.bootstrap-select > .dropdown-toggle:focus,
.bootstrap-select.show > .dropdown-toggle {
  color: var(--text);
  background-color: var(--surface);
  border-color: var(--blue);
  outline: none !important;
  box-shadow: var(--focus-ring) !important;
}

.form-control:disabled, .form-control[readonly] { color: var(--text-muted); background-color: var(--surface-2); }
.form-control.is-invalid, .was-validated .form-control:invalid { border-color: var(--danger); }
.invalid-feedback { color: var(--danger); font-size: 0.85rem; }

.form-check-input { width: 1.15em; height: 1.15em; border-color: var(--border-strong); background-color: var(--surface); }
.form-check-input:checked { background-color: var(--blue); border-color: var(--blue); }
.form-check-input:focus { box-shadow: var(--focus-ring); border-color: var(--blue); }
.form-check-label { color: var(--text); }

.app-form, .form-field { display: grid; gap: 0.45rem; }
.app-form { gap: 1.1rem; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

.app-form label,
.form-label,
.label-row {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
}

.app-form .form-check-label { font-weight: 400; }
.label-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
.label-row a { font-weight: 500; text-decoration: none; }

.field-hint, .form-text { color: var(--text-muted); font-size: 0.84rem; line-height: 1.45; }

.check-row { display: flex; align-items: center; gap: 0.6rem; color: var(--text); font-size: 0.92rem; font-weight: 400 !important; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--blue); }

.pin-field { letter-spacing: 0.5em; font-variant-numeric: tabular-nums; }

/* bootstrap-select (station picker) */
.bootstrap-select { width: 100% !important; }
.bootstrap-select > .dropdown-toggle { display: flex; align-items: center; }
.bootstrap-select > .dropdown-toggle::after { margin-left: auto; }
.bootstrap-select .dropdown-menu { padding: 0.35rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.bootstrap-select .dropdown-item { padding: 0.6rem 0.75rem; color: var(--text); border-radius: 8px; }
.bootstrap-select .dropdown-item:hover, .bootstrap-select .dropdown-item.active, .bootstrap-select .dropdown-item:active { color: var(--text); background: var(--accent-soft); }
.bootstrap-select .bs-searchbox .form-control { min-height: 40px; }

/* Alerts */
.alert {
  --bs-alert-border-radius: 12px;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  font-size: 0.93rem;
  line-height: 1.45;
  border: 1px solid transparent;
}
.alert:not(.d-flex) { display: block; }
.alert-danger { color: var(--danger); background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.alert-success { color: var(--success); background: var(--success-bg); border-color: color-mix(in srgb, var(--success) 22%, transparent); }
.alert-warning { color: var(--warning); background: var(--warning-bg); border-color: color-mix(in srgb, var(--warning) 22%, transparent); }
.alert-info, .alert-primary { color: var(--accent-soft-text); background: var(--accent-soft); border-color: color-mix(in srgb, var(--blue) 22%, transparent); }
.alert a { color: inherit; font-weight: 600; }
.app-alert { margin-bottom: 1rem; }

/* 4. App header, menu and tab bar ------------------------------------ */

.app-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}

.app-header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-h);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.app-brand:hover { color: var(--text); }
.app-brand img { width: 32px; height: 32px; border-radius: 50%; }
.app-brand span { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.03em; }

.app-nav {
  display: none;
  align-items: center;
  gap: 0.15rem;
  margin: 0 auto 0 1.5rem;
  padding: 0;
  list-style: none;
}

.app-nav a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 0.8rem;
  color: var(--text-muted);
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 10px;
}

.app-nav a:hover { color: var(--text); background: var(--surface-sunken); }
.app-nav a.active, .app-nav a[aria-current='page'] { color: var(--text); font-weight: 600; background: var(--accent-soft); }

.app-header-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.app-header-actions .btn { min-height: 40px; }

.app-menu { position: relative; }
.app-menu > summary { list-style: none; cursor: pointer; }
.app-menu > summary::-webkit-details-marker { display: none; }

.app-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--icon-soft-text);
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--icon-soft);
  border-radius: 50%;
}

.app-menu[open] > summary .app-avatar { box-shadow: var(--focus-ring); }

.app-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1040;
  width: min(300px, calc(100vw - 24px));
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.app-menu-user { display: grid; gap: 0.1rem; padding: 0.6rem 0.75rem 0.75rem; margin-bottom: 0.35rem; border-bottom: 1px solid var(--divider); }
.app-menu-user strong { font-size: 0.95rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-menu-user span { color: var(--text-muted); font-size: 0.84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-menu-panel a,
.app-menu-panel button,
.app-menu-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 44px;
  padding: 0 0.75rem;
  color: var(--text);
  font: inherit;
  font-size: 0.93rem;
  text-align: left;
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: 10px;
}

.app-menu-panel a:hover, .app-menu-panel button:hover { background: var(--surface-sunken); }
.app-menu-panel i { width: 20px; color: var(--text-muted); font-size: 1.05rem; text-align: center; }
.app-menu-panel hr { margin: 0.35rem 0; border-color: var(--divider); opacity: 1; }
.app-menu-panel .danger, .app-menu-panel .danger i { color: var(--danger); }

.theme-select {
  margin-left: auto;
  min-height: 34px;
  padding: 0 1.8rem 0 0.6rem;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.app-tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1030;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 6px 4px env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border-top: 1px solid var(--border);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}

.app-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 12px;
}

.app-tabbar a i { font-size: 1.3rem; line-height: 1; }
.app-tabbar a.active { color: var(--link); font-weight: 600; }

body:has(.app-tabbar) { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }

@media (min-width: 992px) {
  .app-nav { display: flex; }
  .app-tabbar { display: none; }
  body:has(.app-tabbar) { padding-bottom: 0; }
}

/* 5. Footer ------------------------------------------------------------- */

.app-footer {
  margin-top: auto;
  padding: 3rem 0 1.5rem;
  color: #c5d5e3;
  background: var(--navy-900);
}

.app-footer a { color: #c5d5e3; text-decoration: none; }
.app-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-brand { display: grid; gap: 0.85rem; align-content: start; }
.footer-brand .app-brand { color: #fff; }
.footer-brand p { max-width: 340px; margin: 0; font-size: 0.9rem; line-height: 1.6; }

.footer-column { display: grid; gap: 0.55rem; align-content: start; font-size: 0.9rem; }
.footer-column h2 { margin: 0 0 0.3rem; color: #fff; font-size: 0.9rem; font-weight: 600; letter-spacing: 0; }
.footer-column p { margin: 0; font-size: 0.85rem; line-height: 1.5; }

.footer-theme { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
.footer-theme select { min-height: 34px; padding: 0 1.8rem 0 0.6rem; color: #fff; font: inherit; font-size: 0.85rem; background-color: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 8px; }
.footer-theme select option { color: #12263a; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.25rem;
  font-size: 0.84rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-legal { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.powered-by { color: #c5d5e3; }
.powered-by strong, .powered-by a { color: #fff; font-weight: 600; }

@media (max-width: 767.98px) {
  .app-footer { padding-top: 2.25rem; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* 6. Page layout and cards ------------------------------------------- */

body > main { display: block; }
.page-body { display: flex; flex-direction: column; min-height: 100vh; }

.page-shell { padding: 1.75rem 0 3.5rem; background: var(--bg); }
.page-shell > .container { max-width: 1120px; }
.page-narrow > .container, .page-shell.page-narrow > .container { max-width: 720px; }

.page-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.page-intro > div:first-child { min-width: 0; flex: 1 1 320px; }
.page-intro h1 { margin: 0.2rem 0 0.35rem; font-size: clamp(1.6rem, 3.2vw, 2.1rem); font-weight: 600; letter-spacing: -0.025em; }
.page-intro p { max-width: 620px; margin: 0; color: var(--text-muted); font-size: 0.98rem; }
.page-intro > .btn { flex-shrink: 0; }
.page-intro > div:last-child:not(:first-child) { display: flex; flex-wrap: wrap; gap: 0.5rem; max-width: 100%; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--link);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.eyebrow-light { color: var(--yellow); }
.eyebrow-dot { width: 7px; height: 7px; background: currentColor; border-radius: 50%; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 36px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.back-link:hover { color: var(--text); }

.section-title { margin: 0 0 0.75rem; font-size: 1.05rem; font-weight: 600; }
.section-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.section-title-row h2 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.section-title-row a { font-size: 0.9rem; font-weight: 500; text-decoration: none; }

.panel-card,
.map-card,
.metric-card,
.transaction-card-pro,
.status-card-pro,
.app-card,
.card {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card { --bs-card-bg: var(--surface); --bs-card-border-color: var(--border); --bs-card-border-radius: var(--radius-lg); }
.panel-card, .app-card { padding: clamp(1.1rem, 2.5vw, 1.6rem); }

.panel-heading {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--divider);
}

.panel-icon,
.metric-icon,
.icon-tile {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  color: var(--icon-soft-text);
  font-size: 1.15rem;
  background: var(--icon-soft);
  border-radius: 12px;
}

.icon-tile-sm { width: 36px; height: 36px; flex-basis: 36px; font-size: 1rem; border-radius: 10px; }
.panel-heading h2 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.panel-heading p { margin: 0.15rem 0 0; color: var(--text-muted); font-size: 0.88rem; }

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

.metric-card { display: flex; align-items: center; gap: 0.85rem; padding: 1rem 1.1rem; color: var(--text); text-decoration: none; }
a.metric-card:hover { color: var(--text); border-color: var(--border-strong); }
.metric-card strong, .metric-card span { display: block; }
.metric-card strong { font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.metric-card span { color: var(--text-muted); font-size: 0.84rem; }

.empty-state {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

.empty-state > i { display: grid; width: 56px; height: 56px; margin-bottom: 0.75rem; place-items: center; color: var(--icon-soft-text); font-size: 1.4rem; background: var(--icon-soft); border-radius: 50%; }
.empty-state h2 { margin: 0; font-size: 1.15rem; }
.empty-state p { max-width: 420px; margin: 0 0 1rem; color: var(--text-muted); }

.admin-empty { display: grid; justify-items: center; gap: 0.35rem; text-align: center; }
.admin-empty > i { color: var(--icon-soft-text); font-size: 1.6rem; }
.admin-empty h2 { font-size: 1.1rem; }

.loading-state { display: flex; align-items: center; justify-content: center; gap: 0.7rem; min-height: 90px; color: var(--text-muted); font-size: 0.92rem; }

.detail-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; color: var(--text-muted); font-size: 0.92rem; }
.detail-row strong { color: var(--text); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.detail-list { display: grid; gap: 0; }
.detail-list .detail-row { padding: 0.7rem 0; border-bottom: 1px solid var(--divider); }
.detail-list .detail-row:last-child { border-bottom: 0; }

.table { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--divider); font-size: 0.93rem; }
.table > :not(caption) > * > * { padding: 0.75rem 0.6rem; }
.table thead th { color: var(--text-muted); font-size: 0.8rem; font-weight: 600; }

.badge { font-weight: 600; border-radius: 999px; }

hr { border-color: var(--divider); opacity: 1; }

/* 7. Lists, pills and status ------------------------------------------ */

.status-pill,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 26px;
  padding: 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  text-transform: capitalize;
  border-radius: 999px;
}

.status-pill .bi-circle-fill { display: none; }
.status-success, .pill-success { color: var(--success); background: var(--success-bg); }
.status-pending, .pill-warning { color: var(--warning); background: var(--warning-bg); }
.status-failed, .pill-danger { color: var(--danger); background: var(--danger-bg); }
.pill-neutral { color: var(--text-muted); background: var(--surface-sunken); }
.pill-info { color: var(--accent-soft-text); background: var(--accent-soft); }

.list-card { padding: 0; overflow: hidden; }
.list-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--divider);
}
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { color: var(--text); background: var(--surface-2); }
.list-row-main { display: grid; flex: 1; gap: 0.1rem; min-width: 0; }
.list-row-main strong { font-size: 0.95rem; font-weight: 500; }
.list-row-main small { color: var(--text-muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row-end { display: grid; justify-items: end; gap: 0.1rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list-row-end small { color: var(--text-muted); font-size: 0.8rem; font-weight: 400; }
.amount-credit { color: var(--success); }

.progress-track { height: 6px; overflow: hidden; background: var(--surface-sunken); border-radius: 999px; }
.progress-track > span { display: block; height: 100%; background: var(--blue); border-radius: inherit; transition: width 0.4s ease; }

/* Activity feed (activity.php and the home screen). */
.activity-filters { margin-bottom: 0.5rem; }
.activity-filters .btn { min-height: 36px; border-radius: 999px; }
.activity-day { margin: 1.25rem 0 0.35rem; color: var(--text-muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; }
.activity-list { margin: 0; padding: 0; list-style: none; }
.activity-list a { display: flex; align-items: center; gap: 0.85rem; padding: 0.85rem 0; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--divider); }
.activity-list li:last-child a { border-bottom: 0; }
.activity-icon { display: grid; width: 40px; height: 40px; flex: none; place-items: center; color: var(--icon-soft-text); background: var(--icon-soft); border-radius: 12px; }
.activity-main { flex: 1; min-width: 0; }
.activity-main strong { display: block; font-size: 0.95rem; font-weight: 500; }
.activity-main small { display: block; color: var(--text-muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-amount { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.activity-amount small { display: block; color: var(--text-muted); font-size: 0.8rem; font-weight: 400; }
.tone-positive .activity-amount { color: var(--success); }
.tone-negative .activity-icon { color: var(--danger); background: var(--danger-bg); }
.tone-warning .activity-icon { color: var(--warning); background: var(--warning-bg); }
.activity-list li[hidden], .activity-day[hidden] { display: none !important; }

/* Wallet history. */
.wallet-list { margin: 0; padding: 0; list-style: none; }
.wallet-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--divider); }
.wallet-item:last-child { border-bottom: 0; }
.wallet-item a { display: block; min-width: 0; color: inherit; text-decoration: none; }
.wallet-item strong { font-weight: 500; }
.wallet-item small { display: block; color: var(--text-muted); font-size: 0.82rem; }
.wallet-amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wallet-amount.credit { color: var(--success); }
.wallet-pending { display: inline-flex; align-items: center; height: 20px; margin-left: 0.4rem; padding: 0 0.5rem; color: var(--warning); font-size: 0.72rem; font-weight: 600; background: var(--warning-bg); border-radius: 999px; }

/* Status screens (payment, verification). */
.status-shell { display: grid; min-height: 100vh; padding: 1.5rem 1rem; place-items: center; background: var(--bg); }
.status-card-pro { width: min(100%, 520px); padding: clamp(1.5rem, 5vw, 2.5rem); text-align: center; box-shadow: var(--shadow); }
.status-brand { width: 40px; height: 40px; margin: 0 auto 1.5rem; object-fit: contain; border-radius: 50%; }
.status-icon-ring { display: grid; width: 72px; height: 72px; margin: 0 auto 1.25rem; place-items: center; color: var(--icon-soft-text); font-size: 1.9rem; background: var(--icon-soft); border-radius: 50%; }
.status-icon-ring.success { color: var(--success); background: var(--success-bg); }
.status-icon-ring.failed { color: var(--danger); background: var(--danger-bg); }
.status-card-pro h1 { margin: 0.35rem 0 0.5rem; font-size: clamp(1.45rem, 4vw, 1.85rem); }
.status-card-pro > p { color: var(--text-muted); }
.status-details { display: grid; gap: 0.6rem; padding: 1rem; margin: 1.25rem 0; text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.status-actions { display: grid; gap: 0.6rem; margin-top: 1rem; }

/* 8. Customer screens ------------------------------------------------- */

/* Sign in, sign up, password reset. */
.auth-main { display: flex; align-items: center; min-height: calc(100vh - var(--header-h)); padding: 2rem 0 3rem; background: var(--bg); }
.auth-layout {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.auth-story { display: none; }
.auth-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.5rem, 5vw, 2.75rem); }
.auth-card-heading { margin-bottom: 1.5rem; }
.auth-kicker { display: inline-block; margin-bottom: 0.4rem; color: var(--link); font-size: 0.8rem; font-weight: 600; }
.auth-card-heading h1, .auth-card-heading h2 { margin: 0 0 0.4rem; font-size: clamp(1.6rem, 4vw, 2rem); letter-spacing: -0.025em; }
.auth-card-heading p { margin: 0; color: var(--text-muted); }
.auth-switch { margin: 1.5rem 0 0; color: var(--text-muted); font-size: 0.95rem; text-align: center; }
.auth-switch a { font-weight: 600; text-decoration: none; }
.auth-divider { display: flex; align-items: center; gap: 0.75rem; margin: 1.25rem 0; color: var(--text-muted); font-size: 0.85rem; }
.auth-divider::before, .auth-divider::after { flex: 1; height: 1px; content: ''; background: var(--border); }

@media (min-width: 992px) {
  .auth-layout { grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1fr); max-width: 1040px; }
  .auth-story {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 600px;
    padding: 3rem;
    color: #fff;
    background: var(--navy);
  }
  .auth-story h1, .auth-story h2 { max-width: 440px; margin: 0.5rem 0 0.75rem; color: #fff; font-size: clamp(2rem, 3vw, 2.6rem); letter-spacing: -0.03em; }
  .auth-story > p { max-width: 440px; color: var(--navy-text); }
}

.auth-points { display: grid; gap: 1rem; margin-top: 1.75rem; }
.auth-points > div { display: flex; align-items: flex-start; gap: 0.75rem; }
.auth-points > div > span { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; color: var(--navy); font-size: 0.8rem; font-weight: 700; background: var(--yellow); border-radius: 50%; }
.auth-points p { margin: 0; color: var(--navy-text); font-size: 0.88rem; line-height: 1.5; }
.auth-points strong { display: block; margin-bottom: 0.1rem; color: #fff; font-weight: 600; }
.auth-point { display: flex; align-items: center; gap: 0.75rem; color: #fff; font-size: 0.92rem; }
.auth-point i { display: grid; width: 30px; height: 30px; place-items: center; color: var(--navy); background: var(--yellow); border-radius: 50%; }
.auth-security-note { display: flex; gap: 0.75rem; margin-top: 1.5rem; padding: 1rem; color: var(--navy-text); font-size: 0.85rem; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius); }
.auth-security-note strong { display: block; color: #fff; }
.auth-security-note p { margin: 0.2rem 0 0; }
.security-icon { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; color: var(--navy); font-weight: 700; background: var(--yellow); border-radius: 50%; }

/* Choosing a fuel company. */
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.75rem; }
.company-card-pro {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.company-card-pro:hover { color: var(--text); border-color: var(--blue); box-shadow: var(--shadow); }
.company-logo-wrap { display: grid; width: 52px; height: 52px; flex: 0 0 52px; padding: 6px; place-items: center; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.company-logo-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }
.company-card-copy { display: grid; flex: 1; min-width: 0; }
.company-card-copy strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-card-copy small { color: var(--text-muted); font-size: 0.84rem; }
.company-arrow { color: var(--text-muted); font-size: 1.2rem; }

/* Buying fuel (work.php). */
.flow-steps { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; padding: 0; list-style: none; }
.flow-step { display: flex; flex: 1; align-items: center; gap: 0.5rem; min-width: 0; color: var(--text-muted); font-size: 0.85rem; font-weight: 500; }
.flow-step span { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; font-size: 0.8rem; font-weight: 600; background: var(--surface-sunken); border-radius: 50%; }
.flow-step::after { flex: 1; height: 2px; min-width: 12px; content: ''; background: var(--border); border-radius: 2px; }
.flow-step:last-child::after { display: none; }
.flow-step.active { color: var(--text); font-weight: 600; }
.flow-step.active span { color: #fff; background: var(--blue); }

.purchase-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr); gap: 1.25rem; align-items: start; }
.purchase-layout .panel-heading { border-bottom: 0; padding-bottom: 0; }

.promo-banner { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.85rem 1rem; margin-bottom: 1.1rem; color: var(--accent-soft-text); font-size: 0.9rem; background: var(--accent-soft); border-radius: 12px; }
.promo-banner i { color: var(--link); font-size: 1.1rem; }
.promo-banner strong, .promo-banner span { display: block; }
.promo-banner strong { font-weight: 600; }

.map-card { overflow: hidden; position: sticky; top: calc(var(--header-h) + 16px); }
.map-card-header { padding: 1rem 1.1rem; }
.map-card-header h2 { margin: 0; font-size: 1rem; }
.map-card-header p { margin: 0.2rem 0 0; color: var(--text-muted); font-size: 0.85rem; }
.map-frame, #map { width: 100%; min-height: 320px; background: var(--surface-sunken); }
.map-note { display: flex; gap: 0.5rem; padding: 0.85rem 1.1rem; color: var(--text-muted); font-size: 0.84rem; background: var(--surface-2); border-top: 1px solid var(--divider); }

/* Fuel product options rendered by get_fuel_products.php. */
#getproducts { display: grid; gap: 1.1rem; }
#getproducts:empty { display: none; }

/* Purchases list. */
.view-toggle { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; background: var(--surface-sunken); border-radius: 12px; }
.view-toggle .btn { min-height: 38px; color: var(--text-muted); background: transparent; border: 0; border-radius: 9px; }
.view-toggle .btn.active { color: var(--text); background: var(--surface); box-shadow: var(--shadow-sm); }

.transaction-grid-pro { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.85rem; }
.transaction-card-pro { display: flex; flex-direction: column; gap: 0.85rem; padding: 1.1rem; }
.transaction-card-top, .transaction-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.transaction-card-top .metric-icon { display: none; }
.purchase-card-title { display: grid; min-width: 0; }
.purchase-card-title strong { font-weight: 600; }
.purchase-card-title small { color: var(--text-muted); font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transaction-reference { color: var(--text-muted); font-size: 0.82rem; word-break: break-all; }
.transaction-meta { display: grid; gap: 0.4rem; padding: 0.75rem 0; border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.transaction-meta .detail-row { font-size: 0.86rem; }
.transaction-card-bottom small { color: var(--text-muted); font-size: 0.8rem; }
.transaction-amount { font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.transaction-card-bottom .btn { min-height: 40px; }

/* Signed-in home. */
.home-greeting { display: grid; gap: 0.1rem; margin-bottom: 1.25rem; }
.home-greeting span { color: var(--text-muted); font-size: 0.95rem; }
.home-greeting h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 1.9rem); letter-spacing: -0.025em; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 992px) { .home-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: start; } }

.balance-card { display: grid; gap: 1.1rem; padding: 1.4rem; color: #fff; background: var(--navy); border-radius: 22px; box-shadow: var(--shadow); }
.balance-card-label { color: var(--navy-text); font-size: 0.88rem; }
.balance-card-value { display: block; margin-top: 0.2rem; font-size: clamp(2rem, 6vw, 2.5rem); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.025em; line-height: 1.1; }
.balance-card-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.balance-card-split a { display: grid; gap: 0.1rem; color: #fff; text-decoration: none; }
.balance-card-split small { color: var(--navy-text); font-size: 0.8rem; }
.balance-card-split strong { font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.balance-card .btn-accent { min-height: 52px; font-size: 1rem; }

.ready-card { display: grid; gap: 0.9rem; padding: 1.1rem; }
.ready-card-head { display: flex; align-items: center; gap: 0.8rem; }
.ready-card-head .list-row-main strong { font-weight: 600; }

/* Authorize (dispense.php). */
.authorize-shell { padding: 1.5rem 0 3rem; }
.authorize-shell > .container { max-width: 520px; }
.authorize-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; margin-bottom: 0.85rem; }
.authorize-summary strong { display: block; font-weight: 600; }
.authorize-summary small { display: block; color: var(--text-muted); font-size: 0.85rem; }
.authorize-summary .amount { font-size: 1.1rem; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.readiness-panel { padding: 0.35rem 1.1rem 0.85rem; margin-bottom: 0.85rem; }
.readiness-panel .fw-semibold { margin: 0.6rem 0 0.25rem !important; font-size: 0.9rem; }
.readiness-list { margin: 0; padding: 0; list-style: none; }
.readiness-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0; color: var(--text); font-size: 0.92rem; border-bottom: 1px solid var(--divider); }
.readiness-list .readiness-item:last-child { border-bottom: 0; }
#readinessLocation:empty { display: none; }
.readiness-item .bi-check-circle-fill, .readiness-item .text-success { color: var(--success) !important; }
.readiness-item .bi-x-circle-fill, .readiness-item .text-danger { color: var(--danger) !important; }
.readiness-item .bi-exclamation-circle-fill, .readiness-item .text-warning { color: var(--warning) !important; }

.pin-pad-card { display: grid; gap: 1rem; padding: 1.25rem 1.1rem; }
.pin-pad-card h2 { margin: 0; font-size: 1.05rem; text-align: center; }
.pin-dots { display: flex; justify-content: center; gap: 14px; }
.pin-dots span { width: 16px; height: 16px; border: 2px solid var(--border-strong); border-radius: 50%; transition: background-color 0.12s ease, border-color 0.12s ease; }
.pin-dots span.filled { background: var(--text); border-color: var(--text); }
.pin-pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pin-pad button { height: 56px; color: var(--text); font: inherit; font-size: 1.4rem; font-weight: 500; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.pin-pad button:hover { background: var(--surface-sunken); }
.pin-pad button:active { transform: scale(0.97); }
.pin-pad button.pin-pad-muted { font-size: 1.1rem; background: transparent; border-color: transparent; }
.pin-pad button[disabled] { visibility: hidden; }
.pin-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Live fueling (fueling.php). */
.fueling-page { min-height: 100vh; color: var(--text); background: var(--bg); }
.fueling-shell { width: min(720px, 100%); margin: 0 auto; padding: 0 0 2.5rem; }
.fueling-hero { padding: 0.75rem 1.25rem 1.75rem; color: #fff; background: var(--navy); border-radius: 0 0 28px 28px; }
@media (min-width: 768px) { .fueling-shell { padding-top: 1.5rem; } .fueling-hero { border-radius: 28px; } }
.fueling-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; margin-bottom: 0.75rem; }
.fueling-back { display: grid; width: 44px; height: 44px; place-items: center; color: #fff; text-decoration: none; background: rgba(255, 255, 255, 0.08); border-radius: 50%; }
.fueling-back:hover { color: #fff; background: rgba(255, 255, 255, 0.16); }
.fueling-secure { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--navy-text); font-size: 0.85rem; }
.fueling-connection { display: inline-flex; align-items: center; gap: 0.5rem; height: 32px; padding: 0 0.8rem; color: #ffe08a; font-size: 0.85rem; font-weight: 500; background: rgba(255, 255, 255, 0.08); border-radius: 999px; }
.fueling-connection span { width: 8px; height: 8px; background: currentColor; border-radius: 50%; animation: fuelingPulse 1.4s infinite; }
.fueling-connection.is-live { color: #7ee2ad; }
.fueling-headline { display: grid; gap: 0.25rem; margin: 0.5rem 0 1.25rem; text-align: center; }
.fueling-headline .eyebrow { justify-content: center; color: var(--yellow); }
.fueling-headline h1 { margin: 0; color: #fff; font-size: clamp(1.35rem, 4vw, 1.75rem); }
.fueling-headline p { max-width: 460px; margin: 0 auto; color: var(--navy-text); font-size: 0.95rem; }
.fueling-meter { display: grid; justify-items: center; gap: 0.3rem; text-align: center; }
.fueling-meter small { color: var(--navy-text); font-size: 0.85rem; }
.fueling-meter > strong { display: flex; align-items: baseline; gap: 0.5rem; color: #fff; font-weight: 600; }
.fueling-meter > strong span { color: var(--navy-text); font-size: 1.1rem; font-weight: 500; }
.fueling-meter > strong b { font-size: clamp(3rem, 13vw, 4.25rem); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; line-height: 1; }
.fueling-volume-line { color: #dce7f1; font-size: 1rem; font-variant-numeric: tabular-nums; }
.fueling-volume-line strong { font-weight: 600; }
.fueling-progress-block { margin-top: 1.5rem; }
.fueling-progress-track { height: 8px; overflow: hidden; background: rgba(255, 255, 255, 0.14); border-radius: 999px; }
.fueling-progress-track div { width: 0; height: 100%; background: var(--yellow); border-radius: inherit; transition: width 0.65s ease; }
.fueling-progress-labels, .fueling-target { display: flex; justify-content: space-between; gap: 1rem; color: var(--navy-text); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.fueling-progress-labels { margin-top: 0.6rem; }
.fueling-progress-labels strong { color: #fff; font-weight: 600; }
.fueling-target { margin-top: 0.2rem; }
.fueling-body { display: grid; gap: 0.85rem; padding: 1.25rem 1.25rem 0; }
@media (min-width: 768px) { .fueling-body { padding-inline: 0; } }
.fueling-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0.9rem 0.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.fueling-details > div { display: grid; justify-items: center; gap: 0.1rem; min-width: 0; padding: 0 0.4rem; text-align: center; border-left: 1px solid var(--divider); }
.fueling-details > div:first-child { border-left: 0; }
.fueling-details span { color: var(--text-muted); font-size: 0.78rem; }
.fueling-details strong { max-width: 100%; overflow: hidden; font-size: 1.05rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.fueling-action { display: grid; grid-template-columns: auto 1fr; gap: 0.85rem; align-items: start; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.fueling-action-icon { display: grid; width: 44px; height: 44px; place-items: center; color: var(--icon-soft-text); font-size: 1.3rem; background: var(--icon-soft); border-radius: 12px; }
.fueling-action small, .fueling-action strong, .fueling-action span { display: block; }
.fueling-action small { color: var(--link); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.fueling-action strong { margin: 0.1rem 0; font-size: 1.05rem; font-weight: 600; }
.fueling-action span { color: var(--text-muted); font-size: 0.92rem; line-height: 1.45; }
.fueling-action[data-action='nozzle_lifted'] .fueling-action-icon,
.fueling-action[data-action='filling'] .fueling-action-icon,
.fueling-action[data-action='completed'] .fueling-action-icon { color: var(--success); background: var(--success-bg); }
.fueling-action[data-action='offline'] .fueling-action-icon,
.fueling-action[data-action='failed'] .fueling-action-icon,
.fueling-action[data-action='unconfirmed'] .fueling-action-icon { color: var(--danger); background: var(--danger-bg); }
.fueling-action[data-action='offline'], .fueling-action[data-action='unconfirmed'] { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.fueling-stop { display: grid; gap: 0.5rem; margin: 0.25rem 0 0; }
.fueling-stop button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 52px; color: var(--danger); font: inherit; font-size: 1rem; font-weight: 600; background: var(--surface); border: 1.5px solid currentColor; border-radius: 14px; cursor: pointer; }
.fueling-stop button:hover { color: #fff; background: #c62828; border-color: #c62828; }
.fueling-stop button:disabled { opacity: 0.6; cursor: progress; }
.fueling-stop-note, .fueling-safety-note { margin: 0; color: var(--text-muted); font-size: 0.85rem; text-align: center; }
.fueling-final { padding: 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.fueling-final h2 { margin: 0 0 0.75rem; font-size: 1.05rem; }
.fueling-final dl { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 1rem; margin: 0; font-size: 0.92rem; }
.fueling-final dt { color: var(--text-muted); font-weight: 400; }
.fueling-final dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.fueling-final-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.fueling-final-actions a { display: inline-flex; flex: 1 1 160px; align-items: center; justify-content: center; min-height: 44px; padding: 0 1rem; color: var(--text); font-weight: 600; text-decoration: none; border: 1px solid var(--border-strong); border-radius: 12px; }
.fueling-final-actions a.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.fueling-final [hidden], .fueling-stop[hidden] { display: none !important; }
.fueling-widget-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; color: var(--text-muted); font-size: 0.85rem; }
.fueling-widget-footer div { display: flex; align-items: center; gap: 0.4rem; }
.fueling-widget-footer a { font-weight: 600; text-decoration: none; }

@keyframes fuelingPulse { 50% { opacity: 0.35; transform: scale(0.82); } }

/* 9. Landing page -------------------------------------------------------- */

.lp-hero { position: relative; overflow: hidden; color: #fff; background: var(--navy); }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; align-items: center; padding: clamp(2.5rem, 7vw, 4.5rem) 0 0; }
@media (min-width: 992px) { .lp-hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); } }
.lp-hero-copy { display: grid; gap: 1.4rem; padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.lp-badge { display: inline-flex; align-items: center; gap: 0.5rem; justify-self: start; height: 32px; padding: 0 0.9rem; color: var(--yellow); font-size: 0.85rem; font-weight: 600; background: rgba(253, 205, 33, 0.12); border-radius: 999px; }
.lp-badge span { width: 7px; height: 7px; background: currentColor; border-radius: 50%; }
.lp-hero h1 { margin: 0; color: #fff; font-size: clamp(2.4rem, 6vw, 4.1rem); font-weight: 600; line-height: 1.03; letter-spacing: -0.035em; }
.lp-hero-lead { max-width: 540px; margin: 0; color: #c5d5e3; font-size: clamp(1.05rem, 2vw, 1.18rem); line-height: 1.6; }
.lp-hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.lp-hero-actions .btn { min-height: 54px; padding-inline: 1.5rem; font-size: 1.02rem; }
.lp-trust { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; margin: 0.5rem 0 0; padding: 0; color: #c5d5e3; font-size: 0.92rem; list-style: none; }
.lp-trust li { display: inline-flex; align-items: center; gap: 0.5rem; }
.lp-trust i { color: var(--yellow); }

.lp-phone-wrap { position: relative; display: flex; justify-content: center; align-self: end; height: 520px; }
.lp-phone { width: 300px; height: 610px; padding: 9px; background: #071a2b; border-radius: 46px; box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35); }
.lp-phone-screen { display: grid; align-content: start; gap: 12px; height: 100%; padding: 22px 16px; overflow: hidden; color: var(--text); background: #f4f7fa; border-radius: 38px; }
.lp-phone-top { display: flex; align-items: center; justify-content: space-between; }
.lp-phone-top .app-brand span { font-size: 1.05rem; color: #0f2d47; }
.lp-phone-top .app-brand img { width: 24px; height: 24px; }
.lp-phone-dot { width: 30px; height: 30px; background: #e3eef7; border-radius: 50%; }
.lp-phone .balance-card { gap: 0.75rem; padding: 1rem; border-radius: 18px; }
.lp-phone .balance-card-value { font-size: 1.75rem; }
.lp-phone .balance-card-split strong { font-size: 0.92rem; }
.lp-phone-btn { display: flex; align-items: center; justify-content: center; height: 40px; color: #0f2d47; font-size: 0.88rem; font-weight: 600; background: var(--yellow); border-radius: 12px; }
.lp-phone-row { display: flex; align-items: center; gap: 10px; padding: 12px; background: #fff; border: 1px solid #e2e9f0; border-radius: 14px; }
.lp-phone-row b { display: block; color: #12263a; font-size: 0.85rem; font-weight: 600; }
.lp-phone-row small { display: block; color: #5b6b7b; font-size: 0.75rem; }
.lp-phone-row .icon-tile { color: #185f98; background: #e3eef7; }
.lp-phone-bar { height: 5px; overflow: hidden; background: #e8eef3; border-radius: 3px; }
.lp-phone-bar span { display: block; width: 67%; height: 100%; background: #2178bd; }
.lp-toast { position: absolute; display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: #12263a; background: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(7, 26, 43, 0.3); }
.lp-toast strong { display: block; font-size: 0.9rem; font-weight: 600; }
.lp-toast small { display: block; color: #5b6b7b; font-size: 0.78rem; }
.lp-toast-icon { display: grid; width: 32px; height: 32px; flex: none; place-items: center; border-radius: 50%; }
.lp-toast-1 { top: 120px; left: max(0px, calc(50% - 250px)); }
.lp-toast-1 .lp-toast-icon { color: #16794a; background: #e3f4ea; }
.lp-toast-2 { top: 300px; right: max(0px, calc(50% - 250px)); }
.lp-toast-2 .lp-toast-icon { color: #7a5a00; background: #fff4d6; }
@media (max-width: 575.98px) { .lp-toast { display: none; } .lp-phone-wrap { height: 440px; } }

.lp-networks { background: var(--surface); border-bottom: 1px solid var(--border); }
.lp-networks-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding: 1.75rem 0; }
.lp-networks-inner > span { color: var(--text-muted); font-size: 0.92rem; font-weight: 500; }
.lp-network-list { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.lp-network-list a { display: inline-flex; align-items: center; gap: 0.6rem; height: 48px; padding: 0 1rem 0 0.4rem; color: var(--text); font-weight: 600; text-decoration: none; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; }
.lp-network-list a:hover { border-color: var(--blue); }
.lp-network-list img { width: 38px; height: 38px; padding: 4px; object-fit: contain; background: #fff; border-radius: 50%; }

.lp-section { padding: clamp(3.5rem, 8vw, 6rem) 0; background: var(--surface); }
.lp-section-alt { background: var(--bg); }
.lp-heading { display: grid; gap: 0.6rem; max-width: 640px; margin-bottom: 2.5rem; }
.lp-heading h2, .lp-split h2 { margin: 0; font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.1; letter-spacing: -0.03em; }
.lp-heading p, .lp-split p { margin: 0; color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; }

.lp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.lp-steps li { display: grid; gap: 0.7rem; align-content: start; padding: 1.6rem; background: var(--bg); border-radius: var(--radius-lg); }
.lp-section-alt .lp-steps li { background: var(--surface); }
.lp-steps li::before { color: var(--link); font-size: 0.9rem; font-weight: 600; font-variant-numeric: tabular-nums; content: '0' counter(step); counter-increment: step; }
.lp-steps h3 { margin: 0; font-size: 1.2rem; }
.lp-steps p { margin: 0; color: var(--text-muted); font-size: 0.95rem; line-height: 1.55; }

.lp-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: center; }
@media (min-width: 992px) { .lp-split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4rem; } }
.lp-split-copy { display: grid; gap: 1rem; }
.lp-demo-card { display: grid; gap: 1rem; width: 100%; max-width: 440px; margin: 0 auto; padding: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-lg); }
.lp-demo-card .balance-card-value { color: var(--text); }

.lp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.lp-features > div { display: grid; gap: 0.6rem; align-content: start; padding-top: 1.25rem; border-top: 2px solid var(--text); }
.lp-features h3 { margin: 0; font-size: 1.2rem; }
.lp-features p { margin: 0; color: var(--text-muted); line-height: 1.6; }

.lp-install { padding: 0 0 clamp(3.5rem, 8vw, 6rem); background: var(--surface); }
.lp-install-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: center; padding: clamp(1.75rem, 5vw, 3.5rem); color: var(--navy); background: var(--yellow); border-radius: 28px; }
@media (min-width: 992px) { .lp-install-card { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); } }
.lp-install-card h2 { margin: 0 0 0.75rem; color: var(--navy); font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.1; letter-spacing: -0.03em; }
.lp-install-card p { margin: 0; color: #3b3200; font-size: 1.05rem; line-height: 1.6; }
.lp-install-card .btn-navy { --bs-btn-color: #fff; --bs-btn-bg: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--navy-900); --bs-btn-hover-border-color: var(--navy-900); --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--navy-900); min-height: 54px; margin-top: 1.5rem; }
.lp-install-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.lp-install-steps div { display: grid; gap: 0.3rem; padding: 1.1rem 1.2rem; background: rgba(255, 255, 255, 0.55); border-radius: 18px; }
.lp-install-steps strong { font-weight: 600; }
.lp-install-steps span { color: #3b3200; font-size: 0.92rem; line-height: 1.5; }

/* 10. Legal and help pages ------------------------------------------- */

.legal-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (min-width: 992px) { .legal-layout { grid-template-columns: 220px minmax(0, 1fr); } }
.legal-toc { display: none; }
@media (min-width: 992px) {
  .legal-toc { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 0.1rem; font-size: 0.88rem; }
  .legal-toc strong { margin-bottom: 0.4rem; color: var(--text-muted); font-size: 0.78rem; font-weight: 600; }
  .legal-toc a { padding: 0.35rem 0.6rem; color: var(--text-muted); text-decoration: none; border-radius: 8px; }
  .legal-toc a:hover { color: var(--text); background: var(--surface-sunken); }
}
.prose { max-width: 720px; color: var(--text); font-size: 1rem; line-height: 1.7; }
.prose h2 { margin: 2.25rem 0 0.75rem; font-size: 1.3rem; scroll-margin-top: calc(var(--header-h) + 16px); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.5rem 0 0.5rem; font-size: 1.05rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }
.prose li::marker { color: var(--text-muted); }
.prose .legal-placeholder { padding: 0 0.3rem; color: var(--warning); background: var(--warning-bg); border-radius: 4px; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-bottom: 1.5rem; color: var(--text-muted); font-size: 0.9rem; }
.legal-note { padding: 1rem 1.1rem; margin-bottom: 2rem; color: var(--accent-soft-text); font-size: 0.92rem; background: var(--accent-soft); border-radius: var(--radius); }

/* 11. Splash screen -------------------------------------------------- */

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--navy);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.app-splash.is-done { visibility: hidden; opacity: 0; }
.app-splash-mark { position: relative; display: grid; width: 128px; height: 128px; place-items: center; }
.app-splash-mark > div { display: grid; width: 120px; height: 120px; place-items: center; background: #fff; border-radius: 50%; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28); animation: splashMark 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.app-splash-mark img { width: 104px; height: 104px; border-radius: 50%; }
.app-splash-ring { position: absolute; inset: 0; border: 2px solid var(--yellow); border-radius: 50%; opacity: 0; animation: splashRing 1.6s ease-out 0.35s both; }
.app-splash-ring.second { border-color: rgba(255, 255, 255, 0.5); animation-delay: 0.6s; }
.app-splash h1 { margin: 1.75rem 0 0; color: #fff; font-size: 2.5rem; font-weight: 700; letter-spacing: -0.03em; animation: splashUp 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.45s both; }
.app-splash p { margin: 0.5rem 0 0; color: var(--navy-text); animation: splashUp 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.65s both; }
.app-splash-bar { position: absolute; bottom: calc(88px + env(safe-area-inset-bottom)); width: 120px; height: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.14); border-radius: 2px; }
.app-splash-bar span { display: block; width: 0; height: 100%; background: var(--yellow); border-radius: inherit; animation: splashBar 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.6s both; }

@keyframes splashMark { from { opacity: 0; transform: scale(0.6); } 70% { opacity: 1; transform: scale(1.06); } to { transform: scale(1); } }
@keyframes splashRing { 0% { opacity: 0; transform: scale(0.9); } 15% { opacity: 0.75; } 100% { opacity: 0; transform: scale(1.9); } }
@keyframes splashUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes splashBar { to { width: 100%; } }

/* 12. Motion and print ---------------------------------------------- */

@keyframes lpFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes lpIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes lpPop { 0%, 8% { opacity: 0; transform: translateY(10px) scale(0.96); } 16%, 84% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; transform: translateY(-6px); } }
.lp-float { animation: lpFloat 6s ease-in-out infinite; }
.lp-in { animation: lpIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.lp-in-2 { animation: lpIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.12s both; }
.lp-in-3 { animation: lpIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.24s both; }
.lp-toast-1 { animation: lpPop 7s ease-in-out infinite; }
.lp-toast-2 { animation: lpPop 7s ease-in-out 3.5s infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .lp-toast-1, .lp-toast-2 { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .purchase-layout { grid-template-columns: minmax(0, 1fr); }
  .map-card { position: static; }
}

@media (max-width: 767.98px) {
  .page-shell { padding-top: 1.25rem; }
  .page-intro { align-items: flex-start; margin-bottom: 1.25rem; }
  .page-intro .btn { min-height: 40px; }
  .form-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .flow-step { font-size: 0.78rem; }
  .flow-step::after { display: none; }
  .auth-main { align-items: flex-start; padding-top: 1rem; }
  .auth-layout { border: 0; box-shadow: none; background: transparent; }
  .auth-card { padding: 0.5rem 0.25rem; }
}

@media print {
  .app-header, .app-tabbar, .app-footer, .app-splash { display: none !important; }
  body { background: #fff; padding: 0 !important; }
}

/* Wallet balance figure. */
.wallet-balance { display: block; font-size: clamp(2rem, 6vw, 2.4rem); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.025em; line-height: 1.15; }

/* Readiness check rows (dispense.php). */
.readiness-item > i { flex: none; margin-top: 0.15rem; align-self: flex-start; }
.readiness-item > .spinner-border { flex: none; }
.readiness-ok > i { color: var(--success); }
.readiness-warning > i { color: var(--warning); }
.readiness-failed > i { color: var(--danger); }
.readiness-item a { font-weight: 600; }
.authorize-summary .amount small { display: block; color: var(--text-muted); font-size: 0.8rem; font-weight: 400; }
.min-w-0 { min-width: 0; }
#readinessLocation.readiness-item { border-bottom: 0; }

/* Support requests (support.php, support_case.php). */
.support-list { margin: 0; padding: 0; list-style: none; }
.support-list li { border-bottom: 1px solid var(--divider); }
.support-list li:last-child { border-bottom: 0; }
.support-list a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; color: inherit; text-decoration: none; }
.support-list strong { font-weight: 500; }
.support-list small { display: block; color: var(--text-muted); font-size: 0.84rem; }
.support-new { display: inline-flex; align-items: center; height: 20px; margin-left: 0.4rem; padding: 0 0.5rem; color: var(--accent-soft-text); font-size: 0.72rem; font-weight: 600; background: var(--accent-soft); border-radius: 999px; }
.support-thread { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.support-msg { padding: 0.8rem 1rem; background: var(--surface-2); border: 1px solid var(--divider); border-radius: 14px; }
.support-msg.staff { background: var(--accent-soft); border-color: transparent; }
.support-msg.system { padding: 0.1rem 1rem; color: var(--text-muted); font-size: 0.86rem; background: transparent; border: 0; }
.support-msg header { margin-bottom: 0.25rem; color: var(--text-muted); font-size: 0.8rem; }
.support-callout { padding: 0.85rem 1rem; color: var(--warning); background: var(--warning-bg); border-radius: 12px; }
.support-callout.resolved { color: var(--success); background: var(--success-bg); }
.support-callout strong, .support-callout p { color: inherit; }

/* Changing station (switch_station.php). */
.station-list { margin: 0; padding: 0; list-style: none; }
.station-option { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--divider); }
.station-option:last-child { border-bottom: 0; }
.station-distance { color: var(--text-muted); font-size: 0.86rem; white-space: nowrap; }
.station-nearest { display: inline-flex; align-items: center; height: 20px; margin-left: 0.4rem; padding: 0 0.5rem; color: var(--accent-soft-text); font-size: 0.72rem; font-weight: 600; background: var(--accent-soft); border-radius: 999px; }

/* Splash entry page (index.php). */
.splash-page { overflow: hidden; background: var(--navy); }
.app-splash.is-leaving { opacity: 0; }
.app-splash-skip { position: absolute; bottom: calc(32px + env(safe-area-inset-bottom)); padding: 0.5rem 1rem; color: var(--navy-text); font-size: 0.85rem; text-decoration: none; border-radius: 999px; }
.app-splash-skip:hover, .app-splash-skip:focus-visible { color: #fff; }

/* Small-screen refinements. */
.authorize-summary > div:first-child { flex: 1; }
.authorize-summary .amount { white-space: nowrap; }
@media (max-width: 575.98px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
  .metric-card { padding: 0.85rem; }
  .metric-card .metric-icon { display: none; }
  .metric-card strong { font-size: 1.1rem; }
  .fueling-details { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 0.75rem; }
  .fueling-details > div:nth-child(3) { border-left: 0; }
}

/* Install banner (js/app.js). */
.install-banner {
  position: fixed;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: 1050;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem 0.85rem;
  align-items: center;
  max-width: 440px;
  margin: 0 auto;
  padding: 0.9rem 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.install-banner.is-visible { opacity: 1; transform: none; }
body:has(.app-tabbar) .install-banner { bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); }
@media (min-width: 992px) { body:has(.app-tabbar) .install-banner { bottom: 24px; } .install-banner { right: 24px; left: auto; width: 400px; } }
.install-banner img { width: 44px; height: 44px; border-radius: 12px; }
.install-banner-copy { display: grid; gap: 0.1rem; }
.install-banner-copy strong { font-size: 0.98rem; font-weight: 600; }
.install-banner-copy span { color: var(--text-muted); font-size: 0.88rem; line-height: 1.4; }
.install-banner-copy i { color: var(--link); }
.install-banner-actions { display: flex; grid-column: 1 / -1; justify-content: flex-end; gap: 0.5rem; }

/* Connection banner (js/app.js): thin bar at the very top. */
.connection-banner {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2000;
  padding: calc(6px + env(safe-area-inset-top)) 16px 6px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  transform: translateY(-100%);
  transition: transform 0.25s ease;
}
.connection-banner.is-visible { transform: none; }
.connection-banner.is-offline { color: #fff; background: #b42318; }
.connection-banner.is-online { color: #14653f; background: #dcf5e7; }
@media (prefers-reduced-motion: reduce) { .connection-banner { transition: none; } }

/* Keep the footer at the bottom of short pages. */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body > main { flex: 1 0 auto; }
body > .app-footer { margin-top: auto; flex-shrink: 0; }

/* Loading states ----------------------------------------------------- */

/* Skeleton blocks: placeholders shaped like the content that is loading. */
.skeleton {
  display: block;
  background: linear-gradient(90deg, var(--surface-sunken) 0%, var(--surface-2) 50%, var(--surface-sunken) 100%);
  background-size: 200% 100%;
  border-radius: 10px;
  animation: skeletonShimmer 1.3s ease-in-out infinite;
}
.skeleton-stack { display: grid; gap: 0.6rem; }
.skeleton-label { width: 35%; height: 14px; margin-top: 0.4rem; }
.skeleton-field { height: 48px; border-radius: 12px; }
.skeleton-button { height: 52px; margin-top: 0.4rem; border-radius: 14px; }
.skeleton-title { width: 55%; height: 30px; }
.skeleton-text { width: 80%; height: 14px; }
.skeleton-card { height: 120px; border-radius: var(--radius-lg); }
@keyframes skeletonShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Map placeholder until Google Maps loads (work.php). */
#map[data-map-pending]:empty { background: linear-gradient(90deg, var(--surface-sunken) 0%, var(--surface-2) 50%, var(--surface-sunken) 100%); background-size: 200% 100%; animation: skeletonShimmer 1.3s ease-in-out infinite; }

/* Thin progress bar while the next page loads (js/app.js). */
.page-progress { position: fixed; top: 0; right: 0; left: 0; z-index: 1990; height: 3px; pointer-events: none; }
.page-progress span { display: block; width: 0; height: 100%; background: var(--blue); box-shadow: 0 0 8px rgba(33, 120, 189, 0.5); }
.page-progress.is-loading span { animation: pageProgress 10s cubic-bezier(0.08, 0.7, 0.2, 1) forwards; }
@keyframes pageProgress { 0% { width: 0; } 10% { width: 35%; } 100% { width: 92%; } }

/* Skeleton screen shown when the next page takes a moment (js/app.js). */
.page-skeleton {
  position: fixed;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1020;
  padding-top: 1.75rem;
  overflow: hidden;
  background: var(--bg);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.page-skeleton.is-visible { opacity: 1; }
.page-skeleton .container { display: grid; gap: 0.85rem; max-width: 1120px; }
body:not(:has(.app-header)) .page-skeleton { top: 0; }

/* Lazy rendering: the browser skips layout and paint for landing-page
   sections until they come near the screen. */
.lp-section, .lp-install { content-visibility: auto; contain-intrinsic-size: auto 720px; }

/* ------------------------------------------------------------------ */
/* Payment method cards (get_fuel_products.php)                        */
/* ------------------------------------------------------------------ */
.pay-options { display: grid; gap: 10px; grid-template-columns: 1fr; margin-bottom: 8px; }
@media (min-width: 576px) { .pay-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pay-option {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 78px; margin: 0;
  padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.pay-option:hover { border-color: var(--border-strong); }
/* The native radio stays in the form and keyboard order; the card shows its state. */
.pay-option-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.pay-option.is-selected, .pay-option:has(.pay-option-input:checked) {
  border-color: var(--blue); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(33, 120, 189, 0.12);
}
.pay-option:has(.pay-option-input:focus-visible) { box-shadow: var(--focus-ring); }
/* Logos are made for a light background, so their tile stays white in dark mode too. */
.pay-option-logo {
  flex: 0 0 72px; height: 48px; display: grid; place-items: center; padding: 5px 7px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; color: var(--blue-700); font-size: 1.4rem;
}
.pay-option-logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.pay-option-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 0.82rem; color: var(--text-muted); line-height: 1.35; }
.pay-option-text strong { color: var(--text); font-size: 0.95rem; font-weight: 600; }
.pay-option-tags { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; font-size: 0.76rem; }
.pay-option-tags i { margin-right: 2px; }
.pay-option-check {
  flex: none; margin-left: auto; width: 22px; height: 22px; display: grid; place-items: center;
  border: 1.5px solid var(--border-strong); border-radius: 50%; color: transparent; font-size: 0.8rem; transition: inherit;
}
.pay-option.is-selected .pay-option-check, .pay-option:has(.pay-option-input:checked) .pay-option-check {
  background: var(--blue); border-color: var(--blue); color: #fff;
}
.pay-voucher-panel { margin: 4px 0 10px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.pay-cash-steps { margin: 0 0 12px; padding-left: 1.25rem; font-size: 0.9rem; color: var(--text-muted); }
.pay-cash-steps li + li { margin-top: 4px; }
.pay-cash-code .input-group-text { font-weight: 600; letter-spacing: 0.04em; }
.pay-cash-code .form-control { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .pay-option, .pay-option-check { transition: none; } }

/* ------------------------------------------------------------------ */
/* In-app checkout (payment_checkout.php)                              */
/* ------------------------------------------------------------------ */
.flow-step.done { color: var(--text); }
.flow-step.done span { background: var(--success-bg); color: var(--success); }
.checkout-layout { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 992px) { .checkout-layout { grid-template-columns: minmax(0, 1fr) 320px; } }
.checkout-pay { padding: 0.75rem; }
/* The payment form is the gateway's own page, made for a light background. */
.checkout-frame-wrap { position: relative; min-height: 640px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.checkout-frame { display: block; width: 100%; height: 680px; border: 0; background: #fff; }
.checkout-frame-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 0.5rem; color: #5b6b7b; font-size: 0.92rem; pointer-events: none; }
.checkout-frame-wrap[aria-busy='false'] .checkout-frame-loading { display: none; }
.checkout-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.75rem; }
.checkout-actions .btn-link { font-size: 0.85rem; color: var(--text-muted); }
.checkout-result { margin: 0.25rem 0 0; }
.checkout-summary { display: grid; gap: 0.65rem; }
.checkout-summary h2 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.checkout-summary .detail-row.total { padding-top: 0.65rem; border-top: 1px solid var(--divider); font-size: 1rem; }
.checkout-summary .detail-row.total strong { font-size: 1.15rem; }
@media (max-width: 575.98px) {
  .checkout-pay { padding: 0.5rem; }
  .checkout-frame { height: 720px; }
}

/* Star Oil discount code step (discount_code.php). */
.discount-step .app-form { margin-top: 1rem; }
.discount-code-input { font-size: 1.6rem; letter-spacing: 0.5em; text-align: center; font-variant-numeric: tabular-nums; padding-left: 0.5em; }
.discount-secondary { margin-top: 0.75rem; text-align: center; }

/* ------------------------------------------------------------------ */
/* Station picker (work.php): photo cards instead of a dropdown        */
/* ------------------------------------------------------------------ */

.station-picker { margin-bottom: 1.5rem; }
.station-picker-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 0.5rem; }
.station-picker-head h2 { margin: 0.15rem 0 0.2rem; font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); }
.station-picker-head p { margin: 0; color: var(--text-muted); }
.station-step { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue-700); }
html[data-theme='dark'] .station-step { color: var(--link); }
.station-picker-tools { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.station-search { position: relative; display: block; margin: 0; }
.station-search i { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.station-search input { width: min(280px, 70vw); height: 44px; padding: 0 0.9rem 0 2.4rem; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; }
.station-search input:focus { outline: none; border-color: var(--blue); box-shadow: var(--focus-ring); }
.station-near-btn { height: 44px; border-radius: 999px; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0 1rem; }
.station-picker-summary { margin: 0 0 0.9rem; color: var(--text-muted); font-size: 0.9rem; }

.station-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1rem; }
.station-card {
  position: relative; display: block; aspect-ratio: 16 / 10; min-height: 190px; margin: 0;
  border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; isolation: isolate;
  background: var(--navy-900); color: #fff; box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.station-card[hidden] { display: none; }
.station-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.station-radio { position: absolute; opacity: 0; pointer-events: none; }
.station-photo, .station-photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.station-photo img { object-fit: cover; object-position: var(--station-photo-x, 50%) 40%; transform: scale(1.04); transition: transform 0.5s ease; }
.station-card:hover .station-photo img { transform: scale(1.09); }
.station-shade {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 22, 38, 0.55) 0%, rgba(8, 22, 38, 0.05) 38%, rgba(8, 22, 38, 0.35) 58%, rgba(6, 18, 32, 0.92) 100%),
    linear-gradient(90deg, rgba(11, 34, 56, 0.35), rgba(11, 34, 56, 0));
}
.station-top { position: absolute; z-index: 2; top: 0.85rem; left: 0.85rem; right: 0.85rem; display: flex; justify-content: space-between; gap: 0.5rem; align-items: flex-start; }
.station-status, .station-distance {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.65rem; border-radius: 999px;
  font-size: 0.76rem; font-weight: 600; line-height: 1.2; color: #fff;
  background: rgba(8, 22, 38, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.station-distance[hidden] { display: none; }
.station-dot { width: 8px; height: 8px; border-radius: 50%; background: #9aa9b7; flex: 0 0 8px; }
.station-card.is-live .station-dot { background: #3ddc84; box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.7); animation: station-pulse 2s infinite; }
.station-card.is-offline .station-dot { background: var(--yellow); }
@keyframes station-pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6); } 70% { box-shadow: 0 0 0 7px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
.station-body { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; gap: 0.7rem; align-items: flex-end; padding: 1rem 1rem 0.95rem; }
.station-logo { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; padding: 5px; background: #fff; border-radius: 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); }
.station-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.station-text { display: grid; gap: 0.25rem; min-width: 0; }
.station-name { font-size: 1.15rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); overflow-wrap: anywhere; }
.station-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.85rem; font-size: 0.8rem; color: rgba(255, 255, 255, 0.86); }
.station-meta i { margin-right: 0.15rem; }
.station-nearest { color: var(--yellow); font-weight: 700; }
.station-nearest[hidden] { display: none; }
.station-check {
  position: absolute; z-index: 3; right: 0.9rem; bottom: 0.95rem; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); color: var(--navy-900); font-size: 1.15rem;
  transform: scale(0.4); opacity: 0; transition: transform 0.2s ease, opacity 0.2s ease;
}
.station-card.is-selected { box-shadow: 0 0 0 3px var(--yellow), var(--shadow-lg); }
.station-card.is-selected .station-check { transform: scale(1); opacity: 1; }
.station-card.is-selected .station-body { padding-right: 3.6rem; }
.station-card:focus-within { outline: none; box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--blue); }
.station-card.is-soon { cursor: not-allowed; }
.station-card.is-soon .station-photo img { filter: grayscale(0.85) brightness(0.8); }
.station-card.is-soon:hover { transform: none; box-shadow: var(--shadow-sm); }
.station-card.is-soon:hover .station-photo img { transform: scale(1.04); }
.station-empty, .station-placeholder {
  display: flex; align-items: center; gap: 0.75rem; padding: 1.1rem 1.2rem; border: 1px dashed var(--border-strong);
  border-radius: var(--radius); color: var(--text-muted); background: var(--surface-2);
}
.station-empty[hidden] { display: none; }
.station-empty p { margin: 0; }
.station-empty i, .station-placeholder i { font-size: 1.3rem; color: var(--blue); }
@media (max-width: 640px) {
  .station-picker-tools { width: 100%; }
  .station-search { flex: 1 1 100%; }
  .station-search input { width: 100%; }
  .station-near-btn { flex: 1 1 100%; justify-content: center; }
  .station-card { aspect-ratio: auto; min-height: 176px; }
}
@media (prefers-reduced-motion: reduce) {
  .station-card, .station-photo img, .station-check { transition: none; }
  .station-card.is-live .station-dot { animation: none; }
}

/* "Who is at the pump?" on the authorize page (dispense.php) */
.presence-card { display: grid; gap: 0.9rem; padding: 1.1rem; margin-bottom: 0.85rem; border: 2px solid var(--danger); }
.presence-alert { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 0.9rem; border-radius: var(--radius-sm); background: var(--danger-bg); color: var(--text); }
.presence-alert > i { flex: none; font-size: 1.5rem; line-height: 1; color: var(--danger); }
.presence-alert h2 { margin: 0 0 0.3rem; font-size: 1.05rem; font-weight: 700; color: var(--danger); text-transform: uppercase; letter-spacing: 0.02em; }
.presence-alert p { margin: 0; font-size: 0.93rem; }
.presence-options { display: grid; gap: 0.55rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.presence-options legend { float: none; width: auto; margin: 0 0 0.15rem; padding: 0; font-size: 0.95rem; font-weight: 600; color: var(--text); }
.presence-option {
  display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.75rem 0.85rem; cursor: pointer;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.presence-option input { flex: none; width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; accent-color: var(--blue); }
.presence-option strong { display: block; font-weight: 600; color: var(--text); }
.presence-option small { display: block; color: var(--text-muted); font-size: 0.85rem; }
.presence-option:hover { border-color: var(--blue); }
.presence-option:has(input:checked) { border-color: var(--blue); background: var(--surface-2); box-shadow: 0 0 0 1px var(--blue); }
.presence-option:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.presence-note { margin: 0; padding: 0.65rem 0.8rem; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 600; }
.presence-note[hidden] { display: none; }
.presence-note-warning { background: var(--warning-bg); color: var(--warning); }
.presence-note-danger { background: var(--danger-bg); color: var(--danger); }
@media (prefers-reduced-motion: reduce) {
  .presence-option { transition: none; }
}

/* Fuel product cards on the purchase page (get_fuel_products.php, fuel_products.php) */
.fuel-picker { border: 0; padding: 0; margin: 0; min-width: 0; }
.fuel-picker legend { float: none; width: auto; padding: 0; margin-bottom: 0.5rem; }
.fuel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 0.85rem; }
.fuel-card {
  --fuel: #1f6fb2; --fuel-deep: #0f3e66;
  position: relative; display: block; min-height: 168px; margin: 0; overflow: hidden; isolation: isolate; cursor: pointer;
  border-radius: var(--radius-lg); color: #fff; box-shadow: var(--shadow-sm);
  background: radial-gradient(120% 90% at 85% 0%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 55%), linear-gradient(150deg, var(--fuel) 0%, var(--fuel-deep) 100%);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.fuel-card.is-petrol { --fuel: #e5372b; --fuel-deep: #8f1610; }
.fuel-card.is-diesel { --fuel: #2b2f36; --fuel-deep: #050607; }
.fuel-card.is-ron95 { --fuel: #19a557; --fuel-deep: #0a5c2e; }
.fuel-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.fuel-radio { position: absolute; opacity: 0; pointer-events: none; }
.fuel-art { position: absolute; z-index: 0; top: 0; right: 0; width: 60%; max-width: 170px; height: auto; transition: transform 0.4s ease; }
.fuel-card:hover .fuel-art { transform: translateX(-4px) rotate(-3deg); }
.fuel-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.55) 100%); }
.fuel-body { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: grid; gap: 0.15rem; padding: 0.9rem 1rem 0.85rem; }
.fuel-name { color: #fff; font-size: 1.2rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); overflow-wrap: anywhere; }
.fuel-price { color: #fff; font-size: 0.95rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.fuel-price small { color: inherit; font-size: 0.78rem; font-weight: 500; opacity: 0.85; }
.fuel-caption { font-size: 0.78rem; color: rgba(255, 255, 255, 0.86); }
.fuel-caption .bi { color: var(--yellow); }
.fuel-check {
  position: absolute; z-index: 3; top: 0.75rem; left: 0.75rem; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); color: var(--navy-900); font-size: 1.05rem;
  transform: scale(0.4); opacity: 0; transition: transform 0.2s ease, opacity 0.2s ease;
}
.fuel-card.is-selected, .fuel-card:has(.fuel-radio:checked) { box-shadow: 0 0 0 3px var(--yellow), var(--shadow-lg); }
.fuel-card.is-selected .fuel-check, .fuel-card:has(.fuel-radio:checked) .fuel-check { transform: scale(1); opacity: 1; }
.fuel-card:focus-within { outline: none; box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--blue); }
html[data-theme='dark'] .fuel-card.is-diesel { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), var(--shadow-sm); }
@media (max-width: 420px) { .fuel-grid { grid-template-columns: 1fr 1fr; } .fuel-card { min-height: 150px; } .fuel-name { font-size: 1.05rem; } }
@media (prefers-reduced-motion: reduce) { .fuel-card, .fuel-art, .fuel-check { transition: none; } }
