@font-face { font-family: 'Instrument Sans'; src: url(/fonts/instrument.woff2) format('woff2'); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Sans'; src: url(/fonts/instrument-ext.woff2) format('woff2'); font-weight: 400 700; font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Instrument Sans'; src: url(/fonts/instrument-italic.woff2) format('woff2'); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url(/fonts/bricolage.woff2) format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'Bricolage Grotesque'; src: url(/fonts/bricolage-ext.woff2) format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0100-024F, U+20A0-20C0; }

:root {
  --brand: #0e6e7a;
  --brand-ink: #ffffff;
  --brand-soft: color-mix(in srgb, var(--brand) 11%, var(--surface));
  --brand-line: color-mix(in srgb, var(--brand) 30%, var(--surface));
  --brand-text: color-mix(in srgb, var(--brand) 82%, var(--ink));

  --bg: #f2f4f2;
  --surface: #ffffff;
  --surface-2: #f8f9f8;
  --sunk: #eaedea;
  --line: #e1e5e2;
  --line-2: #cfd6d1;
  --ink: #16201b;
  --ink-2: #4c5852;
  --ink-3: #7b8680;

  --marigold: #e89a00;
  --marigold-soft: #fcf0d6;
  --green: #1d8549;
  --green-soft: #e1f2e6;
  --amber: #a96500;
  --amber-soft: #fbefd9;
  --red: #bf372c;
  --red-soft: #fae5e2;
  --blue: #2c62b0;
  --blue-soft: #e4edf9;
  --violet: #6a4cb8;
  --violet-soft: #ede9fa;
  --grey-soft: #eceeec;

  --f-ui: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-display: 'Bricolage Grotesque', 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --r-sm: 7px;
  --r: 10px;
  --r-lg: 16px;
  --shadow-1: 0 1px 2px rgb(16 24 20 / 0.05);
  --shadow-pop: 0 10px 30px -8px rgb(16 24 20 / 0.22), 0 2px 6px rgb(16 24 20 / 0.06);
  --sidebar: 244px;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --brand-ink: #ffffff;
  --bg: #121614;
  --surface: #1a1f1c;
  --surface-2: #1f2522;
  --sunk: #151a17;
  --line: #2a312d;
  --line-2: #39423d;
  --ink: #e8ece9;
  --ink-2: #a9b3ad;
  --ink-3: #7d8882;
  --brand-text: color-mix(in srgb, var(--brand) 55%, white);
  --brand-soft: color-mix(in srgb, var(--brand) 22%, var(--surface));
  --marigold-soft: #3a2c10;
  --green: #4cbd7d;
  --green-soft: #183223;
  --amber: #e2a43c;
  --amber-soft: #3a2b12;
  --red: #ef6e62;
  --red-soft: #3c1e1b;
  --blue: #74a6ec;
  --blue-soft: #1a2a40;
  --violet: #a993ef;
  --violet-soft: #2a2442;
  --grey-soft: #262d29;
  --shadow-pop: 0 12px 34px -8px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 400 14.5px/1.5 var(--f-ui); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: 'ss01', 'cv11'; }
