/*
 * One stylesheet for every surface: public site, booking flow, queue tracker,
 * admin console, display board, kiosk.
 *
 * Theming works by variable injection: app.js reads /api/public/bootstrap and
 * writes --brand and friends onto :root, so one CSS file serves every
 * white-label instance. Mobile-first throughout — the admin console's primary
 * device is the owner's phone.
 */

:root {
  --brand: #2f6fed;
  --accent: #f2994a;
  --radius: 12px;
  --font-heading: system-ui, -apple-system, sans-serif;
  --font-body: system-ui, -apple-system, sans-serif;

  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #16181d;
  --text-dim: #6a7180;
  --line: #e4e7ec;
  --ok: #1e9e5a;
  --warn: #d97706;
  --bad: #dc2626;
  --shadow: 0 1px 3px rgb(16 24 40 / 0.08), 0 1px 2px rgb(16 24 40 / 0.06);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme='auto'] {
    --bg: #101318;
    --surface: #1a1f27;
    --text: #eef1f5;
    --text-dim: #98a2b3;
    --line: #2c333e;
    --shadow: 0 1px 3px rgb(0 0 0 / 0.4);
  }
}
:root[data-theme='dark'] {
  --bg: #101318;
  --surface: #1a1f27;
  --text: #eef1f5;
  --text-dim: #98a2b3;
  --line: #2c333e;
  --shadow: 0 1px 3px rgb(0 0 0 / 0.4);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
}
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); }

