/*
 * AssetWire.pro – app stylesheet. Plain CSS, no build step.
 * Dark, mobile-first "app" design: top bar + bottom tab bar on phones,
 * sidebar on desktop. Every screen is designed for 360 px first.
 */

/* ======================================================================
   1. Tokens
   ====================================================================== */
:root {
  color-scheme: dark;

  --bg: #060b18;
  --bg-2: #08101f;
  --surface: #0d1730;
  --surface-2: #122042;
  --surface-3: #182a52;
  --glass: rgba(13, 23, 48, .78);
  --line: rgba(120, 160, 255, .12);
  --line-strong: rgba(120, 160, 255, .26);

  --text: #e8eefc;
  --text-2: #b3c1e0;
  --muted: #7d8db0;

  --primary: #2b8cff;
  --primary-2: #1fc0ff;
  --primary-soft: rgba(43, 140, 255, .14);
  --primary-glow: rgba(43, 140, 255, .38);
  --grad: linear-gradient(135deg, #2b8cff 0%, #1fc0ff 100%);
  --grad-deep: linear-gradient(160deg, #0f2350 0%, #0a1430 60%, #081024 100%);

  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, .14);
  --warning: #f5a524;
  --warning-soft: rgba(245, 165, 36, .14);
  --danger: #f04461;
  --danger-soft: rgba(240, 68, 97, .14);
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, .14);
  --violet: #8b7bff;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .5);
  --ring: 0 0 0 3px rgba(43, 140, 255, .35);

  --topbar-h: 60px;
  --tabbar-h: 68px;
  --sidebar-w: 248px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Legacy names still used in a few templates */
  --spacing-xs: .25rem; --spacing-sm: .5rem; --spacing-md: 1rem; --spacing-lg: 1.5rem; --spacing-xl: 2rem; --spacing-2xl: 3rem;
  --font-size-sm: .875rem; --font-size-lg: 1.125rem; --font-size-2xl: 1.5rem;
  --danger-red: var(--danger); --warning-amber: var(--warning); --primary-blue: var(--primary); --neutral-dark: var(--text);
}

/* ======================================================================
   2. Base
   ====================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 80% -10%, rgba(43, 140, 255, .10), transparent 60%),
                    radial-gradient(900px 500px at -10% 10%, rgba(31, 192, 255, .06), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; } h4 { font-size: .95rem; }
p { margin: 0 0 .75rem; }
a { color: var(--primary-2); text-decoration: none; }
a:hover { color: #6fd6ff; }
img, svg { max-width: 100%; }
img { display: block; }
.i { flex-shrink: 0; vertical-align: middle; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
small, .small { font-size: .86rem; color: var(--text-2); }
.tiny { font-size: .76rem; color: var(--muted); }
.muted { color: var(--muted) !important; }
.mono { font-family: var(--mono); font-size: .9em; letter-spacing: .01em; }
.lead { font-size: 1.05rem; color: var(--text-2); }
.eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--primary-2); font-weight: 600; margin-bottom: .3rem; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; } .text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; } .mt-0 { margin-top: 0 !important; }
.mt-lg { margin-top: 1.25rem !important; } .mb-lg { margin-bottom: 1.25rem !important; }
.mt-sm { margin-top: .5rem !important; } .mb-sm { margin-bottom: .5rem !important; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: .75rem; }
.row-wrap { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.stack > * + * { margin-top: .75rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 1000; background: var(--primary); color: #fff; padding: .5rem 1rem; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
.hide-mobile { display: none !important; }
@media (min-width: 900px) { .hide-mobile { display: initial !important; } .hide-desktop { display: none !important; } }
.money { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.money-positive { color: var(--success); }
.text-success { color: var(--success); } .text-warning { color: var(--warning); } .text-danger { color: var(--danger); } .text-primary { color: var(--primary-2); }
.fade-in { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); } 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ======================================================================
   3. App shell: top bar, sidebar, bottom tab bar
   ====================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 50; height: calc(var(--topbar-h) + var(--safe-top)); padding-top: var(--safe-top);
  background: rgba(6, 11, 24, .82); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { height: var(--topbar-h); display: flex; align-items: center; gap: .5rem; padding: 0 16px; max-width: 1440px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.12rem; letter-spacing: -.03em; color: var(--text); }
.brand:hover { color: var(--text); }
.brand b { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 18px var(--primary-glow); }
.topbar-title { font-weight: 700; font-size: 1.05rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center;
  color: var(--text-2); background: transparent; border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.solid { background: var(--surface); border-color: var(--line); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.topbar .back { margin-left: -8px; }
.nav-link { color: var(--text-2); font-weight: 500; padding: .5rem .75rem; border-radius: 10px; font-size: .92rem; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.lang-switch { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.lang-switch a { padding: .2rem .5rem; border-radius: 8px; font-size: .75rem; font-weight: 600; color: var(--muted); }
.lang-switch a.active { background: var(--surface-3); color: var(--text); }
.avatar-btn { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }

.shell { display: block; }
.sidebar { display: none; }
.main { padding: 16px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 24px); max-width: 1180px; margin: 0 auto; min-width: 0; }
.guest .main { padding-bottom: 32px; max-width: none; padding-left: 0; padding-right: 0; }

/* Bottom tab bar (phones / tablets) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(8, 14, 30, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: .68rem; font-weight: 600; position: relative; }
.tab:hover { color: var(--text-2); }
.tab.active { color: var(--primary-2); }
.tab.active::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad); }
.tab .dot { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: .62rem; display: grid; place-items: center; }
.tab-fab { margin-top: -22px; }
.tab-fab span.fab { width: 50px; height: 50px; border-radius: 16px; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px var(--primary-glow); border: 4px solid var(--bg); }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h));
    overflow-y: auto; padding: 18px 12px; border-right: 1px solid var(--line); background: rgba(8, 14, 30, .6);
  }
  .main { padding: 28px 32px 48px; width: 100%; }
  .tabbar { display: none; }
}
.side-heading { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; padding: 14px 12px 6px; }
.side-link { display: flex; align-items: center; gap: .7rem; padding: .62rem .75rem; border-radius: 12px; color: var(--text-2); font-weight: 500; font-size: .92rem; }
.side-link:hover { background: var(--surface); color: var(--text); }
.side-link.active { background: var(--primary-soft); color: #fff; box-shadow: inset 3px 0 0 var(--primary); }
.side-link.active .i { color: var(--primary-2); }
.side-link .count { margin-left: auto; background: var(--danger); color: #fff; font-size: .68rem; border-radius: 9px; padding: 0 6px; font-weight: 700; }
.side-foot { margin-top: auto; padding: 12px; }

/* Full-screen screens (map, chat, navigation) */
.screen-full .main { max-width: none; padding: 0; }
.screen-full footer.site-footer { display: none; }
@media (min-width: 900px) { .screen-full .main { padding: 0; } }

