:root {
  /* the patient booking site's look (book.healinghouse-eg.com, public/styles.css): soft aqua light field, glass sheets, petrol ink, Alexandria.
     Older names below alias the new ones, so every page follows. Light only. */
  color-scheme: light;
  --primary: #184A5D;
  --on-primary: #F2FBFA;
  --aqua: #57C2B8;
  --aqua-ink: #1C766E;
  --bg: #F3F9F8;
  --bg-2: #E1EFED;
  --ink: #0F2F3B;
  --soft: #456771;
  --ink-3: #587279;
  --glass: rgba(255,255,255,.16);
  --glass-2: rgba(255,255,255,.4);
  --sheet: rgba(248,253,252,.95);
  --sheet-solid: #F8FDFC;
  --glass-edge: rgba(255,255,255,.95);
  --line: rgba(24,74,93,.1);
  --line-2: rgba(24,74,93,.2);
  --shadow: 0 30px 70px -36px rgba(16,58,72,.3);
  --shadow-sm: 0 10px 30px -22px rgba(16,58,72,.35);
  --orb-1: #8FDCD3; --orb-2: #9CC6D2; --orb-3: #CDEFE9; --orb-4: #F4E4C9;
  --ok: #176B54; --ok-bg: rgba(35,134,106,.13);
  --warn: #83500A; --warn-bg: rgba(201,138,43,.16); --warn-line: rgba(201,138,43,.45);
  --bad: #B0403A; --bad-bg: rgba(194,80,74,.12);

  --petrol: var(--primary);
  --petrol-hover: #12394A;
  --turq: var(--aqua);
  --turq-pale: color-mix(in srgb, var(--aqua) 16%, var(--sheet-solid));
  --turq-line: color-mix(in srgb, var(--aqua) 45%, transparent);
  --paper: var(--sheet-solid);
  --taken: color-mix(in srgb, var(--primary) 10%, var(--sheet-solid));
  --evening: var(--bg);
  --amber: var(--warn);
  --red: var(--bad);

  --display: "Alexandria", system-ui, "Segoe UI", Tahoma, sans-serif;
  --ui: "Alexandria", system-ui, "Segoe UI", Tahoma, sans-serif;

  --step-small: 0.8125rem;
  --step-ui: 0.9375rem;
  --step-title: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
  --r-lg: 30px;
  --r-md: 20px;
  --r: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--ui); font-size: var(--step-ui); line-height: 1.6; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--aqua-ink); outline-offset: 3px; }
h1, h2, h3, h4 { text-wrap: balance; }
html[lang="en"] :is(h1, h2) { letter-spacing: -0.02em; }
.serif { font-family: var(--display); font-weight: 700; color: var(--primary); }
.num { font-variant-numeric: tabular-nums; }

/* ambient light field: soft aqua orbs fixed behind everything (z-index -1 paints under the page, above the body colour) */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: radial-gradient(120% 90% at 50% -10%, var(--bg) 35%, var(--bg-2) 100%); }
.orb { position: absolute; border-radius: 50%; opacity: .85; }
.o1 { width: 56vmax; height: 56vmax; background: radial-gradient(closest-side, var(--orb-1), transparent); top: -22vmax; inset-inline-start: -14vmax; }
.o2 { width: 46vmax; height: 46vmax; background: radial-gradient(closest-side, var(--orb-2), transparent); bottom: -20vmax; inset-inline-end: -12vmax; opacity: .5; }
.o3 { width: 30vmax; height: 30vmax; background: radial-gradient(closest-side, var(--orb-3), transparent); top: 30vh; inset-inline-end: 8vw; opacity: .7; }
.o4 { width: 22vmax; height: 22vmax; background: radial-gradient(closest-side, var(--orb-4), transparent); top: 55vh; inset-inline-start: 12vw; opacity: .55; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; background: var(--primary); color: var(--on-primary); font-weight: 500; text-decoration: none; box-shadow: 0 14px 28px -14px var(--primary); transition: background-color .25s, transform .38s cubic-bezier(.25, 1.3, .5, 1), box-shadow .4s, opacity .3s; }
.btn:hover { background: var(--petrol-hover); }
.btn:active { transform: scale(.95); }
.btn:disabled { opacity: .42; box-shadow: none; cursor: not-allowed; }

/* top bar: the logo, then pills (as on the patient site) */
.shell { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; max-width: 1440px; margin-inline: auto; padding: 16px 24px 4px; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; flex: none; }
.brand .mark { width: 40px; height: auto; }
.brand .word { width: 112px; height: auto; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-edge), 0 8px 20px -14px rgba(16,58,72,.4); }
.tabs a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--soft); white-space: nowrap; transition: background-color .3s, color .3s; }
.tabs a:hover { color: var(--ink); background: var(--glass-2); }
.tabs a[aria-current="page"] { background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 18px -10px var(--primary); }
.who { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.who .lang, .who .acct, .who .signout .ghost { display: inline-flex; align-items: center; min-height: 38px; padding: 0 15px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-edge), 0 8px 20px -14px rgba(16,58,72,.4); font-size: 13px; font-weight: 500; color: var(--ink); text-decoration: none; white-space: nowrap; transition: transform .38s cubic-bezier(.25, 1.3, .5, 1), background-color .3s; }
.who .lang:hover, .who .acct:hover, .who .signout .ghost:hover { background: rgba(255,255,255,.7); transform: translateY(-2px); }
.who .acct[aria-current="page"] { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.who .signout { margin: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--aqua), var(--primary)); color: #fff; box-shadow: 0 0 0 3px var(--glass-2), 0 0 0 4px var(--line); display: grid; place-items: center; font-weight: 600; font-size: var(--step-small); }
.who .me { margin-inline-start: 6px; }
.who .me b { display: block; font-size: var(--step-small); font-weight: 600; }
.who .me span { color: var(--soft); }

