/* ── CSS Custom Properties ────────────────────────────────────────────────── */
:root {
  --bg:           #ffffff;
  --surface:      #f7f6f4;
  --surface2:     #eeece9;
  --border:       #e0ddd8;
  --text:         #111111;
  --text-muted:   #6b6660;
  --text-light:   #999490;
  --accent:       #111111;
  --accent-hover: #333333;
  --danger:       #c0392b;
  --success:      #1d6b3a;
  --warn:         #b45309;
  --radius:       4px;
  --radius-lg:    8px;
  --shadow:       0 1px 4px rgba(0,0,0,.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,.12);
  --font-main:    'Helvetica Neue', Helvetica, Arial, sans-serif;
  --logo-h:       36px;
}
[data-theme="dark"] {
  --bg:           #111111;
  --surface:      #1a1a1a;
  --surface2:     #242424;
  --border:       #2e2e2e;
  --text:         #f0ede8;
  --text-muted:   #8a8580;
  --text-light:   #5a5550;
  --accent:       #f0ede8;
  --accent-hover: #c8c4be;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: var(--font-main); }
input, select, textarea { font-family: var(--font-main); }

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 56px; display: flex; align-items: center;
}
.navbar-username { font-weight: 600; margin-right: 10px;}
.navbar-left  { flex: 1; display: flex; align-items: center; }
.navbar-center { flex: 0; white-space: nowrap; }
.navbar-right { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.site-logo { height: var(--logo-h); display: block; }
.navbar-home-link { font-size: 0.78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.navbar-back {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.82rem; color: var(--text-muted); letter-spacing: .04em;
}
.navbar-back:hover { color: var(--text); text-decoration: none; }
.navbar-admin {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.6rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); padding: 4px 6px;
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: background .15s, color .15s;
}
.navbar-admin:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.theme-toggle, .navbar-logout {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: var(--radius);
  background: transparent; border: 1px solid var(--border); color: var(--text-muted);
  transition: background .15s, color .15s;
}
.theme-toggle:hover, .navbar-logout:hover { background: var(--surface); color: var(--text); }

/* ── Public booking page header (minimal) ───────────────────────────────── */
.book-header {
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: 100%;
}
.book-header-inner {
  max-width: 640px; margin: 0 auto; width: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.book-header a { display: flex; align-items: center; }

/* ── Page layouts ────────────────────────────────────────────────────────── */
.page-wide { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
.page-narrow { max-width: 640px; margin: 0 auto; padding: 40px 24px; }
.page-heading h1 { font-size: 1.4rem; font-weight: 600; letter-spacing: -.01em; }
.page-heading p { color: var(--text-muted); font-size: 0.88rem; margin-top: 4px; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius); border: 1px solid transparent;
  font-size: 0.88rem; font-weight: 500; letter-spacing: .02em;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary {
  background: var(--accent); color: var(--bg); border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary {
  background: transparent; color: var(--text); border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 0.95rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Form elements ───────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 0.8rem; font-weight: 500; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-muted);
}
.form-control {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 12px; color: var(--text); font-size: 0.9rem; width: 100%;
  transition: border-color .15s;
}
.form-control:focus { outline: none; border-color: var(--accent); }
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 540px) { .form-grid { grid-template-columns: 1fr; } }
.form-hint { font-size: 0.78rem; color: var(--text-light); }
.form-error { font-size: 0.8rem; color: var(--danger); display: none; }
.form-error.visible { display: block; }

/* ── Loader / spinner ────────────────────────────────────────────────────── */
.loader { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.9rem; padding: 40px 0; }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border); border-top-color: var(--text-muted);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; color: var(--text-muted); padding: 60px 20px; }
.empty-state p { font-size: 0.9rem; margin-top: 8px; }

/* ── Week navigation ─────────────────────────────────────────────────────── */
.week-nav {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 20px;
}
.week-nav-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); font-size: 0.82rem; letter-spacing: .02em;
  transition: background .15s, color .15s;
}
.week-nav-btn:hover { background: var(--surface2); color: var(--text); text-decoration: none; }
.week-nav-today { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.week-nav-today:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--bg); }
.week-nav-label { flex: 1; }

