/* availo — the owner dashboard (part of the booking system every client copy shares). Same brand as the availo website:
   an ink sidebar, "available green" for what's open and confirmed, sunny yellow for what's waiting on you. */

@font-face {
  font-family: "Anybody";
  src: url("fonts/anybody-latin.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 50% 150%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Anybody";
  src: url("fonts/anybody-latin-ext.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 50% 150%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face { font-family: "Readex Pro"; src: url("fonts/readexpro-arabic.woff2") format("woff2"); font-weight: 160 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFC; }

/* layout: ink sidebar + paper workspace on desktop; on phones the sidebar becomes a bottom tab bar
   and side panels become full-screen sheets */
:root {
  --paper: oklch(0.972 0.008 155);      /* the workspace */
  --surface: oklch(1 0 0);
  --ink: oklch(0.17 0 0);
  --ink-2: oklch(0.26 0 0);
  --muted: oklch(0.46 0.012 155);
  --line: oklch(0.885 0.012 155);
  --brand: #A8E6BF;                     /* open, confirmed, available */
  --brand-ink: #17784A;
  --tint: #E4F6EA;
  --signal: #1FAF5E;
  --sun: #F6DA6E;                       /* waiting on you */
  --sun-tint: #FBF0C4;
  --sun-ink: oklch(0.42 0.09 85);
  --plum: oklch(0.48 0.12 350);         /* no-show, delete */
  --plum-tint: oklch(0.95 0.025 350);
  --closed: oklch(0.94 0.006 155);
  --font: "Anybody", "Readex Pro", "Arial Narrow", Arial, sans-serif;
  --r-s: 10px; --r-m: 16px; --r-l: 22px;
  --pad: clamp(16px, 3vw, 36px);
  --shadow: 0 1px 2px oklch(0 0 0 / 0.05), 0 10px 30px -14px oklch(0 0 0 / 0.22);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; font-family: var(--font); font-size: 1rem; line-height: 1.5; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
body.has-drawer { overflow: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand-ink); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
code { padding: 1px 6px; border-radius: 6px; background: var(--tint); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85em; overflow-wrap: anywhere; }

.boot { display: grid; place-content: center; justify-items: center; gap: 16px; min-height: 100vh; padding: 24px; color: var(--muted); font-weight: 700; text-align: center; }
.boot p { max-width: 44ch; }
.notice.notice--demo { border-color: color-mix(in srgb, var(--sun-ink) 40%, transparent); background: var(--sun-tint); }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 0 20px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--surface);
  font-weight: 800; font-stretch: 90%; text-decoration: none; white-space: nowrap;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn--small { min-height: 38px; padding: 0 15px; font-size: 0.875rem; }
.btn--line { background: transparent; color: var(--ink); }
.btn--ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn--ghost:hover:not(:disabled) { border-color: var(--ink); }
.btn--danger { border-color: var(--plum); background: var(--plum); color: #fff; }
.sym { font-family: system-ui, "Segoe UI", Arial, sans-serif; font-weight: 700; font-stretch: 100%; }
.btn .sym { font-size: 1.3em; line-height: 0; }
.icon-btn { font-family: system-ui, "Segoe UI", Arial, sans-serif; display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border: 1.5px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 1.1rem; font-weight: 800; line-height: 1; }
.icon-btn:hover:not(:disabled) { border-color: var(--ink); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.textlink { padding: 0; border: 0; background: none; font-weight: 700; font-size: 0.875rem; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.textlink:hover { color: var(--brand-ink); }
.textlink.danger { color: var(--plum); }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 0.8125rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.chip:hover { border-color: var(--ink); }
.tag { margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; background: var(--tint); color: var(--brand-ink); font-style: normal; font-size: 0.75rem; font-weight: 800; }

/* -------------------------------------------------------------- logo */
.logo { display: inline-flex; align-items: flex-end; gap: 2px; font-size: 1.75rem; font-weight: 900; font-stretch: 72%; letter-spacing: -0.02em; line-height: 1; text-decoration: none; }
.logo-dot { width: 0.24em; height: 0.24em; margin-bottom: 0.1em; border-radius: 50%; background: var(--signal); }

/* ------------------------------------------------------------- forms */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label { font-weight: 700; font-size: 0.875rem; }
.opt { color: var(--muted); font-weight: 500; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  width: 100%; min-height: 44px; padding: 0 12px;
  border: 1.5px solid var(--line); border-radius: var(--r-s); background-color: var(--surface);
  font-size: 0.9375rem;
}
textarea { padding: 10px 12px; resize: vertical; line-height: 1.45; }
select {
  padding-inline-end: 34px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-repeat: no-repeat; background-position: right 12px center; background-size: 10px 7px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23222' stroke-width='1.7'/%3E%3C/svg%3E");
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 60%, transparent); }
.unit { display: flex; align-items: center; gap: 10px; }
.unit input { max-width: 9rem; }
.unit span { color: var(--muted); font-size: 0.9375rem; }
.hint { color: var(--muted); font-size: 0.8125rem; line-height: 1.4; }
.form-err { color: var(--plum); font-size: 0.875rem; font-weight: 700; }
.form-err:empty { display: none; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.fine { color: var(--muted); font-size: 0.8125rem; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; }
.switch input { position: absolute; left: 0; top: 50%; translate: 0 -50%; opacity: 0; width: 40px; height: 24px; margin: 0; cursor: pointer; }
.switch-ui { position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px; background: oklch(0.82 0.01 155); transition: background-color 160ms ease; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px oklch(0 0 0 / 0.3); transition: transform 160ms ease; }
.switch input:checked + .switch-ui { background: var(--brand-ink); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--brand-ink); outline-offset: 2px; }

/* ------------------------------------------------------ sign-in pages */
.auth { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; background: var(--brand); }
.auth-card { width: min(100%, 440px); padding: clamp(24px, 5vw, 40px); border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow); }
.auth-card .logo { margin-bottom: 22px; }
.auth-biz { margin: -10px 0 10px; font-size: 1.125rem; font-weight: 800; overflow-wrap: anywhere; }
.auth-biz + h1 { margin-top: 0; }
.auth-card h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.4rem); font-weight: 900; font-stretch: 70%; line-height: 1.02; text-wrap: balance; }
.auth-card .lead { margin-top: 8px; color: var(--muted); }
.auth-card .form { margin-top: 22px; }
.auth-card .btn { justify-self: start; }
.auth-card .fine { margin-top: 20px; }

/* ---------------------------------------------------------- the shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 26px;
  padding: 24px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  background: var(--ink); color: var(--surface);
}
.side .logo { padding: 0 10px; color: var(--surface); }
.side-biz { margin-top: -16px; padding: 0 10px; color: oklch(0.85 0 0); font-size: 0.9375rem; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.bar-title { min-width: 0; }
.bar-biz { display: none; }
.nav { display: grid; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: oklch(0.8 0 0); font-weight: 700; text-decoration: none; }
.nav a:hover { background: var(--ink-2); color: var(--surface); }
.nav a[aria-current="page"] { background: var(--brand); color: var(--ink); }
.nav svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-count { margin-inline-start: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--sun); color: var(--ink); font-size: 0.75rem; font-weight: 900; text-align: center; }
.side-foot { display: grid; gap: 12px; margin-top: auto; padding: 0 10px; font-size: 0.875rem; }
.side-site { color: oklch(0.8 0 0); font-weight: 700; text-decoration: none; font-family: var(--font); }
.side-site:hover { color: var(--surface); }
.live { display: inline-flex; align-items: center; gap: 8px; color: oklch(0.65 0 0); font-weight: 700; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: oklch(0.5 0 0); }
.live.on { color: var(--brand); }
.live.on i { background: var(--signal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal) 30%, transparent); }

.main { min-width: 0; padding: 0 var(--pad) 72px; }
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 calc(var(--pad) * -1) 22px; padding: 18px var(--pad) 14px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); font-weight: 900; font-stretch: 68%; line-height: 1; letter-spacing: -0.01em; }
.bar-end { display: flex; gap: 8px; }

.notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 20px; padding: 14px 18px; border: 1.5px solid color-mix(in srgb, var(--brand-ink) 35%, transparent); border-radius: var(--r-m); background: var(--tint); }
.notice p { flex: 1 1 320px; min-width: 0; }
.notice-acts { display: flex; gap: 8px; }

/* ----------------------------------------------------------- bookings */
.overview { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
.next { display: grid; align-content: start; gap: 10px; padding: 22px 24px 24px; border-radius: var(--r-l); background: var(--brand); }
.next-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.next-label { font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.next-flag { padding: 3px 10px; border-radius: 999px; background: var(--sun); font-size: 0.8125rem; font-weight: 800; }
.next-in { margin-inline-start: auto; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: var(--brand); font-size: 0.8125rem; font-weight: 800; white-space: nowrap; }
.next-when { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.next-when span { font-size: 1.25rem; font-weight: 800; font-stretch: 80%; }
.next-when b { font-size: clamp(3rem, 2rem + 4vw, 4.6rem); font-weight: 900; font-stretch: 62%; line-height: 0.9; letter-spacing: -0.02em; }
.next-who { display: grid; }
.next-who b { font-size: 1.25rem; font-weight: 800; }
.next-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; padding-top: 18px; border-top: 2px dashed oklch(0.17 0 0 / 0.22); }
.next .btn--line { border-color: var(--ink); }
.next-none { max-width: 34ch; font-size: 1.125rem; font-weight: 700; }

.counts { display: grid; grid-template-rows: repeat(3, 1fr); gap: 10px; }
.counts > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.counts dt { font-weight: 700; color: var(--muted); }
.counts dd { font-size: 2rem; font-weight: 900; font-stretch: 70%; line-height: 1; }
.counts .warn { border-color: color-mix(in srgb, var(--sun-ink) 35%, var(--line)); background: var(--sun-tint); }
.counts .warn dt { color: var(--sun-ink); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 6px; }
.toolbar > .muted { flex: 1 1 280px; }
[data-view="services"] .toolbar, [data-view="clients"] .toolbar { margin-top: 0; }
.seg { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.seg span { display: block; padding: 7px 16px; border-radius: 999px; font-weight: 800; font-size: 0.9375rem; color: var(--muted); }
.seg input:checked + span { background: var(--ink); color: var(--surface); }
.seg input:focus-visible + span { outline: 3px solid var(--brand-ink); outline-offset: 2px; }
.search { flex: 0 1 340px; min-width: 0; }
.search input { border-radius: 999px; padding: 0 16px; }

.day { margin-top: 24px; }
.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 4px 10px; border-bottom: 2px solid var(--ink); font-size: 1.125rem; font-weight: 900; font-stretch: 78%; }
.day-head small { color: var(--muted); font-size: 0.875rem; font-weight: 700; font-stretch: 100%; white-space: nowrap; }
.row { display: grid; grid-template-columns: 4.8rem minmax(0, 1fr) auto; align-items: center; gap: 10px 16px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.row.is-fresh { background: linear-gradient(90deg, color-mix(in srgb, var(--sun) 45%, transparent), transparent 70%); }
.row-time { display: grid; font-size: 1.5rem; font-weight: 900; font-stretch: 66%; line-height: 1; }
.row-time small { margin-top: 4px; color: var(--muted); font-size: 0.75rem; font-weight: 700; font-stretch: 100%; }
.row-main { display: grid; min-width: 0; padding: 4px 0; text-decoration: none; }
.row-main b { font-size: 1.0625rem; font-weight: 800; overflow-wrap: anywhere; }
.row-main:hover b { text-decoration: underline; text-underline-offset: 3px; }
.row-main > span { color: var(--muted); font-size: 0.9375rem; overflow-wrap: anywhere; }
.lang { color: var(--brand-ink); font-weight: 700; }
.by-client { color: var(--plum); font-weight: 700; }
.just-in { margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; background: var(--ink); color: var(--brand); font-style: normal; font-size: 0.75rem; font-weight: 800; vertical-align: 2px; }
.row-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.row.s-cancelled .row-time, .row.s-cancelled .row-main { opacity: 0.5; }
.row.s-cancelled .row-main b { text-decoration: line-through; }

.status select, .status-select {
  width: auto; min-height: 34px; padding: 0 30px 0 12px; border: 1.5px solid transparent; border-radius: 999px;
  background-color: var(--tint); background-position: right 11px center; font-weight: 800; font-size: 0.8125rem;
}
.status-select { min-height: 44px; font-size: 0.9375rem; justify-self: start; }
.s-new .status select, .status-select.s-new { background-color: var(--sun); }
.s-confirmed .status select, .status-select.s-confirmed { background-color: var(--tint); color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand-ink) 35%, transparent); }
.s-done .status select, .status-select.s-done { background-color: oklch(0.93 0 0); }
.s-noshow .status select, .status-select.s-noshow { background-color: var(--plum-tint); color: var(--plum); }
.s-cancelled .status select, .status-select.s-cancelled { background-color: var(--surface); border-color: var(--line); color: var(--muted); }

.empty { margin-top: 24px; padding: 34px 20px; border: 2px dashed var(--line); border-radius: var(--r-l); color: var(--muted); font-weight: 700; text-align: center; list-style: none; }
.warn-line { padding: 12px 16px; border-radius: var(--r-m); background: var(--sun-tint); color: var(--sun-ink); font-weight: 700; list-style: none; }

/* ------------------------------------------------------------ calendar */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 14px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-title { font-size: 1.25rem; font-weight: 900; font-stretch: 75%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 0 auto; padding: 0; list-style: none; color: var(--muted); font-size: 0.8125rem; font-weight: 700; }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; }
.legend .s-new { background: var(--sun); }
.legend .s-confirmed { background: var(--brand); }
.legend .s-done { background: oklch(0.88 0 0); }
.legend .closed { background: repeating-linear-gradient(-45deg, var(--closed) 0 3px, oklch(0.89 0.006 155) 3px 6px); border: 1px solid var(--line); }
.cal-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
.cal { min-width: 860px; }
.cal-head, .cal-body { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); }
.cal-head { border-bottom: 1px solid var(--line); }
.cal-dh { display: flex; align-items: center; gap: 6px; padding: 12px 10px 10px; border-inline-start: 1px solid var(--line); }
.cal-dh small { color: var(--muted); font-weight: 700; font-size: 0.8125rem; }
.cal-dh b { font-size: 1.25rem; font-weight: 900; font-stretch: 70%; }
.cal-dh em { margin-inline-start: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--tint); color: var(--brand-ink); font-style: normal; font-size: 0.75rem; font-weight: 800; text-align: center; }
.cal-dh.is-today b { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--brand); }
.cal-body { position: relative; }
.cal-gutter { position: relative; }
.cal-gutter span { position: absolute; right: 8px; translate: 0 -50%; color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.cal-gutter span:first-child { translate: 0 4px; }
.cal-col { position: relative; border-inline-start: 1px solid var(--line); background: repeating-linear-gradient(-45deg, var(--closed) 0 6px, oklch(0.958 0.006 155) 6px 12px); cursor: copy; }
.cal-col.is-today { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 75%, transparent); }
.cal-open { position: absolute; left: 0; right: 0; background: var(--surface); }
.cal-line { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid oklch(0.92 0.006 155); z-index: 1; pointer-events: none; }
.cal-off { position: absolute; top: 12px; left: 8px; right: 8px; padding: 8px; border-radius: 10px; background: var(--surface); color: var(--muted); font-weight: 800; font-size: 0.8125rem; text-align: center; }
.cal-off small { display: block; font-weight: 600; }
.cal-ev { position: absolute; z-index: 2; display: grid; align-content: start; gap: 1px; padding: 5px 8px; overflow: hidden; border-radius: 8px; border-inline-start: 4px solid var(--ink); background: var(--brand); font-size: 0.75rem; line-height: 1.25; text-decoration: none; cursor: pointer; box-shadow: 0 1px 2px oklch(0 0 0 / 0.12); }
.cal-ev:hover { outline: 2px solid var(--ink); }
.cal-ev b { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev span { color: oklch(0.17 0 0 / 0.72); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev.is-short { align-content: center; padding-block: 2px; }
.cal-ev.is-short span { display: none; }
.cal-ev.s-new { background: var(--sun); border-color: var(--sun-ink); }
.cal-ev.s-confirmed { background: var(--brand); border-color: var(--brand-ink); }
.cal-ev.s-done { background: oklch(0.9 0 0); border-color: oklch(0.55 0 0); }
.cal-ev.s-noshow { background: var(--plum-tint); border-color: var(--plum); }
.cal-ev.s-cancelled { z-index: 1; background: var(--surface); border: 1.5px dashed var(--line); color: var(--muted); box-shadow: none; }
.cal-ev.s-cancelled b { text-decoration: line-through; }
.cal-now { position: absolute; left: -4px; right: 0; z-index: 3; height: 2px; background: var(--plum); pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: 0; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--plum); }

/* ------------------------------------------------------------- clients */
.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; margin-top: 14px; }
.clients .empty { grid-column: 1 / -1; }
.client { display: grid; gap: 10px; align-content: start; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.client-main { display: grid; min-width: 0; }
.client-main b { font-size: 1.0625rem; font-weight: 800; overflow-wrap: anywhere; }
.client-main span { color: var(--muted); font-size: 0.9375rem; overflow-wrap: anywhere; }
.client-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 0.8125rem; font-weight: 700; }
.client-acts { display: flex; flex-wrap: wrap; gap: 6px; }

