/* BigIron kit: shared component styles on top of the tokens in theme.css (both linked last in every page's <head>,
   so they override the page's own defaults). The kit's components (kit/*.js) are the only implementations of a
   drawer, company switcher, toggle dot, picker or select: pages never restyle them from scratch (docs/ui-conventions.md). */

/* The kit components' own styles come first: page styles stay free to set their layout around them. */
/* ---------- drawer (Kit.openDrawer) and company switcher (Kit.coSide) ---------- */
/* add / edit drawer */
dialog.sdrawer { margin:0 0 0 auto; width:min(560px,100vw); height:100vh; height:100dvh; max-height:none; padding:0; border:0;
  border-left:1px solid var(--color-line); background:var(--color-surface); color:var(--color-ink); box-shadow:var(--shadow-lg);
  animation:sd-in 300ms var(--ease) both; }
dialog.sdrawer::backdrop { background:var(--veil); }
@keyframes sd-in { from { transform:translateX(100%); } }
dialog.sdrawer form { display:flex; flex-direction:column; height:100%; }
.sd-head { display:flex; align-items:center; gap:10px; padding:16px 24px; border-bottom:1px solid var(--color-line); }
.sd-head h2 { flex:1; } .sd-head .x { border:0; background:none; box-shadow:none; font-size:20px; padding:2px 8px; }
.sd-body { flex:1; overflow-y:auto; padding:20px 24px; display:flex; flex-direction:column; gap:18px; }
.sd-body .msg:empty { display:none; }
.sd-field { display:flex; flex-direction:column; gap:6px; }
.sd-field[hidden] { display:none; }
.sd-field.check { flex-direction:row; align-items:center; gap:10px; cursor:pointer; }
.sd-field.check input { width:auto; min-width:0; }
.sd-label { font-size:14px; font-weight:500; color:var(--color-ink-2); }
.sd-field.ro div { font-size:14px; color:var(--color-ink-3); }
.sd-field input:not([type=checkbox]):not([type=radio]), .sd-field select { width:100%; }
.sd-field .checks { max-height:280px; overflow-y:auto; border:1px solid var(--color-line); border-radius:var(--radius-sm); padding:8px 12px; }
.sd-foot { display:flex; justify-content:flex-end; gap:8px; padding:14px 24px; border-top:1px solid var(--color-line); }
dialog.sdrawer.wide { width:min(920px,100vw); }   /* big forms such as a tax table */
.sd-amt { display:flex; gap:8px; } .sd-amt input { flex:1; }
/* max-width: the browser's own dialog limit (100% - 2em) would leave a strip on the left on phones */
@media (max-width:640px) { dialog.sdrawer, dialog.sdrawer.wide { width:100vw; max-width:100vw; } }
@media (prefers-reduced-motion:reduce) { dialog.sdrawer { animation:none; } }
.fy-wrap { display:grid; grid-template-columns:240px minmax(0,1fr); gap:18px; align-items:start; }
.fy-pick { display:none; }
@media (max-width:900px) { .fy-wrap { grid-template-columns:minmax(0,1fr); } .fy-side { position:static; } .fy-pick { display:block; width:100%; } .co-side > .fy-q, .co-side > .fy-list { display:none; } }
.fy-side { position:sticky; top:72px; display:flex; flex-direction:column; gap:8px; } .fy-q { width:100%; box-sizing:border-box; }
.fy-list { display:flex; flex-direction:column; gap:6px; max-height:calc(100vh - 180px); overflow-y:auto; }
.fy-item { display:flex; flex-direction:column; align-items:flex-start; gap:2px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--card);
  text-align:left; box-shadow:none; cursor:pointer; font:inherit; color:inherit; width:100%; }
