/* Trimma — modern-01 theme. Ported from prototypes/01-modern-minimal/styles.css. */
/* Design tokens — ported from prototypes/01-modern-minimal/styles.css.
   Source of truth for color, radius, shadow, type. Every other stylesheet
   references these via var(--…). */

:root {
  --bg: #FFFFFF;
  --surface: #FAFAFA;
  --surface-2: #F4F4F5;
  --border: #E5E7EB;
  --border-strong: #D4D4D8;
  --text: #111827;
  --text-muted: #6B7280;
  --text-subtle: #9CA3AF;

  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-soft: #EFF6FF;
  --accent-ring: rgba(37, 99, 235, 0.18);

  --status-wait-bg: #F3F4F6;
  --status-wait-fg: #4B5563;
  --status-notify-bg: #EFF6FF;
  --status-notify-fg: #1D4ED8;
  --status-chair-bg: #ECFDF5;
  --status-chair-fg: #047857;
  --status-done-bg: #F4F4F5;
  --status-done-fg: #6B7280;

  --warn-bg: #FFFBEB;
  --warn-fg: #92400E;
  --danger-bg: #FEF2F2;
  --danger-fg: #B91C1C;

  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --shadow-hover: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);

  --gutter: 28px;
  --font: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }

.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
/* Buttons, pills, fields, cards, banners, icons, toast, layout helpers.
   Ported from prototypes/01-modern-minimal/styles.css. */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover  { background: var(--surface); border-color: var(--border-strong); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface); }
