/* Clementine Events — built on the Soft Dashboard starter.
   Warm blush-stone background, rounded cards, clementine orange accent,
   party pastels (peach, rose, butter, mint), Onest. */

:root {
  --bg: #F1EBE5;
  --side-bg: #EAE2DA;
  --surface: #FFFCF9;
  --surface-2: #F6F0EA;
  --surface-3: #EBE2D8;
  --line: rgba(52, 40, 28, .09);
  --line-strong: rgba(52, 40, 28, .17);
  --ink: #23201C;
  --ink-2: #57514A;
  --ink-3: #847C72;
  --leaf-mark: #2E5A3A;

  --clem: #EE7330;
  --clem-ink: #B0501A;
  --clem-soft: #FBE3D2;
  --sage: #5B9165;
  --sage-ink: #3B6E46;
  --sage-soft: #DDE7D8;
  --peel: #D79A2B;
  --peel-ink: #8C5F0C;
  --peel-soft: #F3E6CB;
  --clay: #8C6E5A;
  --clay-ink: #6E5240;
  --clay-soft: #EAE0D7;
  --sky: #C65A82;
  --sky-ink: #9E3B61;
  --sky-soft: #F6DDE6;

  --on-ink: #FBFAF7;
  --shadow-card: 0 1px 2px rgba(52,40,28,.05), 0 6px 20px -12px rgba(52,40,28,.18);
  --shadow-pop: 0 2px 4px rgba(52,40,28,.06), 0 18px 44px -12px rgba(52,40,28,.28);
  --radius: 11px;
  --radius-lg: 20px;

  --f-display: "Onest", "Avenir Next", system-ui, sans-serif;
  --f-ui: "Onest", "Avenir Next", system-ui, sans-serif;
  --f-mono: "Onest", "Avenir Next", system-ui, sans-serif;

  --side-w: 248px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --spring: linear(0, .009, .035 2.1%, .141 4.4%, .723 12.9%, .938 16.7%, 1.017 19.4%, 1.067, 1.077 24.6%, 1.067 27%, 1.014 33.3%, .994 37.5%, .991 41.7%, 1 54.2%, 1.003 62.5%, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #161412; --side-bg: #12100F; --surface: #1F1C19; --surface-2: #27231F; --surface-3: #332E29;
  --line: rgba(240,232,220,.08); --line-strong: rgba(240,232,220,.16);
  --ink: #F1ECE4; --ink-2: #C3BBB0; --ink-3: #8F877D; --leaf-mark: #8FC79A;
  --clem: #F08443; --clem-ink: #F5A574; --clem-soft: #3A2518;
  --sage: #77B083; --sage-ink: #9BCBA4; --sage-soft: #213128;
  --peel: #E2AE4B; --peel-ink: #EBC478; --peel-soft: #352B19;
  --clay: #B39581; --clay-ink: #CFB6A4; --clay-soft: #2F2722;
  --sky: #DA7A9E; --sky-ink: #EAA2BD; --sky-soft: #3A2029;
  --on-ink: #161412;
  --shadow-card: 0 1px 2px rgba(0,0,0,.3), 0 0 0 1px rgba(240,232,220,.05);
  --shadow-pop: 0 2px 4px rgba(0,0,0,.3), 0 18px 44px -10px rgba(0,0,0,.65);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161412; --side-bg: #12100F; --surface: #1F1C19; --surface-2: #27231F; --surface-3: #332E29;
    --line: rgba(240,232,220,.08); --line-strong: rgba(240,232,220,.16);
    --ink: #F1ECE4; --ink-2: #C3BBB0; --ink-3: #8F877D; --leaf-mark: #8FC79A;
    --clem: #F08443; --clem-ink: #F5A574; --clem-soft: #3A2518;
    --sage: #77B083; --sage-ink: #9BCBA4; --sage-soft: #213128;
    --peel: #E2AE4B; --peel-ink: #EBC478; --peel-soft: #352B19;
    --clay: #B39581; --clay-ink: #CFB6A4; --clay-soft: #2F2722;
    --sky: #DA7A9E; --sky-ink: #EAA2BD; --sky-soft: #3A2029;
    --on-ink: #161412;
    --shadow-card: 0 1px 2px rgba(0,0,0,.3), 0 0 0 1px rgba(240,232,220,.05);
    --shadow-pop: 0 2px 4px rgba(0,0,0,.3), 0 18px 44px -10px rgba(0,0,0,.65);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 13.5px/1.45 var(--f-ui);
  font-feature-settings: "tnum" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--clem); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -40px; background: var(--ink); color: var(--on-ink); padding: 8px 12px; border-radius: var(--radius); z-index: 100; }
.skip:focus { top: 12px; }
.mono { font-family: var(--f-mono); font-size: .94em; letter-spacing: -.01em; }
.muted { color: var(--ink-3); }
.i { display: inline-flex; width: 16px; height: 16px; flex: none; }
.i svg { width: 100%; height: 100%; }

/* ───────── Layout ───────── */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .28s var(--ease); }
:root[data-sidebar="collapsed"] .app { grid-template-columns: 64px minmax(0, 1fr); }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 14px 10px 12px;
  border-right: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 8px; padding: 2px 4px 14px; }
.brand-link { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; flex: 1; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap; }
.brand-text b { font: 650 17px/1 var(--f-display); letter-spacing: -.02em; }
.brand-text small { color: var(--ink-3); font-size: 11.5px; margin-top: 3px; }

.nav { flex: 1; overflow-y: auto; overflow-x: hidden; margin: 0 -4px; padding: 0 4px; scrollbar-width: none; }
.nav-group { margin-top: 14px; }
.nav-group:first-child { margin-top: 0; }
.nav-label { font: 500 10.5px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 6px 10px 8px; white-space: nowrap; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  height: 34px; padding: 0 8px 0 10px; border-radius: var(--radius);
  color: var(--ink-2); text-decoration: none; white-space: nowrap;
  position: relative;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-weight: 550; }
