/* ═══ The desk shell in the brand (docs/UI_SPEC.md 5, 15–17; docs/UI_CONTROL_TOWER.md 5.1; docs/UI_BRAND.md 8.1) ══════
   core/nav.js puts .desk on #app unless the user chose Classic view; without .desk the classic hub tabs and sidebar of
   nav.css stay exactly as they were. Tokens only (tokens.css), so light, dark and Hindi come from the same rules.
   The brand: white chrome on the ice page, the turquoise of the mark (--brand) for the logo tile, the sidebar's stripe,
   the top bar's accent line and the phone "+"; the action teal (--accent) for what the user presses and where they are
   (the open row's indicator, + New, focus); the agent's violet for Ask.
     ≥1280      212 px white sidebar with the 3 px turquoise stripe | 44 px white top bar with its turquoise accent line
                (the Source Sans 3 title and its crumbs as the muted context, search with its key, Live · time IST with
                a turquoise dot, theme, + New, Ask as a pill) over the ice page
     1180–1279  the same, without the Live pill
     768–1179   the sidebar starts folded into a 68 px strip (an icon and a word per group); [ opens it; the search and
                Ask are icons
     <768       no sidebar; top bar (title, search, Ask, avatar); bottom bar Today · 2 rows · + · Menu; the sidebar is the
                menu above the bottom bar (Menu closes it again) with 42 px rows, a header that stays and the words of
                each count on the row
   Rows are 30 px (28 px when the window is under 820 px tall), caps group labels, counts as 16 px pills (the late part
   in red); the list scrolls between the fixed brand block and the fixed footer with a visible thin scrollbar and a fade
   when more is below. */

.app.shell.desk {
  --sb-w: var(--nav-w);
  --tb-h: var(--topbar-h);
  --sb-row: 30px;
  --sb-gh: 24px;
  --sb-hover: var(--surface-2);
  grid-template-columns: var(--sb-w) minmax(0, 1fr);
  grid-template-rows: var(--tb-h) minmax(0, 1fr);
  grid-template-areas: "rail top" "rail work";
}
.app.shell.desk.sb-mini { --sb-w: 68px; }
.app.shell.desk.copilot-open {
  grid-template-columns: var(--sb-w) minmax(0, 1fr) var(--copilot-width, min(40%, 560px));
  grid-template-areas: "rail top top" "rail work copilot";
}
@media (max-height: 819px) { .app.shell.desk { --sb-row: 28px; --sb-gh: 22px; } }

/* ─── Sidebar: white, the turquoise 3 px stripe on its left edge ─── */
.app.shell > .sb { display: none; }
.app.shell.desk > .sb {
  grid-area: rail; position: relative; z-index: 30; display: flex; flex-direction: column; min-height: 0; min-width: 0;
  background: var(--surface); border-right: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--brand);
}
.app.shell.desk > .sb[hidden] { display: none; }
.sb svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sb button { font: inherit; color: inherit; }
/* the brand block: the logo tile, the company and FY · role in caps (opens the company menu); under it the turquoise
   line that meets the stripe and runs on under the top bar (fading there) */
.sb-top { position: relative; flex: none; display: flex; align-items: center; gap: 2px; height: var(--tb-h); padding: 0 6px 0 8px; border-bottom: 1px solid var(--line); }
.app.shell.desk .sb-top::after { content: ""; position: absolute; left: 0; right: -1px; bottom: -1px; height: 2px; background: var(--brand); pointer-events: none; }
.org {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 4px; border: 0; border-radius: var(--r-sm);
  background: none; cursor: pointer; text-align: left;
}
.org:hover, .org[aria-expanded="true"] { background: var(--sb-hover); }
.org:focus-visible, .sb .ni:focus-visible, .sb .gt:focus-visible, .sb .gall:focus-visible, .sb .gfold:focus-visible, .sb .ib:focus-visible, .sb .me:focus-visible, .sb .mx:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.org > svg { width: 12px; height: 12px; color: var(--muted); } /* a menu's chevron: --muted (5.6:1), not --faint (2.9:1) */
/* the logo: the white mark (brand/autowhat-mark.svg drawn white) on a turquoise tile that deepens toward its foot: the
   brand turquoise mixed with 10 % → 32 % of --brand-ink, so the white mark is 3.3:1 at the tile's lightest (a graphic's
   3:1; on the plain --brand it would be 2.9:1). The same in both themes, as --brand and --brand-ink are */
.logo {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r-sm);
  background: linear-gradient(150deg, color-mix(in srgb, var(--brand) 90%, var(--brand-ink)), color-mix(in srgb, var(--brand) 68%, var(--brand-ink)));
}
.logo img { width: 18px; height: 18px; display: block; filter: brightness(0) invert(1); }
#sb-org .logo { box-shadow: 0 3px 8px -2px color-mix(in srgb, var(--brand) 60%, transparent); }
.logo.sm { width: 20px; height: 20px; border-radius: var(--r-xs); }
.logo.sm img { width: 15px; height: 15px; }
.org-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.org-n { font: 600 calc(var(--fs-body) + 1.5px)/17px var(--font-head); letter-spacing: -.005em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-b { font: 600 var(--fs-xs)/var(--lh-xs) var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb .ib {
  flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--muted); cursor: pointer;
}
.sb .ib:hover { background: var(--sb-hover); color: var(--ink); }
.sb-close { display: none !important; }

.sb-nav {
  flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 2px 6px 8px;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.sb-nav::-webkit-scrollbar { width: 6px; }
.sb-nav::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; border: 0; }
.sb-nav.more-below { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); }
.sb-find { display: none; }
/* a row: 30 px, 13 px ink-2, a 15 px teal-grey stroke icon; the open screen in the teal words on the soft fill, and the
   action-teal bar laid on the sidebar's turquoise stripe at that row (left -6 px: the rows start 6 px in), so the one
   rule deepens and widens to 4 px there instead of a second rule beside it. The bar reads at 3:1 against the white
   beside it (4.8:1; dark 6.8:1, where the teal is close to the stripe's turquoise and its extra pixel carries it) */
.sb .ni {
  position: relative; display: flex; align-items: center; gap: 9px; width: 100%; height: var(--sb-row); padding: 0 8px; border: 0; border-radius: var(--r-nav);
  background: none; color: var(--ink-2); font: 400 var(--fs-body)/18px var(--font-ui); text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}
