/* Inter (SIL OFL), self-hosted so every host and OS renders the same face. Variable
   font, weights 100-900, latin + latin-ext (the latter carries the peso sign). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* app.css — shared styles for the bidit customer app (production brand). */
:root {
  --navy: #072a52;
  --navy-deep: #010d1f;
  --navy-hover: #0a3568;
  --blue: #008eff;
  --blue-hover: #0077db;
  --blue-tint: #e6f4ff;
  --blue-tint-2: #f2f9ff;
  --text: #0b1f3a;
  --muted: #5a6b7d;
  --faint: #8494a4;
  --border: #d7e2ee;
  --white: #ffffff;
  --paper: #f5f8fc;
  --ok: #1f9d57;
  --ok-bg: #e7f6ee;
  --warn: #c47a00;
  --shadow-lg: 0 24px 60px rgba(7, 42, 82, 0.14);
  --shadow-sm: 0 6px 20px rgba(7, 42, 82, 0.08);
  /* LTST-504 (shadcn-inspired tokens, mirrored in mobile/lib/theme.ts and
     index.html's own copy): one radius scale, a 4-pt spacing scale, a
     low-contrast 1px border for cards/dividers (inputs keep --border, which
     is darker for affordance), and a focus ring every control shares. */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius: var(--radius-lg);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --border-subtle: #e3eaf2;
  --muted-foreground: var(--muted);
  --danger: #b91c1c;
  --danger-bg: #fff1f1;
  --ring: var(--blue);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word; /* long URLs/words never force horizontal scroll */
}
a { text-decoration: none; color: inherit; }
/* Media never overflows its container on any screen size. */
img, svg, video, canvas { max-width: 100%; }
.container { width: min(1120px, 92%); margin: 0 auto; }
.container-narrow { width: min(720px, 92%); margin: 0 auto; }

/* ---- Logo ---- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo svg { display: block; height: 32px; width: auto; }
/* The official mark (LTST-352) — Shay's own PNG, cropped to content and
   exported at 3x for retina; sized to the same slot the old SVG used. */
.logo img { display: block; height: 32px; width: auto; }
.logo .wordmark { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.04em; color: var(--navy); }