.nav-item[aria-current="page"]::before { content: ""; position: absolute; left: -4px; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--clem); }
.nav-item .i { color: var(--ink-3); }
.nav-item[aria-current="page"] .i { color: var(--clem-ink); }
.nav-text { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.nav-count { font: 500 11px/1 var(--f-mono); color: var(--ink-3); padding: 3px 6px; border-radius: 10px; background: var(--surface-2); }
.nav-count.hot { background: var(--clem); color: #fff; }
.nav-caret { width: 14px; height: 14px; color: var(--ink-3); transition: transform .2s var(--ease); }
.nav-item[aria-expanded="true"] .nav-caret { transform: rotate(90deg); }
.nav-sub { margin: 2px 0 4px 21px; padding-left: 10px; border-left: 1px solid var(--line); display: grid; gap: 1px; }
.nav-sub[hidden] { display: none; }
.nav-sub .nav-item { height: 30px; font-size: 13px; padding-left: 10px; }
.nav-sub .nav-item[aria-current="page"]::before { display: none; }

.side-foot { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 8px; }
.seen { padding: 8px 10px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.seen-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--ink-2); }
.seen-top b { font: 600 17px/1 var(--f-display); color: var(--ink); }
.seen-top b small { font: 500 11px var(--f-mono); color: var(--ink-3); }
.seen-bar { height: 5px; border-radius: 3px; background: var(--surface-3); margin: 7px 0 5px; overflow: hidden; display: flex; gap: 2px; }
.seen-bar i { display: block; height: 100%; background: var(--clem); border-radius: 3px; transition: width .5s var(--ease); }
.seen-bar i + i { background: var(--sage); }
.seen small { font-size: 11px; color: var(--ink-3); }
.user-card { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 4px; border-radius: var(--radius); text-align: left; white-space: nowrap; }
.user-card:hover { background: var(--surface-2); }
.user-text { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-text b { font-weight: 550; font-size: 13px; }
.user-text small { color: var(--ink-3); font-size: 11.5px; }
.dots { color: var(--ink-3); letter-spacing: 1px; }

:root[data-sidebar="collapsed"] .brand-text,
:root[data-sidebar="collapsed"] .nav-text,
:root[data-sidebar="collapsed"] .nav-count,
:root[data-sidebar="collapsed"] .nav-caret,
:root[data-sidebar="collapsed"] .nav-label,
:root[data-sidebar="collapsed"] .nav-sub,
:root[data-sidebar="collapsed"] .seen,
:root[data-sidebar="collapsed"] .user-text,
:root[data-sidebar="collapsed"] .dots { display: none; }
:root[data-sidebar="collapsed"] .brand { flex-direction: column; gap: 10px; }
:root[data-sidebar="collapsed"] .nav-item { justify-content: center; padding: 0; }
:root[data-sidebar="collapsed"] .nav-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
:root[data-sidebar="collapsed"] .nav-group:first-child { border-top: 0; padding-top: 0; }
:root[data-sidebar="collapsed"] .user-card { justify-content: center; }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: 58px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.icon-btn.menu-btn { display: none; }
.search {
  display: flex; align-items: center; gap: 8px;
  width: min(340px, 34vw); height: 34px; padding: 0 8px 0 10px;
  border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-3); text-align: left;
}
.search:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.search { min-width: 0; }
.search-label { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
kbd { font: 500 11px/1 var(--f-mono); padding: 4px 5px; border-radius: 4px; background: var(--surface-2); color: var(--ink-3); box-shadow: inset 0 -1px 0 var(--line-strong); }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.next-chip {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 8px; margin-right: 4px;
  border-radius: var(--radius); font-size: 12px; color: var(--ink-2); text-align: left; line-height: 1.15;
}
.next-chip:hover { background: var(--surface-2); }
.next-chip .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--clem); }
.next-chip b { display: block; color: var(--ink); font-weight: 550; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--clem) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: var(--radius); color: var(--ink-2); position: relative; flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn .i { width: 17px; height: 17px; }
.badge-dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--clem); box-shadow: 0 0 0 2px var(--bg); }
.badge-dot[hidden] { display: none; }

main { padding: 26px 24px 64px; outline: none; max-width: 1480px; width: 100%; }

/* ───────── Buttons & controls ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: var(--radius);
  font-weight: 550; font-size: 13px; white-space: nowrap;
  transition: background .15s, box-shadow .15s, transform .12s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn .i { width: 15px; height: 15px; }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ink:hover { background: color-mix(in srgb, var(--ink) 86%, var(--clem)); }
.btn-clem { background: var(--clem); color: #24140a; }
.btn-clem:hover { background: color-mix(in srgb, var(--clem) 88%, #000); }
.btn-line { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink); }
.btn-line:hover { background: var(--surface-2); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.done { background: var(--sage-soft); color: var(--sage-ink); box-shadow: none; }

.seg { display: inline-flex; padding: 2px; border-radius: 7px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { white-space: nowrap; height: 26px; padding: 0 10px; border-radius: 5px; font-size: 12px; color: var(--ink-2); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(31,59,45,.12), inset 0 0 0 1px var(--line); }
.seg .i { width: 14px; height: 14px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; height: 38px; padding: 0 12px; color: var(--ink-3); font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--clem); border-radius: 2px; }
.tab .nav-count { font-size: 10.5px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 28px; padding: 0 10px; border-radius: 14px; font-size: 12px; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); display: inline-flex; align-items: center; gap: 6px; background: var(--surface); }
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.chip .n { font: 500 10.5px var(--f-mono); opacity: .7; }
.chip .avatar { width: 18px; height: 18px; font-size: 8.5px; }

.field { display: grid; gap: 6px; }
.field label, .field .label { font-size: 12px; font-weight: 550; color: var(--ink-2); }
.field small { font-size: 11.5px; color: var(--ink-3); }
.input, .select {
  height: 36px; width: 100%; padding: 0 10px; border-radius: var(--radius); border: 0;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: box-shadow .15s;
}
.input:hover, .select:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 35%, transparent); }
.input:focus, .select:focus { outline: none; box-shadow: inset 0 0 0 1px var(--clem), 0 0 0 3px color-mix(in srgb, var(--clem) 22%, transparent); }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--clay); }
.select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236F8177' stroke-width='1.6'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; }
.err { color: var(--clay-ink); font-size: 12px; }

.switch { position: relative; width: 36px; height: 20px; border-radius: 10px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-strong); transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .25s var(--spring); }
.switch[aria-checked="true"] { background: var(--sage); box-shadow: none; }
.switch[aria-checked="true"]::after { transform: translateX(16px); }

.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  font: 600 10.5px/1 var(--f-ui); letter-spacing: .02em;
  background: var(--surface-3); color: var(--ink-2);
}
.avatar.sm { width: 22px; height: 22px; font-size: 9px; }
.avatar[data-tone="clem"] { background: var(--clem-soft); color: var(--clem-ink); }
.avatar[data-tone="sage"] { background: var(--sage-soft); color: var(--sage-ink); }
.avatar[data-tone="peel"] { background: var(--peel-soft); color: var(--peel-ink); }
.avatar[data-tone="clay"] { background: var(--clay-soft); color: var(--clay-ink); }
.avatar[data-tone="sky"] { background: var(--sky-soft); color: var(--sky-ink); }
.avatar[data-tone="leaf"] { background: var(--ink); color: var(--on-ink); }

.tag { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 11px; font-weight: 550; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.tag.plain::before { display: none; }
.tag[data-tone="clem"] { background: var(--clem-soft); color: var(--clem-ink); }
.tag[data-tone="sage"] { background: var(--sage-soft); color: var(--sage-ink); }
.tag[data-tone="peel"] { background: var(--peel-soft); color: var(--peel-ink); }
.tag[data-tone="clay"] { background: var(--clay-soft); color: var(--clay-ink); }
.tag[data-tone="sky"] { background: var(--sky-soft); color: var(--sky-ink); }

/* ───────── Page header ───────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font: 600 clamp(26px, 2.6vw, 34px)/1.05 var(--f-display); letter-spacing: -.03em; }
.page-head h1 em { font-style: normal; color: var(--clem-ink); }
.page-head p { color: var(--ink-3); margin-top: 6px; }
.page-head .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ───────── Boards: hairline-divided panels ───────── */
.board {
  display: grid; gap: 1px;
  background: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px var(--line);
  overflow: hidden;
  margin-bottom: 18px;
}
.board > * { background: var(--surface); min-width: 0; }
.cell { padding: 16px 18px; }
.cell-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cell-head h2 { font: 600 15px/1.2 var(--f-display); letter-spacing: -.01em; }
.cell-head p { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.cell-head .link { font-size: 12px; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.cell-head .link:hover { color: var(--clem-ink); }
.cell-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; margin-top: 12px; border-top: 1px dashed var(--line-strong); font-size: 12px; color: var(--ink-3); flex-wrap: wrap; }

.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { padding: 14px 18px 12px; position: relative; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: end; }
.kpi-label { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); margin-bottom: 8px; }
.kpi-label .sw { width: 8px; height: 8px; border-radius: 2px; }
.kpi-val { font: 600 34px/1 var(--f-display); letter-spacing: -.035em; }
.kpi-val small { font: 500 14px var(--f-display); color: var(--ink-3); margin-left: 2px; letter-spacing: 0; }
.kpi-spark { width: 96px; height: 34px; }
.kpi-delta { grid-column: 1 / -1; font-size: 11.5px; color: var(--ink-3); margin-top: 8px; display: flex; gap: 6px; align-items: center; }
.delta { white-space: nowrap; font: 500 11px var(--f-mono); padding: 2px 5px; border-radius: 3px; }
.delta.up { background: var(--sage-soft); color: var(--sage-ink); }
.delta.down { background: var(--clay-soft); color: var(--clay-ink); }

.today-grid { grid-template-columns: minmax(0, 2.15fr) minmax(280px, 1fr); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }

/* ───────── Lane timeline ───────── */
.lanes-wrap { position: relative; }
.lanes-scroll { overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.lanes { position: relative; --who: 120px; }
.lanes-axis { display: grid; grid-template-columns: var(--who) 1fr; height: 26px; align-items: end; font: 500 10.5px var(--f-mono); color: var(--ink-3); }
.lanes-axis .label { position: sticky; left: 0; z-index: 4; background: var(--surface); height: 100%; display: flex; align-items: flex-end; text-transform: uppercase; letter-spacing: .06em; padding-bottom: 6px; }
.axis-track { position: relative; height: 100%; }
.axis-track span { position: absolute; bottom: 6px; transform: translateX(-2px); white-space: nowrap; }
.lane { display: grid; grid-template-columns: var(--who) 1fr; height: 44px; border-top: 1px solid var(--line); }
.lane:last-child { border-bottom: 1px solid var(--line); }
.lane-who { position: sticky; left: 0; z-index: 4; background: var(--surface); display: flex; align-items: center; gap: 8px; min-width: 0; padding-right: 8px; }
.lane-who b { font-weight: 550; font-size: 12.5px; display: block; line-height: 1.15; }
.lane-who small { font-size: 10.5px; color: var(--ink-3); }
.lane-track { position: relative; background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / var(--hours))); background-size: 100% 100%; }
.lane.drop-ok .lane-track { background-color: color-mix(in srgb, var(--sage) 9%, transparent); }
.lane.drop-bad .lane-track { background-color: color-mix(in srgb, var(--clay) 10%, transparent); }
.lane-track .past { position: absolute; top: 0; bottom: 0; left: 0; background: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--ink) 4%, transparent) 5px 6px); pointer-events: none; }

.visit {
  position: absolute; top: 7px; height: 30px;
  display: flex; align-items: center; gap: 5px;
  padding: 0 8px 0 6px; border-radius: 15px;
  font-size: 11.5px; font-weight: 550; white-space: nowrap; overflow: hidden;
  background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--vc, var(--sage)), 0 1px 0 rgba(31,59,45,.05);
  cursor: grab; touch-action: none; user-select: none;
  transition: box-shadow .15s, transform .15s var(--ease), opacity .2s;
}
.visit::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--vc, var(--sage)); flex: none; }
.visit span { overflow: hidden; text-overflow: ellipsis; }
.visit .mark { width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-left: -2px; }
.visit .mark svg { width: 9px; height: 9px; }
.visit.done { background: color-mix(in srgb, var(--vc) 14%, var(--surface)); box-shadow: none; color: var(--ink-2); cursor: default; }
.visit.done::before { display: none; }
.visit.done .mark { background: var(--vc); color: var(--surface); }
.visit.noshow { background: var(--surface-2); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-strong); text-decoration: line-through; cursor: default; }
.visit.noshow::before { display: none; }
.visit.noshow .mark { background: var(--clay); color: #fff; }
.visit.inroom { background: var(--vc); color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--vc) 25%, transparent); cursor: default; }
:root[data-theme="dark"] .visit.inroom { color: #111914; }
.visit.inroom::before { background: #fff; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.visit:not(.done):not(.noshow):not(.inroom):hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1.5px var(--vc), 0 4px 10px -4px rgba(31,59,45,.35); }
.visit.dragging { cursor: grabbing; z-index: 5; transform: scale(1.04); box-shadow: inset 0 0 0 1.5px var(--vc), var(--shadow-pop); transition: none; }
.visit.ghost { opacity: .35; }
.visit.flash { animation: flash 1s var(--ease); }
@keyframes flash { 0% { box-shadow: inset 0 0 0 1.5px var(--vc), 0 0 0 0 var(--clem); } 30% { box-shadow: inset 0 0 0 1.5px var(--vc), 0 0 0 5px color-mix(in srgb, var(--clem) 40%, transparent); } }
.visit.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { translate: -4px 0; } 40%, 80% { translate: 4px 0; } }

.v-assessment { --vc: var(--clem); }
.v-treatment { --vc: var(--sage); }
.v-review { --vc: var(--peel); }
.v-class { --vc: var(--sky); }
.v-video { --vc: var(--clay); }

.now-line { position: absolute; top: 26px; bottom: 0; width: 2px; background: var(--clem); z-index: 3; pointer-events: none; }
.now-line::before { content: attr(data-time); position: absolute; top: -22px; left: -22px; width: 46px; text-align: center; font: 600 10px/18px var(--f-mono); background: var(--clem); color: #24140a; border-radius: 9px; }
.now-line::after { content: ""; position: absolute; bottom: -3px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--clem); }
.drag-hint { position: absolute; z-index: 6; pointer-events: none; font: 600 10.5px/1 var(--f-mono); background: var(--ink); color: var(--on-ink); padding: 5px 7px; border-radius: 4px; transform: translate(-50%, -130%); white-space: nowrap; }

.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--vc); }

.list-view { display: grid; }
.list-row { display: grid; grid-template-columns: 70px minmax(0, 1.4fr) minmax(0, 1fr) 110px 90px; gap: 12px; align-items: center; padding: 9px 4px; border-top: 1px solid var(--line); font-size: 12.5px; }
.list-row:first-child { border-top: 0; }

/* ───────── Up next ───────── */
.inroom-box { border-radius: var(--radius); background: var(--clem-soft); padding: 10px 12px; margin-bottom: 12px; }
.inroom-box h3 { font: 500 10.5px var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--clem-ink); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.inroom-box h3::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--clem); animation: blink 1.6s infinite; }
.inroom-list { display: flex; flex-wrap: wrap; gap: 6px; }
.inroom-list li { list-style: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; background: var(--surface); padding: 3px 9px 3px 3px; border-radius: 14px; }
.inroom-list small { color: var(--ink-3); }
.inroom-list ul, ul.inroom-list { margin: 0; padding: 0; }
.queue { list-style: none; margin: 0; padding: 0; }
.queue li { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.queue li:first-child { border-top: 0; }
.queue time { font: 600 16px/1 var(--f-display); letter-spacing: -.02em; }
.queue time small { display: block; font: 500 9.5px var(--f-mono); color: var(--ink-3); margin-top: 3px; letter-spacing: .04em; }
.queue b { font-weight: 550; display: block; }
.queue .meta { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.queue .meta::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--vc); flex: none; }
.queue li.leaving { animation: leave .35s var(--ease) forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(12px); } }

/* ───────── Small lists ───────── */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); min-width: 0; }
.rows li:first-child { border-top: 0; padding-top: 0; }
.rows .grow { flex: 1; min-width: 0; }
.rows b { font-weight: 550; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows small { color: var(--ink-3); font-size: 11.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-spark { width: 64px; height: 22px; flex: none; }

.area-bars { display: grid; gap: 11px; }
.area-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 1.2fr 28px; gap: 10px; align-items: center; }
.area-row .ico { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.area-row .ico svg { width: 15px; height: 15px; }
.area-row b { font-weight: 550; font-size: 12.5px; display: block; }
.area-row small { color: var(--ink-3); font-size: 11px; }
.area-row .bar { height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.area-row .bar i { display: block; height: 100%; border-radius: 4px; background: var(--vc); transform-origin: left; animation: grow .8s var(--ease) both; }
.area-row .n { font: 600 13px var(--f-mono); text-align: right; }
@keyframes grow { from { transform: scaleX(0); } }
.clin-mix { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.clin-mix span { display: inline-flex; align-items: center; gap: 5px; font: 500 11px var(--f-mono); color: var(--ink-2); }

.week-chart { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; align-items: end; height: 170px; padding-top: 22px; }
.week-col { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; position: relative; }
.week-bar { width: min(44px, 100%); border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--clem) 30%, var(--surface-2)); transform-origin: bottom; animation: rise .7s var(--ease) both; position: relative; }
.week-col.today .week-bar { background: var(--clem); }
.week-col.future .week-bar { background: repeating-linear-gradient(135deg, var(--surface-3) 0 4px, var(--surface-2) 4px 8px); }
.week-col:hover .week-bar { filter: brightness(.95); }
.week-col small { font: 500 10.5px var(--f-mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.week-col.today small { color: var(--clem-ink); font-weight: 600; }
.week-tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--on-ink); font: 600 11px var(--f-mono); padding: 4px 7px; border-radius: 4px; white-space: nowrap; opacity: 0; transition: opacity .15s; pointer-events: none; }
.week-col:hover .week-tip, .week-col:focus-visible .week-tip { opacity: 1; }
@keyframes rise { from { transform: scaleY(0); } }

.feed { list-style: none; margin: 0; padding: 0; position: relative; }
.feed::before { content: ""; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 1px; background: var(--line-strong); }
.feed li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 6px 0; position: relative; }
.feed .dot { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); box-shadow: 0 0 0 3px var(--surface); }
.feed .dot svg { width: 13px; height: 13px; }
.feed b { font-weight: 550; }
.feed small { display: block; color: var(--ink-3); font-size: 11.5px; }
.feed li.new { animation: slideIn .5s var(--ease); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } }

/* ───────── Schedule ───────── */
.day-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.day-btn { text-align: left; padding: 10px 12px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 2px; transition: box-shadow .15s, background .15s; }
.day-btn:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.day-btn .dow { font: 500 10.5px var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.day-btn .dnum { font: 600 22px/1 var(--f-display); letter-spacing: -.02em; }
.day-btn small { color: var(--ink-3); font-size: 11.5px; }
.day-btn .load { height: 3px; border-radius: 2px; background: var(--surface-3); margin-top: 6px; overflow: hidden; }
.day-btn .load i { display: block; height: 100%; background: var(--sage); }
.day-btn[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.day-btn[aria-pressed="true"] .dow, .day-btn[aria-pressed="true"] small { color: color-mix(in srgb, var(--on-ink) 70%, transparent); }
.day-btn[aria-pressed="true"] .load { background: color-mix(in srgb, var(--on-ink) 20%, transparent); }
.day-btn[aria-pressed="true"] .load i { background: var(--clem); }
.day-btn.is-today .dow::after { content: " · today"; color: var(--clem-ink); }
.day-btn[aria-pressed="true"].is-today .dow::after { color: var(--clem); }
.stat-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; box-shadow: 0 0 0 1px var(--line); }
.stat-trio div { background: var(--surface-2); padding: 10px 12px; }
.stat-trio b { font: 600 22px/1 var(--f-display); display: block; }
.stat-trio small { font-size: 11px; color: var(--ink-3); }
.stat-trio .warn b { color: var(--clay-ink); }
.gap-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); background: var(--sage-soft); margin-bottom: 6px; }
.gap-row time { font: 600 13px var(--f-mono); color: var(--sage-ink); width: 46px; }
.gap-row .grow { flex: 1; font-size: 12px; }

.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 4px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent); animation: shimmer 1.1s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ───────── Plans board ───────── */
.plan-board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.plan-col { background: var(--surface-2); border-radius: var(--radius-lg); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 300px; box-shadow: inset 0 0 0 1px var(--line); transition: background .15s; }
.plan-col.drop { background: color-mix(in srgb, var(--vc) 12%, var(--surface-2)); box-shadow: inset 0 0 0 1.5px var(--vc); }
.plan-col-head { display: flex; align-items: flex-start; gap: 8px; padding: 4px 4px 6px; }
.plan-col-head .num { font: 600 11px/20px var(--f-mono); width: 20px; height: 20px; border-radius: 50%; text-align: center; background: var(--vc); color: #fff; flex: none; }
.plan-col-head b { font: 600 14px var(--f-display); display: block; }
.plan-col-head small { color: var(--ink-3); font-size: 11.5px; }
.plan-col-head .count { margin-left: auto; font: 500 11px var(--f-mono); color: var(--ink-3); }
.plan-card { background: var(--surface); border-radius: var(--radius); padding: 11px 12px; box-shadow: 0 0 0 1px var(--line), 0 1px 0 rgba(31,59,45,.04); display: grid; gap: 9px; cursor: grab; text-align: left; width: 100%; }
.plan-card:hover { box-shadow: 0 0 0 1px var(--line-strong), 0 6px 14px -8px rgba(31,59,45,.3); }
.plan-card.dragging { opacity: .4; }
.plan-card-top { display: flex; align-items: center; gap: 9px; }
.plan-card-top .grow { flex: 1; min-width: 0; }
.plan-card-top b { font-weight: 550; display: block; }
.plan-card-top small { color: var(--ink-3); font-size: 11.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ring { width: 34px; height: 34px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font: 600 9.5px var(--f-mono); }
.plan-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-3); }
.plan-meta .bar { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.plan-meta .bar i { display: block; height: 100%; background: var(--vc); }
.plan-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }

.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ex-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.ex-art { height: 104px; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); position: relative; }
.ex-art svg { width: 84px; height: 84px; }
.ex-art .tag { position: absolute; top: 10px; left: 10px; }
.ex-body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.ex-body b { font: 600 14px var(--f-display); }
.ex-body p { font-size: 12px; color: var(--ink-3); }
.ex-dose { display: flex; gap: 12px; font: 500 11px var(--f-mono); color: var(--ink-2); padding-top: 6px; border-top: 1px dashed var(--line-strong); }