.sb .ni > svg { color: var(--muted); transition: color var(--t-fast) ease; }
.sb .ni:hover { background: var(--sb-hover); color: var(--ink); }
.sb .ni:hover > svg { color: var(--accent-text); }
.sb .ni[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.sb .ni[aria-current="page"]::before { content: ""; position: absolute; left: -6px; top: 7px; bottom: 7px; width: 4px; border-radius: 0 2px 2px 0; background: var(--accent); }
.sb .ni[aria-current="page"] > svg { color: var(--accent); }
.sb .ni.pin > svg { width: 14px; height: 14px; margin: 0 1px; color: var(--warn); fill: color-mix(in srgb, var(--warn) 25%, transparent); }
.sb .ni .lbl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sb .ni .nc, .sb-fly .nc { flex: none; display: inline-flex; align-items: center; gap: 3px; }
.sb .ni .nc:empty, .sb-fly .nc:empty { display: none; }
.sb .ni .why { display: none; }
.sb .nr { position: relative; }
.sb .nadd {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 22px; height: 20px;
  border-radius: var(--r-xs); background: var(--surface); color: var(--ink-2); box-shadow: 0 0 0 1px var(--line-2); opacity: 0; pointer-events: none;
}
.sb .nadd svg { width: 13px; height: 13px; }
.sb .nadd:hover { color: var(--accent-text); box-shadow: 0 0 0 1px var(--accent-line); }
.sb .nadd:focus-visible { opacity: 1; pointer-events: auto; outline: none; box-shadow: var(--focus-ring); }
.sb .nr:has(.nadd:focus-visible) .ni .nc { visibility: hidden; }
@media (hover: hover) { .sb .nr:hover .nadd { opacity: 1; pointer-events: auto; } .sb .nr:hover .ni .nc { visibility: hidden; } }
/* counts: 16 px pills, 10.5 px / 600; the total neutral ice with a turquoise hairline (white on the open row's fill), its
   late part white on red (the words stay: "7 · 1 late") */
.sb .n, .sb-fly .n {
  display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--ice-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font: 600 var(--fs-xs)/16px var(--font-ui); letter-spacing: .01em; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sb-tip .n { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sb .n.late, .sb-fly .n.late, .gp .n.late { color: var(--crit-ink); background: var(--crit); border-radius: var(--r-pill); padding: 0 6px; font-weight: 600; box-shadow: none; } /* white on red: late work only */
.sb .ni[aria-current="page"] .n:not(.late) { background: var(--surface); }
.gp .n {
  display: inline-flex; align-items: center; min-width: 16px; height: 16px; padding: 0 5px; border-radius: var(--r-pill); background: var(--ice-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
  font: 600 var(--fs-xs)/16px var(--font-ui); font-variant-numeric: tabular-nums; white-space: nowrap;
}
/* a row with too little room: the total stays, its late part becomes a red dot on the pill */
.sb .ni.tight .n.part { display: none; }
.sb .ni.tight.has-late .n.tot { position: relative; }
.sb .ni.tight.has-late .n.tot::after { content: ""; position: absolute; right: -2px; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: var(--crit); box-shadow: 0 0 0 1.5px var(--surface); }
/* where you are: another screen of a group, under its rows; the Reports or Settings row of a screen of theirs */
.sb .ni.tmp { height: 26px; padding-left: 12px; font-size: var(--fs-small); }
.sb .ni.tmp > svg { width: 12px; height: 12px; color: var(--accent); }
.sb .ni.near { background: var(--sb-hover); color: var(--ink); }
.blk { padding-top: 4px; }
/* a group: a caps label (opens the group's panel), "All ›" on the right; the fold chevron sits in the gutter and shows
   on hover, on focus and while the group is folded */
.sg { margin-top: 6px; }
.gh { position: relative; display: flex; align-items: center; gap: 0; height: var(--sb-gh); }
.sb .gfold {
  position: absolute; left: -4px; top: 50%; transform: translateY(-50%); display: inline-grid; place-items: center; width: 14px; height: 18px; padding: 0; border: 0; border-radius: var(--r-xs);
  background: none; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity var(--t-fast) ease;
} /* --muted: while the group is folded the chevron alone says so, a graphic that needs 3:1 (5.6:1; --faint is 2.9:1) */
.sb .gfold svg { width: 11px; height: 11px; transition: transform var(--t-fast); }
.sb .sg.off .gfold svg { transform: rotate(-90deg); }
.sb .gh:hover .gfold, .sb .gfold:focus-visible, .sb .sg.off .gfold { opacity: 1; }
.sb .gfold:hover { color: var(--ink); background: var(--sb-hover); }
.sb .gfold:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); } /* in the gutter an outer ring is cut by the menu's scroll box */
.sb .gt {
  flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 6px 0 8px; border: 0; border-radius: var(--r-xs);
  background: none; color: var(--muted); font: 600 var(--fs-xs)/14px var(--font-ui); letter-spacing: .07em; text-transform: uppercase; text-align: left; cursor: pointer; white-space: nowrap;
}
.sb .gt.plain { cursor: default; }
.sb .gt:not(.plain):hover { color: var(--ink); }
.sb .sg.here .gt { color: var(--accent-text); }
.sb .gcnt { display: none; letter-spacing: 0; text-transform: none; }
.sb .sg.off .gcnt { display: inline-flex; }
.sb .gall {
  flex: none; display: inline-flex; align-items: center; gap: 1px; height: 20px; padding: 0 2px 0 6px; border: 0; border-radius: var(--r-xs);
  background: none; color: var(--muted); font: 600 var(--fs-xs)/14px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; white-space: nowrap;
}
.sb .gall svg { width: 11px; height: 11px; }
.sb .gall:hover, .sb .gall[aria-expanded="true"], .sb .gt[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent-text); }
.sb .sg.off .gi { display: none; }
.sb-hint {
  position: fixed; z-index: 85; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 260px; padding: 9px 11px;
  border: 1px solid var(--accent-line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--e2); color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small);
}
.sb-hint::before { content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; background: var(--surface); border-left: 1px solid var(--accent-line); border-bottom: 1px solid var(--accent-line); transform: rotate(45deg); }
.sb-hint b { color: var(--ink); font-weight: 600; font-size: var(--fs-body); }
.sb-hint .btn { margin-top: 4px; }
.sb-hint[hidden] { display: none; }
/* the footer: Reports · Settings, All screens and the fold button, the user, then the small muted lines: the quiet
   Autowhat lockup (the small mark, "Autowhat · Operational AI", as the website's header has it) and when the counts
   were read; the company and FY · role are the company button's, at the top */
.sb-foot {
  flex: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 2px; padding: 4px 6px 0; border-top: 1px solid var(--line);
}
.sb-foot > [data-row="reports"] { grid-column: 1; grid-row: 1; }
.sb-foot > [data-row="settings"] { grid-column: 2; grid-row: 1; }
.sb-foot > [data-row="allscreens"] { grid-column: 1 / -1; grid-row: 2; }
.sb-foot > .me { grid-column: 1 / -1; grid-row: 3; }
.sb-foot > .sb-line { grid-column: 1 / -1; grid-row: 4; }
.sb-foot > .ni { padding: 0 8px; gap: 9px; }
/* Settings sits in the second column, away from the stripe: its open bar stays at its own left edge */
.sb-foot > .ni[data-row="settings"][aria-current="page"]::before { left: 0; width: 3px; border-radius: 0 3px 3px 0; }
/* the fold button sits at the end of the All screens row */
.sb-foot > .sb-fold { grid-column: 2; grid-row: 2; justify-self: end; align-self: center; z-index: 1; margin-right: 2px; }
.sb .me {
  display: flex; align-items: center; gap: 9px; width: 100%; height: 36px; margin-top: 2px; padding: 0 6px 0 5px; border: 0; border-radius: var(--r-sm);
  background: none; cursor: pointer; text-align: left;
}
.sb .me:hover, .sb .me[aria-expanded="true"] { background: var(--sb-hover); }
.sb .me > svg { width: 12px; height: 12px; color: var(--muted); }
.av {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  font: 600 var(--fs-xs)/1 var(--font-ui); letter-spacing: .02em;
}
.me-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.me-n { font: 500 var(--fs-body)/16px var(--font-ui); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-r { font: 400 var(--fs-meta)/var(--lh-meta) var(--font-ui); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-line { margin: 4px -6px 0; padding: 5px 12px 7px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-meta); line-height: var(--lh-xs); }
.sb-line > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-line > span:empty { display: none; }
/* the lockup: a 12 px mark (brand/autowhat-mark.svg as a mask, so it takes the line's colour), the name in --ink-2 */
.sb-line .sb-brand { color: var(--muted); font-size: var(--fs-xs); }
.sb-line .sb-brand::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 5px; vertical-align: -2px; background: currentColor;
  -webkit-mask: url(/brand/autowhat-mark.svg) center / contain no-repeat; mask: url(/brand/autowhat-mark.svg) center / contain no-repeat;
}
.sb-line .sb-brand b { color: var(--ink-2); font-weight: 600; }

