/* ---------------------------------------------------------------
   Smilett v4 — warm editorial design system with switchable themes.
   The active theme is set as  <html data-theme="...">  by common.js
   from settings.theme (admin-editable, site-wide). Every component
   below uses only the tokens, so themes swap cleanly.
------------------------------------------------------------------ */

:root, html[data-theme="ivory"] {
  --bg: #FAF6EE;
  --surface: #FFFFFF;
  --surface-2: #F1EADB;
  --ink: #23211C;
  --muted: #6E6A5E;
  --line: rgba(35,33,28,0.13);
  --accent: #A96A12;
  --accent-strong: #7E4F0D;
  --accent-soft: #F3E3C4;
  --on-accent: #FBF7EF;
  --panel: #23211C;
  --panel-ink: #F5F1E8;
  --panel-muted: #B7B1A2;
  --ok-bg: #E4EEDC; --ok-ink: #2F5B33;
  --warn-bg: #F6E9C8; --warn-ink: #7A5B10;
  --off-bg: #ECEAE3; --off-ink: #6E6A5E;
}
html[data-theme="midnight"] {
  --bg: #141519;
  --surface: #1D1F25;
  --surface-2: #26282F;
  --ink: #EFEBE1;
  --muted: #A29D90;
  --line: rgba(239,235,225,0.14);
  --accent: #E0A458;
  --accent-strong: #EDBC7E;
  --accent-soft: #3A3122;
  --on-accent: #1A1409;
  --panel: #0D0E11;
  --panel-ink: #EFEBE1;
  --panel-muted: #8E897D;
  --ok-bg: #24331F; --ok-ink: #A9D3A0;
  --warn-bg: #3B3116; --warn-ink: #E7C877;
  --off-bg: #26282F; --off-ink: #A29D90;
}
html[data-theme="slate"] {
  --bg: #FBFBFA;
  --surface: #FFFFFF;
  --surface-2: #EDF1F4;
  --ink: #10222F;
  --muted: #5E6B75;
  --line: rgba(16,34,47,0.13);
  --accent: #1D6FB8;
  --accent-strong: #14568F;
  --accent-soft: #DBE9F6;
  --on-accent: #F7FAFD;
  --panel: #10222F;
  --panel-ink: #F2F6FA;
  --panel-muted: #93A4B1;
  --ok-bg: #DFEEE3; --ok-ink: #21593A;
  --warn-bg: #F4E9CE; --warn-ink: #77590F;
  --off-bg: #E8EBED; --off-ink: #5E6B75;
}
html[data-theme="olive"] {
  --bg: #F7F7F0;
  --surface: #FFFFFF;
  --surface-2: #EAECDF;
  --ink: #23291F;
  --muted: #666D5C;
  --line: rgba(35,41,31,0.13);
  --accent: #4C6B32;
  --accent-strong: #38511F;
  --accent-soft: #E1EAD1;
  --on-accent: #F6F8F0;
  --panel: #23291F;
  --panel-ink: #F1F3E9;
  --panel-muted: #A9AF9C;
  --ok-bg: #E1EAD1; --ok-ink: #38511F;
  --warn-bg: #F4E9C8; --warn-ink: #77590F;
  --off-bg: #E9EAE1; --off-ink: #666D5C;
}

:root {
  --radius-sm: 10px;
  --radius: 18px;
  --max: 1160px;
  --ease: cubic-bezier(.4,0,.2,1);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Archivo', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

h1, h2, h3 { font-family: var(--serif); font-weight: 550; margin: 0; letter-spacing: -0.01em; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}

/* ---------------- Header ---------------- */
.site-header { background: var(--bg); position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); }
.header-inner { max-width: var(--max); margin: 0 auto; padding: 1.05rem 1.4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: baseline; gap: 0.45rem; font-family: var(--serif); font-size: 1.35rem; color: var(--ink); }
.brand .brand-dot { color: var(--accent); font-size: 1.6rem; line-height: 0; }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 1.9rem; }
.site-nav a { font-size: 0.92rem; color: var(--muted); transition: color 0.15s var(--ease); padding-bottom: 2px; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.site-nav .btn { margin-left: 0.25rem; border-bottom: none; }
@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); flex-direction: column; align-items: stretch; gap: 0; max-height: 0; overflow: hidden; transition: max-height 0.25s var(--ease); border-bottom: 1px solid var(--line); }
  .site-nav.open { max-height: 440px; }
  .site-nav a { padding: 0.95rem 1.4rem; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin: 0.8rem 1.4rem; }
}

