/* DaysOffly - design system.
   One grotesk (Instrument Sans), flat surfaces, colour on data (people's own colours),
   brand blue for actions, brand yellow for counts, motion only as feedback. Light + dark.
   Brand palette (from the DaysOffly logo): #182acc #3766e6 #3d94ff #61bbff, yellow #ffd83d #e8af12. */

@font-face {
  font-family: "Instrument Sans";
  src: url("/static/fonts/InstrumentSans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ground: #f7f8fa;
  --surface: #ffffff;
  --raised: #f2f3f6;
  --active: #e9ebef;
  --border: #e4e6eb;
  --rule: #eef0f3;
  --control: #cfd3da;
  --text: #14161a;
  --muted: #5a606b;
  --faint: #6b717c;
  --primary: #16181d;
  --on-primary: #ffffff;
  --accent: #3766e6;
  --accent-soft: rgba(55, 102, 230, .12);
  --brand: #3766e6;              /* main buttons, own messages, balance bars */
  --brand-hover: #182acc;
  --on-brand: #ffffff;
  --brand-yellow: #ffd83d;       /* count badges */
  --brand-yellow-deep: #e8af12;
  --on-yellow: #14161a;
  --brand-name-a: #3766e6;       /* "Days" in the sidebar name; the logo's yellow is too light on white */
  --brand-name-b: #14161a;
  --positive: #1f7a4d;
  --negative: #c4242a;
  --warn: #8a5a00;
  --pill-pending-bg: #fff4d6;   --pill-pending-ink: #6f4700;
  --pill-ok-bg: #dff5e8;        --pill-ok-ink: #0d4a2a;
  --pill-bad-bg: #fde8e7;       --pill-bad-ink: #7f1d1d;
  --pill-mute-bg: #eceef2;      --pill-mute-ink: #454b55;
  --weekend: #eef0f3;
  --holiday: #fdeeb0;
  --holiday-ink: #5f4710;
  --shadow-float: 0 8px 28px rgba(16, 18, 24, .16), 0 1px 3px rgba(16, 18, 24, .08);
  --r-card: 8px; --r-ctl: 6px; --r-chip: 4px; --r-float: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.22, 1.25, .36, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ground: #0d0e10;
  --surface: #141518;
  --raised: #1b1d21;
  --active: #23262b;
  --border: #25282d;
  --rule: #1e2024;
  --control: #3a3e45;
  --text: #f1f2f4;
  --muted: #a3a8b1;
  --faint: #8d929c;
  --primary: #f1f2f4;
  --on-primary: #101114;
  --accent: #3d94ff;
  --accent-soft: rgba(61, 148, 255, .16);
  --brand: #3766e6;
  --brand-hover: #2a55d6;
  --brand-name-a: #ffd83d;       /* the logo's own colours read well on dark */
  --brand-name-b: #f2f2f2;
  --positive: #4cc88a;
  --negative: #ef6b73;
  --warn: #e6b24a;
  --pill-pending-bg: #3a2f12;   --pill-pending-ink: #f0c869;
  --pill-ok-bg: #163324;        --pill-ok-ink: #7fdcab;
  --pill-bad-bg: #3a1c1f;       --pill-bad-ink: #f49ca1;
  --pill-mute-bg: #24272c;      --pill-mute-ink: #b4b9c2;
  --weekend: #1e2126;
  --holiday: #3a3220;
  --holiday-ink: #e3c883;
  --shadow-float: 0 10px 32px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font: 400 14px/20px var(--font); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { display: block; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hide { display: none !important; }

/* ---- motion primitives ---- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.965); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes shake { 0%,100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 var(--ring, rgba(0,0,0,.4)); } 100% { box-shadow: 0 0 0 9px transparent; } }
@keyframes skel { 0%,100% { opacity: .55; } 50% { opacity: .95; } }
@keyframes collapse { to { opacity: 0; transform: translateX(14px); } }
@keyframes spin { to { transform: rotate(360deg); } }

.page-enter { animation: fadeUp .28s var(--ease) both; }
.stagger > * { animation: fadeUp .3s var(--ease) both; animation-delay: calc(var(--i, 0) * 32ms); }
.shake { animation: shake .36s var(--ease); }
.skel { background: var(--active); border-radius: 4px; animation: skel 1.2s ease-in-out infinite; }

/* ---- shell ---- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 16px 12px 12px; border-right: 1px solid var(--border); background: var(--ground);
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.brand svg { flex: none; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { margin: 18px 0 6px; padding: 0 10px; color: var(--faint); font-size: 12px; }
.nav a {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--r-ctl);
  color: var(--muted); text-decoration: none; transition: background-color .12s, color .12s;
}
.nav a svg { flex: none; opacity: .85; }
.nav a:hover { background: var(--raised); color: var(--text); }
.nav a.on { background: var(--active); color: var(--text); font-weight: 500; }
.nav .badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand-yellow); color: var(--on-yellow); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.nav .badge.pop { animation: popIn .3s var(--spring); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.util { display: flex; gap: 4px; padding: 0 4px; }
.me-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: transparent;
  border-radius: var(--r-ctl); text-align: left; transition: background-color .12s;
}
.me-row:hover { background: var(--raised); }
.me-row .who { min-width: 0; line-height: 16px; }
.me-row .who b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-row .who span { color: var(--muted); font-size: 12px; text-transform: capitalize; }
.main { min-width: 0; padding: 28px 36px 64px; }
.page { max-width: 1240px; margin: 0 auto; }
.topbar { display: none; }

/* ---- primitives ---- */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ph h1 { font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -.015em; }
.ph .sub { margin-top: 2px; color: var(--muted); }
.ph .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex-shrink: 0; max-width: 100%; justify-content: flex-end; }
.ph > div:first-child { min-width: 0; flex: 1 1 260px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 0; }
.card-h h2 { font-size: 16px; line-height: 22px; font-weight: 600; }
.pad { padding: 16px; }
.section { margin-top: 28px; }
.section > h2 { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.sp { flex: 1; }
.grow { flex: 1; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid var(--control); border-radius: var(--r-ctl); background: var(--surface); color: var(--text);
  font-weight: 500; white-space: nowrap; transition: background-color .12s, border-color .12s, transform .08s, opacity .12s;
}
.btn:hover { background: var(--raised); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--raised); }
.btn.danger { color: var(--negative); }
.btn.danger.solid { background: var(--negative); border-color: var(--negative); color: #fff; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 0; background: transparent; border-radius: var(--r-ctl); color: var(--muted); position: relative; transition: background-color .12s, color .12s, transform .08s; }
.icon-btn:hover { background: var(--raised); color: var(--text); }
.icon-btn:active { transform: scale(.92); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--negative); border: 2px solid var(--ground); animation: popIn .3s var(--spring); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .lbl { font-weight: 500; font-size: 13px; }
.field .hint { color: var(--muted); font-size: 12px; }
.inp, select.inp, textarea.inp {
  height: 36px; width: 100%; padding: 0 10px; background: var(--surface); border: 1px solid var(--control);
  border-radius: var(--r-ctl); transition: border-color .12s, box-shadow .12s;
}
textarea.inp { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; }
.inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.inp::placeholder { color: var(--faint); }
.inp.sm { height: 30px; font-size: 13px; }
.inp.bad { border-color: var(--negative); }
.pwwrap { position: relative; }
.pwwrap .inp { padding-right: 38px; }
.pwwrap .icon-btn { position: absolute; right: 2px; top: 2px; height: 32px; }
.seg { display: inline-flex; padding: 2px; background: var(--raised); border-radius: var(--r-ctl); gap: 2px; }
.seg button { height: 28px; padding: 0 12px; border: 0; background: transparent; border-radius: 4px; color: var(--muted); font-weight: 500; transition: background-color .15s, color .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.seg .ct { margin-left: 6px; color: var(--faint); font-weight: 400; }
.switch { position: relative; display: inline-block; vertical-align: middle; width: 36px; height: 20px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--control); transition: background-color .18s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--spring); }
.switch input:checked + i { background: var(--positive); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

.pill { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; flex: none; }
.pill.pending { background: var(--pill-pending-bg); color: var(--pill-pending-ink); }
.pill.approved { background: var(--pill-ok-bg); color: var(--pill-ok-ink); }
.pill.rejected { background: var(--pill-bad-bg); color: var(--pill-bad-ink); }
.pill.withdrawn, .pill.cancelled, .pill.muted { background: var(--pill-mute-bg); color: var(--pill-mute-ink); }
.pill.est { background: var(--pill-pending-bg); color: var(--pill-pending-ink); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--r-chip); background: var(--raised); font-size: 12px; color: var(--muted); white-space: nowrap; }

.avatar {
  --c: #7b8794; flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  background: color-mix(in srgb, var(--c) 24%, var(--surface));
  color: color-mix(in srgb, var(--c) 62%, var(--text));
}
.avatar.sm { width: 22px; height: 22px; font-size: 11px; }
.avatar.lg { width: 36px; height: 36px; font-size: 14px; }
.swatch { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }

.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 400; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl tbody tr { transition: background-color .12s; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--raised) 60%, transparent); }
.tbl.roomy td { padding: 12px; }

