/* Shared workbench refinements. Keep the clinic's established color system and
   leave clinical alarms, procedure states, and station layouts in their modules. */
.skip-work { position: fixed; left: 12px; top: -70px; z-index: 10000; padding: 12px 18px;
  border-radius: var(--r-sm); background: var(--surface); color: var(--primary-ink); border: 2px solid var(--primary); }
.skip-work:focus { top: 10px; }
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--primary); outline-offset: 3px;
}
.workbench-jump { display: inline-flex; align-items: center; gap: 9px; min-height: 36px;
  padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink-soft); font: 500 var(--t-sm) var(--font); white-space: nowrap; }
.workbench-jump:hover { border-color: var(--primary); background: var(--primary-softer); }
.workbench-jump kbd { color: var(--muted); font: inherit; font-size: 11px; padding-left: 10px; }
.topbar { background: var(--surface); backdrop-filter: none; gap: 8px; }
.topbar .icon-btn { flex-shrink: 0; }
.app { grid-template-columns: minmax(0, 1fr); }
.body { min-width: 0; }
.rail-center, .rail-left, .rail-right { min-width: 0; }
.rail-center { box-shadow: none; }
.rail-left { box-shadow: none; border-radius: var(--r-md); }
.rail-left .tab-group { text-transform: none; letter-spacing: 0; font-size: var(--t-xs); }
.tab.active { box-shadow: inset 3px 0 var(--primary); }
.tab .count, .list .meta, .pr-table, .ap-bills-table { font-variant-numeric: tabular-nums; }
.list-head { gap: 10px; padding: 14px 18px; }
.list-head h2 { font-size: 20px; letter-spacing: -.025em; line-height: 1.3; }
.list-head .box-search { min-width: 150px; }
.cat-filter { gap: 6px; padding: 10px 18px; background: var(--surface-2); }
.cat-filter:empty { display: none; }
.cat-filter button { border-radius: var(--r-sm); font-weight: 500; }
.cat-filter button.active { font-weight: 600; }
.list { overscroll-behavior: contain; scrollbar-gutter: stable; }
.list > .msg { border-radius: var(--r-sm); margin-bottom: 2px; padding: 13px 14px;
  border-bottom-color: var(--line); gap: 12px; }
.list > .msg .prev { line-height: 1.5; margin-top: 5px; }
.list > .msg .who { line-height: 1.45; }
.list > .msg .avatar { width: 36px; height: 36px; font-size: var(--t-sm); }
.list > .msg .meta { gap: 5px; line-height: 1.4; }
.list > .msg.overdue, .list > .msg .chip-newpatient { animation: none; }
.list > .msg.selected { border-color: var(--primary); }
.list .empty { gap: 10px; max-width: 520px; margin: 32px auto; line-height: 1.6; }
.empty-title { color: var(--ink); font-weight: 600; font-size: var(--t-md); }
.empty-note { max-width: 52ch; font-size: var(--t-sm); }
.rail-right > .card { box-shadow: none; }
.rail-right #goalCard { order: -1; }
.body.ap-rail-min .rail-restore { box-shadow: none; border-radius: var(--r-sm); }
.rail-restore-label { letter-spacing: 0; }
.cmdk-item { width: 100%; border: 0; border-radius: var(--r-sm); text-align: left;
  background: transparent; color: var(--ink); font: inherit; }
.cmdk-note { padding: 8px 16px; color: var(--muted); font-size: var(--t-xs); border-bottom: 1px solid var(--line); }
.cmdk-item .cmdk-label { white-space: normal; overflow-wrap: anywhere; }
.cmdk-note { line-height: 1.5; }
#cmdkClose { margin-left: 8px; }
#shortcutsClose { margin-top: 16px; }
.cmdk-input { width: 100%; box-sizing: border-box; }
.login-card { box-shadow: var(--sh-2); }
.login-card .field input { min-height: 44px; }
.login-card .err:empty { display: none; }
.uni-tools { gap: 12px; }
.uni-card { border-radius: var(--r-sm); }
.uni-card .uni-desc { line-height: 1.5; }
.pr-card h3 { text-transform: none; letter-spacing: 0; }
.error-state { line-height: 1.6; }