/* ── Calendar grid (agent view) ──────────────────────────────────────────── */
.cal-container { overflow-x: auto; }
.cal-grid {
  display: grid;
  grid-template-columns: 48px repeat(7, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; min-width: 680px;
}
.cal-corner { background: var(--surface); }
.cal-day-hdr {
  background: var(--surface); padding: 10px 8px; text-align: center;
  display: flex; flex-direction: column; gap: 2px;
}
.cal-day-hdr.today { background: var(--surface2); }
.cal-hdr-day { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.cal-hdr-date { font-size: 0.88rem; font-weight: 500; }
.cal-time-lbl {
  background: var(--surface); padding: 6px 4px; text-align: center;
  font-size: 0.72rem; color: var(--text-muted); display: flex; align-items: center; justify-content: center;
}
.cal-slot {
  background: var(--bg); padding: 3px; min-height: 36px;
  display: flex; flex-direction: column; gap: 2px;
}
.cal-slot:hover { background: var(--surface); }
.cal-pill {
  border-radius: var(--radius); padding: 3px 6px; cursor: pointer;
  font-size: 0.74rem; font-weight: 500; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: opacity .15s;
}
.cal-pill:hover { opacity: .85; }
.cal-pill[data-outcome="no_answer"]       { background:#d1d5db!important; color:#7f1d1d!important; border-color:#d1d5db !important;   }
.cal-pill[data-outcome="no_order"]       { background:#7f1d1d!important; color:#fca5a5!important;  border-color:#7f1d1d !important; }
.cal-pill[data-outcome="order_confirmed"] { background:#14532d!important; color:#86efac!important;  border-color:#14532d !important; }
.cal-pill[data-outcome="draft_order"]     { background:#fde68a!important; color:#333333!important; border-color:#fde68a !important; }

/* ── Drawer (agent booking detail) ──────────────────────────────────────── */
.overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 200;
}
.overlay.open { display: block; }
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 380px; max-width: 95vw;
  background: var(--bg); border-left: 1px solid var(--border);
  z-index: 201; transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column; overflow: hidden;
}
.drawer.open { transform: none; }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-header h2 { font-size: 0.95rem; font-weight: 600; line-height: 1.3; }
.drawer-close {
  background: transparent; border: none; font-size: 1.2rem; color: var(--text-muted);
  padding: 4px 8px; border-radius: var(--radius);
}
.drawer-close:hover { background: var(--surface); color: var(--text); }
.drawer-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.drawer-field { margin-bottom: 14px; }
.drawer-field label {
  display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted); font-weight: 500; margin-bottom: 3px;
}
.drawer-field .value { font-size: 0.9rem; }
.drawer-field a { color: var(--text); text-decoration: underline; }
.drawer-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.action-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius); border: 1px solid var(--border);
  font-size: 0.84rem; font-weight: 500; color: var(--text); background: var(--surface);
  transition: background .15s;
}
.action-btn:hover { background: var(--surface2); text-decoration: none; }
.action-btn.btn-primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.action-btn.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.action-btn.btn-secondary { opacity: .75; }
.btn-whatsapp { border-color: #25d366; color: #25d366; }
.btn-whatsapp:hover { background: #25d3661a !important; }
.btn-facetime { border-color: #007aff; color: #007aff; }
.btn-facetime:hover { background: #007aff1a !important; }
.btn-googlemeet { border-color: #1a73e8; color: #1a73e8; }
.btn-googlemeet:hover { background: #1a73e81a !important; }
.btn-order { border-color: var(--border); }

/* ── Outcome buttons ─────────────────────────────────────────────────────── */
.outcome-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.outcome-btn {
  padding: 5px 11px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); font-size: 0.78rem;
  transition: all .15s;
}
.outcome-btn:hover { background: var(--surface2); color: var(--text); }
.active-no-answer  { background: #fef2f2 !important; color: var(--danger) !important; border-color: var(--danger) !important; }
.active-no-order   { background: #fff7ed !important; color: var(--warn) !important; border-color: var(--warn) !important; }
.active-draft      { background: #fffbeb !important; color: #92400e !important; border-color: #d97706 !important; }
.active-confirmed  { background: #f0fdf4 !important; color: var(--success) !important; border-color: var(--success) !important; }
[data-theme="dark"] .active-no-answer  { background: #3f0d0d !important; }
[data-theme="dark"] .active-no-order   { background: #2d1c0a !important; }
[data-theme="dark"] .active-draft      { background: #2d2207 !important; }
[data-theme="dark"] .active-confirmed  { background: #0a2314 !important; }

/* ── Method badges ───────────────────────────────────────────────────────── */
.method-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.8rem; padding: 3px 8px; border-radius: var(--radius);
  font-weight: 500;
}
.method-wa { background: #25d3661a; color: #1a9e4d; border: 1px solid #25d36640; }
.method-ft { background: #007aff1a; color: #0055cc; border: 1px solid #007aff40; }
.method-gm { background: #1a73e81a; color: #1a73e8; border: 1px solid #1a73e840; }
[data-theme="dark"] .method-wa { background: #25d36630; color: #25d366; }
[data-theme="dark"] .method-ft { background: #007aff30; color: #007aff; }
[data-theme="dark"] .method-gm { background: #1a73e830; color: #4da3ff; }

/* ── Tabs (admin) ────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 28px; overflow-x: auto; }
.tab-btn {
  padding: 10px 20px; background: transparent; border: none; border-bottom: 2px solid transparent;
  font-size: 0.84rem; font-weight: 500; color: var(--text-muted); cursor: pointer;
  transition: color .15s, border-color .15s; white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Status tags ─────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center;
  font-size: 0.72rem; font-weight: 500; padding: 2px 8px; border-radius: 20px;
  letter-spacing: .03em;
}
.tag-confirmed  { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
.tag-cancelled  { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.tag-held       { background: #fffbeb; color: var(--warn); border: 1px solid #fde68a; }
[data-theme="dark"] .tag-confirmed { background: #0a2314; border-color: #14532d; }
[data-theme="dark"] .tag-cancelled { background: #3f0d0d; border-color: #7f1d1d; }
[data-theme="dark"] .tag-held      { background: #2d2207; border-color: #78350f; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
thead th {
  text-align: left; padding: 8px 12px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
}
tbody td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface); }

/* ── Booking page — multi-step wizard ───────────────────────────────────── */
.book-page { min-height: 100vh; display: flex; flex-direction: column; }
.book-content { flex: 1; }
.book-steps { max-width: 640px; margin: 0 auto; padding: 32px 24px; }
.step { display: none; }
.step.active { display: block; }
.step-title {
  font-size: 1.1rem; font-weight: 600; letter-spacing: -.01em;
  margin-bottom: 6px; color: var(--text);
}
.step-subtitle { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 24px; }
.step-actions { display: flex; gap: 12px; margin-top: 28px; }
.step-actions .btn { flex: 1; }

/* Progress indicator */
.book-progress {
  display: flex; align-items: center; gap: 6px;
  padding: 16px 24px; max-width: 640px; margin: 0 auto;
  overflow-x: auto;
}
.progress-step {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.72rem; color: var(--text-light); font-weight: 500;
  flex-shrink: 0; white-space: nowrap;
}
.progress-step.active { color: var(--text); }
.progress-step.done { color: var(--text-muted); }
.progress-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border); flex-shrink: 0;
}
.progress-step.active .progress-dot { background: var(--accent); }
.progress-step.done .progress-dot { background: var(--text-muted); }
.progress-line { flex: 1; height: 1px; background: var(--border); min-width: 12px; }

/* Hold timer */
.hold-timer {
  display: none; align-items: center; gap: 8px;
  padding: 10px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.82rem; color: var(--text-muted);
  margin-bottom: 20px;
}
.hold-timer.visible { display: flex; }
.hold-timer .timer-val { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.hold-timer.expiring { border-color: var(--danger); color: var(--danger); }
.hold-timer.expiring .timer-val { color: var(--danger); }

/* Weekly calendar (booking page) */
.week-cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.week-cal-nav-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
  transition: background .15s, color .15s;
}
.week-cal-nav-btn:hover:not(:disabled) { background: var(--surface2); color: var(--text); }
.week-cal-nav-btn:disabled { opacity: .35; cursor: not-allowed; }
.week-cal-label { font-size: 0.88rem; font-weight: 500; color: var(--text); }
.week-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
}
.day-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 4px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; transition: all .15s; position: relative;
  gap: 3px; min-height: 72px; justify-content: center;
}
.day-btn:hover:not(:disabled):not(.past):not(.unavailable) {
  border-color: var(--accent); background: var(--surface2);
}
.day-btn.selected { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.day-btn.today-marker .day-num { position: relative; }
.day-btn.today-marker .day-num::after {
  content: ''; display: block; width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; margin: 2px auto 0; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
}
.day-btn.past, .day-btn.unavailable { opacity: .38; cursor: not-allowed; }
.day-name { font-size: 0.62rem; text-transform: uppercase; letter-spacing: .08em; opacity: .65; }
.day-num  { font-size: 1.05rem; font-weight: 600; line-height: 1.2; }
.day-slots { font-size: 0.62rem; opacity: .65; }

/* Slot pills (booking page) */
.slots-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.slot-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 16px 8px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; transition: all .15s;
}
.slot-btn:hover { border-color: var(--accent); background: var(--surface2); }
.slot-btn.selected { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.slot-time { font-size: 1rem; font-weight: 600; }
.slot-end  { font-size: 0.78rem; opacity: .7; }
.slot-tz   { font-size: 0.65rem; opacity: .55; }

/* Method selection */
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 400px) { .method-grid { grid-template-columns: 1fr; } }
.method-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 10px; border-radius: var(--radius-lg);
  border: 2px solid var(--border); background: var(--surface);
  cursor: pointer; transition: all .15s; font-size: 0.84rem; font-weight: 500;
  text-align: center;
}
.method-btn:hover { border-color: var(--text-muted); background: var(--surface2); }
.method-btn.selected-wa { border-color: #25d366; background: #25d3661a; color: #1a9e4d; }
.method-btn.selected-ft { border-color: #007aff; background: #007aff1a; color: #0055cc; }
.method-btn.selected-gm { border-color: #1a73e8; background: #1a73e81a; color: #1a73e8; }
[data-theme="dark"] .method-btn.selected-wa { background: #25d36625; color: #25d366; }
[data-theme="dark"] .method-btn.selected-ft { background: #007aff25; color: #5aafff; }
[data-theme="dark"] .method-btn.selected-gm { background: #1a73e825; color: #5aaeff; }
.method-icon { font-size: 1.5rem; line-height: 1; }
.method-desc { font-size: 0.72rem; opacity: .65; margin-top: 2px; }

/* Confirmation summary box */
.confirm-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; margin-bottom: 20px;
}
.confirm-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.confirm-row:last-child { border-bottom: none; padding-bottom: 0; }
.confirm-row:first-child { padding-top: 0; }
.confirm-row .label { color: var(--text-muted); flex-shrink: 0; }
.confirm-row .value { text-align: right; font-weight: 500; }

/* Success state */
.success-box { text-align: center; padding: 40px 20px; }
.success-icon { font-size: 3rem; margin-bottom: 16px; }
.success-box h2 { font-size: 1.3rem; font-weight: 600; margin-bottom: 10px; }
.success-box p { color: var(--text-muted); font-size: 0.9rem; max-width: 380px; margin: 0 auto 20px; }
.success-detail {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px 20px; max-width: 360px; margin: 0 auto 24px; text-align: left;
}
.success-detail-row { display: flex; gap: 10px; padding: 6px 0; font-size: 0.86rem; }
.success-detail-row .label { color: var(--text-muted); width: 80px; flex-shrink: 0; }

/* Address autocomplete dropdown */
.address-wrap { position: relative; }
.autocomplete-list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
  background: var(--bg); border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  max-height: 200px; overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.autocomplete-item {
  padding: 10px 12px; cursor: pointer; font-size: 0.86rem; color: var(--text);
  transition: background .1s;
}
.autocomplete-item:hover { background: var(--surface); }

/* Language switcher */
.lang-switcher { display: flex; gap: 4px; }
.lang-btn {
  padding: 4px 10px; border-radius: var(--radius); border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); font-size: 0.78rem;
  font-weight: 500; letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
  transition: all .15s;
}
.lang-btn.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.lang-btn:hover:not(.active) { background: var(--surface2); color: var(--text); }

/* Note / info banner */
.info-banner {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; font-size: 0.84rem; color: var(--text-muted);
  margin-bottom: 20px; line-height: 1.5;
}

/* ── Admin timeslot grid ──────────────────────────────────────────────────── */
.ts-grid {
  display: grid; grid-template-columns: 64px repeat(7, 1fr); gap: 2px;
  font-size: 0.8rem; min-width: 640px;
}
.ts-hdr {
  padding: 6px 4px; text-align: center;
  font-size: 0.7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted);
}
.ts-hour-lbl {
  padding: 6px 8px; text-align: right; color: var(--text-muted);
  font-size: 0.78rem; display: flex; align-items: flex-start; justify-content: flex-end;
}
.ts-cell {
  background: var(--surface); border-radius: var(--radius); min-height: 44px;
  padding: 3px; display: flex; flex-direction: column; gap: 2px;
}
.ts-slot {
  background: var(--surface2); border-radius: 3px; padding: 2px 5px;
  display: flex; align-items: center; justify-content: space-between; gap: 2px;
  font-size: 0.72rem;
}
.ts-slot.booked { background: #f0fdf4; color: var(--success); }
.ts-slot.held   { background: #fffbeb; color: var(--warn); }
[data-theme="dark"] .ts-slot.booked { background: #0a2314; }
[data-theme="dark"] .ts-slot.held   { background: #2d2207; }
.ts-remove-btn {
  background: transparent; border: none; color: var(--text-light);
  font-size: 0.9rem; line-height: 1; cursor: pointer; padding: 0 2px;
  border-radius: 2px; flex-shrink: 0;
}
.ts-remove-btn:hover { color: var(--danger); }
.ts-add-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 3px; border-radius: 3px;
  background: transparent; border: 1px dashed var(--border); color: var(--text-light);
  font-size: 0.9rem; cursor: pointer; transition: all .15s; margin-top: 2px;
}
.ts-add-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }

/* ── Settings / Translation editors ─────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .settings-grid { grid-template-columns: 1fr; } }
.settings-section { margin-bottom: 32px; }
.settings-section-title {
  font-size: 0.72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 16px;
}
.translation-pair {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px;
  align-items: start;
}
.translation-key { font-size: 0.72rem; color: var(--text-light); grid-column: 1 / -1; margin-bottom: 2px; font-family: monospace; }

/* ── Book page designer overrides ───────────────────────────────────────── */
.book-page {
  --font-serif-alt: 'Alegreya SC', Georgia, serif;
  --font-serif: 'EB Garamond', Georgia, serif;
  --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: #fff;
  color: #111;
  font-family: var(--font-body);
}

/* Header — centred logo, no bottom rule */
.book-page .book-header {
  height: auto;
  padding: 28px 32px 10px;
  border-bottom: none;
  position: relative;
}
.book-page .book-header-inner {
  max-width: 900px;
  justify-content: center;
}
.book-page .book-header-inner .lang-switcher {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
}

/* Hero title */
.book-page #book-hero {
  text-align: center;
  padding: 32px 24px 28px;
  border-bottom: 1px solid #e8e8e8;
}
.book-page #book-hero h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: .01em;
  margin-bottom: 10px;
  color: #111;
}
.book-page #book-hero p { font-size: 0.92rem; color: #888; }

/* Progress tabs — text underline on active, no border-bottom on bar */
.book-page .book-progress {
  justify-content: center;
  gap: 0;
  padding: 10px 0 0;
  max-width: 100%;
}
.book-page .progress-step {
  font-size: 0.78rem;
  letter-spacing: .02em;
  color: #bbb;
  font-weight: 400;
  padding: 14px 20px;
  border-bottom: none;
  gap: 0;
}
.book-page .progress-step span { text-decoration: none; }
.book-page .progress-step.active { color: #111; }
.book-page .progress-step.active span { text-decoration: underline; text-underline-offset: 3px; }
.book-page .progress-step.done  { color: #888; }
.book-page .progress-dot,
.book-page .progress-line { display: none; }

/* Content */
.book-page .book-steps { max-width: 640px; padding: 40px 0; margin: 0 auto; }

/* Step counter ("Étape 1 sur 4") */
.book-page .step-counter {
  font-size: 0.75rem;
  color: #aaa;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: .04em;
}

/* Step titles — centred */
.book-page .step-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: .01em;
  color: #111;
  margin-bottom: 8px;
  text-align: center;
}
.book-page .step-subtitle { font-size: 0.8rem; color: #888; margin-bottom: 28px; text-align: center; }

/* Week nav */
.book-page .week-cal-nav { margin-bottom: 20px; }
.book-page .week-cal-nav-btn {
  width: 40px; height: 40px;
  border-radius: 2px;
  border: 1px solid #ccc;
  background: #fff;
  color: #333;
}
.book-page .week-cal-nav-btn:hover:not(:disabled) { background: #f5f5f5; }
.book-page .week-cal-label { font-size: 0.95rem; font-weight: 600; color: #111; letter-spacing: .01em; }

/* Day buttons */
.book-page .day-btn {
  border-radius: 2px;
  border: 1px solid #ddd;
  background: #fff;
  color: #111;
  gap: 5px;
  min-height: 80px;
  padding: 12px 4px;
  -webkit-appearance: none;
  appearance: none;
}
.book-page .day-btn:hover:not(:disabled):not(.unavailable):not(.selected) { border-color: #111; background: #fff; }
.book-page .day-btn.selected:hover { background: #333; border-color: #333; color: #fff; }
.book-page .day-btn.selected { background: #111; border-color: #111; color: #fff; }
.book-page .day-btn.unavailable { opacity: .3; }
.book-page .day-name { font-size: 0.65rem; letter-spacing: .1em; text-transform: uppercase; opacity: 1; color: inherit; }
.book-page .day-num  { font-size: 1.1rem; font-weight: 400; }
.book-page .day-slots { font-size: 0.6rem; opacity: .65; text-align: center; line-height: 1.3; }

/* Slot buttons */
.book-page .slots-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.book-page .slot-btn {
  border-radius: 2px;
  border: 1px solid #ddd;
  background: #fff;
  color: #111;
  padding: 18px 8px;
  -webkit-appearance: none;
  appearance: none;
}
.book-page .slot-btn:hover:not(.selected) { border-color: #111; background: #fff; }
.book-page .slot-btn.selected:hover { background: #333; border-color: #333; color: #fff; }
.book-page .slot-btn.selected { background: #111; border-color: #111; color: #fff; }
.book-page .slot-time { font-size: 1rem; font-weight: 500; letter-spacing: .02em; }
.book-page .slot-end  { font-size: 0.75rem; opacity: .6; }
.book-page .slot-tz   { font-size: 0.62rem; opacity: .45; }

/* Section subtitle within step 0 */
.book-page #slot-section .step-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 300;
}

/* Method cards */
.book-page .method-grid { gap: 12px; }
.book-page .method-btn {
  border-radius: 2px;
  border: 1px solid #ddd;
  background: #fff;
  padding: 28px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111;
  gap: 10px;
  -webkit-appearance: none;
  appearance: none;
}
.book-page .method-btn:hover { border-color: #111; background: #fff; }
.book-page .method-btn.selected-wa:hover,
.book-page .method-btn.selected-ft:hover,
.book-page .method-btn.selected-gm:hover { background: #333; border-color: #333; color: #fff; }
.book-page .method-btn.selected-wa,
.book-page .method-btn.selected-ft,
.book-page .method-btn.selected-gm {
  background: #111; border-color: #111; color: #fff;
}
.book-page .method-icon { font-size: 1.6rem; }
.book-page .method-desc { font-size: 0.75rem; opacity: .65; color: inherit; }

/* Selected slot label (step 1) */
.book-page #selected-slot-label {
  font-size: 0.95rem; font-weight: 500; color: #111; margin-bottom: 28px;
}

/* Form inputs */
.book-page .form-control {
  border-radius: 2px;
  border: 1px solid #ccc;
  background: #fff;
  color: #111;
  font-size: 0.9rem;
  padding: 13px 14px;
}
.book-page .form-control:focus { border-color: #111; }
.book-page .form-control::placeholder { color: #aaa; }
.book-page .form-section-title {
  font-size: 0.88rem; font-weight: 500; letter-spacing: 0;
  color: #111; margin-bottom: 0; margin-top: 28px;
}

/* Info banner */
.book-page .info-banner {
  background: #f9f9f9;
  border: 1px solid #e8e8e8;
  border-radius: 2px;
  font-size: 0.84rem;
  color: #666;
}

/* Buttons */
.book-page .btn {
  border-radius: 2px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: .04em;
  padding: 15px 24px;
}
.book-page .btn-primary  { background: #111; border-color: #111; color: #fff; }
.book-page .btn-primary:hover  { background: #333; border-color: #333; }
.book-page .btn-secondary { background: #fff; border-color: #ccc; color: #111; }
.book-page .btn-secondary:hover { background: #f5f5f5; }
.book-page .step-actions { margin-top: 36px; gap: 16px; }

/* Confirmation box */
.book-page .confirm-box {
  border-radius: 2px;
  border: 1px solid #ddd;
  background: #fff;
}
.book-page .confirm-row { font-size: 0.9rem; padding: 12px 0; }
.book-page .confirm-row .label { color: #888; }
.book-page .confirm-row .value { font-weight: 400; color: #111; }

/* Lang switcher */
.book-page .lang-btn {
  border-radius: 2px;
  font-size: 0.8rem;
  letter-spacing: .06em;
  border-color: #ddd;
}
.book-page .lang-btn.active { background: #111; color: #fff; border-color: #111; }

/* Next week hint badge */
#next-week-hint {
  font-size: 0.7rem !important;
  background: #111 !important;
  border-radius: 2px !important;
}

/* ── Book page — mobile ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
  /* Header: stack logo above lang switcher so they don't collide */
  .book-page .book-header { padding: 16px 20px; }
  .book-page .book-header-inner {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .book-page .book-header-inner .lang-switcher {
    position: static;
    transform: none;
  }

  /* Hero */
  .book-page #book-hero { padding: 20px 20px 16px; }
  .book-page #book-hero h1 { font-size: 1.4rem; }

  /* Progress bar — horizontal scroll carousel, active step anchored left */
  .book-page .book-progress {
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 20px;
    gap: 0;
  }
  .book-page .book-progress::-webkit-scrollbar { display: none; }
  .book-page .progress-step {
    flex-shrink: 0;
    padding: 12px 16px;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  /* Content padding */
  .book-page .book-steps { padding: 24px 20px; }

  /* Step title */
  .book-page .step-title { font-size: 1.5rem; }

  /* Day grid tighter */
  .book-page .day-btn { min-height: 68px; padding: 10px 3px; }

  /* Buttons full width on mobile */
  .book-page .step-actions { flex-direction: column-reverse; gap: 10px; }
  .book-page .step-actions .btn { width: 100%; text-align: center; }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .page-wide, .page-narrow { padding: 20px 16px; }
  .book-steps { padding: 20px 16px; }
  .book-progress { padding: 12px 16px; }
  .drawer { width: 100%; border-left: none; border-top: 1px solid var(--border); top: auto; height: 85vh; transform: translateY(100%); }
  .drawer.open { transform: none; }
  .week-cal-grid { gap: 4px; }
  .day-btn { padding: 8px 3px; min-height: 64px; }
  .day-num  { font-size: 0.95rem; }
  .day-name { font-size: 0.58rem; }
  .form-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .translation-pair { grid-template-columns: 1fr; }
  .navbar-inner { padding: 0 16px; }
  .method-grid { gap: 8px; }
  .method-btn { padding: 16px 8px; }
}