.empty { padding: 36px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--control); border-radius: var(--r-card); }
.empty b { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--pill-pending-bg); color: var(--pill-pending-ink); font-size: 13px; line-height: 18px; }
.callout.bad { background: var(--pill-bad-bg); color: var(--pill-bad-ink); }
.callout.info { background: var(--raised); color: var(--muted); }
.callout svg { flex: none; margin-top: 1px; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.kbd { font-size: 12px; padding: 1px 5px; border: 1px solid var(--control); border-radius: 4px; color: var(--muted); }

/* ---- summary strip ---- */
.strip { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1.5fr; margin-bottom: 14px; }
.cell { padding: 14px 18px 16px; min-width: 0; }
.cell + .cell { border-left: 1px solid var(--border); }
.cell .k { color: var(--muted); font-size: 13px; }
.cell .v { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -.01em; }
.cell .v small { font-size: 14px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.cell.lead .v { font-size: 32px; line-height: 36px; }
.cell .s { margin-top: 2px; color: var(--muted); font-size: 13px; }
.cell .s.next { color: var(--text); font-weight: 500; font-size: 14px; margin-top: 8px; line-height: 18px; }
.meter { display: flex; height: 6px; margin-top: 10px; border-radius: 999px; overflow: hidden; background: var(--active); gap: 2px; }
.meter i { display: block; height: 100%; min-width: 0; transition: flex-basis .7s var(--ease); }
.meter .avail { background: var(--brand); }
.meter .wait { background: repeating-linear-gradient(135deg, var(--brand) 0 2px, transparent 2px 4px); }
.meter .used { background: var(--control); }
.cell .v.zero { color: var(--faint); }

.legend { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.lg-tile { width: 16px; height: 16px; border-radius: 4px; display: inline-block; position: relative; --c: #0090ff; }
.lg-tile.appr { background: var(--c); }
.lg-tile.pend { background: color-mix(in srgb, var(--c) 26%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--c);
  background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 45%, transparent) 0 2px, transparent 2px 5px); }
.lg-tile.we { background: var(--weekend); box-shadow: inset 0 0 0 1px var(--border); }
.lg-tile.hol { background: var(--holiday); }
.lg-tile.today { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.lg-tile.mix { background: color-mix(in srgb, var(--c) 50%, #e5484d); }
.lg-tile.mix::after { content: "2"; position: absolute; top: 1px; right: 1px; width: 8px; height: 8px; font-size: 6px; line-height: 8px; font-weight: 700; text-align: center; color: #fff; background: rgba(12, 14, 18, .82); border-radius: 50%; box-shadow: 0 0 0 .75px rgba(255, 255, 255, .5); }

/* ---- calendar ---- */
.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 14px; }
.month { padding: 14px 14px 12px; }
.month h3 { font-size: 14px; line-height: 20px; font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; }
.month h3 small { font-weight: 400; color: var(--muted); font-size: 12px; }
.month.cur h3 { color: var(--accent); }
.dow, .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.dow { margin: 8px 0 4px; font-size: 11px; line-height: 14px; color: var(--muted); text-align: center; }
.d {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 5px; font-size: 12px; line-height: 1;
  user-select: none; -webkit-user-select: none; cursor: default; --c: transparent; --fg: var(--text);
  transition: transform .14s var(--spring), background-color .12s, box-shadow .12s, filter .12s;
}
.d.we { color: var(--muted); background: var(--weekend); }
.d.hol { background: var(--holiday); color: var(--holiday-ink); }
.d.hol::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: currentColor; opacity: .8; }
.d.free { cursor: pointer; }
.d.free:hover { background: var(--active); transform: scale(1.1); z-index: 2; }
.d.we.free:hover, .d.hol.free:hover { background: var(--active); }
.d.booked, .d.pend { cursor: pointer; }
.d.booked { background: var(--c); color: var(--fg); font-weight: 500; }
.d.pend {
  color: var(--text); font-weight: 500;
  background: color-mix(in srgb, var(--c) 24%, var(--surface));
  box-shadow: inset 0 0 0 1.5px var(--c);
  background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 30%, transparent) 0 2px, transparent 2px 5px);
}
.d.booked:hover, .d.pend:hover { transform: scale(1.1); z-index: 2; }
.d .ct { position: absolute; top: 1px; right: 1px; z-index: 3; min-width: 11px; height: 11px; padding: 0 2px; border-radius: 6px; background: rgba(12, 14, 18, .82); color: #fff; font-size: 8px; line-height: 11px; font-weight: 700; text-align: center; pointer-events: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
.d.mine::before { content: ""; position: absolute; inset: -2px; border-radius: 7px; box-shadow: 0 0 0 1.5px var(--text); opacity: .0; transition: opacity .15s; }
.d.today { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); font-weight: 700; color: var(--text); }
.d.today.booked, .d.today.pend { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); background-color: var(--c); color: var(--fg); }
.d.today.pend { color: var(--text); background-color: color-mix(in srgb, var(--c) 24%, var(--surface)); }
.d.past { opacity: .42; }
.d.past.free { cursor: default; }
.d.past.free:hover { background: inherit; transform: none; }
.d.sel { background: var(--accent-soft) !important; box-shadow: inset 0 0 0 2px var(--accent) !important; color: var(--accent) !important; transform: scale(1.06); z-index: 3; }
.d.lit { z-index: 4; filter: brightness(1.08) saturate(1.15); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); animation: pulseRing .9s var(--ease) 2; --ring: var(--text); opacity: 1; }
.cal.dragging { cursor: grabbing; }
.chip-float { position: fixed; z-index: 60; pointer-events: none; padding: 4px 9px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-weight: 500; font-size: 13px; box-shadow: var(--shadow-float); transform: translate(14px, 14px); white-space: nowrap; animation: fadeIn .12s; }

