/* Toran demo. Reference: calm clinical tools (Linear, Notion Calendar), with the pine and mint of a dental clinic.
   Layout: the patient's phone beside the clinic's window, so a booking made on one lands on the other. */
:root {
  --bg: #E9EDE8;
  --surface: #FFFFFF;
  --surface-2: #F5F7F4;
  --surface-3: #ECF0EB;
  --line: #DCE2DC;
  --line-2: #C8D0C9;
  --ink: #16211E;
  --ink-2: #3F4D47;
  --ink-3: #5C6A63;
  --pine: #0E5A4C;
  --pine-2: #0A4539;
  --mint: #DCF0E6;
  --mint-2: #C3E5D4;
  --coral: #D4502B;
  --coral-bg: #FBE3DA;
  --amber: #A56A08;
  --amber-bg: #FAEDCB;
  --wa-bg: #EAE4DA;
  --wa-me: #D7F6CC;
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --sh-1: 0 1px 2px rgba(22, 33, 30, .06);
  --sh-2: 0 1px 2px rgba(22, 33, 30, .05), 0 8px 24px rgba(22, 33, 30, .07);
  --sh-3: 0 2px 6px rgba(22, 33, 30, .08), 0 24px 60px rgba(22, 33, 30, .16);
  --font: 'IBM Plex Sans Hebrew', 'Heebo', 'Assistant', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body { font: 400 14px/1.5 var(--font); color: var(--ink); background: var(--bg); display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100dvh; overflow: hidden; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3 { font-weight: 600; line-height: 1.25; text-wrap: balance; }
[hidden] { display: none !important; }
.ic { flex: none; }
:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--ink-3); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; padding-inline: 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { color: var(--pine); display: flex; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.brand-for { font-size: 12.5px; color: var(--ink-2); background: var(--surface-3); padding: 3px 10px; border-radius: 99px; white-space: nowrap; }

.seg { display: inline-flex; background: var(--surface-3); padding: 3px; border-radius: 10px; gap: 2px; }
.seg button { padding: 6px 14px; border-radius: 7px; font-weight: 500; font-size: 13px; color: var(--ink-2); transition: background .18s var(--ease), color .18s, box-shadow .18s; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); font-weight: 600; }
.seg-sm button { padding: 5px 12px; font-size: 12.5px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 13px; border: 1px solid transparent; transition: background .16s, border-color .16s, transform .12s, box-shadow .16s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--pine); color: #fff; box-shadow: var(--sh-1); }
.btn-primary:hover { background: var(--pine-2); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line-2); }
.btn-ghost.danger { color: var(--coral); }
.btn-ghost.danger:hover { background: var(--coral-bg); border-color: transparent; }
.btn-icon { width: 32px; height: 32px; padding: 0; background: var(--surface); border-color: var(--line); }
.btn-icon:hover { background: var(--surface-2); }
.btn-today { background: var(--surface); border-color: var(--line); height: 32px; padding-block: 0; }
.btn-today:hover { background: var(--surface-2); }
.btn-block { width: 100%; padding-block: 11px; font-size: 14px; }
.btn-step { background: var(--surface); border-color: var(--line-2); color: var(--ink); padding: 6px 10px; font-size: 12.5px; }
.btn-step:hover { border-color: var(--pine); color: var(--pine); }
.btn-step.is-done { background: var(--mint); border-color: transparent; color: var(--pine-2); }
.btn:disabled { opacity: .6; cursor: default; }
.link { color: var(--pine); font-weight: 600; font-size: 12.5px; }
.link:hover { text-decoration: underline; }

