/* ---------- Tendon styles: clean & modern (Uber-like) ---------- */
:root {
  --bg: #ffffff;
  --bg-muted: #f6f6f6;
  --ink: #0a0a0a;
  --ink-soft: #5a5a5a;
  --border: #e6e6e6;
  --accent: #0a0a0a;
  --accent-ink: #ffffff;
  --success: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --max-w: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  font-size: 15px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Top bar ---------- */
#topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.brand {
  font-weight: 700; font-size: 20px; letter-spacing: -0.02em;
  display: inline-flex; align-items: center; gap: 8px;
}
.brand-mark { color: var(--ink); font-size: 22px; line-height: 0; }
#topbar nav { display: flex; align-items: center; gap: 22px; }
#topbar nav a {
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  transition: color .15s ease;
}
#topbar nav a:hover, #topbar nav a.active { color: var(--ink); }
.cart-link { position: relative; }
.badge {
  display: inline-block; min-width: 18px; padding: 1px 6px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-size: 11px; line-height: 16px; text-align: center; vertical-align: middle;
  margin-left: 2px;
}

/* ---------- Layout ---------- */
#app {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 32px 28px 64px;
}
footer {
  border-top: 1px solid var(--border);
  padding: 18px 28px; color: var(--ink-soft); font-size: 13px;
}

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px;
  align-items: center; padding: 28px 0 32px;
}
.hero h1 {
  font-size: 52px; line-height: 1.02; letter-spacing: -0.025em; margin: 0 0 14px;
}
.hero p { color: var(--ink-soft); font-size: 17px; max-width: 480px; }
.hero .cta-row { display: flex; gap: 12px; margin-top: 22px; }

.hero-graphic {
  background: linear-gradient(135deg, #f3f3f3 0%, #ecebe8 100%);
  border-radius: 20px; aspect-ratio: 4/3; display: grid;
  place-items: center; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.hero-graphic .floating-emojis {
  position: absolute; inset: 0; display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  font-size: 44px; place-items: center;
}
.hero-graphic .floating-emojis span { opacity: .85; }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }
  #topbar { padding: 12px 16px; }
  #topbar nav { gap: 12px; }
  #app { padding: 20px 16px 48px; }
}

/* ---------- Section headers ---------- */
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  margin: 40px 0 16px;
}
.section-head h2 { font-size: 26px; letter-spacing: -0.02em; margin: 0; }
.section-head .sub { color: var(--ink-soft); font-size: 14px; }

/* ---------- Cards / grids ---------- */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
/* cols-3 is used for the top-level service cards.
   Locked to 3 columns on desktop so an even count (e.g. 6 services) renders
   in clean even rows (3+3 / 2+2+2 / 1×6). */
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .grid.cols-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  display: flex; flex-direction: column; gap: 8px;
}
.card:hover { box-shadow: var(--shadow); border-color: #d0d0d0; transform: translateY(-1px); }
.card.clickable { cursor: pointer; }

.card .emoji { font-size: 32px; }
.card h3 { margin: 0; font-size: 17px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.card .price { font-weight: 600; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 10px;
  font-weight: 600; font-size: 14px; border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #222; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.danger { background: var(--danger); color: white; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.07);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Provider / detail pages ---------- */
.provider-row {
  display: flex; gap: 16px; align-items: center;
  padding: 16px; border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: border-color .12s, box-shadow .12s;
}
.provider-row:hover { border-color: #d0d0d0; box-shadow: var(--shadow); }
.provider-row .avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--bg-muted); display: grid; place-items: center;
  font-size: 28px; flex-shrink: 0;
}
.provider-row .info { flex: 1; min-width: 0; }
.provider-row .info h3 { margin: 0 0 2px; font-size: 16px; }
.provider-row .info .meta { color: var(--ink-soft); font-size: 13px; }
.provider-row .price-col { text-align: right; }
.provider-row .price-col strong { font-size: 17px; }
.provider-row .price-col span { color: var(--ink-soft); font-size: 12px; display: block; }

.rating-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--bg-muted); border-radius: 999px;
  padding: 3px 10px; font-size: 12px; font-weight: 600;
}
.verified-pill {
  background: #ecfdf5; color: #047857;
  padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
  margin-left: 6px;
}

/* ---------- Two-column page ---------- */
.two-col {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px;
}
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.panel {
  background: var(--bg-muted);
  border-radius: var(--radius);
  padding: 20px;
}
.panel h3 { margin: 0 0 14px; font-size: 17px; }
.panel .line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; font-size: 14px;
}
.panel .line.total {
  border-top: 1px solid var(--border); margin-top: 10px;
  padding-top: 14px; font-weight: 700; font-size: 16px;
}

/* ---------- Category chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); font-size: 13px; cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- Product card ---------- */
.product-card .product-img {
  background: var(--bg-muted); border-radius: 8px;
  aspect-ratio: 1; display: grid; place-items: center;
  font-size: 64px; margin-bottom: 10px;
}

/* ---------- Cart line ---------- */
.cart-line {
  display: grid; grid-template-columns: 60px 1fr auto auto; gap: 14px;
  padding: 14px 0; align-items: center; border-bottom: 1px solid var(--border);
}
.cart-line .ci-img {
  background: var(--bg-muted); border-radius: 8px; height: 60px;
  display: grid; place-items: center; font-size: 30px;
}
.cart-line .qty {
  display: inline-flex; align-items: center; gap: 8px;
}
.cart-line .qty button {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg);
}