/* ---- Header ---- */
header.app {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.app .nav { height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-right { display: flex; align-items: center; gap: 16px; font-weight: 600; font-size: 0.94rem; }
.nav-right .who { color: var(--muted); }
.nav-msg { color: var(--navy); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.nav-msg:hover { color: var(--blue); }
.nav-pip { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 0.7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

/* ---- Buttons ---- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-md); font-weight: 700; font-size: 1rem;
  border: 2px solid transparent; cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.button:active:not(:disabled) { transform: translateY(1px); }
.button:disabled { opacity: 0.55; cursor: not-allowed; }
.button-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 22px rgba(0, 142, 255, 0.3); }
.button-primary:hover:not(:disabled) { background: var(--blue-hover); }
.button-navy { background: var(--navy); color: #fff; }
.button-navy:hover:not(:disabled) { background: var(--navy-hover); }
.button-ghost { background: transparent; color: var(--navy); border-color: var(--border); }
.button-ghost:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); background: var(--blue-tint-2); }
.button-danger { background: var(--danger); color: #fff; }
.button-danger:hover:not(:disabled) { background: #991b1b; }
.button-lg { padding: 16px 30px; font-size: 1.05rem; border-radius: var(--radius-md); }
.button-block { width: 100%; }

/* ---- Page scaffolding ---- */
.page { padding: 44px 0 80px; }
.page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.03em; color: var(--navy); margin: 0 0 8px; font-weight: 800; }
.page h2 { letter-spacing: -0.02em; }
.page .sub { color: var(--muted); margin: 0 0 28px; font-size: 1.08rem; }
.eyebrow { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue-hover); font-weight: 700; margin: 0 0 10px; }

/* ---- Cards ----
   Flat by default (1px low-contrast border, no shadow); a shadow marks the
   one elevated thing on a page (.card-elevated, the prompt card, the wallet). */
.card { background: var(--white); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: var(--space-5); }
.card-elevated { box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 18px; }

/* ---- Forms ---- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 0.92rem; color: var(--navy); margin-bottom: 7px; }
.field .hint { font-weight: 400; color: var(--faint); font-size: 0.85rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], textarea, select {
  width: 100%; padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: 1rem; font-family: inherit; color: var(--text); background: var(--white); outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 142, 255, 0.14); }
textarea { min-height: 120px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---- Badges / pills ---- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.badge-verified { background: var(--ok-bg); color: var(--ok); }
.badge-featured { background: var(--blue-tint); color: var(--blue-hover); }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-muted { background: var(--paper); color: var(--muted); border: 1px solid var(--border-subtle); }
.badge svg { width: 13px; height: 13px; }
.stars { color: #f5a623; font-weight: 800; display: inline-flex; align-items: center; gap: 4px; }
.stars svg { width: 15px; height: 15px; fill: #f5a623; }

/* ---- Steps / progress ---- */
.progress { display: flex; gap: 8px; margin-bottom: 28px; }
.progress .seg { flex: 1; height: 5px; border-radius: 3px; background: var(--border); }
.progress .seg.on { background: var(--blue); }

/* ---- Job status pipeline ----
   The requirements' governing principle, rendered. 12 stages never fit as
   horizontal labels on a phone, so the bar stays abstract (one segment per
   stage) and the named detail expands as a vertical list on every screen. */
.pipeline {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 18px;
}
.pipeline-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.pipeline-head b { color: var(--navy); font-size: 1.05rem; }
.pipeline-count { color: var(--faint); font-size: 0.78rem; font-weight: 600; margin-left: 8px; white-space: nowrap; }
.pipeline-toggle {
  background: none; border: none; padding: 0; cursor: pointer; font-family: inherit;
  color: var(--blue-hover); font-weight: 700; font-size: 0.82rem; white-space: nowrap; flex: none;
}
.pipeline-toggle:hover { text-decoration: underline; }
.pipeline-bar { display: flex; gap: 4px; }
.pipeline-bar .seg { flex: 1; height: 6px; border-radius: 3px; background: var(--border); }
.pipeline-bar .seg.done { background: var(--ok); }
.pipeline-bar .seg.on { background: var(--blue); box-shadow: 0 0 0 3px rgba(0, 142, 255, 0.18); }
/* Skipped reads as absent, not achieved — the escrow stage really didn't run. */
.pipeline-bar .seg.skipped { background: repeating-linear-gradient(90deg, var(--border) 0 3px, transparent 3px 6px); }
.pipeline-note { margin: 10px 0 0; color: var(--muted); font-size: 0.9rem; }
.pipeline-steps { list-style: none; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--border); }
.pipeline-step { display: flex; flex-direction: column; padding: 7px 0 7px 22px; position: relative; font-size: 0.88rem; }
.pipeline-step::before {
  content: ""; position: absolute; left: 0; top: 12px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--border);
}
.pipeline-step b { color: var(--faint); font-weight: 700; }
.pipeline-step span { color: var(--faint); font-size: 0.82rem; }
.pipeline-step.done::before { background: var(--ok); }
.pipeline-step.done b { color: var(--navy); }
.pipeline-step.on::before { background: var(--blue); box-shadow: 0 0 0 3px rgba(0, 142, 255, 0.18); }
.pipeline-step.on b { color: var(--blue-hover); }
.pipeline-step.on span { color: var(--muted); }
.pipeline-step.skipped::before { background: transparent; border: 1.5px dashed var(--faint); }
.pipeline-step.skipped b { text-decoration: line-through; }
/* Flat variant: draft / cancelled / disputed have no position to show. */
.pipeline-flat b { color: var(--navy); font-size: 1.05rem; }
.pipeline-flat .pipeline-note { margin-top: 4px; }
.pipeline-warn { background: #fff8ea; border-color: #f0d9a8; }
.pipeline-warn b { color: var(--warn); }

@media (max-width: 480px) {
  .pipeline { padding: 16px; }
  .pipeline-head { flex-wrap: wrap; }
  .pipeline-bar .seg { height: 5px; }
  .pipeline-bar { gap: 3px; }
}

/* ---- Empty / status states ---- */
.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: var(--faint); margin-bottom: 12px; }
.spinner {
  width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--blue);
  border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.notice { padding: 12px 16px; border-radius: var(--radius-md); font-size: 0.95rem; margin-bottom: 16px; }