.fy-item:hover { border-color:var(--color-brand); } .fy-item.on { border-color:var(--color-brand); background:var(--color-brand-tint, var(--color-sunk)); }
/* drawer: split with a side pane, busy, radios */
/* Expanded: the drawer doubles; the form stays on the left half, the accounts picker gets the right half. */
dialog.sdrawer.xwide { width:min(1120px,100vw); }
dialog.sdrawer.xwide form { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-rows:auto minmax(0,1fr) auto; }
dialog.sdrawer.xwide .sd-head, dialog.sdrawer.xwide .sd-foot { grid-column:1 / -1; }
.sd-side { overflow-y:auto; padding:20px 24px; border-left:1px solid var(--color-line); background:var(--color-bg); display:flex; flex-direction:column; min-height:0; }
.sd-side .sd-field { flex:1; min-height:0; }
.sd-side .tree-tools { position:sticky; top:-20px; z-index:1; background:var(--color-bg); padding:8px 0; margin:-8px 0 0; }
.sd-side .checks.tree { max-height:none; flex:1; background:var(--color-surface); }
@media (max-width:860px) { dialog.sdrawer.xwide form { display:flex; } .sd-side { border-left:0; border-top:1px solid var(--color-line); } }
/* A drawer running a job: everything inside is blocked until it ends. */
dialog.sdrawer.busy form { pointer-events:none; }
dialog.sdrawer.busy::after { content:"Scanning the Books\2026"; position:absolute; inset:0; display:grid; place-items:center; font-size:15px; font-weight:500;
  color:var(--color-ink); background:color-mix(in srgb, var(--color-surface) 70%, transparent); backdrop-filter:blur(2px); z-index:5; cursor:progress; }
.sd-radios { display:flex; flex-wrap:wrap; gap:8px 18px; }
.sd-radios label { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; cursor:pointer; }
.sd-radios input[type=radio] { width:auto; margin:0; accent-color:var(--acc); }
.sd-radio { display:inline-flex; align-items:center; gap:8px; font-size:14px; cursor:pointer; padding:6px 0; }
.sd-radio input { width:auto; min-width:0; margin:0; accent-color:var(--color-brand); }
.sd-head .sd-sidebtn { white-space:nowrap; }
.sd-side[hidden] { display:none; }
.sd-pair { display:grid; grid-template-columns:1fr 1fr; gap:12px; } @media (max-width:520px) { .sd-pair { grid-template-columns:1fr; } }
/* ---------- toggle dot (Kit.toggleDot) ---------- */
/* Toggle dot (UI convention): on/off flag in a list, placed before Edit. */
button.tdot, button.tdot:hover:not(:disabled) { width:22px; height:22px; min-width:0; padding:0; border:0; background:none; box-shadow:none;
  display:inline-grid; place-items:center; cursor:pointer; border-radius:50%; }