/* Account menu (details/summary dropdown, no JS needed) */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 80; }
.menu-panel a, .menu-panel button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .6rem .7rem; border-radius: 10px; color: var(--text-2); background: none; border: 0; font: inherit; font-size: .9rem; cursor: pointer; text-align: left; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); color: var(--text); }
.menu-head { padding: .6rem .7rem .7rem; border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* Footer (guests) */
footer.site-footer { border-top: 1px solid var(--line); padding: 32px 16px calc(32px + var(--safe-bottom)); color: var(--muted); font-size: .86rem; }
.footer-grid { max-width: 1180px; margin: 0 auto; display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-section h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-2); }
.footer-section a { display: block; color: var(--muted); padding: .15rem 0; }
.footer-section a:hover { color: var(--text); }
.footer-bottom { max-width: 1180px; margin: 24px auto 0; padding-top: 16px; border-top: 1px solid var(--line); }
.authed footer.site-footer { display: none; }

/* ======================================================================
   4. Page heading
   ====================================================================== */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head p { margin: .25rem 0 0; color: var(--text-2); }
.page-head-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.greeting h1 { font-size: 1.55rem; }
.greeting p { color: var(--text-2); margin: .1rem 0 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 22px 0 10px; font-size: 1rem; font-weight: 700; }
.section-title a { font-size: .84rem; font-weight: 600; }

/* ======================================================================
   5. Surfaces: panels, cards, list rows
   ====================================================================== */
.panel, .card {
  background: linear-gradient(180deg, rgba(20, 34, 68, .75), rgba(13, 23, 48, .85));
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset;
}
@media (min-width: 700px) { .panel, .card { padding: 20px; } }
.panel-flush { padding: 0 !important; overflow: hidden; }
.panel-highlight { border-color: rgba(43, 140, 255, .45); box-shadow: 0 0 0 1px rgba(43, 140, 255, .15), 0 12px 40px rgba(43, 140, 255, .12); }
.panel-title { display: flex; align-items: center; gap: .55rem; font-size: 1rem; margin-bottom: 12px; }
.panel-title .i { color: var(--primary-2); }
.panel-title .badge { margin-left: auto; }
.card-link { display: block; color: inherit; transition: border-color .15s, transform .15s; }
.card-link:hover { color: inherit; border-color: var(--line-strong); }
.card-link:active { transform: scale(.99); }

.list { display: flex; flex-direction: column; gap: 10px; }
.list-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
a.list-row:hover { border-color: var(--line-strong); color: inherit; background: var(--surface-2); }
.list-row .chev { color: var(--muted); }
.list-row strong { display: block; font-weight: 600; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .sub { font-size: .8rem; color: var(--muted); }
.list-row.unread { border-color: rgba(43, 140, 255, .4); background: linear-gradient(90deg, rgba(43, 140, 255, .1), var(--surface) 40%); }
.list-plain .list-row { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 2px; }
.list-plain .list-row:last-child { border-bottom: 0; }

.ico {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--primary-soft); color: var(--primary-2); border: 1px solid rgba(43, 140, 255, .2);
}
.ico.sm { width: 34px; height: 34px; border-radius: 10px; }
.ico.lg { width: 52px; height: 52px; border-radius: 16px; }
.ico.success { background: var(--success-soft); color: var(--success); border-color: rgba(34, 197, 94, .25); }
.ico.warning { background: var(--warning-soft); color: var(--warning); border-color: rgba(245, 165, 36, .25); }
.ico.danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(240, 68, 97, .25); }
.ico.neutral { background: var(--surface-2); color: var(--text-2); border-color: var(--line); }
.thumb { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: var(--surface-2); flex-shrink: 0; }