.dock {
  position: sticky; bottom: 16px; z-index: 12; margin-top: 18px; padding: 14px 16px; box-shadow: var(--shadow-float);
  animation: slideUp .3s var(--ease) both; border-radius: var(--r-float);
}
.dock .dh { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dock .dh b { font-size: 15px; }
.dock .li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--rule); }
.dock .li:first-of-type { border-top: 0; }
.dock .li .t { min-width: 0; }
.dock .li .t b { font-weight: 600; }
.dock .li .t span { color: var(--muted); }

/* ---- floating layers ---- */
#layer-pop > .pop, .pop {
  position: absolute; z-index: 70; min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-float); box-shadow: var(--shadow-float); animation: popIn .16s var(--ease) both; transform-origin: top left;
}
.vol { display: flex; align-items: center; gap: 10px; padding: 4px 12px 8px; color: var(--muted); }
.vol input { flex: 1; min-width: 0; height: 20px; background: transparent; accent-color: var(--text); cursor: pointer; margin: 0; }
.pop .pop-h { padding: 6px 10px 4px; color: var(--muted); font-size: 12px; }
.pop .item { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; background: transparent; border-radius: 6px; text-align: left; transition: background-color .1s; }
.pop .item:hover { background: var(--raised); }
.pop .item svg { color: var(--muted); }
.pop hr { border: 0; height: 1px; background: var(--border); margin: 6px 0; }
.pop.notifs { width: 380px; padding: 0; transform-origin: bottom left; display: flex; overflow: hidden; }
.npanel { display: flex; flex-direction: column; min-height: 0; width: 100%; max-height: min(560px, calc(100vh - 16px)); }
.npanel .nlist { overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1 1 auto; }
.npanel .nh { gap: 2px; }
.nfoot { display: flex; align-items: center; justify-content: center; gap: 4px; flex: none; height: 42px; border-top: 1px solid var(--border); color: var(--accent); font-weight: 500; font-size: 13px; text-decoration: none !important; }
.nfoot:hover { background: var(--raised); }
.nitem.new { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.nitem.new:hover { background: color-mix(in srgb, var(--accent) 11%, transparent); }
.nhist { padding-bottom: 4px; overflow: hidden; }
.nhist .nitem { padding: 12px 16px; }
.nhist .list-h { border-top: 1px solid var(--rule); padding-top: 14px; }
.nhist .list-h:first-child { border-top: 0; }
.nhist-note { font-size: 13px; margin-top: 10px; }
/* the bell: rings once and breathes in the accent colour while something is unread */
.icon-btn.ring { color: var(--accent); position: relative; animation: bellBreathe 2.4s ease-in-out infinite; }
.icon-btn.ring::before { content: ""; position: absolute; inset: 2px; border-radius: inherit; background: var(--accent); opacity: .14; animation: bellGlow 2.4s ease-in-out infinite; pointer-events: none; }
.icon-btn.ring.jiggle svg { animation: bellJiggle .9s var(--ease) 1; transform-origin: 50% 15%; }
.bell-n { position: absolute; top: -3px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--negative); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px var(--side, var(--surface)); pointer-events: none; }
@keyframes bellBreathe { 0%, 100% { filter: drop-shadow(0 0 0 transparent); } 50% { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 75%, transparent)); } }
@keyframes bellGlow { 0%, 100% { opacity: .08; transform: scale(.92); } 50% { opacity: .26; transform: scale(1.06); } }
@keyframes bellJiggle { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-13deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
.pop.notifs .nh { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--border); z-index: 1; }
.pop.notifs .nh b { font-size: 15px; }
.nitem { display: flex; gap: 10px; width: 100%; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; text-align: left; align-items: flex-start; transition: background-color .1s; }
.nitem:hover { background: var(--raised); }
.nitem:last-child { border-bottom: 0; }
.nitem .nb { min-width: 0; flex: 1; }
.nitem .nb b { display: block; font-weight: 600; }
.nitem .nb p { color: var(--muted); font-size: 13px; line-height: 18px; margin-top: 1px; }
.nitem .nb time { color: var(--faint); font-size: 12px; }
.nitem .unread { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.nitem .nico { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--muted); }
.nitem .nico.approved { background: var(--pill-ok-bg); color: var(--pill-ok-ink); }
.nitem .nico.rejected, .nitem .nico.cancelled { background: var(--pill-bad-bg); color: var(--pill-bad-ink); }
.nitem .nico.request, .nitem .nico.removal { background: var(--pill-pending-bg); color: var(--pill-pending-ink); }

.palette { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 8px 10px 10px; }
.palette button { width: 100%; aspect-ratio: 1; border-radius: 50%; border: 0; background: var(--c); position: relative; transition: transform .14s var(--spring); }
.palette button:hover { transform: scale(1.14); }
.palette button.on::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--text); }
.palette .custom { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--raised); color: var(--muted); overflow: hidden; cursor: pointer; box-shadow: inset 0 0 0 1px var(--border); }
.palette .custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

.overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(10, 12, 16, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fadeIn .16s both; }
.overlay.closing { opacity: 0; transition: opacity .14s; }
.modal { width: 100%; max-width: 440px; max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-float); animation: popIn .22s var(--spring) both; }
.modal.wide { max-width: 560px; }
.overlay.closing .modal { transform: scale(.97); opacity: 0; transition: transform .14s, opacity .14s; }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 0; }
.modal-h h2 { font-size: 17px; font-weight: 600; }
.modal-b { padding: 14px 20px 6px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; }
.modal-f .sp { flex: 1; }
.count-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--raised); font-size: 13px; margin-bottom: 14px; }
.count-line b { font-size: 15px; }
.count-line .after { color: var(--muted); }
.count-line .after.neg { color: var(--negative); font-weight: 600; }

