/* ══════════════════════════════════════════════════════════════════════
   Novda client web app — design tokens & mobile-first layout.
   Palette (mirrors the Flutter app):
     canvas #F6F3EE · surface #FFFFFF · border #E5DED5
     espresso #382C26 · green #2E5336 · muted #7A6E65 · terracotta #C25E46
   No icon fonts, no image assets — icons are inline SVGs (js/icons.js).
   ══════════════════════════════════════════════════════════════════════ */

:root {
  --canvas: #f6f3ee;
  --surface: #ffffff;
  --border: #e5ded5;
  --espresso: #382c26;
  --navy: #51443a;
  --green: #2e5336;
  --green-bg: #eaf3ec;
  --green-soft: #e8efe9;
  --muted: #7a6e65;
  --alert: #c25e46;
  --alert-bg: #fdf2f0;
  --almond: #efe9df;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(56, 44, 38, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Links inside buttons must never show the default underline. */
a { text-decoration: none; color: inherit; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

html, body {
  background: var(--canvas);
  color: var(--espresso);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

body {
  display: flex;
  justify-content: center;
  padding-bottom: 132px; /* room for the sticky bottom pill, incl. two-row wrap at 320px */
}

#app {
  width: 100%;
  max-width: 480px;
  padding: 0 16px 24px;
}

/* ── Icons ── */
.icon { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }

/* ── Banner ── */
.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(120deg, var(--espresso) 0%, var(--navy) 100%);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  margin: 0 -16px 14px;
  padding: 14px 16px;
}
.banner .mark {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #fff;
  color: var(--espresso);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; letter-spacing: 0.5px;
  flex: 0 0 auto;
}
.banner .brand { font-weight: 800; font-size: 17px; }
.banner .tagline { font-size: 12px; opacity: 0.85; margin-top: 1px; }

/* ── Top tab bar ── */
.tabs {
  display: flex;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 14px;
}
.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.tab .icon { width: 17px; height: 17px; }
.tab.active { background: var(--espresso); color: #fff; }

/* ── Avatar (client card) ── */
.avatar {
  flex: 0 0 auto;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--espresso);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
}

/* ── Step indicator ── */
.stepper {
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  margin: 0 0 10px;
}
.stepper-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--espresso);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