/* ───────── Tables ───────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font: 500 10.5px var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-weight: 500; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr { transition: background .12s; }
tbody tr[data-href], tbody tr[tabindex] { cursor: pointer; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--f-mono); }
.who { display: flex; align-items: center; gap: 9px; }
.who b { font-weight: 550; display: block; line-height: 1.2; }
.who small { font-size: 11.5px; color: var(--ink-3); }

.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.inline-search { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--surface); width: min(280px, 100%); color: var(--ink-3); }
.inline-search input { border: 0; background: none; outline: none; flex: 1; min-width: 0; color: var(--ink); }
.inline-search:focus-within { box-shadow: inset 0 0 0 1px var(--clem), 0 0 0 3px color-mix(in srgb, var(--clem) 22%, transparent); }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); display: grid; gap: 8px; justify-items: center; }
.empty svg { width: 40px; height: 40px; opacity: .6; }
.empty b { color: var(--ink); font-weight: 550; }

.money-sum { display: grid; grid-template-columns: minmax(200px, .8fr) minmax(0, 1.5fr); gap: 28px; align-items: end; }
.money-sum .big { font: 600 44px/1 var(--f-display); letter-spacing: -.04em; }
.money-sum .big small { font-size: 22px; color: var(--ink-3); }
.aging { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 3px; margin-bottom: 10px; }
.aging i { display: block; height: 100%; border-radius: 3px; transition: flex-grow .5s var(--ease); }
.aging-key { display: flex; gap: 20px; flex-wrap: wrap; font-size: 12px; }
.aging-key div { display: grid; gap: 2px; }
.aging-key b { font: 600 15px var(--f-mono); display: flex; align-items: center; gap: 6px; }
.aging-key b::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--vc); }
.aging-key small { color: var(--ink-3); font-size: 11px; }

.claim { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(280px, 1.6fr) 90px 130px; gap: 18px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.claim:last-child { border-bottom: 0; }
.claim.denied { background: color-mix(in srgb, var(--clay-soft) 55%, var(--surface)); }
.claim-note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--clay-ink); font-weight: 550; }
.track { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.track::before { content: ""; position: absolute; top: 8px; left: 12.5%; right: 12.5%; height: 2px; background: var(--surface-3); }
.track .fill { position: absolute; top: 8px; left: 12.5%; height: 2px; background: var(--sage); transition: width .5s var(--ease); }
.step { display: grid; justify-items: center; gap: 6px; font-size: 11px; color: var(--ink-3); position: relative; z-index: 1; }
.step i { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--surface-3); display: grid; place-items: center; transition: background .3s, box-shadow .3s; }
.step i svg { width: 10px; height: 10px; color: #fff; opacity: 0; }
.step.on i { background: var(--sage); box-shadow: none; }
.step.on i svg { opacity: 1; }
.step.cur i { background: var(--surface); box-shadow: inset 0 0 0 2px var(--sage), 0 0 0 4px color-mix(in srgb, var(--sage) 20%, transparent); }
.step.cur { color: var(--ink); font-weight: 550; }
.step.bad i { background: var(--clay); box-shadow: none; }
.step.bad i svg { opacity: 1; }
.step.bad { color: var(--clay-ink); font-weight: 550; }

.claim-tiles { grid-template-columns: repeat(3, 1fr); }
.claim-tile { padding: 16px 18px; }
.claim-tile .lbl { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.claim-tile .lbl .sw { width: 8px; height: 8px; border-radius: 2px; background: var(--vc); }
.claim-tile b { display: block; font: 600 28px/1 var(--f-display); margin: 10px 0 6px; letter-spacing: -.03em; }
.claim-tile small { color: var(--ink-3); font-size: 12px; }

/* ───────── Drawer, modal, menus, toasts ───────── */
.overlay { position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, #0d1510 38%, transparent); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.overlay.closing { animation: fade .18s reverse forwards; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--surface); z-index: 61; display: flex; flex-direction: column; box-shadow: var(--shadow-pop); animation: slideL .32s var(--ease); }
.drawer.closing { animation: slideL .22s var(--ease) reverse forwards; }
@keyframes slideL { from { transform: translateX(100%); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font: 600 18px var(--f-display); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px; display: grid; gap: 18px; align-content: start; }
.drawer-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }

.modal-wrap { position: fixed; inset: 0; z-index: 61; display: grid; place-items: center; padding: 16px; }
.modal { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-pop); animation: pop .3s var(--spring); }
.modal.closing { animation: pop .16s var(--ease) reverse forwards; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.modal-head { display: flex; justify-content: space-between; gap: 10px; padding: 18px 20px 4px; }
.modal-head h2 { font: 600 19px var(--f-display); letter-spacing: -.01em; }
.modal-head p { color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }
.modal-body { padding: 14px 20px; display: grid; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.conflict { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: var(--radius); background: var(--clay-soft); color: var(--clay-ink); font-size: 12px; font-weight: 550; }
.conflict[hidden] { display: none; }

.menu { position: fixed; z-index: 70; min-width: 200px; background: var(--surface); border-radius: 8px; padding: 5px; box-shadow: var(--shadow-pop), 0 0 0 1px var(--line); animation: pop .2s var(--spring); }
.menu button, .menu a { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border-radius: 5px; text-align: left; text-decoration: none; font-size: 13px; }
.menu button:hover, .menu a:hover, .menu button:focus-visible { background: var(--surface-2); outline: none; }
.menu .i { color: var(--ink-3); }
.menu kbd { margin-left: auto; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.menu-title { font: 500 10.5px var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 8px 10px 4px; }
.notif { width: 340px; }
.notif-item { display: grid !important; grid-template-columns: 8px 1fr; gap: 10px !important; align-items: start !important; }
.notif-item .u { width: 7px; height: 7px; border-radius: 50%; background: var(--clem); margin-top: 6px; }
.notif-item.read .u { background: transparent; }
.notif-item small { display: block; color: var(--ink-3); font-size: 11.5px; margin-top: 2px; }

.palette { position: fixed; z-index: 71; top: 12vh; left: 50%; transform: translateX(-50%); width: min(580px, calc(100vw - 24px)); background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-pop), 0 0 0 1px var(--line); overflow: hidden; animation: pop .25s var(--spring); }
.palette-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.palette-in input { flex: 1; height: 52px; border: 0; background: none; outline: none; font-size: 15px; }
.palette-list { max-height: 380px; overflow-y: auto; padding: 6px; }
.palette-group { font: 500 10.5px var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 10px 10px 4px; }
.palette-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.palette-item[aria-selected="true"] { background: var(--surface-2); }
.palette-item .grow { flex: 1; min-width: 0; }
.palette-item small { color: var(--ink-3); font-size: 11.5px; }
.palette-item mark { background: var(--clem-soft); color: inherit; border-radius: 2px; }
.palette-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-3); }

.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 6px 6px 6px 14px; background: var(--ink); color: var(--on-ink); border-radius: 8px; box-shadow: var(--shadow-pop); font-size: 12.5px; animation: toastIn .35s var(--spring); max-width: calc(100vw - 32px); }
.toast.no-action { padding-right: 14px; }
.toast .i { width: 15px; height: 15px; }
.toast.warn .i { color: var(--peel); }
.toast.ok .i { color: #9CD39F; }
.toast button { height: 28px; padding: 0 10px; border-radius: 5px; background: color-mix(in srgb, var(--on-ink) 14%, transparent); font-weight: 600; font-size: 12px; }
.toast button:hover { background: color-mix(in srgb, var(--on-ink) 24%, transparent); }
.toast.out { animation: toastOut .25s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

.demo-flag { position: fixed; right: 14px; bottom: 14px; z-index: 15; margin: 0; font: 500 10.5px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); background: var(--surface); padding: 7px 9px; border-radius: 5px; box-shadow: 0 0 0 1px var(--line); }

/* Invoice drawer */
.inv-paper { position: relative; background: var(--bg); border-radius: var(--radius); padding: 18px; box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 14px; overflow: hidden; }
.inv-paper header { display: flex; justify-content: space-between; gap: 10px; }
.inv-paper header b { font: 650 16px var(--f-display); }
.inv-paper small { color: var(--ink-3); font-size: 11.5px; display: block; }
.inv-lines { display: grid; gap: 6px; font-size: 12.5px; }
.inv-lines div { display: flex; justify-content: space-between; gap: 10px; }
.inv-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--line-strong); padding-top: 12px; }
.inv-total b { font: 600 24px var(--f-display); letter-spacing: -.02em; }
.stamp { position: absolute; right: 22px; top: 74px; transform: rotate(-11deg); font: 700 22px/1 var(--f-display); letter-spacing: .12em; color: var(--sage-ink); border: 3px solid currentColor; border-radius: 6px; padding: 6px 12px 5px; opacity: .85; text-align: center; mix-blend-mode: multiply; animation: stampIn .5s var(--spring) both; }
:root[data-theme="dark"] .stamp { mix-blend-mode: normal; }
.stamp small { font: 600 8.5px var(--f-mono); letter-spacing: .1em; color: inherit !important; }
@keyframes stampIn { from { opacity: 0; transform: rotate(-11deg) scale(1.8); } }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size: 12.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }

/* Settings */
.settings-card { max-width: 820px; }
.settings-card .cell-head { margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); align-items: center; }
.form-actions .dirty { margin-right: auto; font-size: 12px; color: var(--peel-ink); display: flex; align-items: center; gap: 6px; }
.form-actions .dirty::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--peel); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.set-row:first-child { border-top: 0; padding-top: 0; }
.set-row b { font-weight: 550; display: block; }
.set-row small { color: var(--ink-3); font-size: 12px; }
.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.theme-opt { border-radius: 8px; padding: 8px; box-shadow: inset 0 0 0 1px var(--line-strong); text-align: left; display: grid; gap: 8px; background: var(--surface); }
.theme-opt[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--clem); }
.theme-opt .pv { height: 70px; border-radius: 5px; display: grid; grid-template-columns: 24% 1fr; gap: 4px; padding: 5px; }
.theme-opt .pv i { border-radius: 3px; display: block; }
.theme-opt span { font-size: 12.5px; font-weight: 550; padding: 0 2px 2px; }
.data-stats { grid-template-columns: repeat(6, 1fr); margin-bottom: 20px; }
.data-stats div { padding: 12px 14px; }
.data-stats b { font: 600 22px/1 var(--f-display); display: block; }
.data-stats small { color: var(--ink-3); font-size: 11.5px; }