#layer-toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; width: 340px; max-width: calc(100vw - 40px); padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-float); box-shadow: var(--shadow-float); animation: toastIn .34s var(--spring) both; }
.toast.out { opacity: 0; transform: translateX(24px); transition: opacity .2s, transform .2s; }
.toast .tico { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.toast.ok .tico { background: var(--pill-ok-bg); color: var(--pill-ok-ink); }
.toast.bad .tico { background: var(--pill-bad-bg); color: var(--pill-bad-ink); }
.toast.info .tico { background: var(--raised); color: var(--muted); }
.toast.ping .tico { background: var(--accent-soft); color: var(--accent); }
.toast b { display: block; font-weight: 600; }
.toast p { color: var(--muted); font-size: 13px; line-height: 18px; }
.tt { position: fixed; z-index: 90; pointer-events: none; max-width: 280px; padding: 7px 10px; border-radius: 6px; background: var(--primary); color: var(--on-primary); font-size: 13px; line-height: 17px; animation: fadeIn .1s; box-shadow: var(--shadow-float); }
.tt small { display: block; opacity: .75; font-size: 12px; }

/* ---- lists & request rows ---- */
.reqs { display: flex; flex-direction: column; }
.rq { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--rule); }
.rq:first-child { border-top: 0; }
.rq .when { font-weight: 600; }
.rq .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.rq .cmt { margin-top: 6px; padding: 7px 10px; background: var(--raised); border-radius: var(--r-ctl); font-size: 13px; color: var(--text); }
.rq .cmt span { color: var(--muted); }
.rq .right { display: flex; align-items: center; gap: 10px; }
.rq.leaving { animation: collapse .3s var(--ease) forwards; }
.cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.cols .side-col { position: sticky; top: 20px; }
.rq.past { opacity: .74; }
.chip.now { background: var(--accent-soft); color: var(--accent); margin-left: 8px; }
.cover-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; pointer-events: none; }

.ap { padding: 16px; margin-bottom: 12px; animation: fadeUp .3s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.ap.leaving { animation: collapse .32s var(--ease) forwards; }
.ap-top { display: flex; align-items: flex-start; gap: 12px; }
.ap-top .who { font-weight: 600; font-size: 15px; }
.ap-top .when { font-size: 15px; margin-top: 2px; font-weight: 500; }
.ap-top .when .muted { font-weight: 400; }
.ap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin: 14px 0 2px; padding-top: 12px; border-top: 1px solid var(--rule); }
.ap-grid .k { color: var(--muted); font-size: 12px; }
.ap-grid .v { margin-top: 3px; }
.ap .warns { display: grid; gap: 8px; margin-top: 12px; }
.bal-bar { display: flex; align-items: baseline; gap: 8px; }
.bal-bar .n { font-weight: 600; font-size: 17px; }
.bal-bar .arrow { color: var(--muted); }
.bal-bar .neg { color: var(--negative); font-weight: 600; }
.ap-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.reject-box { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .26s var(--ease); width: 100%; }
.reject-box > div { overflow: hidden; }
.reject-box.open { grid-template-rows: 1fr; }
.reject-box .inner { display: flex; gap: 8px; padding-top: 10px; }
.warns { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

.ledger td:first-child, .ledger th:first-child { padding-left: 16px; }
.ledger td:last-child, .ledger th:last-child { padding-right: 16px; }

/* ---- timeline ---- */
.tl-card { overflow: hidden; }
.tl-scroll { overflow-x: auto; }
.tl { min-width: 760px; position: relative; --days: 30; }
.tl-head, .tl-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); }
.tl-name { display: flex; align-items: center; gap: 10px; padding: 0 12px; min-width: 0; }
.tl-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-head { height: 52px; border-bottom: 1px solid var(--border); }
.tl-head .tl-days, .tl-track { position: relative; }
.tl-days { display: grid; grid-template-columns: repeat(var(--days), 1fr); }
.tl-days div { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; line-height: 14px; color: var(--muted); }
.tl-days div b { font-size: 12px; font-weight: 500; color: var(--text); }
.tl-days div.we { color: var(--muted); background: var(--weekend); }
.tl-days div.we b { color: var(--muted); }
.tl-days div.hol { background: var(--holiday); color: var(--holiday-ink); }
.tl-days div.hol b { color: var(--holiday-ink); }
.tl-days div.today b { color: var(--accent); }
.tl-row { height: 40px; border-bottom: 1px solid var(--rule); }
.tl-row:last-child { border-bottom: 0; }
.tl-row.cover { height: 46px; background: color-mix(in srgb, var(--raised) 45%, transparent); }
.tl-track { height: 100%; }
.tl-bg { position: absolute; left: 190px; right: 0; top: 52px; bottom: 0; display: grid; grid-template-columns: repeat(var(--days), 1fr); pointer-events: none; }
.tl-bg i { border-left: 1px solid var(--rule); }
.tl-bg i.we { background: var(--weekend); opacity: .7; }
.tl-bg i.hol { background: var(--holiday); opacity: .55; }
.tl-bg i.today { box-shadow: inset 1.5px 0 0 var(--accent); }
.tl-bar { position: absolute; top: 9px; height: 22px; border-radius: 4px; background: var(--c); color: var(--fg); font-size: 12px; line-height: 22px; padding: 0 7px; overflow: hidden; white-space: nowrap; cursor: default; transition: transform .12s, filter .12s; z-index: 1; }
.tl-bar:hover { filter: brightness(1.08); transform: translateY(-1px); }
.tl-bar.pend { color: var(--text); background: color-mix(in srgb, var(--c) 24%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--c); background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 42%, transparent) 0 2px, transparent 2px 5px); }
.cover-cells { position: relative; height: 100%; display: grid; grid-template-columns: repeat(var(--days), 1fr); align-items: end; padding-bottom: 7px; }
.cover-cells div { display: flex; justify-content: center; align-items: flex-end; height: 100%; }
.cover-cells span { width: calc(100% - 4px); min-height: 0; background: var(--brand); opacity: .82; border-radius: 3px 3px 0 0; transition: height .5s var(--ease); }
.cover-cells span.over { background: var(--negative); opacity: 1; }

/* ---- auth ---- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-art { position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(120% 85% at 100% 100%, #61bbff 0%, #3d94ff 28%, rgba(61, 148, 255, 0) 62%), linear-gradient(165deg, #182acc 0%, #3766e6 58%); padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art .brand { padding: 0; font-size: 17px; }
.auth-art h1 { font-size: 44px; line-height: 50px; font-weight: 600; letter-spacing: -.025em; max-width: 500px; text-wrap: balance; }
.auth-art p { margin-top: 14px; max-width: 440px; font-size: 16px; line-height: 24px; opacity: .92; text-wrap: pretty; }
.minical { margin-top: 38px; max-width: 392px; }
.minical .mc-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-weight: 600; font-size: 15px; }
.minical .mc-h span { font-weight: 400; opacity: .6; font-size: 13px; }
.minical .mc-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.minical .mc-w { text-align: center; font-size: 12px; opacity: .6; padding-bottom: 2px; }
.minical .mc-d { aspect-ratio: 1; border-radius: 7px; display: grid; place-items: center; font-size: 13px; background: rgba(255, 255, 255, .08); animation: fadeIn .5s both; animation-delay: calc(var(--i) * 14ms); }
.minical .mc-d.we { background: transparent; opacity: .55; }
.minical .mc-d.b { background: var(--c); color: var(--fg); font-weight: 600; opacity: 1; }
.minical .mc-d.n { background: transparent; animation: none; }
.auth-art .foot { opacity: .9; font-size: 13px; position: relative; }
.auth-art > * { position: relative; z-index: 1; }
.auth-art .wordmark { display: block; width: 210px; height: auto; }
.auth-art .trail { position: absolute; z-index: 0; right: -6%; bottom: -14%; width: 62%; max-width: 560px; opacity: .55; pointer-events: none; }
.auth-form { display: grid; place-items: center; padding: 32px; }
.auth-card { width: 100%; max-width: 380px; animation: fadeUp .4s var(--ease) both; }
.auth-card .auth-brand { display: none; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; margin-bottom: 28px; }
.auth-card h2 { font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: -.015em; }
.auth-card .lede { color: var(--muted); margin: 6px 0 24px; font-size: 15px; }
.auth-card .inp { height: 40px; border-color: var(--control); }
.auth-card .pwwrap .icon-btn { top: 4px; }
.auth-card .field > label { font-size: 14px; }
.auth-card .btn.primary { width: 100%; height: 42px; margin-top: 4px; font-size: 15px; }
.auth-card .switch-link { margin-top: 20px; color: var(--muted); text-align: center; }
.auth-card .auth-hint { margin-top: 10px; color: var(--muted); text-align: center; font-size: 13px; }
.auth-card .err { color: var(--negative); font-size: 13px; margin: -4px 0 12px; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot::after { content: ""; width: 22px; height: 22px; border: 2px solid var(--control); border-top-color: var(--text); border-radius: 50%; animation: spin .7s linear infinite; }
.boot.ready::after { display: none; }

/* ---- admin ---- */
.people-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.people-name b { font-weight: 500; display: block; }
.people-name span { color: var(--muted); font-size: 12px; }
.inline-num { width: 64px; }
.tag-self { margin-left: 6px; }
.audit-act { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12px; color: var(--muted); }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 16px 0; border-top: 1px solid var(--rule); }
.set-row:first-child { border-top: 0; }
.set-row b { font-weight: 600; display: block; }
.set-row p { color: var(--muted); margin-top: 2px; max-width: 560px; }
.copy-box { display: flex; gap: 8px; align-items: center; padding: 10px 12px; background: var(--raised); border-radius: var(--r-ctl); font-family: ui-monospace, Consolas, monospace; font-size: 14px; word-break: break-all; }
.copy-box span { flex: 1; user-select: all; }