/* ---------------- Buttons ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.78rem 1.55rem; font-weight: 600; font-family: var(--sans); font-size: 0.93rem; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; transition: filter 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-primary:disabled { background: var(--off-bg); color: var(--off-ink); cursor: not-allowed; }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { filter: brightness(1.15); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.82rem; }

/* ---------------- Editorial hero ---------------- */
.hero { max-width: var(--max); margin: 0 auto; padding: 3.5rem 1.4rem 4.5rem; display: grid; grid-template-columns: 6fr 5fr; gap: 3rem; align-items: center; }
.hero-copy .eyebrow { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 700; display: block; margin-bottom: 1.1rem; }
.hero-copy h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.06; }
.hero-copy p.lede { color: var(--muted); margin-top: 1.2rem; font-size: 1.08rem; max-width: 42ch; }
.hero-ctas { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-facts { display: flex; gap: 2.2rem; margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.hero-facts div strong { font-family: var(--serif); font-size: 1.5rem; display: block; }
.hero-facts div span { font-size: 0.82rem; color: var(--muted); }
.hero-art { position: relative; }
.hero-art .photo-main { aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.hero-art .photo-main img { width: 100%; height: 100%; object-fit: cover; }
.hero-art .photo-chip { position: absolute; left: -2.2rem; bottom: -1.6rem; width: 44%; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; border: 6px solid var(--bg); background: var(--surface-2); }
.hero-art .photo-chip img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .hero-art { order: -1; }
  .hero-art .photo-main { aspect-ratio: 16/10; }
  .hero-art .photo-chip { display: none; }
}

/* ---------------- Sections ---------------- */
.section { max-width: var(--max); margin: 0 auto; padding: 4.5rem 1.4rem; }
.section.tight { padding-top: 2rem; }
.section-head { margin-bottom: 2.6rem; max-width: 62ch; }
.section-head .kicker { color: var(--accent); font-size: 0.78rem; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 700; display: block; margin-bottom: 0.7rem; }
.section-head h2 { font-size: clamp(1.7rem, 3.8vw, 2.5rem); line-height: 1.12; }
.section-head p { color: var(--muted); margin-top: 0.85rem; }

/* Dark accent band (used for the booking CTA strip on home) */
.band { background: var(--panel); color: var(--panel-ink); }
.band .band-inner { max-width: var(--max); margin: 0 auto; padding: 3.5rem 1.4rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.band h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.band p { color: var(--panel-muted); margin: 0.5rem 0 0; }

/* ---------------- Service menu (fine-menu list, not cards) ---------------- */
.menu-list { border-top: 1px solid var(--line); }
.menu-row { display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; padding: 1.4rem 0.2rem; border-bottom: 1px solid var(--line); align-items: baseline; }
.menu-row h3 { font-size: 1.25rem; }
.menu-row .menu-desc { color: var(--muted); font-size: 0.95rem; margin: 0.3rem 0 0; max-width: 58ch; }
.menu-row .menu-side { text-align: right; }
.menu-row .menu-price { font-family: var(--serif); font-size: 1.15rem; }
.menu-row .menu-meta { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }
.menu-row .menu-actions { margin-top: 0.7rem; }
@media (max-width: 620px) { .menu-row { grid-template-columns: 1fr; } .menu-row .menu-side { text-align: left; } }

/* ---------------- Team (editorial rows) ---------------- */
.team-row { display: grid; grid-template-columns: 320px 1fr; gap: 2.4rem; align-items: center; padding: 2.4rem 0; border-bottom: 1px solid var(--line); }
.team-row:nth-child(even) { grid-template-columns: 1fr 320px; }
.team-row:nth-child(even) .team-photo { order: 2; }
.team-photo { aspect-ratio: 4/4.6; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-photo.illustration { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.team-photo.illustration img { width: 55%; height: auto; object-fit: contain; }
.team-body h3 { font-size: 1.55rem; }
.team-body .team-tag { color: var(--accent); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin: 0.35rem 0 0.8rem; }
.team-body p { color: var(--muted); margin: 0 0 1rem; max-width: 56ch; }
.team-sched { font-size: 0.88rem; color: var(--muted); line-height: 1.9; margin-bottom: 1.2rem; }
.team-sched strong { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) {
  .team-row, .team-row:nth-child(even) { grid-template-columns: 1fr; gap: 1.2rem; }
  .team-row:nth-child(even) .team-photo { order: 0; }
  .team-photo { aspect-ratio: 16/10; }
}

/* Compact team preview grid on home */
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
@media (max-width: 880px) { .mini-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .mini-grid { grid-template-columns: 1fr; } }
.mini-card .mini-photo { aspect-ratio: 4/3.4; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.mini-card .mini-photo img { width: 100%; height: 100%; object-fit: cover; }
.mini-card h3 { font-size: 1.08rem; margin-top: 0.9rem; }
.mini-card .mini-tag { color: var(--accent); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 0.2rem; }
.mini-card p { color: var(--muted); font-size: 0.92rem; margin: 0.4rem 0 0; }

/* ---------------- Locations ---------------- */
.location-block { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6rem; margin-bottom: 3.6rem; align-items: stretch; }
@media (max-width: 860px) { .location-block { grid-template-columns: 1fr; } }
.location-info .area-tag { display: inline-block; background: var(--accent-soft); color: var(--accent-strong); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.32rem 0.9rem; border-radius: 999px; margin-bottom: 1rem; }
.location-info h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.location-info address { font-style: normal; color: var(--muted); margin-bottom: 0.5rem; }
.location-info .hours { color: var(--muted); font-size: 0.95rem; margin-bottom: 1rem; }
.location-info .hours strong { color: var(--ink); }
.map-embed { width: 100%; height: 100%; min-height: 280px; border: 0; border-radius: var(--radius); }

/* ---------------- Booking wizard ---------------- */
.wizard { max-width: 860px; margin: 0 auto; }

.steps { display: flex; align-items: center; gap: 0.6rem; justify-content: center; margin-bottom: 2.4rem; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 0.45rem; font-size: 0.82rem; color: var(--muted); }
.step .step-dot { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.78rem; background: var(--surface); color: var(--muted); }
.step.active { color: var(--ink); font-weight: 600; }
.step.active .step-dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.step.done .step-dot { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-strong); }
.step-sep { width: 26px; height: 1px; background: var(--line); }

.entry-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 640px) { .entry-choice { grid-template-columns: 1fr; } }
.entry-card { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.9rem; cursor: pointer; text-align: left; font-family: inherit; transition: border-color 0.15s var(--ease), transform 0.15s var(--ease); }
.entry-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.entry-card h3 { font-size: 1.25rem; margin-bottom: 0.45rem; }
.entry-card p { color: var(--muted); margin: 0; font-size: 0.93rem; }

.option-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; margin-top: 1.1rem; }
@media (max-width: 560px) { .option-grid { grid-template-columns: 1fr; } }
.option-card { border: 1.5px solid var(--line); border-radius: 14px; padding: 1rem 1.15rem; cursor: pointer; background: var(--surface); text-align: left; font-family: inherit; transition: border-color 0.15s var(--ease); }
.option-card:hover { border-color: var(--accent); }
.option-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.option-card h4 { font-size: 1rem; margin: 0 0 0.25rem; font-family: var(--serif); }
.option-card p { margin: 0; font-size: 0.85rem; color: var(--muted); }

/* Month-style day picker with availability density */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 1.2rem 0 0.8rem; }
.cal-head h3 { font-size: 1.3rem; }
.cal-nav { display: flex; gap: 0.4rem; }
.cal-nav button { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1rem; cursor: pointer; }
.cal-nav button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-strong); }
.cal-nav button:disabled { opacity: 0.35; cursor: not-allowed; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0.3rem 0 0.5rem; }
.cal-day { border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 0.55rem 0.2rem 0.5rem; text-align: center; cursor: pointer; font-family: inherit; color: var(--ink); transition: border-color 0.15s var(--ease); min-height: 62px; }
.cal-day .cal-num { font-size: 1rem; font-weight: 600; display: block; }
.cal-day .cal-dots { display: flex; gap: 3px; justify-content: center; margin-top: 6px; height: 5px; }
.cal-day .cal-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.cal-day:hover:not(:disabled) { border-color: var(--accent); }
.cal-day.selected { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cal-day.selected .cal-dots i { background: var(--on-accent); }
.cal-day:disabled { background: transparent; border-color: transparent; color: var(--off-ink); opacity: 0.55; cursor: default; }
@media (max-width: 560px) { .cal-day { min-height: 52px; border-radius: 10px; } }

/* Time bands for the selected day */
.bands { margin-top: 1.8rem; }
.band-group { margin-bottom: 1.4rem; }
.band-group h4 { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.7rem; font-family: var(--sans); font-weight: 700; }
.chip-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.time-chip { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 0.5rem 0.9rem; font-size: 0.88rem; font-weight: 600; cursor: pointer; font-family: inherit; text-align: left; transition: border-color 0.15s var(--ease); }
.time-chip span { display: block; font-weight: 400; font-size: 0.74rem; color: var(--muted); margin-top: 0.1rem; }
.time-chip:hover { border-color: var(--accent); }
.time-chip.selected { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.time-chip.selected span { color: var(--on-accent); opacity: 0.85; }

.field { margin-bottom: 1.05rem; }
.field label { display: block; font-size: 0.83rem; font-weight: 700; margin-bottom: 0.35rem; }
.field label .optional { font-weight: 400; color: var(--muted); }
.field input, .field select {
  width: 100%; padding: 0.75rem 0.95rem; border: 1.5px solid var(--line); border-radius: 12px;
  font-family: inherit; font-size: 0.95rem; background: var(--surface); color: var(--ink);
}
.wizard-nav { display: flex; justify-content: space-between; margin-top: 2rem; gap: 1rem; }

.confirm-panel { text-align: center; padding: 1.5rem 0; }
.confirm-panel .big-check { width: 62px; height: 62px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.25rem; font-size: 1.7rem; }
.confirm-summary { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 1.25rem 1.5rem; text-align: left; margin: 1.5rem 0; font-size: 0.95rem; }
.confirm-summary div { margin-bottom: 0.4rem; }
.confirm-summary strong { font-weight: 600; }

.empty-note { color: var(--muted); font-size: 0.92rem; padding: 0.8rem 0; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--panel); color: var(--panel-muted); margin-top: 3rem; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 3.4rem 1.4rem 1.4rem; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; gap: 1.75rem; } }
.footer-brand span { color: var(--panel-ink); font-family: var(--serif); font-size: 1.2rem; }
.footer-brand p { margin: 0.5rem 0 0; font-size: 0.9rem; }
.footer-col h4 { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--panel-ink); margin: 0 0 0.9rem; font-family: var(--sans); }
.footer-col a { display: block; font-size: 0.9rem; margin-bottom: 0.55rem; }
.footer-col a:hover { color: var(--panel-ink); }
.footer-note { text-align: center; font-size: 0.75rem; padding: 1rem 1.4rem 1.5rem; margin: 0; opacity: 0.55; }

