/* ═══════════════════════════════════════════════════════════════════════
   WorkToGo — Design System CSS
   Mobile-first. Clean. Fast. Production-ready.
   ═══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=DM+Mono:wght@400;500&display=swap');

/* ── Variables ─────────────────────────────────────────────────────────── */

:root {
  /* Colors */
  --clr-bg:         #0C0D12;
  --clr-surface:    #13141C;
  --clr-surface-2:  #1A1B27;
  --clr-border:     rgba(255,255,255,0.07);
  --clr-border-2:   rgba(255,255,255,0.12);

  --clr-primary:    #6C63FF;
  --clr-primary-2:  #8B83FF;
  --clr-accent:     #A855F7;
  --clr-success:    #22C55E;
  --clr-warning:    #F59E0B;
  --clr-danger:     #EF4444;
  --clr-info:       #3B82F6;

  --clr-text:       #F1F1F5;
  --clr-text-2:     #9899A6;
  --clr-text-3:     #5E5F6E;

  --market-bg:      #fffaf3;
  --market-surface: #ffffff;
  --market-soft:    #f5f1ea;
  --market-text:    #171717;
  --market-muted:   #6f6a61;
  --market-line:    rgba(24,24,24,0.08);
  --market-orange:  #ff6b00;
  --market-green:   #16a34a;

  /* Typography */
  --font-body:  'DM Sans', sans-serif;
  --font-mono:  'DM Mono', monospace;

  /* Spacing */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  16px;
  --sp-lg:  24px;
  --sp-xl:  32px;

  /* Radius */
  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-full: 9999px;

  /* Nav — fixed icon area height */
  --nav-h:  70px;

  /* Transitions */
  --ease:   cubic-bezier(0.4, 0, 0.2, 1);
  --dur:    200ms;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 12% -10%, rgba(34,197,94,0.10), transparent 28%),
    radial-gradient(circle at 88% 0%, rgba(108,99,255,0.12), transparent 30%),
    var(--clr-bg);
  color: var(--clr-text);
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
  touch-action: manipulation;
}

body.modal-open { overflow: hidden; overscroll-behavior: none; }

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── App Container ─────────────────────────────────────────────────────── */

#app {
  min-height: 100dvh;
  position: relative;
}

/* ── FIX: iOS safe-area-inset-bottom support
   Pages with bottom nav need extra padding so content
   isn't hidden behind the iPhone home indicator.       ─────────────────── */
.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  /* Account for nav height + iOS home indicator */
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
  animation: pageEnter 180ms var(--ease) both;
}

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

.feature-hidden { display: none !important; }

.trust-panel {
  display: grid;
  gap: 8px;
  margin-top: var(--sp-md);
  padding: var(--sp-md);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.04);
  color: var(--clr-text-2);
  font-size: 0.78rem;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  font-weight: 800;
  font-size: 0.84rem;
  box-shadow: 0 12px 28px rgba(34,197,94,0.22);
}

.hero-primary { width: auto; padding-left: 18px; padding-right: 18px; }

.btn-whatsapp.compact { min-height: 36px; padding: 0 14px; }

.btn-ghost-inline {
  min-height: 42px;
  padding: 0 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--clr-border-2);
  color: var(--clr-text);
  font-weight: 700;
  font-size: 0.84rem;
  background: rgba(255,255,255,0.05);
}

.booking-trust-panel { margin-bottom: var(--sp-md); }

.btn-text-inline {
  color: var(--clr-primary-2);
  font-size: 0.78rem;
  font-weight: 700;
  min-height: 36px;
}

/* ── Loading ───────────────────────────────────────────────────────────── */

.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100dvh;
}

.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--clr-border-2);
  border-top-color: var(--clr-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ─────────────────────────────────────────────────────────────── */

.wtg-toast {
  position: fixed;
  /* FIX: account for safe area so toast sits above home indicator */
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--clr-surface-2);
  color: var(--clr-text);
  padding: 12px 20px;
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  border: 1px solid var(--clr-border-2);
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wtg-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-success { border-color: var(--clr-success); }
.toast-error   { border-color: var(--clr-danger);  }
.toast-info    { border-color: var(--clr-primary);  }

/* ── Bottom Nav ────────────────────────────────────────────────────────── */

.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  /* FIX: grow to cover the iOS home indicator area */
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(19, 20, 28, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--clr-border);
  display: flex;
  align-items: flex-start;  /* align to top so safe-area padding pushes items up */
  padding-top: 12px;        /* visually centre icons in the 70px icon zone */
  z-index: 100;
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 4px;
  color: var(--clr-text-3);
  transition: color var(--dur) var(--ease);
  -webkit-tap-highlight-color: transparent;
  /* FIX: ensure minimum tap target */
  min-height: 44px;
  justify-content: center;
}

.nav-item svg {
  width: 22px; height: 22px;
  stroke: currentColor;
  transition: transform var(--dur) var(--ease);
}

.nav-item span {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav-item.active {
  color: var(--clr-primary-2);
}

.nav-item.active svg {
  transform: translateY(-2px);
}

/* ── Page Header ───────────────────────────────────────────────────────── */

.page-header {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md) var(--sp-md) var(--sp-sm);
  position: sticky;
  top: 0;
  background: var(--clr-bg);
  z-index: 50;
  border-bottom: 1px solid var(--clr-border);
}

.page-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  flex: 1;
}

.page-header.no-back {
  padding-left: var(--sp-md);
}

.btn-back-nav {
  width: 44px; height: 44px;  /* FIX: 44px min touch target */
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  color: var(--clr-text-2);
  transition: background var(--dur);
  flex-shrink: 0;
}

.btn-back-nav:active { background: var(--clr-surface); }
.btn-back-nav svg { width: 20px; height: 20px; }

/* ── Refresh Dot ───────────────────────────────────────────────────────── */

.refresh-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--clr-success);
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity var(--dur), transform var(--dur);
}

.refresh-dot.pulse {
  opacity: 1;
  transform: scale(1.5);
}

/* ── Tab Bar ───────────────────────────────────────────────────────────── */

.tab-bar {
  display: flex;
  gap: var(--sp-sm);
  padding: var(--sp-md);
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar { display: none; }

.tab {
  padding: 10px 18px;  /* FIX: larger tap target */
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--clr-text-2);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  white-space: nowrap;
  transition: all var(--dur) var(--ease);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  min-height: 40px;
}

.tab.active {
  background: var(--clr-primary);
  color: #fff;
  border-color: transparent;
}

/* ── List Container ────────────────────────────────────────────────────── */

.list-container {
  flex: 1;
  padding: 0 var(--sp-md) var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

/* ── List Item ─────────────────────────────────────────────────────────── */

.list-item {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
  padding: var(--sp-md);
  cursor: pointer;
  transition: background var(--dur), border-color var(--dur), transform var(--dur);
  -webkit-tap-highlight-color: transparent;
}

.list-item:active {
  background: var(--clr-surface-2);
  transform: scale(0.98);
}

.booking-item { align-items: flex-start; }
.request-status-pill-row,
.request-success-pill-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 2px 0 4px;
}
.request-mini-pill,
.request-state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: var(--r-full);
  border: 1px solid var(--clr-border);
  background: var(--clr-surface-2);
  color: var(--clr-text-2);
  font-size: 0.72rem;
  font-weight: 800;
}
.request-mini-pill.free,
.request-state-pill.active { border-color: rgba(34,197,94,0.34); background: rgba(34,197,94,0.12); color: var(--clr-success); }
.request-mini-pill.paid { border-color: rgba(37,99,235,0.32); background: rgba(37,99,235,0.10); color: #60a5fa; }
.request-mini-pill.payment-pending { border-color: rgba(245,158,11,0.34); background: rgba(245,158,11,0.12); color: #f59e0b; }

.item-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--clr-surface-2);
  border-radius: var(--r-sm);
}

.item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
}

.booking-item .item-row {
  align-items: flex-start;
  flex-wrap: wrap;
}

/* ── Booking card collapse / expand ──────────────────────────── */
.booking-item { cursor: pointer; }
.booking-item.collapsed .booking-detail { display: none; }
.booking-item .booking-detail { display: block; padding-top: 4px; }