button.tdot::before { content:""; width:10px; height:10px; border-radius:50%; box-sizing:border-box; border:2px solid var(--color-ink-3); transition:all .15s; }
button.tdot.on::before { border-color:var(--color-ok, #2e7d32); background:var(--color-ok, #2e7d32); box-shadow:0 0 0 3px color-mix(in srgb, var(--color-ok, #2e7d32) 18%, transparent); }
button.tdot:hover:not(:disabled)::before { transform:scale(1.15); }
button.tdot:focus-visible { outline:2px solid var(--acc); outline-offset:1px; }
/* Toggle dot in the leftmost column (UI convention); inactive rows are muted. */
th.tdot-c, td.tdot-c { width:28px; padding-left:6px; padding-right:0; }
tr.row-off > td:not(.tdot-c) { color:var(--color-ink-3); }
/* ---------- help drawer (Kit.mountHelp) ---------- */
.help h3 { font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--mut); margin:16px 0 6px; font-weight:600; }
.help h3:first-child { margin-top:0; }
.help p { margin:0; line-height:1.55; } .help ul { margin:0; padding-left:18px; line-height:1.6; }
.help-rel { display:flex; flex-wrap:wrap; gap:6px; }
/* Help drawer: text on the left, steps fold per task; screenshots on the right (stacked under the text on phones). */
.help ol { margin:2px 0 8px; padding-left:22px; line-height:1.6; } .help ol li + li { margin-top:3px; }
.help-task { border-top:1px solid var(--color-line); }
.help-task:last-of-type { border-bottom:1px solid var(--color-line); }
.help-task summary { cursor:pointer; padding:8px 0; font-weight:500; color:var(--color-ink-2); list-style:none; display:flex; gap:8px; align-items:baseline; }
.help-task summary::-webkit-details-marker { display:none; }
.help-task summary::before { content:"\203a"; color:var(--mut); display:inline-block; width:10px; text-align:center; transition:transform 150ms; }
.help-task[open] summary::before { transform:rotate(90deg); }
.help-task summary:hover { color:var(--acc); }
.help-terms { margin:0; }
.help-terms dt { font-weight:500; margin-top:10px; } .help-terms dt:first-child { margin-top:0; }
.help-terms dd { margin:2px 0 0; color:var(--color-ink-2); line-height:1.55; }
.help-tips li::marker { color:var(--acc); }
.help-shots { display:flex; flex-direction:column; gap:22px; }
.help-shot { margin:0; display:flex; flex-direction:column; gap:8px; }
.help-shot figcaption { font-size:13px; color:var(--mut); line-height:1.5; }
button.help-zoom { display:block; padding:0; margin:0; border:1px solid var(--color-line); border-radius:var(--radius-sm); background:var(--color-surface);
  box-shadow:none; overflow:hidden; cursor:zoom-in; width:100%; min-width:0; }
button.help-zoom:hover:not(:disabled) { border-color:var(--color-line-strong); background:var(--color-surface); }
button.help-zoom img { display:block; width:100%; height:auto; }
.help-shot.big button.help-zoom { cursor:zoom-out; overflow:auto; max-height:85vh; }
dialog.sdrawer.help-drawer.xwide.help-wide { width:min(1440px,100vw); }
dialog.sdrawer.help-drawer.xwide.help-wide form { grid-template-columns:minmax(0,.65fr) minmax(0,1.35fr); }
@media (prefers-reduced-motion:reduce) { .help-task summary::before { transition:none; } }
@media (max-width:860px) {
  .help-shot.big button.help-zoom img { width:auto; max-width:none; }
  dialog.sdrawer.help-drawer.xwide form { overflow-y:auto; }
  dialog.sdrawer.help-drawer.xwide .sd-body, dialog.sdrawer.help-drawer.xwide .sd-side { flex:none; overflow:visible; }
}



/* ---------- base ---------- */
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { background: var(--color-canvas, var(--color-bg)); color: var(--color-ink); font-family: var(--font-sans); font-size: 15px; line-height: 1.5; }
:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
::selection { background: var(--color-brand-soft); color: var(--color-ink); }
h1, h2, h3 { color: var(--color-ink); }
h2 { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
code, kbd, .mono { font-family: var(--font-mono); }
kbd { border-radius: var(--radius-xs); padding: 0 6px; font-size: 11px; background: var(--color-brand-soft); color: var(--color-brand-strong); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--color-ink-3); }

/* ---------- shell: sidebar ---------- */
.app { grid-template-columns: 256px minmax(0, 1fr); }
aside.side { background: var(--color-surface); border-right: 1px solid var(--color-line); padding: 20px 16px; gap: 20px; }
aside.side .brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--color-ink); padding: 0 4px; }
aside.side .brand::before { content: ""; flex: none; width: 34px; height: 34px; border-radius: var(--radius-sm);
  background: var(--color-brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cg fill='%23fff'%3E%3Crect x='10' y='10' width='14' height='2.6' rx='1.3'/%3E%3Crect x='10' y='15.7' width='10' height='2.6' rx='1.3'/%3E%3Crect x='10' y='21.4' width='6' height='2.6' rx='1.3'/%3E%3C/g%3E%3C/svg%3E") center / 34px no-repeat;
  box-shadow: var(--shadow-brand); }
aside.side .side-label { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-ink-3); margin: 0 12px 8px; }
aside.side .links { gap: 2px; }
aside.side .links a, aside.side .act { gap: 12px; padding: 8px 12px; border-radius: var(--radius-sm); font-size: 15px; color: var(--color-ink-2);
  transition: background-color 150ms, color 150ms; }
