
/* Booking portal — mobile-first presentation. No external assets or libraries. */
:root {
  color-scheme: light;
  --bg:#f5f5f0; --paper:#fff; --ink:#182820; --muted:#52635a;
  --line:#dce3da; --accent:#205b43; --accent2:#e9f2e9; --navy:#153c2d;
  --teal:#205b43; --red:#9d3030; --redbg:#fff0ee; --yellow:#d6ebaa;
  --focus:#22674a; --radius:20px; --nav:248px; --shadow:0 2px 8px #213d2110;
  --bottom:82px;
}
*,*::before,*::after { box-sizing:border-box; }
html { width:100%; min-width:0; -webkit-text-size-adjust:100%; scroll-padding-top:16px; scroll-padding-bottom:100px; }
body { margin:0; width:100%; min-width:0; background:var(--bg); color:var(--ink); font:16px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; overflow-wrap:anywhere; }
main,section,form,nav,header,div { min-width:0; }
body.modal-open { overflow:hidden; }
[hidden],.hidden { display:none!important; }
h1,h2,h3,p { margin:0 0 12px; }
h1 { font-size:clamp(30px,6vw,46px); line-height:1.1; font-weight:720; letter-spacing:-.045em; }
h2 { font-size:21px; line-height:1.22; font-weight:690; letter-spacing:-.025em; }
h3 { font-size:16px; line-height:1.35; font-weight:690; }
small,.muted { color:var(--muted); font-size:14px; }
a { color:var(--accent); font-weight:650; text-underline-offset:3px; }
button,input,select,textarea { font:inherit; color:inherit; min-width:0; max-width:100%; }
button,.linkbutton { -webkit-tap-highlight-color:transparent; min-height:48px; border:1px solid #cbd7cc; border-radius:12px; background:var(--paper); padding:11px 16px; font-weight:650; line-height:1.3; text-align:center; white-space:normal; overflow-wrap:anywhere; cursor:pointer; }
button.primary,.linkbutton { color:#fff; background:var(--accent); border-color:var(--accent); }
button.small { font-size:14px; padding:10px 13px; }
button.subtle { background:transparent; color:var(--accent); border-color:transparent; padding-inline:10px; }
button.danger { background:var(--redbg); border-color:#eac5c0; color:var(--red); }
button.selected { background:var(--accent2); border-color:var(--accent); color:var(--navy); box-shadow:inset 0 0 0 1px var(--accent); }
button:disabled { opacity:.48; cursor:not-allowed; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
.linkbutton { display:inline-flex; align-items:center; justify-content:center; gap:8px; text-decoration:none; }
input,select,textarea { display:block; width:100%; min-height:50px; border:1px solid #bfcdbf; border-radius:12px; padding:12px 13px; background:#fff; font-size:16px; }
select { cursor:pointer; }
input[type=checkbox],input[type=radio] { width:23px; height:23px; min-height:23px; padding:0; margin:0; flex:none; accent-color:var(--accent); }
input[type=date],input[type=time],input[type=datetime-local] { max-width:100%; min-width:0; }
textarea { resize:vertical; min-height:130px; }
label { display:block; margin:0 0 7px; font-size:14px; font-weight:650; }
label.check { display:flex; align-items:center; gap:12px; min-height:48px; padding:8px 0; margin:0; font-size:15px; font-weight:500; }
.field { min-width:0; }
.row { display:flex; align-items:center; flex-wrap:wrap; gap:9px; }
.row.between { justify-content:space-between; }
.grow { flex:1 1 140px; min-width:0; }
.stack { display:grid; gap:16px; min-width:0; }
.grid2,.grid3,.tools,.checkgrid { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }
.section { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); padding:18px; }
.section > :last-child { margin-bottom:0; }
.pagehead { margin:0 0 23px; align-items:flex-end; gap:14px; }
.pagehead .grow { flex-basis:100%; }
.pagehead .muted { font-size:15px; }
.pagehead > button,.pagehead > .row { flex:1 1 auto; }
.eyebrow { display:block; font-size:11px; letter-spacing:.13em; text-transform:uppercase; font-weight:750; color:var(--accent); margin-bottom:8px; }
.brand { display:flex; align-items:center; gap:10px; min-width:0; }
.brand strong { display:block; font-size:15px; line-height:1.2; letter-spacing:-.02em; }
.brand small { display:block; margin-top:4px; font-size:12px; line-height:1.3; }
.monogram { display:grid; place-items:center; flex:none; height:40px; width:40px; background:var(--navy); color:#fff; border-radius:14px; font-size:17px; font-weight:760; letter-spacing:-.06em; }
.top { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px max(14px,env(safe-area-inset-right)) 14px max(14px,env(safe-area-inset-left)); background:#fff; border-bottom:1px solid var(--line); }
.top .brand { flex:1 1 auto; }
.top .actions { display:flex; gap:6px; flex:none; }
.top .actions button { min-height:44px; font-size:12px; padding:8px 10px; }
.top .actions #refresh { display:grid; place-items:center; width:44px; padding:8px; }
.top .actions svg { width:20px; height:20px; }
.shell { min-height:calc(100vh - 74px); max-width:1680px; margin:auto; }
.main { width:100%; max-width:1160px; padding:24px max(14px,env(safe-area-inset-right)) calc(var(--bottom) + 32px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left)); margin:0 auto; }
.nav { position:fixed; z-index:25; bottom:0; left:0; right:0; display:flex; justify-content:space-evenly; gap:2px; padding:7px max(5px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left)); background:#fff; border-top:1px solid var(--line); box-shadow:0 -4px 24px #1828200b; }
.nav button { border:0; background:none; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; flex:1 1 0; min-height:60px; font-size:11px; line-height:1.15; font-weight:650; color:var(--muted); padding:5px 2px; }
.nav button .nav-symbol { display:grid; place-items:center; width:42px; height:28px; border-radius:20px; }
.nav button svg { width:22px; height:22px; flex:none; }
.nav button.active { color:var(--navy); }
.nav button.active .nav-symbol { background:#dcebd7; color:var(--navy); }
.auth { width:min(100% - 24px,510px); margin:24px auto; display:grid; gap:0; border:1px solid var(--line); border-radius:26px; background:#fff; overflow:hidden; box-shadow:var(--shadow); }
.auth-intro { padding:23px; background:var(--navy); color:#fff; position:relative; overflow:hidden; }
.auth-intro .brand { position:relative; z-index:1; }
.auth-intro .monogram { background:var(--yellow); color:var(--navy); }
.auth-intro .brand small { color:#d5e4d9; }
.auth-intro .intro-copy { margin:28px 0 0; position:relative; z-index:1; }
.auth-intro .intro-copy strong { display:block; font-size:clamp(26px,6vw,36px); line-height:1.13; letter-spacing:-.04em; font-weight:650; max-width:15ch; }
.auth-intro .intro-copy p { margin:12px 0 0; font-size:14px; color:#d5e4d9; max-width:31ch; }
.auth-intro .orbit { position:absolute; right:-60px; bottom:-105px; width:240px; height:240px; border:1px solid #d6ebaa38; border-radius:50%; box-shadow:0 0 0 32px #d6ebaa0b,0 0 0 64px #d6ebaa0b; pointer-events:none; }
.auth-pane { padding:24px 20px; }
.auth h1 { font-size:30px; margin-bottom:18px; }
.auth .tabrow { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; }
.auth button.primary { width:100%; }
.auth .notice { margin-top:14px; }
.auth-foot { border-top:1px solid var(--line); color:var(--muted); font-size:12px; padding-top:15px; margin:24px 0 0; }
.resume-session { margin-bottom:12px; }
.tabrow { display:flex; flex-wrap:wrap; gap:5px; padding:5px; background:#e9ede6; border-radius:15px; margin:0 0 4px; }
.tabrow button { flex:1 1 100px; background:transparent; border-color:transparent; border-radius:11px; min-height:44px; font-size:14px; padding:9px 8px; }
.tabrow button.selected { background:#fff; color:var(--navy); border:1px solid #cbd7cc; box-shadow:0 1px 3px #203d2010; }
.home-layout { display:grid; gap:16px; }
.next { background:var(--navy); color:white; border:0; padding:22px; position:relative; overflow:hidden; }
.next .eyebrow,.next .muted,.next small { color:#d7e7d9; }
.next .hero-date { font-size:15px; color:#d7e7d9; margin:0 0 4px; }
.next .hero-time { font-size:clamp(38px,9vw,60px); font-variant-numeric:tabular-nums; font-weight:650; line-height:1.08; letter-spacing:-.06em; margin:4px 0 10px; }
.next h2 { font-size:24px; margin-bottom:8px; }
.next .hero-meta { color:#e6eee7; font-size:15px; margin:0 0 18px; }
.next .row { margin-top:16px; }
.next .row>* { flex:1 1 130px; }
.next button { background:#ffffff12; border-color:#ffffff55; color:white; }
.next .linkbutton { background:var(--yellow); color:var(--navy); border-color:var(--yellow); }
.next a:not(.linkbutton) { display:inline-flex; min-height:48px; align-items:center; justify-content:center; color:white; }
.next button:focus-visible,.next a:focus-visible { outline-color:var(--yellow); }
.hero-caption { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:16px; }
.hero-caption .eyebrow { margin:0; }
.hero-caption .hero-state { font-size:12px; background:#ffffff16; border:1px solid #ffffff36; border-radius:30px; padding:5px 10px; white-space:nowrap; }
.metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.metric { background:#fff; border:1px solid var(--line); border-radius:16px; padding:14px; }
.metric .count { font-size:34px; font-weight:680; line-height:1.08; margin:4px 0 2px; color:var(--navy); font-variant-numeric:tabular-nums; letter-spacing:-.05em; }
.metric p { margin:0; font-size:13px; color:var(--muted); }
.quick-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.quick-actions button { text-align:left; min-height:90px; display:flex; align-items:flex-start; flex-direction:column; justify-content:space-between; gap:8px; padding:14px; border-radius:16px; }
.quick-actions svg { width:23px; height:23px; color:var(--accent); }
.home-section-title { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.home-section-title h2 { margin:0; }
.home-section-title button { min-height:44px; }
.regular-line { display:flex; gap:12px; align-items:center; padding:11px 0; border-bottom:1px solid var(--line); }
.regular-line:last-child { border-bottom:0; padding-bottom:0; }
.regular-line .daychip { display:grid; place-items:center; background:var(--accent2); color:var(--navy); width:46px; height:46px; border-radius:12px; font-size:12px; font-weight:750; flex:none; }
.regular-line strong,.regular-line small { display:block; }
.list { border:1px solid var(--line); border-radius:var(--radius); background:var(--paper); overflow:hidden; }
.listrow { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:16px; border-bottom:1px solid var(--line); }
.listrow:last-child { border-bottom:0; }
.listrow.chosen,.slotitem.chosen { background:var(--accent2); }
.time { font-size:18px; font-weight:700; font-variant-numeric:tabular-nums; letter-spacing:-.02em; color:var(--navy); }
.details { flex:1 1 160px; min-width:0; }
.details strong,.details small { display:block; }
.details small { margin-top:4px; }
.listrow .row.actions { flex:1 1 100%; }
.listrow .row.actions>* { flex:1 1 auto; }
.appointment { display:grid; grid-template-columns:minmax(78px,.7fr) minmax(0,1.5fr); gap:10px 14px; align-items:start; }
.appointment .time { border-right:1px solid var(--line); padding-right:10px; }
.appointment .time strong { display:block; font-size:25px; line-height:1.1; letter-spacing:-.05em; }
.appointment .time small { display:block; font-weight:500; margin-top:4px; font-size:12px; color:var(--muted); }
.appointment .row.actions { grid-column:1/-1; }
.appointment .format-label { display:inline-flex; gap:6px; align-items:center; margin:0 0 5px; font-size:12px; font-weight:650; color:var(--muted); }
.appointment .format-label::before { content:""; display:block; width:8px; height:8px; border-radius:50%; background:#7b8c81; flex:none; }
.appointment[data-mode=online] .format-label::before { background:#426eb0; }
.appointment[data-mode=visit] .format-label::before { background:#268063; }
.appointment[data-mode=foundry] .format-label::before { background:#a96a38; }
.appointment[data-mode=home] .format-label::before { background:#9474ac; }
.status { display:inline-block; background:#edf1eb; color:#47584d; border:1px solid #d9e3d8; border-radius:30px; padding:4px 10px; font-size:12px; font-weight:650; }
.status.good { color:#235a3e; background:#e5f3e5; border-color:#c6dec6; }
.status.warn { color:#74500e; background:#fff5d8; border-color:#edd39a; }
.status.closed { color:var(--red); background:var(--redbg); border-color:#eac5c0; }
.empty { border:1px dashed #b8c8ba; border-radius:var(--radius); background:#fbfcf9; padding:28px 20px; color:var(--muted); text-align:center; }
.empty::before { content:""; display:block; width:30px; height:30px; margin:0 auto 12px; border:2px solid #9cb09f; border-radius:10px; background:linear-gradient(#9cb09f,#9cb09f) center 8px/16px 2px no-repeat; }
.notice { background:var(--accent2); border:1px solid #c8dbc6; border-left:4px solid var(--accent); border-radius:12px; padding:14px; font-size:15px; }
.notice.error { color:var(--red); background:var(--redbg); border-color:#eac5c0; border-left-color:var(--red); }
.notice.warn { color:#74500e; background:#fff5d8; border-color:#edd39a; border-left-color:#b38122; }
.notice button { margin-top:8px; }
.daygroup { margin:3px 0 14px; }
.daygroup h3 { margin:0 0 10px; padding:0 2px; color:var(--muted); font-size:14px; font-weight:700; }
.slotitem { display:grid; grid-template-columns:27px minmax(0,1fr); gap:6px 11px; align-items:center; padding:16px; border-bottom:1px solid var(--line); cursor:pointer; }
.slotitem:last-child { border-bottom:0; }
.slotitem input[type=checkbox] { grid-column:1; grid-row:1/3; align-self:start; margin-top:3px; }
.slotitem .time,.slotitem .format-note,.slotitem .slotformat { grid-column:2; }
.slotitem .format-note { color:var(--muted); font-size:13px; }
.slotitem .fixed-format { color:var(--accent); font-weight:650; }
.slotitem.chosen { box-shadow:inset 0 0 0 2px #7da28a; }
.slotitem .slotformat { width:100%; }
.stickybar { display:flex; gap:10px; align-items:center; justify-content:space-between; flex-wrap:wrap; margin-top:8px; padding:12px; border:1px solid #b8cdb9; background:white; border-radius:16px; box-shadow:var(--shadow); }
.stickybar .row { flex:1 1 auto; justify-content:flex-end; }
.stickybar .row button { flex:1 1 auto; }
.filters { display:flex; align-items:end; gap:12px; flex-wrap:wrap; }
.filters .field { flex:1 1 100%; }
.dialog-overlay { position:fixed; inset:0; z-index:90; padding:12px 8px max(8px,env(safe-area-inset-bottom)); overflow:auto; display:flex; align-items:flex-start; justify-content:center; background:#162b20a6; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
.dialog { width:100%; max-width:650px; margin:auto; background:#fff; border-radius:24px; border:1px solid var(--line); box-shadow:0 24px 70px #10251b38; }
.dialog-inner { padding:18px; }
.dialog-top { display:flex; justify-content:space-between; align-items:center; gap:12px; border-bottom:1px solid var(--line); margin-bottom:18px; padding-bottom:12px; }
.dialog-top h2 { flex:1; margin:0; }
.dialog-top button { flex:none; }
.dialog .footer { display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap; border-top:1px solid var(--line); padding-top:16px; }
.dialog .footer button { flex:1 1 110px; }
.scroll { overflow:auto; max-height:50vh; min-width:0; }
.selection-review { max-height:none; overflow:visible; }
.table { width:100%; border-collapse:collapse; table-layout:fixed; text-align:left; font-size:14px; }
.table th,.table td { padding:9px; border-bottom:1px solid var(--line); vertical-align:top; overflow-wrap:anywhere; }
.table th { color:var(--muted); font-weight:650; }
.nowrap { white-space:nowrap; }
.right { text-align:right; }
.quiet,.tag,.bulk-summary { font-size:13px; color:var(--muted); }
.divider { height:1px; background:var(--line); margin:15px 0; }
.count { font-size:32px; font-weight:750; color:var(--accent); }
.tools button { text-align:left; }
.tools button small { display:block; margin-top:4px; font-weight:400; }
.loading { opacity:.65; pointer-events:none; }
.toast { position:fixed; top:max(10px,env(safe-area-inset-top)); right:10px; left:10px; z-index:110; padding:14px 16px; border-radius:14px; background:var(--navy); color:white; font-weight:600; box-shadow:0 5px 25px #183c2d33; }
.toast.err { background:var(--red); }
.busybar { position:fixed; top:0; left:0; right:0; height:4px; z-index:111; background:var(--accent); animation:pulse 1s infinite alternate; }
@keyframes pulse { from { opacity:.35; } to { opacity:1; } }
@media (max-width:380px) {
  .top { padding:12px 10px; gap:7px; }
  .top .brand { gap:7px; }
  .top .monogram { width:32px; height:32px; font-size:14px; border-radius:10px; }
  .top .brand strong { font-size:13px; }
  .top .brand small { font-size:11px; }
  .top .actions { gap:4px; }
  .top .actions button { padding:8px 7px; font-size:11px; }
  .main { padding-left:10px; padding-right:10px; }
  .section,.listrow,.slotitem { padding:14px; }
  .next { padding:19px; }
  .auth-pane { padding:20px 16px; }
  .nav button { font-size:10px; }
}
@media (min-width:640px) {
  .main { padding:30px 25px calc(var(--bottom) + 40px); }
  .section { padding:24px; }
  .pagehead .grow { flex-basis:220px; }
  .pagehead > button,.pagehead > .row { flex:0 1 auto; }
  .grid2,.tools,.checkgrid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .grid3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .filters .field { flex:1 1 155px; }
  .home-layout { gap:20px; }
  .appointment { grid-template-columns:minmax(92px,.5fr) minmax(0,1.5fr) minmax(0,1fr); align-items:center; }
  .appointment .row.actions { grid-column:auto; justify-content:flex-end; }
  .appointment .row.actions>* { flex:0 1 auto; }
  .listrow:not(.appointment) .row.actions { flex:0 1 auto; }
  .slotitem { grid-template-columns:26px minmax(100px,.8fr) minmax(100px,1fr) minmax(130px,1.2fr); gap:12px; }
  .slotitem input[type=checkbox] { grid-row:auto; align-self:center; }
  .slotitem .time,.slotitem .format-note,.slotitem .slotformat { grid-column:auto; }
  .slotitem .fixed-format { grid-column:4; }
  .dialog-inner { padding:26px; }
  .dialog .footer button { flex:0 1 auto; }
  .toast { left:auto; max-width:440px; }
  .stickybar { position:sticky; bottom:calc(var(--bottom) + 10px); z-index:10; }
}
@media (min-width:960px) {
  .top { padding:16px 30px; min-height:76px; }
  .top .brand strong { font-size:17px; }
  .top .actions button { font-size:14px; padding:10px 14px; }
  .shell { display:grid; grid-template-columns:var(--nav) minmax(0,1fr); }
  .nav { position:sticky; inset:auto; top:0; align-self:start; flex-direction:column; justify-content:flex-start; align-items:stretch; gap:6px; padding:27px 16px; background:transparent; box-shadow:none; border-top:0; }
  .nav button { flex:0 1 auto; display:flex; flex-direction:row; justify-content:flex-start; text-align:left; gap:10px; min-height:56px; font-size:15px; padding:8px 13px; border-radius:14px; }
  .nav button .nav-symbol { width:29px; height:32px; }
  .nav button.active { background:#dcebd7; }
  .nav button.active .nav-symbol { background:transparent; }
  .main { padding:37px 35px 55px 22px; }
  .home-layout { grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); align-items:start; }
  .home-layout .wide { grid-column:1/-1; }
  .next { padding:29px; }
  .quick-actions { grid-template-columns:1fr; }
  .quick-actions button { min-height:68px; flex-direction:row; align-items:center; justify-content:flex-start; }
  .metrics { gap:12px; }
  .metric { padding:18px; }
  .auth { width:min(960px,calc(100% - 48px)); grid-template-columns: .9fr 1.1fr; margin:clamp(35px,10vh,100px) auto; min-height:540px; }
  .auth-intro { padding:38px; display:flex; flex-direction:column; justify-content:space-between; }
  .auth-intro .intro-copy { margin:70px 0 34px; }
  .auth-intro .intro-copy strong { font-size:47px; }
  .auth-intro .intro-copy p { font-size:16px; }
  .auth-pane { padding:44px 40px; align-self:center; }
  .stickybar { bottom:12px; }
}
@media (hover:hover) {
  button:not(:disabled):hover { border-color:#8aa68d; background:#f4f8f2; }
  button.primary:not(:disabled):hover,.linkbutton:hover { background:#184b35; color:white; }
  button.danger:not(:disabled):hover { background:#fae5e1; }
  .next button:not(:disabled):hover { background:#ffffff25; color:white; border-color:white; }
  .next .linkbutton:hover { background:#e5f1c8; color:var(--navy); }
  .slotitem:hover { background:#f6f9f3; }
  .nav button:not(.active):hover { background:#edf2e9; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; scroll-behavior:auto!important; } }
@media (max-height:450px) and (max-width:959px) { .nav { position:static; } .main { padding-bottom:24px; } .stickybar { position:static; } }
@media print {
  .top,.nav,.stickybar,.toast,.busybar,.dialog-overlay,button,.linkbutton { display:none!important; }
  .shell { display:block; }
  .main { padding:0; max-width:none; }
  .home-layout { display:block; }
  .section,.list { break-inside:avoid; box-shadow:none; margin-bottom:12px; }
  body,.next { background:white; color:black; }
  .next .muted,.next small,.next .hero-meta,.next .hero-date,.next .eyebrow { color:#333; }
}
.toast{pointer-events:none}

.v5-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 16px;padding:12px;border-radius:16px;background:var(--paper);border:1px solid var(--line)}
.v5-toolbar button{min-height:48px}.v5-toolbar .grow{min-width:140px}.v5-card{margin-top:16px}.v5-status{font-size:14px;color:var(--muted)}
@media(max-width:560px){.v5-toolbar button{flex:1 1 auto}.v5-toolbar .grow{flex:1 0 100%}.nav button{min-width:0}}