/* canvas */
.canvas { max-width: 1440px; margin-inline: auto; padding: 28px 24px 64px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.canvas > * { min-width: 0; }
.titlerow { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.titlerow h1 { font-family: var(--display); font-weight: 700; font-size: var(--step-title); line-height: 1.15; color: var(--primary); }
.titlerow p { margin-top: 6px; color: var(--soft); }
.titlerow p b { color: var(--ink); font-weight: 600; }
.seg { display: inline-flex; padding: 4px; background: var(--glass-2); border: 1px solid var(--glass-edge); border-radius: 999px; box-shadow: inset 0 1px 0 var(--glass-edge); }
.seg button { min-height: 38px; padding: 0 16px; border-radius: 999px; font-weight: 500; color: var(--soft); }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 18px -10px var(--primary); }

/* a liquid-glass sheet */
.panel { background: var(--sheet); border: 1px solid var(--glass-edge); border-radius: var(--r-lg); box-shadow: var(--shadow), inset 0 1px 0 var(--glass-edge); overflow: clip; overflow-clip-margin: 2px; } /* clip: row tints keep the round corners; unlike hidden it leaves sticky bars working */

/* day strip */
.dayhead { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 0; }
.dayhead h3 { font-size: 1rem; font-weight: 600; }
.arrows { display: flex; gap: 6px; }
.arrows button { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); }
.arrows button:hover:not(:disabled) { background: var(--glass-2); }
.arrows button:disabled { opacity: .35; cursor: default; }
.days { display: flex; gap: 6px; padding: 10px 18px 16px; scroll-snap-type: x proximity; scroll-padding-inline: 18px; scrollbar-width: none; border-bottom: 1px solid var(--line); overflow-x: auto; }
.days button { flex: none; width: 64px; min-height: 58px; border-radius: var(--r); font-size: var(--step-small); color: var(--soft); line-height: 1.25; }
.days button b { display: block; font-size: 1.0625rem; color: var(--ink); font-weight: 600; }
.days button:hover:not(:disabled) { background: color-mix(in srgb, var(--aqua) 16%, transparent); }
.days button[aria-pressed="true"] { background: var(--primary); color: color-mix(in srgb, var(--on-primary) 75%, transparent); box-shadow: 0 10px 22px -10px var(--primary); }
.days button[aria-pressed="true"] b { color: var(--on-primary); }
.days button:disabled { cursor: default; opacity: .55; }
.days button:disabled b { text-decoration: line-through; }
.days button { scroll-snap-align: start; }
.days .month { flex: none; display: flex; align-items: center; padding-inline: 10px 4px; margin-inline-start: 4px; border-inline-start: 1px solid var(--line); font-size: .75rem; font-weight: 600; color: var(--petrol); }

/* room, length, start: three plain rows, each one tap */
.step { padding: 16px 18px; border-top: 1px solid var(--line); }
.days + .step { border-top: 0; }
.step h3 { font-size: var(--step-small); font-weight: 600; color: var(--soft); margin-bottom: 10px; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); grid-auto-rows: 1fr; gap: 8px; padding-top: 8px; }
.rooms button { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; padding: 10px 14px; border-radius: var(--r-md); border: 1px solid var(--glass-edge); background: linear-gradient(180deg, rgba(255,255,255,.35), transparent 60%), var(--glass-2); box-shadow: var(--shadow-sm); text-align: start; line-height: 1.3; }
.rooms button span { display: block; font-size: .75rem; color: var(--soft); }
/* the package tag sits on the top border, so it adds no height */
.rooms button em { position: absolute; top: -9px; inset-inline-start: 12px; padding: 1px 8px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-style: normal; font-size: .6875rem; font-weight: 600; line-height: 16px; }
.rooms button:hover { border-color: var(--aqua); }
.rooms button[aria-pressed="true"] { border-color: var(--primary); background: var(--turq-pale); box-shadow: inset 0 0 0 1px var(--primary), 0 22px 44px -26px rgba(16,58,72,.6); }
.lens { display: flex; flex-wrap: wrap; gap: 8px; }
.lens button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-2); font-weight: 600; font-size: var(--step-small); }
.lens button:hover { border-color: var(--aqua); }
.lens button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.times h4 { grid-column: 1 / -1; font-size: .75rem; font-weight: 600; color: var(--soft); margin-top: 4px; }
.slot { min-height: 52px; border-radius: var(--r); border: 1px solid var(--line); background: var(--glass-2); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.slot small { display: block; font-size: .75rem; font-weight: 500; color: var(--soft); }
.slot:hover { border-color: var(--aqua); background: color-mix(in srgb, var(--aqua) 12%, transparent); }
.slot[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: transparent; box-shadow: 0 10px 22px -12px var(--primary); }
.slot[aria-pressed="true"] small { color: var(--on-primary); }
.none { color: var(--soft); font-size: var(--step-small); }
.none button { margin-inline-start: 6px; font-weight: 600; color: var(--petrol); text-decoration: underline; }

/* next bookings */
.next { grid-column: 1; }
.next header { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 18px 6px; }
.next h2 { font-size: 1rem; font-weight: 600; }
.next header a { font-size: var(--step-small); font-weight: 500; text-decoration: none; }
.next ol { list-style: none; padding: 0 18px 8px; }
.next li { display: grid; grid-template-columns: 110px 1fr auto auto; gap: 16px; align-items: center; padding-block: 12px; border-top: 1px solid var(--line); }
.next li:first-child { border-top: 0; }
.next .when b { display: block; }
.next .when span, .next .what span { font-size: var(--step-small); color: var(--soft); }
.next .paid { font-size: var(--step-small); color: var(--soft); text-align: end; }
.next .act { font-size: var(--step-small); font-weight: 500; text-decoration: none; }

/* summary */
.summary { grid-column: 2; grid-row: 2 / span 2; align-self: start; position: sticky; top: 20px; padding: 22px; display: grid; gap: 18px; }
.summary h2 { font-size: 1rem; font-weight: 600; }
.sum-room { display: flex; gap: 12px; align-items: center; }
.sum-room img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.sum-room b { display: block; }
.sum-room span { font-size: var(--step-small); color: var(--soft); }
.when-big { font-family: var(--display); font-weight: 700; color: var(--primary); font-size: 1.5rem; line-height: 1.25; }
.when-big small { display: block; font-family: var(--ui); font-size: var(--step-small); color: var(--soft); margin-top: 4px; }
.lines { display: grid; gap: 6px; font-size: var(--step-small); }
.lines div { display: flex; justify-content: space-between; gap: 12px; }
.lines .t { padding-top: 10px; border-top: 1px solid var(--line); font-size: var(--step-ui); font-weight: 600; }
.repeat { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--aqua) 10%, transparent); }
.repeat label { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.repeat input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--petrol); }
.stepper { display: flex; align-items: center; gap: 10px; font-size: var(--step-small); color: var(--soft); }
.stepper button { width: 32px; height: 32px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.stepper b { color: var(--ink); min-width: 1.5ch; text-align: center; }
.payopts { display: grid; gap: 8px; }
.payopt { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 12px 14px; border: 1px solid var(--glass-edge); background: var(--glass-2); border-radius: var(--r-md); cursor: pointer; }
.payopt input { grid-row: span 2; margin-top: 3px; accent-color: var(--petrol); width: 18px; height: 18px; }
.payopt b { font-weight: 600; }
.payopt span { font-size: var(--step-small); color: var(--soft); }
.payopt:has(input:checked) { border-color: var(--petrol); box-shadow: inset 0 0 0 1px var(--petrol); } /* taste-skill-ignore: selected option outline */
.payopt:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.note { font-size: var(--step-small); color: var(--soft); }
.pushbtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pushbtns [hidden] { display: none; } /* .btn sets display, which would beat the hidden attribute */
.note b { color: var(--ink); font-weight: 600; }
.instant { display: inline-flex; align-items: center; gap: 8px; font-size: var(--step-small); font-weight: 600; }
.instant::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--turq); }
.summary .btn { width: 100%; min-height: 52px; }
.empty { color: var(--soft); }

