/* LastStop design system, layer 4 of 4: the frame (docs/REDESIGN-ROLLOUT.md sections 3 and 4; markup in
   src/pages/shell.mjs renderFrame, behavior in public/assets/ls/ls-ui.js). Ported from the approved dock4 prototype.
   - 1024 px and wider: a persistent left sidebar (240 px; 64 px collapsed, html.sb-collapsed, remembered in localStorage
     `ls-sidebar`), the main area a centered column, the detail as a right-side panel over the dimmed list.
   - below 1024 px: the top strip and the floating dock (Home, Applicants, the command button, the fourth seat, More), the
     detail as a sheet sliding up from the dock.
   .shell[data-pane] decides what shows: list (the list alone), detail (the list, dimmed, under the panel or sheet), page
   (no list: the detail is the main column). The older stylesheet's grid, rail, bottom bar and company block are not drawn;
   every rule below that touches an older class (.shell, .pane-list, .pane-detail, .toast-stack, .undo-bar) is scoped to
   .ls-shell / .ls-body so none of the older frame rules reach the new one. */

/* ---------- the shell ---------- */
body.ls-body { overflow: hidden; background: var(--bg); }
.ls-shell.shell { display: block; height: 100vh; height: 100dvh; background: var(--bg); color: var(--ink); grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; }

/* the radial accent glow behind the dock (phone) and low behind the main column (desktop) */
.ls-glow { position: fixed; left: 50%; bottom: -150px; width: 560px; height: 360px; transform: translateX(-50%); background: radial-gradient(closest-side, var(--accent-glow), var(--bg-glow) 50%, transparent 100%); opacity: .55; pointer-events: none; z-index: 0; }
html[data-theme="light"] .ls-glow { width: 320px; height: 190px; bottom: -90px; opacity: .45; }

/* ---------- wordmark, company chip, badges ---------- */
.wordmark { display: inline-flex; align-items: center; gap: 9px; min-width: 0; font-family: var(--font-head); font-weight: 700; font-size: 17px; letter-spacing: -.02em; color: var(--heading); text-decoration: none; white-space: nowrap; }
.wordmark .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 10px var(--accent-glow); }
html[data-theme="dark"] .wordmark .dot { box-shadow: 0 0 12px var(--accent); }
.wordmark .wm-name { overflow: hidden; text-overflow: ellipsis; }
.wordmark .company-mark { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; }
.co-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; font-family: var(--font-head); font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ls-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent-fill); color: var(--accent-ink); font-family: var(--font-head); font-size: 11px; font-weight: 700; line-height: 1; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ls-badge.is-zero { display: none; }
.ls-badge.rev { background: var(--rev); color: #1a1d14; }

/* ---------- the main area and its panes ---------- */
.ls-main { position: fixed; top: calc(var(--strip-h) + var(--sat)); left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; z-index: 2; }
.ls-main:focus { outline: none; }
.ls-stage { position: relative; flex: 1; min-height: 0; }
.ls-shell.shell[data-pane] .pane-list { display: block; position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; background: transparent; border: 0; padding: 0 0 calc(var(--dock-h) + var(--sab) + 24px); }
.ls-shell .pane-list .pane-header, .ls-shell .pane-list .list-pin, .ls-shell .pane-list .sync-filters { background: var(--bg); }
.ls-shell .pane-list .pane-header.lh-wrap { background: transparent; } /* the static list head lets the theme's light through (stage 6) */
.ls-shell .pane-list .pane-header.has-shadow { border-bottom-color: var(--line); }
.ls-shell .sync-banner { flex: none; }

/* the detail: hidden with the list alone; a sheet or a panel over the dimmed list; the main column on a page */
.ls-sheet { display: none; }
.ls-scrim { display: none; }
.ls-shell.shell[data-pane] .pane-detail { display: block; position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; background: transparent; grid-area: auto; }
.ls-shell[data-pane="detail"] .ls-sheet { display: flex; flex-direction: column; position: fixed; z-index: 29; background: var(--surface); box-shadow: var(--shadow); }
.ls-shell[data-pane="detail"] .ls-scrim { display: block; position: fixed; inset: 0; z-index: 28; background: var(--scrim); animation: ls-fade var(--t) var(--ease); }
.ls-sheet-bar { flex: none; display: flex; align-items: center; justify-content: flex-end; padding: 4px 8px 0 16px; position: relative; }
.ls-sheet-bar .sheet-handle { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); margin: 0; }
.ls-shell[data-pane="page"] .pane-list { display: none !important; }
.ls-shell[data-pane="page"] .ls-sheet { display: flex; flex-direction: column; position: absolute; inset: 0; background: transparent; box-shadow: none; }
.ls-shell[data-pane="page"] .ls-sheet > .ls-sheet-bar { display: none; }
.ls-shell[data-pane="page"] .pane-detail { padding: 0 0 calc(var(--dock-h) + var(--sab) + 24px); }
.ls-shell .pane-detail .detail-inner { margin: 0 auto; }