.booking-chevron {
  margin-left: auto;
  flex-shrink: 0;
  width: 10px; height: 10px;
  border-right: 2px solid var(--clr-text-3);
  border-bottom: 2px solid var(--clr-text-3);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.booking-item:not(.collapsed) .booking-chevron {
  transform: rotate(-135deg);
}

.item-title {
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-amount {
  font-weight: 700;
  color: var(--clr-primary-2);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.muted { color: var(--clr-text-2); font-size: 0.8125rem; }
.small { font-size: 0.75rem; }

.chevron { width: 16px; height: 16px; color: var(--clr-text-3); flex-shrink: 0; }

.vendor-row {
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
}

.vendor-icon { width: 14px; height: 14px; stroke: var(--clr-text-3); flex-shrink: 0; }

/* ── Status Badge ──────────────────────────────────────────────────────── */

.status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--r-full);
  white-space: nowrap;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.status-pending    { background: rgba(245,158,11,0.15); color: #F59E0B; }
.status-confirmed  { background: rgba(59,130,246,0.15); color: #60A5FA; }
.status-processing { background: rgba(168,85,247,0.15); color: #C084FC; }
.status-shipped    { background: rgba(14,165,233,0.15); color: #38BDF8; }
.status-success    { background: rgba(34,197,94,0.15);  color: #4ADE80; }
.status-cancelled  { background: rgba(239,68,68,0.15);  color: #F87171; }
.status-default    { background: var(--clr-surface-2);  color: var(--clr-text-2); }

/* ── Skeleton ──────────────────────────────────────────────────────────── */

@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

.skel {
  background: linear-gradient(90deg,
    var(--clr-surface) 0%,
    var(--clr-surface-2) 50%,
    var(--clr-surface) 100%
  );
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r-sm);
}

.skeleton-card {
  background: var(--clr-surface);
  border-radius: var(--r-md);
  border: 1px solid var(--clr-border);
  padding: var(--sp-md);
  width: 160px;
  flex-shrink: 0;
}

.skel-img  { height: 100px; width: 100%; margin-bottom: 8px; }
.skel-line { height: 14px; width: 80%; margin-bottom: 6px; }
.skel-line.short { width: 50%; }

.skeleton-row {
  background: var(--clr-surface);
  border-radius: var(--r-md);
  border: 1px solid var(--clr-border);
  padding: var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Empty / Error State ───────────────────────────────────────────────── */

.empty-state, .error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: var(--sp-xl) var(--sp-md);
  text-align: center;
  color: var(--clr-text-2);
  flex: 1;
  min-height: 200px;
}

.empty-icon { font-size: 2.5rem; }
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--clr-text); }
.empty-state p, .error-state p  { font-size: 0.875rem; }

/* FIX: Retry button for error states */
.btn-retry {
  margin-top: var(--sp-xs);
  padding: 10px 28px;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border-2);
  border-radius: var(--r-full);
  color: var(--clr-text);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur), transform var(--dur), border-color var(--dur);
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;  /* touch target */
}

.btn-retry:active {
  transform: scale(0.97);
  background: var(--clr-border-2);
}

/* ═══════════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════════════ */

.login-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-xl) var(--sp-lg);
  /* FIX: account for iOS safe area at bottom */
  padding-bottom: calc(var(--sp-xl) + env(safe-area-inset-bottom, 0px));
  position: relative;
  overflow: hidden;
}

.login-glow {
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 500px;
  background: radial-gradient(ellipse, rgba(108,99,255,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.login-header {
  text-align: center;
  margin-bottom: var(--sp-xl);
  animation: fadeUp 0.5s var(--ease);
}

.logo-mark {
  width: 64px; height: 64px;
  margin: 0 auto var(--sp-md);
}

.logo-mark svg { width: 100%; height: 100%; border-radius: 16px; }

.app-title {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 30%, var(--clr-primary-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-tagline {
  color: var(--clr-text-2);
  font-size: 0.875rem;
  margin-top: 4px;
}

.login-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-xl);
  padding: var(--sp-lg);
  width: 100%;
  max-width: 400px;
  animation: fadeUp 0.5s 0.1s var(--ease) both;
}

.login-step { display: none; }
.login-step.active { display: block; animation: fadeUp 0.3s var(--ease); }

.login-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-xs);
  padding: 4px;
  margin-bottom: var(--sp-lg);
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
}

.login-tab {
  min-height: 40px;
  border-radius: calc(var(--r-md) - 4px);
  color: var(--clr-text-2);
  font-size: 0.875rem;
  font-weight: 700;
  transition: background var(--dur), color var(--dur);
}

.login-tab.active {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
  color: #fff;
}

.login-step h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--sp-xs);
}

.step-hint {
  color: var(--clr-text-2);
  font-size: 0.875rem;
  margin-bottom: var(--sp-lg);
}

.input-group {
  display: flex;
  align-items: center;
  background: var(--clr-surface-2);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--dur);
  margin-bottom: var(--sp-md);
}

.input-group:focus-within { border-color: var(--clr-primary); }

.input-prefix {
  padding: 14px 12px 14px 16px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--clr-text-2);
  border-right: 1px solid var(--clr-border);
  flex-shrink: 0;
}

.input-group input {
  flex: 1;
  padding: 14px 16px;
  background: none;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--clr-text);
  /* FIX: prevent iOS zoom on focus */
  font-size: max(16px, 1rem);
}

.auth-field {
  margin-bottom: var(--sp-md);
}

.auth-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--clr-text-2);
  font-size: 0.8125rem;
  font-weight: 600;
}

.auth-field input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  background: var(--clr-surface-2);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r-md);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: max(16px, 1rem);
  outline: none;
  transition: border-color var(--dur);
}

.auth-field input:focus { border-color: var(--clr-primary); }

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--r-md);
  transition: opacity var(--dur), transform var(--dur);
  -webkit-tap-highlight-color: transparent;
  min-height: 52px;  /* touch target */
}

.btn-primary svg { width: 18px; height: 18px; }
.btn-primary:active { transform: scale(0.98); opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; pointer-events: none; }

.btn-primary.loading .btn-label { display: none; }

.btn-primary.loading::after {
  content: "";
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-text {
  width: 100%;
  min-height: 44px;
  margin-top: var(--sp-sm);
  color: var(--clr-primary-2);
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--r-sm);
}

.btn-text.loading { opacity: 0.5; pointer-events: none; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin: var(--sp-lg) 0 var(--sp-md);
  color: var(--clr-text-3);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--clr-border);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  background: #fff;
  color: #1f2937;
  border-radius: var(--r-md);
  font-size: 0.95rem;
  font-weight: 700;
  transition: transform var(--dur), opacity var(--dur);
}

.btn-google:active { transform: scale(0.98); opacity: 0.9; }
.btn-google:disabled,
.btn-google.loading { opacity: 0.5; pointer-events: none; }

.google-mark {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  background: #f3f4f6;
  color: #4285F4;
  font-weight: 800;
  font-family: Arial, sans-serif;
}

.login-note {
  color: var(--clr-text-3);
  font-size: 0.78rem;
  text-align: center;
  margin-top: var(--sp-md);
}

.btn-back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--clr-text-2);
  font-size: 0.875rem;
  margin-bottom: var(--sp-lg);
  padding: 8px 0;  /* FIX: touch target */
  min-height: 44px;
}

.btn-back svg { width: 16px; height: 16px; }

/* OTP */
.otp-inputs {
  display: flex;
  gap: var(--sp-sm);
  justify-content: center;
  margin-bottom: var(--sp-md);
  max-width: 320px;
}

.otp-digit {
  flex: 0 0 44px;
  width: 44px;
  height: 52px;
  background: var(--clr-surface-2);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r-sm);
  color: var(--clr-text);
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-mono);
  text-align: center;
  outline: none;
  transition: border-color var(--dur);
  /* FIX: iOS zoom prevention — min 16px font size */
  font-size: max(16px, 1.25rem);
  /* Don't use -webkit-text-security: browsers handle type="tel" correctly */
}

.otp-digit:focus { border-color: var(--clr-primary); }

.btn-resend {
  display: block;
  width: 100%;
  margin-top: var(--sp-md);
  padding: 10px;
  text-align: center;
  color: var(--clr-text-2);
  font-size: 0.875rem;
  border-radius: var(--r-sm);
  transition: color var(--dur);
  min-height: 44px;  /* touch target */
}

.btn-resend:not(:disabled) { color: var(--clr-primary-2); }
.btn-resend:disabled { opacity: 0.5; }

.login-footer {
  color: var(--clr-text-3);
  font-size: 0.75rem;
  text-align: center;
  margin-top: var(--sp-lg);
}