/* phone */
body > .bar { display: none; } /* the booking page's phone bar; the Today timeline has its own .bar */
@media (max-width: 960px) {
  .who .me, .who .avatar { display: none; }
  /* the tabs drop to a row of their own under the logo, scrolling sideways if they ever outgrow it; the booking page's .bar sits at the bottom */
  .shell { flex-wrap: wrap; gap: 14px 8px; padding: 14px 16px 2px; }
  .brand .mark { width: 34px; }
  .brand .word { width: 92px; }
  .tabs { order: 1; flex: 1 0 100%; overflow-x: auto; scrollbar-width: none; }
  .tabs a { flex: 1 0 auto; justify-content: center; padding: 0 14px; }
  .who { gap: 6px; }
  .who .lang, .who .acct, .who .signout .ghost { padding: 0 9px; font-size: 12.5px; }
  .canvas { grid-template-columns: 1fr; padding: 20px 16px 120px; }
  .titlerow { align-items: flex-start; }
  .rooms { display: flex; overflow-x: auto; scrollbar-width: none; margin-inline: -18px; padding-inline: 18px; padding-bottom: 16px; scroll-padding-inline: 18px; }
  .rooms button { flex: none; width: 168px; }
  .times { grid-template-columns: repeat(3, 1fr); }
  .summary, .next { grid-column: 1; grid-row: auto; position: static; }
  .next li { grid-template-columns: 1fr auto; }
  .next .what { grid-column: 1 / -1; grid-row: 2; }
  .next .paid { display: none; }
  body > .bar { position: fixed; inset-inline: 12px; bottom: 12px; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; padding-inline: 18px 10px; border-radius: 999px; background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow); }
  body > .bar small { display: block; font-size: .75rem; color: color-mix(in srgb, var(--on-primary) 70%, transparent); }
  body > .bar b { font-weight: 600; }
  body > .bar .btn { background: var(--aqua); color: var(--ink); min-height: 44px; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Arabic (html[lang="ar"], dir="rtl"): Alexandria as in English, taller lines, never letter-spacing (it breaks the joins) */
html[lang="ar"] * { letter-spacing: 0; }
html[lang="ar"] body { line-height: 1.75; }
html[lang="ar"] .avatar { font-size: var(--step-ui); }
html[lang="ar"] .who .me b { line-height: 1.4; }
html[lang="ar"] .titlerow h1 { line-height: 1.45; }
html[lang="ar"] .titlerow p { margin-top: 0; }
html[lang="ar"] .days button { width: 70px; min-height: 60px; line-height: 1.35; }
html[lang="ar"] .rooms button { line-height: 1.45; }
html[lang="ar"] .rooms button em { top: -10px; padding: 1px 10px; line-height: 18px; }
html[lang="ar"] .slot { min-height: 54px; line-height: 1.3; }
html[lang="ar"] .next li { grid-template-columns: 150px 1fr auto auto; }
html[lang="ar"] .when-big { font-size: 1.625rem; line-height: 1.35; }
html[lang="ar"] .when-big small { margin-top: 2px; }
html[lang="ar"] .stepper { flex-wrap: wrap; gap: 8px 10px; }
html[lang="ar"] .stepper button { flex: none; }
html[lang="ar"] .stepper span { flex-basis: 100%; }
html[lang="ar"] .payopt input { margin-top: 4px; }
@media (max-width: 960px) {
  html[lang="ar"] .next li { grid-template-columns: 1fr auto; }
}

/* sign-in */
.signin { max-width: 420px; margin: 40px auto 56px; padding: 32px 28px; display: grid; gap: 16px; }
.signin h1 { font-size: var(--step-title); font-weight: 700; line-height: 1.2; color: var(--primary); }
html[lang="ar"] .signin h1 { line-height: 1.45; }
@media (max-width: 480px) { .signin { margin: 20px 16px 40px; padding: 26px 20px; } }
.signin form { display: grid; gap: 16px; }
.signin label { display: grid; gap: 6px; font-weight: 500; }
.signin input:not([type="hidden"]) { min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--glass-2); transition: border-color .3s, box-shadow .4s var(--ease); }
.signin input:not([type="hidden"]):focus { outline: none; border-color: var(--aqua); box-shadow: 0 0 0 4px color-mix(in srgb, var(--aqua) 22%, transparent); }
.signin .err { color: var(--amber); font-weight: 500; }

/* practitioner sign-up (/join) */
.joinpage { max-width: 1180px; padding: 40px 24px 72px; gap: 28px; }
.joinpage h1 { font-weight: 700; line-height: 1.2; font-size: var(--step-title); color: var(--primary); }
.lede { margin-top: 8px; color: var(--soft); max-width: 52ch; }
.joinpage .panel { margin-top: 28px; }
.joinpage fieldset { border: 0; padding: 24px 26px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.joinpage fieldset:first-of-type { border-top: 0; }
.joinpage legend { float: left; width: 100%; grid-column: 1 / -1; font-weight: 650; font-size: 1.0625rem; color: var(--primary); margin-bottom: 2px; }
.joinpage legend span { display: block; font-weight: 400; font-size: var(--step-small); color: var(--soft); margin-top: 2px; }
.full { grid-column: 1 / -1; }

.field { display: grid; gap: 6px; align-content: start; }
.field > label, .field > .lbl { font-size: 13.5px; font-weight: 500; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="password"] { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--glass-2); font-size: 1rem; transition: border-color .3s, box-shadow .4s var(--ease); }
.field input:hover { border-color: var(--line-2); }
.field input:focus { border-color: var(--aqua); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--aqua) 22%, transparent), 0 10px 24px -16px rgba(16,58,72,.5); }
.help { font-size: var(--step-small); color: var(--soft); }
.err { font-size: var(--step-small); color: var(--red); font-weight: 500; }
.bad input[type="text"], .bad input[type="email"], .bad input[type="tel"], .bad input[type="password"] { border-color: var(--red); }

