/* ===========================================================
   Food Truck Launchpad — shared design system
   Mobile-first, dark by default, with elevated surfaces,
   subtle motion and a warm accent for food-truck character.
   =========================================================== */

:root {
  /* Brand */
  --brand-primary: #137fec;
  --brand-primary-600: #0f6bd1;
  --brand-accent: #ff6b35;       /* warm food-truck orange */
  --brand-accent-soft: #ffb38a;
  --brand-gold: #ffd23f;

  /* Status */
  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #38bdf8;

  /* Surfaces (dark, the app's default theme) */
  --bg:         #0a0f1a;
  --bg-soft:    #0f1623;
  --surface:    #131c26;
  --surface-2:  #1a242f;
  --border:     #1f2a36;
  --border-strong: #2a3645;

  /* Type */
  --fg:         #f3f6fb;
  --fg-soft:    #c3cdd9;
  --fg-muted:   #8696a9;
  --fg-dim:     #5b6a7c;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 8px 24px -8px rgba(0,0,0,.6);
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.7);
  --glow-primary: 0 0 0 1px rgba(19,127,236,.4), 0 12px 32px -8px rgba(19,127,236,.5);
  --glow-accent:  0 0 0 1px rgba(255,107,53,.45), 0 12px 32px -8px rgba(255,107,53,.55);

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-xl: 28px;
}

html.light {
  --bg:        #f5f7fa;
  --bg-soft:   #eef2f7;
  --surface:   #ffffff;
  --surface-2: #f7f9fc;
  --border:    #e3e8ef;
  --border-strong: #cdd5df;
  --fg:        #0b1220;
  --fg-soft:   #324055;
  --fg-muted:  #5b6a7c;
  --fg-dim:    #8696a9;
}

/* Base ----------------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(19,127,236,.10), transparent 60%),
              radial-gradient(900px 500px at 90% 110%, rgba(255,107,53,.08), transparent 60%),
              var(--bg);
  color: var(--fg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* App container — phone-shaped, centered on desktop -------- */
.app-shell {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 440px;
  min-height: 100dvh;
  background: var(--bg);
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.6);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Top app bar --------------------------------------------- */
.appbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 12px;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.appbar h1 {
  font-size: 17px; font-weight: 700; letter-spacing: -.01em;
  margin: 0; text-align: center; flex: 1;
}
.appbar .sub {
  display: block; text-align: center;
  font-size: 11px; color: var(--fg-muted); font-weight: 500; margin-top: 2px;
}
.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: transparent; border: none; color: var(--fg);
  transition: background .15s ease, transform .15s ease;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn:active { transform: scale(.92); }

/* Buttons ------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 14px;
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, filter .2s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #1a8df8 100%);
  box-shadow: var(--glow-primary);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-accent {
  color: white;
  background: linear-gradient(135deg, var(--brand-accent) 0%, #ff8a5b 100%);
  box-shadow: var(--glow-accent);
}
.btn-ghost {
  background: var(--surface); color: var(--fg);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-2); }
.btn-block { width: 100%; padding: 14px; border-radius: 16px; }

/* Cards --------------------------------------------------- */
.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.card-tight { padding: 16px; }

/* Pills / badges ----------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.pill-primary { background: rgba(19,127,236,.15); color: #6ab1ff; }
.pill-accent  { background: rgba(255,107,53,.15); color: #ffb38a; }
.pill-success { background: rgba(16,185,129,.15); color: #6ee7b7; }
.pill-warn    { background: rgba(245,158,11,.16); color: #fbd38d; }
.pill-danger  { background: rgba(239,68,68,.16); color: #fca5a5; }
.pill-muted   { background: var(--surface-2); color: var(--fg-muted); }

/* Progress bar ------------------------------------------- */
.bar {
  position: relative; height: 8px; width: 100%;
  border-radius: 999px; background: var(--surface-2); overflow: hidden;
}
.bar > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  border-radius: 999px; transition: width .6s cubic-bezier(.2,.7,.2,1);
}
.bar-glow > i { box-shadow: 0 0 12px rgba(19,127,236,.6); }

/* Inputs -------------------------------------------------- */
.input, .select, .textarea {
  width: 100%; padding: 12px 14px;
  background: var(--surface-2); color: var(--fg);
  border: 1px solid var(--border); border-radius: 12px;
  font-size: 14px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(19,127,236,.18);
}