aside.side .links a:hover, aside.side .act:hover { background: var(--color-sunk); color: var(--color-ink); }
aside.side .links a.on { background: var(--color-brand-tint); color: var(--color-brand); font-weight: 500; }
/* Timeline dots: each page link sits on a thin rail; the current page's dot takes the brand colour, the others stay dim. */
aside.side .links a:not(.addv) { position: relative; }
aside.side .links a:not(.addv)::before { content: ""; flex: none; box-sizing: border-box; width: 10px; height: 10px; border-radius: 50%; position: relative; z-index: 1;
  border: 2px solid color-mix(in srgb, var(--color-ink-3) 55%, transparent); background: var(--color-surface); transition: border-color 150ms, background-color 150ms; }
aside.side .links a:not(.addv):hover::before { border-color: var(--color-ink-3); }
aside.side .links a.on::before, aside.side .links a[aria-current="page"]::before { border-color: var(--color-brand); background: var(--color-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-brand) 22%, transparent); }
aside.side .links a:not(.addv):has(+ a:not(.addv))::after { content: ""; position: absolute; left: 16.5px; top: 50%; height: calc(100% + 2px); width: 1px;
  background: var(--color-line, rgba(127,127,127,.25)); pointer-events: none; }
aside.side .act.primary { background: var(--color-brand); color: var(--color-on-brand); box-shadow: var(--shadow-brand); border-radius: 999px; }
aside.side .act.primary:hover { background: var(--color-brand-strong); color: var(--color-on-brand); filter: none; }

/* ---------- shell: main and top bar ---------- */
main { max-width: 1280px; padding: 32px 32px 64px; }
.topbar { margin: -32px -32px 0; padding-left: 32px; padding-right: 32px; min-height: 64px;
  background: color-mix(in srgb, var(--color-bg) 90%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-line); }
.tabbar { gap: 8px; }
.tabbar button, .tabbar button:hover:not(:disabled) { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; box-shadow: none;
  padding: 12px 6px; margin: 0 6px; font-size: 15px; font-weight: 500; color: var(--color-ink-3); }
.tabbar button:hover:not(:disabled) { color: var(--color-ink); border-bottom-color: var(--color-line-strong); }
.tabbar button[aria-selected="true"], .tabbar button[aria-selected="true"]:hover { color: var(--color-brand); border-bottom-color: var(--color-brand); }
.tabbar button:first-child { margin-left: 0; }
.view-head { gap: 4px 12px; margin: 28px 0 14px; }