.boot-splash { display: grid; place-items: center; min-height: 100dvh; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- layout -- */

.page { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(84px + env(safe-area-inset-bottom)); }
.page.wide { max-width: 960px; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar .title { font-weight: 700; font-size: 1.05rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .logo { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }

/* Bottom tab bar: thumb-reachable admin navigation on a phone. */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  flex: 1; padding: 8px 4px 6px; border: 0; background: none;
  color: var(--text-dim); font-size: 0.7rem; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabbar button .ico { font-size: 1.35rem; line-height: 1; }
.tabbar button.active { color: var(--brand); font-weight: 600; }

/* ----------------------------------------------------------------- bits --- */

.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px;
}
.card.tight { padding: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: calc(var(--radius) - 2px);
  background: var(--brand); color: #fff;
  font-size: 1rem; font-weight: 600; font-family: var(--font-body);
  padding: 12px 20px; cursor: pointer;
  min-height: 46px; /* comfortable thumb target */
  transition: filter 0.1s;
}
.btn:active { filter: brightness(0.9); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.secondary { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn.ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--line); }
.btn.danger { background: var(--bad); }
.btn.ok { background: var(--ok); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 0.85rem; }
.btn.block { width: 100%; }
.btn.big { min-height: 58px; font-size: 1.15rem; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; color: var(--text-dim); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px;
  border: 1.5px solid var(--line); border-radius: calc(var(--radius) - 4px);
  background: var(--surface); color: var(--text);
  font-size: 1rem; font-family: var(--font-body);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
}

.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600;
  background: var(--line); color: var(--text-dim);
}
.pill.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pill.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.pill.bad { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.pill.brand { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }

.row { display: flex; align-items: center; gap: 10px; }
.row .grow { flex: 1; min-width: 0; }
.muted { color: var(--text-dim); font-size: 0.87rem; }
.big-number { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.toast {
  position: fixed; inset-inline-start: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--text); color: var(--bg);
  padding: 10px 18px; border-radius: 999px;
  font-size: 0.9rem; z-index: 100;
  box-shadow: var(--shadow);
  animation: toast-in 0.2s ease-out;
  max-width: 90vw;
}
.toast.bad { background: var(--bad); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

.offline-banner {
  background: var(--warn); color: #fff; text-align: center;
  font-size: 0.82rem; font-weight: 600; padding: 4px 12px;
}

.empty { text-align: center; padding: 36px 16px; color: var(--text-dim); }
.empty .ico { font-size: 2.4rem; display: block; margin-bottom: 8px; }

/* -------------------------------------------------------------- booking --- */

.service-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 4px; border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.service-item:last-child { border-bottom: 0; }
.service-item .check {
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--line); flex-shrink: 0;
  display: grid; place-items: center; color: transparent; font-size: 0.8rem;
}
.service-item.selected .check { background: var(--brand); border-color: var(--brand); color: #fff; }

.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.slot-grid button {
  padding: 10px 4px; border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--text); font-size: 0.92rem; cursor: pointer;
}
.slot-grid button.selected { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }

.day-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day-strip button {
  flex: 0 0 auto; width: 62px; padding: 8px 0;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); cursor: pointer;
  text-align: center; font-size: 0.8rem;
}
.day-strip button .d { font-size: 1.15rem; font-weight: 700; display: block; }
.day-strip button.selected { background: var(--brand); border-color: var(--brand); color: #fff; }
.day-strip button:disabled { opacity: 0.35; }

.staff-pick { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.staff-pick button {
  flex: 0 0 auto; width: 86px; padding: 10px 6px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface); cursor: pointer; text-align: center;
  color: var(--text); font-size: 0.8rem;
}
.staff-pick button.selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.staff-pick .avatar {
  width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 6px;
  background: var(--line); display: grid; place-items: center;
  font-weight: 700; font-size: 1.1rem; color: var(--text-dim);
  overflow: hidden;
}
.staff-pick .avatar img { width: 100%; height: 100%; object-fit: cover; }

.wizard-steps { display: flex; gap: 6px; margin-bottom: 16px; }
.wizard-steps .step { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.wizard-steps .step.done { background: var(--brand); }

/* ---------------------------------------------------------------- queue --- */

.ticket-hero {
  text-align: center; padding: 28px 16px;
}
.ticket-hero .code { font-size: 4rem; font-weight: 900; letter-spacing: 2px; line-height: 1; }
.ticket-hero .status { margin-top: 10px; }

.queue-ticket {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); margin-bottom: 8px;
}
.queue-ticket .tcode {
  font-weight: 800; font-size: 1.25rem; min-width: 62px; text-align: center;
  padding: 8px 4px; border-radius: 8px;
  background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--brand);
}
.queue-ticket.called .tcode { background: var(--warn); color: #fff; animation: pulse 1.2s infinite; }
.queue-ticket.serving .tcode { background: var(--ok); color: #fff; }
@keyframes pulse { 50% { opacity: 0.6; } }
.queue-ticket .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* -------------------------------------------------------------- display --- */

.display-board {
  min-height: 100dvh; background: #0c0f14; color: #fff;
  display: flex; flex-direction: column; padding: 3vmin;
}
.display-board .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3vmin; }
.display-board .head h1 { font-size: 3.5vmin; margin: 0; }
.display-board .head .clock { font-size: 3vmin; color: #8a93a5; font-variant-numeric: tabular-nums; }
.display-board .cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3vmin; flex: 1; }
.display-board .panel { background: #151a22; border-radius: 2vmin; padding: 3vmin; }
.display-board .panel h2 { font-size: 2.6vmin; color: #8a93a5; text-transform: uppercase; letter-spacing: 0.1em; }
.display-board .now-serving .entry {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 7vmin; font-weight: 900; padding: 1.5vmin 0;
  border-bottom: 1px solid #232a35;
}
.display-board .now-serving .entry .who { font-size: 3.2vmin; font-weight: 600; color: #8a93a5; }
.display-board .now-serving .entry.fresh { color: var(--accent); animation: flash 1s 3; }
@keyframes flash { 50% { opacity: 0.3; } }
.display-board .next .entry {
  display: flex; justify-content: space-between;
  font-size: 4vmin; font-weight: 700; padding: 1.2vmin 0;
  border-bottom: 1px solid #232a35; color: #cdd5e0;
}
.display-board .next .entry .eta { color: #8a93a5; font-weight: 500; }

/* ---------------------------------------------------------------- kiosk --- */

.kiosk { min-height: 100dvh; display: flex; flex-direction: column; padding: 24px; max-width: 720px; margin: 0 auto; }
.kiosk h1 { font-size: 2rem; text-align: center; margin: 24px 0; }
.kiosk .service-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kiosk .service-buttons .btn { min-height: 84px; font-size: 1.15rem; white-space: normal; }
.kiosk .ticket-result .code { font-size: 6rem; }

/* ---------------------------------------------------------------- admin --- */

.login-page { display: grid; place-items: center; min-height: 100dvh; padding: 20px; }
.login-page .card { width: 100%; max-width: 380px; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.stat-row .stat { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; text-align: center; }
.stat-row .stat .v { font-size: 1.5rem; font-weight: 800; }
.stat-row .stat .l { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }

.cal-item {
  display: flex; gap: 12px; padding: 10px 12px;
  background: var(--surface); border-radius: 10px; box-shadow: var(--shadow);
  margin-bottom: 8px; align-items: center; cursor: pointer;
}
.cal-item .when { min-width: 52px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-item .bar { width: 4px; align-self: stretch; border-radius: 2px; background: var(--brand); }
/* Flexbox already reverses under dir=rtl, so the bar follows the text without
   a mirrored rule. Only genuinely one-sided glyphs need the override below. */

.client-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.client-row .avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand);
  display: grid; place-items: center; font-weight: 700;
}

.seg { display: flex; background: var(--line); border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.seg button {
  flex: 1; border: 0; background: none; padding: 8px 4px;
  font-size: 0.88rem; font-weight: 600; color: var(--text-dim);
  border-radius: 8px; cursor: pointer;
}
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.sheet-backdrop {
  position: fixed; inset: 0; background: rgb(0 0 0 / 0.45); z-index: 40;
  animation: fade-in 0.15s;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  background: var(--surface); border-radius: 18px 18px 0 0;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  max-height: 88dvh; overflow-y: auto;
  animation: sheet-up 0.2s ease-out;
}
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 14px; }
@keyframes sheet-up { from { transform: translateY(30%); } }
@keyframes fade-in { from { opacity: 0; } }

@media (min-width: 720px) {
  .sheet { inset-inline-start: 50%; inset-inline-end: auto; transform: translateX(-50%); width: 560px; border-radius: 18px; bottom: 5vh; }
  @keyframes sheet-up { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translateX(-50%); } }
  .tabbar { max-width: 640px; margin: 0 auto; border: 1px solid var(--line); border-radius: 14px 14px 0 0; }
}

/* Print: a paper queue ticket from the kiosk. */
@media print {
  body * { display: none !important; }
  .print-ticket, .print-ticket * { display: block !important; }
  .print-ticket { width: 58mm; text-align: center; font-family: monospace; }
}


/* ---------------------------------------------------------------- RTL ----- */
/*
 * Hebrew mirrors from `dir="rtl"` on <html> alone: flexbox reverses, text
 * aligns to the right, and logical properties follow. Only three things need
 * saying explicitly.
 */

/* 1. Chevrons and arrows point the wrong way when mirrored. */
[dir='rtl'] .menu-chevron { transform: scaleX(-1); display: inline-block; }

/* 2. Numbers, codes and times must not be reordered by the bidi algorithm.
      Ticket codes, prices, clock times and phone numbers all read
      left-to-right even inside Hebrew text. */
[dir='rtl'] .tcode,
[dir='rtl'] .cal-item .when,
[dir='rtl'] .ticket-hero .code,
[dir='rtl'] .display-board .entry span:first-child,
[dir='rtl'] .stat .v,
[dir='rtl'] .big-number,
[dir='rtl'] .slot-grid button,
[dir='rtl'] .day-strip button .d,
[dir='rtl'] input[type='tel'],
[dir='rtl'] input[type='number'] {
  direction: ltr;
  unicode-bidi: isolate;
}

/* Keep those isolated runs visually where the layout expects them. */
[dir='rtl'] .cal-item .when,
[dir='rtl'] .tcode { text-align: center; }
[dir='rtl'] input[type='tel'],
[dir='rtl'] input[type='number'] { text-align: right; }

/* 3. The horizontal scrollers must start from the right. */
[dir='rtl'] .day-strip,
[dir='rtl'] .staff-pick { direction: rtl; }

/* Hebrew has no capitals, so the uppercase treatment used for small English
   labels turns into needless letter-spacing on a script that cannot use it. */
[dir='rtl'] .stat .l,
[dir='rtl'] .display-board .panel h2 {
  text-transform: none;
  letter-spacing: 0;
}

/* Hebrew's taller glyphs need a little more room to avoid clipping. */
[dir='rtl'] body { line-height: 1.6; }

/* ------------------------------------------------------ language picker --- */

.lang-picker {
  display: flex; gap: 6px; flex-wrap: wrap;
  justify-content: center; margin: 20px 0 8px;
}
.lang-picker button {
  padding: 6px 14px; min-height: 38px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text-dim);
  font-size: 0.9rem; font-family: var(--font-body); cursor: pointer;
}
.lang-picker button.active {
  border-color: var(--brand); color: var(--brand); font-weight: 600;
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}
.lang-picker.compact { margin: 0; justify-content: flex-start; }
.lang-picker.compact button { min-height: 32px; padding: 4px 10px; font-size: 0.82rem; }

/* -------------------------------------------------------------- calendar -- */
/*
 * A month grid, not a strip of days. Every cell shows its availability before
 * the client taps it: a fully-booked Saturday looks different from a free one
 * at a glance, which is the whole point.
 *
 * Status is carried by colour AND a dot, never colour alone — roughly one man
 * in twelve cannot reliably tell the red from the green.
 */

.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.cal-month { font-weight: 700; font-size: 1.05rem; text-transform: capitalize; }
.cal-nav {
  min-width: 40px; min-height: 40px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text);
  font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.cal-nav:disabled { opacity: 0.3; cursor: default; }
/* The chevrons are directional glyphs and must mirror in Hebrew and Arabic. */
[dir='rtl'] .cal-nav { transform: scaleX(-1); }

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.cal-weekday {
  text-align: center; font-size: 0.72rem; font-weight: 600;
  color: var(--text-dim); padding-bottom: 4px;
}
.cal-cell {
  position: relative;
  aspect-ratio: 1; min-height: 40px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  border: 1.5px solid transparent; border-radius: 10px;
  background: var(--surface); color: var(--text);
  font-family: var(--font-body); font-size: 0.95rem; cursor: pointer;
}
.cal-cell.blank { background: none; cursor: default; }
.cal-cell .d { line-height: 1; }
/* Day numbers stay left-to-right inside an RTL grid. */
[dir='rtl'] .cal-cell .d { direction: ltr; unicode-bidi: isolate; }

.cal-cell.is-open { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.cal-cell.is-busy { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); }
.cal-cell.is-full,
.cal-cell.is-closed {
  background: var(--bg); color: var(--text-dim);
  cursor: default; opacity: 0.55;
}
/* Closed days get a strike so they read as "not open" rather than "busy". */
.cal-cell.is-closed .d { text-decoration: line-through; }
.cal-cell.is-unknown { background: var(--surface); }

.cal-cell.today { border-color: var(--text-dim); font-weight: 700; }
.cal-cell.selected {
  background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700;
}
.cal-cell.selected .dot { background: rgb(255 255 255 / 0.85); }

.dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.dot.free { background: var(--ok); }
.dot.busy { background: var(--warn); }
.dot.full { background: var(--bad); }
.dot.shut { background: var(--text-dim); }

.cal-legend {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  margin-top: 10px; font-size: 0.75rem; color: var(--text-dim);
}
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }

/* -------------------------------------------------------------- showcase -- */
/*
 * The page an integrator opens in front of a prospective client. Wider than the
 * rest of the app because it is read on a laptop across a counter, and printed
 * — the print rules at the end matter as much as the screen ones.
 */

.showcase { max-width: 860px; }
.showcase-hero { margin: 8px 0 28px; }
.showcase-hero h1 { font-size: 1.9rem; }
.showcase section { margin-bottom: 34px; }
.showcase h2 { font-size: 1.15rem; margin-bottom: 4px; }
.showcase h3 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-dim); margin: 20px 0 8px;
}
[dir='rtl'] .showcase h3 { text-transform: none; letter-spacing: 0; }

.industry-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px; margin-top: 12px;
}
.industry-grid button {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px; min-height: 84px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text);
  font-size: 0.78rem; font-family: var(--font-body);
  cursor: pointer; text-align: center; line-height: 1.25;
}
.industry-grid button .ico { font-size: 1.6rem; }
.industry-grid button.selected {
  border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  font-weight: 600;
}

