/* ==========================================================================
   CarDesk US — Gas Receipt & MPG Tracker
   styles.css (Part 2 of 3 — All-Screen Pro Responsive Edition)
   Devices: Compact Phones (320px+), Modern Phones, iPad Portrait & Landscape,
            Laptops (1024px–1440px), and Wide Desktops (1440px+)
   ========================================================================== */

:root {
  /* Core Midnight & Neon Palette */
  --bg-top: #0e1633;
  --bg-mid: #060b1d;
  --bg-deep: #000000;
  --surface-card: rgba(11, 17, 40, 0.82);
  --surface-card-strong: rgba(13, 21, 48, 0.95);
  --surface-input: rgba(6, 10, 26, 0.88);
  --surface-hover: rgba(20, 31, 68, 0.85);

  /* Electric Accents */
  --cyan: #38f6ff;
  --cyan-soft: rgba(56, 246, 255, 0.14);
  --cyan-border: rgba(56, 246, 255, 0.32);
  --magenta: #ff2ae6;
  --magenta-soft: rgba(255, 42, 230, 0.15);
  --magenta-border: rgba(255, 42, 230, 0.36);
  --purple: #a855f7;
  --emerald: #22c55e;
  --amber: #f59e0b;
  --amber-bg: rgba(120, 62, 12, 0.22);
  --amber-border: rgba(245, 158, 11, 0.48);
  --danger: #ff4d6d;

  /* Signature Gradients */
  --grad-primary: linear-gradient(90deg, #18d8f0 0%, #38f6ff 25%, #c03df2 70%, #ff2ae6 100%);
  --grad-text: linear-gradient(90deg, #38f6ff 0%, #a855f7 55%, #ff2ae6 100%);

  /* Typography */
  --text-main: #f5f8ff;
  --text-secondary: #a9b8d8;
  --text-muted: #7082a8;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* Radii & Shadows */
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-card: 0 18px 45px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-neon-btn: 0 10px 28px rgba(56, 246, 255, 0.22), 0 6px 24px rgba(255, 42, 230, 0.26);
  --transition-fast: 180ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-smooth: 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   BASE RESET & GLOBAL CANVAS (iOS / iPadOS / Desktop Safe)
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg-deep);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-main);
  background-color: var(--bg-deep);
  background-image: radial-gradient(ellipse 95% 58% at 50% -4%, #12204d 0%, #0a112b 38%, #040714 72%, #000000 100%);
  background-repeat: no-repeat;
  /* overflow-x: clip preserves sticky headers across iOS Safari, iPadOS & Chrome */
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding-left: max(14px, env(safe-area-inset-left));
  padding-right: max(14px, env(safe-area-inset-right));
}

.mono-num,
.mono-input {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   AMBIENT NEON ORBS (FIXED BACKGROUND LAYER — BUTTER SMOOTH ON iPHONE/iPAD)
   ========================================================================== */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(ellipse 95% 58% at 50% -4%, #12204d 0%, #0a112b 38%, #040714 72%, #000000 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.22;
}

.orb-cyan {
  width: clamp(260px, 38vw, 460px);
  height: clamp(260px, 38vw, 460px);
  top: -110px;
  left: -90px;
  background: radial-gradient(circle, var(--cyan), transparent 70%);
}

.orb-magenta {
  width: clamp(280px, 40vw, 480px);
  height: clamp(280px, 40vw, 480px);
  top: 240px;
  right: -130px;
  background: radial-gradient(circle, var(--magenta), transparent 70%);
}

/* ==========================================================================
   SIGNATURE SPLASH SCREEN: RING SWEEP + HEADLIGHTS ON/OFF + GLIDE-UP
   (~1.4s total, responsive on every screen, non-blocking for SEO)
   ========================================================================== */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 45%, #111d42 0%, #060a1c 55%, #000000 100%);
  transition: opacity 420ms ease, visibility 420ms ease;
}

.splash-logo-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1), opacity 420ms ease;
  will-change: transform, opacity;
}

.splash-logo-wrap::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(164px, 42vw, 206px);
  height: clamp(164px, 42vw, 206px);
  transform: translate(-50%, -62%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 246, 255, 0.14) 0%, rgba(11, 17, 40, 0.72) 62%, transparent 74%);
  box-shadow:
    0 0 48px rgba(56, 246, 255, 0.16),
    inset 0 0 28px rgba(255, 42, 230, 0.12);
  z-index: 0;
}