/* ---- responsive ---- */
@media (max-width: 1180px) {
  .strip { grid-template-columns: 1fr 1fr; }
  .cell:nth-child(3) { border-left: 0; }
  .cell:nth-child(n+3) { border-top: 1px solid var(--border); }
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .icon-btn { width: 40px; height: 40px; }
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 272px; height: 100vh; transform: translateX(-102%); transition: transform .26s var(--ease); background: var(--surface); box-shadow: var(--shadow-float); }
  .side.open { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 15; background: rgba(10,12,16,.4); animation: fadeIn .2s both; }
  .topbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 10; height: 52px; padding: 0 12px; background: var(--ground); border-bottom: 1px solid var(--border); }
  .topbar .brand { padding: 0; flex: 1; }
  .main { padding: 20px 16px 56px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .ap-grid { grid-template-columns: 1fr; }
  .dock { bottom: 8px; }
  .pop.notifs { width: min(380px, calc(100vw - 16px)); }
}
@media (max-width: 560px) {
  .strip { grid-template-columns: 1fr 1fr; }
  .cell { padding: 12px 14px; }
  .cell.lead .v { font-size: 28px; }
  .rq { grid-template-columns: 1fr; }
  .cal { grid-template-columns: 1fr; }
  #layer-toast { left: 12px; right: 12px; bottom: 12px; align-items: stretch; }
  .toast { width: auto; }
}

.pw-nudge { margin: 16px 32px 0; align-items: center; }
.pw-nudge .grow { flex: 1; }
@media (max-width: 760px) { .pw-nudge { margin: 12px 12px 0; flex-wrap: wrap; } }
.brand-img { width: 26px; height: 26px; border-radius: 6px; flex: none; display: block; }
.brand-name { white-space: nowrap; }
.brand-name b { color: var(--brand-name-a); font-weight: 700; }
.brand-name i { color: var(--brand-name-b); font-weight: 700; font-style: italic; }

/* =====================================================================
   v3: companies, departments, request sheet, threads, blackouts, the past
   ===================================================================== */
.skip { position: absolute; left: 12px; top: -48px; z-index: 200; padding: 8px 12px; border-radius: var(--r-ctl); background: var(--primary); color: var(--on-primary); }
.skip:focus { top: 12px; }
.main:focus { outline: none; }
.ferr { color: var(--negative); font-size: 13px; margin: 4px 0 0; }
.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.yr { min-width: 48px; text-align: center; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand-yellow); color: var(--on-yellow); font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; flex: none; }
.badge.soft { background: var(--pill-pending-bg); color: var(--pill-pending-ink); min-width: 18px; height: 18px; font-size: 11px; }
.avatar.xs { width: 18px; height: 18px; font-size: 9px; }
.avs { display: inline-flex; }
.avs .avatar { box-shadow: 0 0 0 2px var(--surface); }
.avs .avatar + .avatar { margin-left: -5px; }
.icon-btn.sm { width: 26px; height: 26px; }
.chip.dept { color: var(--text); }
.chip.dept.mgr { background: var(--accent-soft); color: var(--accent); }
.chip.dept svg, .chip.owner svg { flex: none; }
.chip.owner { background: var(--pill-pending-bg); color: var(--pill-pending-ink); }
.chip.link { border: 0; cursor: pointer; color: var(--text); transition: background-color .12s; }
.chip.link:hover { background: var(--active); }
.saved { color: var(--positive); font-size: 12px; opacity: 0; min-width: 40px; text-align: right; visibility: hidden; }
.saved.on { visibility: visible; }
.saved.on { animation: savedFlash 2.2s var(--ease); }
@keyframes savedFlash { 0% { opacity: 0; } 10%, 70% { opacity: 1; } 100% { opacity: 0; } }
details.section > summary { cursor: pointer; color: var(--muted); font-weight: 500; margin-bottom: 10px; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.section > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform .16s var(--ease); }
details.section[open] > summary::before { transform: rotate(45deg); }
details.section > summary::-webkit-details-marker { display: none; }
.search { position: relative; display: inline-flex; align-items: center; }
.search .ico { position: absolute; left: 9px; color: var(--faint); pointer-events: none; }
.search .inp { padding-left: 30px; width: 200px; }
.scope-sel { width: auto; max-width: 220px; }
.inp.sm { height: 30px; font-size: 13px; }
select.inp.sm { padding-right: 24px; }