/* ---------- toasts and the undo bar, placed for the new frame ---------- */
body.ls-body .toast-stack, body.ls-body .toast-stack.is-raised { top: auto; left: 16px; right: 16px; width: auto; bottom: calc(var(--dock-h) + var(--sab) + 16px); align-items: center; z-index: 50; }
body.ls-body .undo-bar { bottom: calc(var(--dock-h) + var(--sab) + 12px); }

/* ---------- phone and tablet (below 1024 px): the strip and the dock ---------- */
.ls-strip { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: calc(var(--strip-h) + var(--sat)); padding: var(--sat) 16px 0; display: flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.ls-strip .co-chip { margin-left: auto; }
@media (max-width: 759px) { .ls-strip .co-chip { display: none; } }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 6px 8px calc(6px + var(--sab)); background: color-mix(in srgb, var(--surface) 93%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.dock-in { display: flex; align-items: flex-end; justify-content: space-around; max-width: 480px; margin: 0 auto; }
.dock-item { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; padding: 6px 2px; border-radius: var(--r-2); color: var(--muted); font-family: var(--font-head); font-size: 11.5px; font-weight: 600; text-decoration: none; list-style: none; cursor: pointer; transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.dock-item::-webkit-details-marker { display: none; }
.dock-item .icon { width: 23px; height: 23px; font-size: 23px; }
.dock-item .ls-l { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-item:hover { color: var(--ink); }
.dock-item.is-active, .ls-more[open] > .dock-item { color: var(--accent-text); }
/* J647 (Joshua 11/10/2026, t22u): no active-tab dot under the dock item; More carries a dot only (no number). */
.dock-item.is-active::after { content: none; }
.ls-badge.is-dot { min-width: 0; width: 8px; height: 8px; padding: 0; font-size: 0; }
.dock-item .ls-badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; box-shadow: 0 0 0 2px var(--surface); }
.ls-more { flex: 1 1 0; min-width: 0; display: flex; }
.ls-more > .dock-item { flex: 1 1 0; }
.dock-cmd { flex: none; display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; margin: 0 8px -2px; border-radius: 50%; background: linear-gradient(160deg, var(--accent), var(--accent-deep)); color: #fff; text-decoration: none; transition: transform var(--t-fast) var(--ease); }
html[data-theme="dark"] .dock-cmd { box-shadow: 0 0 0 4px var(--bg), 0 0 32px var(--accent-glow); }
html[data-theme="light"] .dock-cmd { box-shadow: 0 0 0 4px var(--bg), 0 10px 26px -6px var(--accent-glow); }
.dock-cmd .icon { width: 24px; height: 24px; font-size: 24px; }
.dock-cmd:hover { transform: translateY(-2px); }

/* the phone's More: a sheet over the page with the section headers as dropdowns (one open at a time) and Account */
.ls-more-sheet { position: fixed; left: 0; right: 0; bottom: calc(var(--dock-h) + var(--sab)); z-index: 29; max-height: calc(100dvh - var(--strip-h) - var(--sat) - var(--dock-h) - var(--sab) - 16px); overflow-y: auto; padding: 4px 16px 16px; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-4) var(--r-4) 0 0; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; animation: ls-sheet-up var(--t-slow) var(--ease); }
.ls-more-title { font-size: 22px; margin: 8px 4px 4px; }
.ls-cat { border-radius: var(--r-3); background: var(--surface-2); border: 1px solid var(--line); }
.ls-cat[open] { border-color: var(--accent); }
.ls-cat > summary { list-style: none; display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 14px; cursor: pointer; border-radius: var(--r-3); }
.ls-cat > summary::-webkit-details-marker { display: none; }
.ls-cat .cat-ic { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--neu-soft); color: var(--ink-2); flex: none; }
.ls-cat .cat-ic .icon { width: 20px; height: 20px; font-size: 20px; }
.ls-cat .t { flex: 1; min-width: 0; font-family: var(--font-head); font-weight: 600; font-size: 16.5px; color: var(--heading); }
.ls-cat .chev { width: 18px; height: 18px; color: var(--muted); transition: transform var(--t-fast) var(--ease); }
.ls-cat[open] .chev { transform: rotate(180deg); }
.ls-cat-body { padding: 0 6px 8px; display: flex; flex-direction: column; gap: 2px; animation: ls-slide-down var(--t) var(--ease); }
.ls-cat-body .mi { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: var(--r-2); background: none; border: 0; color: var(--heading); font-family: var(--font-head); font-weight: 600; font-size: 15px; text-decoration: none; text-align: left; cursor: pointer; width: 100%; }
.ls-cat-body .mi:hover { background: var(--surface-3); }
.ls-cat-body .mi.is-cur { color: var(--accent-text); }
.ls-cat-body .mi .icon { width: 18px; height: 18px; color: var(--muted); flex: none; }
.ls-cat-body .mi .ls-badge { margin-left: auto; }

/* an open menu dims the page behind it (ls-ui.js makes it inert) */
.ls-menu-scrim { position: fixed; inset: 0; z-index: 27; background: var(--scrim); animation: ls-fade var(--t-fast) var(--ease); }

/* the sidebar is desktop-only */
.sidebar { display: none; }

/* ---------- phone sheet ---------- */
@media (max-width: 1023px) {
  .ls-shell[data-pane="detail"] .ls-sheet { left: 0; right: 0; top: calc(var(--strip-h) + var(--sat) + 10px); bottom: calc(var(--dock-h) + var(--sab)); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-4) var(--r-4) 0 0; animation: ls-sheet-up var(--t-slow) var(--ease); }
  .ls-shell[data-pane="detail"] .ls-sheet .pane-detail { border-radius: 0; }
  .ls-shell .pane-detail .detail-inner { max-width: 760px; }
}
/* the tablet band keeps the main column centered */
@media (min-width: 760px) and (max-width: 1023px) {
  .ls-shell.shell[data-pane] .pane-list { padding-left: max(0px, calc((100% - var(--col)) / 2)); padding-right: max(0px, calc((100% - var(--col)) / 2)); }
  .dock { left: 50%; right: auto; bottom: 18px; transform: translateX(-50%); padding: 6px; border: 1px solid var(--line-2); border-radius: 999px; box-shadow: var(--shadow); }
  .dock-in { gap: 2px; max-width: none; }
  .dock-item, .ls-more, .ls-more > .dock-item { flex: none; }
  .dock-item { flex-direction: row; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; }
  .dock-item .icon { width: 20px; height: 20px; }
  .dock-item.is-active, .ls-more[open] > .dock-item { background: var(--accent-soft); }
  .dock-item.is-active::after { display: none; }
  .dock-item .ls-badge { position: static; box-shadow: none; }
  .dock-cmd { width: 48px; height: 48px; margin: 0 4px; }
  .ls-more-sheet { left: 50%; right: auto; width: 480px; transform: translateX(-50%); bottom: 96px; border-radius: var(--r-4); border-bottom: 1px solid var(--line); }
  :root { --dock-h: 64px; }
}

/* ---------- 1024 px and wider: the persistent sidebar ---------- */
@media (min-width: 1024px) {
  html.sb-collapsed { --sb-w: 64px; }
  .ls-strip, .dock { display: none; }
  .ls-main { top: 0; left: var(--sb-w); transition: left var(--t) var(--ease); }
  .ls-glow { left: calc(50% + var(--sb-w) / 2); bottom: -190px; width: 760px; height: 440px; }
  .ls-shell.shell[data-pane] .pane-list { padding: 0 max(24px, calc((100% - var(--col)) / 2)) 64px; }
  .ls-shell .pane-list > .pane-header:first-child { padding-top: 40px; }
  .ls-shell[data-pane="page"] .pane-detail { padding: 24px max(24px, calc((100% - var(--col)) / 2)) 64px; }
  .ls-shell[data-pane="page"] .pane-detail .detail-inner { max-width: none; }
  /* desktop: the toast rises from the foot of the main column, never over the title area (stage 6) */
  body.ls-body .toast-stack, body.ls-body .toast-stack.is-raised { top: auto; bottom: 28px; left: calc(var(--sb-w) + 24px); right: 24px; }
  html.sb-collapsed body.ls-body .toast-stack { left: 88px; }
  /* with the panel open the toast keeps to the dimmed list's foot, left, clear of the panel's own buttons */
  body.ls-body:has(.ls-shell[data-pane="detail"]) .toast-stack { right: auto; align-items: flex-start; }
  body.ls-body .undo-bar { left: calc(50% + var(--sb-w) / 2); bottom: 20px; }

  /* the right panel over the dimmed list */
  .ls-shell[data-pane="detail"] .ls-sheet { top: 0; bottom: 0; right: 0; width: min(var(--panel-w), calc(100vw - var(--sb-w) - 48px)); border-left: 1px solid var(--line); animation: ls-panel-in var(--t-slow) var(--ease); }
  .ls-shell[data-pane="detail"] .ls-scrim { left: var(--sb-w); }
  .ls-sheet-bar .sheet-handle { display: none; }
  /* server-rendered module and admin pages, and the app's table-heavy details, open a wider panel */
  /* the panel's width by page kind (stage 6): a record (an applicant, an offer, a person, a truck) reads in the narrow panel;
     only a data panel (a payroll week or a driver's week, a dashboard drill-down, the Operations tools) is wide */
  .ls-shell { --panel-w: 520px; }
  .ls-shell[data-panel="wide"], .ls-shell[data-ctx="dashboard"] { --panel-w: 960px; }

  /* the sidebar */
  .sidebar { display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; width: var(--sb-w); z-index: 31; background: var(--surface); border-right: 1px solid var(--line); transition: width var(--t) var(--ease); }
  html[data-theme="light"] .sidebar { background: var(--surface-3); }
  .sb-top { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px 18px 12px; }
  .sb-nav { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; }
  html:not(.sb-collapsed) .sb-nav { overflow-y: auto; }
  .sb-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 0 10px 0 12px; border-radius: var(--r-2); color: var(--ink-2); font-family: var(--font-head); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; list-style: none; cursor: pointer; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
  .sb-item::-webkit-details-marker { display: none; }
  .sb-item:hover { background: var(--surface-2); color: var(--heading); }
  html[data-theme="light"] .sb-item:hover { background: var(--surface); }
  .sb-item .icon { width: 20px; height: 20px; font-size: 20px; flex: none; }
  .sb-item .sb-l, .sb-item .ls-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .sb-item .chev { width: 16px; height: 16px; color: var(--muted); flex: none; transition: transform var(--t-fast) var(--ease); }
  .sb-group[open] > .sb-item .chev { transform: rotate(180deg); }
  .sb-item.is-active { color: var(--heading); background: var(--accent-soft); }
  .sb-item.is-active::before { content: ""; position: absolute; left: -10px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
  html[data-theme="dark"] .sb-item.is-active { box-shadow: 0 0 24px -4px var(--accent-glow); }
  .sb-item.is-active .icon { color: var(--accent-text); }
  html[data-theme="light"] .sb-item.is-active .icon { color: var(--accent); }
  .sb-group { position: relative; }
  .sb-sub-in { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 8px 30px; animation: ls-slide-down var(--t) var(--ease); }
  .sb-link { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 10px; border-radius: var(--r-1); color: var(--muted); font-family: var(--font-head); font-weight: 500; font-size: 13.5px; text-decoration: none; white-space: nowrap; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
  .sb-link:hover { color: var(--heading); background: var(--surface-2); }
  html[data-theme="light"] .sb-link:hover { background: var(--surface); }
  .sb-link.is-cur { color: var(--accent-text); font-weight: 600; }
  .sb-link .icon { width: 16px; height: 16px; font-size: 16px; flex: none; }
  .sb-link .ls-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .sb-foot { flex: none; display: flex; flex-direction: column; gap: 4px; padding: 10px; border-top: 1px solid var(--line); }
  .sb-acct { display: flex; align-items: center; gap: 6px; }
  .ls-acct { flex: 1; min-width: 0; }
  .sb-me { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 6px; border-radius: var(--r-2); list-style: none; cursor: pointer; transition: background var(--t-fast) var(--ease); }
  .sb-me::-webkit-details-marker { display: none; }
  .sb-me:hover, .ls-acct[open] > .sb-me { background: var(--surface-2); }
  html[data-theme="light"] .sb-me:hover, html[data-theme="light"] .ls-acct[open] > .sb-me { background: var(--surface); }
  .sb-me.is-active { box-shadow: inset 3px 0 0 var(--accent); }
  .sb-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--heading); font-family: var(--font-head); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
  .sb-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
  .sb-name { font-family: var(--font-head); font-weight: 600; font-size: 13.5px; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sb-role { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sb-cmd { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; background: linear-gradient(160deg, var(--accent), var(--accent-deep)); color: #fff; text-decoration: none; transition: transform var(--t-fast) var(--ease); }
  html[data-theme="dark"] .sb-cmd { box-shadow: 0 0 22px var(--accent-glow); }
  html[data-theme="light"] .sb-cmd { box-shadow: 0 8px 18px -6px var(--accent-glow); }
  .sb-cmd:hover { transform: translateY(-1px); }
  .sb-cmd .icon { width: 18px; height: 18px; font-size: 18px; }
  .sb-toggle { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 12px; border-radius: var(--r-2); background: none; border: 0; color: var(--muted); font-family: var(--font-head); font-weight: 600; font-size: 12.5px; cursor: pointer; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
  .sb-toggle:hover { background: var(--surface-2); color: var(--heading); }
  .sb-toggle .icon { width: 16px; height: 16px; font-size: 16px; flex: none; }
  /* the account menu opens just above the account button */
  .ls-acct > .menu { position: fixed; left: 10px; bottom: 106px; width: 260px; max-height: calc(100vh - 130px); z-index: 46; }

  /* collapsed: icons with badges, a tooltip on hover, the dropdown as a flyout beside the icon */
  html.sb-collapsed .sb-top { padding: 20px 0 12px; align-items: center; }
  html.sb-collapsed .sb-top .wordmark .wm-name, html.sb-collapsed .sb-top .co-chip { display: none; }
  html.sb-collapsed .sb-top .wordmark .dot { width: 12px; height: 12px; }
  html.sb-collapsed .sb-item { justify-content: center; padding: 0; width: 44px; }
  html.sb-collapsed .sb-l, html.sb-collapsed .sb-item .ls-l, html.sb-collapsed .sb-item .chev, html.sb-collapsed .sb-who, html.sb-collapsed .sb-toggle .sb-l { display: none; }
  html.sb-collapsed .sb-item .ls-badge { position: absolute; top: 3px; right: 1px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; box-shadow: 0 0 0 2px var(--surface); }
  html.sb-collapsed .sb-group > .sb-sub { position: absolute; left: calc(100% + 12px); top: 0; width: 232px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-3); box-shadow: var(--shadow); padding: 6px; z-index: 32; }
  html.sb-collapsed .sb-sub-in { padding: 0; animation: ls-pop var(--t) var(--ease); }
  html.sb-collapsed .sb-foot { align-items: center; }
  html.sb-collapsed .sb-acct { flex-direction: column; }
  html.sb-collapsed .ls-acct { flex: none; }
  html.sb-collapsed .sb-me { padding: 4px; }
  html.sb-collapsed .ls-acct > .menu { left: 72px; bottom: 60px; }
  html.sb-collapsed .sb-toggle { width: 44px; justify-content: center; padding: 0; }
  html.sb-collapsed [data-tip] { position: relative; }
  html.sb-collapsed [data-tip]:hover::after, html.sb-collapsed [data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%; transform: translateY(-50%); background: var(--heading); color: var(--bg); font-family: var(--font-head); font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: var(--r-1); white-space: nowrap; pointer-events: none; z-index: 33; box-shadow: var(--shadow-sm); }
  html.sb-collapsed .sb-group[open] > .sb-item::after { display: none; }
}

/* ---------- the command bar (Cmd/Ctrl+K, the command button) ---------- */
.cmd { position: fixed; inset: 0; z-index: 70; background: var(--scrim); display: flex; align-items: flex-start; justify-content: center; padding: calc(8vh + var(--sat)) 12px 12px; animation: ls-fade var(--t-fast) var(--ease); }
.cmd[hidden] { display: none; }
.cmd-box { width: min(640px, 100%); max-height: min(70vh, 560px); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-4); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; animation: ls-pop var(--t) var(--ease); }
.cmd-top { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 18px; border-bottom: 1px solid var(--line); color: var(--accent-text); }
.cmd-top .icon { width: 20px; height: 20px; font-size: 20px; flex: none; }
.cmd-input { flex: 1; min-width: 0; min-height: 46px; border: 0; background: transparent; font: inherit; font-size: 17px; color: var(--ink); }
.cmd-input:focus { outline: none; }
.cmd-esc { font-family: var(--font-head); font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); border-radius: var(--r-1); padding: 3px 6px; }
.cmd-results { overflow-y: auto; padding: 6px; }
.cmd-group-label { font-family: var(--font-head); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 4px; }
.cmd-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 8px 12px; border-radius: var(--r-2); background: none; border: 0; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.cmd-item .ico { width: 32px; height: 32px; border-radius: var(--r-2); background: var(--surface-2); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }
.cmd-item .ico .icon { width: 16px; height: 16px; font-size: 16px; }
.cmd-item .tx { flex: 1; min-width: 0; }
.cmd-title { display: block; font-family: var(--font-head); font-weight: 600; font-size: 14.5px; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-sub { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-item.is-active, .cmd-item:hover { background: var(--accent-soft); }
.cmd-item.is-active .cmd-title { color: var(--accent-text); }
.cmd-empty { padding: 28px 16px; text-align: center; color: var(--muted); }

/* the page behind an open menu or the command bar does not scroll */
html.ls-lock .pane-list, html.ls-lock .pane-detail { overflow: hidden; }
/* J39 (Grok Bot's check, 10/13/2026): on a phone the frame's pane rule (.ls-shell.shell[data-pane] .pane-detail, above) outranked
   the lock, so a drag on an open menu scrolled the card behind it and the menu with it. Phone only: on a wide screen a
   classic scrollbar would vanish and shift the layout. A long menu still scrolls inside itself. */
@media (max-width: 759px) {
  html.ls-lock .ls-shell.shell[data-pane] .pane-list, html.ls-lock .ls-shell.shell[data-pane] .pane-detail { overflow: hidden; }
  details[open] > .menu { overscroll-behavior: contain; }
}
/* the tab bar and the top strip dim with the rest of the page while a menu outside them is open (ls-ui.js; both are inert
   then, so a tap on them lands on the dim beneath and closes the menu) */
.dock.is-menu-dim::after, .ls-strip.is-menu-dim::after { content: ""; position: absolute; inset: -1px; z-index: 2; border-radius: inherit; background: var(--scrim); pointer-events: none; animation: ls-fade var(--t-fast) var(--ease); }

/* ---------- ls-ui.js: open menus, "..." actions, in-page details ---------- */
details.is-menu-open { position: relative; z-index: 26; }
.ls-menu-scrim.is-in-main { z-index: 25; }
.ls-menu-scrim.is-in-sheet { position: fixed; inset: 0; z-index: 25; }
/* J39: the dim a pane gets over its visible part while a menu in it is open (ls-ui.js liftMenu sets top and height); in a
   sheet it is as dark as the sheet's two dims it sits above. A menu with no room below opens upward (fitMenu). */
.ls-menu-scrim.is-in-pane { position: absolute; inset: auto 0; z-index: 25; }
.ls-menu-scrim.is-in-pane.is-twice { box-shadow: inset 0 0 0 100vmax var(--scrim); }
details[open] > .menu.is-up { top: auto; bottom: calc(100% + 6px); }
html.sb-collapsed .sb-toggle .icon { transform: rotate(180deg); }
.ls-detail-scrim { position: fixed; inset: 0; z-index: 38; background: var(--scrim); animation: ls-fade var(--t) var(--ease); }
.ls-detail.is-open { position: fixed; z-index: 39; display: flex; flex-direction: column; overflow-y: auto; background: var(--surface); box-shadow: var(--shadow); }
@media (max-width: 1023px) {
  .ls-detail.is-open { left: 0; right: 0; top: calc(var(--strip-h) + var(--sat) + 10px); bottom: calc(var(--dock-h) + var(--sab)); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-4) var(--r-4) 0 0; padding: 0 16px 24px; animation: ls-sheet-up var(--t-slow) var(--ease); }
}
@media (min-width: 1024px) {
  .ls-detail.is-open { top: 0; bottom: 0; right: 0; width: min(var(--panel-w), calc(100vw - var(--sb-w) - 48px)); border-left: 1px solid var(--line); padding: 0 24px 32px; animation: ls-panel-in var(--t-slow) var(--ease); }
  .ls-detail-scrim { left: var(--sb-w); }
}
/* a closed dropdown's content takes no box at all (some engines keep laying out a closed <details>' content on demand, so a
   measure of what is on screen would count it) */
details[data-ls-drop]:not([open]) > :not(summary), details[data-ls-menu]:not([open]) > :not(summary) { display: none; }

/* ---------- the theme's ambient light (stage 6): Kept Staffed's soft cream-olive-teal band across the top of every page;
   JCruz's dark page a faint red light in the top corner, the dock's glow below. Both behind the content, never over it. ---------- */
.ls-main::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 340px; pointer-events: none; z-index: 0; }
html[data-theme="light"] .ls-main::before { background: radial-gradient(70% 120% at 88% -20%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%), radial-gradient(60% 120% at 8% -30%, color-mix(in srgb, var(--heading) 15%, transparent), transparent 72%), linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 55%, transparent), transparent); -webkit-mask-image: linear-gradient(180deg, #000 35%, transparent); mask-image: linear-gradient(180deg, #000 35%, transparent); }
html[data-theme="dark"] .ls-main::before { background: radial-gradient(50% 90% at 92% -30%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
.ls-main > .ls-stage, .ls-main > .sync-banner { position: relative; z-index: 1; }

/* J232 (Joshua 10/22/2026): <base>/app?embed=card, the applicant card alone inside the Hiring > Applicants table's panel
   (ls-ui.js): no strip, sidebar, dock, list or close bar of its own (the table page's panel has the X); the sheet fills the frame */
body.is-embed .ls-strip, body.is-embed .sidebar, body.is-embed .dock, body.is-embed .pane-list, body.is-embed .ls-scrim,
body.is-embed .sync-banner, body.is-embed .ls-glow, body.is-embed .ls-sheet > .ls-sheet-bar { display: none !important; }
body.is-embed .ls-shell[data-pane] .ls-sheet { display: flex; position: fixed; inset: 0; width: auto; border: 0; border-radius: 0; box-shadow: none; animation: none; }

/* ---------- J725 "Quiet" kit, the frame half (see the end of components.css): a calm dock with a plain gray Search item,
   no red wash or glow in either theme, a neutral sheet dimmer in light (tokens.css), 2 px Home stripes in light (--stripe-w) ---------- */
/* ---------- 5. the dock: calm. Search is a plain gray item with a label; the active item is the heading color; no red dot;
   the count badges stay (real counts) ---------- */
html[data-theme] body.ls-body .dock-cmd { flex: 1 1 0; width: auto; height: auto; min-width: 0; min-height: 56px; margin: 0; padding: 6px 2px; border-radius: var(--r-2); flex-direction: column; gap: 3px; background: transparent; box-shadow: none; color: var(--muted); font-family: var(--font-head); font-size: 11.5px; font-weight: 600; line-height: normal; transform: none; }
html[data-theme] body.ls-body .dock-cmd::after { content: "Search"; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] body.ls-body .dock-cmd .icon { width: 23px; height: 23px; font-size: 23px; }
html[data-theme] body.ls-body .dock-cmd:hover { transform: none; color: var(--ink); }
html[data-theme] body.ls-body .dock-item.is-active, html[data-theme] body.ls-body .ls-more[open] > .dock-item { color: var(--heading); }
html[data-theme] body.ls-body .dock-item.is-active::after { display: none; }
html[data-theme] body.ls-body .dock { background: color-mix(in srgb, var(--surface) 94%, transparent); }
html[data-theme] body.ls-body .wordmark .dot { box-shadow: none; }
/* tablet (760 to 1023 px): the dock is one row of pills; Search is one more gray pill and the current page a gray pill, not
   the red wash, so the dock keeps its 64 px height (review J725) */
@media (min-width: 760px) and (max-width: 1023px) {
  html[data-theme] body.ls-body .dock-cmd { flex: none; flex-direction: row; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; }
  html[data-theme] body.ls-body .dock-cmd .icon { width: 20px; height: 20px; font-size: 20px; }
  html[data-theme] body.ls-body .dock-item.is-active, html[data-theme] body.ls-body .ls-more[open] > .dock-item { background: var(--surface-3); }
}

/* ---------- 6. the theme's light: the red wash at the top of a page and the glow behind the dock go (a faint neutral band
   stays in light so the strip has a floor); the dimmer behind a sheet is a neutral 40 % black; selected rows on
   --surface-3; no red glow under cards ---------- */
html[data-theme] body.ls-body .ls-glow { display: none; }
html[data-theme="light"] body.ls-body .ls-main::before { background: linear-gradient(180deg, color-mix(in srgb, var(--heading) 4%, transparent), transparent 60%); -webkit-mask-image: none; mask-image: none; height: 200px; }
html[data-theme="dark"] body.ls-body .ls-main::before { background: none; }
html[data-theme="light"] body.ls-body .row.is-open, html[data-theme="light"] body.ls-body .row[aria-current],
html[data-theme="light"] body.ls-body .ls-shell .pane-list .rows:not(.fold-b .rows, .menu .rows, .dash-block .rows, .ops-locs) .row.is-open,
html[data-theme="light"] body.ls-body .ls-shell .pane-list .rows:not(.fold-b .rows, .menu .rows, .dash-block .rows, .ops-locs) .row[aria-current] { background: var(--surface-3); }
html[data-theme="light"] body.ls-body .acard, html[data-theme="light"] body.ls-body .acard:hover { box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 10px 28px -18px rgba(0, 0, 0, .28); }
html[data-theme="light"] body.ls-body .ls-shell .pane-list .rows:not(.fold-b .rows, .menu .rows, .dash-block .rows, .ops-locs) { box-shadow: 0 1px 0 rgba(0, 0, 0, .05), 0 16px 40px -28px rgba(0, 0, 0, .3); }
html[data-theme] body.ls-body .rows .row.is-unread .row-name::after { box-shadow: none; }
html[data-theme="dark"] body.ls-body .state-ic { box-shadow: none; }
html[data-theme="dark"] body.ls-body .ops-rows .row[aria-current], html[data-theme="dark"] body.ls-body .ops-rows .row.is-open { box-shadow: inset 3px 0 0 var(--accent); }