/* ── Cards / sections ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}
.section-title .icon { width: 18px; height: 18px; color: var(--navy); }
.section-hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 12px; }

/* ── Service list ── */
.service-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  background: var(--surface);
}
.service-row.selected {
  border-color: var(--green);
  background: var(--green-bg);
}
.service-row .check {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: transparent;
}
.service-row .check .icon { width: 14px; height: 14px; }
.service-row.selected .check { background: var(--green); border-color: var(--green); color: #fff; }
.service-row .name { flex: 1 1 150px; min-width: 0; font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.service-row .price { margin-left: auto; font-size: 14px; font-weight: 700; color: var(--green); white-space: nowrap; }
.service-row .duration { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ── Multi-person booking ── */
.person-section {
  margin-bottom: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.person-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.person-label { font-size: 13.5px; font-weight: 700; color: var(--espresso); }
.person-remove {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--alert);
  cursor: pointer;
}
.person-remove .icon { width: 12px; height: 12px; }
.person-section .service-row { margin-bottom: 8px; }
.person-section .service-row:last-child { margin-bottom: 0; }
.service-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.service-title-row .section-title { margin-bottom: 0; }
.add-person-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1.5px solid var(--alert);
  border-radius: 999px;
  background: var(--surface);
  color: var(--alert);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.add-person-btn:active { background: var(--alert-bg); }
.add-person-btn .icon { width: 15px; height: 15px; }

/* ── Date scroller ── */
.date-scroller {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.date-scroller::-webkit-scrollbar { display: none; }
.day-chip {
  flex: 0 0 auto;
  width: 62px;
  padding: 10px 4px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.day-chip .dow { font-size: 11px; color: var(--muted); }
.day-chip .num { font-size: 17px; font-weight: 700; margin-top: 2px; }
.day-chip .mon { font-size: 10px; color: var(--muted); }
.day-chip.selected { border-color: var(--espresso); background: var(--espresso); }
.day-chip.selected .dow, .day-chip.selected .mon { color: var(--almond); }
.day-chip.selected .num { color: #fff; }
.day-chip.off {
  opacity: 0.45;
  background: var(--almond);
  cursor: not-allowed;
}
.day-chip.off .num { color: var(--muted); }
.day-chip.today:not(.selected) { border-color: var(--green); }

/* ── Slot chips (step 2) — only free slots render ── */
.slot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.slot-chips .slot {
  flex: 0 0 auto;
  min-width: 68px;
  padding: 11px 10px;
}
.slot {
  padding: 11px 4px;
  min-height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  color: var(--espresso);
}
.slot.selected { background: var(--green); border-color: var(--green); color: #fff; }
.empty-note {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 18px 8px;
}
.empty-note.unavailable-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  background: var(--bg-soft, #fbf5ef);
  border: 1px solid var(--terracotta, #c96f4a);
  border-radius: 12px;
  color: var(--espresso, #51443a);
}
.empty-note.unavailable-note .icon { color: var(--terracotta, #c96f4a); flex: none; margin-top: 2px; }
.empty-note.unavailable-note .sub { color: var(--muted); margin-top: 2px; font-size: 12px; }

/* ── Daypart sections (step 2) ── */
.daypart-section { margin-bottom: 14px; }
.daypart-header {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 4px 0 8px;
}
.daypart-section .slot-chips { margin-top: 0; }

/* ── Inputs ── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 15px;
  color: var(--espresso);
  outline: none;
  font-family: inherit;
}
.field textarea { resize: vertical; min-height: 72px; }
.field input:focus, .field textarea:focus { border-color: var(--espresso); }
.field .error { color: var(--alert); font-size: 12px; margin-top: 5px; }
.field .hint { color: var(--muted); font-size: 12px; margin-top: 5px; }
.tg-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-bg);
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 12px;
}
.tg-badge .icon { width: 15px; height: 15px; }

/* ── Payment chips ── */
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 8px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  color: var(--espresso);
}
.chip .icon { width: 18px; height: 18px; }
.chip.selected { border-color: var(--green); background: var(--green-bg); color: var(--green); }

/* ── Sticky bottom pill ── */
.bottom-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 16px rgba(56, 44, 38, 0.08);
  max-width: 480px;
  margin: 0 auto;
}
.bottom-bar .total { min-width: 0; }
.bottom-bar .total .amount { font-size: 15.5px; font-weight: 800; color: var(--green); overflow-wrap: anywhere; }
.bottom-bar .total .sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.bottom-bar .actions { display: flex; gap: 8px; margin-top: 8px; }
.bottom-bar .actions .btn { flex: 1; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 13px 22px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.btn .icon { width: 18px; height: 18px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--espresso); color: #fff; }
/* Native-app login button look: espresso fill, white text, 52px tall,
   12px radius — mirrors FilledButton.icon in the Flutter auth page. */
.btn-telegram {
  background: var(--espresso);
  color: #fff;
  border-radius: 12px;
  min-height: 52px;
  width: 100%;
  font-weight: 700;
}
.btn-telegram .icon { width: 20px; height: 20px; }
.btn-outline { background: var(--surface); color: var(--espresso); border: 1.5px solid var(--border); }
.btn-green { background: var(--green); color: #fff; }
.btn-terracotta { background: var(--alert); color: #fff; }

/* ── Verification gate (step 3) ── */
.verify-required-hint {
  font-size: 12.5px;
  color: var(--alert);
  font-weight: 600;
  margin: 4px 0 12px;
}
.verify-cta { display: flex; justify-content: center; gap: 8px; }
.verify-cta.verified-badge {
  color: var(--green);
  font-weight: 700;
  gap: 6px;
  margin-top: 4px;
}
.verify-cta-hint {
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  margin: 10px 0 2px;
}
/* Step-3 code sub-page: standalone code screen (native-app login look) */
.code-page { display: flex; flex-direction: column; gap: 12px; }
.code-back-row { margin-bottom: 2px; }
.code-back-row .btn { padding: 8px 14px; font-size: 13px; }
.code-input-big {
  width: 100%;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 10px;
  text-align: center;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--espresso);
}
.btn-block { width: 100%; }

/* ── Prepayment gate (step 4) ── */
.prepay-card .section-hint { margin-bottom: 10px; }
.prepay-card .btn { text-decoration: none; }
.prepay-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.prepay-actions .btn { width: 100%; }

/* ── Card-to-card prepayment: banking-transfer widget ── */
.prepay-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
}
.prepay-top .btn { padding: 6px 14px; font-size: 12.5px; }
.prepay-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0;
}
.prepay-hint .icon { width: 14px; height: 14px; flex: 0 0 auto; }
.prepay-card-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: #fdfbf7;
  color: var(--espresso);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.prepay-card-box:active { background: #f6f0e6; }
.prepay-card-box .icon { width: 16px; height: 16px; flex: 0 0 auto; color: var(--muted); }
.prepay-card-number {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--espresso);
}
.prepay-holder {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 2px 0;
}
.prepay-holder .k { font-size: 12.5px; color: var(--muted); }
.prepay-holder .v {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--espresso);
  text-align: right;
}

/* ── Post-acceptance Vitrina product selection ── */
.vitrina-select { margin: 12px; }
.vitrina-pick-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.vitrina-pick-card {
  position: relative;
  flex: 0 0 auto;
  width: 112px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  font-family: inherit;
}
.vitrina-pick-card.selected {
  border-color: var(--alert);
  background: var(--alert-bg);
}
.vitrina-pick-img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.vitrina-pick-fallback {
  width: 100%;
  height: 72px;
  border-radius: 8px;
  background: var(--almond);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.vitrina-pick-fallback .icon { width: 22px; height: 22px; }
.vitrina-pick-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--espresso);
  margin-top: 6px;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.vitrina-pick-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  margin-top: 3px;
}
.vitrina-pick-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--alert);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vitrina-pick-check .icon { width: 12px; height: 12px; }
.vitrina-pick-total {
  margin-top: 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--espresso);
}
.vitrina-pick-actions {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}
.vitrina-pick-actions .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.vitrina-pick-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}

/* ── Booking ticket ── */
.ticket {
  position: relative;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 22px 18px;
  margin: 0 12px;
}
/* Tear-off notches: one punched circle per side (left + right),
   vertically centered so both ticket edges look identical. */
.t-notch {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--canvas);
  pointer-events: none;
}
.t-notch.tl {
  left: -11px;
  top: 50%;
  transform: translateY(-50%);
  border-right: 2px dashed var(--border);
}
.t-notch.tr {
  right: -11px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 2px dashed var(--border);
}
.ticket-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.ticket-status .icon { width: 16px; height: 16px; }
.ticket-status.gold { background: #fdf6e3; color: #b8860b; border: 1px solid #f0dfae; }
.ticket-status.green { background: var(--green-bg); color: var(--green); border: 1px solid #cfe2d3; }
.ticket-status.red { background: var(--alert-bg); color: var(--alert); border: 1px solid #f2d3ca; }
.ticket-status.gray { background: #f0eee9; color: var(--muted); border: 1px solid var(--border); }
.ticket-status-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}
.ticket-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--espresso);
  margin: 14px 0 10px;
}
.ticket-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.ticket-row:last-of-type { border-bottom: none; }
.ticket-row .k { font-size: 12.5px; color: var(--muted); flex: 0 0 auto; }
.ticket-row .v {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--espresso);
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ticket-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.ticket-actions .btn { width: 100%; }

/* ── Ticket v3: planr-style "sent" layout ── */
.ticket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f5e7c9;
  margin: -22px -18px 12px;
  padding: 14px 18px;
  border-radius: 16px 16px 0 0;
  border-bottom: 1px dashed var(--border);
}
.ticket-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fdf6e3;
  color: #b8860b;
  border: 1px solid #f0dfae;
  flex: 0 0 auto;
}
.ticket-icon-circle .icon { width: 18px; height: 18px; }
.ticket-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}
.ticket-headline {
  font-size: 18px;
  font-weight: 800;
  color: var(--espresso);
  margin: 2px 0 4px;
}
.ticket-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  background: #faf6ef;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.ticket-note .icon { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; }
.ticket-bigdate {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 10px;
}
.ticket-bigtime {
  margin-top: 2px;
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--espresso);
}
.ticket-duration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.ticket-duration .icon { width: 14px; height: 14px; }
.ticket-divider {
  border-top: 2px dashed var(--border);
  margin: 14px 0 10px;
}
.ticket-service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ticket-service-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f59e42;
  flex: 0 0 auto;
}
.ticket-service-name {
  flex: 1 1 auto;
  font-size: 15px;
  font-weight: 600;
  color: var(--espresso);
  min-width: 0;
  overflow-wrap: anywhere;
}
.ticket-service-price { font-size: 15px; font-weight: 800; color: #b8860b; flex: 0 0 auto; }
.ticket-cancel-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  background: none;
  border: none;
  border-radius: 10px;
  color: #b4553c;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.ticket-cancel-text .icon { width: 16px; height: 16px; }

.summary-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.summary-row:last-of-type { border-bottom: none; }
.summary-row .k { color: var(--muted); flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.summary-row .v { text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.summary-row .v .person-line { display: block; margin-top: 2px; font-weight: 500; color: var(--espresso); }
.status-pill {
  display: inline-block;
  background: var(--almond);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 5px 12px;
  margin-top: 8px;
}
.status-pill.confirmed { background: var(--green-bg); color: var(--green); }
/* Mine page: booking-status pills mirror the ticket palette
   (pending amber, accepted green, rejected red, expired/cancelled gray). */
.status-pill.status-pill-gold { background: #fdf6e3; color: #b8860b; border: 1px solid #f0dfae; }
.status-pill.status-pill-green { background: var(--green-bg); color: var(--green); border: 1px solid #cfe2d3; }
.status-pill.status-pill-red { background: var(--alert-bg); color: var(--alert); border: 1px solid #f2d3ca; }
.status-pill.status-pill-gray { background: #f0eee9; color: var(--muted); border: 1px solid var(--border); }

/* ── Client summary card (My visits) ── */
.client-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.client-card h2 { font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
.client-card .info { flex: 1 1 160px; min-width: 0; }
.client-card .meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 6px;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.client-card .meta .icon { width: 14px; height: 14px; }
.visits-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 7px 12px;
  white-space: nowrap;
}
.visits-badge .icon { width: 15px; height: 15px; }

/* ── Active appointment cards ── */
.appt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.appt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.appt-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14.5px;
  min-width: 0;
}
.appt-time .icon { width: 16px; height: 16px; color: var(--green); }
.appt-services { font-size: 12.5px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.appt-price { font-weight: 700; color: var(--green); font-size: 14px; white-space: nowrap; }
.btn-cancel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--alert);
  border: 1.5px solid rgba(194, 94, 70, 0.5);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--surface);
  margin-top: 10px;
}
.btn-cancel .icon { width: 15px; height: 15px; }

/* ── History ── */
.history-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.history-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; }
.history-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}
.history-date .icon { width: 15px; height: 15px; color: var(--navy); }
.history-services { font-size: 12.5px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.history-price { font-weight: 700; color: var(--green); font-size: 13.5px; margin-top: 6px; }
.empty-state { text-align: center; color: var(--muted); padding: 20px 10px; font-size: 13px; }

/* ── Client persona eyebrow (My visits) ── */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  margin: 2px 0 8px;
}

/* ── Identity verification (My visits / My masters): collapsed button
   expands to the name/phone login form ── */
.verify-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.verify-card .btn { width: 100%; }
.verify-card .field:last-of-type { margin-bottom: 14px; }

/* ── Phone-missing chip (client card) ── */
.link-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 5px 10px;
  min-height: 30px;
}

/* ── Toast ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 108px;
  transform: translateX(-50%) translateY(8px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--espresso);
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(56, 44, 38, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 200;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .icon { width: 16px; height: 16px; color: #fff; }

/* ── About / static map preview ── */
.about-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  padding: 4px 0;
}
.about-row .icon { width: 18px; height: 18px; color: var(--navy); margin-top: 1px; }
.about-row b { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.nav-links { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.nav-links .btn { width: 100%; }

/* ── Masters tab ── */
.master-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.master-row:last-child { border-bottom: none; }
.master-row > .icon { width: 16px; height: 16px; color: var(--muted); flex: 0 0 auto; }
.master-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}
.master-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--espresso);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}
.master-avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.master-info { flex: 1; min-width: 0; }
.master-name { font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
.master-sub { font-size: 12px; color: var(--muted); margin-top: 1px; overflow-wrap: anywhere; }
.master-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 3px;
}
.master-rating .icon { width: 13px; height: 13px; color: #d4a373; }
.master-sub .icon {
  width: 12px;
  height: 12px;
  color: var(--muted);
  vertical-align: -2px;
  margin-right: 3px;
}
.master-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.master-actions > .icon { width: 16px; height: 16px; color: var(--muted); }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--espresso);
  text-decoration: none;
}
.icon-btn .icon { width: 16px; height: 16px; }
.masters-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  padding: 4px 0 8px;
}
.masters-back .icon { width: 16px; height: 16px; }
.master-detail-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.product-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--border);
}
.product-row:last-child { border-bottom: none; }
.product-img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; margin-right: 10px; flex: 0 0 auto; }
.product-name { flex: 1 1 120px; min-width: 0; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.product-price { font-size: 13px; font-weight: 800; color: var(--green); white-space: nowrap; }
.product-meta { font-size: 11px; color: var(--muted); }

/* History infinite scroll + offline/error status rows */
.history-sentinel { height: 1px; }
.history-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  color: var(--muted);
  gap: 8px;
}
.history-loading::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.offline-row,
.history-error {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12.5px;
}
.offline-row {
  background: var(--almond);
  color: var(--navy);
}
.history-error {
  background: var(--alert-bg);
  color: var(--alert);
}
.offline-row .icon,
.history-error .icon { width: 14px; height: 14px; flex: 0 0 auto; }
.offline-row .btn,
.history-error .btn {
  margin-left: auto;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(56, 44, 38, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}
.modal-title { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.modal-text { font-size: 13px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

/* ── Footer ── */
.footer-note {
  text-align: center;
  margin-top: 20px;
  font-size: 12.5px;
}
.footer-note a { color: var(--green); font-weight: 600; }
.footer-support {
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* ── Hidden helper ── */
.hidden { display: none !important; }

/* ── Small screens (320px): keep every value visible ── */
@media (max-width: 340px) {
  #app { padding: 0 12px 24px; }
  .banner { margin: 0 -12px 14px; }
  .card { padding: 14px 12px; }
  .ticket { padding: 18px 12px; margin: 0 10px; }
  .ticket-row .v { font-size: 13px; }
  .bottom-bar { padding: 10px 12px; gap: 8px 10px; }
  .bottom-bar .btn { padding: 12px 14px; font-size: 13.5px; }
  .btn { padding: 12px 16px; font-size: 14px; }
  .day-chip { width: 56px; }
  .slot { padding: 11px 2px; font-size: 12.5px; }
  .service-row .name { flex-basis: 130px; }
}

/* ── Terms of Service disclaimer ── */
.terms-note {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
  margin: 4px 0 12px;
}
.terms-link {
  display: inline;
  padding: 0;
  color: var(--espresso);
  font-weight: 600;
  text-decoration: underline;
}

/* ── Legal documents tab ── */
.lang-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.lang-pill {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.lang-pill.active {
  background: var(--espresso);
  border-color: var(--espresso);
  color: #fff;
}
.doc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  background: none;
}
.doc-row:last-child { border-bottom: none; }
.doc-row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--almond);
  color: var(--espresso);
  flex: 0 0 auto;
}
.doc-row-icon .icon { width: 18px; height: 18px; }
.doc-row-title {
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--espresso);
  overflow-wrap: anywhere;
}
.doc-row > .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex: 0 0 auto;
}