/* ------------------------------------------------------------ services */
.services { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.svc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px 18px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.svc.is-hidden { background: var(--paper); }
.svc.is-hidden .svc-main b { color: var(--muted); }
.svc-order { display: grid; gap: 4px; }
.svc-order .icon-btn { width: 30px; height: 30px; font-size: 0.875rem; }
.svc-main { display: grid; min-width: 0; }
.svc-main b { font-size: 1.125rem; font-weight: 800; overflow-wrap: anywhere; }
.svc-main span { font-family: "Readex Pro", var(--font); color: var(--ink-2); }
.svc-main small { color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.svc .switch { min-width: 7.5rem; }
.svc-acts { display: flex; gap: 6px; }
.svc-confirm { grid-column: 1 / -1; }

.confirm-box { display: grid; gap: 10px; padding: 14px 16px; border: 1.5px solid color-mix(in srgb, var(--plum) 40%, transparent); border-radius: var(--r-m); background: var(--plum-tint); }

/* ---------------------------------------------------------------- cards */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; min-width: 0; }
.card { display: grid; gap: 16px; padding: clamp(18px, 2.4vw, 26px); border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); min-width: 0; }
.card-head { display: grid; gap: 4px; }
.card-head h2 { font-size: 1.375rem; font-weight: 900; font-stretch: 72%; line-height: 1.1; }
.card-head p { color: var(--muted); font-size: 0.9375rem; }
.card .btn { justify-self: start; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.dirty { margin-inline-end: auto; color: var(--sun-ink); font-weight: 800; font-size: 0.875rem; }
.sub { margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 1.0625rem; font-weight: 900; font-stretch: 80%; }

.week { display: grid; }
.wday { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); align-items: start; gap: 10px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.wday:last-child { border-bottom: 0; }
.wday .switch { min-height: 44px; }
.wday.is-closed .switch-text { color: var(--muted); }
.ranges { display: grid; gap: 8px; min-width: 0; }
.ranges > .muted { padding-top: 10px; font-weight: 700; }
.range { display: flex; align-items: center; gap: 8px; }
.range input { width: 7.6rem; min-width: 0; }
.range > span { color: var(--muted); }
.range-acts { display: flex; flex-wrap: wrap; gap: 4px 16px; }

.offs, .preview, .devices { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.offs li, .devices li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: var(--r-s); background: var(--paper); }
.offs li span, .devices li span { display: grid; min-width: 0; }
.offs small, .devices small { color: var(--muted); font-size: 0.8125rem; }
.offs .is-past { opacity: 0.55; }
.offs li.muted, .devices li.muted, .preview li.muted { display: block; padding: 0; border: 0; background: none; }
.off-form { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.off-form .off-note, .off-form .form-err { grid-column: 1 / -1; }
.preview { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.preview li { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 1.5px solid color-mix(in srgb, var(--brand-ink) 30%, var(--line)); border-radius: var(--r-s); background: var(--tint); font-size: 0.875rem; }
.preview li b { font-weight: 900; }
.preview li.muted { grid-column: 1 / -1; }

.push-state { padding: 12px 14px; border-radius: var(--r-s); background: var(--paper); }
.push-state.is-on { background: var(--tint); color: var(--brand-ink); }
.push-state.is-blocked { background: var(--plum-tint); color: var(--plum); }
.push-acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* -------------------------------------------------------- side panel */
.scrim { position: fixed; inset: 0; z-index: 30; background: oklch(0.17 0 0 / 0.35); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 31; width: min(100vw, 520px);
  overflow-y: auto; overscroll-behavior: contain; background: var(--surface); box-shadow: -18px 0 50px -20px oklch(0 0 0 / 0.4);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.drawer:focus { outline: none; }
.drawer.in { animation: drawer-in 260ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
.dr-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: calc(20px + env(safe-area-inset-top, 0px)) 24px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.dr-head h2 { font-size: 1.75rem; font-weight: 900; font-stretch: 70%; line-height: 1.05; overflow-wrap: anywhere; }
.dr-kicker { color: var(--muted); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.dr-head .muted { margin-top: 2px; font-size: 0.9375rem; }
.dr-body { display: grid; gap: 18px; padding: 20px 24px 32px; }
.dr-when { display: grid; gap: 2px; padding: 16px 18px; border-radius: var(--r-m); background: var(--tint); }
.dr-when span { font-weight: 800; }
.dr-when b { font-size: 3rem; font-weight: 900; font-stretch: 62%; line-height: 0.95; }
.dr-when small { color: var(--muted); font-size: 0.875rem; }
.dr-when.s-new { background: var(--sun-tint); }
.dr-when.s-cancelled, .dr-when.s-done { background: var(--paper); }
.dr-when.s-noshow { background: var(--plum-tint); }
.dr-contact { display: flex; flex-wrap: wrap; gap: 8px; }
.facts { display: grid; gap: 10px; }
.facts div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 10px; }
.facts dt { color: var(--muted); font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; padding-top: 2px; }
.facts dd { min-width: 0; overflow-wrap: anywhere; font-size: 0.9375rem; }
.dr-sec { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.dr-sec h3 { font-size: 1rem; font-weight: 900; font-stretch: 80%; }
.dr-sec .btn { justify-self: start; }
.prose { white-space: pre-line; overflow-wrap: anywhere; }
.move-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dr-more { display: flex; flex-wrap: wrap; gap: 10px 22px; }
/* emails */
.toggles { display: grid; gap: 14px; min-width: 0; margin: 4px 0 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); }
.toggles legend { float: left; width: 100%; margin-bottom: 14px; padding: 0; font-weight: 700; font-size: 0.875rem; }
.toggle-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.toggle-row select { width: auto; min-width: 8.5rem; min-height: 40px; }
.previews { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.mail-log { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 0.9375rem; }
.mail-log li { display: flex; align-items: baseline; gap: 10px; }
.mail-log li.muted { display: block; }
.mail-log small { color: var(--muted); }
.ml-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--signal); }
.ml-dot.bad { background: var(--plum); }
.ml-dot.wait { background: var(--sun); }
.ml-dot.off { background: var(--line); }
.check { display: flex; align-items: center; gap: 10px; font-size: 0.9375rem; font-weight: 700; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand-ink); }
.note-line { padding: 10px 14px; border-radius: var(--r-s); background: var(--plum-tint); color: var(--plum); font-weight: 700; font-size: 0.9375rem; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  max-width: min(92vw, 520px); padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: var(--surface); font-weight: 700; font-size: 0.9375rem; text-align: center;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity 200ms ease, transform 200ms ease;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* -------------------------------------------------------------- widths */
@media (max-width: 1100px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .overview { grid-template-columns: minmax(0, 1fr); }
  .counts { grid-template-rows: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .counts > div { flex-direction: column-reverse; align-items: flex-start; gap: 4px; padding: 12px 14px; }
  .counts dt { font-size: 0.8125rem; line-height: 1.2; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 20; height: auto; flex-direction: row; gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .side .logo, .side-biz, .side-foot { display: none; }
  .bar-biz:not([hidden]) { display: block; margin-bottom: 4px; color: var(--muted); font-size: 0.8125rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav { grid-template-columns: repeat(var(--nav-n, 6), minmax(0, 1fr)); width: 100%; gap: 2px; }
  .nav a { position: relative; flex-direction: column; justify-content: center; gap: 3px; min-height: 54px; padding: 4px 2px; border-radius: 12px; font-size: 0.6875rem; text-align: center; }
  .nav svg { width: 22px; height: 22px; }
  .nav-count { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 18px; padding: 0 5px; font-size: 0.6875rem; }
  .main { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 640px) {
  .bar { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
  .row { grid-template-columns: 3.8rem minmax(0, 1fr); }
  .row-time { font-size: 1.3rem; }
  .row-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .seg { align-self: flex-start; }
  .search { flex-basis: auto; }
  .svc { grid-template-columns: auto minmax(0, 1fr); }
  .svc .switch, .svc-acts { grid-column: 2; }
  .wday { grid-template-columns: minmax(0, 1fr); }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .move-row, .off-form { grid-template-columns: minmax(0, 1fr); }
  .dr-head, .dr-body { padding-inline: 18px; }
  .legend { margin-left: 0; }
  .drawer { width: 100vw; }
}
@media (max-width: 380px) {
  .counts dd { font-size: 1.6rem; }
  .range input { width: 6.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .toast, .switch-ui, .switch-ui::after { transition: none; }
  .btn:hover, .btn:active { transform: none; }
  .drawer.in { animation: none; }
}

/* ----------------------------------------------------------- the team */
:root {
  --st-0: oklch(0.6 0.14 155); --st-1: oklch(0.6 0.13 255); --st-2: oklch(0.68 0.14 85);
  --st-3: oklch(0.58 0.16 335); --st-4: oklch(0.6 0.12 205); --st-5: oklch(0.55 0.15 295);
}
.st-0 { --stc: var(--st-0); } .st-1 { --stc: var(--st-1); } .st-2 { --stc: var(--st-2); }
.st-3 { --stc: var(--st-3); } .st-4 { --stc: var(--st-4); } .st-5 { --stc: var(--st-5); }
.team .member { grid-template-columns: auto auto minmax(0, 1fr) auto auto; }
.team .member .switch { min-width: 7.5rem; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--stc, var(--ink)); color: #fff; font-weight: 900; font-size: 1.125rem; }
.member-main { display: grid; min-width: 0; }
.member-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.member-main b { font-size: 1.125rem; font-weight: 800; overflow-wrap: anywhere; }
.member-main span { font-family: "Readex Pro", var(--font); color: var(--ink-2); }
.member-main small { color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.team .member.is-hidden .member-main b { color: var(--muted); }
.with { color: var(--brand-ink); font-weight: 800; }
.unassigned { color: var(--plum); font-weight: 800; }
.check-list { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); }
.check-list[hidden] { display: none; }
.sf-offs { margin-top: 8px; }
.cal-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cal-who[hidden] { display: none; }
.cal-who select { width: auto; min-width: 9rem; min-height: 40px; }
.cal-ev.has-staff::after { content: ""; position: absolute; top: 6px; inset-inline-end: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--stc); box-shadow: 0 0 0 2px #fff; }
.cal-dh .avatar { width: 28px; height: 28px; font-size: 0.8125rem; }
.cal-dh.is-nobody b { color: var(--plum); }
@media (max-width: 820px) {
  .team .member { grid-template-columns: auto minmax(0, 1fr); }
  .team .member .svc-order { display: none; }
  .team .member .switch, .team .member .svc-acts { grid-column: 2; }
}