.empty-state { text-align: center; padding: 36px 16px; color: var(--text-2); }
.empty-state .icon { font-size: 2rem; margin-bottom: .5rem; display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--surface-2); color: var(--primary-2); }
.empty-state h3 { margin-top: .5rem; }

/* ======================================================================
   6. Buttons, chips, segmented controls
   ====================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: .65rem 1.15rem; border-radius: 14px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.1; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .1s, box-shadow .15s, background .15s, border-color .15s, opacity .15s; user-select: none;
}
.btn:active { transform: scale(.98); }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(43, 140, 255, .32); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 28px rgba(43, 140, 255, .45); }
.btn-light, .btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
.btn-light:hover, .btn-secondary:hover { background: var(--surface-3); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); border-color: var(--line-strong); }
.btn-success { background: linear-gradient(135deg, #16a34a, #22c55e); color: #fff; box-shadow: 0 8px 22px rgba(34, 197, 94, .25); }
.btn-success:hover { color: #fff; }
.btn-danger { background: var(--danger-soft); color: #ff8aa0; border-color: rgba(240, 68, 97, .35); }
.btn-danger:hover { background: rgba(240, 68, 97, .25); color: #fff; }
.btn-sm { min-height: 36px; padding: .4rem .8rem; font-size: .84rem; border-radius: 11px; }
.btn-lg { min-height: 54px; font-size: 1.02rem; border-radius: 16px; padding: .8rem 1.4rem; }
.btn-block { width: 100%; }
.btn-icon { width: 46px; padding: 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--primary-2); cursor: pointer; }
.inline-form { display: inline; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; margin-bottom: 14px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; padding: .45rem .9rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: .84rem; font-weight: 600;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(43, 140, 255, .3); }
.chip .n { background: rgba(255, 255, 255, .18); border-radius: 999px; padding: 0 .4rem; font-size: .72rem; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; }
.segmented a, .segmented button, .segmented label { display: flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem .5rem; border-radius: 11px; color: var(--text-2); font-weight: 600; font-size: .86rem; background: none; border: 0; cursor: pointer; font-family: inherit; }
.segmented .active, .segmented input:checked + span { background: var(--surface-3); color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.segmented label { position: relative; padding: 0; }
.segmented label input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label span { display: flex; align-items: center; justify-content: center; gap: .4rem; width: 100%; padding: .55rem .5rem; border-radius: 11px; }

/* Legacy tabs */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.tabs a { white-space: nowrap; padding: .45rem .9rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: .84rem; font-weight: 600; }
.tabs a.active, .tabs a[aria-current] { background: var(--grad); color: #fff; border-color: transparent; }

/* ======================================================================
   7. Badges, status, progress
   ====================================================================== */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.badge-info, .badge-primary { background: var(--primary-soft); color: #7cc4ff; border-color: rgba(43, 140, 255, .3); }
.badge-success { background: var(--success-soft); color: #6ee7a0; border-color: rgba(34, 197, 94, .3); }
.badge-pending, .badge-warning { background: var(--warning-soft); color: #ffc66b; border-color: rgba(245, 165, 36, .3); }
.badge-danger { background: var(--danger-soft); color: #ff8aa0; border-color: rgba(240, 68, 97, .3); }
.badge-neutral { background: var(--surface-2); color: var(--muted); }
.badge-live { background: var(--success-soft); color: #6ee7a0; border-color: rgba(34, 197, 94, .35); }
.badge-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
.badge-off { background: var(--surface-2); color: var(--muted); }
.badge-off::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.step-badge { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; font-size: .8rem; }

.progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--grad); border-radius: 3px; transition: width .4s; }

/* Booked → Picked up → In transit → Delivered */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; margin: 6px 0 2px; padding: 0; list-style: none; }
.steps::before { content: ''; position: absolute; left: 12.5%; right: 12.5%; top: 9px; height: 2px; background: var(--surface-3); }
.steps .bar { position: absolute; left: 12.5%; top: 9px; height: 2px; background: var(--success); max-width: 75%; }
.steps li { position: relative; text-align: center; font-size: .7rem; color: var(--muted); font-weight: 600; }
.steps li::before { content: ''; display: block; width: 20px; height: 20px; margin: 0 auto 6px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--surface-3); position: relative; z-index: 1; }
.steps li.done { color: var(--success); }
.steps li.done::before { background: var(--success); border-color: var(--success); box-shadow: inset 0 0 0 4px var(--bg); }
.steps li.current { color: var(--primary-2); }
.steps li.current::before { background: var(--primary); border-color: var(--primary-2); box-shadow: 0 0 0 4px rgba(43, 140, 255, .2), inset 0 0 0 4px var(--bg); }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 26px; }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--surface-3); }
.timeline li::after { content: ''; position: absolute; left: 10px; top: 18px; bottom: -2px; width: 2px; background: var(--surface-2); }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--success); border-color: var(--success); }
.timeline li.current::before { background: var(--primary-2); border-color: var(--primary-2); box-shadow: 0 0 0 4px rgba(43, 140, 255, .2); }
.timeline strong { display: block; font-size: .9rem; font-weight: 600; }
.timeline time { font-size: .78rem; color: var(--muted); }

/* ======================================================================
   8. Forms
   ====================================================================== */