.btn-lg     { padding: 14px 22px; font-size: 16px; border-radius: 10px; }
.btn-block  { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px var(--accent-ring);
  border-color: var(--accent);
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
  background: var(--surface-2); color: var(--text-muted);
  white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.wait    { background: var(--status-wait-bg);   color: var(--status-wait-fg); }
.pill.notify  { background: var(--status-notify-bg); color: var(--status-notify-fg); }
.pill.chair   { background: var(--status-chair-bg);  color: var(--status-chair-fg); }
.pill.done    { background: var(--status-done-bg);   color: var(--status-done-fg); }

.card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card.hover:hover { box-shadow: var(--shadow-hover); border-color: var(--border-strong); }
.card-tight { padding: 14px 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 500; font-size: 13px; }
.field input {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: 0;
  font-size: 17px;
  background: #fff;
}

.banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13.5px;
}
.banner.warn { background: var(--warn-bg); border-color: #FCD34D; color: var(--warn-fg); }
.banner.info { background: var(--accent-soft); border-color: #BFDBFE; color: var(--accent-hover); }
.banner.success { background: #ECFDF5; border-color: #A7F3D0; color: #047857; }
.banner.error   { background: var(--danger-bg); border-color: #FECACA; color: var(--danger-fg); }
.banner .grow { flex: 1; }

.icon    { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 22px; height: 22px; }

.row     { display: flex; align-items: center; gap: 10px; }
.col     { display: flex; flex-direction: column; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 18px; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.brand-mark {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--text);
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
}

.toast-host {
  position: fixed;
  right: 24px; bottom: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 200;
  pointer-events: none;
}
.toast {
  background: #111827;
  color: #fff;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 13.5px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.18);
  animation: toastIn .25s ease-out;
  pointer-events: auto;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast-error { background: #B91C1C; }
.toast-error .icon { color: #FCA5A5; }

/* Accessibility — respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* Customer booking (mobile-first) — ported from prototypes/01-modern-minimal/styles.css. */

body.booking { background: var(--surface); }

.book-shell {
  max-width: 390px; margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding-bottom: 90px;
}
.book-hero {
  padding: 26px 20px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.book-hero .brand { padding: 0; margin-bottom: 18px; }
.book-hero h1 { font-size: 24px; line-height: 1.2; }
.book-hero p  { color: var(--text-muted); margin: 6px 0 0; font-size: 14px; }

.book-section { padding: 22px 20px; border-bottom: 1px solid var(--border); }
.book-section h3 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); font-weight: 600; margin-bottom: 12px;
}

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  color: var(--text);
}
.chip:hover { border-color: var(--border-strong); }
.chip.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-hover);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.svc-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.svc-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: border-color .15s, background .15s;
}
.svc-card:hover { border-color: var(--border-strong); }
.svc-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 4px var(--accent-ring);
}
.svc-card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--surface);
}
.svc-card .name  { font-weight: 600; font-size: 16px; }
.svc-card .meta  { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.svc-card .price { font-weight: 600; font-size: 17px; }
.svc-card .tooltip {
  position: absolute;
  top: -8px; right: 12px;
  transform: translateY(-100%);
  background: #111827; color: #fff;
  font-size: 12px; padding: 5px 9px; border-radius: 6px;
  opacity: 0; pointer-events: none;
  transition: opacity .15s;
  white-space: nowrap;
}
.svc-card .tooltip.show { opacity: 1; }

.staff-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.staff-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
}
.staff-card:hover { border-color: var(--border-strong); }
.staff-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 4px var(--accent-ring);
}
.staff-card.hero { grid-column: 1 / -1; padding: 22px; }
.staff-card .av {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface-2); margin: 0 auto 10px;
  display: grid; place-items: center; font-weight: 700;
  font-size: 16px;
  border: 1px solid var(--border);
}
.staff-card.hero .av { width: 56px; height: 56px; font-size: 20px; background: var(--accent); color: #fff; border: 0; }
.staff-card .who  { font-weight: 600; }
.staff-card .wait { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.cal {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.cal::-webkit-scrollbar { height: 6px; }
.cal::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.date-pill {
  flex: 0 0 auto;
  width: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  scroll-snap-align: center;
  font: inherit;
  color: var(--text-muted);
}
.date-pill .dp-dow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.date-pill .dp-num { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.1; }
.date-pill .dp-mon { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.date-pill.avail:hover  { border-color: var(--border-strong); }
.date-pill.selected     { background: var(--accent); border-color: var(--accent); }
.date-pill.selected .dp-dow,
.date-pill.selected .dp-num,
.date-pill.selected .dp-mon { color: #fff; }
.date-pill.disabled     { opacity: 0.4; cursor: not-allowed; }

.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 4px; }
.slot {
  padding: 9px 0; text-align: center;
  border: 1px solid var(--border); border-radius: 8px;
  background: #fff; font-size: 13px; cursor: pointer;
}
.slot:hover     { border-color: var(--border-strong); }
.slot.selected  { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }
.slot.disabled  { opacity: 0.35; cursor: not-allowed; background: var(--surface); }

.book-cta {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  display: flex; gap: 12px; align-items: center;
  max-width: 390px; margin: 0 auto;
}
.book-cta .total { font-weight: 700; font-size: 16px; }
.book-cta .btn   { flex: 1; }

.confirm        { text-align: center; margin-top: 20px; }
.confirm .check {
  width: 64px; height: 64px; border-radius: 50%;
  background: #ECFDF5; color: #047857;
  display: grid; place-items: center;
  margin: 0 auto 16px;
}
.confirm .code {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 18px; font-weight: 600;
  letter-spacing: 0.05em;
  margin: 12px 0;
}
.confirm .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.confirm .stat  { padding: 12px; background: var(--surface); border-radius: 10px; border: 1px solid var(--border); }
.confirm .stat .label { font-size: 11.5px; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; }
.confirm .stat .value { font-size: 22px; font-weight: 700; margin-top: 4px; }

/* ---------- step wizard (booking) ---------- */
.step-progress {
  display: flex; gap: 6px;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.step-progress .dot {
  flex: 1; height: 4px; border-radius: 2px; background: var(--border);
}
.step-progress .dot.active { background: var(--accent); }
.step-progress .dot.done   { background: var(--text); opacity: 0.6; }

.step-panel { display: none; }
.step-panel.active { display: block; }

.step-head {
  padding: 22px 20px 8px;
}
.step-head h2 { font-size: 22px; line-height: 1.2; }
.step-head .step-hint { color: var(--text-muted); font-size: 13.5px; margin-top: 4px; }

.step-body { padding: 14px 20px 24px; }

.step-foot {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  display: flex; gap: 10px;
  max-width: 390px; margin: 0 auto;
  z-index: 20;
}
.step-foot .btn-back { flex: 0 0 auto; min-width: 96px; }
.step-foot .btn-next { flex: 1; }
.step-foot[data-step="1"] .btn-back { visibility: hidden; }

.svc-card.hidden { display: none !important; }
.empty-hint { padding: 12px 14px; text-align: center; color: var(--text-subtle); font-size: 13px; }

/* ---------- powered-by badge ---------- */
.powered-by {
  position: fixed;
  top: 16px; right: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 100;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.powered-by:hover {
  color: var(--text);
  border-color: var(--border-strong);
  text-decoration: none;
  box-shadow: var(--shadow-hover);
}
.powered-by .brand-mark {
  width: 18px; height: 18px; border-radius: 4px; font-size: 10px;
}
.powered-by .pb-label { color: var(--text-subtle); }
.powered-by .pb-name  { color: var(--text); font-weight: 700; }

@media (max-width: 480px) {
  .powered-by .pb-label { display: none; }
  .powered-by { padding: 5px 10px 5px 8px; gap: 6px; }
}

/* ---------- desktop (≥ 768px) ---------- */
@media (min-width: 768px) {
  body.booking {
    background:
      radial-gradient(ellipse 80% 50% at 50% 0%, rgba(37, 99, 235, 0.05), transparent 60%),
      var(--surface);
    padding: 32px 24px 48px;
    min-height: 100vh;
  }

  .book-shell {
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 16px 40px rgba(16, 24, 40, 0.08);
    padding-bottom: 0;
    overflow: hidden;
    min-height: 0;
  }

  .book-hero {
    padding: 40px 48px 32px;
  }
  .book-hero h1 { font-size: 34px; line-height: 1.1; }
  .book-hero p  { font-size: 15px; }

  .step-progress { padding: 18px 48px; }

  .step-head { padding: 28px 48px 4px; }
  .step-head h2 { font-size: 26px; }
  .step-head .step-hint { font-size: 14px; }

  .step-body { padding: 16px 48px 32px; }

  /* Footer becomes part of the card on desktop, not a fixed mobile bar */
  .step-foot {
    position: static;
    max-width: none;
    margin: 0;
    padding: 18px 48px;
    background: var(--surface);
  }
  .step-foot .btn-back { min-width: 120px; }
  .step-foot .btn-next { flex: 0 0 auto; min-width: 200px; }

  /* Wider service & staff layouts */
  .svc-grid    { grid-template-columns: 1fr 1fr; gap: 12px; }
  .staff-cards { grid-template-columns: repeat(3, 1fr) !important; gap: 12px; }
  .staff-card.hero { grid-column: 1 / -1; }

  /* Step 4 calendar + time slots side-by-side */
  .step-panel[data-step="4"] .step-body {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: start;
  }
  .step-panel[data-step="4"] .step-body .cal { width: 100%; }
  .step-panel[data-step="4"] .step-body .slot-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }

  /* Service step gets wider cards */
  .svc-card { padding: 18px 20px; }
  .svc-card .name { font-size: 17px; }
}

/* ---------- wider desktop (≥ 1100px): two-column with sticky review ---------- */
@media (min-width: 1100px) {
  .book-shell { max-width: 880px; }
  .book-hero  { padding: 48px 56px 32px; }
  .step-head, .step-body, .step-foot, .step-progress {
    padding-left: 56px; padding-right: 56px;
  }
}

/* ====================================================================
   Marketing landing — apex domain (body.marketing)
   ==================================================================== */
body.marketing {
  background:
    radial-gradient(ellipse 70% 50% at 30% -10%, rgba(37, 99, 235, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 10%,  rgba(5, 150, 105, 0.07), transparent 60%),
    var(--bg);
}

.m-nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 32px;
  display: flex; align-items: center; gap: 24px;
}
.m-nav .brand { padding: 0; font-size: 18px; }
.m-nav-links {
  flex: 1;
  display: flex; gap: 28px;
  margin-left: 24px;
}
.m-nav-links a {
  color: var(--text-muted); font-size: 14px; font-weight: 500; text-decoration: none;
}
.m-nav-links a:hover { color: var(--text); }
@media (max-width: 720px) {
  .m-nav-links { display: none; }
}

.m-hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 32px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
@media (max-width: 900px) {
  .m-hero { grid-template-columns: 1fr; gap: 40px; padding: 48px 24px 64px; }
}
.m-hero-copy { min-width: 0; }
.m-eyebrow {
  display: inline-block;
  padding: 6px 12px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  border-radius: 999px;
  margin-bottom: 24px;
}
.m-h1 {
  font-size: 64px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  max-width: 760px;
  margin: 0 0 24px;
}
.m-lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 0 36px;
}
.m-lead strong { color: var(--text); font-weight: 600; }
.m-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.m-trust {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--text-muted);
}
.m-trust strong { color: var(--text); font-weight: 700; }
.m-trust-dot { color: var(--text-subtle); }

/* ---- Franchise login card (right column of hero) ---- */
.m-login-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 12px 32px rgba(16,24,40,0.06);
  position: sticky;
  top: 24px;
}
@media (max-width: 900px) {
  .m-login-card { position: static; }
}
.m-login-head h3 { font-size: 19px; margin-bottom: 4px; }
.m-login-head p  { color: var(--text-muted); font-size: 13.5px; margin: 0 0 18px; }

.m-login-error,
.m-login-notice {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}
.m-login-error  { background: var(--danger-bg); color: var(--danger-fg); border: 1px solid #FECACA; }
.m-login-notice { background: var(--accent-soft); color: var(--accent-hover); border: 1px solid #BFDBFE; }

.m-login-form { display: flex; flex-direction: column; gap: 14px; }
.m-login-form .field input { font-size: 15px; padding: 12px 14px; }
.m-login-remember {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-muted); font-size: 13px;
  margin: 2px 0 4px;
  user-select: none;
}
.m-login-help {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--text-subtle);
  text-align: center;
}

.m-features, .m-flows, .m-demo {
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 32px;
}
.m-section-eyebrow {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}
.m-h2 {
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 40px;
  max-width: 720px;
}

.m-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 960px) {
  .m-feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .m-feature-grid { grid-template-columns: 1fr; }
  .m-hero         { padding: 56px 24px 64px; }
  .m-h1           { font-size: 40px; }
  .m-h2           { font-size: 28px; }
}

.m-feature {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.m-feature:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.m-feature h3 { font-size: 18px; margin-bottom: 8px; }
.m-feature p  { font-size: 14.5px; line-height: 1.55; color: var(--text-muted); margin: 0; }
.m-feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.m-feature-icon svg { width: 22px; height: 22px; }
.m-feature-icon--blue   { background: #EFF6FF; color: #1D4ED8; }
.m-feature-icon--amber  { background: #FFFBEB; color: #92400E; }
.m-feature-icon--green  { background: #ECFDF5; color: #047857; }
.m-feature-icon--violet { background: #F5F3FF; color: #6D28D9; }
.m-feature-icon--pink   { background: #FDF2F8; color: #9D174D; }
.m-feature-icon--slate  { background: #F1F5F9; color: #334155; }

.m-flows { padding-top: 0; }
.m-flow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 960px) {
  .m-flow-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .m-flow-grid { grid-template-columns: 1fr; }
}
.m-flow {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.m-flow-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
  margin-bottom: 14px;
}
.m-flow h4 { font-size: 15.5px; margin-bottom: 6px; }
.m-flow p  { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; margin: 0; }

.m-demo { padding-bottom: 96px; }
.m-demo-card {
  background: linear-gradient(135deg, #111827 0%, #1E3A8A 100%);
  border-radius: 20px;
  padding: 56px 48px;
  color: #fff;
  text-align: center;
}
.m-demo-card .m-section-eyebrow { color: #93C5FD; }
.m-demo-card .m-h2 { color: #fff; margin: 0 auto 16px; max-width: none; }
.m-demo-lead { color: rgba(255,255,255,0.78); max-width: 560px; margin: 0 auto 28px; font-size: 16px; line-height: 1.55; }
.m-demo-lead strong { color: #fff; }
.m-demo-card .btn { background: #fff; color: #111827; border-color: #fff; }
.m-demo-card .btn:hover { background: #F1F5F9; }
.m-demo-meta { margin-top: 18px; font-size: 13px; color: rgba(255,255,255,0.55); }
.m-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(255,255,255,0.08);
  padding: 2px 8px; border-radius: 6px; font-size: 13px;
  color: #BFDBFE;
}
.m-feature .m-mono, .m-flow .m-mono {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.m-foot {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px;
  border-top: 1px solid var(--border);
}
.m-foot-row {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.m-foot-row .brand { padding: 0; font-size: 15px; }
.m-foot-links { display: flex; gap: 20px; }
.m-foot-links a { color: var(--text-muted); font-size: 13.5px; text-decoration: none; }
.m-foot-links a:hover { color: var(--text); }
.m-foot-fine { color: var(--text-subtle); font-size: 12.5px; }

/* ====================================================================
   Manager (admin) — sidebar + topbar shell, Today schedule grid.
   Ported from prototypes/01-modern-minimal/manager.html + styles.css.
   ==================================================================== */
body.manager { background: var(--bg); }

.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.app[data-sidebar-collapsed="true"] { grid-template-columns: 1fr; }
.app[data-sidebar-collapsed="true"] .sidebar { display: none; }

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 22px 16px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
}
.sidebar .brand { padding: 4px 8px 18px; }
.sidebar .nav { display: flex; flex-direction: column; gap: 1px; }
.sidebar .nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  color: var(--text-muted);
  border-radius: 7px;
  font-weight: 500; font-size: 13.5px;
  text-decoration: none;
}
.sidebar .nav a:hover { background: #F4F4F5; color: var(--text); }
.sidebar .nav a.active { background: #fff; color: var(--text); border: 1px solid var(--border); }
.sidebar .nav .section {
  padding: 14px 10px 6px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-subtle); font-weight: 600;
}
.sidebar-footer { margin-top: auto; padding: 12px 8px; font-size: 12px; color: var(--text-subtle); }
.sidebar-account {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px; color: var(--text); font-size: 13px;
}
.sidebar-account:hover { background: var(--surface); }
.sidebar-account.active { background: var(--surface); }
.sidebar-account .muted { font-size: 11px; }
.sidebar-signout {
  display: block; padding: 8px 10px; margin-top: 2px;
  border-radius: 8px; font-size: 13px; color: var(--text-muted);
}
.sidebar-signout:hover { background: var(--surface); color: var(--danger-fg); }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.95);
  position: sticky; top: 0; z-index: 5;
  backdrop-filter: saturate(140%) blur(8px);
}
.topbar .switcher {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; font-weight: 500;
  cursor: pointer; font-family: inherit; font-size: 14px;
  list-style: none;
}
.topbar .switcher::-webkit-details-marker { display: none; }
.switcher-wrap { position: relative; }
.switcher-wrap[open] .switcher { border-color: var(--border-strong); }
.switcher-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  min-width: 200px; padding: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  display: flex; flex-direction: column; gap: 2px;
}
.switcher-menu a {
  padding: 8px 10px; border-radius: 7px; color: var(--text);
  font-size: 14px; text-decoration: none;
}
.switcher-menu a:hover { background: var(--surface); }
.switcher-menu a.active { background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }
.switcher-menu a.add { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 10px; color: var(--accent); }
.topbar .search {
  flex: 1; max-width: 420px;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px; background: var(--surface);
  color: var(--text-muted);
}
.topbar .search input { border: 0; background: transparent; outline: 0; flex: 1; color: var(--text); }

.date-nav { display: inline-flex; align-items: center; gap: 6px; }
.date-nav .date-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--text); font-size: 17px; line-height: 1; text-decoration: none;
}
.date-nav .date-step:hover { border-color: var(--border-strong); }
.date-nav .date-label { font-weight: 500; font-size: 14px; min-width: 132px; text-align: center; }
.date-nav .date-jump { margin: 0; }
.date-nav .date-jump input {
  font: inherit; font-size: 13px; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text);
}
.date-nav .date-today {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-hover); font-size: 13px; font-weight: 500; text-decoration: none;
}
.date-nav .date-today:hover { border-color: var(--accent); }

.sidebar-hamburger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  color: #4B5563;
  flex-shrink: 0;
}
.sidebar-hamburger:hover { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.sidebar-hamburger svg { width: 18px; height: 18px; }

.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-2); color: var(--text);
  display: grid; place-items: center;
  font-weight: 600; font-size: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
}
form.button_to { display: inline-block; margin: 0; }

.content { padding: var(--gutter); display: flex; flex-direction: column; gap: 24px; }

.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title h2 { font-size: 16px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { padding: 18px 20px; }
.kpi .label { color: var(--text-muted); font-size: 12.5px; font-weight: 500; }
.kpi .value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 4px; }
.kpi .delta { font-size: 12px; color: #047857; margin-top: 4px; }
.kpi .delta.down { color: #B91C1C; }

.toggle {
  position: relative; width: 36px; height: 20px;
  border-radius: 999px; background: var(--border-strong);
  border: 0; padding: 0; cursor: pointer;
  transition: background .15s;
}
.toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff;
  transition: transform .15s;
}
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(16px); }

/* ---------- Today schedule grid ---------- */
/* Scrolls in both axes within a bounded box so the header row can stay pinned
   (position: sticky needs the scroll to happen here, not on the window). */
.today-grid-wrap { overflow: auto; position: relative; max-height: calc(100vh - 220px); }
.today-grid {
  display: grid;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  width: 100%;
}
.tg-corner {
  background: #F9FAFB;
  border-bottom: 1px solid #E5E7EB;
  border-right: 1px solid #E5E7EB;
  position: sticky; top: 0; left: 0; z-index: 6;
}
.tg-head {
  padding: 14px 10px 16px;
  font-weight: 600;
  text-align: center;
  background: #F9FAFB;
  border-bottom: 1px solid #E5E7EB;
  border-right: 1px solid #E5E7EB;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  position: sticky; top: 0; z-index: 5;
}
.tg-head:last-child { border-right: 0; }
.tg-head .av {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}
.tg-head .av[data-color="amber"]   { background: linear-gradient(135deg, #FEF3C7, #FCD34D); color: #92400E; }
.tg-head .av[data-color="teal"]    { background: linear-gradient(135deg, #CCFBF1, #5EEAD4); color: #0F766E; }
.tg-head .av[data-color="violet"]  { background: linear-gradient(135deg, #EDE9FE, #C4B5FD); color: #5B21B6; }
.tg-head .av[data-color="pink"]    { background: linear-gradient(135deg, #FCE7F3, #F9A8D4); color: #9D174D; }
.tg-head .av[data-color="emerald"] { background: linear-gradient(135deg, #D1FAE5, #6EE7B7); color: #065F46; }
.tg-head .av[data-color="orange"]  { background: linear-gradient(135deg, #FED7AA, #FB923C); color: #9A3412; }
.tg-head .av[data-color="indigo"]  { background: linear-gradient(135deg, #E0E7FF, #A5B4FC); color: #3730A3; }
.tg-head .av[data-color="lime"]    { background: linear-gradient(135deg, #ECFCCB, #BEF264); color: #3F6212; }
.tg-head .nm { font-size: 13.5px; font-weight: 600; color: #111827; }
.tg-head .meta { font-size: 11.5px; color: #6B7280; font-weight: 500; }
/* Projected walk-in load on a barber's column (sum of queued walk-in minutes). */
.tg-load {
  margin-top: 2px;
  font-size: 10.5px; font-weight: 700;
  color: #92400E; background: #FEF3C7;
  border: 1px solid #FDE68A; border-radius: 999px;
  padding: 1px 8px; letter-spacing: 0.01em;
}
.tgh-name .tg-load { margin-top: 0; margin-left: auto; }

.tg-time {
  padding: 3px 12px 0 14px;
  font-variant-numeric: tabular-nums;
  color: #B1B7BD;
  font-size: 11px; font-weight: 400;
  border-right: 1px solid #E5E7EB;
  border-top: 1px solid #F3F4F6;
  display: flex; align-items: flex-start; justify-content: flex-end;
  line-height: 1;
}
.tg-time.hour-mark { font-weight: 600; color: #374151; font-size: 12px; border-top: 1px solid #E5E7EB; }

.tg-cell {
  height: 28px; /* 15-minute rows — must match Today::Snapshot::SLOT_HEIGHT_PX */
  background: #fff;
  border-right: 1px solid #F3F4F6;
  border-top: 1px solid #F3F4F6;
  position: relative;
}
.tg-cell.last-col { border-right: 0; }
.tg-cell.hour-mark { border-top: 1px solid #E5E7EB; }

/* ---- Day availability paint ---- */
.day-paint-modes { display: none; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.painting .day-paint-modes { display: flex; }

.painting .today-grid { outline: 2px dashed var(--accent); outline-offset: -2px; }
.painting .tg-cell { cursor: crosshair; }
.painting .tg-cell:hover { box-shadow: inset 0 0 0 2px var(--accent-ring); }
.painting .tg-unavail { display: none; }

/* Painted per-date availability — visible in normal view too, so the plan shows. */
.tg-cell.av-both    { background: #DBEAFE; }
.tg-cell.av-walkin  { background: repeating-linear-gradient(45deg, #FEF3C7, #FEF3C7 5px, #FDE9A8 5px, #FDE9A8 10px); }
.tg-cell.av-blocked { background: repeating-linear-gradient(45deg, #F3F4F6, #F3F4F6 5px, #E2E5EA 5px, #E2E5EA 10px); }

.tg-event {
  position: absolute;
  left: 3px; right: 3px;
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 12px; font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  cursor: pointer;
  user-select: none; -webkit-user-select: none;
}

/* Drag-to-reassign / reschedule (Today grid) — pointer-based, touch-friendly.
   Applies to committed event blocks and to projection blocks (dragging a
   tentative/projected walk-in commits it to the dropped barber + time). */
.tg-event.draggable-event,
.tg-projection[data-reservation-id] { cursor: grab; touch-action: none; }
.tg-event.draggable-event:active,
.tg-projection[data-reservation-id]:active { cursor: grabbing; }
.tg-event.dragging,
.tg-projection.dragging { opacity: 0.4; }
/* The clone that follows the pointer during a drag. */
.drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.9;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  transform: rotate(1deg);
  margin: 0;
}
/* While dragging, let the pointer fall through blocks to the cells underneath
   so elementFromPoint resolves a (staff column × time slot). `drag-active` is
   toggled on the schedule wrapper for the duration of a drag. */
.drag-active .tg-event,
.drag-active .tg-unavail,
.drag-active .tg-projection { pointer-events: none; }
.tg-cell.drag-target { background: color-mix(in srgb, var(--accent, #2563EB), transparent 88%); }
/* Overlapping appointments (a manager "squeezed" one in) — side-by-side blocks
   each get a red warning outline + a ⚠ marker on the badge. */
.tg-event.overlap { outline: 2px solid #DC2626; outline-offset: -2px; z-index: 2; }
.tg-event.overlap .badge::after { content: " ⚠"; }
.tg-event > div:first-child { display: flex; align-items: center; min-width: 0; }
.tg-event .who { font-weight: 700; font-size: 13px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-event .meta { font-size: 11.5px; opacity: 0.85; font-weight: 500; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Short events get progressively tighter so the customer name still fits.
   The duration tier is set on the element in _today_grid.html.erb.
   snug ≈ 30-min slot (~56px); compact ≈ 15-min slot (~28px). */
.tg-event.snug { padding: 4px 8px; line-height: 1.2; }
.tg-event.snug .who { font-size: 12px; }
.tg-event.snug .meta { font-size: 10.5px; margin-top: 1px; }
.tg-event.snug .badge { font-size: 9px; padding: 0 4px; margin-right: 4px; }

.tg-event.compact { padding: 2px 8px; line-height: 1.1; }
.tg-event.compact .badge { display: none; }
.tg-event.compact .meta { display: none; }
.tg-event.compact .who { font-size: 11.5px; }
.tg-event .badge {
  display: inline-block;
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
  margin-right: 6px;
}
.tg-event.appt    { background: #EFF6FF; border-left: 3px solid #2563EB; color: #1E3A8A; }
.tg-event.appt    .badge { background: #DBEAFE; color: #1E40AF; }
.tg-event.walkin  { background: #FFFBEB; border-left: 3px solid #F59E0B; color: #92400E; }
.tg-event.walkin  .badge { background: #FEF3C7; color: #92400E; }
.tg-event.in_chair { background: #ECFDF5; border-left-color: #10B981; color: #065F46; }
.tg-event.in_chair .badge { background: #A7F3D0; color: #065F46; }
.tg-event.notified { background: #FEF9C3; border-left-color: #EAB308; color: #854D0E; }
.tg-event.notified .badge { background: #FDE68A; color: #854D0E; }
.tg-event.completed { background: #F8FAFC; opacity: 0.55; border-left-color: #94A3B8; color: #64748B; }
.tg-event.completed .badge { background: #E2E8F0; color: #64748B; }
.tg-event.no_show { background: #FEF2F2; opacity: 0.85; border-left-color: #DC2626; color: #991B1B; }
.tg-event.no_show .badge { background: #FEE2E2; color: #B91C1C; }
.tg-event.no_show .who { text-decoration: line-through; text-decoration-color: rgba(220, 38, 38, 0.55); }
.tg-event.cancelled { background: #F4F4F5; opacity: 0.7; border-left-color: #9CA3AF; color: #6B7280; }
.tg-event.cancelled .badge { background: #E5E7EB; color: #6B7280; }
.tg-event.cancelled .who { text-decoration: line-through; text-decoration-color: rgba(107, 114, 128, 0.5); }

.tg-unavail {
  position: absolute;
  left: 3px; right: 3px;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px; font-weight: 600;
  color: #525252;
  background: repeating-linear-gradient(45deg, #F4F4F5 0 4px, #E4E4E7 4px 8px);
  border: 1px dashed #A1A1AA;
  line-height: 1.25;
  z-index: 1;
}

/* Projection blocks — where waiting walk-ins are predicted to land */
/* Queue forecast blocks are hidden until the "Show forecast" toggle adds
   .show-forecast to the schedule wrapper. The per-barber load badge still
   conveys queue pressure when they're hidden. */
.tg-projection, .tgh-projection { display: none; }
.show-forecast .tg-projection { display: block; }
.show-forecast .tgh-projection { display: block; }

.tg-projection {
  position: absolute;
  left: 3px; right: 3px;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 11.5px; font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  z-index: 1;
  background: repeating-linear-gradient(135deg, #FFFBEB 0 7px, #FEF3C7 7px 14px);
  border: 2px dashed #F59E0B;
  color: #92400E;
}
.tg-projection .who { font-weight: 700; font-size: 12.5px; color: #78350F; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-projection .meta { font-size: 11px; color: #B45309; font-weight: 500; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Short projections — mirror the event tiers (set in _today_grid.html.erb). */
.tg-projection.snug { padding: 3px 8px; line-height: 1.2; }
.tg-projection.snug .meta { font-size: 10px; margin-top: 1px; }
.tg-projection.compact { padding: 2px 8px; line-height: 1.1; }
.tg-projection.compact .meta { display: none; }
.tg-projection.compact .status-pill { display: none; }
.tg-projection .status-pill {
  display: inline-block;
  text-transform: uppercase;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 2px;
  background: #FCD34D; color: #78350F;
  margin-right: 6px;
}
.tg-projection.tentative {
  border: 2px dotted #94A3B8;
  background: #F8FAFC;
  color: #475569;
  opacity: 0.9;
}
.tg-projection.tentative .who { color: #334155; font-weight: 600; }
.tg-projection.tentative .meta { color: #64748B; font-style: italic; }
.tg-projection.tentative .status-pill {
  background: transparent;
  border: 1px solid #94A3B8;
  color: #475569;
  padding: 0 4px;
}

/* Now-line — horizontal red bar at current time */
.tg-now {
  position: absolute;
  left: 80px; right: 0;
  height: 0;
  border-top: 2px solid #DC2626;
  z-index: 2;
  pointer-events: none;
}
.tg-now::before {
  content: ''; position: absolute;
  left: -4px; top: -5px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #DC2626;
}

/* ---------- Horizontal Gantt layout (staff rows, hourly columns) ---------- */
.today-grid-h {
  display: grid;
  grid-template-columns: 170px repeat(20, minmax(38px, 1fr));
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
  background: #fff;
  width: 100%;
}
.tgh-corner {
  background: #F9FAFB;
  border-bottom: 1px solid #E5E7EB;
  border-right: 1px solid #E5E7EB;
}
.tgh-hour {
  padding: 12px 6px;
  font-weight: 600; text-align: center;
  background: #F9FAFB;
  border-bottom: 1px solid #E5E7EB;
  border-right: 1px solid #F3F4F6;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: #374151;
}
.tgh-hour.full { border-right: 1px solid #E5E7EB; }
.tgh-hour.half { font-weight: 400; color: #9CA3AF; font-size: 11px; }
.tgh-hour:last-child { border-right: 0; }
.tgh-hour.current { background: #EFF6FF; color: #1E40AF; }

.tgh-name {
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  border-right: 1px solid #E5E7EB;
  border-bottom: 1px solid #F3F4F6;
  background: #FAFAFA;
}
.tgh-name .av {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}
.tgh-name .av[data-color="amber"]   { background: linear-gradient(135deg, #FEF3C7, #FCD34D); color: #92400E; }
.tgh-name .av[data-color="teal"]    { background: linear-gradient(135deg, #CCFBF1, #5EEAD4); color: #0F766E; }
.tgh-name .av[data-color="violet"]  { background: linear-gradient(135deg, #EDE9FE, #C4B5FD); color: #5B21B6; }
.tgh-name .av[data-color="pink"]    { background: linear-gradient(135deg, #FCE7F3, #F9A8D4); color: #9D174D; }
.tgh-name .av[data-color="emerald"] { background: linear-gradient(135deg, #D1FAE5, #6EE7B7); color: #065F46; }
.tgh-name .av[data-color="orange"]  { background: linear-gradient(135deg, #FED7AA, #FB923C); color: #9A3412; }
.tgh-name .av[data-color="indigo"]  { background: linear-gradient(135deg, #E0E7FF, #A5B4FC); color: #3730A3; }
.tgh-name .av[data-color="lime"]    { background: linear-gradient(135deg, #ECFCCB, #BEF264); color: #3F6212; }
.tgh-name .nm { font-weight: 600; font-size: 13.5px; line-height: 1.2; color: #111827; }
.tgh-name .meta { font-size: 11px; color: #6B7280; margin-top: 2px; }
.tgh-name.cover { background: linear-gradient(180deg, #EFF6FF 0%, #FAFAFA 100%); }
.tgh-name.cover .av { border: 2px dashed #2563EB; box-shadow: 0 0 0 2px rgba(37,99,235,0.08); }

.tgh-day {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  border-bottom: 1px solid #F3F4F6;
  position: relative;
  grid-column: 2 / span 20;
}
.tgh-cell {
  height: 64px;
  border-right: 1px solid #F8FAFC;
}
.tgh-cell.hour-mark { border-right: 1px solid #E5E7EB; }
.tgh-cell:last-child { border-right: 0; }

.tgh-event, .tgh-unavail {
  position: absolute;
  top: 4px; bottom: 4px;
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 11px; font-weight: 500;
  line-height: 1.2;
  overflow: hidden;
  z-index: 1;
}
.tgh-event { box-shadow: 0 1px 2px rgba(0,0,0,0.06); cursor: pointer; }
.tgh-event .who { font-weight: 700; font-size: 11.5px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.tgh-event .meta { font-size: 10px; opacity: 0.85; font-weight: 500; margin-top: 1px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.tgh-event .badge {
  display: inline-block;
  font-size: 8.5px; padding: 1px 4px;
  border-radius: 2px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  vertical-align: 1px; margin-right: 4px;
}
.tgh-event.appt    { background: #EFF6FF; border-left: 3px solid #2563EB; color: #1E3A8A; }
.tgh-event.appt .badge { background: #DBEAFE; color: #1E40AF; }
.tgh-event.walkin  { background: #FFFBEB; border-left: 3px solid #F59E0B; color: #92400E; }
.tgh-event.walkin .badge { background: #FEF3C7; color: #92400E; }
.tgh-event.in_chair { background: #ECFDF5; border-left-color: #10B981; color: #065F46; }
.tgh-event.in_chair .badge { background: #A7F3D0; color: #065F46; }
.tgh-event.notified { background: #FEF9C3; border-left-color: #EAB308; color: #854D0E; }
.tgh-event.notified .badge { background: #FDE68A; color: #854D0E; }
.tgh-event.completed { background: #F8FAFC; opacity: 0.6; border-left-color: #94A3B8; color: #64748B; }
.tgh-event.completed .badge { background: #E2E8F0; color: #64748B; }
.tgh-event.no_show { background: #FEF2F2; opacity: 0.85; border-left-color: #DC2626; color: #991B1B; }
.tgh-event.no_show .badge { background: #FEE2E2; color: #B91C1C; }
.tgh-event.no_show .who { text-decoration: line-through; text-decoration-color: rgba(220, 38, 38, 0.55); }
.tgh-event.cancelled { background: #F4F4F5; opacity: 0.7; border-left-color: #9CA3AF; color: #6B7280; }
.tgh-event.cancelled .badge { background: #E5E7EB; color: #6B7280; }
.tgh-event.cancelled .who { text-decoration: line-through; text-decoration-color: rgba(107, 114, 128, 0.5); }
.tgh-unavail {
  font-weight: 600; color: #525252;
  background: repeating-linear-gradient(45deg, #F4F4F5 0 4px, #E4E4E7 4px 8px);
  border: 1px dashed #A1A1AA;
  white-space: nowrap;
}

/* Projection blocks (horizontal Gantt variant) */
.tgh-projection {
  position: absolute;
  top: 4px; bottom: 4px;
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 11px; font-weight: 500;
  line-height: 1.2;
  overflow: hidden;
  z-index: 1;
  background: repeating-linear-gradient(135deg, #FFFBEB 0 7px, #FEF3C7 7px 14px);
  border: 2px dashed #F59E0B;
  color: #92400E;
}
.tgh-projection .who { font-weight: 700; font-size: 11.5px; color: #78350F; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.tgh-projection .status-pill {
  display: inline-block;
  text-transform: uppercase;
  font-size: 8.5px; font-weight: 800;
  letter-spacing: 0.05em;
  padding: 1px 4px;
  border-radius: 2px;
  background: #FCD34D; color: #78350F;
  margin-right: 4px;
}
.tgh-projection.tentative {
  border: 2px dotted #94A3B8;
  background: #F8FAFC;
  color: #475569;
  opacity: 0.9;
}
.tgh-projection.tentative .who { color: #334155; font-weight: 600; }
.tgh-projection.tentative .status-pill {
  background: transparent;
  border: 1px solid #94A3B8;
  color: #475569;
  padding: 0 4px;
}

/* Now-line for horizontal mode — vertical red line */
.tgh-now {
  position: absolute; top: 0; bottom: 0;
  width: 0; border-left: 2px solid #DC2626;
  z-index: 3; pointer-events: none;
}

/* Layout toggle ↔ which grid is visible.
   `!important` on the now-line hides so JS-inline `display: block` (positioning
   helper) doesn't show the wrong layout's indicator. */
.today-grid-wrap[data-layout="v"] .today-grid-h { display: none; }
.today-grid-wrap[data-layout="h"] .today-grid   { display: none; }
.today-grid-wrap[data-layout="h"] .tg-now       { display: none !important; }
.today-grid-wrap[data-layout="v"] .tgh-now      { display: none !important; }

/* Legend below the grid */
.tg-legend {
  padding: 12px 16px;
  border-top: 1px solid #E5E7EB;
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: #6B7280;
}
.tg-legend .swatch {
  display: inline-block; width: 14px; height: 14px;
  border-radius: 3px;
  vertical-align: -2px;
  margin-right: 6px;
}
.tg-legend .swatch.appt    { background: #EFF6FF; border-left: 3px solid #2563EB; }
.tg-legend .swatch.walkin  { background: #FFFBEB; border-left: 3px solid #F59E0B; }
.tg-legend .swatch.chair   { background: #ECFDF5; border-left: 3px solid #10B981; }
.tg-legend .swatch.done    { background: #F8FAFC; border-left: 3px solid #94A3B8; opacity: 0.7; }
.tg-legend .swatch.unavail {
  background: repeating-linear-gradient(45deg, #F4F4F5 0 3px, #E4E4E7 3px 6px);
  border: 1px dashed #A1A1AA;
}

/* Wait-list panel */
.sched-tabs { display: inline-flex; gap: 6px; margin-bottom: 16px; }

/* Compact employee picker on the staff calendar */
.emp-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.emp-weeknav { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.emp-chip {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding: 5px 14px 5px 5px; border: 1px solid var(--border); border-radius: 999px;
  background: #fff; color: var(--text); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.emp-chip:hover { border-color: var(--border-strong); }
.emp-chip.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }
.emp-av {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 700;
  background: var(--surface); color: var(--text-muted); flex-shrink: 0;
}
.emp-chip.selected .emp-av { background: var(--accent); color: #fff; }

.schedule-with-waitlist {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
  align-items: start;
}
.schedule-with-waitlist.no-waitlist { grid-template-columns: 1fr; }
@media (max-width: 1240px) {
  .schedule-with-waitlist { grid-template-columns: 1fr; }
}
.waitlist-area { padding: 0; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.waitlist-header {
  padding: 16px 18px;
  border-bottom: 1px solid #E5E7EB;
  display: flex; align-items: center; justify-content: space-between;
}
.waitlist-list {
  padding: 14px;
  display: flex; flex-direction: column; gap: 12px;
  max-height: calc(100vh - 320px);
  overflow-y: auto;
}
.wl-card {
  border: 1px solid #E5E7EB;
  border-left: 4px solid #F59E0B;
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(to right, #FFFBEB 0%, #fff 18%);
}
.wl-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-subtle);
  font-size: 13px;
}
.wl-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.wl-name { font-weight: 700; font-size: 14.5px; color: #111827; }
.wl-svc { font-size: 13px; color: #374151; margin-top: 8px; font-weight: 500; }
.wl-meta { font-size: 12px; color: #6B7280; margin-top: 4px; }
.wl-pill {
  font-size: 10.5px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap;
  align-self: flex-start;
}
.wl-pill.waiting  { background: #FEF3C7; color: #92400E; }
.wl-pill.notified { background: #FEF9C3; color: #854D0E; }
.wl-pill.in_chair { background: #D1FAE5; color: #065F46; }

.wl-card.notified  { border-left-color: #EAB308; background: linear-gradient(to right, #FEFCE8 0%, #fff 18%); }
.wl-card.in_chair  { border-left-color: #10B981; background: linear-gradient(to right, #ECFDF5 0%, #fff 18%); }

.wl-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; font-size: 12px; color: #6B7280;
}
.wl-staff { font-weight: 600; color: #374151; }
.wl-elapsed { font-variant-numeric: tabular-nums; font-weight: 600; color: #374151; }

.wl-actions {
  display: flex; gap: 8px; margin-top: 12px;
}
.wl-actions .btn {
  padding: 6px 12px; font-size: 12.5px; flex: 1;
}
.wl-actions .btn.wl-noshow {
  background: #fff; border-color: #FECACA; color: #B91C1C;
}
.wl-actions .btn.wl-noshow:hover { background: #FEE2E2; border-color: #F87171; }
.wl-actions .btn.wl-reassign { flex: 0 0 auto; padding: 6px 10px; }

/* ---------- reassign popover ---------- */
.reassign-popover {
  position: fixed;
  z-index: 200;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  padding: 6px;
  min-width: 280px;
  max-height: 70vh;
  overflow-y: auto;
}
.reassign-popover[hidden] { display: none; }
.rp-header {
  padding: 8px 12px 6px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: #6B7280;
  border-bottom: 1px solid #F3F4F6;
  margin-bottom: 4px;
}
.rp-option {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0; background: transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font: inherit; color: inherit;
}
.rp-option:hover { background: #F9FAFB; }
.rp-option.current { background: #EFF6FF; }
.rp-option.disabled { opacity: 0.45; cursor: not-allowed; }
.rp-option.disabled:hover { background: transparent; }
.rp-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 11px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}
.rp-avatar[data-color="amber"]   { background: linear-gradient(135deg, #FEF3C7, #FCD34D); color: #92400E; }
.rp-avatar[data-color="teal"]    { background: linear-gradient(135deg, #CCFBF1, #5EEAD4); color: #0F766E; }
.rp-avatar[data-color="violet"]  { background: linear-gradient(135deg, #EDE9FE, #C4B5FD); color: #5B21B6; }
.rp-avatar[data-color="pink"]    { background: linear-gradient(135deg, #FCE7F3, #F9A8D4); color: #9D174D; }
.rp-avatar[data-color="emerald"] { background: linear-gradient(135deg, #D1FAE5, #6EE7B7); color: #065F46; }
.rp-avatar[data-color="orange"]  { background: linear-gradient(135deg, #FED7AA, #FB923C); color: #9A3412; }
.rp-avatar[data-color="indigo"]  { background: linear-gradient(135deg, #E0E7FF, #A5B4FC); color: #3730A3; }
.rp-avatar[data-color="lime"]    { background: linear-gradient(135deg, #ECFCCB, #BEF264); color: #3F6212; }
.rp-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #F3F4F6; color: #6B7280;
  display: grid; place-items: center;
  font-size: 14px; flex-shrink: 0;
}
.rp-text { flex: 1; min-width: 0; }
.rp-name { font-weight: 600; font-size: 13.5px; line-height: 1.2; }
.rp-meta { font-size: 11px; color: #6B7280; margin-top: 1px; }
.rp-check { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.45);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff;
  border-radius: 14px;
  width: min(560px, 100%);
  max-height: 90vh; overflow: auto;
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.modal > header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.modal > header h2 { font-size: 18px; }
.modal > header .subtitle { color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }
.modal .body { padding: 20px; flex: 1; overflow-y: auto; }
.modal > footer {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.modal-close {
  width: 30px; height: 30px;
  border: 0; background: transparent;
  border-radius: 6px;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--text-muted);
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }

/* Walk-in modal — service/staff cards reuse booking styles. */
.wi-step { display: none; }
.wi-step.active { display: block; }

/* ---------- Issues button + badge ---------- */
.issues-btn { display: inline-flex; align-items: center; gap: 6px; }
.issues-count {
  background: #FEE2E2;
  color: #991B1B;
  font-weight: 700;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 2px;
  line-height: 1.4;
}
.issues-count.zero { background: #F3F4F6; color: #6B7280; }

/* ---------- Issue cards inside the modal ---------- */
#issues-list { display: flex; flex-direction: column; gap: 10px; }
.issues-empty {
  text-align: center;
  padding: 32px 16px;
  color: #6B7280;
  font-size: 13px;
}
.issues-empty strong { color: #111827; display: block; margin-bottom: 4px; font-size: 14px; }

.issue-card {
  border: 1px solid #E5E7EB;
  border-left: 4px solid #94A3B8;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  transition: opacity 200ms;
}
.issue-card.dismissed { opacity: 0.4; pointer-events: none; }
.issue-card.no_show    { border-left-color: #DC2626; background: linear-gradient(to right, #FEF2F2 0%, #fff 12%); }
.issue-card.cancelled  { border-left-color: #6B7280; background: linear-gradient(to right, #F3F4F6 0%, #fff 12%); }
.issue-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.issue-name { font-weight: 700; font-size: 14px; line-height: 1.2; color: #111827; }
.issue-meta { font-size: 12px; color: #6B7280; margin-top: 3px; }
.issue-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; font-size: 12.5px; color: #4B5563;
  gap: 10px;
}
.issue-bottom .actions { display: flex; gap: 6px; }
.issue-bottom .btn { padding: 5px 10px; font-size: 12px; }
.issue-pill {
  font-size: 9.5px; font-weight: 800; padding: 3px 8px;
  border-radius: 999px; text-transform: uppercase; letter-spacing: 0.05em;
  white-space: nowrap;
}
.issue-pill.no_show   { background: #FEE2E2; color: #991B1B; }
.issue-pill.cancelled { background: #E5E7EB; color: #4B5563; }
.issue-pill.kind {
  background: #F3F4F6; color: #4B5563;
  margin-left: 6px; font-weight: 700;
}

/* ---------- Staff thumbnails (employee picker) ---------- */
.staff-thumbs { display: flex; gap: 12px; flex-wrap: wrap; }
.staff-thumb {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 22px; border-radius: 14px;
  border: 1px solid #E5E7EB;
  background: white; cursor: pointer;
  transition: all 140ms ease;
  font: inherit; color: inherit;
  min-width: 168px;
  text-decoration: none;
}
.staff-thumb:hover { border-color: #94A3B8; transform: translateY(-1px); text-decoration: none; }
.staff-thumb.selected { border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.thumb-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 20px;
  background: linear-gradient(135deg, #DBEAFE, #93C5FD);
  color: #1E40AF;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}
.staff-thumb[data-color="amber"]   .thumb-avatar { background: linear-gradient(135deg, #FEF3C7, #FCD34D); color: #92400E; }
.staff-thumb[data-color="teal"]    .thumb-avatar { background: linear-gradient(135deg, #CCFBF1, #5EEAD4); color: #0F766E; }
.staff-thumb[data-color="violet"]  .thumb-avatar { background: linear-gradient(135deg, #EDE9FE, #C4B5FD); color: #5B21B6; }
.staff-thumb[data-color="pink"]    .thumb-avatar { background: linear-gradient(135deg, #FCE7F3, #F9A8D4); color: #9D174D; }
.staff-thumb[data-color="emerald"] .thumb-avatar { background: linear-gradient(135deg, #D1FAE5, #6EE7B7); color: #065F46; }
.staff-thumb[data-color="orange"]  .thumb-avatar { background: linear-gradient(135deg, #FED7AA, #FB923C); color: #9A3412; }
.staff-thumb[data-color="indigo"]  .thumb-avatar { background: linear-gradient(135deg, #E0E7FF, #A5B4FC); color: #3730A3; }
.staff-thumb[data-color="lime"]    .thumb-avatar { background: linear-gradient(135deg, #ECFCCB, #BEF264); color: #3F6212; }
.thumb-name { font-weight: 600; font-size: 14px; color: #111827; }
.thumb-meta { font-size: 12px; color: #6B7280; }

/* ---------- Weekly availability paint grid ---------- */
.avail-grid {
  display: grid;
  grid-template-columns: 72px repeat(7, 1fr);
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
  user-select: none;
  background: #fff;
}
.ag-day {
  padding: 12px 10px;
  font-weight: 600;
  text-align: center;
  background: #F9FAFB;
  border-bottom: 1px solid #E5E7EB;
  font-size: 13.5px;
}
.ag-day.today { background: #EFF6FF; color: #1E40AF; }
.ag-day .sub { display: block; font-size: 11px; color: #6B7280; font-weight: 500; margin-top: 2px; }
.ag-day.today .sub { color: #2563EB; }
.ag-day .ag-date { display: block; font-size: 11px; color: #6B7280; font-weight: 500; margin-top: 2px; }
.ag-day.today .ag-date { color: #2563EB; }
.ag-corner { background: #F9FAFB; border-bottom: 1px solid #E5E7EB; border-right: 1px solid #E5E7EB; }
.ag-time {
  padding: 0 10px;
  font-variant-numeric: tabular-nums;
  color: #6B7280;
  font-size: 12px;
  border-right: 1px solid #E5E7EB;
  border-top: 1px solid #F3F4F6;
  display: flex; align-items: center; justify-content: flex-end;
  line-height: 1;
}
.ag-time.hour-mark { font-weight: 600; color: #374151; border-top: 1px solid #E5E7EB; }
.ag-cell {
  height: 28px;
  cursor: pointer;
  border-right: 1px solid #F3F4F6;
  border-top: 1px solid #F3F4F6;
  transition: background 80ms;
  background: #fff;
}
.ag-cell.hour-mark { border-top: 1px solid #E5E7EB; }
.ag-cell:hover { background: rgba(37, 99, 235, 0.07); }
.ag-cell.on.both          { background: #DBEAFE; }
.ag-cell.on.both:hover    { background: #BFDBFE; }
.ag-cell.on.walkin_only   { background: #FEF3C7; }
.ag-cell.on.walkin_only:hover { background: #FDE68A; }

/* Paint-mode picker (above grid) */
.paint-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 12.5px; font-weight: 500;
  padding: 6px 12px; border-radius: 8px;
  background: white; border: 1px solid #E5E7EB;
  color: #374151; cursor: pointer;
  transition: all 120ms;
}
.paint-btn:hover { border-color: #94A3B8; }
.paint-btn.active { border-color: #2563EB; background: #EFF6FF; box-shadow: 0 0 0 2px rgba(37,99,235,0.12); }
.paint-sw       { width: 14px; height: 14px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.paint-sw-both   { background: #DBEAFE; border: 1px solid #93C5FD; }
.paint-sw-walkin { background: #FEF3C7; border: 1px solid #FCD34D; }
.paint-sw-block  { background: #fff;    border: 1px solid #E5E7EB; }

/* ---------- All-staff weekly calendar (read-only Gantt) ---------- */
.all-staff-wrap { overflow-x: auto; }
.all-staff-grid {
  display: grid;
  grid-template-columns: 220px repeat(7, minmax(180px, 1fr));
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
  background: #fff;
  min-width: 1480px;
}
.as-corner { background: #F9FAFB; border-right: 1px solid #E5E7EB; border-bottom: 1px solid #E5E7EB; }
.as-day {
  padding: 12px 10px;
  font-weight: 600;
  text-align: center;
  background: #F9FAFB;
  border-right: 1px solid #E5E7EB;
  border-bottom: 1px solid #E5E7EB;
  font-size: 14px;
}
.as-day.today { background: #EFF6FF; color: #1E40AF; }
.as-day .sub { display: block; font-size: 11.5px; font-weight: 500; color: #6B7280; margin-top: 2px; }
.as-day.today .sub { color: #2563EB; }
.as-name {
  padding: 10px 14px;
  display: flex; align-items: center; gap: 12px;
  border-right: 1px solid #E5E7EB;
  border-bottom: 1px solid #F3F4F6;
  background: #FAFAFA;
}
.as-name .av {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}
.as-name .av[data-color="amber"]   { background: linear-gradient(135deg, #FEF3C7, #FCD34D); color: #92400E; }
.as-name .av[data-color="teal"]    { background: linear-gradient(135deg, #CCFBF1, #5EEAD4); color: #0F766E; }
.as-name .av[data-color="violet"]  { background: linear-gradient(135deg, #EDE9FE, #C4B5FD); color: #5B21B6; }
.as-name .av[data-color="pink"]    { background: linear-gradient(135deg, #FCE7F3, #F9A8D4); color: #9D174D; }
.as-name .av[data-color="emerald"] { background: linear-gradient(135deg, #D1FAE5, #6EE7B7); color: #065F46; }
.as-name .av[data-color="orange"]  { background: linear-gradient(135deg, #FED7AA, #FB923C); color: #9A3412; }
.as-name .av[data-color="indigo"]  { background: linear-gradient(135deg, #E0E7FF, #A5B4FC); color: #3730A3; }
.as-name .av[data-color="lime"]    { background: linear-gradient(135deg, #ECFCCB, #BEF264); color: #3F6212; }
.as-name .nm { font-weight: 600; font-size: 14px; line-height: 1.25; color: #111827; }
.as-name .ro { font-size: 11.5px; color: #6B7280; margin-top: 2px; }

.as-day-row {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  border-right: 1px solid #E5E7EB;
  border-bottom: 1px solid #F3F4F6;
  position: relative;
}
.as-day-row.today { background: rgba(239, 246, 255, 0.5); }
.as-cell {
  height: 56px;
  background: transparent;
  border-left: 1px solid transparent;
}
.as-cell.hour-mark { border-left: 1px solid rgba(0,0,0,0.04); }

/* Solid fill — "both" mode, color matches employee avatar */
.as-cell.on[data-color="amber"]   { background: #F59E0B; }
.as-cell.on[data-color="teal"]    { background: #06B6D4; }
.as-cell.on[data-color="violet"]  { background: #8B5CF6; }
.as-cell.on[data-color="pink"]    { background: #EC4899; }
.as-cell.on[data-color="emerald"] { background: #10B981; }
.as-cell.on[data-color="orange"]  { background: #F97316; }
.as-cell.on[data-color="indigo"]  { background: #6366F1; }
.as-cell.on[data-color="lime"]    { background: #84CC16; }

/* Diagonal-stripe overlay — "walkin_only" mode */
.as-cell.on.walkin_only {
  background-image: linear-gradient(135deg, rgba(255,255,255,0.5) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0.5) 75%, transparent 75%);
  background-size: 6px 6px;
}

/* Mode toggle row — Per-employee vs All-staff */
.staff-mode-toggle { display: flex; gap: 6px; }
.staff-mode-toggle .btn { padding: 7px 14px; }

/* ============================================================
   Staff tablet / station — picker, PIN, and main 3-state UI.
   Designed for tablet landscape; readable at arm's length.
   ============================================================ */
body.station-body { background: #F1F5F9; margin: 0; -webkit-font-smoothing: antialiased; }

/* ---- Picker (who's at this chair?) and PIN entry ---- */
.station-picker { max-width: 960px; margin: 0 auto; padding: 32px 36px; }
.station-picker-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.station-picker-head .brand { padding: 0; font-size: 18px; }
.station-picker-body h1 { font-size: 32px; margin-bottom: 12px; }
.station-picker-body p { color: var(--text-muted); margin: 0 0 26px; }

.picker-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
@media (max-width: 880px) { .picker-grid { grid-template-columns: repeat(2, 1fr); } }

.picker-tile {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 18px; border-radius: 14px;
  border: 1px solid #E5E7EB;
  background: #fff;
  text-decoration: none; color: inherit;
  transition: all 140ms ease;
}
.picker-tile:hover  { border-color: #94A3B8; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); text-decoration: none; }
.picker-tile:active { transform: translateY(0); }
.picker-tile .thumb-avatar { width: 84px; height: 84px; font-size: 26px; }
.picker-tile .thumb-name   { font-size: 16px; font-weight: 600; }
.picker-tile .thumb-meta   { font-size: 12.5px; color: #6B7280; }
.picker-tile[data-color="amber"]   .thumb-avatar { background: linear-gradient(135deg, #FEF3C7, #FCD34D); color: #92400E; }
.picker-tile[data-color="teal"]    .thumb-avatar { background: linear-gradient(135deg, #CCFBF1, #5EEAD4); color: #0F766E; }
.picker-tile[data-color="violet"]  .thumb-avatar { background: linear-gradient(135deg, #EDE9FE, #C4B5FD); color: #5B21B6; }
.picker-tile[data-color="pink"]    .thumb-avatar { background: linear-gradient(135deg, #FCE7F3, #F9A8D4); color: #9D174D; }
.picker-tile[data-color="emerald"] .thumb-avatar { background: linear-gradient(135deg, #D1FAE5, #6EE7B7); color: #065F46; }
.picker-tile[data-color="orange"]  .thumb-avatar { background: linear-gradient(135deg, #FED7AA, #FB923C); color: #9A3412; }
.picker-tile[data-color="indigo"]  .thumb-avatar { background: linear-gradient(135deg, #E0E7FF, #A5B4FC); color: #3730A3; }
.picker-tile[data-color="lime"]    .thumb-avatar { background: linear-gradient(135deg, #ECFCCB, #BEF264); color: #3F6212; }

.station-pin {
  max-width: 420px; margin: 32px auto 0;
  background: #fff; border: 1px solid #E5E7EB; border-radius: 16px;
  padding: 40px 36px; text-align: center;
  box-shadow: 0 6px 30px rgba(0,0,0,0.05);
}
.station-pin .thumb-avatar.lg { width: 96px; height: 96px; font-size: 30px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4); }
.station-pin .thumb-avatar.lg[data-color="amber"]   { background: linear-gradient(135deg, #FEF3C7, #FCD34D); color: #92400E; }
.station-pin .thumb-avatar.lg[data-color="teal"]    { background: linear-gradient(135deg, #CCFBF1, #5EEAD4); color: #0F766E; }
.station-pin .thumb-avatar.lg[data-color="violet"]  { background: linear-gradient(135deg, #EDE9FE, #C4B5FD); color: #5B21B6; }
.station-pin .thumb-avatar.lg[data-color="pink"]    { background: linear-gradient(135deg, #FCE7F3, #F9A8D4); color: #9D174D; }
.station-pin .thumb-avatar.lg[data-color="emerald"] { background: linear-gradient(135deg, #D1FAE5, #6EE7B7); color: #065F46; }
.station-pin .thumb-avatar.lg[data-color="orange"]  { background: linear-gradient(135deg, #FED7AA, #FB923C); color: #9A3412; }
.station-pin .thumb-avatar.lg[data-color="indigo"]  { background: linear-gradient(135deg, #E0E7FF, #A5B4FC); color: #3730A3; }
.station-pin .thumb-avatar.lg[data-color="lime"]    { background: linear-gradient(135deg, #ECFCCB, #BEF264); color: #3F6212; }
.station-pin h2 { font-size: 22px; margin-bottom: 4px; }
.station-pin p  { color: var(--text-muted); margin: 6px 0 22px; font-size: 14px; }
.pin-input {
  width: 100%; max-width: 280px;
  padding: 18px 20px;
  font-size: 38px; font-weight: 700;
  text-align: center; letter-spacing: 16px;
  border: 1px solid #E5E7EB; border-radius: 12px;
  background: #FAFAFA;
}
.pin-error { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }

/* ---- Main station screen ---- */
.station { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; background: #F1F5F9; }
.station-header {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 28px; background: #fff;
  border-bottom: 1px solid #E5E7EB;
}
.station-header .brand-mark { width: 44px; height: 44px; font-size: 20px; border-radius: 10px; }
.station-header .ident { display: flex; flex-direction: column; line-height: 1.2; }
.station-header .name { font-size: 22px; font-weight: 700; color: #111827; }
.station-header .meta { font-size: 13.5px; color: #6B7280; display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.station-header .status-dot {
  display: inline-flex; align-items: center; gap: 6px;
  background: #ECFDF5; color: #065F46;
  padding: 2px 10px 2px 8px; border-radius: 999px;
  font-weight: 700; font-size: 12px;
}
.station-header .status-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #10B981; }
.station-header .clock { margin-left: auto; font-size: 36px; font-weight: 700; font-variant-numeric: tabular-nums; color: #111827; letter-spacing: -0.02em; }
.station-header .end-shift {
  background: #fff; border: 2px solid #FCA5A5; color: #B91C1C;
  padding: 8px 16px; border-radius: 10px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: inherit; text-decoration: none;
}
.station-header .end-shift:hover { background: #FEE2E2; text-decoration: none; }

.station-main {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px; padding: 18px 24px;
}
.now-serving, .up-next {
  background: #fff; border: 1px solid #E5E7EB; border-radius: 16px;
  padding: 28px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.section-tag {
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 12px; font-weight: 800; color: #6B7280;
}
.now-serving .ns-header { display: flex; align-items: center; justify-content: space-between; }
.ns-kind {
  background: #ECFDF5; color: #065F46;
  padding: 4px 11px; border-radius: 6px;
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.ns-name { font-size: 56px; font-weight: 800; color: #111827; line-height: 1; letter-spacing: -0.025em; }
.ns-name.empty { color: #6B7280; font-weight: 700; font-size: 32px; }
.ns-svc { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ns-svc-chip { background: #F1F5F9; color: #1F2937; border: 1px solid #E2E8F0; padding: 8px 16px; border-radius: 10px; font-size: 17px; font-weight: 600; }
.ns-svc-meta { color: #6B7280; font-size: 15px; font-variant-numeric: tabular-nums; }

.timer-card {
  background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
  border: 1px solid #6EE7B7; border-radius: 14px;
  padding: 18px 24px;
  display: flex; align-items: center; gap: 18px;
}
.timer-card .label { font-size: 14px; color: #047857; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.timer-card .time { font-size: 38px; font-weight: 800; color: #064E3B; font-variant-numeric: tabular-nums; margin-left: auto; }

.ns-actions { display: flex; gap: 14px; margin-top: auto; }
.btn-mark-complete, .btn-start-service-big {
  flex: 1;
  background: linear-gradient(180deg, #10B981 0%, #059669 100%);
  color: white; border: none; border-radius: 14px;
  padding: 24px;
  font-size: 26px; font-weight: 800;
  font-family: inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.28);
}
.btn-mark-complete:active, .btn-start-service-big:active { transform: translateY(2px); }
.btn-no-show-big {
  background: #fff; border: 2px solid #FCA5A5; color: #B91C1C;
  border-radius: 14px; padding: 24px 28px;
  font-size: 20px; font-weight: 700;
  font-family: inherit; cursor: pointer;
}
.btn-no-show-big:hover { background: #FEE2E2; }

.ready-card {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 1.5px solid #F59E0B; border-radius: 14px;
  padding: 20px 24px;
}
.ready-card .title { font-size: 18px; font-weight: 800; color: #78350F; text-transform: uppercase; letter-spacing: 0.05em; }
.ready-card .sub   { font-size: 14px; color: #92400E; margin-top: 4px; font-weight: 500; }

.walkup-card {
  background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
  border: 1.5px solid #93C5FD; border-radius: 14px;
  padding: 24px 26px;
  display: flex; flex-direction: column; gap: 18px;
}
.walkup-title { font-size: 22px; font-weight: 800; color: #1E3A8A; line-height: 1.2; }
.walkup-sub   { font-size: 14px; color: #2563EB; margin-top: 4px; font-weight: 500; }
.walkup-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.walkup-btn {
  background: #fff; border: 2px solid #BFDBFE; border-radius: 12px;
  padding: 22px 16px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-family: inherit; font-size: 14px;
}
.walkup-btn:hover  { border-color: #2563EB; background: #F0F9FF; }
.walkup-btn:active { transform: translateY(2px); }
.walkup-btn .svc-name { font-size: 20px; font-weight: 800; color: #111827; }
.walkup-btn .svc-dur  { font-size: 14px; color: #6B7280; font-weight: 600; }

/* Up next */
.up-next .un-header { display: flex; align-items: center; justify-content: space-between; }
.un-count { font-size: 14px; color: #6B7280; font-weight: 600; }
.next-up {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 2px solid #F59E0B; border-radius: 14px;
  padding: 22px 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.next-up .nu-row { display: flex; align-items: flex-start; gap: 16px; }
.next-up .nu-pos {
  background: #F59E0B; color: #fff;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 22px; font-weight: 800;
}
.next-up .nu-name { font-size: 26px; font-weight: 800; color: #78350F; line-height: 1.1; margin-bottom: 6px; }
.next-up .nu-meta { font-size: 13.5px; color: #92400E; font-weight: 600; }
.other-up { display: flex; flex-direction: column; gap: 4px; }
.other-item {
  display: grid; grid-template-columns: 36px 1fr auto;
  align-items: center; gap: 14px;
  padding: 14px 8px; border-top: 1px solid #F3F4F6;
}
.other-item .pos { font-size: 22px; font-weight: 800; color: #94A3B8; text-align: center; }
.other-item .name { font-size: 18px; font-weight: 700; color: #1F2937; line-height: 1.1; }
.other-item .meta { font-size: 12.5px; color: #6B7280; margin-top: 4px; }
.other-item .kind-tag {
  background: #F1F5F9; color: #475569;
  padding: 5px 11px; border-radius: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.other-item .kind-tag.appt { background: #EFF6FF; color: #1E40AF; }

/* ---- Staff avatar photos ---- */
/* When an uploaded photo is present the badge carries `.has-photo`: drop the
   colored gradient and let the image fill the circle. No photo → initials +
   gradient (the rules above) still apply. */
.av.has-photo,
.emp-av.has-photo,
.thumb-avatar.has-photo,
.rp-avatar.has-photo {
  background: none !important;
  padding: 0;
  overflow: hidden;
}
.av img,
.emp-av img,
.thumb-avatar img,
.rp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

/* Gradient-style classes for the staff form's live avatar preview. The base
   color comes from the --c custom property. Keep the white/black mix percentages
   in sync with ApplicationHelper::AVATAR_GRADIENT_STOPS (server-rendered avatars
   build the equivalent inline style there). */
.grad-soft  { background: linear-gradient(135deg, color-mix(in srgb, var(--c), white 60%), color-mix(in srgb, var(--c), white 35%)); color: color-mix(in srgb, var(--c), black 55%); }
.grad-vivid { background: linear-gradient(135deg, color-mix(in srgb, var(--c), white 32%), color-mix(in srgb, var(--c), white 6%));  color: color-mix(in srgb, var(--c), black 55%); }
.grad-solid { background: color-mix(in srgb, var(--c), white 14%); color: color-mix(in srgb, var(--c), black 55%); }

/* ---- Reservation / blocked-time detail modal ---- */
.rd-form { display: flex; flex-direction: column; gap: 12px; }
.rd-form .field { display: flex; flex-direction: column; gap: 5px; }
.rd-form label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.rd-form input, .rd-form select {
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; background: #fff; color: var(--text); width: 100%;
}
.rd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rd-services { display: flex; flex-direction: column; gap: 6px; }
.rd-service { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.rd-service input { width: auto; }

/* Barber's existing appointments on the chosen day (reschedule guidance). */
.rd-day { display: flex; flex-direction: column; gap: 4px; }
.rd-day-head { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 2px; }
.rd-day-empty { font-size: 13px; color: var(--text-muted); padding: 6px 0; }
.rd-day-row {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; align-items: baseline;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px;
}
.rd-day-row .rd-day-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.rd-day-row .rd-day-cust { color: var(--text-muted); font-size: 12px; }
.rd-day-row.clash { border-color: #FCA5A5; background: var(--danger-bg); }
.rd-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border); }
.rd-pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  background: #EFF6FF; color: #1E40AF;
}
.rd-pill.in_chair { background: #DCFCE7; color: #166534; }
.rd-pill.notified { background: #FEF9C3; color: #854D0E; }
.rd-pill.completed { background: #F1F5F9; color: #475569; }
.rd-pill.no_show, .rd-pill.cancelled { background: var(--danger-bg); color: var(--danger-fg); }

.btn-warn   { background: var(--warn-bg);   color: var(--warn-fg);   border-color: #FCD34D; }
.btn-warn:hover   { background: #FEF3C7; }
.btn-danger { background: var(--danger-bg); color: var(--danger-fg); border-color: #FECACA; }
.btn-danger:hover { background: #FEE2E2; }