.vocab { margin: 14px 0 4px; }
.vocab-row { display: flex; flex-wrap: wrap; gap: 6px; }

.module-list { display: grid; gap: 8px; }
.module-card {
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface); padding: 12px 14px;
}
.module-card.on { border-color: var(--brand); }
/* Not relevant to this trade: still offered, just quieter. */
.module-card.dim { opacity: 0.62; }
.module-head { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.module-head input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }
.module-name { display: block; font-weight: 650; }
.module-point { display: block; color: var(--text-dim); font-size: 0.88rem; margin-top: 2px; }
.module-more {
  border: 0; background: none; color: var(--brand);
  font-size: 0.82rem; font-family: var(--font-body);
  padding: 6px 0 0; cursor: pointer;
}
.module-detail {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line);
  font-size: 0.88rem;
}
.module-detail p { margin: 0 0 6px; }

.demo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px; margin-top: 12px;
}
.demo-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 10px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface);
  color: var(--text); text-decoration: none; font-size: 0.85rem; text-align: center;
}
.demo-card .ico { font-size: 1.7rem; }
.demo-card:hover { border-color: var(--brand); color: var(--brand); }

.spec-list { margin: 10px 0 0; padding-inline-start: 20px; }
.spec-list li { padding: 3px 0; }
.showcase-foot { margin-top: 30px; text-align: center; font-size: 0.8rem; }