/* company switcher */
.org-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; margin: -6px 0 14px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); text-align: left; position: relative; transition: background-color .12s, border-color .12s; }
.org-btn:hover { background: var(--raised); }
.org-btn .org-txt { min-width: 0; line-height: 16px; }
.org-btn .org-txt b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-btn .org-txt span { color: var(--muted); font-size: 12px; }
.org-btn .dot { position: absolute; top: 6px; left: 32px; width: 8px; height: 8px; border-radius: 50%; background: var(--negative); border: 2px solid var(--surface); }
.org-mark { flex: none; width: 30px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: .02em; background: color-mix(in srgb, var(--c) 22%, var(--surface)); color: color-mix(in srgb, var(--c) 60%, var(--text)); }
.org-mark.sm { width: 24px; height: 24px; font-size: 10px; border-radius: 6px; }
.pop .org-item { height: auto; padding: 8px 10px; }
.pop .org-item b { display: block; font-weight: 500; }
.pop .org-item .muted { font-size: 12px; }
.top-org { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-row .who span { text-transform: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* calendar: request dialog */
.goes-to { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-ctl); border: 1px dashed var(--control); color: var(--muted); font-size: 13px; line-height: 18px; }
.goes-to b { color: var(--text); font-weight: 500; }
.goes-to .ico { margin-top: 2px; flex: none; }
.count-line { margin-bottom: 2px; }
.count-line.dim b { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.goes-to { border-style: solid; border-color: var(--border); background: var(--raised); }

/* calendar: icon segmented control, dragging */
.icon-seg button { padding: 0 8px; display: inline-grid; place-items: center; }
.dragging, .dragging * { cursor: grabbing !important; }
.chip-float.bad { background: var(--negative); color: #fff; }
.dow span.off { opacity: .7; }

/* calendar: the past */
.past-sec { margin-bottom: 14px; }
.past-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 8px 6px 6px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); transition: border-radius .2s; }
.past-toggle { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 0; border-radius: var(--r-ctl); background: transparent; text-align: left; color: var(--text); flex: 1 1 280px; min-width: 0; transition: background-color .12s; }
.past-toggle:hover { background: var(--raised); }
.past-toggle > .ico { color: var(--muted); }
.past-toggle .pt { flex: 1; min-width: 0; }
.past-toggle .pt b { display: block; font-weight: 600; }
.past-toggle .pt span { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.past-toggle .pt-act { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 500; }
.past-toggle .chev { transition: transform .26s var(--ease); }
.past-bar.open .chev { transform: rotate(180deg); }
.past-chips { display: flex; flex-wrap: wrap; gap: 4px; padding-right: 4px; }
.past-chip { height: 26px; padding: 0 9px; border: 0; border-radius: 999px; background: var(--raised); color: var(--muted); font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; transition: background-color .12s, color .12s, transform .1s; }
.past-chip:hover { background: var(--active); color: var(--text); }
.past-chip:active { transform: scale(.95); }
.past-chip span { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 11px; line-height: 16px; text-align: center; }
.past-wrap { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .4s var(--ease), opacity .3s var(--ease), margin-top .4s var(--ease); }
.past-wrap.open { grid-template-rows: 1fr; opacity: 1; margin-top: 14px; }
.past-inner { overflow: hidden; min-height: 0; }
.past-cal .month { background: color-mix(in srgb, var(--surface) 70%, var(--ground)); }
.past-cal .month h3 { color: var(--muted); }
.month.flash { animation: monthFlash 1.4s var(--ease); }
@keyframes monthFlash { 0%, 40% { box-shadow: 0 0 0 2px var(--accent); } 100% { box-shadow: 0 0 0 2px transparent; } }

.next-year { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 20px; min-height: 180px; border: 1.5px dashed var(--control); background: transparent; box-shadow: none; text-align: left; color: var(--text); transition: border-color .14s, background-color .14s; }
.next-year:hover { border-color: var(--text); background: var(--surface); }
.next-year .ny-y { font-size: 28px; line-height: 32px; font-weight: 600; letter-spacing: -.02em; }
.next-year .ny-t { font-weight: 600; }
.next-year .muted { font-size: 13px; }
.next-year .ny-go { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; height: 30px; padding: 0 10px 0 12px; border-radius: var(--r-ctl); background: var(--brand); color: var(--on-brand); font-size: 13px; font-weight: 500; }
.next-year .ny-go .ico { transition: transform .16s var(--ease); }
.next-year:hover .ny-go .ico { transform: translateX(2px); }

/* calendar: first-run setup */
.setup { padding: 16px 18px; margin-bottom: 14px; }
.setup h2 { font-size: 16px; font-weight: 600; }
.setup-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.setup-step { display: flex; gap: 10px; padding: 12px; border-radius: var(--r-ctl); background: var(--raised); color: var(--text); text-decoration: none !important; transition: background-color .12s; }
.setup-step:hover { background: var(--active); }
.setup-step b { display: block; font-weight: 600; }
.setup-step span span { color: var(--muted); font-size: 13px; }
.setup-step .tick { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--control); display: grid; place-items: center; margin-top: 1px; }
.setup-step.done .tick { background: var(--positive); border-color: var(--positive); color: #fff; }
.setup-step.done b { text-decoration: line-through; color: var(--muted); }

/* calendar: heatmap, own days, blackouts */
.d.heat { cursor: pointer; font-weight: 500; }
.d.h1 { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.d.h2 { background: color-mix(in srgb, var(--accent) 28%, var(--surface)); }
.d.h3 { background: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.d.h4 { background: color-mix(in srgb, var(--accent) 66%, var(--surface)); color: #fff; }
.d.h5 { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .d.h4, :root[data-theme="dark"] .d.h5 { color: #0d0e10; }
.d.heat .ct { background: rgba(12, 14, 18, .72); }
.d.has { cursor: pointer; }
.d.heat:hover, .d.has:hover { transform: scale(1.1); z-index: 2; }
.d .mebar { position: absolute; left: 3px; right: 3px; bottom: 2px; height: 3px; border-radius: 2px; background: var(--me, var(--text)); }
.d .mebar.pend { background: repeating-linear-gradient(90deg, var(--text) 0 3px, transparent 3px 5px); }
.d.bo-hard { background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--negative) 34%, transparent) 0 2px, transparent 2px 6px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--negative) 45%, transparent); }
.d.bo-soft { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--warn) 70%, transparent); outline: 1.5px dotted color-mix(in srgb, var(--warn) 80%, transparent); outline-offset: -4px; }
.d.booked.bo-hard, .d.heat.bo-hard { background-blend-mode: multiply; }
.d.free.bo-hard:hover { cursor: not-allowed; }
.lg-tile.bo-hard { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--negative) 40%, transparent) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--negative) 45%, transparent); }
.lg-tile.bo-soft { outline: 1.5px dotted var(--warn); outline-offset: -3px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 60%, transparent); }
.lg-tile.mebar { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.lg-tile.mebar::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: 2px; height: 3px; border-radius: 2px; background: var(--c); }
.lg-heat { display: inline-flex; gap: 2px; }
.lg-heat b { width: 10px; height: 14px; border-radius: 3px; display: inline-block; }
.lg-heat b.h1 { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.lg-heat b.h2 { background: color-mix(in srgb, var(--accent) 28%, var(--surface)); }
.lg-heat b.h3 { background: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.lg-heat b.h4 { background: color-mix(in srgb, var(--accent) 66%, var(--surface)); }
.lg-heat b.h5 { background: var(--accent); }
.lg-bar { width: 14px; height: 6px; background: var(--negative); border-radius: 2px; display: inline-block; }
.d:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; z-index: 5; }
.dock-list { max-height: 46vh; overflow: auto; }
.dock .li.bo .t b { font-weight: 600; }
.bo-mark { flex: none; width: 22px; height: 22px; border-radius: 5px; display: inline-block; }
.bo-mark.hard { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--negative) 45%, transparent) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--negative) 60%, transparent); }
.bo-mark.soft { outline: 2px dotted var(--warn); outline-offset: -4px; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--warn) 55%, transparent); }