/* ---------- cards and KPI tiles ---------- */
.card { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
/* Content-pane convention: containers that only hold a page's content (tables, charts, empty states) are flat.
   Tiles (.card.tile) stay boxed: each is an object of its own. */
.card.tablewrap, .card.chart, .card.empty { background: none; border: 0; border-radius: 0; box-shadow: none; padding-left: 0; padding-right: 0; }
.card:has(table) { overflow: hidden; }
.tiles { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.tile { padding: 20px 24px; }
.tile .k { font-size: 15px; color: var(--color-ink-3); }
.tile .v { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin-top: 8px; color: var(--color-ink); }
.tile .s { font-size: 13.5px; color: var(--color-ink-3); margin-top: 6px; }

/* ---------- tables ---------- */
th, td { padding: 10px 14px; border-bottom-color: var(--color-line); }
th { font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--color-ink-3); }
tfoot td { border-top-color: var(--color-line-strong); font-weight: 600; }
tr.click:hover td { background: var(--color-sunk); }

/* ---------- buttons (pill) ---------- */
button { font: inherit; font-size: 14px; font-weight: 500; line-height: 1.4; border-radius: 999px; padding: 7px 14px;
  border: 1px solid var(--color-line-strong); background: var(--color-surface); color: var(--color-ink-2); white-space: nowrap;
  transition: background-color 150ms, border-color 150ms, color 150ms; }
button:hover:not(:disabled) { background: var(--color-sunk); color: var(--color-ink); border-color: var(--color-line-strong); }
button:disabled { opacity: 0.6; cursor: default; }
button.primary, .act.primary { background: var(--color-brand); border-color: var(--color-brand); color: var(--color-on-brand); box-shadow: var(--shadow-brand); }
button.primary:hover:not(:disabled), .act.primary:hover { background: var(--color-brand-strong); border-color: var(--color-brand-strong); color: var(--color-on-brand); filter: none; }
button.danger { color: var(--color-err); border-color: color-mix(in srgb, var(--color-err) 40%, transparent); }
button.danger:hover:not(:disabled) { background: var(--color-err-soft); color: var(--color-err); }

/* ---------- form controls ---------- */
input:where(:not([type="checkbox"], [type="radio"], [type="file"], [type="range"], [type="color"], [type="submit"], [type="button"])), select, textarea {
  font: inherit; font-size: 15px; border-radius: var(--radius-sm); border: 1px solid var(--color-line-strong);
  background: var(--color-surface); color: var(--color-ink); padding: 7px 12px; transition: border-color 150ms, box-shadow 150ms; }
input:where(:not([type="checkbox"], [type="radio"], [type="file"], [type="range"], [type="color"]))::placeholder, textarea::placeholder { color: var(--color-ink-4); }
input:where(:not([type="checkbox"], [type="radio"], [type="file"], [type="range"], [type="color"])):focus, select:focus, textarea:focus {
  outline: none; border-color: var(--color-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-brand) 15%, transparent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--color-brand); }
/* portable:begin  (also in Nexus, the staff portal: staff_portal/ui.py takes the rules between these markers) */
/* Dropdowns (one standard component, every portal): own chevron drawn in the text colour with room on the right,
   so it reads the same in light and dark and never sits against the border; a light focus ring. */
select:not([multiple]):not([size]) {
  -webkit-appearance: none; appearance: none; padding-right: 34px; cursor: pointer; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
select:not([multiple]):not([size]):hover { border-color: var(--color-ink-4); }
select:not([multiple]):not([size]):focus { outline: none; border-color: var(--color-focus, var(--color-brand));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-focus, var(--color-brand)) 14%, transparent); }
select:disabled { cursor: default; opacity: .6; }
/* portable:end */

/* ---------- messages, pills ---------- */
.banner { border-radius: var(--radius-sm); background: var(--color-warn-soft); color: var(--color-warn); padding: 10px 14px; font-size: 14px; }
.msg-ok { border-radius: var(--radius-sm); background: var(--color-ok-soft); color: var(--color-ok); }
.ok-pill, .bad-pill, .tag { border-radius: var(--radius-xs); padding: 1px 8px; font-weight: 500; }
.ok-pill { background: var(--color-brand-soft); color: var(--color-brand-strong); }
.bad-pill { background: var(--color-err-soft); color: var(--color-err); }
.tag { background: var(--color-warn-soft); color: var(--color-warn); }
a.lk { color: var(--color-brand); }
a.lk:hover { color: var(--color-brand-strong); }