/* Messages */
.inbox { grid-template-columns: 300px minmax(0, 1fr); min-height: 520px; }
.thread-list { list-style: none; margin: 0; padding: 0; }
.thread-list button { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; width: 100%; padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.thread-list button:hover { background: var(--surface-2); }
.thread-list button[aria-current="true"] { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--clem); }
.thread-list b { font-weight: 550; display: block; }
.thread-list small { color: var(--ink-3); font-size: 11.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-list .unread b::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--clem); margin-left: 6px; vertical-align: middle; }
.convo { display: flex; flex-direction: column; }
.convo-body { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 460px; }
.bubble { max-width: 70%; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.bubble small { display: block; color: var(--ink-3); font-size: 10.5px; margin-top: 4px; }
.bubble.me { align-self: flex-end; background: var(--ink); color: var(--on-ink); }
.bubble.me small { color: color-mix(in srgb, var(--on-ink) 60%, transparent); }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }

/* Outcomes */
.line-chart { width: 100%; height: 220px; }
.line-chart text { font: 500 10px var(--f-mono); fill: var(--ink-3); }

.reveal { animation: reveal .5s var(--ease) both; }
@keyframes reveal { from { transform: translateY(6px); } }

/* ═════════ Soft Clinic skin ═════════
   Rounded off-white cards on warm stone, pastel stat tiles,
   tinted visit blocks, springy motion. */
body { font-size: 14px; letter-spacing: -.003em; font-feature-settings: "tnum" 1; }
.mono { font-family: var(--f-ui); font-variant-numeric: tabular-nums; letter-spacing: 0; }

.sidebar { background: var(--side-bg); border-right: 0; padding: 18px 12px 14px; }
.brand-text b { font: 600 18px/1 var(--f-display); letter-spacing: -.03em; }
.nav-label { font: 600 11px/1 var(--f-ui); letter-spacing: .09em; padding: 8px 12px 8px; }
.nav-item { height: 40px; border-radius: 12px; font-size: 14.5px; gap: 12px; padding: 0 10px 0 12px; transition: background .2s, color .2s, box-shadow .2s; }
.nav-item:hover { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.nav-item[aria-current="page"] { background: var(--surface); box-shadow: var(--shadow-card); font-weight: 500; }
.nav-item[aria-current="page"]::before { display: none; }
.nav-item .i { width: 18px; height: 18px; }
.nav-sub .nav-item[aria-current="page"] { box-shadow: none; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.nav-count { font: 600 11.5px/1 var(--f-ui); min-width: 24px; height: 24px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--peel-soft); color: var(--peel-ink); }
.nav-count.hot { background: var(--clem); color: #fff; }
.nav-sub { border-left-style: dashed; }
.seen { border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow-card); background: var(--surface); }
.seen-top b { font: 600 22px/1 var(--f-display); }
.seen-top b small { font: 500 13px var(--f-ui); }
.seen-bar { height: 7px; border-radius: 4px; }
.side-foot { border-top: 0; }
.user-card { border-radius: 14px; padding: 8px; }

.topbar { height: 76px; padding: 0 32px; border-bottom: 0; background: color-mix(in srgb, var(--bg) 82%, transparent); }
.search { height: 46px; width: min(400px, 34vw); border-radius: 16px; padding: 0 8px 0 14px; gap: 10px; background: var(--surface); box-shadow: var(--shadow-card); font-size: 15px; }
.search:hover { box-shadow: var(--shadow-pop); }
.search .i { width: 19px; height: 19px; }
kbd { font: 600 11.5px/1 var(--f-ui); padding: 6px 7px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--surface-2); }
.next-chip { height: 46px; border-radius: 14px; padding: 0 14px 0 12px; font-size: 12.5px; }
.next-chip b { font-weight: 600; font-size: 13.5px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; }
.icon-btn .i { width: 19px; height: 19px; }
main { padding: 18px 32px 72px; }