/* request sheet */
.sheet-ov { position: fixed; inset: 0; z-index: 75; background: rgba(10, 12, 16, .32); animation: fadeIn .18s both; }
.sheet-ov.closing { opacity: 0; transition: opacity .18s; }
.sheet { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-float); display: flex; flex-direction: column; animation: sheetIn .3s var(--ease) both; outline: none; }
.sheet.wide { width: min(680px, 100vw); }
.sheet-ov.closing .sheet { transform: translateX(32px); opacity: 0; transition: transform .18s var(--ease), opacity .18s; }
@keyframes sheetIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-b { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.sheet-pad { padding: 18px 20px 20px; display: flex; flex-direction: column; min-height: 100%; }
.sheet-h { display: flex; align-items: center; gap: 12px; }
.sheet-h h2 { font-size: 17px; line-height: 22px; font-weight: 600; }
.sheet-h .muted { font-size: 13px; }
.sheet-when { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-card); background: var(--raised); display: flex; flex-direction: column; gap: 4px; }
.sheet-when .big { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -.01em; }
.sheet-when .muted { font-size: 13px; }
.sheet-when .cmt { margin-top: 6px; font-size: 14px; }
.sheet-when .callout { margin-top: 8px; }
.sheet-sec { margin-top: 18px; }
.sheet-sec > h3 { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.sheet-sec.grow-sec { flex: 1; display: flex; flex-direction: column; }
.steps { display: flex; flex-direction: column; position: relative; }
.step { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.step + .step::before { content: ""; position: absolute; left: 11px; top: -8px; height: 16px; width: 2px; background: var(--border); }
.step-dot { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--control); }
.step.approved .step-dot { background: var(--pill-ok-bg); color: var(--pill-ok-ink); box-shadow: none; }
.step.rejected .step-dot { background: var(--pill-bad-bg); color: var(--pill-bad-ink); box-shadow: none; }
.step.pending .step-dot { background: var(--pill-pending-bg); color: var(--pill-pending-ink); box-shadow: none; }
.step.skipped { opacity: .65; }
.step-t { display: flex; align-items: baseline; gap: 8px; }
.step-t b { font-weight: 600; }
.step-t .muted { font-size: 13px; }
.step-s { color: var(--muted); font-size: 13px; margin-top: 1px; }
.step-c { margin-top: 4px; font-size: 13px; padding: 6px 9px; border-radius: var(--r-ctl); background: var(--raised); }
.kvs { display: flex; flex-direction: column; margin-top: 10px; border-radius: var(--r-card); background: var(--raised); padding: 4px 12px; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 36px; font-size: 13px; }
.kv + .kv { border-top: 1px solid var(--border); }
.kv.top { align-items: flex-start; padding: 8px 0; }
.kv > span:first-child { color: var(--muted); flex: none; }
.kv .bal-bar { gap: 6px; }
.thread-people { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; font-size: 12px; }
.thread { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 4px 0 12px; }
.thread-empty { font-size: 13px; padding: 10px 0; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; position: relative; animation: fadeUp .22s var(--ease) both; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.bubble { padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--raised); min-width: 0; }
.msg.mine .bubble { border-radius: 14px 14px 4px 14px; background: var(--brand); color: var(--on-brand); }
.msg.new .bubble { box-shadow: 0 0 0 1.5px var(--accent); }
.bubble b { display: block; font-size: 12px; font-weight: 600; margin-bottom: 1px; }
.bubble p { white-space: pre-wrap; word-break: break-word; }
.bubble time { display: block; font-size: 11px; opacity: .7; margin-top: 2px; }
.msg-del { opacity: 0; transition: opacity .12s; width: 28px; height: 28px; }
.msg:hover .msg-del, .msg-del:focus-visible { opacity: 1; }
.composer { position: sticky; bottom: -20px; display: flex; gap: 8px; align-items: flex-end; padding: 12px 0 calc(16px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); margin-top: auto; }
.composer .inp { min-height: 40px; height: 40px; max-height: 160px; resize: none; padding: 9px 10px; line-height: 20px; }
.composer .btn { height: 40px; }

/* approval steps as chips (lists, cards) */
.step-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.step-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 8px; border-radius: 999px; font-size: 13px; background: var(--raised); color: var(--muted); white-space: nowrap; max-width: 100%; }
.step-chip b { font-weight: 600; color: var(--text); }
.step-chip span { overflow: hidden; text-overflow: ellipsis; }
.step-chip.approved { background: var(--pill-ok-bg); color: var(--pill-ok-ink); }
.step-chip.approved b { color: var(--pill-ok-ink); }
.step-chip.rejected { background: var(--pill-bad-bg); color: var(--pill-bad-ink); }
.step-chip.rejected b { color: var(--pill-bad-ink); }
.step-chip.pending { background: var(--pill-pending-bg); color: var(--pill-pending-ink); }
.step-chip.pending b { color: var(--pill-pending-ink); }
.unread-n { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; vertical-align: 2px; }
:root[data-theme="dark"] .unread-n { color: #0d0e10; }

/* lists */
.list-h { padding: 12px 16px 4px; color: var(--muted); font-size: 12px; }
.rq-btn { width: 100%; border: 0; border-top: 1px solid var(--rule); background: transparent; text-align: left; color: inherit; cursor: pointer; transition: background-color .12s; }
.reqs > .list-h + .rq-btn, .reqs > .rq-btn:first-child { border-top: 0; }
.rq-btn:hover { background: color-mix(in srgb, var(--raised) 70%, transparent); }
.rq-btn .right .ico { transition: transform .14s var(--ease); }
.rq-btn:hover .right .ico { transform: translateX(2px); }
.consent { margin-bottom: 12px; border-color: var(--pill-pending-ink); }
.ledger tr.cur { background: var(--raised); }
.cmt.note { margin-top: 10px; padding: 8px 10px; background: var(--raised); border-radius: var(--r-ctl); }
.bulk { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; border-radius: var(--r-card); background: var(--pill-ok-bg); color: var(--pill-ok-ink); }
.ap-actions .btn .badge { margin-left: 2px; height: 18px; min-width: 18px; font-size: 11px; }
.ap .step-row { margin-top: 10px; }

/* team timeline */
.tl-group { display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--border); background: var(--raised); text-align: left; color: var(--text); position: relative; z-index: 2; }
.tl-group b { font-weight: 600; }
.tl-group .muted { font-size: 13px; }
.tl-group:hover { background: var(--active); }
.tl-note { padding: 18px 16px; color: var(--muted); position: relative; z-index: 2; background: var(--surface); }
.tl-more { width: 100%; height: 40px; border: 0; border-top: 1px solid var(--border); background: var(--surface); color: var(--accent); font-weight: 500; position: relative; z-index: 2; }
.tl-more:hover { background: var(--raised); }
button.tl-bar { border: 0; font: inherit; text-align: left; }
button.tl-bar[tabindex="0"] { cursor: pointer; }