.field { margin-bottom: 14px; }
.field > label, .label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=datetime-local],
input[type=search], input[type=url], input:not([type]), select, textarea {
  width: 100%; min-height: 48px; padding: .7rem .9rem; font: inherit; font-size: 16px; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 13px; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237d8db0' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; padding-right: 2.4rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: #55648a; }
input[type=file] { width: 100%; padding: .6rem; border: 1px dashed var(--line-strong); border-radius: 13px; background: var(--bg-2); color: var(--text-2); font-size: .85rem; }
input[type=file]::file-selector-button { background: var(--surface-3); color: var(--text); border: 0; padding: .45rem .8rem; border-radius: 9px; margin-right: .7rem; font: inherit; font-weight: 600; cursor: pointer; }
input[type=range] { width: 100%; accent-color: var(--primary); }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 18px; height: 18px; }
.is-invalid { border-color: var(--danger) !important; }
.field-error { color: #ff8aa0; font-size: .8rem; margin-top: 5px; }
.field-hint { color: var(--muted); font-size: .78rem; margin-top: 5px; }
.form-row { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } .form-row.three { grid-template-columns: 1fr 1fr 1fr; } }
.form-row.compact-2 { grid-template-columns: 1fr 1fr; }
.form-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
.form-section-title { font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 18px 0 10px; font-weight: 700; }
.check { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; color: var(--text-2); font-size: .92rem; }
.check input { margin-top: 2px; }
.input-icon { position: relative; }
.input-icon .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 2.6rem; }
.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 14px; }
.filter-bar > * { flex: 1 1 160px; }
.filter-bar .btn { flex: 0 0 auto; }
.geo-status { font-size: .78rem; margin-top: 4px; color: var(--muted); }
.geo-status.ok { color: var(--success); } .geo-status.warn { color: var(--warning); }

/* Big choice tiles (radio) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; height: 100%; padding: .75rem .85rem; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line-strong); color: var(--text-2); font-weight: 600; font-size: .88rem; transition: all .15s; }
.choice > span small { display: block; font-weight: 400; color: var(--muted); font-size: .76rem; }
.choice > span .i { color: var(--primary-2); }
.choice:hover > span { border-color: var(--primary); }
.choice input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: #fff; box-shadow: 0 0 0 1px var(--primary) inset; }
.choice input:focus-visible + span { box-shadow: var(--ring); }
.choice input:disabled + span { opacity: .4; }

/* "From / To / Item / Weight" rows like a native form */
.form-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 14px; }
.form-list .fl-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.form-list .fl-row:last-child { border-bottom: 0; }
.form-list .fl-row > .i { color: var(--muted); }
.form-list .fl-row label { display: block; font-size: .72rem; color: var(--muted); font-weight: 600; margin: 0; }
.form-list .fl-row input, .form-list .fl-row select { min-height: 32px; padding: .2rem 0; border: 0; background: transparent; border-radius: 0; box-shadow: none; font-weight: 500; }
.form-list .fl-row input:focus, .form-list .fl-row select:focus { box-shadow: none; }
.form-list .fl-row:focus-within { background: rgba(43, 140, 255, .06); }

/* Big PIN input */
.pin-input { font-family: var(--mono); font-size: 1.6rem !important; letter-spacing: .6em; text-align: center; font-weight: 700; }

/* Toggle switch (online/offline) */
.switch { position: relative; display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 52px; height: 30px; border-radius: 15px; background: var(--surface-3); position: relative; transition: background .2s; border: 1px solid var(--line-strong); }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.switch input:checked + .track { background: var(--success); border-color: var(--success); }
.switch input:checked + .track::after { transform: translateX(22px); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }

/* ======================================================================
   9. Alerts & toasts
   ====================================================================== */