/* ---------- stage ---------- */
.stage { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 28px; padding: 18px 24px 20px; min-height: 0; }
.stage[data-view="patient"] { grid-template-columns: minmax(0, 1fr); }
.stage[data-view="patient"] .pane-clinic, .stage[data-view="clinic"] .pane-patient { display: none; }
.stage[data-view="clinic"] { grid-template-columns: minmax(0, 1fr); }
.stage[data-view="patient"] .pane-patient { max-width: 420px; width: 100%; margin-inline: auto; }
.pane { display: flex; flex-direction: column; gap: 12px; min-height: 0; min-width: 0; }
.pane-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 42px; }
.eyebrow { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.pane-head h2 { font-size: 17px; }
.pane-hint { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #2FA36F; box-shadow: 0 0 0 0 rgba(47, 163, 111, .5); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(47, 163, 111, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 163, 111, 0); } }

/* ---------- phone ---------- */
.phone { flex: 1; min-height: 0; max-height: 800px; width: 100%; max-width: 384px; align-self: center; background: #121816; border-radius: 46px; padding: 9px; box-shadow: var(--sh-3), inset 0 0 0 1.5px #2B3532; position: relative; }
.phone-notch { position: absolute; top: 19px; left: 50%; transform: translateX(-50%); width: 92px; height: 24px; background: #121816; border-radius: 20px; z-index: 5; }
.phone-screen { height: 100%; border-radius: 38px; overflow: hidden; background: var(--surface); position: relative; }
.demo-ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; min-height: 36px; }
.ctl-label { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.ctl-note { font-size: 12.5px; color: var(--ink-2); text-align: center; max-width: 34ch; }

/* chat */
.chat { display: flex; flex-direction: column; height: 100%; background: var(--wa-bg); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 46px 14px 10px; background: var(--pine); color: #fff; }
.chat-head div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.chat-head b { font-size: 15px; font-weight: 600; }
.chat-head span { font-size: 11.5px; opacity: .8; }
.chat-av, .web-logo { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--pine); display: grid; place-items: center; font-weight: 700; font-size: 17px; flex: none; }
.chat-ic { opacity: .85; display: flex; }
.chat-body { flex: 1; overflow-y: auto; padding: 12px 10px 6px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.msg { max-width: 86%; padding: 7px 10px 5px; border-radius: 12px; font-size: 14.5px; line-height: 1.45; box-shadow: 0 1px 1px rgba(0, 0, 0, .07); animation: msgIn .22s var(--ease); position: relative; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.msg.bot { align-self: flex-start; background: #fff; border-start-start-radius: 4px; }
.msg.me { align-self: flex-end; background: var(--wa-me); border-start-end-radius: 4px; }
.msg.me .msg-text { display: inline-flex; align-items: center; gap: 5px; }
.msg-meta { display: flex; align-items: center; justify-content: flex-end; gap: 3px; font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.msg.me .msg-meta .ic { color: #3A8FD0; }
.msg-from { font-size: 12px; font-weight: 600; color: var(--coral); margin-bottom: 1px; }
.msg.day { align-self: center; background: rgba(255, 255, 255, .8); box-shadow: none; font-size: 11.5px; color: var(--ink-2); padding: 3px 10px; border-radius: 8px; margin-block: 4px; }
.msg.typing { display: flex; gap: 4px; padding: 12px 12px; }
.msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: blink 1.1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; } .msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
.slot-list { margin: 6px 0 2px; display: flex; flex-direction: column; gap: 5px; }
.slot-list li { display: flex; flex-direction: column; padding-inline-start: 9px; border-inline-start: 2px solid var(--mint-2); line-height: 1.35; }
.slot-list span { font-size: 12.5px; color: var(--ink-2); }

.acard { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; margin-top: 7px; display: flex; flex-direction: column; gap: 5px; min-width: 216px; font-size: 13px; }
.acard-top { display: flex; align-items: center; gap: 7px; }
.acard-top span:last-child { margin-inline-start: auto; color: var(--ink-3); font-size: 12px; }
.acard-when { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-weight: 500; padding-block: 2px; }
.acard-when strong { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.acard-row { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 12.5px; }
.acard-acts { display: flex; gap: 0; margin: 5px -11px -10px; border-top: 1px solid var(--line); }
.acard-acts button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 9px 6px; color: var(--pine); font-weight: 600; font-size: 13px; transition: background .15s; }
.acard-acts button + button { border-inline-start: 1px solid var(--line); }
.acard-acts button:hover:not(:disabled) { background: var(--mint); }
.acard-acts.solo { margin: 8px 0 2px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface-2); }
.tdot { width: 9px; height: 9px; border-radius: 3px; background: var(--c-edge); flex: none; display: inline-block; }
td .tdot { margin-inline-end: 8px; }

.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px 8px; justify-content: flex-end; }
.chat-chips:empty { display: none; }
.chip { background: #fff; border: 1px solid var(--mint-2); color: var(--pine-2); padding: 7px 13px; border-radius: 99px; font-size: 13.5px; font-weight: 500; box-shadow: var(--sh-1); animation: chipIn .25s var(--ease) backwards; transition: background .15s, border-color .15s, transform .12s; }
.chip:hover { background: var(--mint); border-color: var(--pine); }
.chip:active { transform: scale(.97); }
.chip-quiet { color: var(--ink-2); border-color: var(--line); }
@keyframes chipIn { from { opacity: 0; transform: translateY(6px); } }
.chat-input { display: flex; gap: 8px; padding: 8px 10px 14px; }
.chat-input input { flex: 1; min-width: 0; border: 0; background: #fff; border-radius: 99px; padding: 10px 16px; font-size: 14px; outline: none; }
.chat-input input:focus { box-shadow: 0 0 0 2px var(--mint-2); }
.chat-input button { width: 40px; height: 40px; border-radius: 50%; background: var(--pine); color: #fff; display: grid; place-items: center; flex: none; transition: background .15s; }
.chat-input button:hover { background: var(--pine-2); }
.chat-input button .ic { transform: scaleX(-1); }

/* sheet inside the phone */
.sheet { position: absolute; inset: 0; background: rgba(18, 24, 22, .45); display: flex; align-items: flex-end; z-index: 6; animation: fade .2s; }
.sheet-card { background: var(--surface); width: 100%; border-radius: 22px 22px 0 0; padding: 10px 18px 22px; display: flex; flex-direction: column; gap: 4px; animation: up .28s var(--ease); }
.sheet-grip { width: 38px; height: 4px; border-radius: 4px; background: var(--line-2); align-self: center; margin-bottom: 8px; }
.sheet-card h3 { font-size: 17px; }
.sheet-card p { color: var(--ink-2); font-size: 13px; margin-bottom: 6px; }
.sheet-card .btn { margin-top: 12px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 9px; cursor: pointer; }
.switch-row > span { display: flex; flex-direction: column; min-width: 0; }
.switch-row small { color: var(--ink-3); font-size: 12.5px; font-weight: 400; }
.switch-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-row i { width: 36px; height: 21px; border-radius: 99px; background: var(--line-2); position: relative; flex: none; transition: background .18s; }
.switch-row i::after { content: ""; position: absolute; top: 2.5px; inset-inline-start: 2.5px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .18s var(--ease); }
.switch-row input:checked + i { background: var(--pine); }
.switch-row input:checked + i::after { transform: translateX(-15px); }
.switch-row input:focus-visible + i { outline: 2px solid var(--pine); outline-offset: 2px; }

/* booking site */
.web { height: 100%; overflow-y: auto; background: var(--surface); display: flex; flex-direction: column; scrollbar-width: thin; }
.web-head { padding: 46px 16px 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.web-brand { display: flex; align-items: center; gap: 10px; }
.web-brand div, .side-clinic div, .side-user div { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.web-brand span, .side-clinic span, .side-user span { font-size: 12px; color: var(--ink-3); }
.web-logo { background: var(--pine); color: #fff; border-radius: 11px; }
.web-steps { display: flex; gap: 5px; }
.web-steps li { flex: 1; text-align: center; font-size: 11.5px; color: var(--ink-3); padding-top: 7px; border-top: 3px solid var(--surface-3); font-weight: 500; }
.web-steps li.past { border-color: var(--mint-2); color: var(--ink-2); }
.web-steps li.on { border-color: var(--pine); color: var(--pine-2); font-weight: 600; }
.web-main { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.web-main h3 { font-size: 19px; margin-bottom: 2px; }
.web-back { display: inline-flex; align-items: center; gap: 2px; color: var(--ink-2); font-size: 13px; align-self: flex-start; font-weight: 500; }
.web-back:hover { color: var(--pine); }
.web-card { display: flex; flex-direction: column; gap: 5px; text-align: start; border: 1px solid var(--line); border-radius: 14px; padding: 14px; transition: border-color .15s, box-shadow .15s, transform .12s; }
.web-card:hover { border-color: var(--pine); box-shadow: var(--sh-2); }
.web-card-t { font-size: 17px; font-weight: 600; }
.web-card-s { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; }
.web-tag { align-self: flex-start; background: var(--mint); color: var(--pine-2); font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; margin-top: 4px; }
.web-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.web-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; text-align: start; transition: background .15s; }
.web-row + .web-row { border-top: 1px solid var(--line); }
.web-row:hover { background: var(--surface-2); }
.web-row-t { font-weight: 600; flex: 1; }
.web-row-s { font-size: 12.5px; color: var(--ink-3); }
.web-row .ic { color: var(--ink-3); }
.web-days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
.web-day { flex: none; width: 48px; display: flex; flex-direction: column; align-items: center; padding: 7px 0 5px; border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, background .15s; }
.web-day span { font-size: 11.5px; color: var(--ink-3); }
.web-day b { font-size: 17px; font-weight: 600; }
.web-day i { font-style: normal; font-size: 10px; color: var(--ink-3); height: 13px; }
.web-day:hover:not(:disabled) { border-color: var(--pine); }
.web-day.on { background: var(--pine); border-color: var(--pine); color: #fff; }
.web-day.on span { color: rgba(255, 255, 255, .8); }
.web-day:disabled { opacity: .45; cursor: default; background: var(--surface-2); }
.web-date { font-weight: 600; font-size: 13.5px; }
.web-group { display: flex; flex-direction: column; gap: 6px; }
.web-group > span { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.web-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.web-times:has(> :only-child) { grid-template-columns: 1fr; }
.web-times > :only-child { flex-direction: row; justify-content: space-between; align-items: center; padding: 14px 16px; }
.web-times > :only-child b { font-size: 18px; }
.web-times > :only-child span { font-size: 13px; }
.web-time { border: 1px solid var(--line); border-radius: 10px; padding: 7px 4px 6px; display: flex; flex-direction: column; align-items: center; line-height: 1.25; transition: border-color .15s, background .15s; }
.web-time b { font-size: 15px; font-weight: 600; }
.web-time span { font-size: 12px; color: var(--ink-3); }
.web-time:hover { border-color: var(--pine); background: var(--mint); }
.web-empty { color: var(--ink-3); padding-block: 20px; text-align: center; }
.web-field { display: flex; flex-direction: column; gap: 4px; }
.web-field label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.web-field input, .web-field select, .hr select { border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 11px; background: var(--surface); outline: none; width: 100%; transition: border-color .15s, box-shadow .15s; }
.web-field input:focus, .web-field select:focus, .hr select:focus { border-color: var(--pine); box-shadow: 0 0 0 3px var(--mint); }
.web-field input[dir="ltr"] { text-align: right; }
.web-fine { font-size: 12px; color: var(--ink-3); text-align: center; }
.web-done { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-block: 14px 6px; text-align: center; }
.web-done p { color: var(--ink-2); }
.web-check { width: 60px; height: 60px; border-radius: 50%; background: var(--mint); color: var(--pine); display: grid; place-items: center; margin-bottom: 6px; animation: popIn .45s var(--ease); }
@keyframes popIn { from { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.08); } }

/* ---------- clinic window ---------- */
.win { flex: 1; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-2); display: grid; grid-template-columns: 196px minmax(0, 1fr); position: relative; overflow: hidden; container-type: inline-size; container-name: win; }
.side { background: var(--surface-2); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; padding: 14px 10px; min-height: 0; }
.side-clinic, .side-user { display: flex; align-items: center; gap: 9px; padding-inline: 4px; }
.side-clinic .web-logo { width: 32px; height: 32px; font-size: 15px; border-radius: 9px; }
.side-clinic b, .side-user b { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-btn { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; font-size: 13.5px; transition: background .15s, color .15s; text-align: start; }
.side-btn:hover { background: var(--surface-3); color: var(--ink); }
.side-btn.on { background: var(--mint); color: var(--pine-2); font-weight: 600; }
.side-btn span { flex: 1; white-space: nowrap; }
.side-btn em { font-style: normal; font-size: 11px; font-weight: 600; background: var(--coral); color: #fff; min-width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center; padding-inline: 5px; }
.side-btn em.quiet { background: var(--surface-3); color: var(--ink-2); }
.side-btn.on em.quiet { background: #fff; }
.view { min-width: 0; min-height: 0; overflow-y: auto; padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; }

.vh { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.vh-l { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.vh-l:has(.vh-sub) { flex-direction: column; align-items: flex-start; gap: 2px; }
.vh h1 { font-size: 20px; letter-spacing: -.01em; }
.vh h1 small { font-size: 12px; font-weight: 600; color: var(--pine-2); background: var(--mint); padding: 2px 9px; border-radius: 99px; margin-inline-start: 10px; vertical-align: 2px; }
.vh-sub { color: var(--ink-2); font-size: 13.5px; }
.vh-r { display: flex; align-items: center; gap: 8px; }
.datenav { display: flex; gap: 4px; }

/* calendar */
.cal-wrap { flex: 1; min-height: 380px; display: grid; grid-template-columns: minmax(0, 1fr) 252px; gap: 16px; }
.cal { border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--surface); }
.cal-head { display: grid; grid-template-columns: 50px repeat(var(--n), minmax(var(--colmin, 0px), 1fr)); border-bottom: 1px solid var(--line); background: var(--surface-2); position: sticky; top: 0; z-index: 5; min-width: calc(50px + var(--n) * var(--colmin, 0px)); }
.cal-who { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-inline-start: 1px solid var(--line); min-width: 0; }
.cal-who div { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.cal-who b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-who span { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-scroll { flex: 1; overflow: auto; scrollbar-width: thin; }
.cal-grid { position: relative; display: grid; grid-template-columns: 50px repeat(var(--n), minmax(var(--colmin, 0px), 1fr)); margin-top: 10px; min-width: calc(50px + var(--n) * var(--colmin, 0px)); }
.cal-times { position: relative; }
.cal-times span { position: absolute; inset-inline: 0; text-align: center; transform: translateY(-50%); font-size: 11.5px; color: var(--ink-3); }
.cal-lines { position: absolute; inset-block: 0; inset-inline: 50px 0; pointer-events: none; }
.cal-lines i { position: absolute; inset-inline: 0; border-top: 1px solid var(--line); }
.cal-lines i.half { border-top-style: dashed; opacity: .55; }
.cal-col { position: relative; border-inline-start: 1px solid var(--line); cursor: copy; }
.cal-off, .cal-lunch { position: absolute; inset-inline: 0; background: repeating-linear-gradient(135deg, var(--surface-3) 0 6px, transparent 6px 12px); pointer-events: none; }
.cal-lunch { display: grid; place-items: center; opacity: .9; }
.cal-lunch span { font-size: 11px; color: var(--ink-3); background: var(--surface); padding-inline: 8px; border-radius: 6px; }
.cal-now { position: absolute; inset-inline: 50px 0; border-top: 2px solid var(--coral); z-index: 3; pointer-events: none; }
.cal-now span { position: absolute; inset-inline-start: -50px; width: 50px; text-align: center; top: -10px; font-size: 11px; font-weight: 600; color: #fff; }
.cal-now span::before { content: ""; position: absolute; inset: 0 5px; background: var(--coral); border-radius: 5px; z-index: -1; }
.ap { position: absolute; inset-inline: 3px 4px; border-radius: 7px; padding: 3px 8px; text-align: start; background: var(--c-bg); color: var(--c-ink); border-inline-start: 3px solid var(--c-edge); overflow: hidden; display: flex; flex-direction: column; font-size: 12.5px; line-height: 1.35; transition: box-shadow .15s, transform .15s, filter .15s; z-index: 1; }
.ap:hover { box-shadow: 0 3px 10px rgba(22, 33, 30, .16); transform: translateY(-1px); z-index: 2; }
.ap-l1 { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.ap-l1 b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.ap-st { flex: none; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; }
.ap-l2 { opacity: .86; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.ap-sm { justify-content: center; }
.ap-sm .ap-l2 { display: none; }
.ap.s-pending { background: repeating-linear-gradient(135deg, var(--c-bg) 0 7px, color-mix(in srgb, var(--c-bg) 55%, #fff) 7px 14px); }
.ap.s-done { background: var(--surface-3); color: var(--ink-2); border-inline-start-color: var(--line-2); }
.ap.s-noshow { background: var(--coral-bg); color: #8E2A10; border-color: var(--coral); }
.ap.s-noshow b { text-decoration: line-through; }
.ap.s-waiting { box-shadow: 0 0 0 2px var(--amber); }
.ap.s-waiting .ap-st { background: var(--amber); color: #fff; padding: 0 6px; border-radius: 99px; }
.ap.s-arrived { box-shadow: 0 0 0 2px var(--pine); }
.ap.s-arrived .ap-st { background: var(--pine); color: #fff; padding: 0 6px; border-radius: 99px; }
.ap.pop { animation: apPop 2.4s var(--ease); z-index: 4; }
@keyframes apPop { 0% { transform: scale(.7); opacity: 0; box-shadow: 0 0 0 0 rgba(14, 90, 76, .6); } 18% { transform: scale(1.05); opacity: 1; } 30% { transform: scale(1); box-shadow: 0 0 0 4px rgba(14, 90, 76, .55); } 100% { box-shadow: 0 0 0 14px rgba(14, 90, 76, 0); } }

.c-slate { --c-bg: #E4EAF0; --c-ink: #26394B; --c-edge: #7B93AA; }
.c-mint { --c-bg: #D5EFE1; --c-ink: #0B4D38; --c-edge: #3FA57C; }
.c-sand { --c-bg: #F4E8CB; --c-ink: #5E430A; --c-edge: #C9A13F; }
.c-rose { --c-bg: #F7DCDE; --c-ink: #74202C; --c-edge: #D5697A; }
.c-iris { --c-bg: #E4E1F5; --c-ink: #352C77; --c-edge: #8478D0; }
.c-clay { --c-bg: #F2DDCF; --c-ink: #6E3414; --c-edge: #C77B4E; }
.c-sky { --c-bg: #D7EBF7; --c-ink: #114463; --c-edge: #4C9CC9; }
.c-olive { --c-bg: #E5EACB; --c-ink: #404A0D; --c-edge: #94A53A; }
.c-sun { --c-bg: #FAEDB8; --c-ink: #5F4900; --c-edge: #D9B520; }
.c-coral { --c-bg: #FBDCD3; --c-ink: #8E2A10; --c-edge: #E2603F; }

.av { width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; font-size: calc(var(--s) * .38); flex: none; letter-spacing: -.02em; }
.av-pine { background: var(--pine); color: #fff; }
.av-clay { background: #B9643A; color: #fff; }
.av-sky { background: #2F7FAE; color: #fff; }
.av-plain { background: var(--surface-3); color: var(--ink-2); }

.cal-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stats div { padding: 10px 10px 9px; display: flex; flex-direction: column; gap: 1px; }
.stats div + div { border-inline-start: 1px solid var(--line); }
.stats b { font-size: 22px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.stats span { font-size: 11.5px; color: var(--ink-3); line-height: 1.3; }
.stats .warn b { color: var(--amber); }
.side-h, .panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.side-h h3, .panel-h h3 { font-size: 14px; }

.feed { display: flex; flex-direction: column; }
.feed-i { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; align-items: start; border-bottom: 1px solid var(--line); }
.feed-i:last-child { border-bottom: 0; }
.feed-i div { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.feed-i b { font-weight: 600; font-size: 13px; }
.feed-i span { color: var(--ink-2); font-size: 12.5px; }
.feed-i time { font-size: 12px; color: var(--ink-3); padding-top: 1px; }
.feed-ic { width: 28px; height: 28px; border-radius: 8px; display: grid !important; place-items: center; background: var(--mint); color: var(--pine) !important; }
.k-warn .feed-ic { background: var(--coral-bg); color: var(--coral) !important; }
.k-fill .feed-ic, .k-review .feed-ic { background: var(--amber-bg); color: var(--amber) !important; }
.k-handoff .feed-ic { background: #DCE9F5; color: #1F5F8E !important; }
.feed-i.fresh { animation: fresh 2.6s var(--ease); }
@keyframes fresh { 0% { background: var(--mint); transform: translateY(-6px); opacity: 0; } 15% { opacity: 1; transform: none; } 100% { background: transparent; } }
.feed-sm .feed-i { grid-template-columns: 28px minmax(0, 1fr); }
.feed-sm time { display: none; }

/* drawer */
.drawer-scrim { position: absolute; inset: 0; background: rgba(22, 33, 30, .22); z-index: 8; animation: fade .2s; }
.drawer { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(372px, 94%); background: var(--surface); border-inline-start: 1px solid var(--line); box-shadow: var(--sh-3); padding: 20px; overflow-y: auto; z-index: 9; transform: translateX(-104%); transition: transform .24s var(--ease); display: flex; flex-direction: column; gap: 12px; }
.drawer.open { transform: none; }
.drawer-x { position: absolute; top: 14px; inset-inline-end: 14px; }
.d-head { display: flex; align-items: center; gap: 12px; padding-inline-end: 36px; }
.d-head h2 { font-size: 18px; }
.d-head div { color: var(--ink-2); font-size: 13px; min-width: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.p-good, .st-confirmed, .st-done { background: var(--mint); color: var(--pine-2); }
.p-mid, .st-pending, .st-waiting { background: var(--amber-bg); color: #7A4E05; }
.p-bad, .st-noshow, .st-cancelled { background: var(--coral-bg); color: #8E2A10; }
.st-arrived { background: var(--pine); color: #fff; }
.d-box { border: 1px solid var(--line); border-radius: var(--r); padding: 4px 12px; }
.d-row { display: flex; align-items: center; gap: 8px; padding-block: 8px; font-size: 13.5px; }
.d-row + .d-row { border-top: 1px solid var(--line); }
.d-row .ic { color: var(--ink-3); }
.d-row em { font-style: normal; margin-inline-start: auto; color: var(--ink-3); font-size: 12.5px; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.steps i { height: 4px; border-radius: 4px; background: var(--surface-3); }
.steps i.on { background: var(--pine); }
.d-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.d-acts .btn { flex: 1; }
.d-h { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.tl { display: flex; flex-direction: column; gap: 0; }
.tl li { position: relative; padding: 0 18px 14px 0; display: flex; flex-direction: column; line-height: 1.4; border-inline-start: 0; }
.tl li::before { content: ""; position: absolute; inset-inline-start: 0; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--pine); }
.tl li::after { content: ""; position: absolute; inset-inline-start: 3.5px; top: 16px; bottom: -4px; width: 1px; background: var(--line-2); }
.tl li:last-child::after { display: none; }
.tl b { font-size: 13px; font-weight: 600; }
.tl span { font-size: 12.5px; color: var(--ink-3); }
.mini { display: flex; flex-direction: column; }
.mini li { display: flex; align-items: center; gap: 8px; padding-block: 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
.mini li span:last-child { margin-inline-start: auto; color: var(--ink-3); font-size: 12.5px; }

/* panels, tables */
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tbl-wrap { overflow-x: auto; margin-inline: -16px; padding-inline: 16px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: start; font-size: 12px; font-weight: 500; color: var(--ink-3); padding: 6px 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-inline-start: 0; }
.tbl-hover tbody tr { cursor: pointer; transition: background .12s; }
.tbl-hover tbody tr:hover { background: var(--surface-2); }
.cell-p { display: flex; align-items: center; gap: 9px; }
.cell-p div { display: flex; flex-direction: column; line-height: 1.3; text-align: start; }
.cell-p span:not(.av) { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 9px; padding: 7px 11px; color: var(--ink-3); min-width: 240px; transition: border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: var(--pine); box-shadow: 0 0 0 3px var(--mint); }
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; color: var(--ink); }
.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 40px 24px; text-align: center; color: var(--ink-3); }
.empty b { color: var(--ink); font-size: 15px; }
.empty span { max-width: 42ch; font-size: 13px; }
.empty .btn { margin-top: 8px; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.autos li + li { border-top: 1px solid var(--line); }
.autos b { font-weight: 600; font-size: 13.5px; }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.how div { background: var(--surface-2); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.how span { width: 22px; height: 22px; border-radius: 50%; background: var(--pine); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.how b { font-weight: 600; }
.how p { color: var(--ink-2); font-size: 12.5px; }
.note { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; background: var(--surface-2); border-radius: var(--r-sm); padding: 9px 12px; }
.note .ic { color: var(--pine); }

/* insights */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { border: 1px solid var(--line); border-radius: var(--r); padding: 13px 15px; display: flex; flex-direction: column; gap: 2px; }
.kpi span { font-size: 12.5px; color: var(--ink-2); }
.kpi b { font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.kpi em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.kpi em.good { color: var(--pine); font-weight: 500; }
.bars { display: flex; flex-direction: column; gap: 10px; padding-block: 6px; }
.bar-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 30px; align-items: center; gap: 10px; font-size: 13px; }
.bar { height: 18px; background: var(--surface-3); border-radius: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 5px; background: var(--ink-3); }
.bar .b-whatsapp { background: var(--pine); } .bar .b-web { background: #3FA57C; } .bar .b-phone { background: #A9B5AE; } .bar .b-desk { background: #C8D0C9; }
.bar-row b { font-weight: 600; text-align: end; }
.line { width: 100%; height: auto; direction: ltr; }
.line .grid { stroke: var(--line); stroke-width: 1; fill: none; }
.line .area { fill: var(--mint); opacity: .7; }
.line .stroke { fill: none; stroke: var(--pine); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.line .dot { fill: var(--surface); stroke: var(--pine); stroke-width: 2.5; }
.line text { font: 500 11px var(--font); text-anchor: middle; fill: var(--ink-2); }
.line .lbl { fill: var(--ink-3); }
.heat-t { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 13px; }
.heat-t th { font-weight: 500; color: var(--ink-3); font-size: 12px; text-align: center; padding: 2px 6px; white-space: nowrap; }
.heat-t tbody th { text-align: start; color: var(--ink); font-weight: 600; font-size: 13px; }
.heat { text-align: center; padding: 11px 6px; border-radius: 7px; font-weight: 600; min-width: 58px; }
.h-1 { background: #E6F3EC; color: var(--pine-2); } .h-2 { background: #BFE2CF; color: var(--pine-2); } .h-3 { background: #7CC3A2; color: var(--pine-2); } .h-4 { background: var(--pine); color: #fff; }
.h-x { background: var(--surface-2); color: var(--ink-3); font-weight: 400; font-size: 12px; }

/* settings */
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: none; }
.tabs button { padding: 8px 0 10px; font-weight: 500; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s, border-color .15s; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--pine-2); border-color: var(--pine); font-weight: 600; }
.hours li { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 46px; border-top: 1px solid var(--line); }
.hours .switch-row { flex-direction: row-reverse; justify-content: flex-end; padding-block: 0; font-weight: 500; }
.hours li.off .switch-row span { color: var(--ink-3); }
.hr { display: flex; align-items: center; gap: 8px; }
.hr select { padding: 6px 8px; width: auto; flex: 1; min-width: 0; max-width: 104px; }
.hr span { color: var(--ink-3); font-size: 12.5px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; }
.stepper button { width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink-2); transition: background .12s; }
.stepper button:hover { background: var(--surface-3); color: var(--ink); }
.stepper b { min-width: 62px; text-align: center; font-weight: 600; font-size: 13px; }
.who { display: flex; gap: 5px; }
.who-b { padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); transition: all .15s; }
.who-b:hover { border-color: var(--line-2); color: var(--ink); }
.who-b.on { background: var(--mint); border-color: transparent; color: var(--pine-2); font-weight: 600; }
.shift-t { width: 100%; border-collapse: separate; border-spacing: 5px; }
.shift-t thead th { font-size: 12px; font-weight: 500; color: var(--ink-3); padding-bottom: 2px; }
.shift-t tbody th { padding-inline-end: 12px; white-space: nowrap; }
.shift { width: 100%; min-width: 62px; padding: 11px 4px; border-radius: 8px; background: var(--surface-2); color: var(--ink-3); font-weight: 600; font-size: 13px; transition: transform .12s, filter .15s; }
.shift:hover { filter: brightness(.96); }
.shift:active { transform: scale(.96); }
.sh-afula { background: var(--mint-2); color: var(--pine-2); }
.sh-yokneam { background: #F2DDCF; color: #6E3414; }

/* ---------- tour ---------- */
.tour-scrim { position: fixed; inset: 0; background: rgba(22, 33, 30, .3); z-index: 20; animation: fade .2s; }
.tour { position: fixed; inset-block: 0; inset-inline-end: 0; width: min(430px, 100%); background: var(--surface); z-index: 21; box-shadow: var(--sh-3); padding: 22px 22px 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; animation: tourIn .26s var(--ease); }
@keyframes tourIn { from { transform: translateX(-100%); } }
.tour-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tour h2 { font-size: 20px; }
.tour-head p { color: var(--ink-2); font-size: 13.5px; margin-top: 3px; }
.tour h3 { font-size: 12px; color: var(--ink-3); font-weight: 500; margin-top: 4px; }
.tour-list { display: flex; flex-direction: column; gap: 6px; }
.tour-i { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s, background .15s, transform .12s; }
.tour-i:hover { border-color: var(--pine); background: var(--surface-2); }
.tour-i:active { transform: scale(.99); }
.tour-i > span:first-child { width: 34px; height: 34px; border-radius: 9px; background: var(--mint); color: var(--pine); display: grid; place-items: center; }
.tour-i div { display: flex; flex-direction: column; line-height: 1.4; }
.tour-i b { font-weight: 600; font-size: 14px; }
.tour-i small { color: var(--ink-2); font-size: 12.5px; }
.tour-i > .ic { color: var(--ink-3); }

.toasts { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 30; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 11px; font-size: 13.5px; font-weight: 500; box-shadow: var(--sh-3); animation: toastIn .28s var(--ease); transition: opacity .3s, transform .3s; max-width: 100%; }
.toast .ic { color: #7FD6AE; }
.toast.out { opacity: 0; transform: translateY(-8px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.97); } }

/* ---------- responsive ---------- */
@container win (max-width: 900px) {
  .cal-wrap { grid-template-columns: minmax(0, 1fr); }
  .cal-side { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container win (max-width: 560px) {
  .cal-scroll { --colmin: 168px; }
}
@container win (max-width: 760px) {
  .two { grid-template-columns: minmax(0, 1fr); }
  .how { grid-template-columns: minmax(0, 1fr); }
}
@container win (max-width: 700px) {
  .side { padding-inline: 8px; }
  .side-clinic div, .side-user div, .side-btn span { display: none; }
  .side-btn { justify-content: center; position: relative; padding: 10px; }
  .side-btn em { position: absolute; top: 2px; inset-inline-end: 2px; min-width: 15px; height: 15px; font-size: 10px; padding-inline: 3px; }
  .side-btn em.quiet { display: none; }
  .side-clinic, .side-user { justify-content: center; padding: 0; }
}
@media (max-width: 1179px) {
  #viewSeg [data-view="split"] { display: none; }
  .stage { grid-template-columns: minmax(0, 1fr); padding: 14px 16px 16px; }
  .stage[data-view="split"] .pane-clinic { display: none; }
  .stage .pane-patient { max-width: 420px; width: 100%; margin-inline: auto; }
  .win { grid-template-columns: 196px minmax(0, 1fr); }
  #liveHint { display: none; }
}
@media (max-width: 700px) {
  .top { padding-inline: 12px; height: 52px; gap: 8px; }
  .brand-for, .hide-sm { display: none; }
  .stage { padding: 10px 10px 12px; }
  .win { grid-template-columns: 52px minmax(0, 1fr); border-radius: var(--r); }
  .view { padding: 14px 12px; }
  .pane-head h2 { font-size: 15px; }
  .phone { border-radius: 18px; padding: 0; background: none; box-shadow: 0 0 0 1px var(--line), var(--sh-2); max-width: none; }
  .phone-notch { display: none; }
  .phone-screen { border-radius: 18px; }
  .chat-head { padding-top: 12px; }
  .web-head { padding-top: 16px; }
  .stage .pane-patient { max-width: 520px; }
  .toasts { top: 58px; }
  .vh h1 { font-size: 17px; }
  .search { min-width: 0; width: 100%; }
  .cal-who .av { display: none; }
  .cal-who { padding: 7px 6px; }
  .kpi b { font-size: 24px; }
  .hours li { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