/* ---------- Status pill ---------- */
.status {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.status.pending { background: #fef3c7; color: #92400e; }
.status.confirmed { background: #dbeafe; color: #1e40af; }
.status.completed { background: #d1fae5; color: #065f46; }
.status.cancelled { background: #fee2e2; color: #991b1b; }
.status.en_route { background: #e0e7ff; color: #3730a3; }
.status.in_progress { background: #cffafe; color: #155e75; }
.status.paid { background: #d1fae5; color: #065f46; }
.status.unpaid { background: #fef3c7; color: #92400e; }
.status.shipped { background: #e0e7ff; color: #3730a3; }
.status.refunded, .status.failed { background: #fee2e2; color: #991b1b; }
/* Quote/negotiation lifecycle statuses */
.status.requested { background: #fef3c7; color: #92400e; }
.status.negotiating { background: #fde68a; color: #78350f; }
.status.accepted { background: #dbeafe; color: #1e40af; }
.status.declined { background: #fee2e2; color: #991b1b; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 12px 18px;
  border-radius: 10px; font-size: 14px; box-shadow: var(--shadow);
  z-index: 1000; animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { transform: translate(-50%, 12px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* ---------- Empty states ---------- */
.empty {
  text-align: center; padding: 60px 20px; color: var(--ink-soft);
}
.empty .big { font-size: 56px; margin-bottom: 10px; }

/* ---------- Misc ---------- */
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
hr.soft { border: none; border-top: 1px solid var(--border); margin: 18px 0; }

.breadcrumb {
  color: var(--ink-soft); font-size: 13px; margin-bottom: 12px;
}
.breadcrumb a:hover { color: var(--ink); }

/* ---------- Admin tables & tabs ---------- */
.tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tabs button {
  padding: 10px 18px; background: transparent; border: none;
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  cursor: pointer; transition: color .15s, border-color .15s;
}
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--ink); border-bottom-color: var(--ink); }

.stats-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  margin-bottom: 24px;
}
.stat {
  background: var(--bg-muted); border-radius: var(--radius);
  padding: 16px;
}
.stat .label { color: var(--ink-soft); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 24px; font-weight: 700; margin-top: 4px; letter-spacing: -0.01em; }

table.data {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
table.data th, table.data td {
  text-align: left; padding: 12px 10px;
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
table.data th {
  color: var(--ink-soft); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  background: var(--bg-muted);
}
table.data tr:hover td { background: #fafafa; }
table.data select, table.data button {
  font-size: 12px; padding: 6px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg);
}
table.data button.danger {
  border-color: var(--danger); color: var(--danger);
}
table.data .nowrap { white-space: nowrap; }

.admin-toolbar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}

/* ---------- Live broadcast feed (home page) ---------- */
.live-feed {
  margin-top: 36px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.live-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #ef4444;
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, .55);
  animation: live-pulse 1.6s ease-out infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(239, 68, 68, .55); }
  70%  { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0   rgba(239, 68, 68, 0); }
}
.live-list {
  list-style: none; padding: 0; margin: 14px 0 0 0;
  max-height: 360px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
}
.live-empty { padding: 14px 0; text-align: center; }
.live-item {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px;
  padding: 10px 12px;
  background: var(--bg-muted);
  border-radius: 10px;
  border: 1px solid transparent;
  transition: transform .35s ease, opacity .35s ease, background .2s ease, border-color .2s ease;
}
.live-item:hover {
  background: var(--bg);
  border-color: var(--border);
}
.live-item.live-enter {
  transform: translateY(-6px);
  opacity: 0;
  background: #fff7ed; /* warm flash on first render */
}
.live-icon { font-size: 18px; line-height: 1.4; }
.live-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.live-title { font-weight: 600; font-size: 14px; }
.live-msg { color: var(--ink-soft); }
.live-time { color: var(--ink-soft); margin-top: 2px; }

/* ---------- Auth tabs (Sign in / Customer signup / Provider signup) ---------- */
.auth-tabs {
  display: flex; gap: 4px; margin-bottom: 18px;
  background: var(--bg-muted); padding: 4px; border-radius: 12px;
  width: fit-content;
}
.auth-tab {
  appearance: none; border: none; background: transparent;
  padding: 8px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  cursor: pointer; transition: background .15s, color .15s;
}
.auth-tab:hover { color: var(--ink); }
.auth-tab.active {
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

/* ---------- Provider CTA on /account ---------- */
.provider-cta {
  margin-top: 22px;
  border-left: 4px solid #6366f1;
}
.provider-cta h3 { margin-top: 0; }
.provider-cta select,
.provider-cta textarea,
.provider-cta input { width: 100%; }

/* ---------- Reviews / star ratings ---------- */
.stars { letter-spacing: 1px; color: #d1d5db; font-size: 14px; }
.stars .star.on { color: #f59e0b; }

.stars-input { display: inline-flex; gap: 4px; }
.star-btn {
  appearance: none; background: transparent; border: none;
  font-size: 28px; color: #d1d5db; cursor: pointer;
  padding: 2px 4px; line-height: 1;
  transition: color .12s ease, transform .1s ease;
}
.star-btn:hover { transform: scale(1.1); }
.star-btn.on { color: #f59e0b; }

.reviews-section { margin-top: 32px; }
.review-summary {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; margin: 12px 0 16px;
  background: var(--bg-muted); border-radius: 10px;
  width: fit-content;
}
.review-list { display: flex; flex-direction: column; gap: 12px; }
.review-item {
  padding: 14px 16px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 12px;
}
.review-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.review-body { color: var(--ink-soft); line-height: 1.45; }

.review-form-inline {
  margin-top: 12px; padding: 14px;
  background: var(--bg-muted); border-radius: 10px;
}
.review-form-inline textarea { width: 100%; }
.review-foot { margin-top: 8px; text-align: right; }
.review-report { color: #6b7280; text-decoration: underline; }
.review-report:hover { color: #ef4444; }

/* Provider's public reply to a review (rendered nested under the review body) */
.review-response {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f0f9ff;
  border-left: 3px solid #0ea5e9;
  border-radius: 6px;
  color: #0c4a6e;
}
.review-response .small { color: #0c4a6e; opacity: .8; margin-bottom: 4px; }

/* Provider-side response editor on the dashboard reviews list */
.response-editor {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--bg-muted);
  border-radius: 8px;
}
.response-editor textarea {
  width: 100%; margin: 6px 0;
}

/* ---------- Calendar (provider dashboard) ---------- */
.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.calendar-grid.header { margin-top: 12px; margin-bottom: 4px; }
.cal-day-h {
  text-align: center; padding: 8px 6px;
  background: var(--bg-muted); border-radius: 8px;
}
.cal-day-h .cal-dow { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.cal-day-h .cal-date { font-weight: 700; font-size: 18px; }
.cal-day-h.today { background: #fef3c7; }
.cal-day {
  min-height: 90px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  display: flex; flex-direction: column; gap: 4px;
}
.cal-empty { text-align: center; padding-top: 24px; }
.cal-event {
  background: var(--bg-muted);
  border-left: 3px solid #6366f1;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 12px;
  display: flex; flex-direction: column; gap: 2px;
  cursor: default;
}
.cal-event.status-pending   { border-left-color: #f59e0b; }
.cal-event.status-confirmed { border-left-color: #10b981; }
.cal-event.status-completed { border-left-color: #6b7280; }
.cal-event.status-requested   { border-left-color: #f59e0b; }
.cal-event.status-negotiating { border-left-color: #d97706; }
.cal-event.status-accepted    { border-left-color: #3b82f6; }
.cal-event.status-paid        { border-left-color: #10b981; }
.cal-time { font-weight: 600; color: var(--ink); }
.cal-title { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Availability editor ---------- */
.avail-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.avail-row {
  display: grid; grid-template-columns: 110px 1fr 20px 1fr auto; gap: 8px;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-muted); border-radius: 8px;
}
.avail-row select, .avail-row input { width: 100%; }
.avail-actions { display: flex; gap: 8px; margin-top: 8px; }

/* ---------- Seller dashboard product rows ---------- */
.seller-product-row {
  display: grid;
  grid-template-columns: 48px 1fr auto auto auto;
  gap: 12px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--border);
}
.seller-product-row:first-of-type { border-top: none; }
.seller-product-row .sp-img { font-size: 28px; text-align: center; }
.seller-product-row .sp-meta { min-width: 0; }
.seller-product-row label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.seller-product-row .sp-actions { display: flex; gap: 6px; }

/* ---------- Shop sort/search toolbar ---------- */
.shop-toolbar {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
  margin: 14px 0 18px;
}
.shop-search, .shop-sort {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-size: 14px;
}
@media (max-width: 560px) {
  .shop-toolbar { grid-template-columns: 1fr; }
}

/* Email-verify banner on /account */
.verify-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 10px 14px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 14px;
}
.verify-banner .btn { white-space: nowrap; }

/* Earnings panel — payout list rows */
.earnings-panel { background: var(--bg); }
.payout-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.payout-row {
  display: grid; grid-template-columns: 110px 90px 1fr 90px;
  gap: 12px; align-items: center;
  padding: 8px 12px; background: var(--bg-muted); border-radius: 8px;
  font-size: 13px;
}

/* 2FA setup — otpauth URI display */
.otpauth-uri {
  display: block;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--bg-muted);
  border-radius: 8px;
  font-size: 11px;
  word-break: break-all;
  user-select: all;
}

/* Timeline list used on /bookings/:id and /orders/:id */
.timeline-list {
  list-style: none; margin: 12px 0 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.timeline-item {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px;
  padding: 10px 12px;
  background: var(--bg-muted); border-radius: 8px;
}
.timeline-icon { font-size: 16px; text-align: center; line-height: 1.6; }
.timeline-body { min-width: 0; }
.timeline-head {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.timeline-text {
  white-space: pre-wrap; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}

/* Nav search box — sits inline in the topbar nav */
#nav-search { margin: 0; }
#nav-search-input {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-size: 13px;
  width: 200px;
  transition: border-color .15s, box-shadow .15s;
}
#nav-search-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}
@media (max-width: 900px) {
  #nav-search-input { width: 140px; }
}

/* Favorites heart button */
.fav-btn {
  appearance: none; background: rgba(255,255,255,.92);
  border: 1px solid var(--border); cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #9ca3af; font-size: 16px;
  transition: color .15s, transform .1s, background .15s;
}
.fav-btn:hover { color: #ef4444; transform: scale(1.05); }
.fav-btn.on { color: #ef4444; background: #fff1f2; border-color: #fecaca; }
.fav-corner {
  position: absolute; top: 10px; right: 10px; z-index: 1;
}
.card.product-card { position: relative; }

/* Conflict-suggestion chips (inline on the booking page) */
.conflict-suggest {
  background: #fff7ed; border: 1px solid #fde68a;
  padding: 12px 14px; border-radius: 10px;
}
.conflict-suggest label { font-weight: 600; color: #92400e; }
.conflict-suggest .btn { margin: 8px 6px 0 0; }

/* "Sold by …" chip on product cards */
.sold-by {
  display: inline-block;
  padding: 2px 8px;
  background: #eef2ff;
  color: #4338ca;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  margin: 4px 0;
}

/* ---------- Product gallery (detail carousel) ---------- */
.gallery { padding: 12px; }
.gallery-main {
  position: relative;
  background: var(--bg-muted);
  border-radius: var(--radius);
  min-height: 340px;
  display: grid; place-items: center;
  overflow: hidden;
  font-size: 140px; /* emoji fallback sizing */
}
.gallery-img {
  width: 100%; height: 420px;
  object-fit: contain; display: block;
}
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(255,255,255,0.9);
  font-size: 22px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; color: #111;
}
.gallery-nav:hover { background: #fff; }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-count {
  position: absolute; bottom: 10px; right: 12px;
  background: rgba(0,0,0,0.6); color: #fff;
  font-size: 12px; padding: 2px 8px; border-radius: 10px;
}
.gallery-thumbs {
  display: flex; gap: 8px; margin-top: 10px;
  overflow-x: auto; padding-bottom: 4px;
}
.gallery-thumb {
  width: 64px; height: 64px; flex: 0 0 auto;
  object-fit: cover; border-radius: 8px; cursor: pointer;
  border: 2px solid transparent; opacity: 0.7;
}
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active { border-color: var(--accent); opacity: 1; }

/* ---------- Store chips & store page ---------- */
.store-chip {
  display: inline-block; margin: 4px 0;
  font-size: 11px; font-weight: 600;
  color: var(--accent); text-decoration: none;
}
.store-chip:hover { text-decoration: underline; }
.detail-store a { color: var(--accent); font-weight: 600; }

.store-banner {
  /* Fixed dark stage in BOTH themes — store logos are white artwork. */
  background: #0a0a0a; border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px; margin: 12px 0 24px;
  display: grid; place-items: center; gap: 10px; text-align: center;
}
.store-logo { max-height: 80px; max-width: 90%; object-fit: contain; }
.store-banner h1 { color: #fff; }
.store-desc { color: rgba(255,255,255,0.85); margin: 0; max-width: 560px; }

.store-card { text-align: center; }
.store-card-logo {
  /* Fixed dark stage in BOTH themes — store logos are white artwork. */
  background: #0a0a0a; border: 1px solid var(--border); border-radius: 8px;
  height: 110px; display: grid; place-items: center;
  margin-bottom: 10px; overflow: hidden; font-size: 44px;
}
.store-card-logo img { max-height: 70px; max-width: 85%; object-fit: contain; }

/* ---------- "Sold by" store signature (on product cards) ---------- */
.store-signature {
  display: block;
  margin: 6px 0 2px;
  text-decoration: none;
  line-height: 1.1;
}
.store-signature .sig-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #888);
}
.store-signature .sig-name {
  font-family: "Segoe Script", "Brush Script MT", "Snell Roundhand", cursive;
  font-style: italic;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}
.store-signature:hover .sig-name { text-decoration: underline; }

/* ---------- Store page category sections ---------- */
.store-cat-head {
  margin: 22px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  font-size: 18px;
}
.store-cat-count { color: var(--muted, #999); font-weight: 400; font-size: 14px; }

/* ================= Bash-style storefront (store page) ================= */
.store-hero {
  background: var(--accent);
  border-radius: var(--radius);
  padding: 44px 28px; margin: 12px 0 20px;
  display: grid; place-items: center; gap: 12px; text-align: center;
}
.store-hero .store-logo { max-height: 88px; max-width: 92%; object-fit: contain; }
.store-hero-name { color: var(--accent-ink); margin: 0; }
.store-hero .store-desc { color: rgba(255,255,255,0.85); margin: 0; max-width: 620px; }

/* Toolbar: category filter chips + sort */
.bash-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px; margin-bottom: 6px;
}
.bash-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.bash-cat {
  border: 1px solid var(--border); background: #fff;
  padding: 8px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; cursor: pointer; color: #333;
  transition: all .15s;
}
.bash-cat:hover { border-color: #bbb; }
.bash-cat.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bash-sort {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px; font-size: 13px; background: #fff; cursor: pointer;
}
.bash-count { color: #888; font-size: 13px; margin: 10px 0 16px; }

/* Product grid */
.bash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px 18px;
}
.bash-card { cursor: pointer; }
.bash-media {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--bg-muted);
  border-radius: 10px; overflow: hidden;
  margin-bottom: 10px;
}
.bash-media-main, .bash-media-hover {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: opacity .35s ease;
}
.bash-media-hover { opacity: 0; }
.bash-card:hover .bash-media-hover { opacity: 1; }
.bash-card:hover .bash-media-main { opacity: 0; }
.bash-media-ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 64px; }
.bash-imgcount {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(0,0,0,0.55); color: #fff;
  font-size: 11px; padding: 2px 7px; border-radius: 10px;
}
.bash-card .fav-corner { position: absolute; top: 8px; right: 8px; z-index: 2; }
.bash-brand {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #111; margin-bottom: 2px;
}
.bash-name { font-size: 13px; color: #555; line-height: 1.35; margin-bottom: 6px; }
.bash-price { font-size: 15px; font-weight: 700; color: #111; }

/* ---------- Bash-style perk strip ---------- */
.bash-perks {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin: 4px 0 24px;
}
.bash-perk {
  display: flex; align-items: center; gap: 12px;
  background: #ece9fc; border-radius: 10px; padding: 14px 18px;
}
.bash-perk-icon { font-size: 24px; line-height: 1; }
.bash-perk-title { font-weight: 700; font-size: 14px; color: #1a1a1a; }
.bash-perk-sub { font-size: 12px; color: #555; }

/* ---------- Section titles ---------- */
.bash-section-title {
  font-size: 22px; font-weight: 800; letter-spacing: -0.01em;
  margin: 26px 0 14px;
}

/* ---------- Category hero tiles ---------- */
.bash-hero-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px; margin-bottom: 8px;
}
.bash-hero-tile {
  position: relative; border: 0; padding: 0; cursor: pointer;
  aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden;
  background: var(--bg-muted); display: block;
}
.bash-hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .4s ease;
}
.bash-hero-tile::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.55) 100%);
}
.bash-hero-tile:hover .bash-hero-img { transform: scale(1.05); }
.bash-hero-label {
  position: absolute; left: 20px; bottom: 18px; z-index: 1;
  display: flex; align-items: center; gap: 12px;
  color: #fff; font-size: 30px; font-weight: 800; letter-spacing: -0.01em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
.bash-hero-arrow { font-size: 26px; font-weight: 400; }
@media (max-width: 640px) {
  .bash-perks { grid-template-columns: 1fr; }
  .bash-hero-grid { grid-template-columns: 1fr; }
  .bash-hero-label { font-size: 24px; }
}

/* ================= Bash-identical storefront (.bashx scope) ================= */
@font-face { font-family: 'Montserrat'; src: url('/fonts/montserrat/Montserrat-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('/fonts/montserrat/Montserrat-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('/fonts/montserrat/Montserrat-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('/fonts/montserrat/Montserrat-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('/fonts/montserrat/Montserrat-ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('/fonts/montserrat/Montserrat-Black.ttf') format('truetype'); font-weight: 900; font-display: swap; }

.bashx { font-family: 'Montserrat', system-ui, sans-serif; }
.bashx h2, .bashx h1 { font-family: 'Montserrat', system-ui, sans-serif; }

/* Bars span the content column edges (into #app's gutters) without 100vw,
   so there is no horizontal overflow and position:sticky keeps working. */
.bashx-topbar, .bashx-nav {
  margin-left: -28px; margin-right: -28px;
  padding-left: 28px; padding-right: 28px;
  box-sizing: border-box;
}

/* Top black bar */
.bashx-topbar {
  background: #0a0a0a; color: #fff;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding-top: 14px; padding-bottom: 14px;
  margin-top: -32px; /* hug the very top of the content area */
}
.bashx-logo { display: inline-flex; align-items: center; }
.bashx-logo img { height: 30px; width: auto; display: block; }
.bashx-search {
  flex: 1 1 auto; max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  background: #2a2a2a; border-radius: 999px; padding: 0 18px; height: 44px;
}
.bashx-search-ic { width: 20px; height: 20px; color: #cfcfcf; display: inline-flex; }
.bashx-search-ic svg { width: 20px; height: 20px; }
.bashx-search-input {
  flex: 1; background: transparent; border: 0; outline: none;
  color: #fff; font-size: 14px; font-family: inherit;
}
.bashx-search-input::placeholder { color: #b8b8b8; }
.bashx-icons { display: flex; align-items: center; gap: 8px; }
.bashx-iconbtn {
  background: transparent; border: 0; color: #fff; cursor: pointer;
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-grid; place-items: center;
}
.bashx-iconbtn svg { width: 22px; height: 22px; }
.bashx-iconbtn:hover { background: rgba(255,255,255,0.12); }
.bashx-burger { display: none; }

/* Category nav row */
.bashx-nav {
  background: #fff; border-bottom: 1px solid var(--border);
  padding-top: 10px; padding-bottom: 10px;
  position: sticky; top: 0; z-index: 20;
  overflow-x: auto;
}
.bashx-nav-inner { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.bashx-navpill {
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 16px; border-radius: 999px;
  font-family: inherit; font-size: 14px; font-weight: 600; color: #1a1a1a;
}
.bashx-navpill.active { background: #0a0a0a; color: #fff; }
.bashx-navlink {
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 12px; font-family: inherit; font-size: 14px; font-weight: 500; color: #777;
}
.bashx-navlink:hover { color: #0a0a0a; }

/* perk icons render as svg now */
.bash-perk-icon { width: 26px; height: 26px; color: #4b3fb3; display: inline-flex; }
.bash-perk-icon svg { width: 26px; height: 26px; }

/* Section bar (title + sort on one row) */
.bashx-sectionbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* App promo banner */
.bashx-appbanner {
  background: #6c5ce7; color: #fff; border-radius: 16px;
  margin: 36px 0 8px; padding: 40px;
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; overflow: hidden;
}
.bashx-appbanner-text h2 { font-size: 34px; font-weight: 800; margin: 0 0 10px; }
.bashx-appbanner-text p { margin: 0 0 20px; max-width: 460px; color: rgba(255,255,255,0.9); }
.bashx-appbtn {
  background: #0a0a0a; color: #fff; border: 0; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 15px;
  padding: 14px 24px; border-radius: 999px;
}
.bashx-appbanner-art { display: flex; gap: 14px; }
.bashx-phone {
  width: 120px; height: 230px; border-radius: 22px;
  background: #1c1530; border: 4px solid #0a0a0a;
  display: grid; place-items: center; color: #fff;
  font-weight: 800; font-size: 15px; box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.bashx-phone-alt { background: #efeefc; color: #1c1530; margin-top: 26px; }
@media (max-width: 760px) {
  .bashx-burger { display: inline-grid; }
  .bashx-appbanner { grid-template-columns: 1fr; }
  .bashx-appbanner-art { display: none; }
  .bashx-appbanner-text h2 { font-size: 26px; }
}

/* ---------- Bash storefront responsiveness ---------- */
@media (max-width: 800px) {
  /* #app gutter is 16px at this width — align the bar breakout to it */
  .bashx-topbar, .bashx-nav { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .bashx-topbar { margin-top: -20px; gap: 12px; }
  .bashx-logo { order: 1; }
  .bashx-icons { order: 2; margin-left: auto; }
  .bashx-search { order: 3; flex: 1 1 100%; max-width: none; margin: 0; height: 40px; }
  .bashx-logo img { height: 26px; }
  .bashx-iconbtn { width: 34px; height: 34px; }
  .bashx-iconbtn svg { width: 20px; height: 20px; }
}
@media (max-width: 560px) {
  .bashx-navpill, .bashx-navlink { font-size: 13px; padding: 7px 11px; }
  .bash-section-title { font-size: 19px; }
  .bashx-appbanner { padding: 22px; }
  .bashx-appbanner-text h2 { font-size: 24px; }
}

/* ---------- Department sub-categories & placeholders ---------- */
.bashx-subhead {
  font-size: 16px; font-weight: 700; margin: 24px 0 12px;
  display: flex; align-items: baseline; gap: 6px;
  border-bottom: 1px solid var(--border); padding-bottom: 8px;
}
.bashx-subcount { color: #999; font-weight: 500; font-size: 13px; }
.bashx-placeholder {
  border: 1px dashed #cdcdcd; border-radius: 12px;
  background: repeating-linear-gradient(45deg, #fafafa, #fafafa 12px, #f3f3f3 12px, #f3f3f3 24px);
  padding: 30px; text-align: center; color: #777;
}
.bashx-placeholder-badge {
  display: inline-block; background: #0a0a0a; color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 8px;
}
.bashx-placeholder-text { font-size: 14px; }

/* Empty department hero tiles (no product image yet) */
.bash-hero-empty {
  background: linear-gradient(135deg, #2b2b3a 0%, #4b3fb3 100%);
}
.bash-hero-empty::after { background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.35) 100%); }
.bash-hero-empty .bash-hero-label::after {
  content: 'Coming soon'; position: absolute; left: 0; bottom: -20px;
  font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.8);
  text-transform: none; letter-spacing: 0;
}
.bash-hero-empty .bash-hero-label { position: relative; }

/* Garment-type sub-headings under Clothes */
.bashx-typehead {
  font-size: 14px; font-weight: 600; color: #333;
  margin: 16px 0 10px 0; padding-left: 2px;
}
.bashx-typehead .bashx-subcount { color: #aaa; font-weight: 500; }

/* ================= Tendon brand + home hero ================= */
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.brand-logo { width: 26px; height: 26px; display: block; }
.brand-word {
  font-family: 'Orbitron', system-ui, sans-serif;
  font-weight: 800; letter-spacing: 0.14em; font-size: 18px;
  color: #0a0e1a;
}

.tendon-hero {
  position: relative; overflow: hidden;
  border-radius: 20px;
  background: radial-gradient(120% 140% at 80% 0%, #122a4d 0%, #0a1224 45%, #06080f 100%);
  margin: 6px 0 8px; min-height: 420px;
  display: flex; align-items: center;
  isolation: isolate;
}
.thero-bg { position: absolute; inset: 0; z-index: 0; opacity: 0.55; }
.thero-net { width: 100%; height: 100%; display: block; animation: thero-drift 24s ease-in-out infinite alternate; }
.thero-net .thero-lines { opacity: 0.35; animation: thero-lines 6s ease-in-out infinite alternate; }
.thero-net .thero-nodes { animation: thero-nodes 4s ease-in-out infinite alternate; filter: drop-shadow(0 0 4px rgba(63,224,255,0.6)); }
@keyframes thero-drift { from { transform: translate3d(0,0,0) scale(1.02); } to { transform: translate3d(-24px,-14px,0) scale(1.08); } }
@keyframes thero-lines { from { opacity: 0.22; } to { opacity: 0.45; } }
@keyframes thero-nodes { from { opacity: 0.65; } to { opacity: 1; } }
.thero-veil {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(6,8,15,0.92) 0%, rgba(6,8,15,0.72) 42%, rgba(6,8,15,0.30) 100%);
}
.thero-inner { position: relative; z-index: 2; padding: 48px 44px; max-width: 760px; color: #eaf2ff; }
.thero-wordmark { display: flex; align-items: center; gap: 16px; }
.thero-mark { height: 54px; width: auto; filter: drop-shadow(0 0 10px rgba(63,224,255,0.5)); }
.thero-word {
  font-family: 'Orbitron', system-ui, sans-serif; font-weight: 900;
  font-size: clamp(44px, 8vw, 88px); line-height: 1; letter-spacing: 0.04em;
  color: #fff; text-shadow: 0 0 22px rgba(63,224,255,0.45), 0 2px 0 rgba(0,0,0,0.2);
}
.thero-tagline {
  font-family: 'Chakra Petch', monospace; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.22em;
  color: #7fe9ff; font-size: clamp(12px, 1.6vw, 17px);
  margin: 14px 0 18px;
}
.thero-sub { color: rgba(234,242,255,0.82); font-size: 16px; line-height: 1.6; max-width: 560px; margin: 0 0 26px; }
.thero-cta-primary {
  background: linear-gradient(135deg, #3fe0ff, #2f6bff); color: #04101f;
  font-weight: 700; border: 0; box-shadow: 0 8px 26px rgba(47,107,255,0.45);
}
.thero-cta-primary:hover { filter: brightness(1.06); }
.thero-cta-ghost {
  background: transparent; color: #eaf2ff;
  border: 1px solid rgba(127,233,255,0.45);
}
.thero-cta-ghost:hover { border-color: #7fe9ff; background: rgba(127,233,255,0.08); }
@media (max-width: 640px) {
  .thero-inner { padding: 34px 22px; }
  .thero-mark { height: 40px; }
  .tendon-hero { min-height: 360px; }
}
@media (prefers-reduced-motion: reduce) {
  .thero-net, .thero-net .thero-lines, .thero-net .thero-nodes { animation: none; }
}

/* ================= Tendon — optimum theme layer ================= */
:root {
  --brand: #2f6bff;
  --brand-cyan: #3fe0ff;
  --ink: #0b1020;
  --ink-soft: #5b6478;
  --border: #e7eaf0;
  --bg-muted: #f5f7fb;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(13, 20, 38, 0.10);
}
body { font-family: 'Montserrat', var(--font); color: var(--ink); }

/* Brand wordmark in top bar */
.brand-word { color: var(--ink); }

/* Top bar — refined, branded underline on active */
#topbar { border-bottom: 1px solid var(--border); }
#topbar nav a { font-weight: 600; position: relative; padding-bottom: 2px; }
#topbar nav a.active, #topbar nav a:hover { color: var(--ink); }
#topbar nav a.active::after, #topbar nav a:hover::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand)); border-radius: 2px;
}
.cart-link .badge { background: var(--ink); }

/* Section headings */
.section-head h2 { font-family: 'Montserrat', sans-serif; font-weight: 800; letter-spacing: -0.02em; }
.section-head .sub { color: var(--ink-soft); }

/* Buttons — premium, rounded, lift on hover */
.btn { border-radius: 999px; font-weight: 700; transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(11,16,32,0.22); }
.btn.ghost { border-color: var(--border); }
.btn.ghost:hover { border-color: var(--ink); transform: translateY(-1px); }

/* Cards — premium hover with brand tint */
.card { border-radius: 16px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(13,20,38,0.13); border-color: rgba(47,107,255,0.35); }
.card h3 { font-family: 'Montserrat', sans-serif; font-weight: 700; }

/* "N services →" / "Shop now →" affordances in brand colour */
.card .card-row a, .card a[data-link], .card .muted a { color: var(--brand); font-weight: 600; }

/* Footer — branded */
footer {
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  color: var(--ink-soft); font-size: 13px;
}
footer::before {
  content: ''; width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand));
  box-shadow: 0 0 10px rgba(63,224,255,0.5); flex: 0 0 auto;
}

/* Brand chip/badges & rating pills pick up the deeper ink */
.rating-pill { background: var(--bg-muted); }

/* ---------- SA phone field ---------- */
.phone-field .phone-row { display: flex; align-items: stretch; gap: 8px; }
.phone-cc {
  display: inline-flex; align-items: center; white-space: nowrap;
  padding: 0 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-muted); font-weight: 600; font-size: 15px;
}
.phone-field .phone-input { flex: 1; min-width: 0; }
.phone-field.invalid .phone-input { border-color: #ef4444; }
.phone-field.invalid .phone-cc { border-color: #ef4444; }
.phone-hint { color: #ef4444; font-size: 12px; margin-top: 6px; }

/* ---------- Map-backed full-address autocomplete ---------- */
.addr-field { position: relative; }
.addr-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow); max-height: 270px; overflow-y: auto;
}
.addr-item { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; cursor: pointer; font-size: 14px; }
.addr-item:hover, .addr-item:active, .addr-item.active { background: var(--bg-muted); }
.addr-pin { flex: 0 0 auto; }
.addr-note { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.addr-field.addr-verified .addr-input { border-color: var(--success); }
/* Confirmed state: swap the instruction for a green "address confirmed" cue. */
.addr-field.addr-verified .addr-note { color: var(--success); }
.addr-field.addr-verified .addr-note::before { content: "✓ "; }

/* ---------- Nav search typeahead ---------- */
#nav-search { position: relative; }
.nav-suggest {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 360px; max-width: 84vw;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); z-index: 100; overflow: hidden;
  max-height: 70vh; overflow-y: auto;
}
.ns-group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); padding: 10px 14px 4px; font-weight: 700; }
.ns-item { display: flex; gap: 10px; align-items: center; padding: 8px 14px; cursor: pointer; }
.ns-item:hover { background: var(--bg-muted); }
.ns-ic { width: 22px; text-align: center; flex: 0 0 auto; font-size: 16px; }
.ns-main { display: flex; flex-direction: column; min-width: 0; }
.ns-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ns-sub { font-size: 12px; color: var(--ink-soft); }
.ns-foot { padding: 11px 14px; border-top: 1px solid var(--border); font-weight: 700; color: var(--brand); cursor: pointer; font-size: 13px; }
.ns-foot:hover { background: var(--bg-muted); }
.ns-empty { padding: 14px; color: var(--ink-soft); font-size: 13px; }

/* ---------- Home hero: two-column + floating cards + trust ---------- */
.tendon-hero { min-height: 460px; }
.thero-grid {
  position: relative; z-index: 2; width: 100%;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 20px; align-items: center;
}
.thero-grid .thero-inner { padding: 46px 12px 46px 44px; max-width: 640px; }

/* Trust chips under CTAs */
.thero-trust { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.thero-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: #cfe8ff;
  background: rgba(127,233,255,0.08); border: 1px solid rgba(127,233,255,0.22);
  padding: 7px 13px; border-radius: 999px;
}
.thero-chip::before { content: '✓'; color: #3fe0ff; font-weight: 800; }

/* Floating category cards (right) */
.thero-aside { padding: 36px 40px 36px 8px; display: grid; gap: 13px; align-content: center; }
.thero-card {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  background: rgba(255,255,255,0.055); border: 1px solid rgba(127,233,255,0.18);
  border-radius: 14px; padding: 14px 16px; color: #eaf2ff;
  box-shadow: 0 12px 30px rgba(0,0,0,0.28);
  animation: thero-float 5.5s ease-in-out infinite;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.thero-card:hover { border-color: rgba(127,233,255,0.55); background: rgba(127,233,255,0.10); }
.thero-card:nth-child(2n) { margin-left: 34px; }
.thero-card:nth-child(3n) { margin-right: 16px; }
.thero-card-ic { font-size: 26px; line-height: 1; flex: 0 0 auto; }
.thero-card-body { flex: 1; min-width: 0; }
.thero-card-t { font-weight: 700; font-size: 15px; }
.thero-card-s { font-size: 12px; color: #7fe9ff; }
.thero-card-go { color: #7fe9ff; font-size: 18px; opacity: 0; transition: opacity .18s ease, transform .18s ease; }
.thero-card:hover .thero-card-go { opacity: 1; transform: translateX(3px); }
@keyframes thero-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@media (prefers-reduced-motion: reduce) { .thero-card { animation: none; } }
@media (max-width: 880px) {
  .thero-grid { grid-template-columns: 1fr; }
  .thero-aside { display: none; }
  .thero-grid .thero-inner { padding: 34px 22px; max-width: none; }
}

/* ---------- Centered, decluttered hero ---------- */
.tendon-hero-center { min-height: 400px; }
.tendon-hero-center .thero-veil {
  background: radial-gradient(120% 120% at 50% 40%, rgba(6,8,15,0.55) 0%, rgba(6,8,15,0.80) 70%, rgba(6,8,15,0.92) 100%);
}
.tendon-hero-center .thero-inner {
  margin: 0 auto; max-width: 720px; text-align: center;
  padding: 56px 24px;
}
.tendon-hero-center .thero-wordmark { justify-content: center; }
.tendon-hero-center .thero-sub { margin-left: auto; margin-right: auto; }
.tendon-hero-center .cta-row { justify-content: center; }
.tendon-hero-center .thero-trust { justify-content: center; }

/* ================= Products (/shop) — premium look ================= */
/* roomier product grid */
.grid { gap: 22px 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* image-forward cards */
.product-card { display: flex; flex-direction: column; border-radius: 16px; padding: 12px; }
.product-card .product-img {
  aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden;
  background: var(--bg-muted); margin-bottom: 12px; font-size: 56px;
}
.product-card .product-img img { transition: transform .3s ease; }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-card h3 {
  font-size: 15px; line-height: 1.3; margin: 2px 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card .small.muted {
  font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft);
}
.product-card .card-row { margin-top: auto; padding-top: 10px; align-items: center; }
.product-card .price { font-size: 16px; font-weight: 800; }
.rating-pill {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--bg-muted); border-radius: 999px;
  padding: 3px 9px; font-size: 12px; font-weight: 700; color: #1a1a1a;
}
.sold-by { font-size: 11px; color: var(--ink-soft); }

/* filter / sort bar */
.chips { gap: 8px; margin-bottom: 16px; }
.chip { padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--border); background: var(--bg); color: var(--ink); }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.shop-toolbar { margin: 8px 0 22px; }
.shop-search, .shop-sort { border-radius: 999px; padding: 11px 16px; }
.shop-search:focus, .shop-sort:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,107,255,0.12); }

/* Store filter chips on the Products page */
.chip-divider { width: 1px; align-self: stretch; background: var(--border); margin: 2px 4px; }
.chip-store { border-color: rgba(47,107,255,0.35); }
.chip-store.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Products header → Browse stores link */
.shop-stores-link { color: var(--brand); font-weight: 700; text-decoration: none; }
.shop-stores-link:hover { text-decoration: underline; }

/* Browse-stores pill, aligned to the right of the filter chips */
.shop-stores-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 999px; white-space: nowrap;
  border: 1px solid rgba(47,107,255,0.40); color: var(--brand);
  background: rgba(47,107,255,0.06); font-weight: 700; font-size: 13px; text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.shop-stores-btn:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
@media (max-width: 560px) { .shop-stores-btn { margin-left: 0; } }


/* ---------- Theme toggle ---------- */
.theme-toggle {
  background: transparent; border: 1px solid var(--border); border-radius: 999px;
  width: 34px; height: 34px; display: inline-grid; place-items: center;
  font-size: 15px; line-height: 1; padding: 0;
  transition: border-color .15s, background .15s;
}
.theme-toggle:hover { border-color: var(--ink); }

/* ---------- Dark theme ----------
   Everything themable runs through the :root variables, so the dark palette
   is mostly a variable swap plus a handful of hardcoded-color overrides. */
:root[data-theme="dark"] {
  --bg: #131417;
  --bg-muted: #1c1e22;
  --ink: #f1f2f4;
  --ink-soft: #9ba1ab;
  --border: #2a2d33;
  --accent: #f1f2f4;
  --accent-ink: #131417;
  --shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
:root[data-theme="dark"] .btn.primary:hover { background: #d7d9dd; }
:root[data-theme="dark"] .card:hover,
:root[data-theme="dark"] .provider-row:hover { border-color: #3b3f47; }
:root[data-theme="dark"] .hero-graphic {
  background: linear-gradient(135deg, #1b1d21 0%, #22252b 100%);
}
:root[data-theme="dark"] .field input:focus,
:root[data-theme="dark"] .field textarea:focus,
:root[data-theme="dark"] .field select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.09);
}
/* Status pills: darker chip backgrounds, brighter text */
:root[data-theme="dark"] .status.pending    { background: #3a2e10; color: #fbbf24; }
:root[data-theme="dark"] .status.confirmed  { background: #172a54; color: #93c5fd; }
:root[data-theme="dark"] .status.completed  { background: #0e3a2a; color: #6ee7b7; }
:root[data-theme="dark"] .status.cancelled  { background: #431a1a; color: #fca5a5; }
:root[data-theme="dark"] .status.en_route   { background: #272a54; color: #a5b4fc; }
:root[data-theme="dark"] .status.in_progress{ background: #113c44; color: #67e8f9; }
:root[data-theme="dark"] .status.paid       { background: #0e3a2a; color: #6ee7b7; }
:root[data-theme="dark"] .status.unpaid     { background: #3a2e10; color: #fbbf24; }
:root[data-theme="dark"] .status.requested   { background: #3a2e10; color: #fbbf24; }
:root[data-theme="dark"] .status.negotiating { background: #4a3a0c; color: #fcd34d; }
:root[data-theme="dark"] .status.accepted    { background: #172a54; color: #93c5fd; }
:root[data-theme="dark"] .status.declined    { background: #431a1a; color: #fca5a5; }

/* ---------- Booking progress stepper ---------- */
.stepper {
  display: flex; align-items: flex-start; gap: 0;
  margin: 14px 0 18px; padding: 0;
}
.stepper .step {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  position: relative; text-align: center; min-width: 0;
}
.stepper .step .dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-muted); border: 2px solid var(--border);
  font-size: 11px; font-weight: 700; color: var(--accent-ink);
  z-index: 1; transition: background .2s, border-color .2s;
}
.stepper .step .lbl { font-size: 11.5px; color: var(--ink-soft); font-weight: 500; }
.stepper .step:not(:first-child)::before {
  content: ""; position: absolute; top: 11px; right: 50%; left: -50%;
  height: 2px; background: var(--border);
}
.stepper .step.done .dot { background: var(--accent); border-color: var(--accent); }
.stepper .step.done:not(:first-child)::before { background: var(--accent); }
.stepper .step.current .dot {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}
.stepper .step.current .lbl { color: var(--ink); font-weight: 700; }
.stepper .step.current:not(:first-child)::before { background: var(--accent); }
.stepper-cancelled { margin: 14px 0 18px; }

/* ---------- Toast variants ---------- */
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }

/* ---------- Accessibility & motion ---------- */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Booking chat ---------- */
.chat-panel { margin-top: 14px; display: flex; flex-direction: column; }
.chat-list {
  max-height: 320px; overflow-y: auto; display: flex; flex-direction: column;
  gap: 8px; padding: 4px 2px; margin-bottom: 10px;
}
.chat-empty { padding: 8px 0; }
.chat-msg { max-width: 85%; align-self: flex-start; }
.chat-msg.mine { align-self: flex-end; text-align: right; }
.chat-msg .chat-body {
  display: inline-block; padding: 8px 12px; border-radius: 14px;
  background: var(--bg-muted); font-size: 14px; text-align: left;
  white-space: pre-wrap; word-break: break-word;
}
.chat-msg.mine .chat-body { background: var(--accent); color: var(--accent-ink); }
.chat-msg .chat-meta { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.chat-compose { display: flex; gap: 8px; }
.chat-compose input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 10px; font: inherit; background: var(--bg); color: var(--ink);
}
.chat-compose input:focus { outline: none; border-color: var(--ink); }

/* ---------- Quote negotiation ---------- */
.negotiation-panel {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
}
.offer-thread { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
.offer-bubble {
  max-width: 85%; align-self: flex-start; background: var(--bg-muted);
  border-radius: 12px; padding: 8px 12px; font-size: 13.5px;
}
.offer-bubble.mine { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.offer-bubble .offer-amount { font-weight: 700; }
.offer-bubble .offer-meta { font-size: 11px; opacity: .75; margin-top: 2px; }
.offer-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.offer-actions .btn { flex: 1; min-width: 100px; }
.counter-form { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.counter-form input[type="number"] { width: 120px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: var(--bg); color: var(--ink); }
.negotiation-waiting { padding: 10px 0; color: var(--ink-soft); font-size: 13.5px; }

/* ---------- Admin analytics bars ---------- */
.bar-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.bar-label {
  width: 130px; flex-shrink: 0; font-size: 12.5px; color: var(--ink-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bar-track { flex: 1; background: var(--bg-muted); border-radius: 6px; height: 18px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 6px; transition: width .4s ease; }
.bar-value { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) { .bar-value { font-size: 11px; } .bar-label { width: 90px; } }

/* ---------- Policy pages (/terms, /privacy, /refunds) ---------- */
.policy-page {
  max-width: 760px; margin: 0 auto; line-height: 1.65;
}
.policy-page h1 { font-size: 34px; letter-spacing: -0.02em; margin: 0 0 4px; }
.policy-page h2 { font-size: 19px; letter-spacing: -0.01em; margin: 28px 0 8px; }
.policy-page p, .policy-page li { font-size: 15px; }
.policy-page ul { padding-left: 22px; margin: 8px 0 16px; }
.policy-page li { margin-bottom: 8px; }
.policy-page a {
  color: var(--ink); text-decoration: underline; text-underline-offset: 2px;
}
@media (max-width: 640px) {
  .policy-page h1 { font-size: 27px; }
  .policy-page h2 { font-size: 17px; }
}

/* ---------- Footer links ---------- */
.footer-links { margin-top: 6px; }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover, .footer-links a:focus-visible {
  color: var(--ink); text-decoration: underline;
}

/* ─────────── QR inventory: field scanner (/scan) + registry ─────────── */

.inv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.inv-head h1 { margin: 0 0 .75rem; }

.inv-jobpick { display: grid; gap: .5rem; }
.inv-job-label { font-weight: 600; font-size: 1.05rem; }
.inv-job-label.muted { font-weight: 400; }
.inv-job-select, .inv-code-input, .inv-cond, .inv-manual-job { padding: .6rem .7rem; font-size: 1rem; }
.inv-manual-job-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.inv-manual-job-row select, .inv-manual-job-row input { flex: 1 1 6rem; min-width: 0; }

/* Direction picker — deliberately large: this gets tapped with cold hands. */
.inv-dirs { display: flex; gap: .5rem; margin: .75rem 0; }
.inv-dirs .btn { flex: 1; padding: .9rem .5rem; font-size: 1rem; }

.inv-sync {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  padding: .55rem .8rem; border-radius: 8px; margin-bottom: .75rem;
  background: var(--panel, #f4f4f5); font-size: .9rem;
}
.inv-sync.warn { background: #fff4e5; color: #7a4b00; }
[data-theme="dark"] .inv-sync.warn { background: #3a2a12; color: #ffd8a3; }
.inv-sync .btn { margin-left: auto; }

.inv-camera { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #000; border-radius: 10px; overflow: hidden; display: none; }
.inv-camera.live { display: block; }
.inv-video { width: 100%; height: 100%; object-fit: cover; }
.inv-camera-controls { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin: .6rem 0; }

.inv-code-form { display: flex; gap: .5rem; margin-top: .5rem; }
.inv-code-form .inv-code-input { flex: 1; text-transform: uppercase; letter-spacing: .04em; }
.inv-cond-wrap { display: flex; align-items: center; gap: .6rem; margin-top: .6rem; flex-wrap: wrap; }

.inv-scan-list { display: grid; gap: .25rem; }
.inv-scan-row { display: grid; grid-template-columns: 1.4rem auto 1fr auto; gap: .5rem; align-items: baseline; padding: .35rem 0; border-bottom: 1px solid var(--line, #e5e5e5); font-size: .92rem; }
.inv-scan-icon { text-align: center; }
.inv-scan-row.synced .inv-scan-icon { color: #1a7f37; }
.inv-scan-row.pending .inv-scan-icon { color: #9a6700; }
.inv-scan-row.rejected .inv-scan-icon { color: #c4271b; }
.inv-scan-row.rejected .inv-scan-name { color: #c4271b; }
.inv-scan-code { font-weight: 600; font-variant-numeric: tabular-nums; }
.inv-scan-name { color: var(--muted, #666); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-scan-dir { font-size: .8rem; color: var(--muted, #666); }

/* Check-in mode gets its own accent so the direction is obvious at a glance. */
.mode-collect .inv-sync { border-left: 4px solid #1a7f37; }

.inv-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .6rem; }
.inv-stat { padding: .6rem .7rem; border-radius: 8px; background: var(--panel, #f4f4f5); }
.inv-stat-cat { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #666); }
.inv-stat-num { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.inv-disc { padding: .7rem 0; border-bottom: 1px solid var(--line, #e5e5e5); }
.inv-disc-head { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
.inv-disc-nums { display: flex; gap: .8rem; flex-wrap: wrap; margin: .3rem 0; font-size: .9rem; }
.inv-disc-nums .bad { color: #c4271b; font-weight: 600; }
.inv-disc-items { margin-bottom: .4rem; }
.inv-disc-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.inv-disc-actions input { flex: 1 1 12rem; padding: .45rem .6rem; }

.inv-items-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.inv-items { display: grid; gap: .3rem; margin-top: .6rem; }
.inv-item-row { display: grid; grid-template-columns: 2.5rem 1fr auto; gap: .7rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line, #e5e5e5); }
.inv-qr-thumb { width: 2.5rem; height: 2.5rem; image-rendering: pixelated; background: #fff; border-radius: 4px; }
.inv-pill { font-size: .75rem; padding: .15rem .5rem; border-radius: 999px; white-space: nowrap; }
.inv-pill.in { background: #e6f4ea; color: #1a7f37; }
.inv-pill.out { background: #fdeceb; color: #c4271b; }
[data-theme="dark"] .inv-pill.in { background: #14301d; color: #7ee2a8; }
[data-theme="dark"] .inv-pill.out { background: #3a1a18; color: #ff9b92; }

.inv-add { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: .6rem; align-items: end; }
@media (max-width: 640px) {
  .inv-add { grid-template-columns: 1fr; }
  .inv-item-row { grid-template-columns: 2rem 1fr; }
  .inv-item-row .inv-pill { grid-column: 2; justify-self: start; }
}

/* ─────────── Mobile header (fixed 2026-09-13) ───────────
   The header was a single non-wrapping flex row. On a 390px phone it measured
   586px, so Cart, Sign in and the theme toggle sat off-screen and every page
   scrolled sideways. Below 720px the brand keeps its own line, the links wrap
   underneath, and the search box drops to full width — nothing is hidden and
   nothing needs a second tap to reach. */
@media (max-width: 720px) {
  #topbar {
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 10px 16px;
  }
  #topbar .brand { flex: 0 0 auto; }

  #topbar nav {
    flex: 1 1 100%;
    order: 3;
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: flex-start;
  }

  /* Search takes its own full-width row — it is the widest item by far. */
  #topbar nav #nav-search { flex: 1 1 100%; order: 2; }
  #topbar nav #nav-search-input { width: 100%; box-sizing: border-box; font-size: 16px; }

  /* Comfortable tap targets. 16px on the input also stops iOS zooming the
     page when it receives focus.
     The :not([hidden]) is load-bearing: `display: inline-flex` here would
     otherwise beat the UA stylesheet's `[hidden] { display: none }` and
     reveal every conditional link — Cart and Products with the shop off,
     Dashboard/Sell/Admin to signed-out visitors. */
  #topbar nav a:not([hidden]),
  #topbar nav button:not([hidden]) {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    font-size: 15px;
  }
  #topbar nav [hidden] { display: none !important; }
  #topbar nav .theme-toggle { margin-left: auto; }

  /* The suggestion dropdown is anchored to the search form, which is now
     full-width, so it should be too. */
  #topbar .nav-suggest { width: 100%; left: 0; right: 0; }
}

/* Visible only to screen readers — used to label controls that are clear
   enough visually from their placeholder or position. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   UI system pass — 14 September 2026
   --------------------------------------------------------------------------
   Loaded last on purpose: this is the layer that fixes the phone layout and
   tightens the shared controls, so it has to win over the base and brand
   layers above without either being rewritten.
   ========================================================================== */

:root {
  /* Type scale — fluid, so a long service name doesn't eat a phone screen */
  --t-display: clamp(28px, 6vw, 40px);
  --t-h2: clamp(20px, 3.4vw, 26px);
  --t-h3: clamp(16px, 2.4vw, 18px);
  --t-body: 15px;
  --t-small: 13px;
  --t-micro: 11.5px;

  /* Spacing rhythm */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(13, 20, 38, .06), 0 1px 3px rgba(13, 20, 38, .05);
  --shadow-md: 0 4px 12px rgba(13, 20, 38, .08), 0 2px 4px rgba(13, 20, 38, .04);
  --shadow-lg: 0 16px 40px rgba(13, 20, 38, .14);

  /* Tap target floor — phones, gloves, cold hands on a job site */
  --tap: 44px;
}

/* ---------- Headings that stop colliding with their subtitles ----------
   .section-head was a no-wrap flex row, so on a phone the subtitle ran
   straight through the heading. It now wraps to its own line. */
.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: var(--sp-1) var(--sp-3);
  margin: var(--sp-6) 0 var(--sp-4);
}
.section-head h2 { font-size: var(--t-h2); line-height: 1.2; }
.section-head h3 { font-size: var(--t-h3); line-height: 1.25; margin: 0; }
.section-head .sub {
  font-size: var(--t-small); line-height: 1.45; color: var(--ink-soft);
  flex: 1 1 260px; min-width: 0;
}
@media (max-width: 640px) {
  .section-head { gap: 2px; }
  .section-head .sub { flex-basis: 100%; }
}

/* ---------- Label / value rows that don't overlap ----------
   Two columns that collapse to stacked rows when the value is prose
   (a booking's notes ran into its own label before). */
.panel .line {
  display: grid; grid-template-columns: minmax(84px, auto) 1fr;
  gap: var(--sp-2) var(--sp-4); align-items: baseline;
  padding: var(--sp-2) 0; font-size: var(--t-body);
}
.panel .line > :first-child { color: var(--ink-soft); font-size: var(--t-small); }
.panel .line > :last-child { text-align: right; min-width: 0; overflow-wrap: anywhere; }
/* A pill sizes to its label — without this the grid cell stretches it into a
   full-width bar. */
.panel .line > .status { justify-self: end; width: max-content; }
.panel .line.stacked { grid-template-columns: 1fr; }
.panel .line.stacked > :last-child { text-align: left; }
@media (max-width: 520px) {
  .panel .line.wrap-sm { grid-template-columns: 1fr; }
  .panel .line.wrap-sm > :last-child { text-align: left; }
}

/* ---------- Controls: one height, one radius, real focus rings ---------- */
.btn {
  min-height: var(--tap); padding: 11px 20px;
  font-size: 14.5px; line-height: 1.2; gap: var(--sp-2);
}
.btn.sm { min-height: 36px; padding: 7px 14px; font-size: 13px; }
.btn.ghost { background: var(--bg); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn.quiet:hover { color: var(--ink); background: var(--bg-muted); }
.btn[disabled], .btn[disabled]:hover { opacity: .5; transform: none; box-shadow: none; }
.btn:focus-visible,
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}

.field label { font-size: var(--t-small); letter-spacing: .01em; }
.field input, .field textarea, .field select {
  min-height: var(--tap); border-radius: 12px; padding: 12px 14px;
  /* 16px keeps iOS from zooming the whole page when a field takes focus */
  font-size: 16px;
}
.field textarea { min-height: 88px; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .14);
}
@media (min-width: 641px) {
  .field input, .field textarea, .field select { font-size: 15px; }
}

/* ---------- Panels ---------- */
.panel {
  padding: var(--sp-5); border: 1px solid var(--border); background: var(--bg);
  box-shadow: var(--shadow-sm);
}
.panel h3 { font-size: var(--t-h3); }
@media (max-width: 640px) { .panel { padding: var(--sp-4); border-radius: 14px; } }

/* ---------- Stat + earnings grids: two up on a phone, never one ---------- */
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { border: 1px solid var(--border); background: var(--bg); box-shadow: var(--shadow-sm); }
.stat .label { font-size: var(--t-micro); }
.stat .value { font-size: clamp(19px, 4.4vw, 24px); }
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
  .stat { padding: var(--sp-3); }
}
@media (max-width: 340px) { .stats-grid { grid-template-columns: 1fr; } }

/* ---------- The week calendar scrolls itself instead of the page ---------- */
.calendar-panel { overflow: hidden; }
.calendar-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 720px) {
  .calendar-scroll .calendar-grid { min-width: 620px; }
}

/* ==========================================================================
   Booking detail — the spine of the product
   ========================================================================== */

/* Header: the service is context, the provider and state are the story. */
.booking-head { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3);
  align-items: flex-start; justify-content: space-between; margin-bottom: var(--sp-3); }
.booking-head .bh-title { min-width: 0; flex: 1 1 200px; }
.booking-head .bh-service {
  font-size: var(--t-micro); font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-soft);
  /* Service names run long ("Electrical Wiring, Lighting Design, Installation
     and Inspection") — as an eyebrow it should never outweigh the heading. */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.booking-head h2 { margin: 2px 0 0; font-size: var(--t-h2); line-height: 1.2; letter-spacing: -0.02em; }

.booking-party { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-3) 0; }
.booking-party .avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 22px;
  background: var(--bg-muted); border: 1px solid var(--border);
}
.booking-party .who { min-width: 0; }
.booking-party .who strong { display: block; font-size: 15px; }
.booking-party .who span { font-size: var(--t-small); color: var(--ink-soft); }

/* The money, said once, loudly. */
.quote-hero {
  border: 1px solid var(--border); border-radius: 14px;
  padding: var(--sp-4); margin: var(--sp-4) 0;
  background: linear-gradient(180deg, var(--bg-muted), var(--bg));
}
.quote-hero .qh-label {
  font-size: var(--t-micro); font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-soft);
}
.quote-hero .qh-amount {
  font-size: var(--t-display); font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.05; margin-top: 2px;
}
.quote-hero .qh-note { font-size: var(--t-small); color: var(--ink-soft); margin-top: var(--sp-2); }
.quote-hero.is-agreed { border-color: rgba(47, 107, 255, .45); }
.quote-hero.is-settled { border-color: rgba(16, 185, 129, .45); }
.quote-hero .qh-strike { text-decoration: line-through; opacity: .55; font-size: 15px; font-weight: 600; }

/* Offer thread — reads as a conversation about money, not a log. */
.offer-thread { gap: var(--sp-2); }
.offer-bubble {
  border: 1px solid var(--border); border-radius: 14px 14px 14px 4px;
  padding: 10px var(--sp-3); box-shadow: var(--shadow-sm); background: var(--bg);
}
.offer-bubble.mine {
  border-radius: 14px 14px 4px 14px;
  background: var(--accent); color: var(--accent-ink); border-color: transparent;
}
.offer-bubble .offer-amount { font-size: 16px; letter-spacing: -0.01em; }
.offer-bubble .offer-meta { font-size: var(--t-micro); }
.offer-bubble.superseded { opacity: .6; }

/* Action area: one obvious primary, everything else quieter. */
.negotiation-panel { border-top: 1px solid var(--border); padding-top: var(--sp-4); }
.negotiation-panel > p { font-size: 14.5px; line-height: 1.5; }
.offer-actions { gap: var(--sp-2); }
.offer-actions .btn { flex: 1 1 140px; }
.counter-form {
  display: grid; grid-template-columns: 130px 1fr auto; gap: var(--sp-2);
  align-items: center; margin-top: var(--sp-3);
}
.counter-form input[type="number"], .counter-form input[type="text"] {
  min-height: var(--tap); width: 100%; font-size: 16px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg); color: var(--ink);
}
.counter-form input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .14);
}
@media (max-width: 560px) {
  .counter-form { grid-template-columns: 1fr; }
  .counter-form .btn { width: 100%; }
}
.negotiation-waiting {
  display: flex; align-items: flex-start; gap: var(--sp-2);
  background: var(--bg-muted); border-radius: 12px; padding: var(--sp-3);
  font-size: 14px; color: var(--ink-soft);
}
.negotiation-waiting::before { content: '⏳'; flex: 0 0 auto; }

/* The one thing to do next. Rendered once, and on a phone it sticks to the
   bottom of the screen so it's always in reach without scrolling back. */
.action-dock { margin-top: var(--sp-4); }
.action-dock .dock-note { font-size: var(--t-small); color: var(--ink-soft); margin: var(--sp-2) 0 0; }
@media (max-width: 720px) {
  /* Fixed to the viewport rather than sticky inside the card: sticky made the
     bar float over the quote history mid-scroll. Fixed takes it out of flow,
     and body.has-action-dock reserves the height so nothing ends up
     permanently hidden underneath it. */
  .action-dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    margin: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(13, 20, 38, .06);
  }
  .action-dock .btn { width: 100%; }
  .action-dock .offer-actions { margin: 0; }
  .action-dock .offer-actions .btn { flex: 1 1 0; }
  .action-dock .dock-note { text-align: center; margin: 6px 0 0; font-size: var(--t-micro); }
  body.has-action-dock #app { padding-bottom: 132px; }
}

/* ---------- Progress stepper: readable at 390px ---------- */
.stepper { gap: 2px; margin: var(--sp-4) 0; }
.stepper .step .lbl { font-size: var(--t-micro); line-height: 1.25; }
.stepper .step .dot { width: 20px; height: 20px; }
.stepper .step:not(:first-child)::before { top: 10px; }
@media (max-width: 420px) {
  .stepper .step .lbl { font-size: 10px; letter-spacing: -0.01em; }
}

/* ---------- Timeline: a feed, not a bulleted list ---------- */
.timeline-list { list-style: none; margin: 0; padding: 0; }
.timeline-item { display: flex; gap: var(--sp-3); padding: var(--sp-3) 0; position: relative; }
.timeline-item + .timeline-item { border-top: 1px solid var(--border); }
.timeline-icon {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px;
  background: var(--bg-muted); border: 1px solid var(--border);
}
.timeline-body { min-width: 0; }
.timeline-head { display: flex; flex-wrap: wrap; gap: 2px var(--sp-2); align-items: baseline; }
.timeline-head strong { font-size: 14px; line-height: 1.35; }
.timeline-text { margin-top: 2px; line-height: 1.45; }

/* ---------- Bookings list rows ---------- */
.provider-row { border-radius: 14px; box-shadow: var(--shadow-sm); align-items: flex-start; }
.provider-row .price-col { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.provider-row .price-col .btn { white-space: nowrap; }
@media (max-width: 560px) {
  .provider-row { flex-wrap: wrap; gap: var(--sp-3); padding: var(--sp-3); }
  .provider-row .avatar { width: 40px; height: 40px; font-size: 20px; }
  .provider-row .info { flex: 1 1 60%; }
  .provider-row .price-col { flex: 1 1 100%; align-items: stretch; text-align: left; }
  .provider-row .price-col .btn { width: 100%; }
}

/* ==========================================================================
   Provider dashboard — job cards instead of a wall of small print
   ========================================================================== */
.job-card {
  border: 1px solid var(--border); border-radius: 14px; background: var(--bg);
  box-shadow: var(--shadow-sm); padding: var(--sp-4); margin-top: var(--sp-3);
}
.job-card + .job-card { margin-top: var(--sp-3); }
.job-card .job-top {
  display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: flex-start;
  justify-content: space-between;
}
.job-card .job-service { font-weight: 700; font-size: 15px; line-height: 1.3; min-width: 0; }
.job-card .job-when { font-size: var(--t-small); color: var(--ink-soft); margin-top: 2px; }
.job-card .job-amount { font-weight: 800; letter-spacing: -0.01em; font-size: 17px; }
.job-card .job-meta {
  display: grid; gap: 2px; margin-top: var(--sp-3);
  font-size: var(--t-small); color: var(--ink-soft);
}
.job-card .job-meta strong { color: var(--ink); font-weight: 600; }
.job-card .job-notes {
  margin-top: var(--sp-2); padding: var(--sp-2) var(--sp-3);
  background: var(--bg-muted); border-radius: 10px;
  font-size: var(--t-small); line-height: 1.45;
}
.job-card .job-actions {
  display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3);
}
.job-card .job-actions .btn { flex: 0 1 auto; }
@media (max-width: 480px) {
  .job-card .job-actions .btn { flex: 1 1 calc(50% - var(--sp-2)); }
  .job-card .job-actions .btn.block { flex-basis: 100%; }
}
.quote-form { display: grid; grid-template-columns: 140px 1fr auto; gap: var(--sp-2); margin-top: var(--sp-3); }
.quote-form input {
  min-height: var(--tap); width: 100%; font-size: 16px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--ink);
}
.quote-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,107,255,.14); }
@media (max-width: 560px) { .quote-form { grid-template-columns: 1fr; } .quote-form .btn { width: 100%; } }

/* ---------- Dark mode for everything added above ---------- */
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .stat,
:root[data-theme="dark"] .job-card,
:root[data-theme="dark"] .offer-bubble,
:root[data-theme="dark"] .quote-hero { background: #14161b; border-color: #262a33; }
:root[data-theme="dark"] .quote-hero { background: linear-gradient(180deg, #181b21, #14161b); }
:root[data-theme="dark"] .offer-bubble.mine { background: var(--accent); border-color: transparent; }
:root[data-theme="dark"] .job-card .job-notes,
:root[data-theme="dark"] .negotiation-waiting,
:root[data-theme="dark"] .timeline-icon { background: #1b1e25; }
:root[data-theme="dark"] .btn.ghost { background: transparent; }
:root[data-theme="dark"] .action-dock { background: color-mix(in srgb, #0f1115 92%, transparent); border-top-color: #262a33; }
:root[data-theme="dark"] .counter-form input,
:root[data-theme="dark"] .quote-form input { background: #14161b; border-color: #262a33; color: var(--ink); }

/* Payout history rows: four fixed columns don't fit a phone — the status pill
   was pushed off the right edge and took the whole page with it. */
@media (max-width: 560px) {
  .payout-row {
    grid-template-columns: 1fr auto; gap: 4px var(--sp-2);
    padding: var(--sp-3);
  }
  .payout-row > :nth-child(3) { grid-column: 1 / -1; }
}

/* ---------- Mobile header: two compact rows instead of four ----------
   The previous pass fixed the sideways scroll by letting the header wrap, but
   on a 390px phone that left brand / links / more links / search stacked up —
   about 370px of a 844px screen gone before any content. Now the links sit on
   one horizontally-scrollable line (nothing hidden, still one tap) and the
   search box gives way to a link to the search page. */
.nav-search-link { display: none; }

@media (max-width: 720px) {
  #topbar { padding: 8px 16px; gap: 6px 12px; }
  #topbar .brand { font-size: 18px; }

  #topbar nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding-bottom: 2px;
  }
  #topbar nav::-webkit-scrollbar { display: none; }
  #topbar nav a:not([hidden]), #topbar nav button:not([hidden]) {
    min-height: 36px; white-space: nowrap; flex: 0 0 auto; font-size: 14.5px;
  }

  /* The box is the single widest thing in the header; the link costs nothing. */
  #topbar nav #nav-search { display: none; }
  .nav-search-link { display: inline-flex; }

  /* The toggle is the last item in a scrolling row, so it can't be pushed
     right with margin — it just rides along at the end. */
  #topbar nav .theme-toggle { margin-left: 0; }
}

/* ---------- Touch targets on the last few small links ----------
   Breadcrumb, footer and brand links were 15–27px tall. Padding grows the hit
   area without changing how they look, so they're reachable with a thumb. */
@media (max-width: 720px) {
  .breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
  .breadcrumb a { padding: 10px 2px; display: inline-flex; align-items: center; }
  .footer-links a { padding: 8px 2px; display: inline-flex; align-items: center; }
  #topbar .brand { padding: 6px 0; }
}

/* ---------- "Priced per job" tag ----------
   Sits where a price used to. It's information, not a number, so it reads as
   a quiet label rather than competing with the product prices in the shop. */
.quote-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  color: var(--ink-soft);
  background: var(--bg-muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 10px;
}
.quote-tag::before { content: '🧾'; font-size: 12px; }
.card .price.quote-tag { font-weight: 600; }
:root[data-theme="dark"] .quote-tag { background: #1b1e25; border-color: #262a33; }