/* ================= ADMIN ================= */
.admin-gate { max-width: 380px; margin: 6rem auto; text-align: center; padding: 0 1.4rem; }
.admin-gate input { text-align: center; font-size: 1.15rem; letter-spacing: 0.1em; }

.admin-layout { display: grid; grid-template-columns: 220px 1fr; max-width: 1280px; margin: 0 auto; min-height: calc(100vh - 70px); }
.admin-side { border-right: 1px solid var(--line); padding: 1.6rem 0.9rem; }
.admin-side button { display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left; background: none; border: none; font-family: inherit; font-size: 0.92rem; color: var(--muted); padding: 0.68rem 0.9rem; border-radius: 10px; cursor: pointer; font-weight: 500; }
.admin-side button:hover { background: var(--surface-2); color: var(--ink); }
.admin-side button.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.admin-side .side-count { margin-left: auto; background: var(--warn-bg); color: var(--warn-ink); border-radius: 999px; font-size: 0.72rem; font-weight: 700; padding: 0.1rem 0.55rem; }
.admin-main { padding: 1.8rem 2rem 3rem; min-width: 0; }
.admin-main h2 { font-size: 1.6rem; margin-bottom: 0.4rem; }
.admin-main .page-sub { color: var(--muted); font-size: 0.92rem; margin: 0 0 1.8rem; }
@media (max-width: 820px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { display: flex; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); padding: 0.6rem 0.9rem; gap: 0.2rem; }
  .admin-side button { width: auto; white-space: nowrap; }
  .admin-main { padding: 1.4rem 1.2rem 3rem; }
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 1.1rem 1.25rem; }
.stat-card .stat-label { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.stat-card .stat-num { font-family: var(--serif); font-size: 2rem; margin-top: 0.25rem; }
.stat-card.alert { border-color: var(--accent); }

.admin-table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: 0.89rem; }
.admin-table th, .admin-table td { text-align: left; padding: 0.65rem 0.55rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { color: var(--muted); font-weight: 700; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; user-select: none; white-space: nowrap; }
.admin-table th .sort-mark { color: var(--accent); }
.admin-table tr:hover td { background: var(--surface-2); }

.pill { display: inline-block; padding: 0.18rem 0.65rem; border-radius: 999px; font-size: 0.73rem; font-weight: 700; }
.pill-pending { background: var(--warn-bg); color: var(--warn-ink); }
.pill-confirmed { background: var(--ok-bg); color: var(--ok-ink); }
.pill-cancelled { background: var(--off-bg); color: var(--off-ink); }

.row-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.icon-btn { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 9px; padding: 0.32rem 0.7rem; font-size: 0.78rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent-strong); }
.icon-btn.ok { color: var(--ok-ink); }
.icon-btn.danger { color: #B3261E; }
html[data-theme="midnight"] .icon-btn.danger { color: #F09595; }

.filter-row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.2rem; }
.filter-row select, .filter-row input { padding: 0.5rem 0.8rem; border: 1.5px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 0.88rem; background: var(--surface); color: var(--ink); }

/* Editor drawer (slides over on the right) */
.drawer-veil { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 60; display: none; }
.drawer-veil.open { display: block; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--bg); z-index: 61; transform: translateX(105%); transition: transform 0.22s var(--ease); box-shadow: -18px 0 50px rgba(0,0,0,0.18); display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 1.2rem; }
.drawer-body { padding: 1.4rem 1.5rem; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 1rem 1.5rem; border-top: 1px solid var(--line); display: flex; gap: 0.7rem; justify-content: flex-end; }
.checkbox-col { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1rem; }
.checkbox-col label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }

/* Weekly schedule grid (providers x days) */
.sched-grid { display: grid; grid-template-columns: 170px repeat(7, 1fr); gap: 4px; font-size: 0.8rem; overflow-x: auto; min-width: 0; }
.sched-grid > div { min-width: 86px; }
.sched-cell-head { font-weight: 700; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 0.4rem 0.3rem; }
.sched-provider { font-weight: 600; padding: 0.55rem 0.3rem; color: var(--ink); font-size: 0.85rem; }
.sched-cell { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0.3rem; min-height: 46px; display: flex; flex-direction: column; gap: 3px; }
.sched-chip { border: none; border-radius: 6px; padding: 0.28rem 0.4rem; font-size: 0.72rem; font-weight: 600; cursor: pointer; text-align: left; font-family: inherit; line-height: 1.3; }
.sched-add { border: 1.5px dashed var(--line); background: transparent; color: var(--muted); border-radius: 6px; font-size: 0.85rem; cursor: pointer; padding: 0.15rem; }
.sched-add:hover { color: var(--accent-strong); border-color: var(--accent); }
.sched-wrap { overflow-x: auto; padding-bottom: 0.5rem; }

/* Week calendar of appointments */
.week-nav { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; }
.week-nav h3 { font-size: 1.05rem; font-family: var(--sans); font-weight: 700; }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; overflow-x: auto; }
.week-col { min-width: 128px; }
.week-col-head { text-align: center; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding: 0.35rem 0; }
.week-col-head.today { color: var(--accent-strong); }
.week-col-body { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-height: 220px; padding: 0.35rem; display: flex; flex-direction: column; gap: 5px; }
.appt-card { border-radius: 8px; padding: 0.4rem 0.5rem; font-size: 0.74rem; line-height: 1.35; cursor: pointer; border: none; text-align: left; font-family: inherit; }
.appt-card.confirmed { background: var(--ok-bg); color: var(--ok-ink); }
.appt-card.pending { background: var(--warn-bg); color: var(--warn-ink); }
.appt-card strong { display: block; font-size: 0.78rem; }
.week-wrap { overflow-x: auto; padding-bottom: 0.5rem; }

/* Theme picker swatches */
.theme-row { display: flex; gap: 0.9rem; flex-wrap: wrap; margin: 0.6rem 0 1.4rem; }
.theme-swatch { border: 2px solid var(--line); border-radius: 14px; padding: 0.6rem; cursor: pointer; background: var(--surface); font-family: inherit; text-align: center; width: 110px; }
.theme-swatch.selected { border-color: var(--accent); }
.theme-swatch .sw { height: 44px; border-radius: 8px; display: flex; overflow: hidden; margin-bottom: 0.45rem; }
.theme-swatch .sw i { flex: 1; }
.theme-swatch span { font-size: 0.78rem; font-weight: 700; }

.admin-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.9rem 1.2rem; margin-bottom: 1.2rem; }
.save-note { font-size: 0.85rem; color: var(--ok-ink); margin-left: 0.8rem; }