/* ═══════════════════════════════════════════════════════════════════════
   HOME PAGE
   ═══════════════════════════════════════════════════════════════════════ */

.home-page {
  background:
    radial-gradient(circle at 15% -6%, rgba(255,107,0,0.16), transparent 28%),
    linear-gradient(180deg, #fff7ed 0%, var(--market-bg) 34%, #ffffff 100%);
  color: var(--market-text);
}

.home-page .bottom-nav {
  background: rgba(255,255,255,0.94);
  border-top: 1px solid var(--market-line);
  box-shadow: 0 -10px 28px rgba(17,17,17,0.08);
}

.home-page .nav-item { color: #8a8379; }
.home-page .nav-item.active { color: var(--market-orange); }

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md) var(--sp-md) var(--sp-sm);
  gap: var(--sp-md);
}

.marketplace-top-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-bottom: 10px;
  background: rgba(255,250,243,0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: transform 180ms var(--ease), opacity 180ms var(--ease);
}

body.chrome-hidden:not(.modal-open):not(.explore-open) .marketplace-top-bar { transform: translateY(-110%); opacity: 0.02; pointer-events: none; }
/* bottom-nav always visible — scroll-hide removed */

.location-pill {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 7px;
  min-height: 42px;
  text-align: left;
  color: var(--market-text);
  padding: 6px 10px 6px 8px;
  border: 1px solid rgba(255,107,0,0.18);
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.78);
  box-shadow: 0 8px 20px rgba(17,17,17,0.05);
}

.location-pill span { grid-row: span 2; font-size: 1.25rem; }
.location-pill strong { font-size: 0.98rem; line-height: 1; }
.location-pill small { color: var(--market-muted); font-size: 0.72rem; }
.location-pill::after {
  content: "Change";
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  margin-left: 5px;
  color: var(--market-orange);
  font-size: 0.68rem;
  font-weight: 900;
}

.locality-modal {
  align-items: flex-start;
  padding-top: calc(70px + env(safe-area-inset-top, 0px));
}
.locality-sheet {
  width: min(92vw, 420px);
  gap: 10px;
  padding: 14px;
  border-radius: 22px;
}
.locality-current-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255,107,0,0.24);
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  margin-bottom: 12px;
}
.locality-current-card > span { font-size: 1.35rem; }
.locality-current-card strong { display: block; font-size: 0.95rem; color: var(--market-text); }
.locality-current-card small { color: var(--market-muted); font-size: 0.74rem; }
.locality-search-box {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--market-line);
  border-radius: var(--r-full);
  background: #fff;
  margin-bottom: 8px;
}
.locality-search-box .modal-input {
  border: 0;
  background: #fff;
  padding: 10px 0;
  min-height: 42px;
}
.locality-mini-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.locality-mini-row button {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid var(--market-line);
  border-radius: var(--r-full);
  background: #fff;
  text-align: left;
  color: var(--market-text);
}
.locality-mini-row strong { display: block; font-size: 0.78rem; }
.locality-mini-row small { color: var(--market-muted); font-size: 0.66rem; }
.locality-suggestion-list { display: grid; gap: 6px; margin-top: 6px; }
.locality-suggestion {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 10px 8px;
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  background: #fff;
  color: var(--market-text);
  text-align: left;
}
.locality-suggestion span { font-size: 1rem; }
.locality-suggestion strong { font-size: 0.86rem; }
.locality-suggestion small { color: var(--market-muted); font-size: 0.68rem; }
.locality-suggestion.active {
  border-color: rgba(255,107,0,0.5);
  box-shadow: 0 10px 22px rgba(255,107,0,0.12);
}
.locality-suggestion.active small { color: var(--market-orange); font-weight: 900; }
.order-locality-strip,
.locality-routing-strip { margin-bottom: var(--sp-md); }

.top-bar-left {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.user-avatar {
  width: 42px; height: 42px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700;
  flex-shrink: 0;
}

.greeting {
  font-size: 0.75rem;
  color: var(--clr-text-2);
}

.user-name {
  font-size: 1rem;
  font-weight: 700;
}

.icon-btn {
  width: 44px; height: 44px;  /* FIX: 44px touch target */
  display: flex; align-items: center; justify-content: center;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-full);
  color: var(--clr-text-2);
  transition: background var(--dur);
  -webkit-tap-highlight-color: transparent;
}

.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:active { background: var(--clr-surface-2); }

.whatsapp-icon-btn {
  background: rgba(34,197,94,0.16);
  border-color: rgba(34,197,94,0.35);
  color: var(--clr-success);
  font-size: 1.15rem;
}

.support-btn { font-weight: 900; color: var(--clr-primary-2); }

.support-entry {
  min-height: 42px;
  padding: 0 14px;
  border-radius: var(--r-full);
  border: 1px solid rgba(22,163,74,0.22);
  background: rgba(22,163,74,0.10);
  color: var(--market-green);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.home-content { flex: 1; width: 100%; }

.service-hero {
  margin: 0 var(--sp-md) 10px;
  padding: 14px;
  border: 1px solid rgba(255,107,0,0.14);
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 4%, rgba(255,255,255,0.88), transparent 34%),
    linear-gradient(135deg, #fffdf8 0%, #fff2df 46%, #dcfce7 132%);
  display: grid;
  gap: var(--sp-sm);
  box-shadow: 0 14px 30px rgba(17,17,17,0.12);
}

.marketplace-hero {
  margin-top: 0;
}

.service-hero-copy { max-width: 620px; }

.service-hero-kicker {
  color: var(--market-green);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-xs);
  text-transform: uppercase;
}

.service-hero h1 {
  color: var(--market-text);
  font-size: clamp(1.22rem, 5.7vw, 1.78rem);
  line-height: 1.08;
  margin-bottom: 7px;
  letter-spacing: -0.035em;
}

.service-hero p {
  color: var(--market-muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.inspection-line,
.booking-distinction-grid {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  grid-template-columns: 1fr 1fr;
}
.booking-distinction-grid div,
.inspection-line {
  padding: 10px;
  border: 1px solid var(--market-line);
  border-radius: 16px;
  background: rgba(255,255,255,0.78);
}
.inspection-line strong,
.booking-distinction-grid strong { display: block; color: var(--market-text); font-size: 0.84rem; }
.inspection-line span,
.booking-distinction-grid span { display: block; color: var(--market-muted); font-size: 0.7rem; line-height: 1.25; margin-top: 2px; }

.hero-live-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.hero-live-strip::-webkit-scrollbar { display: none; }
.hero-live-strip span {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.78);
  color: var(--market-muted);
  box-shadow: 0 8px 24px rgba(17,17,17,0.06);
  font-size: 0.74rem;
}
.hero-live-strip b { color: var(--market-text); }

.marketplace-cta {
  min-height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--market-orange), #ff8a00);
  box-shadow: 0 14px 28px rgba(255,107,0,0.28);
  font-weight: 900;
}

.hero-cta-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.hero-secondary {
  min-height: 44px;
  padding: 0 13px;
  border-radius: 16px;
  border: 1px solid rgba(22,163,74,0.24);
  background: rgba(255,255,255,0.82);
  color: var(--market-green);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.service-hero-market {
  display: grid;
  gap: var(--sp-sm);
}

.hero-market-card {
  padding: 14px 0;
  border-top: 1px solid var(--clr-border);
}

.hero-market-card strong { display: block; font-size: 0.9rem; margin-bottom: 3px; }
.hero-market-card span { color: var(--clr-text-2); font-size: 0.78rem; }
.hero-market-card.primary strong { color: #86efac; }

.service-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin-top: var(--sp-md);
}

.service-trust-row span,
.local-service-copy,
.service-note {
  color: var(--clr-text-2);
  font-size: 0.72rem;
}

.service-trust-row span {
  padding: 6px 10px;
  border: 1px solid var(--clr-border);
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.04);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin-top: var(--sp-md);
}

.market-search-section {
  position: sticky;
  top: calc(8px + env(safe-area-inset-top, 0px));
  z-index: 55;
  margin: 0 var(--sp-md) 8px;
  padding: 4px 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.top-search-hidden { display: none; }

.explore-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #fff;
  color: var(--market-text);
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--sp-md) var(--sp-md);
}
.explore-overlay.hidden { display: none; }
.explore-open { overflow: hidden; }
.explore-search-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}
#explore-search-slot .market-search-section {
  display: block;
  position: static;
  margin: 0;
  padding: 0;
}
.explore-close {
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  background: var(--market-soft);
  color: var(--market-text);
  font-size: 1.45rem;
  font-weight: 800;
}