/* the strip the sidebar folds into ([, the panel button): an icon and a word per row and group */
.sb-strip { display: none; }
.app.shell.desk.sb-mini .sb-nav, .app.shell.desk.sb-mini .org-t, .app.shell.desk.sb-mini .org > svg,
.app.shell.desk.sb-mini .sb-foot .ni, .app.shell.desk.sb-mini .me-t, .app.shell.desk.sb-mini .me > svg, .app.shell.desk.sb-mini .sb-line { display: none; }
.app.shell.desk.sb-mini .sb-top { justify-content: center; padding: 0 0 0 3px; }

.app.shell.desk.sb-mini .org { flex: none; width: 40px; justify-content: center; padding: 0; }
.app.shell.desk.sb-mini .sb-strip {
  flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 6px 3px; overflow-y: auto; scrollbar-width: none;
}
.app.shell.desk.sb-mini .sb-strip::-webkit-scrollbar { display: none; }
.app.shell.desk.sb-mini .sb-foot { order: 3; align-items: center; padding: 4px 0 8px 3px; }
.app.shell.desk.sb-mini .sb-strip { order: 2; }
.app.shell.desk.sb-mini .sb-foot { display: flex; flex-direction: column; }
.app.shell.desk.sb-mini .sb .me, .app.shell.desk.sb-mini .me { width: 40px; justify-content: center; padding: 0; }
.sb .mx {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 58px; padding: 6px 2px 5px; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--ink-2); text-decoration: none; cursor: pointer;
}
.sb .mx > svg { width: 17px; height: 17px; }
.sb .mx .mw { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 var(--fs-xs)/13px var(--font-ui); }
.sb .mx:hover, .sb .mx[aria-expanded="true"] { background: var(--sb-hover); color: var(--ink); }
.sb .mx[aria-current="page"], .sb .mx.here { background: var(--accent-soft); color: var(--accent-text); }
.sb .mx[aria-current="page"]::before { content: ""; position: absolute; left: -6px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 2px 2px 0; background: var(--accent); } /* on the stripe, as the rows' bar (the strip's cells start 6 px in) */
.sb .mx[aria-current="page"] > svg, .sb .mx.here > svg { color: var(--accent); }
/* the count sits at the icon's top-right corner, leaving the icon readable ("83" no longer covers it) */
.sb .mb { position: absolute; top: 1px; left: calc(50% + 5px); right: auto; }
.sb .mb .n { display: inline-block; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--ice-2); color: var(--ink); font: 600 var(--fs-xs)/16px var(--font-ui); text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.sb .mb .n, .app.shell.desk .bb-tab .bb-n .n { position: relative; }
/* the total, with a red dot when some of it is past its due date */
.sb .mb .n.has-late::after, .app.shell.desk .bb-tab .bb-n .n.has-late::after {
  content: ""; position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--crit); box-shadow: 0 0 0 2px var(--surface);
}
.msep { width: 28px; height: 1px; margin: 4px 0; background: var(--line); flex: none; }

/* ─── Top bar: the title and its crumbs · search · Live · theme · + New · Ask; white, with the thin turquoise accent
   line under it (the sidebar's line run on, fading out across the bar) ─── */
.app.shell.desk > .topbar {
  grid-area: top; height: var(--tb-h); gap: 10px; padding: 0 14px; background: var(--surface); backdrop-filter: none;
  border-bottom: 1px solid var(--line); z-index: 25;
}
.app.shell.desk > .topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 45%, transparent) 38%, transparent 78%);
}
.app.shell.desk .hub-tabs, .app.shell.desk .topbar > .spacer, .app.shell.desk #chat-btn, .app.shell.desk .me-chip,
.app.shell.desk #logout-btn, .app.shell.desk .nav-toggle, .app.shell.desk .top-brand, .app.shell.desk #ui-desk-btn { display: none !important; }
.app.shell #ui-desk-btn[hidden], .app.shell #agent-st[hidden], .app.shell #top-avatar[hidden], .app.shell #new-split[hidden], .app.shell #live-pill[hidden] { display: none !important; }
/* the title first, then where it sits (the crumbs) as the muted context, then the count or the date */
.app.shell.desk .topbar .pagebar {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 10px; padding: 6px 0; margin: -6px 0; background: none; overflow: hidden; white-space: nowrap;
} /* the 6 px above and below keep the pin star and a crumb's focus ring inside the clip */
.app.shell.desk .topbar .pagebar h1 { order: 1; }
.app.shell.desk .topbar .pagebar .crumbs { order: 2; }
.app.shell.desk .topbar .pagebar .page-meta { order: 3; }
.app.shell.desk .topbar .pagebar .fav-btn { order: 4; align-self: center; }
.app.shell.desk .topbar .pagebar .crumbs { flex: 0 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 2px; overflow: hidden; font-size: var(--fs-small); color: var(--muted); padding: 6px; margin: -6px; } /* the padding keeps a crumb's hover fill and focus ring inside the clip */
.app.shell.desk .topbar .pagebar .crumbs:empty { display: none; }
.crumbs .crumb {
  flex: 0 1 auto; min-width: 32px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 4px; margin: 0 -2px; border: 0; border-radius: var(--r-xs); background: none;
  color: var(--muted); font: 400 var(--fs-small)/16px var(--font-ui); text-decoration: none; cursor: pointer;
}
.crumbs .crumb:hover, .crumbs .crumb[aria-expanded="true"] { color: var(--accent-text); background: var(--sb-hover); }
.crumbs svg { width: 12px; height: 12px; flex: none; fill: none; stroke: var(--faint); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
/* after the title the trail reads as context: no chevron after its last part */
.app.shell.desk .topbar .crumbs > svg:last-child { display: none; }
.app.shell.desk .topbar .pagebar h1 {
  flex: 0 0 auto; max-width: 60%; min-width: 0; margin: 0; font: 600 var(--fs-topbar)/22px var(--font-head); letter-spacing: -.01em; color: var(--ink); font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis;
}
.app.shell.desk .topbar .page-meta { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: var(--fs-small); font-variant-numeric: tabular-nums; } /* the company line gives way before the title */
.app.shell.desk .topbar .page-meta:empty { display: none; }
.app.shell.desk .topbar .fav-btn { flex: none; width: 24px; height: 24px; }
.app.shell.desk .topbar .fav-btn svg { width: 14px; height: 14px; }
.app.shell.desk .search-btn {
  flex: 0 1 300px; width: auto; min-width: 0; height: var(--control-h); margin: 0 0 0 auto; padding: 0 5px 0 9px; gap: 6px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted);
  font: 400 var(--fs-small)/16px var(--font-ui); box-shadow: none; cursor: text;
}
.app.shell.desk .search-btn svg { width: 14px; height: 14px; color: var(--muted); transition: color var(--t-fast) ease; }
.app.shell.desk .search-btn:hover { border-color: var(--accent-line); background: var(--surface); color: var(--ink-2); box-shadow: 0 0 0 3px var(--ice-2); }
.app.shell.desk .search-btn:hover svg, .app.shell.desk .search-btn:focus-visible svg { color: var(--accent-text); }
.app.shell.desk .search-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.app.shell.desk .search-btn span { display: inline; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.app.shell.desk .search-btn kbd { display: inline-block; margin-left: auto; font: 500 var(--fs-xs)/14px var(--font-mono); padding: 0 4px; border-radius: var(--r-xs); background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); }
.app.shell.desk .top-r { flex: none; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
/* Live · 14:32 IST (nav.js: the time in India, once a minute; tabular figures and a fixed width, so nothing moves): an
   ice pill with the teal words and a turquoise dot that breathes (still under reduced motion) */
.app.shell.desk .top-live { flex: none; min-width: 15ch; justify-content: center; border-color: var(--accent-line); background: var(--ice-1); color: var(--accent-text); font-weight: 600; }
.app.shell.desk .top-live > i { background: var(--accent-bright); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-bright) 22%, transparent); animation: live-breathe 2.4s ease-in-out infinite; }
@keyframes live-breathe { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-bright) 8%, transparent); } }
.app.shell.desk #theme-btn { flex: none; width: var(--control-h); height: var(--control-h); padding: 0; color: var(--ink-2); }
.app.shell.desk #theme-btn:hover { color: var(--ink); }
.theme-btn svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.8; }
.theme-btn svg .half { fill: currentColor; stroke: none; }
.new-split { display: inline-flex; flex: none; }
.new-split .btn.btn-primary { height: var(--control-h); font-size: var(--fs-small); font-weight: 600; gap: 5px; } /* 600 as every primary */
.new-split .nb-main { border-radius: var(--r-sm) 0 0 var(--r-sm); padding: 0 10px 0 8px; text-decoration: none; }
.new-split .nb-more { border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 0 6px; border-left: 1px solid color-mix(in srgb, var(--accent-ink) 35%, transparent); }
.new-split .nb-more[aria-expanded="true"] { background: var(--accent-hover); }
.new-split svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Ask: the agent's button, a pill like autowhat.ai's floating "Ask Autowhat" (its shape and its soft lifted shadow), in
   the agent's violet, solid: the filled member of the agent family whose soft member is .btn-ai (Copilot), and never a
   second + New. White on it 5.1:1; dark: --accent-ink on it, 6.5:1 (nav.test.js) */