.notice-err { background: #fbeae6; color: #c0392b; }
.notice-ok { background: var(--ok-bg); color: var(--ok); }

/* ---- Skeletons (LTST-504 / LTST-454 on the web) ----
   Content-shaped placeholders for full-page loads; the spinner stays for
   short inline waits. Rendered statically in the page markup (shows before
   any script runs) and by skeletonHtml() in assets/ui.js for re-loads. */
.sk {
  display: block; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--border-subtle) 0%, #eef3f8 50%, var(--border-subtle) 100%);
  background-size: 200% 100%; animation: sk-shimmer 1.4s ease infinite;
}
.sk-line + .sk-line { margin-top: 8px; }
.sk-card { padding: 20px; }
.sk-card + .sk-card { margin-top: 12px; }
.sk-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.sk-tiles .sk-card + .sk-card { margin-top: 0; }
@media (max-width: 640px) { .sk-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@keyframes sk-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---- Segmented control (Active / Past) — one style for every page ---- */
.seg { display: inline-flex; gap: 4px; background: var(--paper); border: 1px solid var(--border-subtle); border-radius: 999px; padding: 4px; margin: 6px 0 16px; }
.seg > button {
  border: 0; background: transparent; padding: 7px 18px; border-radius: 999px; font: inherit;
  font-weight: 700; font-size: 0.9rem; color: var(--muted); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.seg > button:hover { color: var(--navy); }
.seg > button.active, .seg > button[aria-pressed="true"] { background: var(--white); color: var(--navy); box-shadow: 0 1px 3px rgba(7, 42, 82, 0.12); }

/* ---- Dialog / bottom sheet + toast (assets/ui.js) ---- */
.ui-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(1, 13, 31, 0.45);
  display: grid; place-items: center; padding: 16px; animation: ui-fade 0.15s ease;
}
.ui-dialog {
  width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; outline: none;
  background: var(--white); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 22px 22px 18px; animation: ui-pop 0.16s ease;
}
.ui-dialog h2 { margin: 0 0 8px; font-size: 1.15rem; color: var(--navy); letter-spacing: -0.02em; }
.ui-dialog .ui-body { margin: 0; color: var(--muted); font-size: 0.95rem; }
.ui-dialog .field { margin: 14px 0 0; }
.ui-dialog .ui-err { color: var(--danger); margin: 6px 0 0; }
.ui-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.ui-actions .button { padding: 10px 18px; font-size: 0.95rem; }
body.ui-lock { overflow: hidden; }
@media (max-width: 640px) {
  /* Under phone width the same dialog is a bottom sheet with a grab handle. */
  .ui-overlay { align-items: end; padding: 0; }
  .ui-dialog {
    width: 100%; max-height: 88vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); animation: ui-rise 0.2s ease;
  }
  .ui-dialog::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--border); margin: -6px auto 14px; }
  .ui-actions { flex-direction: column-reverse; }
  .ui-actions .button { width: 100%; }
}
@keyframes ui-fade { from { opacity: 0; } }
@keyframes ui-pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } }
@keyframes ui-rise { from { transform: translateY(24px); } }
.ui-toasts {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  z-index: 110; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none;
}
body.has-tabbar .ui-toasts { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.ui-toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px;
  background: var(--navy); color: #fff; border-radius: var(--radius-md); padding: 12px 14px;
  font-size: 0.92rem; font-weight: 600; box-shadow: var(--shadow-lg); animation: ui-rise 0.18s ease;
  transition: opacity 0.2s ease;
}
.ui-toast.err { background: var(--danger); }
.ui-toast.ok { background: #0b5f3a; }
.ui-toast.leaving { opacity: 0; }
.ui-toast button {
  margin-left: auto; background: none; border: 0; color: #fff; font: inherit; font-weight: 800;
  cursor: pointer; padding: 4px 6px; border-radius: var(--radius-sm); text-decoration: underline; white-space: nowrap;
}

/* ---- Interaction states (LTST-504) ----
   Keyboard focus is never invisible: a 2px ring with an offset on every
   control. Inputs keep their border-colour + soft shadow ring instead. */
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
button:disabled { cursor: not-allowed; }
/* Numbers line up in tiles and ledgers. */
.tile .val, .total-tile, .stat, .amt, .bidcount b, .wamt, .mamt { font-variant-numeric: tabular-nums; }
/* Motion is a courtesy, not a requirement. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .sk { animation: none; }
}

/* ---- Footer ---- */
footer.app { background: var(--navy-deep); color: #a9bdd4; padding: 30px 0; margin-top: 40px; }
footer.app .footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.9rem; }
footer.app .logo .wordmark { color: #fff; }

/* ----------------------------------------------------------------------
   Responsive breakpoints — every bidit page must work across all four.
   Desktop        > 1024px
   Tablet         641–1024px  (portrait tablets, phone landscape on large phones)
   Mobile landsc. 481–640px
   Mobile portr.  <= 480px
   Prefer fluid containers (min()) and auto-fit grids over hard breakpoints;
   these rules cover the cases that need explicit help.
   ---------------------------------------------------------------------- */

/* Tablet and below */
@media (max-width: 1024px) {
  .app .nav { height: 64px; }
}

/* Mobile landscape and below */
@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .nav-right .who { display: none; }
  .page { padding: 34px 0 64px; }
}

/* Mobile portrait */
@media (max-width: 480px) {
  .container, .container-narrow { width: 90%; }
  .card { padding: 20px; }
  .button-lg { padding: 14px 22px; font-size: 1rem; }
  .nav-right { gap: 10px; font-size: 0.9rem; }
  .page h1 { font-size: 1.7rem; }
}

/* ============================================================
   Role-aware app nav (rendered by mountNav in bidit.js).
   Customer = navy default. Provider = blue accent + "for providers" badge.
   ============================================================ */

/* LTST-488: the same six destinations as the native tab bar, in its order,
   each with its Ionicons glyph (filled = active, outline = idle). */
.nav-desktop { display: flex; align-items: center; gap: 2px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--navy); font-weight: 600; padding: 8px 10px; border-radius: var(--radius-sm);
  white-space: nowrap; line-height: 1; font-size: 0.93rem;
}
.nav-ico { width: 18px; height: 18px; flex: none; display: block; }
.nav-desktop .nav-cta { padding: 9px 15px; font-size: 0.92rem; border-radius: 9px; margin: 0 5px; gap: 6px; }
.nav-desktop .nav-cta.active { box-shadow: 0 0 0 3px var(--blue-tint); }
.nav-link:hover { color: var(--blue); }
.nav-link.active { color: var(--navy); background: rgba(7, 42, 82, 0.06); font-weight: 700; }