.slim-service-hero {
  min-height: auto;
  max-height: 120px;
  margin: 0 var(--sp-md) 10px;
  padding: 12px;
  border-radius: 20px;
  overflow: hidden;
}
.slim-service-hero .service-hero-copy { min-width: 0; }
.slim-service-hero h1 { font-size: 1.18rem; line-height: 1.08; margin-bottom: 4px; }
.slim-service-hero p:not(.service-hero-kicker) { font-size: 0.78rem; line-height: 1.25; margin-bottom: 8px; }
.slim-service-hero .hero-primary { min-height: 38px; padding: 0 14px; font-size: 0.8rem; }
.slim-service-hero .hero-live-strip { margin-top: 8px; }

.market-search-section label {
  display: block;
  margin-bottom: 8px;
  color: var(--clr-text);
  font-size: 0.82rem;
  font-weight: 800;
}

.market-search-box {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid var(--market-line);
  border-radius: 18px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 12px 32px rgba(17,17,17,0.08);
}

.market-search-box input {
  width: 100%;
  min-height: 46px;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--market-text);
  font: inherit;
  font-size: max(16px, 0.95rem);
}

.market-search-box button { color: var(--market-muted); font-size: 1.2rem; min-width: 34px; min-height: 34px; }

.instant-search-panel {
  margin-top: 8px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 18px 44px rgba(17,17,17,0.12);
  border: 1px solid var(--market-line);
}
.instant-search-panel.hidden { display: none; }
.instant-search-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.instant-search-head strong { font-size: 0.86rem; }
.instant-search-head span { color: var(--market-green); font-size: 0.72rem; font-weight: 900; }
.instant-result-list { display: grid; gap: 8px; }
.instant-result-list button,
.search-placeholder-grid button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px;
  border-radius: 14px;
  background: var(--market-soft);
  color: var(--market-text);
  text-align: left;
  cursor: pointer;
}
.instant-result-list button:active,
.search-placeholder-grid button:active,
.quick-service-card:active,
.category-chips button:active,
.free-booking-strip button:active { transform: scale(0.985); }
.instant-result-list small { color: var(--market-orange); font-weight: 900; }
.search-placeholder-grid { display: grid; gap: 8px; }
.search-placeholder-grid button small { color: var(--market-muted); font-size: 0.68rem; font-weight: 800; }

.section-header.compact { padding-bottom: var(--sp-xs); }
.section-note { color: var(--clr-text-2); font-size: 0.72rem; }
.section-eyebrow { color: var(--market-green); font-size: 0.68rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 3px; }

.category-chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 var(--sp-md) 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.category-chips::-webkit-scrollbar { display: none; }
.category-chips button {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: auto;
  min-height: 42px;
  padding: 9px 13px;
  border-radius: var(--r-full);

  border: 1px solid var(--market-line);
  background: rgba(255,255,255,0.88);
  color: var(--market-text);
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(17,17,17,0.04);
}

.category-chips button span { font-size: 1.35rem; line-height: 1; }

.quick-services-section { margin: 0 0 8px; }
.quick-service-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 var(--sp-md) 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.quick-service-rail::-webkit-scrollbar { display: none; }
.quick-service-card {
  flex: 0 0 124px;
  min-height: 68px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--market-line);
  background: #fff;
  color: var(--market-text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(17,17,17,0.06);
}
.quick-service-card span { font-size: 1.35rem; }
.quick-service-card strong { font-size: 0.82rem; line-height: 1.15; }
.quick-service-card small {
  grid-column: 2;
  color: var(--market-muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.free-booking-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 0 var(--sp-md) 12px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(22,163,74,0.18);
  background: rgba(22,163,74,0.08);
}
.free-booking-strip strong { display: block; font-size: 0.84rem; }
.free-booking-strip span { display: block; color: var(--market-muted); font-size: 0.72rem; line-height: 1.25; }
.free-booking-strip button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--r-full);
  background: #fff;
  color: var(--market-green);
  font-weight: 900;
  border: 1px solid rgba(22,163,74,0.18);
  cursor: pointer;
}

.action-hierarchy-note {
  margin-top: 8px;
  color: var(--market-muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.category-chips button.active {
  border-color: rgba(255,107,0,0.55);
  background: linear-gradient(135deg, var(--market-orange), #ff8a00);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255,107,0,0.20);
}

.category-ecosystem { margin: 0 var(--sp-md) 12px; }
.ecosystem-card {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}
.ecosystem-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--market-line);
  list-style: none;
  cursor: pointer;
}
.ecosystem-summary::after {
  content: "View lane";
  grid-column: 2;
  width: fit-content;
  margin-top: 2px;
  color: var(--market-orange);
  font-size: 0.66rem;
  font-weight: 900;
}
.ecosystem-summary::-webkit-details-marker { display: none; }
.ecosystem-summary .ecosystem-icon { grid-row: span 2; }
.ecosystem-summary strong { font-size: 0.9rem; }
.ecosystem-summary small { color: var(--market-muted); font-size: 0.72rem; }
.ecosystem-card:not([open]) .ecosystem-banner,
.ecosystem-card:not([open]) .ecosystem-visual-rail,
.ecosystem-card:not([open]) .ecosystem-tag-row,
.ecosystem-card:not([open]) .ecosystem-local-grid,
.ecosystem-card:not([open]) .ecosystem-inspection-cta { display: none; }
.ecosystem-world { animation: fadeUp 0.18s var(--ease); }
.ecosystem-banner { display: flex; gap: var(--sp-md); align-items: flex-start; margin-bottom: var(--sp-md); }
.ecosystem-icon {
  width: 48px; height: 48px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  background: #fff; font-size: 1.6rem; flex-shrink: 0;
  box-shadow: 0 10px 26px rgba(17,17,17,0.08);
}
.ecosystem-banner h3 { font-size: 1rem; margin-bottom: 4px; }
.ecosystem-banner p:last-child { color: var(--market-muted); font-size: 0.8rem; line-height: 1.45; }

.ecosystem-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-sm); }
.ecosystem-grid div { padding: 12px 0; border-top: 1px solid var(--clr-border); border-radius: 0; background: transparent; }
.ecosystem-grid strong { display: block; font-size: 0.78rem; margin-bottom: 2px; }
.ecosystem-grid span, .ecosystem-proof-row span { color: var(--clr-text-2); font-size: 0.7rem; }
.ecosystem-proof-row { display: flex; flex-wrap: wrap; gap: var(--sp-sm); margin-top: var(--sp-md); }
.ecosystem-proof-row span { padding: 6px 10px; border-radius: var(--r-full); background: rgba(255,255,255,0.05); border: 1px solid var(--clr-border); }