.agent-st {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: var(--control-h); padding: 0 13px 0 10px; border: 0; border-radius: var(--r-pill);
  background: var(--ai); color: var(--accent-ink);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--brand-ink) 25%, transparent), 0 8px 18px -8px color-mix(in srgb, var(--ai) 70%, transparent);
  font: 600 var(--fs-small)/1 var(--font-ui); letter-spacing: .01em; cursor: pointer; white-space: nowrap;
  transition: box-shadow var(--t-fast) ease, transform var(--t-fast) ease;
}
.agent-st svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linejoin: round; }
.agent-st:hover { transform: translateY(-1px); box-shadow: 0 1px 2px color-mix(in srgb, var(--brand-ink) 25%, transparent), 0 12px 24px -10px color-mix(in srgb, var(--ai) 80%, transparent); }
.agent-st:active { transform: none; box-shadow: none; }
.agent-st:focus-visible, .new-split .btn:focus-visible, .crumbs .crumb:focus-visible, .app.shell.desk #theme-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.agent-st .n { min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-pill); background: var(--surface); color: var(--ai-text); font: 600 var(--fs-xs)/16px var(--font-ui); text-align: center; }
.agent-st .n:empty { display: none; }
.app.shell.desk .top-avatar { display: none; }
.avatar {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  background: var(--surface-3); color: var(--ink); font: 600 var(--fs-meta)/1 var(--font-ui); cursor: pointer;
}
.avatar:hover { background: var(--line-2); }
.avatar:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.avatar[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent); }

/* ─── The screen: the ice page with its turquoise light, one header row, compact rows ─── */
.app.shell.desk > .app-workspace {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "main";
}
.app.shell.desk > .app-workspace > .main { padding: 12px var(--gutter) 28px; background: var(--bg-glow), var(--bg); }
.app.shell.desk > .app-workspace > .bottom-bar { display: none; }
.app.shell.desk > .app-workspace > .sidebar { display: none; }
/* the screen's own heading row gave its title to the top bar (nav.js adoptHeader): what is left is one slim row; the
   row may sit inside the view's own wrapper (.acc-root, .ewb2, .ops-root) */