/* Provider theming */
header.app.providing { border-bottom-color: var(--blue); box-shadow: inset 0 -2px 0 var(--blue); }
header.app.providing .nav-link.active { color: var(--blue-hover); background: var(--blue-tint); }
.mode-badge {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.01em; white-space: nowrap;
  color: var(--blue-hover); background: var(--blue-tint);
  padding: 3px 8px; border-radius: 6px; margin-left: 4px;
}

/* Account avatar + dropdown */
/* In-app notifications bell (LTST-412). */
.notif { position: relative; display: inline-flex; align-items: center; }
.notif-btn {
  position: relative; border: 0; background: none; padding: 6px; margin: 0;
  cursor: pointer; border-radius: 50%; color: var(--navy); display: inline-flex;
}
.notif-btn:hover { background: var(--paper); }
header.app.providing .notif-btn { color: var(--navy); }
.notif-badge {
  position: absolute; top: 0; right: 0; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 999px; background: var(--blue); color: #fff;
  font-size: 0.65rem; font-weight: 800; display: inline-flex;
  align-items: center; justify-content: center;
}
.notif-menu {
  position: absolute; right: 0; top: calc(100% + 12px); width: 320px; max-width: 86vw;
  max-height: 62vh; overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 20px 50px rgba(7, 42, 82, 0.18); z-index: 30;
}
.notif-item {
  display: block; padding: 11px 14px; border-bottom: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-size: 0.88rem;
}
.notif-item:last-child { border-bottom: none; }
a.notif-item:hover { background: var(--paper); }
.notif-item b { display: block; color: var(--navy); font-size: 0.9rem; }
.notif-item.unread { background: #f2f8ff; }
.notif-item .nb { display: block; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-item .nt { display: block; color: var(--faint); font-size: 0.75rem; margin-top: 3px; }
.notif-empty { padding: 22px 16px; text-align: center; color: var(--muted); font-size: 0.88rem; }

.acct { position: relative; display: inline-flex; }
.acct-btn { border: 0; background: none; padding: 0; margin: 0; cursor: pointer; border-radius: 50%; }
/* The nav avatar has its own class, scoped to the header, so a page that
   defines a generic `.avatar` for its own content can't restyle the nav. */
header.app .nav-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 800; color: #fff; background: var(--navy);
  box-shadow: 0 0 0 1px var(--border);
}
header.app.providing .nav-avatar { background: var(--blue); }
header.app .acct-btn:hover .nav-avatar,
header.app .acct-btn:focus-visible .nav-avatar { box-shadow: 0 0 0 3px var(--blue-tint); }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 12px); width: 244px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 20px 50px rgba(7, 42, 82, 0.18); overflow: hidden; z-index: 30;
}
.acct-head, .mp-head {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px;
  border-bottom: 1px solid var(--border); font-size: 0.9rem;
}
.acct-head b, .mp-head b { display: block; color: var(--navy); }
.acct-email { color: var(--muted); font-size: 0.78rem; font-weight: 500; word-break: break-all; }
.acct-item {
  display: block; width: 100%; text-align: left; padding: 12px 14px;
  background: none; border: 0; font: inherit; font-weight: 600; color: var(--navy); cursor: pointer;
}
.acct-item:hover { background: var(--blue-tint-2); color: var(--blue-hover); }