/* the phone number reads left to right in both languages */
.tel { display: flex; direction: ltr; }
.tel span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line); border-right: 0; border-radius: 13px 0 0 13px; background: color-mix(in srgb, var(--aqua) 12%, transparent); font-weight: 500; }
.tel input { border-radius: 0 13px 13px 0 !important; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-2); font-weight: 500; transition: background-color .2s, border-color .2s; }
.chips label:hover span { border-color: var(--aqua); }
.chips input:checked + span { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.chips input:focus-visible + span { outline: 2px solid var(--aqua-ink); outline-offset: 3px; }

.drop { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 18px; border: 1.5px dashed color-mix(in srgb, var(--aqua) 65%, transparent); border-radius: 15px; background: var(--glass-2); cursor: pointer; transition: background-color .2s, border-color .2s; }
.drop:hover, .drop.over { background: color-mix(in srgb, var(--aqua) 10%, transparent); border-color: var(--aqua); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop:focus-within { outline: 2px solid var(--aqua-ink); outline-offset: 3px; }
.thumb { width: 96px; height: 64px; border-radius: 11px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; color: var(--soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.drop b { display: block; }
.drop small { color: var(--soft); font-size: var(--step-small); }
.bad .drop { border-color: var(--red); }

.agree { display: flex; gap: 10px; align-items: flex-start; font-size: var(--step-small); cursor: pointer; }
.agree input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--petrol); flex: none; }
.send { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px 26px 26px; border-top: 1px solid var(--line); }
.send p { font-size: var(--step-small); color: var(--soft); }

.after { position: sticky; top: 24px; margin-top: 92px; padding: 28px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--aqua) 12%, var(--sheet-solid)); border: 1px solid color-mix(in srgb, var(--aqua) 32%, transparent); box-shadow: var(--shadow); color: var(--ink); }
.after h2 { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.3; color: var(--primary); }
.after ol { list-style: none; margin-top: 22px; display: grid; gap: 18px; counter-reset: s; }
.after li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; counter-increment: s; }
.after li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 600; font-size: var(--step-small); }
.after li b { display: block; font-weight: 600; }
.after li span { font-size: var(--step-small); color: var(--soft); }

.sent { padding: 30px 28px; display: grid; gap: 8px; }
.sent h2 { font-family: var(--display); font-weight: 700; font-size: 1.75rem; line-height: 1.3; color: var(--primary); }
.sent > p { color: var(--soft); }
.track { list-style: none; margin-top: 18px; display: grid; }
.track li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding-bottom: 22px; position: relative; }
.track li::before { content: ""; width: 14px; height: 14px; margin: 4px 7px 0; border-radius: 50%; border: 2px solid var(--line); background: var(--paper); z-index: 1; }
.track li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 13px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.track li.done::before { background: var(--aqua); border-color: var(--aqua); }
.track li.now::before { border-color: var(--primary); background: var(--primary); }
.track b { display: block; }
.track span { font-size: var(--step-small); color: var(--soft); }
.newphoto { display: grid; gap: 16px; margin-top: 12px; }

@media (max-width: 960px) {
  .joinpage { padding: 24px 16px 48px; gap: 0; }
  .joinpage fieldset { grid-template-columns: 1fr; padding: 20px 18px; }
  .send { padding: 20px 18px 22px; }
  .send .btn { width: 100%; }
  .after { position: static; margin-top: 20px; }
}
html[lang="ar"] .joinpage h1 { line-height: 1.35; }

/* shared bits the approvals mockup uses */
[hidden] { display: none !important; }
.ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); font-weight: 500; transition: background-color .3s, transform .38s cubic-bezier(.25, 1.3, .5, 1); }
.ghost:hover { background: var(--glass-2); }
.ghost:active { transform: scale(.95); }
.ghost.danger { color: var(--red); }
.pill { flex: none; white-space: nowrap; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--warn-bg); color: var(--warn); }

/* approvals (/staff/approvals) */
.canvas.approvals { grid-template-columns: 380px minmax(0, 1fr); }
.approvals .empty { padding: 28px 16px; text-align: center; color: var(--soft); }
.approvals .empty b { display: block; color: var(--ink); font-size: 1.0625rem; margin-bottom: 4px; }

.approvals .queue { padding: 8px; position: sticky; top: 20px; }
.approvals .queue ol { list-style: none; display: grid; gap: 2px; }
.approvals .queue li a { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r-md); text-decoration: none; }
.approvals .queue li a:hover { background: color-mix(in srgb, var(--aqua) 12%, transparent); }
.approvals .queue li a[aria-current="true"] { background: var(--turq-pale); }
.approvals .ini { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--aqua), var(--primary)); color: #fff; box-shadow: 0 0 0 3px var(--glass-2), 0 0 0 4px var(--line); display: grid; place-items: center; font-weight: 600; font-size: var(--step-small); }
.approvals .queue a[aria-current="true"] .ini { background: var(--paper); color: var(--primary); }
.approvals .queue b { display: block; font-weight: 600; line-height: 1.3; }
.approvals .sub { display: block; font-size: var(--step-small); color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.approvals .age { font-size: .75rem; color: var(--soft); text-align: end; white-space: nowrap; align-self: start; padding-top: 2px; }
.approvals .age.old { color: var(--amber); font-weight: 600; }

.approvals .detail { overflow: hidden; }
.approvals .dhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.approvals .dhead h2 { font-size: 1.375rem; font-weight: 700; line-height: 1.3; color: var(--primary); }
.approvals .dhead p { color: var(--soft); font-size: var(--step-small); margin-top: 2px; }
.approvals .dbody { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.approvals .photo { padding: 24px; border-inline-end: 1px solid var(--line); }
.approvals .lbl { font-size: var(--step-small); font-weight: 600; color: var(--soft); margin-bottom: 10px; }
.approvals .photo img { width: 100%; max-height: 420px; object-fit: contain; border-radius: 12px; background: var(--bg-2); }
.approvals .photo .tools { margin-top: 14px; font-size: var(--step-small); font-weight: 500; }
.approvals .photo .tools a { text-decoration: none; }
.approvals .photo .tools a:hover { text-decoration: underline; }
.approvals .facts { padding: 24px; display: grid; gap: 22px; align-content: start; }
.approvals .facts dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: var(--step-small); }
.approvals .facts dt { color: var(--soft); }
.approvals .facts dd { font-weight: 500; overflow-wrap: anywhere; }
.approvals .checks { display: grid; gap: 10px; }
.approvals .checks label { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.approvals .checks input { width: 18px; height: 18px; accent-color: var(--petrol); }

.approvals .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 18px 24px; border-top: 1px solid var(--line); }
.approvals .actions .btn { min-width: 160px; }
.approvals .actions .why { margin-inline-start: auto; font-size: var(--step-small); color: var(--soft); }

.approvals .reason { display: grid; gap: 12px; padding: 18px 24px 22px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--aqua) 7%, transparent); }
.approvals .reason h3 { font-size: var(--step-ui); font-weight: 600; }
.approvals .reason .chips span { min-height: 38px; padding: 0 14px; font-size: var(--step-small); }
.approvals .reason .chips input:checked + span { background: var(--primary); color: var(--on-primary); }
.approvals .notebox { display: grid; gap: 6px; font-size: var(--step-small); font-weight: 600; }
.approvals .notebox textarea { width: 100%; min-height: 84px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; resize: vertical; background: var(--glass-2); font: inherit; font-weight: 400; color: inherit; }
.approvals .notebox textarea:focus { outline: none; border-color: var(--aqua); box-shadow: 0 0 0 4px color-mix(in srgb, var(--aqua) 22%, transparent); }
.approvals .reason .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.approvals .reason .row small { color: var(--soft); font-size: var(--step-small); }