.app.shell.desk .screen .page-h.ph-done { min-height: 0; margin: 0 0 10px; padding: 0; border: 0; align-items: center; gap: 8px; }
.app.shell.desk .screen .page-h.ph-done .ph-dup { display: none; }
.app.shell.desk .screen .page-h.ph-done .ph-sub { margin: 0; color: var(--ink-2); font-size: var(--fs-body); line-height: var(--lh-body); }
.app.shell.desk .screen .page-h.ph-empty { display: none; }
/* the record page's number is the top bar's title (nav.js recordTitle): who it is, the status and the verbs stay in its row */
.app.shell.desk .screen .rec-title > .ph-dup { display: none; }
.app.shell.desk .screen .rec-title.ph-only-who { display: none; }
.app.shell.desk .screen .ph-same { display: none; }
.app.shell.desk .screen .page-h.ph-done .actions { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
/* a list: the search and filters and the buttons share one row */
.app.shell.desk .screen.screen-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: start; }
.app.shell.desk .screen.screen-list > * { grid-column: 1 / -1; min-width: 0; }
.app.shell.desk .screen.screen-list > .toolbar.tb-with-ph { grid-column: 1; grid-row: 1; margin-bottom: 10px; }
.app.shell.desk .screen.screen-list > .page-h.ph-with-tools { grid-column: 2; grid-row: 1; margin: 0; }
/* "+ New" in the top bar is this list's new button (a phone has no top-bar "+ New": the list keeps its own there) */
@media (min-width: 768px) { .app.shell.desk #list-actions #btn-new { display: none; } }
/* the role desk under the top bar: the top bar already says the date and carries "+ New" (the bottom bar's + on a phone) */
.app.shell.desk .desk[data-role] .dh-date, .app.shell.desk .desk[data-role] .newmenu { display: none; }
/* on the bidding screens "+ New" in the top bar is New bidding: the screen's own button is not shown twice */
@media (min-width: 768px) { .app.shell.desk:has(#new-split:not([hidden]) #new-main[href="#/v/bidding/new"]) .bd-new { display: none; } }
/* a list narrower than its columns leaves out the low-value ones first (nav.js fitTable) */
.app.shell.desk .tbl .fit-off { display: none; }
.app.shell.desk .tbl .fit-cut { display: block; max-width: 11em; overflow: hidden; text-overflow: ellipsis; }
.app.shell.desk .toolbar { gap: 6px; }
.app.shell.desk .toolbar input[type=search] { width: 184px; } /* five filters and the search fit one row beside the buttons (LR / Bilty) */
.app.shell.desk .toolbar select { max-width: 150px; }
/* the list's count sits beside the title (nav.js copies it into the top bar) */
.app.shell.desk .toolbar #list-count.in-title { display: none; }
.app.shell.desk .pager { padding: 6px 2px; }
/* Roomy rows (the account menu's density): 40 px table rows */
body.density-cozy .app.shell.desk .tbl td { padding-top: 10px; padding-bottom: 10px; }

/* the existing Today page (views/hubs, views/inbox) until the desks replace it: two-line tasks, no zero tiles */
/* the Today page's quick actions: only those "+ New" does not offer (nav.js hubActions) */
.app.shell.desk .hub-root .hub-actions:not(.ha-left) { display: none; }
.app.shell.desk .hub-root .hub-actions a[hidden] { display: none; }
.app.shell.desk .hub-root .hub-actions { margin-bottom: 8px; }
.app.shell.desk .tk-head .btn.xs { margin-left: 8px; }
.app.shell.desk .tk-others { margin: 6px 0 0; }
.app.shell.desk .hub-root .hub-kpis { margin-bottom: 10px; }
.app.shell.desk .hub-root .hub-kpis .is-zero { display: none; }
/* the page's own buttons (Refresh) share the row of the tiles instead of a row of their own */
@media (min-width: 768px) {
  .app.shell.desk .hub-root:has(> .page-h.ph-done):has(> .hub-kpis) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: start; }
  .app.shell.desk .hub-root:has(> .page-h.ph-done):has(> .hub-kpis) > * { grid-column: 1 / -1; min-width: 0; }
  .app.shell.desk .hub-root:has(> .page-h.ph-done):has(> .hub-kpis) > .page-h.ph-done { grid-column: 2; grid-row: 1; margin: 0; }
  .app.shell.desk .hub-root:has(> .page-h.ph-done):has(> .hub-kpis) > .hub-kpis { grid-column: 1; grid-row: 1; }
}
/* when something waits, only what waits; when every queue is clear, the clear ones quietly (what was checked) */
.app.shell.desk .hub-root .hub-queues:has(.hub-q:not(.zero)) li:has(> .hub-q.zero) { display: none; }
.app.shell.desk .hub-root .hub-q { padding: 5px 6px; }
.app.shell.desk .hub-root .hub-q.zero .hub-q-dot { background: var(--line-2); box-shadow: none; } /* red and amber only where work waits */
.app.shell.desk .tk-head { margin: 0 0 4px; gap: 8px; }
.app.shell.desk .tk-head b { font: 600 var(--fs-topbar)/20px var(--font-head); }
.app.shell.desk .tk-chain { padding: 6px 10px; margin: 0 0 4px; }
.app.shell.desk .tk { grid-template-columns: 88px minmax(0, 1fr) auto; gap: 0 12px; padding: 4px 8px 4px 6px; }
.app.shell.desk .tk-n { display: none; }
.app.shell.desk .tk-v b { font-size: var(--fs-body); line-height: 18px; font-family: var(--font-ui); text-align: right; font-variant-numeric: tabular-nums; }
.app.shell.desk .tk-v { text-align: right; }
.app.shell.desk .tk-v small, .app.shell.desk .tk-goods { display: none; }
.app.shell.desk .tk-m { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; }
.app.shell.desk .tk-m::before { content: ""; order: 2; flex-basis: 100%; height: 0; } /* the line break between the two lines */
.app.shell.desk .tk-t { order: 1; flex: 0 1 auto; max-width: 62%; min-width: 0; flex-wrap: nowrap; gap: 6px; font-weight: 500; white-space: nowrap; overflow: hidden; line-height: 18px; }
.app.shell.desk .tk-s { order: 1; flex: 1 1 0; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 18px; }
.app.shell.desk .tk-r { order: 3; flex: 1 1 0; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 18px; }
.app.shell.desk .tk-o { order: 3; flex: none; display: flex; margin: 0; flex-wrap: nowrap; line-height: 18px; }
.app.shell.desk .tk-own { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.app.shell.desk .tk-checks { order: 4; flex-basis: 100%; margin: 0; }
.app.shell.desk .tk-a { flex-wrap: nowrap; }

/* ─── Overlays: hover card of a count, strip flyout, group panel, company, + New and account menus ─── */
.sb-tip {
  position: fixed; z-index: 95; width: 300px; padding: 9px 11px; border-radius: var(--r-md); background: var(--ink); color: var(--bg);
  box-shadow: var(--e2); font-size: var(--fs-small); line-height: var(--lh-small);
}
.sb-tip[hidden] { display: none; }
.sb-tip .tip-h b { font-weight: 600; }
.sb-tip ul { margin: 6px 0 0; padding: 0; list-style: none; }
.sb-tip li { position: relative; margin: 3px 0; padding-left: 14px; }
.sb-tip li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .6; }
.sb-tip li.late::before { background: var(--crit); opacity: 1; }
.sb-tip a { color: inherit; text-decoration: none; }
.sb-tip a:hover { text-decoration: underline; }
.sb-tip .tip-f { margin-top: 6px; font-size: var(--fs-meta); opacity: .8; }
.sb-fly { width: 270px; padding: 4px; }
.sb-fly[hidden] { display: none; }
.sb-fly .mi { min-height: var(--nav-item-h); padding: 5px 8px; justify-content: flex-start; gap: 9px; color: var(--ink-2); }
.sb-fly .mi svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sb-fly .mi .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-fly .mi[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.sb-fly .fwhy { margin: -2px 0 4px 32px; color: var(--muted); font-size: var(--fs-meta); line-height: var(--lh-meta); }
.sb-fly .mall { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-nav) var(--r-nav); color: var(--accent-text); font-size: var(--fs-small); }
.sb-fly .mall svg { margin-left: auto; width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.75; }

.sb-panel {
  position: fixed; z-index: 90; display: flex; flex-direction: column; width: min(860px, calc(100vw - 244px)); max-height: calc(100vh - 16px);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--e3), var(--highlight); overflow: hidden;
}
.sb-panel[hidden] { display: none; }
.sb-panel svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sb-panel .ph { flex: none; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--ice-1), var(--surface)); }
.sb-panel .ph-t { min-width: 0; display: flex; flex-direction: column; }
.sb-panel .ph-t b { font: 600 var(--fs-topbar)/20px var(--font-head); letter-spacing: -.01em; color: var(--ink); }
.sb-panel .ph-t .muted { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--muted); }
.sb-panel .pfind { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; width: 260px; max-width: 45%; height: var(--control-h); padding: 0 9px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted); }
.sb-panel .pfind input { flex: 1; min-width: 0; height: 26px; border: 0; outline: 0; background: none; color: var(--ink); font: 400 var(--fs-small) var(--font-ui); }
.sb-panel .pfind:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.sb-panel .ib { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink-2); cursor: pointer; }
.sb-panel .ib:hover { background: var(--surface-2); }
.sb-panel .pmake { flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; }
.sb-panel .pmake .btn svg { width: 13px; height: 13px; }
.sb-panel .pb { flex: 1; min-height: 0; overflow: auto; padding: 4px 8px 12px; }
:is(.sb-panel, .gp) .pg { margin: 12px 8px 2px; font: 600 var(--fs-body)/18px var(--font-ui); color: var(--ink); }
:is(.sb-panel, .gp) .pg:first-child { margin-top: 4px; }
:is(.sb-panel, .gp) .pcols { column-width: 240px; column-gap: 12px; }
:is(.sb-panel, .gp) :is(.pcols, .ps, .pi, .pg, .pmore)[hidden] { display: none; }
:is(.sb-panel, .gp) .ps { margin-top: 6px; break-inside: avoid-column; }
:is(.sb-panel, .gp) .pcols > .ps:first-child { margin-top: 0; } /* a column break drops the margin: the first column starts level with the rest */
:is(.sb-panel, .gp) .ps.long { break-inside: auto; }
:is(.sb-panel, .gp) .ps h4 { break-after: avoid-column; margin: 0; padding: 8px 8px 3px; font: 600 var(--fs-xs)/14px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
:is(.sb-panel, .gp) .pi { display: flex; align-items: center; border-radius: var(--r-nav); break-inside: avoid; } /* a screen and its line stay in one column */
:is(.sb-panel, .gp) .pi:hover, :is(.sb-panel, .gp) .pi:focus-within { background: var(--surface-2); }
:is(.sb-panel, .gp) .pi > a { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 4px 8px; color: var(--ink); text-decoration: none; border-radius: var(--r-nav); }
:is(.sb-panel, .gp) .pi.slim > a { padding-top: 3px; padding-bottom: 3px; }
:is(.sb-panel, .gp) .pi > a:focus-visible { outline: none; box-shadow: var(--focus-ring); }
:is(.sb-panel, .gp) .pl { font-size: var(--fs-body); line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(.sb-panel, .gp) .pi.slim .pl { font-size: var(--fs-small); color: var(--ink-2); }
:is(.sb-panel, .gp) .pi.side .pl { font-weight: 600; }
:is(.sb-panel, .gp) .pd { font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(.sb-panel, .gp) .pin-dot { margin-left: 4px; color: var(--accent-text); font-weight: 700; }
:is(.sb-panel, .gp) .pmore {
  display: flex; align-items: center; gap: 6px; width: 100%; margin: 8px 0 2px; padding: 6px 8px; border: 0; border-top: 1px dashed var(--line-2);
  background: none; color: var(--accent-text); font: 500 var(--fs-small)/16px var(--font-ui); text-align: left; cursor: pointer;
}
:is(.sb-panel, .gp) .pmore small { color: var(--muted); font-size: var(--fs-meta); font-weight: 400; }
:is(.sb-panel, .gp) .pmore svg { width: 13px; height: 13px; transition: transform var(--t-fast); }
:is(.sb-panel, .gp) .pmore[aria-expanded="true"] svg { transform: rotate(90deg); }
:is(.sb-panel, .gp) .pmore:hover { background: var(--surface-2); }
:is(.sb-panel, .gp) .pmore:focus-visible { outline: none; box-shadow: var(--focus-ring); }
:is(.sb-panel, .gp) .pm { padding-top: 2px; }

/* a hub's page in the desk (nav.js deskHubPage): what waits, + New, find, the screens */
.gp { max-width: 1180px; }
.gp svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
/* the hub's jump tiles and KPI strip (GET /api/hubs/<hub>) above what waits */
.gp-figs { margin: 0 0 10px; }
.gp-figs[hidden] { display: none; }
.gp-figs > .jump-tiles:last-child { margin-bottom: 0; }
.gp-wait { margin: 0 0 10px; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--e1); }
.gp-wait[hidden] { display: none; }
.gp-wait h3 { margin: 0 0 4px; font: 600 var(--fs-cap)/15px var(--font-ui); letter-spacing: var(--ls-cap); text-transform: uppercase; color: var(--muted); }
.gp-wait ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.gp-wait li { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.gp-wait .gw-row { flex: none; display: inline-flex; align-items: baseline; gap: 8px; padding: 3px 4px; border-radius: var(--r-nav); color: var(--ink); text-decoration: none; }
.gp-wait .gw-row:hover { background: var(--surface-2); }
.gp-wait .gw-row b { font-weight: 600; }
.gp-wait .nc { flex: none; display: inline-flex; gap: 3px; }
.gp-wait .gw { min-width: 0; color: var(--ink-2); font-size: var(--fs-small); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-wait .gw a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.gp-wait .gw a:hover { color: var(--accent-text); }
.gp-make { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.gp-make .btn svg { width: 13px; height: 13px; }
.gp-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 4px; }
.gp .gp-find { display: inline-flex; align-items: center; gap: 6px; width: 300px; max-width: 100%; height: var(--control-h); padding: 0 9px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--muted); }
.gp .gp-find input { flex: 1; min-width: 0; height: 26px; border: 0; outline: 0; background: none; color: var(--ink); font: 400 var(--fs-small) var(--font-ui); }
.gp .gp-find:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.gp .gp-screens { padding: 4px 6px 8px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--e1); }
.gp .pnone { padding: 12px 8px; }

/* "Skip to the page": the first stop of Tab, shown only while it has the focus */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 200; padding: 7px 11px; border: 1px solid var(--accent-line); border-radius: var(--r-sm); background: var(--surface); color: var(--accent-text); font: 500 var(--fs-small)/16px var(--font-ui); }
.skip-link:focus, .skip-link:focus-visible { top: 8px; outline: none; box-shadow: var(--focus-ring); }
.sb-panel .pstar, .gp .pstar { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 2px; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); cursor: pointer; opacity: .45; }
.sb-panel .pi:hover .pstar, .gp .pi:hover .pstar, .sb-panel .pstar:focus-visible, .gp .pstar:focus-visible, .sb-panel .pstar.on, .gp .pstar.on { opacity: 1; }
@media (hover: none) { .sb-panel .pstar, .gp .pstar { opacity: .8; } }
.sb-panel .pstar.on svg, .gp .pstar.on svg { fill: var(--warn); stroke: var(--warn); }
.sb-panel .pstar:focus-visible, .gp .pstar:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.sb-panel .pnone { padding: 12px 8px; }
.sb-panel .pf { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding: 7px 14px; border-top: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: var(--fs-meta); line-height: var(--lh-meta); }
.sb-panel .pf span { display: inline-flex; align-items: center; gap: 4px; }
.sb-panel .pf svg { width: 12px; height: 12px; }
.sb-panel .pf .pf-r { margin-left: auto; }