.splash-logo-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(164px, 42vw, 206px);
  height: clamp(164px, 42vw, 206px);
  margin-top: calc(clamp(164px, 42vw, 206px) * -0.62);
  margin-left: calc(clamp(164px, 42vw, 206px) * -0.5);
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: var(--cyan);
  border-right-color: var(--magenta);
  filter: drop-shadow(0 0 10px rgba(255, 42, 230, 0.65));
  animation: splashRingSpin 1.15s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  z-index: 1;
}

/* Strict Equal/Proportional Aspect Ratio Car SVG (Never Stretched) */
.car-logo-svg {
  aspect-ratio: 2 / 1;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.splash-car-svg {
  position: relative;
  z-index: 2;
  width: clamp(124px, 32vw, 154px);
  filter: drop-shadow(0 0 14px rgba(56, 246, 255, 0.4));
}

.headlight-beam {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: headlightBeamPulse 1.1s ease-in-out forwards;
}

.headlight-left,
.headlight-right {
  animation: headlightLensFlash 1.1s ease-in-out forwards;
}

.splash-brand-caption {
  position: relative;
  z-index: 2;
  margin-top: 22px;
  text-align: center;
  transition: opacity 240ms ease;
}

.brand-wordmark {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 5vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--cyan);
  text-shadow: 0 0 22px rgba(56, 246, 255, 0.35);
}

.brand-wordmark::after {
  content: "GAS RECEIPT & MPG AI";
  display: block;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--text-secondary);
  text-shadow: none;
}

.brand-accent {
  color: var(--magenta);
  text-shadow: 0 0 20px rgba(255, 42, 230, 0.45);
}

.splash-screen.is-gliding {
  background: transparent;
  pointer-events: none;
}

.splash-screen.is-gliding .splash-logo-wrap::before,
.splash-screen.is-gliding .splash-logo-wrap::after,
.splash-screen.is-gliding .splash-brand-caption {
  opacity: 0;
}

.splash-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes splashRingSpin {
  0% { transform: rotate(-45deg) scale(0.92); opacity: 0.4; }
  50% { opacity: 1; }
  100% { transform: rotate(225deg) scale(1); opacity: 0.95; }
}

@keyframes headlightBeamPulse {
  0%   { opacity: 0; transform: scale(0.7); }
  22%  { opacity: 0.95; transform: scale(1.18); }
  38%  { opacity: 0.12; transform: scale(0.85); }
  62%  { opacity: 1; transform: scale(1.24); }
  82%  { opacity: 0.22; transform: scale(0.92); }
  100% { opacity: 0.85; transform: scale(1.06); }
}