/* practitioners and the trust switch */
.approvals .plist { grid-column: 1 / -1; }
.approvals .plist header { padding: 20px 24px 8px; }
.approvals .plist h2 { font-size: 1.125rem; font-weight: 650; color: var(--primary); }
.approvals .plist header p { color: var(--soft); font-size: var(--step-small); }
.approvals .plist ul { list-style: none; padding: 0 24px 12px; }
.approvals .plist li { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: 16px; align-items: center; padding-block: 12px; border-top: 1px solid var(--line); }
.approvals .plist li b { display: block; font-weight: 600; }
.approvals .plist .state { font-size: var(--step-small); font-weight: 600; color: var(--soft); }
.approvals .plist .state.yes { color: var(--petrol); }
.approvals .plist .state.yes::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-inline-end: 8px; border-radius: 50%; background: var(--aqua); }

.appr-toast { position: fixed; inset-inline-start: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 16px; padding: 12px 12px 12px 20px; border-radius: 999px; background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow); font-size: var(--step-small); max-width: calc(100% - 32px); }
html[dir="rtl"] .appr-toast { transform: translateX(50%); padding: 12px 20px 12px 12px; }
.appr-toast button { padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.16); font-weight: 600; }
.appr-toast button:hover { background: rgba(255,255,255,.26); }

@media (max-width: 1100px) {
  .approvals .dbody { grid-template-columns: 1fr; }
  .approvals .photo { border-inline-end: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 960px) {
  .canvas.approvals { grid-template-columns: 1fr; }
  .approvals .queue { position: static; }
  .approvals .dhead, .approvals .photo, .approvals .facts { padding: 18px; }
  .approvals .actions, .approvals .reason { padding: 16px 18px; }
  .approvals .actions .btn, .approvals .actions .ghost { flex: 1 1 auto; }
  .approvals .actions .why { margin: 0; width: 100%; }
  .approvals .plist li { grid-template-columns: 1fr; gap: 8px; }
}
html[lang="ar"] .approvals .dhead h2 { line-height: 1.5; }
.sent .note { white-space: pre-line; } /* a status note keeps its paragraph break */

/* booking screen (/book): what booking.js adds beyond the mockup */
.booking .rooms button:disabled { opacity: .55; cursor: not-allowed; }
.booking .stepper button:disabled { opacity: .4; cursor: default; }
.booking .taken { display: grid; gap: 10px; justify-items: start; }
.booking #finding[hidden] { display: none; }
.booking .summary .btn:disabled { cursor: not-allowed; }

/* my bookings (/my-bookings): the .next rows above, with Cancel, a dialog and the highlight for fresh bookings */
.canvas.mybookings { grid-template-columns: minmax(0, 1fr); max-width: 960px; }
.mybookings .titlerow { align-items: center; }
.mybookings .notice { padding: 12px 18px; border-radius: 14px; background: var(--ok-bg); color: var(--ok); font-weight: 500; }
.mybookings .empty { padding: 18px; color: var(--soft); }
.mybookings .next header { padding-bottom: 10px; }
.mybookings .next li { grid-template-columns: 130px 1fr auto auto; padding-inline: 8px; margin-inline: -8px; border-radius: var(--r); }
.mybookings .what .rule { display: block; margin-top: 2px; padding: 0; border: 0; } /* not the settings .rule row */
.mybookings .paid { display: grid; gap: 4px; justify-items: end; }
.mybookings .st { font-style: normal; font-weight: 600; color: var(--petrol); }
.mybookings .st.pending { color: var(--amber); }
.mybookings .row.past { opacity: .7; }
.mybookings .row.fresh { background: color-mix(in srgb, var(--aqua) 14%, transparent); }
.mybookings .act .ghost { background: var(--glass-2); min-height: 40px; padding: 0 16px; font-size: var(--step-small); }
.mybookings .act .ghost:hover { background: rgba(255,255,255,.7); }
.mybookings dialog { width: min(440px, calc(100% - 32px)); margin: auto; padding: 24px; border: 1px solid var(--glass-edge); border-radius: var(--r-lg); background: var(--sheet-solid); color: var(--ink); box-shadow: var(--shadow); }
.mybookings dialog::backdrop { background: color-mix(in srgb, var(--bg-2) 78%, transparent); }
.mybookings dialog[open] { display: grid; gap: 10px; }
.mybookings dialog h2 { font-family: var(--display); font-weight: 650; font-size: 1.1875rem; line-height: 1.35; color: var(--primary); }
.mybookings .dlg-what { font-weight: 600; }
.mybookings dialog p { color: var(--soft); }
.mybookings dialog p.dlg-what { color: var(--ink); }
.mybookings dialog #dlgErr { color: var(--red); font-weight: 500; }
.mybookings .dlg-act { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 8px; }
@media (max-width: 960px) {
  .mybookings .next li, html[lang="ar"] .mybookings .next li { grid-template-columns: 1fr auto; row-gap: 6px; }
  .mybookings .when { grid-column: 1; grid-row: 1; }
  .mybookings .act { grid-column: 2; grid-row: 1; }
  .mybookings .what { grid-column: 1 / -1; grid-row: 2; }
  .mybookings .next .paid { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: flex-start; grid-column: 1 / -1; grid-row: 3; text-align: start; }
  .mybookings .dlg-act > * { flex: 1 1 auto; }
}

/* today (/staff/today): ported from today.html */
.canvas.today { max-width: 1480px; grid-template-columns: 420px minmax(0, 1fr); }
.canvas.today.solo { grid-template-columns: minmax(0, 1fr); }
.today .btn, .today .ghost { min-height: 40px; padding: 0 16px; font-size: var(--step-small); white-space: nowrap; text-decoration: none; }
.today .titlerow .btn { min-height: 46px; font-size: var(--step-ui); }
.today .titleacts { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.today .seg a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px; font-weight: 500; color: var(--soft); text-decoration: none; }
.today .seg a[aria-current="page"] { background: var(--primary); color: var(--on-primary); }
.daynav { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: var(--step-small); font-weight: 500; }
.daynav a { text-decoration: none; color: var(--petrol); }
.daynav a:hover { text-decoration: underline; }
.today form { display: contents; } /* an action is a form, laid out as its button */

/* now and next */
.now { padding: 6px 0 8px; }
.now h2 { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 20px 6px; font-size: var(--step-small); font-weight: 600; color: var(--soft); }
.now ol { list-style: none; margin-bottom: 4px; }
.now li { display: grid; grid-template-columns: 72px 1fr; gap: 4px 14px; padding: 12px 20px; border-top: 1px solid var(--line); }
.now h2 + ol li:first-child { border-top: 0; }
.now .t { font-weight: 600; line-height: 1.3; white-space: nowrap; }
.now .t small { display: block; font-weight: 400; font-size: .75rem; color: var(--soft); }
.now .who2 b { display: block; font-weight: 600; line-height: 1.3; }
.now .who2 span { font-size: var(--step-small); color: var(--soft); }
.now .flag { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 9px; line-height: 1.3; margin-top: 4px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--warn-bg); color: var(--amber); }
.now .flag.wait { background: var(--line); color: var(--soft); }
.now .acts { grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.now li.attn { background: color-mix(in srgb, var(--warn-bg) 45%, transparent); }
.now .none { padding: 4px 20px 14px; }
.side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* day plan: rooms down, hours across */
.plan header { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px 4px; }
.plan h2 { font-size: 1rem; font-weight: 600; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .75rem; color: var(--soft); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 22px; height: 10px; border-radius: 3px; }
.scroll { overflow-x: auto; padding: 10px 20px 18px; }
.tl { --lab: 150px; position: relative; display: grid; grid-template-columns: var(--lab) 1fr; min-width: 880px; }
.tl .hours { grid-column: 2; position: relative; height: 24px; }
.tl .hours span { position: absolute; transform: translateX(-50%); font-size: .75rem; color: var(--soft); white-space: nowrap; }
.tl .hours span:first-child { transform: none; }
.tl .rm { height: 44px; display: flex; flex-direction: column; justify-content: center; border-top: 1px solid var(--line); line-height: 1.25; }
.tl .rm b { font-weight: 600; font-size: var(--step-small); }
.tl .rm span { font-size: .75rem; color: var(--soft); }
.tl .rm.out span { color: var(--amber); }
.tl .lane { position: relative; height: 44px; border-top: 1px solid var(--line); background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / var(--cols))); } /* taste-skill-ignore: hour gridlines, not a fill */
.tl .bar { position: absolute; top: 11px; height: 22px; border-radius: 7px; padding: 0 8px; font-size: .75rem; font-weight: 600; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: start; z-index: 1; transition: transform .15s var(--ease); }
.tl .bar:is(.k-pending, .k-attn, .k-noshow, .k-block) { line-height: 20px; } /* they have a border */
.tl .bar:hover { transform: translateY(-1px); outline: 2px solid var(--aqua); outline-offset: 1px; }
/* a free run: hovering shows where a click books */
.tl .gap { position: absolute; top: 11px; height: 22px; border-radius: 4px; }
.tl .gap:hover, .tl .gap:focus-visible { border: 1px dashed var(--aqua); background: color-mix(in srgb, var(--aqua) 14%, transparent); }
.k-done { background: var(--taken); color: var(--ink-3); }
.k-in { background: var(--primary); color: var(--on-primary); }
.k-next { background: var(--turq-pale); color: var(--petrol); }
.k-pending { background: var(--paper); border: 1px dashed var(--petrol); color: var(--petrol); }
.k-attn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--amber); }
.k-noshow { background: repeating-linear-gradient(135deg, var(--line-2) 0 1px, transparent 1px 5px); border: 1px solid var(--line-2); color: var(--ink-3); } /* taste-skill-ignore: hatch marks a no-show */
.k-block { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--primary) 8%, transparent) 0 6px, transparent 6px 12px); border: 1px solid var(--line-2); color: var(--soft); } /* taste-skill-ignore: stripes mark house time */
/* the lane runs left to right in both languages; the label column sits on the start side */
.nowline { position: absolute; top: 24px; bottom: 0; width: 2px; margin-left: -1px; left: calc(var(--lab) + (100% - var(--lab)) * var(--at)); background: var(--aqua); pointer-events: none; z-index: 2; }
html[dir="rtl"] .nowline { left: calc((100% - var(--lab)) * var(--at)); }
.nowline span { position: absolute; top: -22px; left: 0; transform: translateX(-50%); padding: 1px 6px; border-radius: 4px; background: var(--primary); color: var(--on-primary); font-size: .6875rem; font-weight: 600; white-space: nowrap; }