.org-menu { width: 300px; }
.org-menu[hidden], .new-menu[hidden] { display: none; }
.org-menu .mt-row { display: flex; align-items: center; gap: 10px; padding: 4px 9px 6px; }
.menu .mt { display: flex; flex-direction: column; min-width: 0; line-height: 18px; }
.menu .mt b { font-weight: 600; color: var(--ink); }
.menu .mt small { font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--muted); }
.menu .mi svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.new-menu { width: 320px; max-height: calc(100vh - 64px); overflow-y: auto; }
.new-menu .mi { justify-content: flex-start; min-height: var(--nav-item-h); padding: 5px 9px; }
.nm-ai { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 2px 2px 6px; }
.nm-t { display: flex; align-items: flex-start; gap: 8px; padding: 8px; border: 1px solid var(--ai-line); border-radius: var(--r-tile); background: var(--ai-soft); color: var(--ai-text); text-align: left; cursor: pointer; font: inherit; }
.nm-t svg { width: 15px; height: 15px; margin-top: 1px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.nm-t b { display: block; font-size: var(--fs-body); line-height: 18px; font-weight: 600; }
.nm-t small { display: block; font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--ink-2); }
.nm-t:hover { border-color: var(--ai); }
.nm-t:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.user-menu { width: 300px; max-height: calc(100vh - 16px); overflow-y: auto; }
.user-menu .um-h { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.user-menu .um-h b { display: block; font-size: var(--fs-body); line-height: 18px; }
.user-menu .um-h small { display: block; font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--muted); }
.user-menu .um-h .av { width: 28px; height: 28px; }
.user-menu .mi { justify-content: flex-start; gap: 9px; min-height: var(--nav-item-h); padding: 5px 9px; }
.user-menu .mrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 9px; }
.user-menu .mrl { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: var(--fs-body); }
.user-menu .mrl svg { width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.user-menu .seg button { height: var(--control-h-sm); padding: 0 8px; font-size: var(--fs-small); }

/* ─── Phone bottom bar and the + sheet (reuses nav.css .sheet-back / .sheet-card) ─── */
.app.shell.desk .bb-tab { position: relative; font: 500 var(--fs-meta)/14px var(--font-ui); min-height: 44px; gap: 3px; color: var(--ink-2); text-decoration: none; }
.app.shell.desk .bb-tab[aria-current="page"], .app.shell.desk .bb-tab[aria-expanded="true"] { color: var(--accent-text); font-weight: 600; }
.app.shell.desk .bb-tab[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.app.shell.desk .bb-tab .bb-n { position: absolute; top: 2px; left: calc(50% + 4px); font-style: normal; }
.app.shell.desk .bb-tab .bb-n .n { display: inline-block; min-width: 18px; max-width: none; overflow: visible; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ink); color: var(--surface); font: 600 var(--fs-xs)/18px var(--font-ui); text-align: center; } /* not cut like the tab's label (nav.css .bb-tab span): "10" keeps both digits */
.app.shell.desk .bb-tab .bb-n .n.late { background: var(--crit); color: var(--crit-ink); }
/* the phone's "+" wears the brand turquoise (with the logo, the sidebar stripe and the top line); --brand and its ink
   (5.0:1) are the same in both themes, and it floats on a soft turquoise glow */
.bb-ring { display: grid; place-items: center; width: 46px; height: 46px; margin-top: -20px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 4px var(--surface), 0 10px 22px -8px color-mix(in srgb, var(--brand) 80%, transparent); }
.bb-ring svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2.2; }
.create-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.create-tiles .ct {
  display: flex; align-items: flex-start; gap: 10px; min-height: 64px; padding: 10px 12px; border: 1px solid var(--line-2);
  border-radius: var(--r-tile); background: var(--surface); color: var(--ink); font: 500 calc(var(--fs-body) + 1px)/18px var(--font-ui); text-align: left; text-decoration: none; cursor: pointer;
}
.create-tiles .ct:hover { background: var(--surface-2); }
.create-tiles .ct svg { width: 18px; height: 18px; flex: none; margin-top: 1px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.create-tiles .ct b { display: block; font-weight: 600; }
.create-tiles .ct small { display: block; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink-2); font-weight: 400; }
.create-tiles .ct.ai { background: var(--ai-soft); border-color: var(--ai-line); color: var(--ai-text); }
.sheet-card .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 10px; }