@media (min-width: 761px) and (max-width: 1240px) {
  .topbar .brand-owner, .topbar .hud .xp-wrap, .topbar .hud .streak-pill { display: none; }
  .workbench-jump kbd { display: none; }
  .topbar .role-badge { padding-inline: 8px; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .topbar .hud, .topbar #roleBadge, .topbar #bdayChip { display: none; }
  .workbench-jump .jump-label { display: none; }
  .workbench-jump { width: 38px; justify-content: center; padding: 6px; }
  .topbar #tutorialBtn { font-size: 0; gap: 0; }
}
@media (min-width: 761px) {
  .body { gap: 12px; padding: 12px; }
  .body:not(.left-rail-min) { --rail-w: 240px; }
}
@media (max-width: 760px) {
  .workbench-jump { width: 40px; height: 40px; justify-content: center; padding: 0; flex: 0 0 auto; }
  .workbench-jump .jump-label, .workbench-jump kbd { display: none; }
  .topbar #roleBadge, .topbar #tutorialBtn, .topbar #bdayChip { display: none; }
  .topbar { gap: 6px; }
  .topbar .hud { display: none; }
  .list-head { padding: 12px; }
  .list-head h2 { font-size: 19px; flex: 1 1 130px; min-width: 0; }
  .list-head #composeBtn { order: 1; min-height: 40px; padding: 8px 10px; font-size: 13px; }
  .list-head #inboxModeToggle { order: 2; flex: 1 1 100%; min-width: 0; }
  .list-head #inboxModeToggle button { min-height: 36px; padding-inline: 10px; }
  .list-head #boxSearch { order: 9; flex: 1 1 120px; min-width: 0; max-width: none; margin-left: 0 !important; min-height: 40px; }
  .list-head #boxSort { order: 10; flex: 0 1 128px; min-width: 0; max-width: 45%; margin-left: 0; min-height: 40px; }
  .cat-filter { flex-wrap: nowrap; overflow-x: auto; padding: 8px 12px; }
  .cat-filter > * { flex-shrink: 0; }
  .cat-filter button { min-height: 40px; }
  .cat-filter select { max-width: 75vw; }
  .list > .msg { padding: 12px 10px; gap: 9px; grid-template-columns: 34px minmax(0, 1fr) auto; }
  .list > .msg .avatar { width: 30px; height: 30px; }
  .list > .msg .meta { max-width: 100px; font-size: 11px; }
  .list.select-mode > .msg { grid-template-columns: 24px 30px minmax(0, 1fr) auto; }
  .list .empty { margin: 20px auto; padding: 24px 14px; }
  .cmdk { width: calc(100vw - 24px); max-height: calc(100dvh - 48px); }
  .cmdk-item { min-height: 44px; }
  .uni-tools { flex-wrap: wrap; }
  .uni-field { min-width: 0; flex: 1 1 100%; }
}
@media (max-width: 400px) {
  .topbar { gap: 4px; }
  .topbar .icon-btn, .topbar .workbench-jump { width: 38px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .workbench-jump, .list > .msg, .cmdk-item { transition: none; }
}

/* The cloud's prominent schedule and adaptive Email / Call / Text controls remain primary. */
.docs-outside .skip-work, .docs-outside .workbench-jump { display: none; }
.topbar .brand { flex-shrink: 1; min-width: 0; }
.topbar .sched-btn { flex-shrink: 0; }
.goal-note { font-size: var(--t-sm); line-height: 1.5; color: var(--muted); margin: 10px 0; }
@media (min-width: 761px) and (max-width: 1400px) { .workbench-jump kbd { display: none; } }
@media (max-width: 760px) {
  .topbar .brand-name { font-size: 14px; }
  .topbar #alertsBtn, .topbar #muteBtn { display: none; }
  .topbar .sched-btn { min-width: 0; }
}

@media (max-width: 760px) {
  #list > .admin-workbench { padding: 10px !important; }
  .admin-workbench .card { padding: 14px; margin-inline: 0 !important; }
  .admin-workbench .card h3 { flex-wrap: wrap; }
  .admin-workbench input, .admin-workbench select { max-width: 100%; }
}

/* Search & jump lives at the top of the inbox list (owner 2026-10-20: "the search button should be under the inbox, not
   taking up valuable space on the header"). The top-bar copy (#jumpBtn) stays for phones, which have no inbox list.
   .rail-left .rail-jump outranks the .workbench-jump width rules above, so the label and shortcut keep showing here. */
@media (min-width: 761px) { .topbar #jumpBtn { display: none; } }
.rail-left .rail-jump { display: flex; width: calc(100% - 12px); box-sizing: border-box; margin: 2px 6px 10px; padding: 7px 10px; justify-content: flex-start; }
.rail-left .rail-jump .jump-label { display: inline; flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.rail-left .rail-jump kbd { display: inline; padding-left: 6px; }
/* Folded to the slim strip: keep search as an icon above "Inboxes" (the strip hides every other child). */
.body.left-rail-min:not(:has(.ap-inbox-layout)) .rail-left > .rail-jump.rail-jump {
  display: flex; justify-content: center; width: 100%; margin: 6px 0 0; padding: 8px 0; min-height: 0;
  border: 0; background: transparent; color: var(--muted); }
.body.left-rail-min:not(:has(.ap-inbox-layout)) .rail-left > .rail-jump.rail-jump:hover { color: var(--ink); background: var(--surface-2); }
.body.left-rail-min:not(:has(.ap-inbox-layout)) .rail-left > .rail-jump .jump-label,
.body.left-rail-min:not(:has(.ap-inbox-layout)) .rail-left > .rail-jump kbd { display: none; }
@media (max-width: 760px) { .rail-jump { display: none !important; } }
/* fitQuickActions drops the schedule's hint before it drops the Email / Call / Text words. */
.topbar.qa-nohint .sched-hint { display: none; }