body.modal-open { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 600; }
h1 { font: 650 26px/1.15 var(--f-display); letter-spacing: -0.015em; }
h2 { font-size: 15.5px; letter-spacing: -0.005em; }
h3 { font-size: 14px; }
p { margin: 0; }
a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-size: 0.92em; background: var(--sunk); padding: 1px 5px; border-radius: 5px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.icon { flex: none; display: block; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lead-text { font-size: 15px; color: var(--ink-2); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 14px 10px 12px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); background: var(--surface); scrollbar-width: thin; }
.ws { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.ws-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font: 700 14px var(--f-display); flex: none; overflow: hidden; }
.ws-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ws-name { font: 650 14.5px/1.15 var(--f-display); letter-spacing: -0.01em; }
.ws-sub { font-size: 11.5px; color: var(--ink-3); }
.nav-group { margin-top: 10px; }
.nav-label { font-size: 12px; color: var(--ink-3); padding: 4px 10px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; position: relative; }
.nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav a.on { background: var(--brand-soft); color: var(--brand-text); }
.nav a.on::before { content: ''; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav .badge { margin-left: auto; background: var(--red); color: #fff; border-radius: 10px; font-size: 11px; font-weight: 700; padding: 0 6px; min-width: 18px; text-align: center; line-height: 18px; }
.nav .badge.quiet { background: var(--sunk); color: var(--ink-2); }
.side-foot { margin-top: auto; padding: 10px 6px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .who small { color: var(--ink-3); font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 22px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.search-btn { flex: 1; max-width: 440px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; color: var(--ink-3); cursor: text; }
.search-btn kbd { margin-left: auto; font: 500 11px var(--f-ui); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; color: var(--ink-3); }
.topbar .spacer { flex: 1; }
.menu-btn { display: none !important; }
.page { padding: 26px 30px 80px; max-width: 1320px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-2); margin-top: 6px; }
.crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumb a { color: var(--ink-2); }

/* Check-in pill in the top bar */
.daypill { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; white-space: nowrap; }
.daypill .dotlive { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.daypill.out .dotlive { background: var(--ink-3); box-shadow: none; }
.daypill b { font-weight: 600; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 550; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background 0.12s, border-color 0.12s, transform 0.06s; }
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, black); border-color: color-mix(in srgb, var(--brand) 88%, black); }
.btn-good { background: var(--green); border-color: var(--green); color: #fff; }
.btn-good:hover { background: color-mix(in srgb, var(--green) 88%, black); }
.btn-warn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 35%, transparent); color: var(--amber); }
.btn-danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--sunk); border-color: transparent; color: var(--ink); }
.btn-wa { background: #1d9e55; border-color: #1d9e55; color: #fff; }
.btn-wa:hover { background: #178747; }
.btn-marigold { background: var(--marigold); border-color: var(--marigold); color: #1d1a10; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15.5px; border-radius: 11px; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }
.spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
input[type='text'], input[type='email'], input[type='password'], input[type='number'], input[type='date'], input[type='time'], input[type='month'], input[type='url'], input[type='search'], input[type='tel'], select, textarea, input:not([type]) {
  width: 100%; min-height: 38px; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); outline: none; transition: border-color 0.12s, box-shadow 0.12s;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input[type='checkbox'] { width: 17px; height: 17px; accent-color: var(--brand); margin: 0; flex: none; }
input[type='color'] { width: 44px; height: 38px; border: 1px solid var(--line-2); border-radius: 9px; padding: 3px; background: var(--surface); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field-label .hint { font-weight: 400; color: var(--ink-3); }
.field-error { color: var(--red); font-size: 12.5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-error { margin-top: 14px; display: flex; gap: 8px; align-items: flex-start; color: var(--red); background: var(--red-soft); border-radius: 9px; padding: 10px 12px; font-size: 13.5px; }
.check-row { display: flex; align-items: center; gap: 9px; min-height: 38px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form > * { flex: 1; min-width: 140px; }
.inline-form > .btn { flex: none; }

/* ---------- panels, stats, chips ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); min-width: 0; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.panel-head p { color: var(--ink-3); font-size: 13px; margin-top: 3px; }
.panel-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.panel-body { padding: 14px 18px 18px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split .stack > .panel .stats { grid-template-columns: 1fr 1fr; }
.react-add { opacity: .6; }
.react-pick { display: inline-flex; gap: 4px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.mt { margin-top: 18px; }
.mt-s { margin-top: 10px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { display: block; position: relative; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); }
a.stat:hover { border-color: var(--line-2); text-decoration: none; }
.stat-value { font: 650 25px/1.1 var(--f-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.stat-sub { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.stat-icon { position: absolute; right: 14px; top: 14px; color: var(--ink-3); }
.stat.tone-red .stat-value { color: var(--red); }
.stat.tone-amber .stat-value { color: var(--amber); }
.stat.tone-green .stat-value { color: var(--green); }

.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--grey-soft); color: var(--ink-2); }
.tone-brand.chip { background: var(--brand-soft); color: var(--brand-text); }
.tone-green.chip { background: var(--green-soft); color: var(--green); }
.tone-amber.chip { background: var(--amber-soft); color: var(--amber); }
.tone-red.chip { background: var(--red-soft); color: var(--red); }
.tone-blue.chip { background: var(--blue-soft); color: var(--blue); }
.tone-violet.chip { background: var(--violet-soft); color: var(--violet); }
.tone-marigold.chip { background: var(--marigold-soft); color: color-mix(in srgb, var(--marigold) 75%, var(--ink)); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; background: var(--line-2); }
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-red { background: var(--red); }

.avatar { border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-weight: 650; object-fit: cover; color: hsl(var(--hue) 45% 30%); background: hsl(var(--hue) 55% 90%); }
:root[data-theme='dark'] .avatar { color: hsl(var(--hue) 60% 82%); background: hsl(var(--hue) 30% 26%); }
.person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.person-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.person-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-text small { color: var(--ink-3); font-size: 12px; }
.avatars { display: flex; }
.avatars .avatar { border: 2px solid var(--surface); margin-left: -6px; }
.avatars .avatar:first-child { margin-left: 0; }

.progress { height: 6px; border-radius: 6px; background: var(--sunk); overflow: hidden; min-width: 60px; }
.progress span { display: block; height: 100%; background: var(--brand); border-radius: 6px; transition: width 0.3s; }
.progress.tone-red span { background: var(--red); }
.progress.tone-amber span { background: var(--amber); }
.progress.tone-green span { background: var(--green); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 550; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--brand); }
.tabs .count { background: var(--sunk); color: var(--ink-2); font-size: 11.5px; border-radius: 10px; padding: 0 7px; line-height: 18px; }
.seg { display: inline-flex; background: var(--sunk); padding: 3px; border-radius: 10px; gap: 2px; }
.seg button, .seg a { border: 0; background: none; padding: 5px 12px; border-radius: 8px; font-weight: 550; font-size: 13px; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.seg .on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* ---------- tables & lists ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--surface-2); }
table.t td.num, table.t th.num { text-align: right; }
.panel table.t th:first-child, .panel table.t td:first-child { padding-left: 18px; }
.panel table.t th:last-child, .panel table.t td:last-child { padding-right: 18px; }

.rows > * { border-top: 1px solid var(--line); }
.rows > *:first-child { border-top: 0; }
.trow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 18px; cursor: pointer; color: var(--ink); }
.trow:hover { background: var(--surface-2); text-decoration: none; }
.trow-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.trow-title .client { color: var(--ink-3); font-weight: 500; }
.trow-sub { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; font-size: 12.5px; color: var(--ink-2); }
.trow-side { display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.due-late { color: var(--red); font-weight: 600; }
.due-today { color: var(--ink); font-weight: 600; }

.group { margin-top: 18px; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 10px; }
.group-head h2 { display: flex; align-items: center; gap: 8px; }
.group-head .count { font: 600 12px var(--f-ui); background: var(--sunk); color: var(--ink-2); padding: 0 8px; border-radius: 10px; line-height: 20px; }

.empty { text-align: center; padding: 34px 20px; color: var(--ink-2); }
.empty-icon { width: 46px; height: 46px; border-radius: 14px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); }
.empty-title { font-weight: 650; color: var(--ink); font-size: 15px; }
.empty-text { margin-top: 4px; font-size: 13.5px; max-width: 46ch; margin-inline: auto; }
.empty .btn { margin-top: 14px; }
.loading { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--sunk), var(--surface-2), var(--sunk)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.errorbox { display: flex; align-items: center; gap: 10px; padding: 14px 16px; color: var(--red); background: var(--red-soft); border-radius: var(--r); }
.note { font-size: 13px; padding: 9px 12px; border-radius: 9px; background: var(--sunk); color: var(--ink-2); }
.note.warn { background: var(--amber-soft); color: var(--amber); }
.note.bad { background: var(--red-soft); color: var(--red); }
.note.good { background: var(--green-soft); color: var(--green); }
.note.info { background: var(--blue-soft); color: var(--blue); }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 11px; font-size: 13.5px; }
.callout.bad { background: var(--red-soft); color: var(--red); }
.callout.warn { background: var(--amber-soft); color: var(--amber); }
.callout.good { background: var(--green-soft); color: var(--green); }
.callout.info { background: var(--blue-soft); color: var(--blue); }

/* ---------- modal, toast, menus ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgb(10 16 13 / 0.42); display: grid; place-items: start center; padding: 6vh 16px 16px; overflow-y: auto; animation: fade 0.12s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 620px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-pop); animation: pop 0.16s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes pop { from { transform: translateY(8px) scale(0.985); opacity: 0; } }
.modal-wide { max-width: 860px; }
.modal-sm { max-width: 440px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 10px; }
.modal-head h2 { font: 650 19px/1.2 var(--f-display); letter-spacing: -0.01em; }
.modal-head p { color: var(--ink-2); font-size: 13.5px; margin-top: 4px; }
.modal-body { padding: 8px 20px 18px; }
.modal-foot { display: flex; gap: 8px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 16px 16px; }
.toasts { position: fixed; z-index: 100; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 11px; box-shadow: var(--shadow-pop); font-weight: 550; max-width: min(92vw, 560px); animation: pop 0.16s; }
.toast-error { background: var(--red); color: #fff; }
.popover { position: absolute; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-pop); }
.menu { padding: 6px; min-width: 210px; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: none; padding: 8px 10px; border-radius: 8px; color: var(--ink); cursor: pointer; text-align: left; font-weight: 500; }
.menu button:hover, .menu a:hover { background: var(--sunk); text-decoration: none; }
.menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.notif { right: 18px; top: 52px; width: min(400px, calc(100vw - 24px)); max-height: 72vh; display: flex; flex-direction: column; }
.notif-list { overflow-y: auto; }
.notif-item { display: flex; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line); cursor: pointer; font-size: 13.5px; color: var(--ink); }
.notif-item:hover { background: var(--surface-2); text-decoration: none; }
.notif-item.unread { background: color-mix(in srgb, var(--brand-soft) 60%, transparent); }
.notif-item .when { color: var(--ink-3); font-size: 12px; margin-top: 2px; }

/* Command palette */
.palette { position: fixed; z-index: 90; inset: 0; background: rgb(10 16 13 / 0.38); display: grid; place-items: start center; padding: 12vh 16px; }
.palette-box { width: min(620px, 100%); background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-pop); overflow: hidden; }
.palette-box input { border: 0 !important; box-shadow: none !important; font-size: 16.5px; padding: 18px 20px; min-height: 58px; border-bottom: 1px solid var(--line) !important; border-radius: 0; }
.palette-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; cursor: pointer; color: var(--ink); }
.palette-item.on { background: var(--brand-soft); }
.palette-item .kind { font-size: 11.5px; color: var(--ink-3); width: 76px; flex: none; }
.palette-item small { color: var(--ink-3); margin-left: auto; font-size: 12.5px; }

/* ---------- home: your day ---------- */
.hello { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 18px; }
.hello h1 { font-size: 30px; }
.hello .date { color: var(--ink-2); margin-top: 6px; }
.day { position: relative; padding: 20px 22px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.day-top { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; flex-wrap: wrap; position: relative; z-index: 1; }
.day-kicker { color: var(--ink-2); font-size: 13.5px; }
.day-big { font: 680 44px/1 var(--f-display); letter-spacing: -0.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.day-big small { font: 500 15px var(--f-ui); letter-spacing: 0; color: var(--ink-2); margin-left: 6px; }
.day-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.track { position: relative; height: 54px; margin-top: 22px; z-index: 1; }
.track-rail { position: absolute; left: 0; right: 0; top: 18px; height: 10px; border-radius: 10px; background: var(--sunk); }
.track-office { position: absolute; top: 18px; height: 10px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 22%, var(--sunk)); }
.track-worked { position: absolute; top: 18px; height: 10px; border-radius: 10px; background: var(--brand); }
.track-mark { position: absolute; top: 10px; width: 2px; height: 26px; background: var(--ink); border-radius: 2px; transform: translateX(-1px); }
.track-mark.now { background: var(--marigold); width: 3px; }
.track-mark.now::before { content: ''; position: absolute; top: -5px; left: -4px; width: 11px; height: 11px; border-radius: 50%; background: var(--marigold); box-shadow: 0 0 0 4px var(--marigold-soft); }
.track-mark.leave { background: var(--green); }
.track-label { position: absolute; top: 38px; font-size: 11.5px; color: var(--ink-3); transform: translateX(-50%); white-space: nowrap; font-variant-numeric: tabular-nums; }
.track-label.strong { color: var(--ink); font-weight: 600; }
.day-foot { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; color: var(--ink-2); position: relative; z-index: 1; }
.day-foot b { color: var(--ink); font-weight: 600; }

.focus-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.focus { padding: 14px 16px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); display: block; }
a.focus:hover { border-color: var(--line-2); text-decoration: none; }
.focus .n { font: 650 28px/1 var(--f-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.focus .l { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.focus.alert .n { color: var(--red); }
.focus.zero .n { color: var(--ink-3); }

.celebrate { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.celebrate + .celebrate { border-top: 1px solid var(--line); }
.celebrate .when { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }
.celebrate.today .when { color: color-mix(in srgb, var(--marigold) 80%, var(--ink)); font-weight: 650; }
.cake { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--marigold-soft); color: color-mix(in srgb, var(--marigold) 80%, var(--ink)); flex: none; }

.ann { padding: 14px 0; }
.ann + .ann { border-top: 1px solid var(--line); }
.ann-title { font-weight: 650; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ann-body { color: var(--ink-2); margin-top: 6px; font-size: 14px; }
.ann-body p + p { margin-top: 6px; }
.ann-meta { display: flex; gap: 10px; align-items: center; margin-top: 10px; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
.react { display: inline-flex; gap: 4px; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 1px 9px; font-size: 13px; cursor: pointer; }
.react.mine { border-color: var(--brand-line); background: var(--brand-soft); }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--marigold); display: inline-block; }

/* ---------- health tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.tile { display: block; padding: 14px 16px 13px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); position: relative; }
a.tile:hover { text-decoration: none; border-color: var(--line-2); }
.tile-top { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--ink-3); }
.tile-state { display: inline-flex; gap: 6px; align-items: center; font-weight: 650; font-size: 12px; }
.tile-state.green { color: var(--green); }
.tile-state.amber { color: var(--amber); }
.tile-state.red { color: var(--red); }
.tile-value { font: 650 26px/1.1 var(--f-display); letter-spacing: -0.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.tile.red .tile-value { color: var(--red); }
.tile.amber .tile-value { color: var(--amber); }
.tile-label { font-weight: 600; margin-top: 2px; }
.tile-detail { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.tile-target { font-size: 12px; color: var(--ink-3); margin-top: 10px; }

/* ---------- board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(264px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 14px; align-items: start; }
.col { background: var(--sunk); border-radius: 14px; padding: 10px; min-height: 160px; }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px; }
.kcard { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; margin-bottom: 8px; color: var(--ink); box-shadow: var(--shadow-1); }
.kcard:hover { border-color: var(--line-2); text-decoration: none; }
.kcard.late { box-shadow: inset 3px 0 0 var(--red), var(--shadow-1); }
.kcard-client { font-size: 12px; color: var(--ink-3); }
.kcard-title { font-weight: 600; margin: 2px 0 9px; line-height: 1.35; }
.kcard-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.kcard[draggable='true'] { cursor: grab; }
.col.drop { outline: 2px dashed var(--brand); outline-offset: -4px; }

/* ---------- task detail ---------- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); }
.trio > div { padding: 14px 18px; }
.trio > div + div { border-left: 1px solid var(--line); }
.trio .role { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }
.you { font-size: 11px; font-weight: 700; color: var(--brand-text); background: var(--brand-soft); border-radius: 5px; padding: 0 5px; margin-left: 6px; }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 14px; }
.kv dt { color: var(--ink-3); font-size: 13.5px; }
.kv dd { margin: 0; word-break: break-word; }
.next-step { font-size: 13.5px; color: var(--ink-2); margin-bottom: 12px; }
.actions { display: flex; flex-direction: column; gap: 8px; }
.qc-list label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.qc-list label + label { border-top: 1px dashed var(--line); }
.qc-list input { margin-top: 2px; }
.scores { display: flex; gap: 6px; }
.scores button { flex: 1; height: 38px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); cursor: pointer; font-weight: 650; }
.scores button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 11px 18px; border-top: 1px solid var(--line); font-size: 13.5px; }
.timeline li:first-child { border-top: 0; }
.timeline .when { color: var(--ink-3); font-size: 12px; }
.bubble { margin-top: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; padding: 9px 12px; white-space: pre-wrap; }
.subtasks label { display: flex; gap: 10px; align-items: center; padding: 7px 0; }
.subtasks label.done span { color: var(--ink-3); text-decoration: line-through; }
.files { list-style: none; margin: 0; padding: 0; }
.files li { display: flex; align-items: center; gap: 8px; padding: 7px 0; }
.files li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-box { border: 1px solid color-mix(in srgb, #1d9e55 30%, var(--line)); background: color-mix(in srgb, #1d9e55 6%, var(--surface)); border-radius: 13px; padding: 14px 16px; }
.wa-head { display: flex; gap: 8px; align-items: center; color: #178747; }
:root[data-theme='dark'] .wa-head { color: #5dd391; }
.wa-text { white-space: pre-wrap; font: inherit; font-size: 13.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0 12px; max-height: 260px; overflow: auto; }

/* ---------- calendars ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); gap: 1px; }
.cal-dow { background: var(--surface-2); padding: 8px 10px; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.cal-day { background: var(--surface); min-height: 112px; padding: 6px 7px 8px; display: flex; flex-direction: column; gap: 4px; }
.cal-day.other { background: var(--surface-2); }
.cal-day.other .cal-n { color: var(--ink-3); }
.cal-day.today .cal-n { background: var(--brand); color: var(--brand-ink); }
.cal-day.drop { outline: 2px dashed var(--brand); outline-offset: -3px; }
.cal-n { font-size: 12.5px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-item { font-size: 12px; border-radius: 6px; padding: 3px 6px; background: var(--sunk); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; border-left: 3px solid var(--line-2); display: block; }
.cal-item:hover { text-decoration: none; filter: brightness(0.97); }
.cal-item.s-idea { border-left-color: var(--ink-3); }
.cal-item.s-in_progress { border-left-color: var(--blue); }
.cal-item.s-ready_for_approval { border-left-color: var(--violet); }
.cal-item.s-approved { border-left-color: var(--brand); }
.cal-item.s-scheduled { border-left-color: var(--amber); }
.cal-item.s-published { border-left-color: var(--green); }
.cal-item.late { border-left-color: var(--red); background: var(--red-soft); }
.cal-more { font-size: 12px; color: var(--ink-3); }

/* attendance month */
.att-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.att-day { border-radius: 10px; padding: 7px 8px; min-height: 64px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; }
.att-day .n { font-weight: 650; font-size: 13px; }
.att-day .s { margin-top: 3px; color: var(--ink-2); line-height: 1.25; }
.att-day.present { background: var(--green-soft); border-color: transparent; }
.att-day.late_covered { background: color-mix(in srgb, var(--green-soft) 60%, var(--amber-soft)); border-color: transparent; }
.att-day.late_short, .att-day.short, .att-day.missed_out { background: var(--amber-soft); border-color: transparent; }
.att-day.absent { background: var(--red-soft); border-color: transparent; }
.att-day.paid_leave, .att-day.unpaid_leave { background: var(--blue-soft); border-color: transparent; }
.att-day.holiday { background: var(--marigold-soft); border-color: transparent; }
.att-day.off, .att-day.upcoming, .att-day.blank, .att-day.before { background: transparent; border-style: dashed; color: var(--ink-3); }
.att-day.blank { border: 0; }
.att-day.today { box-shadow: 0 0 0 2px var(--brand); }
.register { font-size: 12px; }
.register td, .register th { padding: 5px 4px !important; text-align: center; }
.register td:first-child, .register th:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 140px; }
.rc { display: inline-block; min-width: 26px; border-radius: 5px; padding: 1px 3px; font-weight: 650; font-size: 11px; }
.rc-P { background: var(--green-soft); color: var(--green); }
.rc-L { background: color-mix(in srgb, var(--green-soft) 50%, var(--amber-soft)); color: var(--amber); }
.rc-S, .rc-MO { background: var(--amber-soft); color: var(--amber); }
.rc-A { background: var(--red-soft); color: var(--red); }
.rc-PL, .rc-UL { background: var(--blue-soft); color: var(--blue); }
.rc-H { background: var(--marigold-soft); color: color-mix(in srgb, var(--marigold) 75%, var(--ink)); }
.rc-WO { color: var(--ink-3); }

/* ---------- pipeline ---------- */
.pipeline { display: grid; grid-template-columns: repeat(6, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.lead-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; margin-bottom: 8px; color: var(--ink); cursor: grab; }
.lead-card:hover { border-color: var(--line-2); text-decoration: none; }
.lead-card .v { font: 650 15px var(--f-display); margin-top: 6px; }
.lead-card.due { box-shadow: inset 3px 0 0 var(--marigold); }

/* ---------- charts ---------- */
.chart { width: 100%; }
.chart svg { display: block; overflow: visible; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .ref { stroke: var(--amber); stroke-dasharray: 5 4; stroke-width: 1.5; }
.chart .tick { fill: var(--ink-3); font-size: 11px; font-family: var(--f-ui); }
.chart .bar.tone-brand { fill: var(--brand); }
.chart .bar.tone-green { fill: var(--green); }
.chart .bar.tone-red { fill: var(--red); }
.chart .bar.tone-amber { fill: var(--amber); }
.chart .bar.tone-grey { fill: var(--line-2); }
.chart .bar.tone-marigold { fill: var(--marigold); }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart .pt { fill: var(--surface); stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart .pt-bad { stroke: var(--red); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw.tone-brand { background: var(--brand); }
.sw.tone-grey { background: var(--line-2); }
.sw.tone-marigold { background: var(--marigold); }
.sw.tone-green { background: var(--green); }

/* ---------- markdown ---------- */
.md h2 { font: 650 22px/1.2 var(--f-display); margin: 4px 0 12px; }
.md h3 { font-size: 17px; margin: 22px 0 8px; }
.md h4 { font-size: 15px; margin: 18px 0 6px; }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 22px; }
.md li { margin: 4px 0; }
.md { max-width: 72ch; line-height: 1.65; }

/* ---------- auth screens ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-art { background: var(--brand); color: var(--brand-ink); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::after { content: ''; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid color-mix(in srgb, var(--marigold) 55%, transparent); opacity: 0.55; }
.auth-art h1 { font: 650 44px/1.05 var(--f-display); letter-spacing: -0.03em; max-width: 13ch; color: var(--brand-ink); }
.auth-art p { opacity: 0.85; max-width: 40ch; margin-top: 14px; font-size: 15.5px; }
.auth-side { display: grid; place-items: center; padding: 32px 20px; background: var(--surface); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font: 650 26px/1.15 var(--f-display); letter-spacing: -0.015em; }
.auth-card .sub { color: var(--ink-2); margin-top: 6px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.wizard-steps { display: flex; gap: 6px; margin-bottom: 18px; }
.wizard-steps span { height: 4px; flex: 1; border-radius: 4px; background: var(--sunk); }
.wizard-steps span.on { background: var(--brand); }
.team-rows { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; padding-right: 4px; }
.team-row { display: grid; grid-template-columns: 1.2fr 1.3fr 1fr 1fr 32px; gap: 6px; }
.otp { font-size: 22px !important; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }

/* mobile bottom bar */
.bottombar { display: none; }

@media (max-width: 1180px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .focus-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 70; left: 0; top: 0; width: 280px; transform: translateX(-102%); transition: transform 0.2s; box-shadow: var(--shadow-pop); }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 65; background: rgb(10 16 13 / 0.35); }
  .menu-btn { display: inline-flex !important; }
  .topbar { padding: 0 12px; }
  .search-btn kbd, .search-btn .label { display: none; }
  .search-btn { flex: 0 0 auto; width: 36px; padding: 0; justify-content: center; }
  .page { padding: 18px 16px 96px; }
  .g2, .g3, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .trio { grid-template-columns: 1fr; }
  .trio > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .kv { grid-template-columns: 110px minmax(0, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 28px 24px; min-height: 0; }
  .auth-art h1 { font-size: 30px; }
  .auth-art::after { width: 240px; height: 240px; border-width: 36px; right: -90px; bottom: -110px; }
  .hello h1 { font-size: 25px; }
  .day-big { font-size: 36px; }
  .topbar .daypill, .topbar .daybtn { display: none; }
  .topbar .newbtn span { display: none; }
  .topbar .newbtn { width: 36px; padding: 0; }
  .bottombar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottombar a, .bottombar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink-2); border: 0; background: none; padding: 4px 0; position: relative; }
  .bottombar .on { color: var(--brand-text); }
  .bottombar .badge { position: absolute; top: 0; right: calc(50% - 20px); background: var(--red); color: #fff; font-size: 10px; border-radius: 8px; padding: 0 5px; line-height: 15px; }
  .bottombar .big { margin-top: -18px; }
  .bottombar .big span.circle { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow-pop); }
  .bottombar .big.in span.circle { background: var(--marigold); color: #1d1a10; }
  .team-row { grid-template-columns: 1fr 1fr; }
  .toasts { bottom: 86px; }
  .cal-day { min-height: 74px; }
  .cal-item { font-size: 11px; padding: 2px 4px; }
}
@media (max-width: 560px) {
  .focus-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-dow { font-size: 11px; padding: 6px 4px; }
  .att-day { min-height: 52px; padding: 5px; }
  .att-day .s { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .sidebar, .topbar, .bottombar, .btn { display: none !important; }
  .shell { display: block; }
}
.track-label.end { transform: translateX(-100%); }
.track-label.start { transform: none; }