/* ── Rendered legal document typography ── */
.doc-body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--espresso);
}
.doc-body h1, .doc-body h2, .doc-body h3, .doc-body h4 {
  color: var(--espresso);
  line-height: 1.3;
  margin: 18px 0 8px;
  font-weight: 700;
}
.doc-body h1 { font-size: 22px; font-weight: 800; }
.doc-body h2 { font-size: 18px; }
.doc-body h3 { font-size: 16px; }
.doc-body h4 { font-size: 14.5px; }
.doc-body p { margin: 0 0 12px; }
.doc-body ul, .doc-body ol { margin: 0 0 12px 20px; }
.doc-body li { margin-bottom: 4px; }
.doc-body blockquote {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-left: 3px solid var(--border);
  background: var(--almond);
  color: var(--muted);
  font-style: italic;
  font-size: 13.5px;
}
.doc-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--almond);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 13px;
}
.doc-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}
.doc-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 14px;
  font-size: 13.5px;
}
.doc-body th, .doc-body td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.doc-body th { font-weight: 700; background: var(--almond); }

/* ── Narrow phones: keep the prepayment card number on one wrap line ── */
@media (max-width: 359px) {
  .prepay-card-number { font-size: 15px; letter-spacing: 1px; }
}

/* ══ Discovery leftovers (no-barber screen + master landing brand) ══ */
.disc-brand {
  font-size: 24px;
  font-weight: 800;
  color: var(--espresso);
  letter-spacing: -0.02em;
}
.disc-home-link { margin-top: 14px; }

/* ── Barber landing page (/master) ── */
.master-landing { display: flex; flex-direction: column; }
.master-landing-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0 10px;
}
.master-landing-header .disc-brand { margin-left: 2px; }
.master-landing-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--espresso);
  margin-top: 14px;
}
.master-landing-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 10px;
}
.master-landing-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}
.master-landing-actions .btn { width: 100%; justify-content: center; }
/* Disabled Google Play placeholder: intentionally muted, not broken. */
.master-landing-actions .btn-play-coming:disabled {
  opacity: 1;
  color: var(--muted);
  background: var(--surface);
  border: 1.5px dashed var(--border);
  cursor: not-allowed;
}
.master-landing-actions .btn-play-coming:disabled .icon { opacity: 0.6; }

/* ── Combined my-bookings view (?mine=1) ── */
.mine-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--espresso);
  margin-top: 12px;
}
.mine-sub { font-size: 13px; color: var(--muted); margin: 4px 0 12px; }
.mine-master {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 6px;
}