/* ---------- overlays ---------- */
/* The page behind a dialog, drawer or the phone menu does not scroll. */
html:has(dialog[open]), html:has(.drawer.open), html:has(body.mnav-open) { overflow: hidden; }
main a:not([class]), section a:not([class]) { color: var(--color-brand); }
main a:not([class]):hover, section a:not([class]):hover { color: var(--color-brand-strong); }
.drawer { background: var(--color-surface); border-left: 1px solid var(--color-line); box-shadow: var(--shadow-lg); transition: transform 300ms var(--ease), visibility 300ms; }
.drawer-head { padding: 16px 24px; border-bottom-color: var(--color-line); }
.drawer-body { padding: 20px 24px 32px; }
.scrim { background: var(--veil); }
.tip { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }

/* ---------- motion ---------- */
@keyframes bigiron-fade-up { from { opacity: 0; transform: translateY(6px); } }
main { animation: bigiron-fade-up 280ms var(--ease) both; }

/* ---------- phones ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  main { padding: 20px 16px 48px; }
  .topbar { margin: -20px -16px 0; padding-left: 16px; padding-right: 16px; }
  .tile { padding: 16px; }
  .tile .v { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* Beta label (kit/beta.js) */
.beta-chip { display:inline-block; font-size:10.5px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; padding:1px 7px; margin-left:6px;
  border-radius:999px; color:var(--color-brand); background:var(--color-brand-tint); border:1px solid color-mix(in srgb, var(--color-brand) 30%, transparent); vertical-align:2px; }

/* Notifications (kit/bell.js, beta "notifications") */
.nf-bell { display:flex; align-items:center; gap:10px; width:100%; padding:8px 10px; margin-top:6px; border:0; border-radius:var(--radius-sm);
  background:none; color:inherit; font:inherit; font-size:13.5px; cursor:pointer; text-align:left; }