@keyframes headlightLensFlash {
  0%   { opacity: 0.35; filter: none; }
  22%  { opacity: 1; filter: drop-shadow(0 0 12px #38f6ff) drop-shadow(0 0 22px #ffffff); }
  38%  { opacity: 0.3; filter: none; }
  62%  { opacity: 1; filter: drop-shadow(0 0 14px #38f6ff) drop-shadow(0 0 24px #ffffff); }
  82%  { opacity: 0.45; filter: none; }
  100% { opacity: 1; filter: drop-shadow(0 0 10px #38f6ff); }
}

/* ==========================================================================
   STICKY TOP NAVBAR HEADER (SAFE-AREA & COMPACT PHONE READY)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top);
  background: rgba(6, 10, 26, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(56, 246, 255, 0.14);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 62px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex-shrink: 1;
}

.header-logo-dock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 28px;
  flex-shrink: 0;
  transition: transform var(--transition-smooth), filter var(--transition-smooth);
}

.header-logo-dock.just-docked {
  animation: dockGlowPop 520ms ease-out;
}

.header-car-svg {
  width: 46px;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(56, 246, 255, 0.38));
}

.nav-headlight {
  filter: drop-shadow(0 0 4px #38f6ff);
}

.brand-text-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-title {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3.6vw, 1.24rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--cyan);
  white-space: nowrap;
}

.brand-pill {
  display: none;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* On very narrow phones (< 400px), keep AI Scan Setup as a clean icon button so header never crowds */
@media (max-width: 399px) {
  #btn-ocr-settings span {
    display: none;
  }
  #btn-ocr-settings {
    padding: 7px 10px;
  }
}

@keyframes dockGlowPop {
  0% { transform: scale(1.14); filter: drop-shadow(0 0 18px var(--cyan)); }
  100% { transform: scale(1); filter: none; }
}

/* ==========================================================================
   BUTTON SYSTEM (ONE-HAND TOUCH TARGETS >= 46px)
   ========================================================================== */
.btn-primary,
.btn-secondary,
.btn-neon-magenta,
.btn-outline-cyan,
.btn-ghost,
.btn-danger,
.btn-danger-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn-primary:active,
.btn-secondary:active,
.btn-neon-magenta:active,
.btn-outline-cyan:active,
.btn-ghost:active,
.btn-danger:active {
  transform: scale(0.97);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 0.81rem;
  border-radius: 10px;
}

.btn-primary,
.btn-neon-magenta {
  color: #ffffff;
  background: var(--grad-primary);
  box-shadow: var(--shadow-neon-btn);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.btn-primary:hover,
.btn-neon-magenta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(56, 246, 255, 0.3), 0 8px 30px rgba(255, 42, 230, 0.36);
}

.btn-secondary {
  color: var(--cyan);
  background: rgba(56, 246, 255, 0.09);
  border: 1px solid rgba(56, 246, 255, 0.34);
}

.btn-secondary:hover {
  background: rgba(56, 246, 255, 0.16);
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.btn-outline-cyan {
  color: var(--cyan);
  background: rgba(11, 22, 46, 0.72);
  border: 1px solid var(--cyan-border);
}

.btn-outline-cyan:hover {
  background: rgba(56, 246, 255, 0.14);
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(56, 246, 255, 0.22);
}

.btn-ghost {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(90deg, #e11d48, #ff4d6d);
  box-shadow: 0 8px 22px rgba(225, 29, 72, 0.32);
}

.btn-danger-ghost {
  color: #ff7b93;
  background: rgba(255, 77, 109, 0.08);
  border: 1px solid rgba(255, 77, 109, 0.28);
}

.btn-danger-ghost:hover {
  background: rgba(255, 77, 109, 0.18);
  border-color: rgba(255, 77, 109, 0.55);
}

/* ==========================================================================
   GLASSMORPHISM CARD SYSTEM
   ========================================================================== */
.main-content {
  position: relative;
  z-index: 2;
  padding-bottom: 56px;
}

.glass-card {
  position: relative;
  background: var(--surface-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(114, 152, 255, 0.18);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

/* ==========================================================================
   HERO SECTION + DUAL INPUT GRID
   ========================================================================== */
.hero-section {
  padding-top: 24px;
  padding-bottom: 16px;
}

.hero-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(10, 32, 58, 0.65);
  border: 1px solid rgba(56, 246, 255, 0.36);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 24px rgba(56, 246, 255, 0.12);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  flex-shrink: 0;
  animation: livePulse 2s infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.84); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.95rem, 6.2vw, 3.3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  background: linear-gradient(100deg, #ffffff 18%, #38f6ff 68%, #ff2ae6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(0.93rem, 2.4vw, 1.08rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

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

.capture-card,
.entry-card {
  padding: 18px;
  border-color: rgba(56, 246, 255, 0.22);
  display: flex;
  flex-direction: column;
}

.card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 15px;
}

.card-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--text-main);
}

.capture-card .card-heading::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  flex-shrink: 0;
}

.mode-pill,
.ppg-badge {
  padding: 4px 10px;
  font-size: 0.73rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.mode-pill {
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid var(--cyan-border);
}

.mode-pill.is-live {
  color: #6ee7b7;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.4);
}

.ppg-badge {
  font-family: var(--font-mono);
  color: var(--magenta);
  background: var(--magenta-soft);
  border: 1px solid var(--magenta-border);
}

/* Receipt Dropzone */
.dropzone {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 148px;
  padding: 22px 14px;
  border-radius: var(--radius-lg);
  background: rgba(8, 13, 33, 0.72);
  border: 1.5px dashed rgba(56, 246, 255, 0.34);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--cyan);
  background: rgba(16, 29, 64, 0.8);
  box-shadow: inset 0 0 28px rgba(56, 246, 255, 0.09);
}

.dropzone-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 14px;
  color: var(--cyan);
  background: linear-gradient(135deg, rgba(56, 246, 255, 0.18), rgba(255, 42, 230, 0.18));
  border: 1px solid rgba(56, 246, 255, 0.3);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.dropzone-title {
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.dropzone-sub {
  font-size: 0.81rem;
  color: var(--text-secondary);
}

.dropzone-sub strong {
  color: var(--text-main);
}

/* Scanned Receipt Preview + Neon Laser Sweep */
.scan-preview-wrap {
  position: relative;
  margin-top: 12px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--cyan-border);
  background: #040714;
  max-height: 190px;
}

.scan-preview-img {
  width: 100%;
  max-height: 190px;
  object-fit: cover;
  opacity: 0.88;
}

.scan-laser {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--magenta), transparent);
  box-shadow: 0 0 14px var(--cyan), 0 0 24px var(--magenta);
  opacity: 0;
  pointer-events: none;
}

.scan-preview-wrap.is-scanning .scan-laser {
  opacity: 1;
  animation: laserSweep 1.15s ease-in-out infinite;
}

@keyframes laserSweep {
  0% { top: 6%; }
  50% { top: 90%; }
  100% { top: 6%; }
}

.btn-clear-preview {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.scan-status {
  min-height: 20px;
  margin-top: 10px;
  font-size: 0.81rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.scan-status.is-scanning { color: var(--cyan); }
.scan-status.is-success { color: #6ee7b7; }
.scan-status.is-error { color: #ff7b93; }

.capture-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.privacy-assurance-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.privacy-assurance-note svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--cyan);
}

/* ==========================================================================
   QUICK 1-TAP MANUAL ENTRY / INSTANT EDIT FORM
   (16px Inputs Prevent iPhone Safari Auto-Zoom)
   ========================================================================== */
.fuel-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
  flex: 1;
  justify-content: space-between;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* Keep Gallons & Total Paid side-by-side even on compact phones (fast thumb entry) */
.fuel-form .form-row-2:nth-of-type(2) {
  grid-template-columns: 1fr 1fr;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.opt-tag {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--cyan);
  background: rgba(56, 246, 255, 0.1);
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.field-input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  font-size: 16px; /* Prevents iOS Safari zoom on tap */
  color: var(--text-main);
  background: var(--surface-input);
  border: 1px solid rgba(114, 152, 255, 0.24);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  color-scheme: dark;
}

.field-input::placeholder {
  color: var(--text-muted);
}

.field-input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 246, 255, 0.15);
}

.field-input.just-filled {
  animation: fieldFlash 800ms ease;
}

@keyframes fieldFlash {
  0% { border-color: var(--magenta); box-shadow: 0 0 18px rgba(255, 42, 230, 0.45); }
  100% { border-color: rgba(114, 152, 255, 0.24); box-shadow: none; }
}

/* Custom Neon Switches */
.toggle-field-group {
  justify-content: space-between;
}

.inline-switch,
.gig-switch-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.inline-switch {
  min-height: 46px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--surface-input);
  border: 1px solid rgba(114, 152, 255, 0.24);
}

.inline-switch input,
.gig-switch-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: rgba(112, 130, 168, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform var(--transition-fast);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.inline-switch input:checked + .switch-track,
.gig-switch-label input:checked + .switch-track {
  background: var(--grad-primary);
  border-color: transparent;
  box-shadow: 0 0 14px rgba(56, 246, 255, 0.4);
}

.inline-switch input:checked + .switch-track::after,
.gig-switch-label input:checked + .switch-track::after {
  transform: translateX(18px);
}

.switch-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.form-actions .btn-full {
  flex: 1 1 180px;
}

/* ==========================================================================
   LIVE ANALYTICS DASHBOARD + KPI CARDS
   ========================================================================== */
.dashboard-section {
  padding-top: 32px;
}

.section-header-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.36rem, 4vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.section-sub {
  font-size: 0.87rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

.gig-toggle-card {
  display: inline-flex;
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  background: rgba(14, 22, 51, 0.78);
  border: 1px solid rgba(255, 42, 230, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.gig-label-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.gig-label-copy strong {
  font-size: 0.85rem;
  color: var(--text-main);
}

.gig-label-copy small {
  font-size: 0.71rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Gig Driver IRS Settings Bar */
.gig-settings-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  margin-bottom: 16px;
  border-color: rgba(245, 158, 11, 0.42);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.1), rgba(14, 22, 51, 0.88));
}

.gig-settings-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.gig-chip {
  padding: 3px 10px;
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-pill);
}

.gig-rate-note {
  font-size: 0.81rem;
  color: var(--text-secondary);
}

.gig-rate-note strong {
  color: var(--text-main);
}

.gig-settings-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.mini-select {
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--surface-input);
  border: 1px solid rgba(56, 246, 255, 0.3);
  border-radius: 9px;
  color-scheme: dark;
}

/* 4 Animated Stat KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 18px;
}

.kpi-card {
  padding: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 2px;
  border-radius: 2px;
  opacity: 0.85;
}

.kpi-cyan::before { background: linear-gradient(90deg, transparent, var(--cyan), transparent); }
.kpi-magenta::before { background: linear-gradient(90deg, transparent, var(--magenta), transparent); }
.kpi-gold::before { background: linear-gradient(90deg, transparent, var(--amber), transparent); }

.kpi-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-bottom: 10px;
}

.kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.25;
}

.kpi-badge {
  padding: 2px 7px;
  font-size: 0.64rem;
  font-weight: 700;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  color: var(--cyan);
  background: rgba(56, 246, 255, 0.12);
  border: 1px solid rgba(56, 246, 255, 0.25);
}

.kpi-badge.is-alert {
  color: #ffd1dc;
  background: rgba(255, 77, 109, 0.22);
  border-color: rgba(255, 77, 109, 0.55);
  animation: livePulse 1.8s infinite;
}

.kpi-badge.is-active {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.45);
}

.kpi-value {
  font-size: clamp(1.32rem, 4.4vw, 2.08rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

.kpi-cyan .kpi-value { text-shadow: 0 0 22px rgba(56, 246, 255, 0.25); }
.kpi-magenta .kpi-value { text-shadow: 0 0 22px rgba(255, 42, 230, 0.28); }
.kpi-gold .kpi-value {
  color: #fde68a;
  text-shadow: 0 0 22px rgba(245, 158, 11, 0.28);
}

.kpi-meta {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.kpi-meta strong {
  color: var(--text-secondary);
}

/* ==========================================================================
   VISUAL SPEND / MPG NEON BAR INDICATOR
   ========================================================================== */
.chart-card {
  padding: 18px;
  margin-bottom: 18px;
}

.chart-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.chart-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
}