/* Printed and handed over, so drop everything interactive. */
@media print {
  .lang-picker, .demo-grid, .module-more, .industry-grid button:not(.selected),
  .tabbar, .topbar { display: none !important; }
  .module-card { break-inside: avoid; border-color: #ccc; }
  .module-card.dim { display: none; }
  .showcase { max-width: none; }
  a[href]::after { content: ''; }
}

/* --- Landing backdrop -----------------------------------------------------
 *
 * The business's own photographs, cross-fading slowly behind the landing page.
 * Two stacked layers so one can fade in while the other fades out; the page
 * content sits above both on its own stacking level.
 *
 * The gradient on the host is not a placeholder for a missing image — it is
 * the floor. With no photographs at all the page still reads as designed, and
 * with photographs it keeps text legible over whatever the owner uploaded,
 * which will not have been chosen with contrast in mind.
 */
.backdrop-host {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    linear-gradient(160deg,
      color-mix(in srgb, var(--brand) 22%, var(--bg)) 0%,
      var(--bg) 55%,
      color-mix(in srgb, var(--brand) 12%, var(--bg)) 100%);
}

.backdrop-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  will-change: opacity;
}

/* Text has to stay readable over an arbitrary photograph, so the scrim is
 * heavier at the top where the heading sits and clears toward the bottom. */
.backdrop-host::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--bg) 82%, transparent) 0%,
    color-mix(in srgb, var(--bg) 70%, transparent) 45%,
    color-mix(in srgb, var(--bg) 88%, transparent) 100%);
}

/* With photographs behind it, the content needs its own surface to sit on —
 * otherwise cards read as floating smudges. */
.has-backdrop .card {
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .backdrop-layer { transition: none !important; }
}

/* --- Duration picker ------------------------------------------------------
 *
 * Two native selects side by side. Native so the phone opens its own wheel —
 * the interaction people already know from setting an alarm, and the reason a
 * stylist can enter "an hour and five minutes" instead of rounding to whatever
 * a fixed list happened to offer.
 */
.duration-picker { display: flex; gap: 8px; }
.duration-picker select {
  flex: 1;
  min-height: 44px;          /* thumb-sized: this is used with gloves on */
  font-size: 16px;           /* under 16px and iOS zooms the whole page */
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

/* Hours and minutes side by side, in the booking form. */
.dur-row { display: flex; gap: 8px; }
.dur-row select { flex: 1; min-width: 0; }