.alert { display: flex; align-items: flex-start; gap: .7rem; padding: .85rem 1rem; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid; font-size: .92rem; }
.alert p { margin: 0; flex: 1; }
.alert ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.alert-success { background: var(--success-soft); border-color: rgba(34, 197, 94, .35); color: #bff5d3; }
.alert-error { background: var(--danger-soft); border-color: rgba(240, 68, 97, .35); color: #ffd0d9; }
.alert-warning { background: var(--warning-soft); border-color: rgba(245, 165, 36, .35); color: #ffe2b3; }
.alert-info { background: var(--info-soft); border-color: rgba(56, 189, 248, .35); color: #cdeeff; }
.alert-dismiss { background: none; border: 0; color: inherit; opacity: .7; font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 .2rem; }

.toast-stack { position: fixed; z-index: 200; left: 12px; right: 12px; top: calc(var(--safe-top) + 10px); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
@media (min-width: 700px) { .toast-stack { left: auto; width: 380px; right: 20px; top: 76px; } }
.toast { pointer-events: auto; display: flex; gap: .75rem; align-items: center; padding: .8rem .9rem; border-radius: 16px; background: rgba(18, 32, 66, .97); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); color: var(--text); animation: toast-in .3s ease both; }
.toast strong { display: block; font-size: .92rem; }
.toast span { font-size: .82rem; color: var(--text-2); }
.toast .emoji { font-size: 1.4rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px) scale(.98); } to { opacity: 1; transform: none; } }

/* ======================================================================
   10. Stats & tiles
   ====================================================================== */
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (min-width: 900px) { .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .stats-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stats-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.stat-label { font-size: .74rem; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-hint, .stat-change { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.stat-card.green .stat-value { color: #6ee7a0; } .stat-card.teal .stat-value { color: #67e8f9; } .stat-card.amber .stat-value { color: #ffc66b; }
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-strip > div { padding: 12px 10px; text-align: left; }
.stat-strip > div + div { border-left: 1px solid var(--line); }
.stat-strip .stat-value { font-size: 1.25rem; }

/* Home action tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; text-align: center; padding: 14px 8px; min-height: 96px; border-radius: 18px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); color: var(--text); font-size: .8rem; font-weight: 600; line-height: 1.2; }
.tile:hover { border-color: rgba(43, 140, 255, .45); color: #fff; }
.tile .i { width: 30px; height: 30px; color: var(--primary-2); filter: drop-shadow(0 4px 10px rgba(43, 140, 255, .45)); }

/* Search pill ("Wohin soll es gehen?") */
.search-pill { display: flex; align-items: center; gap: .7rem; padding: 0 16px; min-height: 54px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--muted); margin: 14px 0; }
.search-pill:hover { color: var(--text-2); border-color: var(--primary); }
.search-pill span { flex: 1; }

/* ======================================================================
   11. Data tables
   ====================================================================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(43, 140, 255, .04); }
.row-link { color: var(--text); font-weight: 600; }
@media (max-width: 699px) {
  .data-table.responsive thead { display: none; }
  .data-table.responsive tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .data-table.responsive td { display: flex; justify-content: space-between; gap: 1rem; padding: 4px 0; border: 0; }
  .data-table.responsive td::before { content: attr(data-label); color: var(--muted); font-size: .78rem; }
}

/* Key / value */
.kv { display: grid; grid-template-columns: minmax(90px, auto) 1fr; gap: 8px 16px; margin: 0; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; color: var(--text); overflow-wrap: anywhere; }

/* ======================================================================
   12. Layout grids
   ====================================================================== */
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-main-side { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .grid-main-side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ======================================================================
   13. Maps
   ====================================================================== */
.map { position: relative; background: #0b1530; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); min-height: 220px; isolation: isolate; }
.map.h-sm { height: 180px; } .map.h-md { height: 280px; } .map.h-lg { height: 420px; }
.route-map { height: 260px; border-radius: var(--radius); overflow: hidden; background: #0b1530; position: relative; }
.route-map-lg { height: 360px; }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: .88rem; padding: 1rem; z-index: 1; }
.map-dark .leaflet-tile-pane { filter: invert(1) hue-rotate(195deg) brightness(.82) contrast(.92) saturate(.55); }
.leaflet-container { background: #0b1530 !important; font-family: var(--font) !important; }
.leaflet-control-attribution { background: rgba(6, 11, 24, .7) !important; color: var(--muted) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: var(--text-2) !important; }
.leaflet-bar a { background: var(--surface) !important; color: var(--text) !important; border-color: var(--line) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface-2) !important; color: var(--text) !important; box-shadow: var(--shadow) !important; }
.leaflet-popup-content-wrapper { border-radius: 14px !important; border: 1px solid var(--line-strong); }
.leaflet-popup-content { margin: 12px 14px !important; font-size: .86rem; line-height: 1.4; }
.leaflet-popup-content a { color: var(--primary-2); font-weight: 600; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted) !important; }
.pin-dot { width: 16px; height: 16px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(43, 140, 255, .35), 0 4px 10px rgba(0, 0, 0, .5); }
.pin-dot.a { background: var(--primary); } .pin-dot.b { background: var(--success); box-shadow: 0 0 0 4px rgba(34, 197, 94, .3), 0 4px 10px rgba(0, 0, 0, .5); }
.pin-car { width: 34px; height: 34px; border-radius: 50%; background: var(--grad); border: 3px solid #fff; display: grid; place-items: center; color: #fff; box-shadow: 0 0 0 8px rgba(43, 140, 255, .25), 0 6px 14px rgba(0, 0, 0, .5); }
.pin-me { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--primary); box-shadow: 0 0 0 10px rgba(43, 140, 255, .2); }
.pin-job { padding: 3px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--primary); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; box-shadow: 0 4px 10px rgba(0, 0, 0, .5); transform: translate(-50%, -50%); display: inline-block; }
.pin-job.listing { border-color: var(--warning); }
.map-overlay { position: absolute; z-index: 500; }
.map-overlay.tl { top: 12px; left: 12px; } .map-overlay.tr { top: 12px; right: 12px; } .map-overlay.bl { bottom: 12px; left: 12px; }
.map-legend { background: var(--glass); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: .74rem; color: var(--text-2); display: flex; flex-direction: column; gap: 4px; }
.map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* Full-screen map with a bottom sheet (tracking, navigation, network map) */
.map-screen { position: relative; height: calc(100vh - var(--topbar-h) - var(--safe-top) - var(--tabbar-h) - var(--safe-bottom)); height: calc(100dvh - var(--topbar-h) - var(--safe-top) - var(--tabbar-h) - var(--safe-bottom)); min-height: 420px; }
@media (min-width: 900px) { .map-screen { height: calc(100vh - var(--topbar-h)); } }
.map-screen > .map { position: absolute; inset: 0; border-radius: 0; border: 0; }
.sheet {
  position: absolute; z-index: 600; left: 0; right: 0; bottom: 0; max-height: 68%; overflow-y: auto;
  background: rgba(10, 18, 40, .97); backdrop-filter: blur(16px); border-top: 1px solid var(--line-strong);
  border-radius: 24px 24px 0 0; padding: 10px 16px 16px; box-shadow: 0 -20px 50px rgba(0, 0, 0, .5);
}
.sheet::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 0 auto 12px; }
@media (min-width: 900px) { .sheet { left: 20px; right: auto; bottom: 20px; width: 400px; max-height: calc(100% - 40px); border-radius: 22px; border: 1px solid var(--line-strong); } .sheet::before { display: none; } }
.sheet-top { position: absolute; z-index: 600; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; align-items: center; }
.sheet-top .chips { margin: 0; }

/* Heat legend dots */
.heat-high { background: #f04461; } .heat-mid { background: #f5a524; } .heat-low { background: #22c55e; }

/* ======================================================================
   14. Product components
   ====================================================================== */
/* Courier / person card */
.person { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0; font-weight: 700; font-size: .95rem; color: #fff; background: linear-gradient(135deg, #3b6fd8, #1fc0ff); border: 2px solid rgba(255, 255, 255, .12); }
.avatar-sm { width: 34px; height: 34px; font-size: .78rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; }
.avatar-xl { width: 92px; height: 92px; font-size: 1.8rem; box-shadow: 0 0 0 4px rgba(43, 140, 255, .25); }
.avatar.online { box-shadow: 0 0 0 3px var(--success); }
.rating { color: #ffc66b; font-weight: 700; font-size: .84rem; white-space: nowrap; }
.verified { color: var(--success); font-size: .8rem; font-weight: 600; display: inline-flex; align-items: center; gap: .25rem; }
.plate { font-family: var(--mono); font-size: .78rem; padding: .1rem .45rem; border-radius: 6px; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line-strong); }

/* Route (Zürich → Winterthur) */
.route { display: flex; align-items: center; gap: .45rem; font-weight: 700; min-width: 0; }
.route span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route .i { color: var(--primary-2); }
.route-v { position: relative; padding-left: 22px; }
.route-v::before { content: ''; position: absolute; left: 6px; top: 12px; bottom: 12px; width: 2px; background: repeating-linear-gradient(var(--surface-3) 0 4px, transparent 4px 8px); }
.route-v .stop { position: relative; padding: 4px 0; }
.route-v .stop::before { content: ''; position: absolute; left: -20px; top: 9px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px rgba(43, 140, 255, .25); }
.route-v .stop.b::before { background: var(--success); box-shadow: 0 0 0 3px rgba(34, 197, 94, .25); border-radius: 3px; }
.route-v .stop small { display: block; font-size: .72rem; color: var(--muted); }

/* Job card */
.job-card { display: block; padding: 14px; border-radius: var(--radius-lg); background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); color: inherit; margin-bottom: 10px; }
.job-card:hover { border-color: var(--line-strong); color: inherit; }
.job-card.next { border-color: rgba(43, 140, 255, .5); box-shadow: 0 10px 34px rgba(43, 140, 255, .14); }
.job-card.no-fit { opacity: .62; }
.job-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.job-meta { display: flex; flex-wrap: wrap; gap: .35rem .8rem; color: var(--muted); font-size: .8rem; margin-top: 6px; }
.job-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.job-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.job-price { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.job-route { font-weight: 700; }
.job-list { display: flex; flex-direction: column; }

/* Instant options ("CHF 18 – 2 h 15 min – Velo") */
.option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); margin-bottom: 8px; }
.option.best { border-color: rgba(43, 140, 255, .55); background: linear-gradient(90deg, rgba(43, 140, 255, .1), var(--surface) 60%); }
.option .price { font-size: 1.15rem; font-weight: 800; white-space: nowrap; }
.option .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.offer { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.offer:last-child { border-bottom: 0; }
.offer.is-muted { opacity: .55; }
.offer-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-soft); font-size: 1.2rem; }
.offer-price { font-weight: 800; font-size: 1.1rem; text-align: right; white-space: nowrap; }
.offer-actions { display: flex; gap: 6px; margin-top: 6px; justify-content: flex-end; }
.pay-options { display: grid; gap: 8px; }

/* PIN box for the customer */
.pins { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pin-box { text-align: center; padding: 12px; border-radius: var(--radius); background: var(--bg-2); border: 1px dashed var(--line-strong); }
.pin-box .code { font-family: var(--mono); font-size: 1.7rem; font-weight: 800; letter-spacing: .25em; color: #fff; }
.pin-box .tiny { display: block; }

/* Navigation buttons */
.nav-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nav-apps a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-size: .76rem; font-weight: 600; }
.nav-apps a:hover { border-color: var(--primary); color: #fff; }
.nav-apps .logo { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: .8rem; }
.nav-apps .g { background: linear-gradient(135deg, #34a853, #4285f4); } .nav-apps .a { background: linear-gradient(135deg, #6b7280, #111827); } .nav-apps .w { background: linear-gradient(135deg, #33ccff, #0099dd); }

/* ETA banner */
.eta { display: flex; align-items: center; gap: .6rem; color: var(--success); font-weight: 700; font-size: .92rem; }
.eta.soon { color: var(--warning); }

/* Online toggle card */
.online-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; }
.online-card.is-online { border-color: rgba(34, 197, 94, .45); background: linear-gradient(90deg, rgba(34, 197, 94, .1), var(--surface) 70%); }

/* Earnings bars */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .bar i { display: block; width: 100%; max-width: 30px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #1fc0ff, #1f5fd8); min-height: 3px; }
.bars .bar.today i { background: linear-gradient(180deg, #6ee7ff, #2b8cff); box-shadow: 0 0 18px rgba(31, 192, 255, .5); }
.bars .bar.zero i { background: var(--surface-3); }
.bars .bar span { font-size: .68rem; color: var(--muted); }
.big-money { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* Chat */
.chat-screen { display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h) - var(--safe-top)); height: calc(100dvh - var(--topbar-h) - var(--safe-top)); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.chat-context { align-self: center; font-size: .74rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .8rem; margin-bottom: 6px; }
.bubble { max-width: 80%; padding: .6rem .85rem; border-radius: 18px; font-size: .94rem; line-height: 1.4; position: relative; overflow-wrap: anywhere; }
.bubble.them { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 6px; }
.bubble img { border-radius: 12px; max-width: 220px; margin: 2px 0 4px; }
.bubble time { display: block; font-size: .66rem; opacity: .7; text-align: right; margin-top: 2px; }
.chat-input { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px calc(10px + var(--safe-bottom)); border-top: 1px solid var(--line); background: var(--bg-2); }
.chat-input textarea { min-height: 46px; max-height: 120px; border-radius: 23px; padding: .7rem 1rem; resize: none; }
.chat-input .attach { position: relative; overflow: hidden; }
.chat-input .attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.chat-screen-wrap .tabbar { display: none; }

/* Notifications */
.notification-list { display: flex; flex-direction: column; gap: 10px; }
.n-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); font-size: 1.1rem; flex-shrink: 0; }
.n-text { flex: 1; min-width: 0; }

/* Profile */
.profile-hero { text-align: center; padding: 10px 0 4px; }
.profile-hero .avatar { margin: 0 auto 10px; }
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.checklist li .tick { margin-left: auto; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.checklist li.ok .tick { background: var(--success); color: #fff; }

/* Photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.photo-grid figure { margin: 0; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }

/* GPS share box */
.gps-box { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); }
.gps-box .btn.active { background: var(--success); color: #fff; border-color: var(--success); }

/* ======================================================================
   15. Landing page (guests)
   ====================================================================== */
.hero { position: relative; padding: 36px 16px 28px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 300px at 70% 0%, rgba(43, 140, 255, .25), transparent 70%), radial-gradient(500px 300px at 0% 100%, rgba(31, 192, 255, .12), transparent 70%); z-index: -1; }
.hero-inner { max-width: 1180px; margin: 0 auto; display: grid; gap: 28px; align-items: center; }
@media (min-width: 980px) { .hero { padding: 64px 32px 48px; } .hero-inner { grid-template-columns: 1.05fr .95fr; } }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.05; letter-spacing: -.04em; margin-bottom: 14px; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.08rem; max-width: 34rem; }
.cta-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.quick-quote { background: rgba(13, 23, 48, .85); border: 1px solid var(--line-strong); border-radius: var(--radius-xl); padding: 18px; box-shadow: var(--shadow-lg); }
.quick-quote h2 { font-size: 1.1rem; }
.live-counter { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .85rem; border-radius: 999px; background: var(--success-soft); border: 1px solid rgba(34, 197, 94, .35); color: #9ff0bf; font-size: .82rem; font-weight: 600; margin-bottom: 14px; }
.live-counter::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
.section { max-width: 1180px; margin: 0 auto; padding: 28px 16px; }
@media (min-width: 980px) { .section { padding: 44px 32px; } }
.section h2 { font-size: 1.45rem; letter-spacing: -.03em; }
.section-sub { color: var(--text-2); margin-bottom: 18px; }
.open-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .open-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .open-grid { grid-template-columns: 1fr 1fr 1fr; } }
.feature-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (min-width: 980px) { .feature-grid { grid-template-columns: repeat(6, 1fr); } }
.feature { padding: 14px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.feature .ico { margin-bottom: 10px; }
.feature strong { display: block; font-size: .9rem; }
.feature span { font-size: .78rem; color: var(--muted); }
.how { counter-reset: how; display: grid; gap: 12px; }
@media (min-width: 900px) { .how { grid-template-columns: repeat(4, 1fr); } }
.how li { list-style: none; padding: 16px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.how li::before { counter-increment: how; content: counter(how); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--grad); color: #fff; font-weight: 800; margin-bottom: 8px; }
.how { padding: 0; margin: 0; }

/* Auth & install */
.auth-shell { min-height: calc(100vh - var(--topbar-h) - 120px); display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 440px; padding: 24px; border-radius: var(--radius-xl); background: linear-gradient(180deg, rgba(20, 34, 68, .85), rgba(13, 23, 48, .92)); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); }
.auth-card.wide { max-width: 640px; }
.auth-card h1 { font-size: 1.5rem; }
.auth-foot { text-align: center; margin: 16px 0 0; color: var(--text-2); font-size: .9rem; }
.secure-note { text-align: center; font-size: .76rem; color: var(--muted); margin: 10px 0 0; }
.auth-card .checklist li { padding: 8px 10px; }

/* Errors */
.error-shell { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.error-code { font-size: 4.5rem; font-weight: 800; letter-spacing: -.05em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }

/* Invoice (prints on white paper) */
.invoice { background: #fff; color: #111827; border-radius: var(--radius); padding: 28px; }
.invoice h1, .invoice h2, .invoice h3, .invoice strong { color: #111827; }
.invoice .muted, .invoice .tiny, .invoice .small { color: #6b7280 !important; }
.invoice .data-table th { color: #6b7280; border-color: #e5e7eb; }
.invoice .data-table td { border-color: #e5e7eb; color: #111827; }
.invoice-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
@media print {
  body { background: #fff !important; }
  .topbar, .sidebar, .tabbar, .page-head-actions, .alert, footer, .toast-stack { display: none !important; }
  .shell { display: block !important; } .main { padding: 0 !important; }
  .invoice { box-shadow: none; padding: 0; }
}

/* Pagination */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: .86rem; font-weight: 600; }
.pagination .active, .pagination [aria-current] { background: var(--grad); color: #fff; border-color: transparent; }

/* Install banner (PWA) */
.install-banner { display: none; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line-strong); margin-bottom: 14px; }
.install-banner.show { display: flex; }

/* Misc */
.divider-label { display: flex; align-items: center; gap: .7rem; color: var(--muted); font-size: .76rem; margin: 14px 0; }
.divider-label::before, .divider-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
details.more > summary { cursor: pointer; color: var(--primary-2); font-weight: 600; font-size: .9rem; list-style: none; padding: 6px 0; }
details.more > summary::-webkit-details-marker { display: none; }
.kbd-num { font-variant-numeric: tabular-nums; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: spin .8s linear infinite; display: inline-block; }
.pagination { list-style: none; padding: 0; }
.pagination li.disabled span { opacity: .45; }

/* Map hero + overlapping sheet (tracking screen) */
.map-hero { margin: 0 -16px 0; height: 46vh; min-height: 260px; max-height: 520px; border-radius: 0; border: 0; border-bottom: 1px solid var(--line); }
.sheet-card { position: relative; z-index: 5; margin: -28px -16px 14px; padding: 8px 16px 16px; border-radius: 26px 26px 0 0; background: linear-gradient(180deg, #0f1b38, #0b1530 60%); border-top: 1px solid var(--line-strong); box-shadow: 0 -16px 40px rgba(0, 0, 0, .45); }
.sheet-card::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 0 auto 12px; }
@media (min-width: 900px) {
  .map-hero { margin: 0 0 0; border-radius: var(--radius-lg); border: 1px solid var(--line); height: 400px; }
  .sheet-card { margin: 14px 0; border-radius: var(--radius-lg); border: 1px solid var(--line); padding: 20px; }
  .sheet-card::before { display: none; }
}
.contact-btns { display: flex; gap: 8px; }
.contact-btns .icon-btn { width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text); }
.contact-btns .icon-btn.primary { background: var(--grad); color: #fff; border-color: transparent; }

.main > .map-hero:first-child { margin-top: -16px; }
@media (min-width: 900px) { .main > .map-hero:first-child { margin-top: 0; } }
.stars { display: flex; flex-direction: row-reverse; justify-content: center; gap: 6px; margin: 4px 0 14px; }
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars label { color: var(--surface-3); cursor: pointer; transition: color .1s, transform .1s; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: #ffc66b; }
.stars label .i { fill: currentColor; }
.stars input:focus-visible + label { outline: 2px solid var(--primary); border-radius: 6px; }
.track-shell { max-width: 720px; margin: 0 auto; padding: 24px 16px; }

/* Schematic map fallback (minimap.js) */
.mm-map { background: radial-gradient(120% 90% at 50% 40%, #10204a 0%, #0a142e 60%, #08101f 100%) !important; }
.mm-svg { position: absolute; inset: 0; }
.mm-grid { stroke: rgba(120, 160, 255, .08); stroke-width: 1; }
.mm-overlay { position: absolute; inset: 0; pointer-events: none; }
.mm-overlay .mm-icon { position: absolute; pointer-events: auto; }
.mm-popup { position: absolute; z-index: 10; max-width: 220px; padding: 0; }
.mm-note { position: absolute; right: 8px; bottom: 6px; font-size: 10px; color: var(--muted); background: rgba(6, 11, 24, .7); padding: 2px 6px; border-radius: 6px; }
[hidden] { display: none !important; }
.job-price, .offer-price, .option .price { white-space: nowrap; }
.stat-strip > * { padding: 12px 10px; display: block; min-width: 0; }
.stat-strip > * + * { border-left: 1px solid var(--line); }
.job-card-foot .row { flex-shrink: 0; }
@media (max-width: 380px) { .job-card-foot { flex-wrap: wrap; } }
@media (max-width: 480px) { .stat-strip .stat-value { font-size: 1.05rem; } .stat-strip .stat-label { font-size: .7rem; } }
@media (max-width: 430px) {
  .job-card-foot { flex-wrap: wrap; }
  .job-card-foot > .row { width: 100%; }
  .job-card-foot > .row > * { flex: 1; }
  .job-card-foot > .row .btn { width: 100%; }
}
.notification-list .list-row strong { white-space: normal; }