/* ─── 1180–1279: no Live pill; below 1180 the search and Ask become icons ─── */
@media (max-width: 1279px) {
  .app.shell.desk .top-live { display: none; }
  /* a task row keeps its buttons: "Nobody has it yet" goes (Take it says it), its words stay in the tooltip */
  .app.shell.desk .tk-own.free > span { display: none; }
  /* a list's search and filters stay on one row */
  .app.shell.desk .toolbar input[type=search] { width: 160px; }
  .app.shell.desk .toolbar select { max-width: 128px; }
}
@media (max-width: 1179px) {
  .app.shell.desk .search-btn { flex: none; width: var(--control-h); padding: 0; justify-content: center; }
  .app.shell.desk .search-btn span, .app.shell.desk .search-btn kbd { display: none; }
  .agent-st { width: var(--control-h); padding: 0; justify-content: center; }
  .agent-st .lbl, .agent-st .n { display: none; }
}
/* 768–1279: the agent panel overlays the page from the right instead of taking a third column (the screen keeps its width) */
@media (min-width: 768px) and (max-width: 1279px) {
  .app.shell.desk.copilot-open { grid-template-columns: var(--sb-w) minmax(0, 1fr); grid-template-areas: "rail top" "rail work"; }
  .app.shell.desk > .copilot-dock {
    position: fixed; top: var(--tb-h); right: 0; bottom: 0; z-index: 70; grid-area: auto;
    width: min(var(--copilot-width, 420px), calc(100vw - var(--sb-w) - 48px)); box-shadow: var(--e3), var(--highlight);
  }
}