/* Under 900px (phones, and tablets in portrait — where the iPad app also
   shows a tab bar) the top links and the avatar give way to the bar below.
   The bell stays. The old hamburger + slide-down panel are gone (LTST-488):
   the bar carries every destination and Account carries Sign out. */
@media (max-width: 900px) {
  .nav-desktop, .acct { display: none; }
}

/* ---------------------------------------------------------------------------
   Pocket: bottom tab bar (LTST-288)
   The native tab bar, on the web (LTST-488): the same six slots, order,
   labels and Ionicons glyphs as the iOS/Android app. Hidden above 900px,
   where the top nav shows the same six.
--------------------------------------------------------------------------- */
.tabbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: #fff; border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 20px rgba(7, 42, 82, 0.07);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px 0; text-decoration: none; color: var(--muted);
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.01em; min-width: 0;
}
.tabbar a .ti { display: inline-flex; align-items: center; justify-content: center; height: 24px; line-height: 1; }
.tabbar a .ti svg { width: 24px; height: 24px; display: block; }
.tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar a.on { color: var(--blue-hover); }
.tabbar a:focus-visible { outline: 2px solid var(--blue); outline-offset: -3px; border-radius: 8px; }
/* The raised primary action — the one thing a customer is here to do. */
.tabbar a.tab-cta .ti {
  width: 46px; height: 46px; margin-top: -20px; border-radius: 50%;
  background: var(--blue); color: #fff; display: grid; place-items: center;
  font-size: 1.5rem; box-shadow: 0 8px 18px -6px rgba(0, 142, 255, 0.6);
  border: 3px solid #fff;
}
.tabbar a.tab-cta { color: var(--blue-hover); }
.tabbar a.tab-cta .ti svg { width: 28px; height: 28px; }
header.app.providing ~ .tabbar a.on,
header.app.providing ~ .tabbar a.tab-cta { color: var(--blue-hover); }
/* Unread pip, same convention as the header link. */
.tabbar a .ti { position: relative; }
.tabbar a.has-unread .ti::after {
  content: ""; position: absolute; top: -1px; right: -6px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--danger, #d03b3b); border: 2px solid #fff;
}
@media (max-width: 900px) {
  .tabbar { display: flex; }
  /* Keep the last card clear of the bar. */
  body.has-tabbar { padding-bottom: 76px; }
}