.nf-bell:hover { background:var(--chip, var(--color-brand-tint)); }
.nf-bell:focus-visible { outline:2px solid var(--color-brand); outline-offset:2px; }
.nf-bell .nf-label { flex:1; min-width:0; }
.nf-bell .beta-chip { margin-left:0; }
.nf-count { min-width:20px; padding:1px 6px; border-radius:999px; background:var(--color-brand); color:#fff; font-size:11.5px; font-weight:600; text-align:center; }
.nf-list { display:flex; flex-direction:column; gap:8px; }
.nf-item { padding:10px 12px; border:1px solid var(--color-line); border-radius:var(--radius-sm); overflow-wrap:anywhere; }
.nf-item.unread { border-left:3px solid var(--color-brand); }
.nf-item .nf-t { font-weight:600; font-size:14px; }
.nf-item .nf-t a { color:inherit; }
.nf-item .nf-b { font-size:13.5px; margin-top:2px; white-space:pre-line; }
.nf-item .nf-m { margin:4px 0 0; }
.nf-prefs { margin-top:28px; }
.nf-prefs .nf-pref { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:8px 0;
  border-top:1px solid var(--color-line); font-size:14px; font-weight:400; margin:0; }
.nf-prefs .nf-pref select { max-width:100%; }
.nf-prefs .nf-pref input[type=checkbox] { width:auto; height:auto; }
.nf-prefs .nf-q { display:flex; align-items:center; gap:6px; }
.nf-prefs .nf-q input[type=time] { width:auto; height:36px; }
.nf-prefs .row { margin-top:12px; }

/* Task inbox (kit/inbox.js, beta "task_inbox") */
.nf-count.late { background:var(--color-err); }
.ib-tabs { display:flex; flex-wrap:wrap; gap:4px; margin:0 0 12px; border-bottom:1px solid var(--color-line); }
.ib-tabs button { border:0; border-bottom:2px solid transparent; border-radius:0; background:none; box-shadow:none; padding:6px 10px; font:inherit; cursor:pointer; color:inherit; }
.ib-tabs button.on { color:var(--color-brand); border-bottom-color:var(--color-brand); }
.ib-group h3 { font-size:13px; font-weight:600; margin:14px 0 6px; text-transform:uppercase; letter-spacing:.04em; }
.ib-item.late { border-left:3px solid var(--color-err); }
.ib-chip { display:inline-block; margin-left:6px; padding:0 7px; border-radius:999px; font-size:11px; font-weight:600; vertical-align:1px;
  background:var(--color-brand-tint); color:var(--color-brand); }
.ib-chip.late { background:var(--color-err-soft, var(--color-brand-tint)); color:var(--color-err); }
.ib-acts { display:flex; gap:6px; margin-top:8px; }
.ib-table { width:100%; border-collapse:collapse; font-size:13.5px; }
.ib-table th, .ib-table td { padding:6px 8px; border-bottom:1px solid var(--color-line); text-align:left; white-space:nowrap; }
.ib-table .num { text-align:right; font-variant-numeric:tabular-nums; }
.ib-body .scroll { overflow-x:auto; max-width:100%; }
.ib-acts button { padding:4px 12px; font-size:12.5px; border-radius:999px; }
/* Approvals (kit/inbox.js, beta "approvals") */
.ib-decide { margin-top:8px; }
.ib-decide .ib-cmt { width:100%; min-height:44px; font:inherit; font-size:13.5px; resize:vertical; }
.ib-steps { margin:8px 0 0; padding-left:20px; font-size:13.5px; }
.ib-steps li { margin:0 0 8px; }
.ib-group h3 .ib-chip { text-transform:none; letter-spacing:0; }
.ib-group h3.ib-ht { text-transform:none; letter-spacing:0; font-size:15px; }
/* Approval trail on a subject (kit/inbox.js, beta "approval_trail") */
.apt { margin:14px 0 4px; }
.apt h3.apt-t { font-size:13px; font-weight:600; margin:0 0 6px; display:flex; align-items:center; gap:6px; }
.apt-req { margin:0 0 10px; }
.apt-h { display:flex; flex-wrap:wrap; align-items:center; gap:4px; overflow-wrap:anywhere; }
.apt-meta { margin:2px 0 0; }
.apt-steps li { overflow-wrap:anywhere; }
.apt-steps li.apt-rejected b { color:var(--color-err); }
.apt-cmt { margin-top:2px; }

/* Notifications timeline (kit/bell.js): time | dot on a line | content; the selected row opens the side pane. */
.nf-tl { display:flex; flex-direction:column; padding:4px 8px; min-width:0; overflow-x:hidden; }
.nf-day { font-size:11.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--color-ink-3); margin:14px 0 4px 104px; }
.nf-day:first-child { margin-top:0; }
.nf-row { display:grid; grid-template-columns:68px 18px minmax(0,1fr); white-space:normal; min-width:0; align-items:stretch; gap:0; width:100%; padding:0; border:0; background:none;
  box-shadow:none; text-align:left; color:var(--color-ink); font:inherit; cursor:pointer; border-radius:8px; }
.nf-row:hover .nf-c, .nf-row.on .nf-c { background:color-mix(in srgb, var(--color-ink) 5%, transparent); }
.nf-row.on .nf-c { box-shadow:inset 2px 0 0 var(--color-brand); }
.nf-time { font-size:12px; color:var(--color-ink-3); font-variant-numeric:tabular-nums; padding:12px 8px 0 0; text-align:right; white-space:nowrap; }
.nf-dot { position:relative; }
.nf-dot::before { content:""; position:absolute; left:50%; top:0; bottom:0; width:1.5px; transform:translateX(-50%); background:var(--color-line-strong); }
.nf-dot::after { content:""; position:absolute; left:50%; top:16px; width:9px; height:9px; transform:translateX(-50%); border-radius:50%;
  background:var(--color-surface); border:2px solid var(--color-line-strong); }