/* ─── Phone (<768): bottom bar, the sidebar as the full-screen menu ─── */
@media (max-width: 767px) {
  .app.shell.desk, .app.shell.desk.copilot-open {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 52px minmax(0, 1fr);
    grid-template-areas: "top" "work";
    height: 100vh; height: 100dvh;
  }
  .app.shell.desk.copilot-open { grid-template-rows: 52px minmax(34vh, 40%) minmax(0, 1fr); grid-template-areas: "top" "copilot" "work"; }
  .app.shell.desk > .sb { display: none; }
  /* the menu sits above the bottom bar (Menu closes it again, so does the phone's Back); its header stays on top */
  .app.shell.desk.sb-open > .sb {
    display: flex; position: fixed; top: 0; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 80; width: auto;
    border-right: 0; border-bottom: 1px solid var(--line); --sb-row: 42px; --sb-gh: 30px; overflow-y: auto; overscroll-behavior: contain;
  }
  .app.shell.desk.sb-open .sb-close { display: inline-grid !important; width: 44px; height: 44px; }
  .app.shell.desk.sb-open .sb-top { position: sticky; top: 0; z-index: 2; order: 0; height: 56px; padding: 0 6px 0 12px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--brand); } /* the stripe runs past the header that stays */
  .app.shell.desk.sb-open .sb-top::after { right: 0; } /* the menu scrolls: its line stays inside it */
  .app.shell.desk.sb-open .org { height: 44px; }
  .app.shell.desk.sb-open .logo { width: 28px; height: 28px; }
  .app.shell.desk.sb-open .logo img { width: 21px; height: 21px; }
  .app.shell.desk.sb-open .org-n { font-size: calc(var(--fs-body) + 1.5px); line-height: 18px; }
  .app.shell.desk.sb-open .sb-nav { order: 3; flex: none; overflow: visible; padding: 0 8px 16px 10px; -webkit-mask-image: none; mask-image: none; }
  /* Reports, All screens and Settings on the first screen, under the search, as three tiles; the account is the top-bar avatar */
  .app.shell.desk.sb-open .sb-foot { order: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0 8px 8px 10px; border-top: 0; }
  .app.shell.desk.sb-open .sb-foot > .ni {
    grid-row: 1; grid-column: auto; flex-direction: column; justify-content: center; gap: 2px; height: 56px; padding: 4px; border: 1px solid var(--line);
    border-radius: var(--r-tile); background: var(--surface); box-shadow: var(--e1); font-size: var(--fs-body); line-height: 16px; text-align: center;
  }
  .app.shell.desk.sb-open .sb-foot > .ni .lbl { flex: none; max-width: 100%; }
  .app.shell.desk.sb-open .sb-foot > .me, .app.shell.desk.sb-open .sb-foot > .sb-fold { display: none; }
  .app.shell.desk.sb-open .sb-foot > .sb-line { display: none; }
  .app.shell.desk.sb-open .sb-find {
    order: 1; flex: none; display: flex; align-items: center; gap: 10px; width: auto; height: 44px; margin: 8px 8px 8px 10px; padding: 0 12px; border: 1px solid var(--line-2);
    border-radius: var(--r-md); background: var(--surface-2); color: var(--muted); font: 400 calc(var(--fs-body) + 2px)/20px var(--font-ui); text-align: left; cursor: pointer;
  }
  .app.shell.desk.sb-open .sb-find svg { width: 18px; height: 18px; }
  .app.shell.desk.sb-open .sb-find:focus-visible { outline: none; box-shadow: var(--focus-ring); }
  .app.shell.desk .sb .ni { font-size: calc(var(--fs-body) + 2px); gap: 12px; padding: 0 10px; }
  .app.shell.desk .sb .ni > svg { width: 18px; height: 18px; }
  /* the menu's rows start 10 px in, so the open row's bar moves 10 px out to stay on the stripe; the foot's three
     tiles keep it inside their own left edge */
  .app.shell.desk .sb .sb-nav .ni[aria-current="page"]::before { left: -10px; }
  .app.shell.desk.sb-open .sb-foot > .ni[aria-current="page"]::before { left: 0; width: 3px; border-radius: 0 3px 3px 0; }
  .app.shell.desk .sb .ni.has-cnt { height: auto; min-height: 48px; flex-wrap: wrap; row-gap: 0; padding-top: 4px; padding-bottom: 4px; }
  .app.shell.desk .sb .ni .why { display: block; flex: 0 0 calc(100% - 30px); margin-left: 30px; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--muted); font-weight: 400; white-space: normal; }
  .app.shell.desk .sb .ni .why:empty { display: none; }
  .app.shell.desk .sb .n { height: 20px; min-width: 20px; padding: 0 7px; font-size: var(--fs-meta); line-height: 20px; }
  .app.shell.desk .sb .gt, .app.shell.desk .sb .gall { font-size: var(--fs-meta); height: 28px; }
  .app.shell.desk .sb .gfold { position: static; transform: none; width: 28px; height: 28px; margin-left: -6px; opacity: 1; }
  .app.shell.desk .sb .gt { padding-left: 2px; }
  .app.shell.desk .sb-strip, .app.shell.desk .sb .nadd { display: none !important; }
  .app.shell.desk .sb-foot .sb-fold { display: none; }
  .app.shell.desk > .topbar { gap: 4px; padding: 0 8px 0 var(--gutter); }
  .app.shell.desk .topbar .pagebar .crumbs, .app.shell.desk .topbar .fav-btn, .app.shell.desk #theme-btn { display: none; }
  .app.shell.desk .topbar .pagebar { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; }
  .app.shell.desk .topbar .pagebar h1 { max-width: 100%; font-size: calc(var(--fs-topbar) + 2px); }
  .app.shell.desk .topbar .page-meta { max-width: 100%; margin: 0; font-size: var(--fs-meta); line-height: var(--lh-meta); }
  .app.shell.desk .search-btn { flex: none; width: 40px; height: 40px; margin: 0; padding: 0; justify-content: center; border: 0; background: transparent; color: var(--ink-2); }
  .app.shell.desk .search-btn svg { width: 20px; height: 20px; }
  .app.shell.desk .search-btn span, .app.shell.desk .search-btn kbd { display: none; }
  .app.shell.desk .top-r { flex: none; gap: 2px; }
  .app.shell.desk .new-split { display: none !important; }
  .agent-st { width: 36px; height: 36px; margin: 0 2px; padding: 0; justify-content: center; }
  .agent-st svg { width: 17px; height: 17px; }
  .agent-st .lbl, .agent-st .n { display: none; }
  .app.shell.desk .top-avatar { display: grid; margin-left: 4px; }
  .app.shell.desk > .app-workspace { grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "main" "bottom"; }
  .app.shell.desk > .app-workspace > .main { padding: 12px var(--gutter) 24px; }
  .app.shell.desk > .app-workspace > .bottom-bar {
    grid-area: bottom; position: relative; z-index: 40; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line);
  }
  /* a role that creates nothing (viewer, driver) has no + */
  .app.shell.desk > .app-workspace > .bottom-bar[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app.shell.desk > .app-workspace > .bottom-bar[data-n="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app.shell.desk > .app-workspace > .bottom-bar[data-n="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sb-panel { inset: 0 !important; width: auto; max-height: none; border-radius: 0; border: 0; }
  .sb-panel .pfind { width: auto; max-width: none; flex: 1; height: 40px; }
  /* a hub's screens on a phone: find fields the height of their box (16 px text: components.css), 36 px stars and buttons */
  .sb-panel .pfind input, .gp .gp-find input { height: 100%; }
  .gp .gp-find { width: 100%; height: var(--control-h-touch); }
  .sb-panel .pstar, .gp .pstar { width: 36px; height: 36px; }
  .sb-panel .pmake .btn, .gp-make .btn, :is(.sb-panel, .gp) .pmore { min-height: 36px; }
  .gp-wait li { flex-wrap: wrap; row-gap: 0; }
  .gp-wait .gw { flex: 1 1 100%; padding-left: 4px; white-space: normal; } /* what waits reads whole under its count */
  .sb-panel .ph { flex-wrap: wrap; }
  .sb-panel .ph-t { flex: 1 1 100%; }
  .sb-panel .pf .pf-r { display: none; }
  .user-menu, .org-menu, .new-menu { width: auto; left: 8px !important; right: 8px; }
  .app.shell.desk .screen.screen-list { display: block; }
  /* a list on a phone keeps its New (and Quick LR); importing and exporting CSV files is desk work */
  .app.shell.desk #list-actions #btn-import, .app.shell.desk #list-actions #btn-export { display: none; }
  /* a list's filters slide sideways on a phone instead of stacking five rows high */
  .app.shell.desk .toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)) 8px; padding: 0 var(--gutter) 2px; }
  .app.shell.desk .toolbar::-webkit-scrollbar { display: none; }
  .app.shell.desk .toolbar > * { flex: none; }
  .app.shell.desk .toolbar input[type=search] { width: 64vw; }
  .app.shell.desk .toolbar .spacer { display: none; }
  /* the existing Today rows as short cards: what and for whom on the left, ₹ and the one button on the right; a row
     with several buttons puts them on a line of their own */
  .app.shell.desk .tk { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "m v" "m a"; gap: 2px 10px; padding: 7px 10px 7px 12px; align-items: start; }
  .app.shell.desk .tk:has(.tk-a > :nth-child(2)) { grid-template-areas: "m v" "a a"; }
  .app.shell.desk .tk-v { grid-area: v; }
  .app.shell.desk .tk-m { grid-area: m; display: block; }
  .app.shell.desk .tk-t { font-size: calc(var(--fs-body) + 1px); }
  .app.shell.desk .tk-s { white-space: nowrap; font-size: var(--fs-body); line-height: 18px; }
  .app.shell.desk .tk-r, .app.shell.desk .tk-o, .app.shell.desk .tk-checks { display: none; }
  .app.shell.desk .tk-a { grid-area: a; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
  .app.shell.desk .tk-a .btn.xs { height: 36px; padding: 0 12px; font-size: var(--fs-body); }
  .app.shell.desk .hub-root > .page-h.ph-done, .app.shell.desk .tk-chain, .app.shell.desk .chain-card { display: none; } /* Refresh and the set-up offer (with its Not now) stay on the desktop */
}

@media print {
  .app.shell.desk > .sb, .app.shell.desk .bottom-bar, .user-menu, .sb-panel, .sb-fly, .sb-tip { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .sb .gfold svg, .sb .gfold, .sb .ni, .sb .ni > svg, .agent-st { transition: none; }
  .app.shell.desk .top-live > i { animation: none; }
  .agent-st:hover { transform: none; }
}