.ecosystem-visual-rail,
.proof-rail,
.vendor-feed {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 var(--sp-md) 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ecosystem-visual-rail { padding: 0 0 8px; }
.ecosystem-visual-rail::-webkit-scrollbar,
.proof-rail::-webkit-scrollbar,
.vendor-feed::-webkit-scrollbar { display: none; }
.ecosystem-visual-rail button,
.ecosystem-info-chip {
  flex: 0 0 132px;
  min-height: 118px;
  padding: 14px;
  border-radius: 24px;

  background: linear-gradient(145deg, #ffffff, #fff1df);
  color: var(--market-text);
  text-align: left;
  box-shadow: 0 12px 28px rgba(17,17,17,0.07);
}
.ecosystem-info-chip {
  cursor: default;
  user-select: none;
}
.ecosystem-visual-rail button.active,
.ecosystem-tag-row button.active {
  outline: 2px solid rgba(255,107,0,0.45);
  background: linear-gradient(135deg, var(--market-orange), #ff8a00);
  color: #fff;
}
.ecosystem-visual-rail button.active small,
.ecosystem-tag-row button.active { color: #fff; }
.ecosystem-visual-rail span { display: block; font-size: 1.6rem; margin-bottom: 12px; }
.ecosystem-visual-rail strong { display: block; font-size: 0.9rem; line-height: 1.1; }
.ecosystem-visual-rail small { display: block; margin-top: 6px; color: var(--market-orange); font-weight: 900; }

.ecosystem-tag-row { display: flex; gap: 8px; overflow-x: auto; padding-top: 8px; scrollbar-width: none; }
.ecosystem-tag-row::-webkit-scrollbar { display: none; }
.ecosystem-tag-row button,
.ecosystem-tag-row span {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--r-full);
  background: #fff;
  border: 1px solid var(--market-line);
  color: var(--market-muted);
  font-weight: 800;
  font-size: 0.76rem;
}
.ecosystem-tag-row span {
  display: inline-flex;
  align-items: center;
  cursor: default;
}

.ecosystem-local-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.ecosystem-local-grid button,
.ecosystem-local-grid div {
  min-height: 58px;
  padding: 10px;

  border: 1px solid var(--market-line);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  color: var(--market-text);
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: anywhere;
}
.ecosystem-local-grid div { cursor: default; box-shadow: none; }
.ecosystem-local-grid button { cursor: pointer; box-shadow: 0 8px 18px rgba(17,17,17,0.05); }
.ecosystem-local-grid button:active { transform: scale(0.985); }
.ecosystem-local-grid strong { display: block; font-size: 0.76rem; margin-bottom: 5px; }
.ecosystem-local-grid span { color: var(--market-muted); font-size: 0.7rem; line-height: 1.35; }
.ecosystem-inspection-cta {
  width: 100%;
  min-height: 50px;
  margin-top: 12px;
  border-radius: 18px;

  background: #171717;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(17,17,17,0.14);
}

.operating-feed {
  margin: 0 var(--sp-md) 14px;
  padding: 10px 0 0;
  border-top: 1px solid rgba(24,24,24,0.08);
}
.operating-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 10px;
}
.operating-head h3 { color: var(--market-text); font-size: 1rem; line-height: 1.15; }
.operating-head p { color: var(--market-muted); font-size: 0.74rem; line-height: 1.35; margin-top: 3px; }
.ops-ticker {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ops-ticker::-webkit-scrollbar { display: none; }
.ops-ticker button,
.ops-status-pill {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: var(--r-full);
  background: #fff;
  color: var(--market-text);
  text-align: left;
  border: 1px solid var(--market-line);
  box-shadow: 0 8px 18px rgba(17,17,17,0.05);
}
.ops-status-pill { cursor: default; user-select: none; }
.ops-ticker button.ops-status-pill { cursor: pointer; user-select: auto; }
.ops-status-pill.active {
  border-color: rgba(255,107,0,0.48);
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  box-shadow: 0 10px 24px rgba(255,107,0,0.12);
}
.ops-status-pill.active small { color: var(--market-orange); font-weight: 900; }
.ops-ticker strong { display: block; font-size: 0.76rem; line-height: 1.15; }
.ops-ticker small { color: var(--market-muted); font-size: 0.68rem; }
.ops-supply-row {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.ops-supply-row div {
  padding: 10px 0;
  border-top: 1px solid var(--market-line);
}
.ops-supply-row strong { display: block; font-size: 0.76rem; margin-bottom: 3px; }
.ops-supply-row span { color: var(--market-muted); font-size: 0.72rem; line-height: 1.35; }

.category-operating-mode .service-hero { margin-bottom: 10px; }
.category-operating-mode .browse-strip-section { margin-bottom: 10px; }
.category-operating-mode .local-proof-grid,
.category-operating-mode .category-visual-proof { display: none; }
.category-operating-mode .market-search-box {
  min-height: 46px;
  box-shadow: 0 8px 18px rgba(17,17,17,0.06);
}
.category-operating-mode .market-search-box input { min-height: 40px; }

.local-proof-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-sm);
  margin: 0 var(--sp-md) var(--sp-lg);
}
.local-proof-grid div {
  padding: var(--sp-md) 0;
  border: 0;
  border-top: 1px solid var(--market-line);
  border-radius: 0;
  background: transparent;
}
.local-proof-grid strong { display: block; font-size: 0.86rem; margin-bottom: 3px; }
.local-proof-grid span { display: block; color: var(--market-muted); font-size: 0.74rem; }

.home-section { margin-bottom: 18px; }

.premium-inspection-highlight {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-md);
  margin: 0 var(--sp-md) var(--sp-lg);
  padding: var(--sp-md);
  border: 1px solid rgba(245,158,11,0.26);
  border-radius: var(--r-lg);
  background: linear-gradient(145deg, rgba(245,158,11,0.13), rgba(255,255,255,0.035));
  cursor: pointer;
}

.premium-inspection-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245,158,11,0.14);
  font-size: 1.45rem;
}

.premium-inspection-highlight h3 { font-size: 1rem; margin-bottom: 4px; }
.premium-inspection-highlight p:not(.service-hero-kicker) { color: var(--clr-text-2); font-size: 0.82rem; line-height: 1.45; }
.premium-inspection-highlight > span { grid-column: 2; color: var(--clr-warning); font-weight: 900; font-size: 0.86rem; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-md) var(--sp-sm);
}

.section-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--market-text);
}

.see-all {
  font-size: 0.8125rem;
  color: var(--market-orange);
  font-weight: 900;
  padding: 4px 0;  /* FIX: tap area */
  min-height: 44px;
  display: flex;
  align-items: center;
}

.vendor-card {
  flex: 0 0 74vw;
  max-width: 292px;
  overflow: hidden;
  border-radius: 22px;

  background: #fff;
  color: var(--market-text);
  border: 1px solid rgba(24,24,24,0.06);
  box-shadow: 0 12px 28px rgba(17,17,17,0.08);
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow var(--dur) var(--ease);
}
.vendor-card:active { box-shadow: 0 10px 28px rgba(17,17,17,0.10); }
.vendor-card.vendor-live { outline: 2px solid rgba(22,163,74,0.32); }
.vendor-card.vendor-featured { outline: 2px solid rgba(245,158,11,0.32); }
.vendor-card.vendor-trusted { outline: 2px solid rgba(37,99,235,0.22); }
.vendor-card.vendor-demand-priority { outline: 2px solid rgba(220,38,38,0.18); }
.vendor-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 82px;
  background: linear-gradient(135deg, #ffe8c7, #fff7ed 48%, #e8fff0);
  font-size: 2.1rem;

}
.vendor-media img { width: 100%; height: 100%; object-fit: cover; }
.vendor-media em {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: var(--r-full);
  background: rgba(22,163,74,0.94);
  color: #fff;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}
.vendor-featured .vendor-media em { background: rgba(245,158,11,0.96); }
.vendor-trusted .vendor-media em { background: rgba(37,99,235,0.92); }
.vendor-demand-priority .vendor-media em { background: rgba(220,38,38,0.90); }
.vendor-body { padding: 12px; }

.vendor-head { display: flex; align-items: center; gap: 10px; }
.vendor-avatar { width: 42px; height: 42px; border-radius: 15px; display: flex; align-items: center; justify-content: center; background: var(--market-soft); }
.vendor-head > div:last-child { min-width: 0; }
.vendor-head h4 { font-size: 1rem; line-height: 1.15; margin-bottom: 3px; }
.vendor-head p { color: var(--market-muted); font-size: 0.74rem; }
.vendor-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0; }
.vendor-stats span {
  padding: 5px 8px;
  border-radius: var(--r-full);
  background: var(--market-soft);
  color: var(--market-muted);
  font-size: 0.7rem;
  font-weight: 900;
}
.vendor-stats span:first-child { color: #b7791f; background: #fff4d7; }
.vendor-stats span:last-child { color: var(--market-orange); background: #fff0e3; }
.vendor-stats span:nth-child(2) { color: var(--market-green); background: rgba(22,163,74,0.10); }
.vendor-book-btn {
  width: 100%;
  min-height: 38px;
  border-radius: 15px;

  background: var(--market-orange);
  color: #fff;
  font-weight: 900;
  pointer-events: auto;
}
.vendor-book-btn:active { transform: scale(0.98); }

.category-visual-proof { margin-bottom: var(--sp-xl); }
.proof-tile {
  flex: 0 0 68vw;
  max-width: 260px;
  min-height: 150px;
  padding: 12px;
  border-radius: 22px;

  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 16px 38px rgba(17,17,17,0.12);
}
.proof-tone-0 { background: linear-gradient(145deg, #7c2d12, #ff6b00); }
.proof-tone-1 { background: linear-gradient(145deg, #14532d, #16a34a); }
.proof-tone-2 { background: linear-gradient(145deg, #1e3a8a, #38bdf8); }
.proof-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: auto; }
.proof-split span { min-height: 46px; border-radius: 14px; display: flex; align-items: end; padding: 8px; background: rgba(255,255,255,0.18); font-size: 0.68rem; font-weight: 900; }
.proof-tile em { display: inline-flex; width: fit-content; margin-top: 12px; padding: 5px 9px; border-radius: var(--r-full); background: rgba(255,255,255,0.18); font-size: 0.66rem; font-style: normal; font-weight: 900; }
.proof-tile strong { font-size: 0.96rem; margin-top: 10px; }
.proof-tile p { color: rgba(255,255,255,0.82); font-size: 0.8rem; line-height: 1.35; margin-top: 4px; }


/* ── Cards Grid ─────────────────────────────────────────────────────────── */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 var(--sp-md);
}

.cards-grid.horizontal-scroll {
  display: flex;
  overflow-x: auto;
  gap: var(--sp-sm);
  padding: 0 var(--sp-md);
  scrollbar-width: none;
  /* FIX: smooth scroll on iOS */
  -webkit-overflow-scrolling: touch;
}

.cards-grid.horizontal-scroll::-webkit-scrollbar { display: none; }

.fallback-services-grid {
  display: flex;
}

/* ── Card ────────────────────────────────────────────────────────────────── */

.card {
  background: rgba(255,255,255,0.045);
  border: 1px solid var(--clr-border);
  border-radius: 22px;
  padding: 16px;
  cursor: pointer;
  transition: border-color var(--dur), transform var(--dur);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.card:active { transform: scale(0.97); border-color: var(--clr-border-2); }

/* Service card */
.service-card {
  width: 190px;
  flex-shrink: 0;
  min-height: 184px;
  display: flex;
  flex-direction: column;
}

.service-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-sm); margin-bottom: var(--sp-sm); }
.service-card-foot { margin-top: auto; padding-top: var(--sp-sm); }

.fallback-services-grid .service-card,
.fallback-service-card {
  width: auto;
  min-height: 148px;
}

.card-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255,255,255,0.055);
  font-size: 1.55rem;
  margin-bottom: 0;
}

.card h4 {
  font-size: 0.98rem;
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--clr-text-2);
  margin-bottom: var(--sp-sm);
}

.card-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--clr-primary-2);
}