/* the popover a bar or a free run opens (native popover: the browser shows, hides and centres it) */
.pop { margin: auto; width: 300px; padding: 16px 18px 18px; border-radius: var(--r-md); background: var(--sheet-solid); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); } /* taste-skill-ignore: floating popover needs to lift off the plan */
.pop:popover-open { display: grid; gap: 10px; }
.pop h3 { font-size: 1rem; font-weight: 600; line-height: 1.3; padding-inline-end: 28px; }
.pop .sub { font-size: var(--step-small); color: var(--soft); margin-top: -6px; }
.pop .state { font-size: var(--step-small); font-weight: 500; }
.pop .state.amber { color: var(--amber); }
.pop .acts, .pop .cash { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pop .acts:empty { display: none; }
.pop .cancel { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.pop .cancel summary { cursor: pointer; font-size: var(--step-small); font-weight: 500; color: var(--soft); }
.pop .cancel summary:hover, .pop .cancel[open] summary { color: var(--ink); }
/* decline: a step beside Confirm (popover and waiting list); open, it takes the whole row */
.decide summary { list-style: none; cursor: pointer; }
.decide summary::-webkit-details-marker { display: none; }
.decide[open] { display: grid; gap: 8px; justify-items: start; flex-basis: 100%; }
.decide .state { font-size: var(--step-small); font-weight: 500; }
.pop .x { position: absolute; top: 10px; inset-inline-end: 10px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--soft); }
.pop .x:hover { background: color-mix(in srgb, var(--aqua) 12%, transparent); color: var(--ink); }
.prog { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--aqua), var(--primary)); border-radius: 3px; }
.over .prog i, .pop .prog.over i { background: var(--warn-line); }

/* rooms right now: one tile per room */
.board header { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 20px 4px; }
.board h2 { font-size: 1rem; font-weight: 600; }
.board header span { font-size: var(--step-small); color: var(--soft); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); grid-auto-rows: 1fr; gap: 10px; padding: 12px 20px 20px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--glass-edge); background: linear-gradient(180deg, rgba(255,255,255,.35), transparent 60%), var(--glass-2); box-shadow: var(--shadow-sm); }
.tile .rn { font-size: .75rem; font-weight: 600; color: var(--soft); }
.tile b { font-weight: 600; line-height: 1.3; }
.tile .meta { font-size: var(--step-small); color: var(--soft); }
.tile .btn, .tile .ghost { margin-top: auto; align-self: flex-start; min-height: 36px; }
.tile.busy { background: color-mix(in srgb, var(--aqua) 7%, transparent); }
.tile.over, .tile.late { background: color-mix(in srgb, var(--warn-bg) 45%, transparent); border-color: var(--warn-line); }
.tile.over .meta, .tile.late .meta { color: var(--amber); font-weight: 500; }
.tile.out { background: var(--line); }

@media (max-width: 1100px) {
  .canvas.today { grid-template-columns: 1fr; }
  .inroom { order: -1; } /* on one column, who is in a room comes before the day plan */
}
@media (max-width: 960px) {
  .today .titleacts, .today .titlerow .btn { width: 100%; }
  .now li { padding: 12px 16px; }
  .now h2 { padding-inline: 16px; }
  .scroll { padding-inline: 16px; }
  .tl { --lab: 120px; }
  .tiles { grid-template-columns: 1fr 1fr; padding-inline: 16px; }
  .pop:popover-open { inset: auto 12px 12px; width: auto; margin: 0; }
}
html[lang="ar"] .now li { grid-template-columns: 84px 1fr; }
html[lang="ar"] .tl .rm { line-height: 1.4; }