.btn { height: 40px; padding: 0 16px; border-radius: 13px; font-weight: 500; font-size: 14px; gap: 8px; transition: background .2s, box-shadow .2s, transform .35s var(--spring); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn .i { width: 17px; height: 17px; }
.btn-line { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card); }
.btn-ink { box-shadow: 0 6px 14px -8px rgba(35,32,28,.6); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.done { border-radius: 10px; }

.seg { padding: 4px; border-radius: 15px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { height: 34px; padding: 0 14px; border-radius: 11px; font-size: 14px; font-weight: 500; transition: background .2s, box-shadow .25s, color .2s; }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { box-shadow: var(--shadow-card), inset 0 0 0 1px var(--line); }
.tabs { gap: 6px; border-bottom: 0; margin-bottom: 20px; }
.tab { height: 38px; padding: 0 16px; border-radius: 12px; font-size: 14.5px; transition: background .2s, color .2s; }
.tab[aria-selected="true"] { background: var(--surface); box-shadow: var(--shadow-card); }
.tab[aria-selected="true"]::after { display: none; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; box-shadow: inset 0 0 0 1px var(--line-strong); transition: background .2s, color .2s, transform .3s var(--spring); }
.chip:active { transform: scale(.96); }
.chip .avatar { width: 22px; height: 22px; font-size: 9.5px; }
.chip .n { font: 600 11.5px var(--f-ui); }
.tag { height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.avatar { width: 34px; height: 34px; font-size: 12px; font-weight: 600; }
.avatar.sm { width: 28px; height: 28px; font-size: 10.5px; }

.input, .select { height: 44px; border-radius: 13px; padding: 0 14px; font-size: 14.5px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.field label, .field .label { font-size: 13px; font-weight: 500; }

.page-head { margin-bottom: 26px; }
.page-head h1 { font: 600 clamp(30px, 3.2vw, 44px)/1.06 var(--f-display); letter-spacing: -.035em; }
.page-head h1 em { color: inherit; }
.page-head p { font-size: 16px; margin-top: 10px; color: var(--ink-2); }

.board { background: none; box-shadow: none; border-radius: 0; overflow: visible; gap: 18px; margin-bottom: 18px; }
.board > * { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.cell { padding: 24px 26px; }
.cell-head { margin-bottom: 18px; }
.cell-head h2 { font: 500 19px/1.2 var(--f-display); letter-spacing: -.025em; }
.cell-head p { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.cell-head .link { font-size: 13.5px; }
.cell-foot { border-top: 1px solid var(--line); font-size: 13px; padding-top: 16px; margin-top: 16px; }

/* stat tiles */
.kpi { padding: 20px 22px 18px; box-shadow: none !important; transition: transform .45s var(--spring); }
.kpi:hover { transform: translateY(-3px); }
.kpi { grid-template-columns: 1fr; }
.kpi:nth-child(1) { background: var(--sage-soft); }
.kpi:nth-child(2) { background: var(--clem-soft); }
.kpi:nth-child(3) { background: var(--sky-soft); }
.kpi:nth-child(4) { background: var(--peel-soft); }
.kpi-spark { grid-row: 3; width: 100%; height: 30px; margin-top: 14px; }
.kpi-delta { grid-row: 4; }
.kpi-label { font-size: 15px; color: var(--ink-2); gap: 10px; margin-bottom: 12px; }
.kpi-label .sw { display: none; }
.kpi-label .i { width: 20px; height: 20px; color: var(--ink-2); }
.kpi-val { font: 500 42px/1 var(--f-display); letter-spacing: -.04em; }
.kpi-val small { font: 500 18px var(--f-display); }
.kpi-delta { font-size: 14px; color: var(--ink-2); margin-top: 14px; gap: 8px; }
.delta { font: 600 13px var(--f-ui); padding: 0; background: none !important; }
.delta.up { color: var(--sage-ink); }

/* floor timeline */
.lanes-axis { height: 34px; font: 500 14px var(--f-ui); color: var(--ink-2); }
.lanes-axis .label { font: 600 12.5px var(--f-ui); letter-spacing: .08em; color: var(--ink-2); padding-bottom: 9px; }
.axis-track span { bottom: 9px; }
.lane { height: 58px; }
.lane:last-child { border-bottom: 0; }
.lane-who b { font-size: 15px; font-weight: 500; }
.lane-track { background-image: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px calc(100% / var(--hours))); -webkit-mask: none; }
.lane-track .past { background: none; }
.visit { top: 10px; height: 38px; border-radius: 19px; padding: 0 10px 0 9px; gap: 6px; font-size: 13.5px; font-weight: 500; }
.kpi-spark svg, .mini-spark svg { width: 100%; height: 100%; }
.axis-track span:first-child { transform: translateX(6px); }
.visit::before { width: 9px; height: 9px; }
.visit .mark { width: 18px; height: 18px; }
.visit .mark svg { width: 11px; height: 11px; }
.visit.dragging { box-shadow: inset 0 0 0 1.5px var(--vc), var(--shadow-pop); }
.now-line { top: 34px; width: 2px; background: var(--clem); }
.now-line::before { top: -32px; left: -38px; width: 78px; height: 30px; font: 600 13.5px/30px var(--f-ui); color: #fff; border-radius: 999px; box-shadow: 0 6px 14px -6px var(--clem); }
.now-line::after { display: none; }
.drag-hint { font: 600 12px/1 var(--f-ui); padding: 7px 10px; border-radius: 9px; }
.legend { font-size: 14px; color: var(--ink-2); gap: 6px 22px; }
.legend span::before { width: 11px; height: 11px; border-radius: 3px; }

/* up next */
.inroom-box { border-radius: 16px; padding: 14px 16px; }
.inroom-box h3 { font: 600 12px var(--f-ui); letter-spacing: .08em; }
.inroom-list li { padding: 4px 12px 4px 4px; border-radius: 999px; font-size: 13.5px; box-shadow: var(--shadow-card); }
.queue li { grid-template-columns: 58px minmax(0, 1fr) auto; padding: 12px 0; }
.queue time { font: 600 22px/1 var(--f-display); letter-spacing: -.03em; }
.queue time small { font: 600 10.5px var(--f-ui); letter-spacing: .06em; }
.queue b { font-size: 15px; font-weight: 500; }
.queue .meta { font-size: 13px; }
.queue .meta::before { border-radius: 3px; width: 8px; height: 8px; }

.rows li { padding: 11px 0; gap: 12px; }
.rows b { font-weight: 500; font-size: 14.5px; }
.rows small { font-size: 12.5px; }
.area-row { grid-template-columns: 34px minmax(0, 1fr) 1.2fr 30px; gap: 12px; }
.area-row .ico { width: 34px; height: 34px; border-radius: 10px; }
.area-row b { font-size: 14px; font-weight: 500; }
.area-row .bar { height: 9px; border-radius: 6px; }
.area-row .bar i { border-radius: 6px; }
.area-row .n { font: 600 15px var(--f-ui); }
.clin-mix span { font: 600 12.5px var(--f-ui); }
.week-chart { height: 200px; gap: 18px; }
.week-bar { border-radius: 12px; width: min(56px, 100%); }
.week-col small { font: 600 12px var(--f-ui); letter-spacing: .06em; }
.week-tip { font: 600 12px var(--f-ui); border-radius: 8px; padding: 6px 9px; }
.feed li { padding: 8px 0; grid-template-columns: 34px 1fr; gap: 12px; }
.feed::before { left: 16px; }
.feed .dot { width: 33px; height: 33px; }
.feed small { font-size: 12.5px; }

/* schedule */
.day-strip { gap: 12px; }
.day-btn { border-radius: 18px; padding: 14px 16px; background: var(--surface); box-shadow: var(--shadow-card); transition: box-shadow .25s, transform .4s var(--spring); }
.day-btn:hover { transform: translateY(-2px); }
.day-btn .dow { font: 600 12px var(--f-ui); letter-spacing: .08em; }
.day-btn .dnum { font: 500 28px/1 var(--f-display); letter-spacing: -.04em; }
.day-btn .load { height: 5px; border-radius: 3px; }
.day-btn[aria-pressed="true"] { box-shadow: var(--shadow-pop); }
.day-btn.is-today .dow::after { color: var(--clem-ink); }
.stat-trio { border-radius: 16px; gap: 10px; background: none; box-shadow: none; }
.stat-trio div { border-radius: 14px; background: var(--surface-2); padding: 12px 14px; }
.stat-trio b { font: 500 26px/1 var(--f-display); }
.gap-row { border-radius: 14px; padding: 10px 12px; }
.gap-row time { font: 600 14px var(--f-ui); }
.list-row { font-size: 14px; padding: 12px 6px; }

/* plans */
.plan-board { gap: 16px; }
.plan-col { border-radius: 22px; padding: 12px; background: var(--surface-2); box-shadow: none; }
.plan-col-head b { font: 500 16px var(--f-display); }
.plan-col-head .num { width: 24px; height: 24px; line-height: 24px; font: 600 12px/24px var(--f-ui); }
.plan-card { border-radius: 16px; padding: 14px; box-shadow: var(--shadow-card); transition: transform .45s var(--spring), box-shadow .25s; }
.plan-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.plan-card-top b { font-weight: 500; font-size: 14.5px; }
.ring { width: 40px; height: 40px; }
.ring span { font: 600 10.5px var(--f-ui); }
.ex-card { border-radius: 20px; box-shadow: var(--shadow-card); transition: transform .45s var(--spring); }
.ex-card:hover { transform: translateY(-3px); }
.ex-art { height: 130px; margin: 8px 8px 0; border-radius: 14px; }
.ex-body b { font: 500 16px var(--f-display); }

/* tables & billing */
th { font: 600 12px var(--f-ui); letter-spacing: .07em; padding: 12px 16px; }
td { padding: 13px 16px; font-size: 14px; }
.who b { font-weight: 500; }
.toolbar { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.inline-search { height: 40px; border-radius: 13px; width: min(300px, 100%); }
.money-sum .big { font: 500 54px/1 var(--f-display); letter-spacing: -.05em; }
.aging { height: 14px; gap: 4px; }
.aging i { border-radius: 7px; }
.aging-key b { font: 600 16px var(--f-ui); }
.claim { padding: 18px 20px; }
.claim-tile { padding: 22px 24px; }
.claim-tile b { font: 500 34px/1 var(--f-display); letter-spacing: -.04em; }
.claim-tiles > :nth-child(1) { background: var(--sky-soft); box-shadow: none; }
.claim-tiles > :nth-child(2) { background: var(--clem-soft); box-shadow: none; }
.claim-tiles > :nth-child(3) { background: var(--sage-soft); box-shadow: none; }
.step i { width: 22px; height: 22px; }
.step { font-size: 12.5px; }
.track::before, .track .fill { top: 10px; height: 3px; border-radius: 2px; }

/* layers */
.overlay { background: color-mix(in srgb, #1b1611 30%, transparent); backdrop-filter: blur(2px); }
.modal { border-radius: 24px; }
.modal-head { padding: 24px 24px 4px; }
.modal-head h2 { font: 500 22px var(--f-display); letter-spacing: -.03em; }
.modal-body { padding: 16px 24px; }
.modal-foot { padding: 14px 24px 22px; }
.drawer { top: 10px; right: 10px; bottom: 10px; border-radius: 24px; width: min(460px, calc(100vw - 20px)); animation: drawerIn .5s var(--spring); }
.drawer.closing { animation: drawerOut .22s var(--ease) forwards; }
@keyframes drawerIn { from { transform: translateX(110%); } }
@keyframes drawerOut { to { transform: translateX(110%); } }
.drawer-head { padding: 20px 22px; }
.drawer-head h2 { font: 500 22px var(--f-display); letter-spacing: -.03em; }
.drawer-body { padding: 22px; }
.inv-paper { border-radius: 16px; background: var(--surface-2); }
.menu { border-radius: 16px; padding: 6px; }
.menu button, .menu a { border-radius: 10px; padding: 9px 11px; font-size: 14px; }
.palette { border-radius: 22px; }
.palette-in input { height: 60px; font-size: 17px; }
.palette-item { border-radius: 12px; padding: 10px 12px; }
.toast { border-radius: 16px; min-height: 48px; padding: 6px 6px 6px 16px; font-size: 14px; }
.toast button { height: 36px; border-radius: 11px; padding: 0 14px; font-size: 13px; }
.demo-flag { font: 600 11px/1 var(--f-ui); border-radius: 10px; padding: 8px 11px; box-shadow: var(--shadow-card); }
.settings-card .cell { padding: 28px 30px !important; }
.theme-opt { border-radius: 16px; padding: 10px; }
.theme-opt .pv { border-radius: 10px; }
.thread-list button { padding: 14px 16px; }
.bubble { border-radius: 16px; padding: 10px 14px; font-size: 14px; }
.inbox > * { overflow: hidden; }

/* ═════════ Motion ═════════ */
.enter .board > *, .enter .day-strip > *, .enter .plan-col, .enter .ex-card, .enter .tabs {
  animation: cardIn .7s var(--spring) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.enter .page-head h1 { animation: headIn .8s var(--spring) backwards; }
.enter .page-head p { animation: headIn .8s var(--spring) 80ms backwards; }
@keyframes headIn { from { opacity: 0; transform: translateY(10px); } }
.enter .visit { animation: chipIn .55s var(--spring) backwards; animation-delay: calc(240ms + var(--j, 0) * 18ms); }
@keyframes chipIn { from { opacity: 0; transform: scale(.9); } }
.ring svg circle:last-child { animation: ringDraw 1.1s var(--ease) backwards; }
@keyframes ringDraw { from { stroke-dashoffset: var(--c); } }
.spark .line { stroke-dasharray: 1; animation: sparkDraw 1.2s var(--ease) .15s backwards; }
@keyframes sparkDraw { from { stroke-dashoffset: 1; } }
.spark .area { animation: fadeIn .8s var(--ease) .5s backwards; }
@keyframes fadeIn { from { opacity: 0; } }
.now-line::before { animation: nowPop .6s var(--spring) .4s backwards; }
@keyframes nowPop { from { transform: scale(.6); opacity: 0; } }
.badge-dot { animation: dotPop .5s var(--spring) .6s backwards; }
@keyframes dotPop { from { transform: scale(0); } }
.nav-count.hot { animation: dotPop .5s var(--spring) .3s backwards; }
.queue li { transition: background .2s; border-radius: 10px; }
.toast { animation: toastIn .55s var(--spring); }
.modal { animation: pop .5s var(--spring); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.95); } }
.menu { animation: menuIn .35s var(--spring); transform-origin: top right; }
@keyframes menuIn { from { opacity: 0; transform: scale(.94) translateY(-4px); } }
.palette { animation: pop .45s var(--spring); }

/* ───────── Calendar & intake (Clementine Events) ───────── */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; }
.cal-dow { padding: 12px 12px 8px; font: 600 12px var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 112px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: var(--surface-2); }
.cal-day.out .cal-n { color: var(--ink-3); }
.cal-n { font: 600 13px var(--f-ui); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.today .cal-n { background: var(--clem); color: #fff; }
.cal-ev { display: block; width: 100%; text-align: left; font-size: 12px; font-weight: 500; padding: 4px 7px; border-radius: 7px; background: color-mix(in srgb, var(--vc) 16%, var(--surface)); box-shadow: inset 3px 0 0 var(--vc); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transition: transform .3s var(--spring); }
.cal-ev:hover { transform: translateY(-1px); }
.cal-more { font-size: 11.5px; color: var(--ink-3); padding-left: 4px; }
.cal-wrap { overflow-x: auto; }
.plan-meta .i { width: 14px; height: 14px; }
.queue li button[data-open] b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
textarea.input { resize: vertical; line-height: 1.45; padding-bottom: 10px; }

/* intake page */
.intake { max-width: 640px; margin: 0 auto; padding: 40px 20px 80px; }
.intake-head { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.intake-head .brand-mark { width: 40px; height: 40px; }
.intake h1 { font: 600 clamp(28px, 5vw, 38px)/1.1 var(--f-display); letter-spacing: -.035em; margin-bottom: 8px; }
.intake .lead { color: var(--ink-2); font-size: 16px; margin-bottom: 24px; }
.intake form { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-card); padding: 24px; display: grid; gap: 16px; }
.intake fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.intake legend { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.intake .chips label { cursor: pointer; }
.intake .chips input { position: absolute; opacity: 0; pointer-events: none; }
.intake .chips input:checked + span { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.intake .chips input:focus-visible + span { outline: 2px solid var(--clem); outline-offset: 2px; }
.intake .done { text-align: center; padding: 40px 24px; background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-card); }
.intake .done h2 { font: 600 26px var(--f-display); letter-spacing: -.03em; margin: 14px 0 8px; }
.req { color: var(--clem-ink); }

/* ───────── Responsive ───────── */
@media (max-width: 1200px) {
  .today-grid { grid-template-columns: 1fr; }
  .three { grid-template-columns: 1fr 1fr; }
  .three > :last-child { grid-column: 1 / -1; }
  .crumbs { display: none; }
}
@media (max-width: 960px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .two, .money-sum { grid-template-columns: 1fr; }
  .claim { grid-template-columns: 1fr; gap: 12px; }
  .next-chip { display: none; }
  .data-stats { grid-template-columns: repeat(3, 1fr); }
  .inbox { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app, :root[data-sidebar="collapsed"] .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; transform: translateX(-100%); transition: transform .28s var(--ease); box-shadow: var(--shadow-pop); }
  .sidebar.open { transform: none; }
  :root[data-sidebar="collapsed"] .sidebar :is(.brand-text, .nav-text, .nav-count, .nav-caret, .nav-label, .seen, .user-text, .dots) { display: revert; }
  :root[data-sidebar="collapsed"] .nav-item { justify-content: flex-start; padding: 0 8px 0 10px; }
  :root[data-sidebar="collapsed"] .brand { flex-direction: row; }
  .scrim { position: fixed; inset: 0; background: rgba(13,21,16,.4); z-index: 29; }
  .collapse-btn { display: none; }
  .icon-btn.menu-btn { display: inline-grid; }
  .topbar { padding: 0 12px; gap: 6px; }
  .search { width: auto; flex: 1; }
  .search kbd { display: none; }
  main { padding: 20px 16px 72px; }
  .day-strip { grid-template-columns: repeat(6, minmax(92px, 1fr)); overflow-x: auto; }
  .three { grid-template-columns: 1fr; }
  .cal { min-width: 680px; }
  .cal-day { min-height: 84px; }
}
@media (max-width: 560px) {
  #newBtn { padding: 0 10px; }
  .search { flex: 0 0 auto; width: 34px; padding: 0; justify-content: center; box-shadow: none; background: none; }
  .search-label { display: none; }
  .top-actions { gap: 2px; }
  .cell { padding: 14px; }
  .cell-head { flex-wrap: wrap; }
  .lanes { --who: 92px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 12px; }
  .kpi-val { font-size: 26px; }
  .kpi-spark { display: none; }
  .grid2, .form-grid { grid-template-columns: 1fr; }
  .theme-pick { grid-template-columns: 1fr; }
  .data-stats { grid-template-columns: repeat(2, 1fr); }
  .claim-tiles { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 26px; }
  .demo-flag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .sidebar, .topbar, .demo-flag, .toasts, .overlay, .drawer-foot, .drawer-head button { display: none !important; }
  .drawer { position: static; width: auto; box-shadow: none; animation: none; }
  .app { display: block; }
  body.printing main { display: none; }
}

.intake [hidden] { display: none !important; }