.card-badge {
  position: static;
  background: rgba(108,99,255,0.2);
  color: var(--clr-primary-2);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.whatsapp-badge {
  background: rgba(34,197,94,0.16);
  color: var(--clr-success);
}

.fallback-help-card,
.trust-story-card {
  border: 1px solid rgba(34,197,94,0.24);
  border-radius: var(--r-lg);
  background: linear-gradient(145deg, rgba(34,197,94,0.10), rgba(255,255,255,0.04));
  padding: var(--sp-md);
}

.fallback-help-card {
  grid-column: 1 / -1;
  color: var(--market-text);
  background: linear-gradient(145deg, rgba(22,163,74,0.10), rgba(255,255,255,0.86));
}

.fallback-help-card h3,
.trust-story-card h3 { font-size: 0.98rem; margin-bottom: 4px; }
.fallback-help-card p,
.trust-story-card p { color: var(--clr-text-2); font-size: 0.82rem; line-height: 1.45; margin-bottom: var(--sp-sm); }

.trust-story-card {
  margin: 0 var(--sp-md);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-sm);
}
.trust-story-icon { font-size: 1.5rem; }

.floating-whatsapp,
.floating-support {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 18px);
  z-index: 110;
  width: 52px;
  height: 52px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  box-shadow: 0 14px 34px rgba(34,197,94,0.35);
  font-size: 1.25rem;
}

.home-page .floating-whatsapp,
.home-page .floating-support { display: none; }

.floating-support { font-weight: 900; background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent)); box-shadow: 0 14px 34px rgba(108,99,255,0.35); }

.premium-inspection-panel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-md);
  align-items: center;
  margin-bottom: var(--sp-md);
  padding: var(--sp-md);
  border: 1px solid rgba(245,158,11,0.28);
  border-radius: var(--r-md);
  background: linear-gradient(145deg, rgba(245,158,11,0.12), rgba(255,255,255,0.035));
}
.premium-inspection-mark { width: 42px; height: 42px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; background: rgba(245,158,11,0.14); }
.premium-inspection-panel strong { display: block; font-size: 0.88rem; margin-bottom: 3px; }
.premium-inspection-panel p { color: var(--clr-text-2); font-size: 0.76rem; line-height: 1.35; }
.premium-inspection-panel span { color: var(--clr-warning); font-weight: 900; white-space: nowrap; font-size: 0.82rem; }

.booking-mode-picker {
  display: grid;
  gap: 8px;
  margin-bottom: var(--sp-md);
}
.booking-mode-option {
  display: grid;
  gap: 3px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
  background: var(--clr-surface);
  color: var(--clr-text);
  text-align: left;
}
.booking-mode-option.active { border-color: rgba(108,99,255,0.55); background: rgba(108,99,255,0.10); }
.booking-mode-premium { border-color: rgba(255,107,0,0.70); }
.booking-mode-default { border-color: rgba(17,17,17,0.70); }
.booking-mode-direct { border-color: rgba(59,130,246,0.55); }
.booking-mode-premium.active { border-color: var(--market-orange); background: rgba(255,107,0,0.12); }
.booking-mode-default.active { border-color: #171717; background: rgba(17,17,17,0.10); }
.booking-mode-option.disabled { opacity: 0.48; pointer-events: none; }
.booking-mode-option strong { font-size: 0.82rem; }
.booking-mode-option small { color: var(--clr-text-2); font-size: 0.72rem; line-height: 1.3; }

@media (max-width: 360px) {
  .premium-inspection-panel { grid-template-columns: auto 1fr; }
  .premium-inspection-panel span { grid-column: 2; }
  .ecosystem-local-grid { grid-template-columns: 1fr; }
}

.booking-context-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: center;
  margin-bottom: var(--sp-md);
  padding: 12px;
  border: 1px solid rgba(108,99,255,0.22);
  border-radius: var(--r-md);
  background: rgba(108,99,255,0.10);
}
.booking-context-strip span { grid-row: span 2; font-size: 1.5rem; }
.booking-context-strip strong { font-size: 0.9rem; }
.booking-context-strip small,
.upload-readiness-field small { color: var(--clr-text-2); font-size: 0.72rem; line-height: 1.35; }
.booking-login-nudge,
.photo-placeholder {
  margin-bottom: var(--sp-md);
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px dashed rgba(108,99,255,0.35);
  background: rgba(108,99,255,0.08);
}
.booking-login-nudge strong { display: block; color: var(--clr-text); font-size: 0.84rem; margin-bottom: 3px; }
.booking-login-nudge span,
.photo-placeholder { color: var(--clr-text-2); font-size: 0.76rem; line-height: 1.35; }
.photo-placeholder { margin-bottom: 0; min-height: 48px; display: flex; align-items: center; }
.fast-booking-trust {
  grid-template-columns: 1fr;
  gap: 6px;
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.18);
}

.support-selector-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: var(--sp-md);
}
.support-selector-overlay.hidden { display: none; }
.support-selector-card {
  width: 100%;
  max-width: 430px;
  border: 1px solid var(--clr-border-2);
  border-radius: var(--r-xl);
  background: var(--clr-surface);
  padding: var(--sp-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
  animation: slideUp 0.22s var(--ease);
}
.support-selector-header { display: flex; justify-content: space-between; gap: var(--sp-md); margin-bottom: var(--sp-md); }
.support-kicker { color: var(--clr-primary-2); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.7rem; font-weight: 900; }
.support-selector-header h3 { font-size: 1.15rem; }
.support-close { width: 38px; height: 38px; border-radius: var(--r-full); color: var(--clr-text-2); background: var(--clr-surface-2); font-size: 1.4rem; }
.support-options { display: grid; gap: var(--sp-sm); }
.support-options button { text-align: left; padding: var(--sp-md); border-radius: var(--r-md); background: var(--clr-surface-2); border: 1px solid var(--clr-border); color: var(--clr-text); }
.support-options strong { display: block; margin-bottom: 3px; font-size: 0.92rem; }
.support-options span { color: var(--clr-text-2); font-size: 0.78rem; }

.whatsapp-menu-item {
  border-color: rgba(34,197,94,0.22);
}

.continue-browsing-btn {
  display: block;
  margin: var(--sp-sm) auto 0;
  min-height: 40px;
  color: var(--clr-text-2);
  font-weight: 700;
  font-size: 0.82rem;
}

/* Product card */
.product-card { padding: 0; overflow: hidden; }

.card-img-wrap {
  aspect-ratio: 16/10;
  background: var(--clr-surface-2);
  overflow: hidden;
}

.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }

.card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}

.card-body { padding: var(--sp-sm) var(--sp-md) var(--sp-md); }

/* ── Home section empty/error inline ────────────────────────────────────── */
.section-inline-state {
  padding: var(--sp-md);
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  color: var(--clr-text-2);
  font-size: 0.875rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   ACCOUNT PAGE
   ═══════════════════════════════════════════════════════════════════════ */

.account-content { flex: 1; padding: 0 var(--sp-md); }

.profile-card {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  background: linear-gradient(135deg, var(--clr-surface), var(--clr-surface-2));
  border: 1px solid var(--clr-border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  margin-bottom: var(--sp-lg);
}

.account-role-pill {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: var(--r-full);
  background: rgba(34,197,94,0.12);
  color: var(--clr-success);
  font-size: 0.68rem;
  font-weight: 800;
}

.account-ops-card {
  display: grid;
  gap: 4px;
  margin: calc(var(--sp-lg) * -0.55) 0 var(--sp-lg);
  padding: var(--sp-md);
  border: 1px solid rgba(108,99,255,0.18);
  border-radius: var(--r-md);
  background: rgba(108,99,255,0.08);
}
.account-ops-card strong { font-size: 0.88rem; }
.account-ops-card p { color: var(--clr-text-2); font-size: 0.78rem; line-height: 1.4; }

.account-profile-freeze-card {
  display: grid;
  gap: 4px;
  margin: calc(var(--sp-lg) * -0.55) 0 var(--sp-lg);
  padding: var(--sp-md);
  border: 1px solid rgba(22,163,74,0.18);
  border-radius: var(--r-md);
  background: rgba(22,163,74,0.08);
}
.account-profile-freeze-card strong { font-size: 0.84rem; color: var(--clr-success); }
.account-profile-freeze-card span,
.account-profile-freeze-card p { color: var(--clr-text-2); font-size: 0.76rem; line-height: 1.35; }

.profile-avatar {
  width: 60px; height: 60px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.375rem;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-info h3 {
  font-size: 1.125rem;
  font-weight: 700;
}

.phone-number {
  font-size: 0.875rem;
  color: var(--clr-text-2);
  margin: 2px 0 6px;
}

.role-chip {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--r-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.role-user    { background: rgba(108,99,255,0.2); color: var(--clr-primary-2); }
.role-vendor  { background: rgba(34,197,94,0.2);  color: var(--clr-success);    }
.role-creator { background: rgba(245,158,11,0.2); color: var(--clr-warning);    }

/* Menu */
.menu-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-text-3);
  margin: var(--sp-md) 0 var(--sp-sm);
}

.menu-list { display: flex; flex-direction: column; gap: var(--sp-xs); }

.menu-item {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
  padding: var(--sp-md);
  cursor: pointer;
  transition: background var(--dur), transform var(--dur);
  -webkit-tap-highlight-color: transparent;
  min-height: 64px;  /* FIX: larger touch target */
}

.menu-item:active { transform: scale(0.99); background: var(--clr-surface-2); }
.menu-item.danger { color: var(--clr-danger); }

.menu-item-locked { opacity: 0.6; cursor: default; }
.menu-item-locked:active { transform: none; background: var(--clr-surface); }

.menu-icon {
  font-size: 1.25rem;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--clr-surface-2);
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

.menu-body { flex: 1; }
.menu-body span { font-weight: 600; font-size: 0.9375rem; }
.menu-sub { font-size: 0.78rem; color: var(--clr-text-2); margin-top: 2px; }

.lock-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-full);
  background: var(--clr-surface-2);
  color: var(--clr-text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.version-tag {
  text-align: center;
  color: var(--clr-text-3);
  font-size: 0.75rem;
  margin: var(--sp-xl) 0 var(--sp-md);
}

/* ── Vendor Apply Modal ────────────────────────────────────────────────── */

.vendor-apply-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-lg) var(--sp-md);
  background: rgba(0,0,0,0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.vendor-apply-card {
  width: 100%;
  max-width: 430px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border-2);
  border-radius: var(--r-xl);
  padding: var(--sp-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
  animation: fadeUp 0.25s var(--ease);
}

.vendor-apply-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  margin-bottom: var(--sp-md);
}

.vendor-apply-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.vendor-apply-close {
  width: 38px;
  height: 38px;
  border-radius: var(--r-full);
  background: var(--clr-surface-2);
  color: var(--clr-text-2);
  font-size: 1.5rem;
  line-height: 1;
}

.vendor-apply-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vendor-apply-form label {
  color: var(--clr-text-2);
  font-size: 0.8125rem;
  font-weight: 600;
}

.vendor-apply-form input,
.vendor-apply-form select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--clr-surface-2);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--r-md);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: max(16px, 0.95rem);
  outline: none;
  transition: border-color var(--dur), background var(--dur);
}

.vendor-apply-form input:focus,
.vendor-apply-form select:focus {
  border-color: var(--clr-primary);
}

.vendor-apply-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-sm);
  margin-top: var(--sp-sm);
}

.vendor-apply-submit,
.vendor-apply-cancel {
  min-height: 50px;
  border-radius: var(--r-md);
  font-size: 0.95rem;
  font-weight: 700;
  transition: opacity var(--dur), transform var(--dur);
}

.vendor-apply-submit {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
  color: #fff;
}

.vendor-apply-cancel {
  background: var(--clr-surface-2);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
}

.vendor-apply-submit:active,
.vendor-apply-cancel:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.vendor-apply-submit:disabled {
  opacity: 0.55;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════ */

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

.page { animation: fadeUp 0.3s var(--ease); }

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE — Wider screens
   ═══════════════════════════════════════════════════════════════════════ */

@media (min-width: 480px) {
  body {
    border-left: 0;
    border-right: 0;
  }
}

@media (min-width: 760px) {
  body {
    max-width: none;
  }

  .bottom-nav {
    max-width: 760px;
    border-radius: var(--r-full) var(--r-full) 0 0;
    left: 50%;
  }

  .page {
    padding-bottom: calc(var(--nav-h) + 28px);
  }

  .home-content {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
  }

  .top-bar {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding-left: var(--sp-xl);
    padding-right: var(--sp-xl);
  }

  .service-hero {
    margin: 12px var(--sp-xl) 36px;
    padding: 36px 0 10px;
    min-height: 300px;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    align-items: end;
  }

  .slim-service-hero {
    max-height: none;
    margin: 8px var(--sp-lg) 18px;
    padding: 18px;
    min-height: 180px;
  }

  .service-hero h1 {
    max-width: 760px;
  }

  .service-hero p {
    max-width: 660px;
    font-size: 1rem;
  }

  .local-proof-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-left: var(--sp-lg);
    margin-right: var(--sp-lg);
  }

  .market-search-section,
  .category-ecosystem,
  .operating-feed,
  .premium-inspection-highlight {
    margin-left: var(--sp-lg);
    margin-right: var(--sp-lg);
  }

  .ecosystem-card {
    display: block;
    grid-template-columns: none;
    gap: var(--sp-lg);
    align-items: center;
  }

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

  .ecosystem-local-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .support-selector-overlay { align-items: center; }

  .section-header,
  .cards-grid,
  .cards-grid.horizontal-scroll,
  .category-chips {
    padding-left: var(--sp-lg);
    padding-right: var(--sp-lg);
  }

  .cards-grid.horizontal-scroll,
  .fallback-services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .vendor-feed.fallback-services-grid {
    display: flex;
    overflow-x: auto;
  }

  .vendor-feed,
  .proof-rail {
    padding-left: var(--sp-lg);
    padding-right: var(--sp-lg);
  }

  .vendor-card { flex-basis: 360px; }
  .proof-tile { flex-basis: 320px; }

  .service-card {
    width: auto;
    min-height: 160px;
  }

  .trust-story-card {
    margin-left: var(--sp-lg);
    margin-right: var(--sp-lg);
  }

  .floating-support {
    right: calc(50% - 520px);
  }
}