/* Segmented control ------------------------------------- */
.seg {
  display: flex; padding: 4px; background: var(--surface-2);
  border-radius: 12px; gap: 4px;
}
.seg button {
  flex: 1; padding: 9px 10px; border: none; border-radius: 9px;
  background: transparent; color: var(--fg-muted);
  font-size: 12px; font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
.seg button[aria-pressed="true"] {
  background: var(--surface); color: var(--fg);
  box-shadow: 0 1px 2px rgba(0,0,0,.4);
}

/* Bottom navigation ------------------------------------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 440px; z-index: 40;
  padding: 10px 12px calc(14px + env(safe-area-inset-bottom));
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 2px; color: var(--fg-muted);
  font-size: 10px; font-weight: 600;
  border-radius: 12px;
}
.bottom-nav a .material-symbols-outlined { font-size: 22px; }
.bottom-nav a.active {
  color: var(--brand-primary);
  background: rgba(19,127,236,.1);
}
.bottom-nav a:hover { color: var(--fg); }
.bottom-nav a.active:hover { color: var(--brand-primary); }

/* Spacing util for fixed nav offset */
.has-bottom-nav { padding-bottom: 96px; }

/* Floating action --------------------------------------- */
.fab {
  position: fixed; right: 20px; bottom: 96px; z-index: 35;
  width: 56px; height: 56px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  color: white; border: none;
  background: linear-gradient(135deg, var(--brand-accent), #ff8a5b);
  box-shadow: var(--glow-accent);
  transition: transform .15s ease;
}
.fab:active { transform: scale(.94); }

/* Generic helpers --------------------------------------- */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.between { justify-content: space-between; }
.center  { justify-content: center; align-items: center; }
.mt-1{margin-top:4px}.mt-2{margin-top:8px}.mt-3{margin-top:12px}.mt-4{margin-top:16px}.mt-6{margin-top:24px}
.mb-1{margin-bottom:4px}.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.mb-4{margin-bottom:16px}.mb-6{margin-bottom:24px}
.p-3 {padding:12px}.p-4{padding:16px}.p-5{padding:20px}
.px-4{padding-left:16px;padding-right:16px}
.py-3{padding-top:12px;padding-bottom:12px}
.txt-sm{font-size:13px}.txt-xs{font-size:11px}.txt-lg{font-size:18px}.txt-xl{font-size:22px}.txt-2xl{font-size:28px}
.bold{font-weight:700}.semi{font-weight:600}
.muted{color:var(--fg-muted)}.soft{color:var(--fg-soft)}.dim{color:var(--fg-dim)}
.no-scrollbar::-webkit-scrollbar{display:none}
.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}

/* Module tiles (dashboard) ----------------------------- */
.module-tile {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 16px; min-height: 130px;
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
}
.module-tile:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.module-tile .icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(19,127,236,.12); color: #6ab1ff;
}
.module-tile.accent .icon { background: rgba(255,107,53,.14); color: var(--brand-accent-soft); }
.module-tile.gold   .icon { background: rgba(255,210,63,.15);  color: #ffe07a; }
.module-tile.green  .icon { background: rgba(16,185,129,.14); color: #6ee7b7; }
.module-tile h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.module-tile p  { margin: 2px 0 0; font-size: 12px; color: var(--fg-muted); line-height: 1.4; }

/* Decorative orb in tile */
.module-tile::after {
  content: ''; position: absolute; right: -30px; bottom: -30px;
  width: 110px; height: 110px; border-radius: 999px;
  background: radial-gradient(circle, rgba(19,127,236,.16), transparent 70%);
  pointer-events: none;
}
.module-tile.accent::after { background: radial-gradient(circle, rgba(255,107,53,.18), transparent 70%); }
.module-tile.gold::after   { background: radial-gradient(circle, rgba(255,210,63,.18),  transparent 70%); }
.module-tile.green::after  { background: radial-gradient(circle, rgba(16,185,129,.16), transparent 70%); }

/* Section headers -------------------------------------- */
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 16px 8px;
}
.section-title h2 {
  font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin: 0;
}
.section-title a { color: var(--brand-primary); font-size: 13px; font-weight: 600; }

/* Animations ------------------------------------------- */
@keyframes pop {
  0% { transform: scale(.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.anim-pop { animation: pop .35s cubic-bezier(.2,.7,.2,1) both; }
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  background-size: 200% 100%;
  animation: shimmer 2.2s linear infinite;
}

/* Toast ------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%);
  background: var(--surface-2); color: var(--fg);
  border: 1px solid var(--border-strong);
  padding: 10px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; z-index: 60;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

/* Color swatch (paint shop) ---------------------------- */
.swatch {
  width: 44px; height: 44px; border-radius: 14px; cursor: pointer;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 6px 14px -6px rgba(0,0,0,.5);
  transition: transform .15s ease, border-color .15s ease;
  position: relative;
}
.swatch:hover { transform: translateY(-2px); }
.swatch[aria-pressed="true"] {
  border-color: white;
  box-shadow: 0 0 0 3px var(--brand-primary), 0 8px 22px -6px rgba(0,0,0,.6);
}
.swatch[aria-pressed="true"]::after {
  content: 'check'; font-family: 'Material Symbols Outlined';
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: white; font-size: 22px; mix-blend-mode: difference;
}

/* Custom range slider ---------------------------------- */
input[type=range].slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px; outline: none;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
}
input[type=range].slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 999px;
  background: white; border: 3px solid var(--brand-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,.4); cursor: pointer;
}
input[type=range].slider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 999px;
  background: white; border: 3px solid var(--brand-primary);
  box-shadow: 0 4px 12px rgba(0,0,0,.4); cursor: pointer;
}

/* Tabs (horizontal scroll) ------------------------------ */
.tabs {
  display: flex; gap: 6px; overflow-x: auto; padding: 6px 14px 12px;
}
.tabs button {
  flex-shrink: 0;
  padding: 9px 14px; border-radius: 999px;
  background: var(--surface); color: var(--fg-soft);
  border: 1px solid var(--border);
  font-size: 12px; font-weight: 600;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tabs button[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--brand-primary), #1a8df8);
  color: white; border-color: transparent;
}

/* List rows -------------------------------------------- */
.row-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 16px;
  transition: transform .12s ease, border-color .15s ease;
}
.row-item:active { transform: scale(.99); }
.row-item .leading {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: white;
}

/* Cost ticker ------------------------------------------ */
.cost-strip {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; margin: 0 14px;
  background: linear-gradient(135deg, rgba(19,127,236,.15), rgba(255,107,53,.12));
  border: 1px solid var(--border);
  border-radius: 16px;
}
.cost-strip .label { font-size: 11px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.cost-strip .value { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }

/* Decorative truck silhouette gradient stops ------------ */
.truck-glow {
  filter: drop-shadow(0 18px 24px rgba(0,0,0,.5));
}