.nf-row.unread .nf-dot::after { background:var(--color-brand); border-color:var(--color-brand); }
.nf-day + .nf-row .nf-dot::before { top:16px; }
.nf-row:last-child .nf-dot::before { bottom:calc(100% - 20px); }
.nf-c { display:flex; flex-direction:column; gap:2px; padding:10px 12px; margin:3px 0 3px 6px; border:1px solid transparent; border-radius:10px;
  min-width:0; white-space:normal; overflow-wrap:anywhere; }
.nf-c .nf-t { font-size:14px; font-weight:500; } .nf-row.unread .nf-c .nf-t { font-weight:600; }
.nf-c .nf-m { font-size:12.5px; color:var(--color-ink-3); }
.nf-dh { margin:0 0 4px; font-size:16px; } .nf-db { white-space:pre-line; margin:0 0 14px; }
.nf-dl { display:grid; grid-template-columns:auto 1fr; gap:4px 14px; margin:0 0 16px; font-size:13.5px; } .nf-dl dt { color:var(--color-ink-3); } .nf-dl dd { margin:0; }
.nf-open { display:inline-flex; align-items:center; padding:8px 16px; border-radius:999px; background:var(--color-brand); color:var(--color-on-brand, #fff);
  text-decoration:none; font-weight:500; } .nf-open:hover { background:var(--color-brand-strong); }

/* Group tree (kit/group-tree.js): Console › Group options and BigIron › Group */
.go-tree2 { display:flex; flex-direction:column; border:1px solid var(--color-line); border-radius:12px; padding:4px; }
.go-ti-sep { font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--mut); padding:10px 8px 4px; }
.go-tree-box { overflow-x:auto; padding:2px 0; }
.go-tree, .go-tree ul { list-style:none; margin:0; padding:0; }
.go-tree ul { padding-left:22px; }
.go-tree li { position:relative; padding:4px 0 4px 20px; }
.go-tree > li { padding-left:0; }
.go-tree ul > li::before { content:""; position:absolute; left:0; top:0; width:16px; height:21px; border-left:1.5px solid var(--color-line-strong, #9995);
  border-bottom:1.5px solid var(--color-line-strong, #9995); border-bottom-left-radius:8px; }
.go-tree ul > li::after { content:""; position:absolute; left:0; top:21px; bottom:0; border-left:1.5px solid var(--color-line-strong, #9995); }
.go-tree ul > li:last-child::after { display:none; }
.go-tree ul > li.cp::before { border-left-style:dashed; border-bottom-style:dashed; border-left-color:var(--color-brand); border-bottom-color:var(--color-brand); }
.go-tn { display:inline-flex; align-items:center; gap:8px; max-width:100%; padding:6px 10px; border:1px solid var(--color-line); border-radius:10px;
  background:var(--color-surface); color:var(--fg); font:inherit; font-size:13.5px; text-align:left; cursor:pointer; box-shadow:none; transition:background-color .2s ease, border-color .2s ease; }
button.go-tn:hover { border-color:var(--color-brand); background-color:color-mix(in srgb, var(--color-brand) 6%, var(--color-surface)); }
.go-tn.root { border-color:var(--color-brand); background:color-mix(in srgb, var(--color-brand) 8%, var(--color-surface)); cursor:default; }
button.go-tn.root { cursor:pointer; } .go-tn.off { opacity:.55; border-style:dashed; }
.go-tn-n { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .go-tn small { color:var(--mut); white-space:nowrap; }
.go-tn-p { font-variant-numeric:tabular-nums; color:var(--mut); font-size:12.5px; white-space:nowrap; }
.go-legend { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--mut); }
.go-legend i { display:inline-block; width:18px; border-top:1.5px solid var(--color-line-strong, #9995); margin-left:6px; }
.go-legend i.c { border-top:1.5px dashed var(--color-brand); }
.go-tree ul > li.gv::before { border-left-style:dotted; border-bottom-style:dotted; border-left-color:var(--mut); border-bottom-color:var(--mut); }
.go-legend i.g { border-top:1.5px dotted var(--mut); }