@media (min-width: 1024px) {
  .home-page .home-content {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 380px;
    column-gap: 18px;
    align-items: start;
  }

  .market-search-section,
  .browse-strip-section,
  .service-hero,
  .category-ecosystem,
  .operating-feed,
  #visual-proof-section,
  .marketplace-proof-grid {
    grid-column: 1;
  }

  #services-section {
    grid-column: 2;
    grid-row: 2 / span 5;
    position: sticky;
    top: 82px;
    margin-right: var(--sp-lg);
  }

  .vendor-feed {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
    padding-right: 0;
  }

  .vendor-card {
    flex-basis: auto;
    max-width: none;
    width: 100%;
  }

  .ops-ticker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .ops-ticker button,
  .ops-status-pill { flex-basis: auto; }

  .ops-supply-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .category-operating-mode .home-page,
  .category-operating-mode .home-content { min-height: auto; }

  .market-search-section {
    max-width: none;
  }

  .cards-grid.horizontal-scroll,
  .fallback-services-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .premium-inspection-highlight {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  .premium-inspection-highlight > span { grid-column: auto; }

  .modal-sheet {
    max-width: 560px;
    border-radius: var(--r-xl);
    margin-bottom: 32px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   MODALS — Order & Booking
   ═══════════════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  overscroll-behavior: contain;
  touch-action: none;
}

.modal-overlay.hidden {
  display: none;
}

.modal-sheet {
  background: var(--clr-surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: var(--sp-md) var(--sp-lg) calc(var(--sp-xl) + env(safe-area-inset-bottom));
  width: 100%;
  max-width: 480px;
  max-height: min(92dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 8px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  animation: slideUp 0.28s var(--ease);
  scroll-padding-bottom: 104px;
}

.modal-actions {
  position: sticky;
  bottom: calc(-1 * (var(--sp-xl) + env(safe-area-inset-bottom, 0px)));
  z-index: 2;
  margin: var(--sp-md) calc(-1 * var(--sp-lg)) calc(-1 * (var(--sp-xl) + env(safe-area-inset-bottom, 0px)));
  padding: var(--sp-sm) var(--sp-lg) calc(var(--sp-md) + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(255,255,255,0), var(--clr-surface) 22%, var(--clr-surface));
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--clr-border);
  border-radius: var(--r-full);
  margin: 0 auto var(--sp-md);
}

.modal-sheet h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: var(--sp-md);
  text-align: center;
}

.modal-close-icon {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--clr-surface-2);
  color: var(--clr-text);
  font-size: 1.35rem;
  line-height: 1;
  z-index: 3;
}

.booking-bottom-sheet { position: relative; transition: transform 0.18s var(--ease); }
.inspection-flow { display: grid; gap: 12px; padding-bottom: 4px; }
.inspection-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: rgba(255,107,0,0.10);
  border: 1px solid rgba(255,107,0,0.20);
}
.inspection-summary-row strong { font-size: 0.95rem; color: var(--market-orange); }
.inspection-summary-row span { font-size: 0.78rem; color: var(--clr-text-2); }
.inspection-step { display: grid; gap: 8px; }
.inspection-step h4 { font-size: 0.86rem; margin: 0; color: var(--clr-text); }
.inspection-two-field { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inspection-two-field .modal-field,
.inspection-step .modal-field { margin-bottom: 0; }
.inspection-chip-row { display: flex; gap: 6px; overflow-x: auto; padding: 1px 0 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.inspection-chip-row::-webkit-scrollbar { display: none; }
.inspection-category-chip,
.inspection-issue-chip {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: var(--r-full);
  border: 1px solid var(--clr-border);
  background: var(--clr-surface-2);
  color: var(--clr-text);
  font-weight: 750;
  font-size: 0.76rem;
  white-space: nowrap;
}
.inspection-category-chip.active,
.inspection-issue-chip.active { border-color: var(--market-orange); background: rgba(255,107,0,0.12); color: var(--market-orange); box-shadow: inset 0 0 0 1px rgba(255,107,0,0.08); }
.inspection-location-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.inspection-location-pills span,
.inspection-payment-note {
  font-size: 0.74rem;
  color: var(--clr-text-2);
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-full);
  padding: 7px 10px;
}
.inspection-payment-note { border-radius: var(--r-md); text-align: center; margin: 0; }
.inspection-pay-cta { width: 100%; min-height: 52px; font-size: 1rem; }
.inspection-confirmation-state { text-align: center; display: grid; gap: 10px; padding: 10px 0; }
.inspection-success-mark { width: 56px; height: 56px; border-radius: var(--r-full); margin: 0 auto; display: grid; place-items: center; background: rgba(34,197,94,0.14); color: var(--clr-success); font-size: 1.5rem; font-weight: 900; }
.inspection-confirmation-state h4 { margin: 0; font-size: 1.05rem; }
.inspection-confirmation-state p { margin: 0; color: var(--clr-text-2); font-size: 0.86rem; line-height: 1.4; }
.request-success-state { padding-bottom: 2px; }
.request-success-state .request-success-pill-row { justify-content: center; }
.inspection-confirmation-list { display: grid; gap: 8px; text-align: left; }
.inspection-confirmation-list span { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--clr-surface-2); font-size: 0.82rem; }
.inspection-confirmation-list strong { color: var(--clr-text-2); }

.modal-product-info {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  background: var(--clr-surface-2);
  border-radius: var(--r-md);
  padding: var(--sp-sm) var(--sp-md);
  margin-bottom: var(--sp-md);
}

.modal-product-img {
  width: 60px;
  height: 60px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.modal-product-placeholder {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.modal-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-primary);
  margin-bottom: 2px;
}

.modal-desc {
  font-size: 0.8rem;
  color: var(--clr-text-2);
  line-height: 1.4;
}

.modal-field {
  margin-bottom: var(--sp-md);
  min-width: 0;
}

.modal-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-text-2);
  margin-bottom: 6px;
}

.modal-input {
  width: 100%;
  min-width: 0;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
  padding: 13px 12px;
  color: var(--clr-text);
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
}

.modal-input:focus {
  outline: none;
  border-color: var(--clr-primary);
}

.modal-input.field-invalid,
.modal-textarea.field-invalid {
  border-color: var(--clr-danger);
  box-shadow: 0 0 0 2px rgba(239,68,68,0.12);
}

.modal-textarea {
  width: 100%;
  min-width: 0;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
  padding: 13px 12px;
  color: var(--clr-text);
  font-size: 1rem;
  font-family: inherit;
  resize: none;
  box-sizing: border-box;
}

.modal-textarea:focus {
  outline: none;
  border-color: var(--clr-primary);
}

.modal-actions {
  display: flex;
  gap: var(--sp-sm);
  margin-top: var(--sp-md);
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
  flex: 1;
}

.btn-secondary {
  background: var(--clr-surface-2);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
  border-radius: var(--r-md);
  padding: 13px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-secondary:hover { opacity: 0.8; }

@media (max-width: 420px) {
  .locality-modal { padding-top: calc(62px + env(safe-area-inset-top, 0px)); }

  .modal-sheet {
    padding: var(--sp-md) var(--sp-md) calc(var(--sp-xl) + env(safe-area-inset-bottom));
    max-height: 94dvh;
  }
  .inspection-two-field { grid-template-columns: 1fr; gap: 6px; }
  .modal-actions {
    position: sticky;
    bottom: calc(-1 * var(--sp-md));
    background: linear-gradient(to top, var(--clr-surface) 80%, rgba(19,20,28,0));
    padding-top: var(--sp-sm);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .otp-inputs { gap: 6px; }
  .otp-digit { width: 42px; height: 48px; }
}

@media (max-height: 640px) {
  .modal-sheet {
    max-height: 96dvh;
    padding-top: var(--sp-sm);
  }
  .modal-handle { margin-bottom: var(--sp-sm); }
  .modal-sheet h3 { margin-bottom: var(--sp-sm); }
  .modal-field { margin-bottom: var(--sp-sm); }
}

/* Qty control */
.qty-control {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  background: var(--clr-surface-2);
  border-radius: var(--r-md);
  padding: 8px 12px;
  width: fit-content;
}

.qty-btn {
  width: 32px;
  height: 32px;
  background: var(--clr-surface-3, var(--clr-border));
  border: none;
  border-radius: var(--r-sm);
  color: var(--clr-text);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:active { opacity: 0.7; }

#order-qty-val {
  font-size: 1rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

/* Order badge on product cards */
.order-badge {
  background: var(--clr-primary);
  color: #fff;
}

/* status-shipped for legacy */
.status-shipped {
  background: rgba(99,179,237,0.15);
  color: #63B3ED;
}