/* add a house block (/staff/blocks/new) */
.canvas.blockpage { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
.blockpage form { display: grid; gap: 20px; padding: 26px; }
.blockpage .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.blockpage select, .blockpage input[type="date"] { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--glass-2); font-size: 1rem; }
.blockpage select:focus, .blockpage input[type="date"]:focus { border-color: var(--aqua); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--aqua) 22%, transparent); }
.blockpage .agree span { display: grid; gap: 2px; }
.blockpage .send { padding: 0; border-top: 0; }
.blockpage .ghost { text-decoration: none; }
.blockpage .pay { display: grid; gap: 10px; border: 0; padding: 0; margin: 0; min-width: 0; }
.blockpage .pay legend { font-size: var(--step-small); font-weight: 600; padding: 0; margin-bottom: 6px; }
.blockpage .field > .ghost { justify-self: start; }
/* the one-time password link to hand over (/staff/password-link) */
.linkbox { display: grid; gap: 16px; padding: 26px; }
.linkbox .acts { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* settings (/staff/settings/*): area menu, then one view */
.canvas.settings { max-width: 1320px; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
.settingsnav { position: sticky; top: 24px; display: grid; gap: 16px; }
.areas { display: grid; gap: 2px; }
.areas a { display: block; padding: 10px 14px; border-radius: 14px; text-decoration: none; font-weight: 500; color: var(--soft); }
.areas a:hover { background: var(--glass-2); color: var(--ink); }
.areas a[aria-current="page"] { background: var(--sheet); color: var(--primary); font-weight: 600; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--glass-edge); }
.areas small { display: block; font-weight: 400; font-size: var(--step-small); color: var(--soft); }
.branchsw { display: flex; padding: 4px; background: var(--glass-2); border: 1px solid var(--glass-edge); border-radius: 999px; box-shadow: inset 0 1px 0 var(--glass-edge); }
.branchsw a { flex: 1; min-height: 36px; display: grid; place-items: center; padding: 0 10px; border-radius: 999px; text-decoration: none; font-size: var(--step-small); font-weight: 500; color: var(--soft); text-align: center; }
.branchsw a[aria-current="true"] { background: var(--primary); color: var(--on-primary); }
.viewhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.viewhead h1 { font-family: var(--display); font-weight: 700; font-size: var(--step-title); line-height: 1.15; color: var(--primary); }
.viewhead .lede { margin-top: 4px; }
.settings .field input[type="number"] { width: 110px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--glass-2); font-size: 1rem; }
.settings .field input[type="number"]:focus { border-color: var(--aqua); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--aqua) 22%, transparent); }
.settings .bad input[type="number"] { border-color: var(--red); }
.settings .unit { display: flex; align-items: center; gap: 10px; color: var(--soft); }
.housepanel { max-width: 640px; }
.housepanel .field { padding: 20px 20px 0; }
.housepanel .field:first-of-type { padding-top: 24px; }
.housepanel .field:last-of-type { padding-bottom: 20px; }
.housepanel .savebar { border-top: 1px solid var(--line); }
.housepanel h2 { margin-top: 24px; padding: 20px 20px 0; border-top: 1px solid var(--line); font-size: var(--step-small); font-weight: 650; color: var(--primary); }
.housepanel h2 ~ .field { padding-bottom: 20px; }
.settings .field input[type="text"] { max-width: 420px; }

.savebar { position: sticky; bottom: 0; background: var(--sheet-solid); box-shadow: inset 0 1px 0 var(--glass-edge); border-radius: 0 0 var(--r-lg) var(--r-lg); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); }
.savebar p { font-size: var(--step-small); color: var(--soft); }
.savebar p b { color: var(--ink); }
.savebar .acts { display: flex; gap: 8px; }

/* a form beside a preview of what a practitioner sees */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.panel.preview { position: sticky; top: 24px; padding: 20px; display: grid; gap: 14px; }
.panel.preview h2 { font-size: var(--step-small); font-weight: 600; color: var(--soft); }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--step-small); white-space: nowrap; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { width: 32px; height: 20px; border-radius: 999px; background: color-mix(in srgb, var(--primary) 26%, var(--sheet-solid)); position: relative; transition: background-color .2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.switch input:checked + i { background: var(--petrol); }
.switch input:checked + i::after { transform: translateX(12px); }
html[dir="rtl"] .switch input:checked + i::after { transform: translateX(-12px); }
.switch input:focus-visible + i { outline: 2px solid var(--aqua-ink); outline-offset: 3px; }

@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr; }
  .panel.preview { position: static; }
}
@media (max-width: 960px) {
  .canvas.settings { grid-template-columns: 1fr; padding: 20px 16px 48px; gap: 16px; }
  .settingsnav { position: static; }
  .areas { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .areas a { flex: none; padding: 8px 14px; border-radius: 999px; }
  .areas small { display: none; }
  .viewhead h1 { font-size: 1.5rem; }
}
html[lang="ar"] .viewhead h1 { line-height: 1.35; }

/* rooms and prices */
.flash { margin-top: 8px; color: var(--petrol); font-weight: 600; }
.prices { width: 100%; border-collapse: collapse; }
.prices th { font-size: var(--step-small); font-weight: 500; color: var(--soft); text-align: start; padding: 14px 12px 8px; }
.prices th.num, .prices td.num { text-align: end; }
.prices td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.prices tr > :first-child { padding-inline-start: 20px; }
.prices tr > :last-child { padding-inline-end: 20px; }
.prices .rn b { display: block; font-weight: 600; }
.prices .rn > span { font-size: var(--step-small); color: var(--soft); }
.prices tr.off .rn b, .prices tr.off .rn > span { opacity: .55; }
.prices tr.sel { background: color-mix(in srgb, var(--aqua) 7%, transparent); }
.money { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.money input { width: 92px; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass-2); text-align: end; font-variant-numeric: tabular-nums; font-weight: 500; }
.money input:hover { border-color: var(--line-2); }
.money input:focus { outline: none; border-color: var(--aqua); box-shadow: 0 0 0 4px color-mix(in srgb, var(--aqua) 22%, transparent); }
.money span { font-size: var(--step-small); color: var(--soft); }
.cell-sub { display: block; font-size: var(--step-small); color: var(--soft); margin-top: 3px; min-height: 1.2em; }
.changed input { border-color: var(--petrol); background: var(--turq-pale); }
.changed .cell-sub { color: var(--petrol); font-weight: 600; }
td.bad input, .why.bad input { border-color: var(--red); }
td.bad .cell-sub, .why.bad .cell-sub { color: var(--red); font-weight: 600; }
.prices .st { min-width: 190px; }
.prices .switch .off { display: none; }
.prices .switch input:not(:checked) ~ .off { display: inline; }
.prices .switch input:not(:checked) ~ .on { display: none; }
.why { margin-top: 8px; }
.why input { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass-2); }
.st:has(input[type="checkbox"]:checked) .why { display: none; }
.cell-sub.ahead { min-height: 0; }
.edit { margin-top: 6px; font-size: var(--step-small); }
.edit summary { cursor: pointer; color: var(--soft); width: fit-content; }
.edit summary:hover { color: var(--ink); }
.edit[open] { display: grid; gap: 10px; padding-block: 8px; }
.edit[open] summary { margin-bottom: 4px; }
.edit .field input[type="text"] { min-height: 40px; max-width: 320px; }
.edit .field.bad input { border-color: var(--red); }
.preview .dcard { padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--primary); background: var(--turq-pale); box-shadow: inset 0 0 0 1px var(--primary); line-height: 1.3; }
.preview .dcard b { display: block; font-weight: 600; }
.preview .dcard span { display: block; font-size: var(--step-small); color: var(--soft); }
.preview .eg { font-size: var(--step-small); margin-top: 10px; }
.preview .eg div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.preview .eg div:first-child { border-top: 0; }
.preview .eg span:last-child { font-weight: 600; }
.preview .note { font-size: var(--step-small); color: var(--soft); margin-top: 10px; }
@media (max-width: 860px) {
  /* the price table becomes one card per room */
  .prices thead { display: none; }
  .prices tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
  .prices td { border: 0; padding: 0 !important; }
  .prices td.rn, .prices td.st { grid-column: 1 / -1; }
  .prices td.num { text-align: start; }
  .prices td.num::before { content: attr(data-label); display: block; font-size: .75rem; color: var(--soft); margin-bottom: 4px; }
  .money { justify-content: flex-start; }
  .money input { width: 100%; }
}