/* ---------------------------------------------------------------------------
   Pocket: the one guidance surface (LTST-288)
   nextStep() renders here — a card on detail pages, a chip in list rows.
   Replaces the old parallel chip / amber-banner / waiting-note systems.
--------------------------------------------------------------------------- */
.step-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; border-radius: 14px; padding: 15px 18px; margin-bottom: 18px;
  border: 1px solid var(--border); background: var(--paper);
}
.step-card.act { background: #fff8e6; border-color: #fcd34d; }
.step-card.wait { background: var(--blue-tint-2); }
.step-label { font-weight: 750; color: var(--navy); font-size: 1.02rem; letter-spacing: -0.01em; }
.step-card.act .step-label { color: #92400e; }
.step-detail { margin: 3px 0 0; font-size: 0.9rem; color: var(--muted); max-width: 62ch; }
.step-body { min-width: 0; }
.step-cta { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 480px) {
  .step-card { align-items: stretch; }
  .step-cta { width: 100%; text-align: center; }
}

.step-chip {
  display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 4px 12px;
  border-radius: 999px; text-decoration: none; white-space: nowrap;
}
.step-chip.act { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.step-chip.wait { background: var(--blue-tint-2); color: var(--muted); }

/* ---------------------------------------------------------------------------
   Ledger: the money surfaces (LTST-290)
   Escrow is bidit's differentiator, so it gets a deliberate fintech treatment
   wherever money is at stake — held, released, refunded.
--------------------------------------------------------------------------- */
.wallet {
  position: relative; overflow: hidden; border-radius: 16px; padding: 18px 20px;
  margin-bottom: 18px; color: #fff;
  background: linear-gradient(145deg, #0b2c55 0%, #072a52 55%, #06376e 100%);
}
.wallet::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px;
  border-radius: 50%; background: rgba(0, 142, 255, 0.22);
}
.wallet.out { background: linear-gradient(145deg, #08422c 0%, #0a5537 55%, #0c6b45 100%); }
.wallet.out::after { background: rgba(47, 208, 140, 0.22); }
.wallet.frozen { background: linear-gradient(145deg, #4a2f08 0%, #5c3a09 55%, #7a4d0c 100%); }
.wallet.frozen::after { background: rgba(252, 211, 77, 0.22); }
.wlabel {
  font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase;
  font-weight: 700; color: #7cc2ff; position: relative;
}
.wallet.out .wlabel { color: #a9ecd0; }
.wallet.frozen .wlabel { color: #fcd34d; }
.wamt {
  font-size: 2.1rem; font-weight: 800; letter-spacing: -0.025em; margin: 4px 0 2px;
  font-variant-numeric: tabular-nums; position: relative;
}
.wcap { margin: 0; font-size: 0.88rem; color: #b7d4f2; position: relative; max-width: 54ch; }
.wallet.out .wcap { color: #b6e8d1; }
.wallet.frozen .wcap { color: #f2ddb0; }
.wnote { margin: 10px 0 0; font-size: 0.82rem; color: #dbe9f8; position: relative; }
.mmeter { display: flex; gap: 8px; margin-top: 14px; position: relative; }
.mstep {
  flex: 1; font-size: 0.66rem; font-weight: 600; color: rgba(255, 255, 255, 0.55);
  text-align: center; letter-spacing: 0.02em;
}
.mbar { display: block; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); margin-bottom: 6px; }
.mstep.done .mbar { background: #2fd08c; }
.mstep.done { color: #a9ecd0; }
.mstep.cur .mbar { background: var(--blue); }
.mstep.cur { color: #fff; }
.wallet.out .mstep.cur .mbar { background: #2fd08c; }

.assurance {
  display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0;
  font-size: 0.85rem; color: var(--muted); max-width: 66ch;
}
.assurance span { color: var(--ok); }

.mrow {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 11px 0; border-top: 1px solid var(--border);
}
.mrow .mt { font-weight: 650; color: var(--navy); font-size: 0.94rem; }
.mrow .md { font-size: 0.82rem; color: var(--muted); margin-top: 1px; }
.mrow .mamt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mrow .mamt.held { color: #b45309; }
.mrow .mamt.out { color: var(--ok); }
.mrow .mamt.back { color: var(--muted); }

/* Account deletion (LTST-369) */
.del-blockers { margin: 8px 0 4px; padding-left: 20px; color: var(--navy); font-size: 0.92rem; }
.del-blockers li { margin-bottom: 6px; }
.del-danger, .del-danger-solid { color: #b91c1c; }
.del-danger-solid { background: #b91c1c; color: #fff; border-color: #b91c1c; }
.del-confirm { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.del-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.del-confirm.hidden, #delStart.hidden { display: none; }
