/* WashPro booking — brand styles */
:root {
  --teal: #2d7a76;
  --teal-dark: #225d5a;
  --teal-light: #ddeeed;
  --navy: #1a2e4a;
  --coral: #e85d4a;
  --coral-dark: #c94836;
  --bg: #f7f9f9;
  --card: #ffffff;
  --line: #e3e8ea;
  --muted: #6b7280;
  --green: #1d7a3e;
  --red: #b3261e;
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Montserrat', system-ui, sans-serif;
  background: var(--bg);
  color: var(--navy);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; padding: 16px 16px 96px; }

/* Header */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
}
.brand { font-weight: 700; color: var(--teal); font-size: 18px; letter-spacing: 0.2px; }
.brand span { color: var(--navy); }
.topbar .who { font-size: 12px; color: var(--muted); max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Cards & layout */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
}
h1 { font-size: 20px; margin: 4px 0 14px; }
h2 { font-size: 16px; margin: 0 0 10px; }
.label { font-size: 12px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.hint { font-size: 12.5px; color: var(--muted); }
.row { display: flex; align-items: center; gap: 8px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stack > * + * { margin-top: 10px; }

/* Promo banner */
.promo {
  background: #fbeae7; color: #993c1d; border-radius: 10px;
  padding: 10px 12px; font-size: 13px; font-weight: 600; margin-bottom: 14px;
}

/* Chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.chip {
  border: 1.5px solid var(--line); background: var(--card); color: var(--navy);
  border-radius: 10px; padding: 9px 10px; font-size: 13px; font-weight: 600;
  font-family: inherit; cursor: pointer; text-align: center; min-height: 44px;
}
.chip.sub { display: flex; flex-direction: column; gap: 1px; align-items: center; justify-content: center; }
.chip .small { font-size: 11px; font-weight: 500; color: var(--muted); }
.chip.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.chip.on .small { color: #d6ecea; }
.chip:disabled { opacity: 0.4; cursor: default; }

/* Steppers */
.stepper { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.stepper .name { font-size: 14px; font-weight: 600; }
.stepper .price { font-size: 12px; color: var(--muted); }
.stepper .ctrl { display: flex; align-items: center; gap: 12px; }
.stepper button {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--teal);
  background: var(--card); color: var(--teal); font-size: 18px; font-weight: 700; cursor: pointer;
}
.stepper .qty { min-width: 20px; text-align: center; font-weight: 700; }

/* Inputs */
input, textarea, select {
  width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 15px; color: var(--navy); background: var(--card);
}
input:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
.code-input { letter-spacing: 8px; text-align: center; font-size: 22px; font-weight: 700; }

/* Buttons */
.btn {
  display: block; width: 100%; padding: 14px; border: 0; border-radius: 10px;
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer; text-align: center;
}
.btn.primary { background: var(--coral); color: #fff; }
.btn.primary:active { background: var(--coral-dark); }
.btn.secondary { background: var(--teal-light); color: var(--teal-dark); }
.btn.ghost { background: transparent; color: var(--teal); }
.btn.danger { background: transparent; color: var(--red); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn + .btn { margin-top: 8px; }

/* Summary lines */
.line-item { display: flex; justify-content: space-between; font-size: 13.5px; padding: 5px 0; }
.line-item.total { font-weight: 700; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-size: 15px; }
.credit { color: var(--green); font-weight: 600; }

/* Status pill + timeline */
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.pill.scheduled { background: var(--teal-light); color: var(--teal-dark); }
.pill.picked_up, .pill.processing { background: #fdf3e0; color: #854f0b; }
.pill.out_for_delivery { background: #e6f1fb; color: #185fa5; }
.pill.delivered { background: #eaf3de; color: #3b6d11; }
.pill.canceled { background: #f1f1f1; color: var(--muted); }

.timeline { list-style: none; margin: 12px 0 0; padding: 0; }
.timeline li { display: flex; gap: 10px; padding: 0 0 16px; position: relative; font-size: 13.5px; color: var(--muted); }
.timeline li::before {
  content: ""; width: 12px; height: 12px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--line); flex: none; margin-top: 2px;
}
.timeline li:not(:last-child)::after {
  content: ""; position: absolute; left: 5.5px; top: 16px; bottom: 2px; width: 2px; background: var(--line);
}
.timeline li.done { color: var(--navy); font-weight: 600; }
.timeline li.done::before { background: var(--teal); border-color: var(--teal); }
.timeline li.done:not(:last-child)::after { background: var(--teal); }

/* Bottom nav */
.nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  background: var(--card); border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; padding: 8px 0 max(10px, env(safe-area-inset-bottom));
  max-width: 480px; margin: 0 auto;
}
.nav button {
  background: none; border: 0; font-family: inherit; font-size: 11.5px; font-weight: 600;
  color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; padding: 4px 16px;
}
.nav button.on { color: var(--teal); }
.nav .ico { font-size: 20px; line-height: 1; }

/* Misc */
.screen { display: none; }
.screen.on { display: block; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 88px; z-index: 50;
  background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; opacity: 0; transition: opacity .25s; pointer-events: none;
  max-width: 90%; text-align: center;
}
.toast.show { opacity: 1; }
.order-card { cursor: pointer; }
.order-card .when { font-weight: 700; font-size: 14.5px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 14px; }
a { color: var(--teal); }

/* Admin board */
.board .order-card { border-left: 4px solid var(--teal); }
.board .order-card.delivery { border-left-color: var(--coral); }
.seg { display: flex; gap: 6px; margin-bottom: 12px; }
.seg .chip { flex: 1; }
@media (min-width: 640px) { body.admin .app { max-width: 720px; } }