.chart-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.chart-tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: 11px;
  background: rgba(5, 9, 24, 0.9);
  border: 1px solid rgba(114, 152, 255, 0.2);
}

.chart-tab {
  padding: 6px 13px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.chart-tab.active {
  color: #050918;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(56, 246, 255, 0.45);
}

.visual-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 158px;
  padding: 12px 4px 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.chart-bar-col {
  flex: 1 1 54px;
  min-width: 48px;
  max-width: 100px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.chart-bar-val {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.chart-bar-track {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-bar-fill {
  width: 100%;
  min-height: 10px;
  border-radius: 7px;
  background: linear-gradient(180deg, #38f6ff 0%, #6366f1 100%);
  box-shadow: 0 0 16px rgba(56, 246, 255, 0.35);
  transition: height 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.chart-bar-fill.is-mpg {
  background: linear-gradient(180deg, #ff2ae6 0%, #7c3aed 100%);
  box-shadow: 0 0 16px rgba(255, 42, 230, 0.35);
}

.chart-bar-fill.is-low {
  background: linear-gradient(180deg, #ff4d6d 0%, #9f1239 100%);
  box-shadow: 0 0 16px rgba(255, 77, 109, 0.45);
}

.chart-bar-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.chart-empty-state {
  padding: 26px 14px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  background: rgba(5, 9, 24, 0.5);
  border: 1px dashed rgba(114, 152, 255, 0.2);
}

/* ==========================================================================
   FUEL LOG LEDGER + 1-CLICK EDIT / DELETE / CSV EXPORT
   ========================================================================== */
.ledger-card {
  padding: 18px;
  margin-bottom: 18px;
}

.ledger-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ledger-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ledger-title {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 700;
}

.count-pill {
  padding: 2px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius-pill);
}

.ledger-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.local-privacy-micro {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.fuel-log-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.log-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 13px 14px;
  border-radius: var(--radius-lg);
  background: rgba(6, 11, 29, 0.82);
  border: 1px solid rgba(114, 152, 255, 0.16);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.log-item:hover {
  border-color: rgba(56, 246, 255, 0.34);
  background: rgba(12, 20, 48, 0.9);
}

.log-item-main {
  flex: 1 1 210px;
  min-width: 0;
}

.log-item-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.log-station {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text-main);
}

.log-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.log-badge-gig,
.log-badge-mpg {
  padding: 2px 7px;
  font-size: 0.67rem;
  font-weight: 700;
  border-radius: 6px;
}

.log-badge-gig {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.log-badge-mpg {
  font-family: var(--font-mono);
  color: var(--cyan);
  background: rgba(56, 246, 255, 0.12);
  border: 1px solid rgba(56, 246, 255, 0.28);
}

.log-badge-mpg.is-low {
  color: #ffd1dc;
  background: rgba(255, 77, 109, 0.2);
  border-color: rgba(255, 77, 109, 0.48);
}

.log-sub-stats {
  font-size: 0.79rem;
  color: var(--text-secondary);
}

.log-item-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-left: auto;
}

.log-price {
  font-family: var(--font-mono);
  font-size: 1.06rem;
  font-weight: 700;
  color: #ffffff;
}

.log-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.log-action-btn {
  padding: 7px 11px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.log-action-edit {
  color: var(--cyan);
  background: rgba(56, 246, 255, 0.1);
  border: 1px solid rgba(56, 246, 255, 0.26);
}

.log-action-edit:hover { background: rgba(56, 246, 255, 0.2); }

.log-action-delete {
  color: #ff8aa0;
  background: rgba(255, 77, 109, 0.1);
  border: 1px solid rgba(255, 77, 109, 0.24);
}

.log-action-delete:hover { background: rgba(255, 77, 109, 0.22); }

.log-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 26px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.87rem;
  border-radius: var(--radius-md);
  background: rgba(5, 9, 24, 0.5);
  border: 1px dashed rgba(114, 152, 255, 0.2);
}

/* ==========================================================================
   AMBER IRS TAX DISCLAIMER BOX
   ========================================================================== */
.irs-disclaimer-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 16px;
  border-radius: var(--radius-lg);
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  font-size: 0.81rem;
  line-height: 1.55;
  color: #f3d9a4;
}

.irs-disclaimer-box svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--amber);
}

.irs-disclaimer-box strong {
  color: #fbbf24;
}

/* ==========================================================================
   SMART CARDESK US ECOSYSTEM FUNNEL
   ========================================================================== */
.ecosystem-section {
  padding-top: 40px;
}

.ecosystem-header {
  margin-bottom: 18px;
}

.ecosystem-kicker {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 4px;
}

.ecosystem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.eco-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-color: rgba(114, 152, 255, 0.2);
}

.eco-card:hover {
  transform: translateY(-3px);
  border-color: var(--cyan-border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(56, 246, 255, 0.14);
}

.eco-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.eco-tag {
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
}

.eco-tag-free {
  color: var(--cyan);
  background: rgba(56, 246, 255, 0.14);
  border: 1px solid rgba(56, 246, 255, 0.32);
}

.eco-tag-pro {
  color: #ff8df2;
  background: rgba(255, 42, 230, 0.15);
  border: 1px solid rgba(255, 42, 230, 0.35);
}

.eco-arrow {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--magenta);
  transition: transform var(--transition-fast);
}

.eco-card:hover .eco-arrow {
  transform: translateX(4px);
}

.eco-title {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.eco-desc {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   SEO FAQ ACCORDION
   ========================================================================== */
.faq-section {
  padding-top: 40px;
}

.faq-section .section-title {
  margin-bottom: 16px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-question {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px;
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  color: var(--cyan);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.faq-item[open] {
  border-color: var(--cyan-border);
}

.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
  color: var(--magenta);
}

.faq-answer {
  padding: 12px 17px 16px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   OFFICIAL FOOTER (SAFE-AREA BOTTOM READY FOR iPHONE / iPAD)
   ========================================================================== */
.site-footer {
  position: relative;
  z-index: 2;
  padding-top: 28px;
  padding-bottom: max(32px, calc(20px + env(safe-area-inset-bottom)));
  border-top: 1px solid rgba(56, 246, 255, 0.14);
  background: rgba(3, 6, 18, 0.86);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.footer-brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 4px;
}

.footer-copy {
  font-size: 0.77rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
}

.footer-link-btn {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 4px 2px;
  transition: color var(--transition-fast);
}

.footer-link-btn:hover {
  color: var(--cyan);
}

/* ==========================================================================
   INTERACTIVE LEGAL & SETTINGS MODALS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(2, 5, 16, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 180ms ease;
}

.modal-dialog {
  width: 100%;
  max-width: 560px;
  max-height: min(86vh, 86dvh);
  display: flex;
  flex-direction: column;
  background: var(--surface-card-strong);
  border: 1px solid rgba(56, 246, 255, 0.3);
  border-radius: var(--radius-xl);
  overflow: hidden;
  animation: modalPop 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-compact {
  max-width: 420px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-secondary);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.modal-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 42, 230, 0.22);
}

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-intro {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.legal-prose {
  font-size: 0.85rem;
  line-height: 1.62;
  color: var(--text-secondary);
}

.legal-prose h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cyan);
  margin-top: 6px;
}

.legal-prose strong { color: var(--text-main); }

.legal-prose code {
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  background: rgba(56, 246, 255, 0.1);
  border-radius: 5px;
}

.contact-box {
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(6, 11, 29, 0.85);
  border: 1px solid var(--cyan-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.neon-link {
  color: var(--cyan);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-note {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 9, 24, 0.5);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ==========================================================================
   FLOATING TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  left: 50%;
  bottom: max(18px, calc(12px + env(safe-area-inset-bottom)));
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 400px);
  pointer-events: none;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  color: #ffffff;
  background: rgba(11, 18, 42, 0.96);
  border: 1px solid var(--cyan-border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 18px rgba(56, 246, 255, 0.22);
  backdrop-filter: blur(14px);
  animation: toastSlideUp 260ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
}

.toast-magenta {
  border-color: var(--magenta-border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 18px rgba(255, 42, 230, 0.26);
}

.toast-amber {
  border-color: var(--amber-border);
}

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

/* ==========================================================================
   RESPONSIVE BREAKPOINTS — TAILORED FOR EVERY SCREEN SIZE
   ========================================================================== */

/* 1. Large Phones & Landscape Phones (480px+) */
@media (min-width: 480px) {
  .container {
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }

  .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }

  .capture-actions {
    grid-template-columns: 1fr 1fr;
  }

  .kpi-card {
    padding: 16px;
  }
}

/* 2. Small Tablets & Large Phablets (640px+) */
@media (min-width: 640px) {
  .brand-pill {
    display: inline-flex;
  }

  .header-logo-dock,
  .header-car-svg {
    width: 50px;
  }

  .ecosystem-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .capture-card,
  .entry-card,
  .chart-card,
  .ledger-card {
    padding: 22px;
  }
}

/* 3. iPad Portrait & Medium Tablets (768px – 1023px) */
@media (min-width: 768px) {
  .container {
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }

  .hero-section {
    padding-top: 34px;
  }

  .section-header-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .capture-grid {
    grid-template-columns: 1fr 1.06fr;
    gap: 18px;
    align-items: stretch;
  }

  /* On iPad Portrait, keep KPI cards as a spacious, luxurious 2x2 grid */
  .kpi-grid {
    gap: 14px;
  }

  .kpi-card {
    padding: 20px;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* 4. iPad Landscape & Standard Laptops (1024px+) */
@media (min-width: 1024px) {
  .hero-section {
    padding-top: 40px;
  }

  .capture-grid {
    grid-template-columns: 1fr 1.1fr;
    gap: 22px;
  }

  .capture-card,
  .entry-card {
    padding: 24px;
  }

  .field-input {
    font-size: 0.95rem;
  }

  /* 4-column executive KPI bar on iPad Landscape & Laptops */
  .kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }

  /* 4-column sleek CarDesk US ecosystem showcase on Laptop/Desktop */
  .ecosystem-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

/* 5. Wide Laptops & Large Desktop Monitors (1400px+) */
@media (min-width: 1400px) {
  .container {
    max-width: 1220px;
  }

  .kpi-card {
    padding: 22px;
  }
}

/* Accessibility: Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