/* branch rules */
.rules { display: grid; }
.rule { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: center; padding: 18px 20px; border-top: 1px solid var(--line); }
.rule:first-child { border-top: 0; }
.rule b { font-weight: 600; }
.rule p { grid-column: 1; font-size: var(--step-small); color: var(--soft); }
.rule p.err { color: var(--red); font-weight: 500; }
.rule .ctl { grid-row: 1 / span 4; grid-column: 2; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.rule select { min-height: 40px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--glass-2); }
.rule select:focus-visible { outline: 2px solid var(--petrol); outline-offset: 2px; }
.wkdays { display: flex; gap: 4px; }
.wkdays label { cursor: pointer; position: relative; }
.wkdays input { position: absolute; opacity: 0; pointer-events: none; }
.wkdays span { display: grid; place-items: center; min-width: 40px; height: 36px; padding: 0 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-2); font-size: .75rem; font-weight: 600; }
.wkdays input:checked + span { background: var(--primary); color: var(--on-primary); }
.wkdays input:focus-visible + span { outline: 2px solid var(--petrol); outline-offset: 2px; }
.strip { display: grid; gap: 8px; }
.strip .track { position: relative; height: 28px; border-radius: 10px; background: var(--line); overflow: hidden; }
.strip .track i { position: absolute; top: 0; bottom: 0; }
.strip .open { background: var(--turq-pale); }
.strip .eve { background: var(--aqua); }
.strip .ticks { display: flex; justify-content: space-between; font-size: .6875rem; color: var(--soft); }
.sentence { font-size: var(--step-small); line-height: 1.55; }
.sentence b { font-weight: 600; }
@media (max-width: 640px) {
  .rule { grid-template-columns: 1fr; }
  .rule .ctl { grid-row: auto; grid-column: 1; justify-content: flex-start; }
}

/* packages */
div.flash { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
div.flash .ghost { min-height: 32px; padding: 0 14px; }
.pk td { vertical-align: middle; }
.pk .st { min-width: 0; }
.saletoggle { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; font-size: var(--step-small); white-space: nowrap; cursor: pointer; }
.saletoggle i { width: 32px; height: 20px; border-radius: 999px; background: color-mix(in srgb, var(--primary) 26%, var(--sheet-solid)); position: relative; transition: background-color .2s; flex: none; }
.saletoggle i::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.saletoggle[aria-checked="true"] i { background: var(--petrol); }
.saletoggle[aria-checked="true"] i::after { transform: translateX(12px); }
html[dir="rtl"] .saletoggle[aria-checked="true"] i::after { transform: translateX(-12px); }
.saletoggle:focus-visible { outline: 2px solid var(--petrol); outline-offset: 2px; border-radius: 8px; }
.newpk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: end; padding: 18px 20px 20px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--aqua) 7%, transparent); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.newpk h3 { grid-column: 1 / -1; font-size: var(--step-ui); font-weight: 600; }
.newpk .field { font-size: var(--step-small); }
.newpk .field select, .newpk .field input[type="number"] { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--glass-2); font-size: var(--step-ui); font-weight: 400; }
.newpk .field select:focus-visible, .newpk .field input[type="number"]:focus { outline: 2px solid var(--petrol); outline-offset: 2px; box-shadow: none; }
.newpk .field.bad select, .newpk .field.bad input[type="number"] { border-color: var(--red); }
.pkcard { padding: 16px; border-radius: var(--r-md); background: color-mix(in srgb, var(--aqua) 12%, var(--sheet-solid)); border: 1px solid color-mix(in srgb, var(--aqua) 32%, transparent); color: var(--ink); display: grid; gap: 4px; }
.pkcard b { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.3; color: var(--primary); }
.pkcard span { font-size: var(--step-small); color: var(--soft); }
@media (max-width: 860px) {
  .newpk { grid-template-columns: 1fr 1fr; padding: 16px; }
  .pk tr > td.st { grid-column: 1 / -1; }
}

/* my packages and the offers on sale */
.mypk { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mypk li { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--glass-edge); background: var(--glass-2); border-radius: var(--r-md); }
.mypk li.past { opacity: .65; }
.mypk span { font-size: var(--step-small); color: var(--soft); }
.pkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-block: 8px 16px; }

/* staff */
.staff td { vertical-align: middle; }
.staff td.num { text-align: start; }
.staff select { min-height: 40px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--glass-2); }
.staff select:focus-visible { outline: 2px solid var(--petrol); outline-offset: 2px; }
.staff tr.gone td:not(.st) { color: var(--soft); }
.staff tr.gone .rn b { opacity: .55; }
.staff .st form { display: inline-block; }
.staff .edit form { display: grid; gap: 8px; justify-items: start; }
.newstaff .field input[type="text"], .newstaff .field input[type="email"] { min-height: 40px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 12px; font-size: var(--step-ui); }
.newstaff .field.bad input { border-color: var(--red); }
.newstaff .note { grid-column: 1 / -1; font-size: var(--step-small); color: var(--soft); }
.newstaff { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, .8fr) minmax(12rem, 1.1fr) auto auto; } /* the branch column fits "Continental Gardens" */
.newstaff .switch { min-height: 40px; }
.staff + .note { padding: 10px 20px 14px; }
@media (max-width: 860px) {
  .staff tr > td.st { grid-column: 1 / -1; }
  .newstaff { grid-template-columns: 1fr 1fr; }
}