/* departments */
.split { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.tree-card { position: sticky; top: 20px; padding-bottom: 6px; }
.tree { display: flex; flex-direction: column; padding: 8px 6px 2px; }
.tree-row { --depth: 0; display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 8px 0 calc(10px + var(--depth) * 18px); border: 0; border-radius: var(--r-ctl); background: transparent; text-align: left; color: var(--text); position: relative; transition: background-color .12s; }
.tree-row::before { content: ""; position: absolute; left: calc(var(--depth) * 18px - 2px); top: 8px; bottom: 8px; width: 1.5px; background: var(--border); display: var(--tree-line, block); }
.tree-row[style*="--depth: 0"]::before, .tree-row[style*="--depth:0"]::before { display: none; }
.tree-row:hover { background: var(--raised); }
.tree-row.on { background: var(--active); font-weight: 500; }
.tree-row.ro { color: var(--muted); }
.tree-row .tn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-row .ct { color: var(--faint); font-size: 12px; min-width: 18px; text-align: right; }
.detail { padding: 18px 20px 6px; }
.det-h { display: flex; align-items: center; gap: 12px; }
.det-h h2 { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -.01em; }
.det-h .muted { font-size: 13px; }
.swatch.lg { width: 14px; height: 14px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 16px 0 14px; border: 1px solid var(--border); border-radius: var(--r-card); }
.facts > div { padding: 10px 14px; }
.facts > div + div { border-left: 1px solid var(--border); }
.facts b { display: block; font-size: 20px; line-height: 26px; font-weight: 600; }
.facts span { color: var(--muted); font-size: 12px; }
.det-sec { padding: 14px 0; border-top: 1px solid var(--rule); }
.detail > .callout + .det-sec { margin-top: 14px; }
.sec-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.sec-h h3 { font-size: 14px; font-weight: 600; }
.sec-h .muted { font-size: 13px; }
.mem { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.mem b { display: block; font-weight: 500; }
.mem .muted { font-size: 12px; }
.pad-y { padding: 6px 0; font-size: 13px; }
.set-row.flat { border-top: 0; padding: 0; }
.danger-zone .set-row b { color: var(--negative); }
.palette.inline { padding: 4px 0; grid-template-columns: repeat(12, 1fr); }
.pick-people { max-height: 46vh; overflow: auto; margin-top: 10px; border: 1px solid var(--border); border-radius: var(--r-card); }
.pp { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--rule); cursor: pointer; }
.pp:first-child { border-top: 0; }
.pp:hover { background: var(--raised); }
.pp .muted { font-size: 12px; }
.dept-picker { border: 1px solid var(--border); border-radius: var(--r-card); max-height: 38vh; overflow: auto; }
.dp-row { --depth: 0; display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px calc(12px + var(--depth) * 18px); border-top: 1px solid var(--rule); }
.dp-row:first-child { border-top: 0; }
.dp-row label { display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 30px; }
.dp-row select { width: 110px; }

/* invite links */
.invs { display: flex; flex-direction: column; }
.inv { display: flex; gap: 16px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--rule); }
.inv:first-child { border-top: 0; }
.inv.dead { opacity: .7; }
.inv-depts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inv-depts .muted { font-size: 13px; }
.inv-link { margin: 8px 0 4px; }
.inv-link code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12px; color: var(--muted); word-break: break-all; }
.inv .meta { color: var(--muted); font-size: 13px; }
.inv .right { display: flex; gap: 8px; align-items: center; flex: none; }

/* blocked dates */
.bo-list { display: flex; flex-direction: column; }
.bo-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-top: 1px solid var(--rule); }
.bo-row:first-child { border-top: 0; }
.bo-row .bo-mark { margin-top: 2px; }
.bo-row .when { font-weight: 600; }
.bo-row .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.bo-row .cmt { margin-top: 6px; padding: 6px 10px; background: var(--raised); border-radius: var(--r-ctl); font-size: 13px; display: inline-block; }
.bo-row .right { display: flex; align-items: center; gap: 4px; flex: none; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rc { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--control); border-radius: var(--r-card); background: var(--surface); text-align: left; color: var(--text); transition: border-color .12s, box-shadow .12s, background-color .12s; }
.rc:hover { background: var(--raised); }
.rc.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); background: var(--raised); }
.rc-dot { flex: none; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--control); }
.rc.on .rc-dot { box-shadow: inset 0 0 0 5px var(--text); }
.rc .bo-mark { margin-top: 0; }
.rc b { display: block; font-weight: 600; }
.rc span span { color: var(--muted); font-size: 13px; line-height: 18px; }
.bo-prev { min-height: 8px; }

/* settings */
.set-sec { margin-bottom: 22px; }
.set-sec > h2 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.wk { display: inline-flex; gap: 4px; }
.wk button { width: 36px; height: 30px; border: 1px solid var(--control); border-radius: var(--r-ctl); background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 500; transition: background-color .12s, color .12s; }
.wk button.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

/* auth: picture, picker, join, first run */
.mini { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 360px; margin-top: 34px; }
.mini i { aspect-ratio: 1; border-radius: 7px; background: rgba(255, 255, 255, .12); animation: fadeIn .5s both; animation-delay: calc(var(--i) * 14ms); }
.mini i.we { opacity: .5; }
.mini i.c { background: var(--c); opacity: 1; }
.auth-form { position: relative; }
.auth-form .auth-brand { display: none; position: absolute; top: 24px; left: 24px; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.join-depts { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 18px; }
.auth-card .btn.primary + .switch-link { margin-top: 16px; }
.pick-list { display: flex; flex-direction: column; gap: 8px; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); text-align: left; color: var(--text); transition: border-color .12s, background-color .12s, transform .1s; }
.pick:hover { background: var(--raised); border-color: var(--control); }
.pick:active { transform: scale(.99); }
.pick .org-mark { width: 36px; height: 36px; font-size: 13px; }
.pick b { display: block; font-weight: 600; }
.pick .grow span { color: var(--muted); font-size: 13px; }
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); text-align: left; color: var(--text); transition: background-color .12s, border-color .12s; }
.choice:hover { background: var(--raised); border-color: var(--control); }
.choice > .ico { color: var(--muted); margin-top: 1px; }
.choice b { display: block; font-weight: 600; }
.choice span span { color: var(--muted); font-size: 13px; }

@media (max-width: 1180px) {
  .split { grid-template-columns: 1fr; }
  .tree-card { position: static; }
  .setup-steps { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .auth-form .auth-brand { display: flex; }
  .org-btn { margin-top: 0; }
  .sheet, .sheet.wide { width: 100vw; border-left: 0; }
  .search .inp { width: 160px; }
  .inv { flex-direction: column; align-items: stretch; }
  .radio-cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; }
  .facts > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .past-chips { display: none; }
  .ph .actions { width: 100%; justify-content: flex-start; }
  .ph .actions > .scope-sel { max-width: none; flex: 1 1 100%; min-width: 0; }
  .ph .actions > .btn.primary { flex: 1 1 100%; justify-content: center; order: 10; }
  .ph .actions > .search { flex: 1 1 100%; }
  .ph .actions > .search .inp { width: 100%; }
  .msg { max-width: 96%; }
  .bo-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .past-wrap { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .icon-btn.ring, .icon-btn.ring::before, .icon-btn.ring svg { animation: none !important; }
  .icon-btn.ring::before { opacity: .18; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* where you're signed in */
.sess-list { display: flex; flex-direction: column; gap: 8px; }
.sess { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); }
.sess.cur { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.sess .grow { flex: 1; min-width: 0; }
.sess .muted { font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }
.sess-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--raised); color: var(--muted); }
