.hybrid-only { display:none !important; }
body.bob-shell .hybrid-only { display:flex !important; }
/* The Command Center section (heading, Overview, favorites) stacks. As a plain flex row it
   squeezed into three narrow columns in the Classic layout (2026-10-09 click-through audit). */
body.bob-shell #hybrid-nav { flex-direction:column; align-items:stretch; }
body.bob-shell { --sidebar-w:232px; }
body.bob-shell .sidebar-header { padding-block:14px; }
/* The Monday Ops Meeting / New Call buttons stay visible in this shell (Bob, 2026-10-05: "its missing"). */
body.bob-shell .nav-label { color:#b8cae0; }
body.bob-shell .nav-item { position:relative; padding-right:34px; }
/* Quote Status and Quick Quote Status show under Reports in this shell too; the combined Quotes item that stood in for them left the menu (Bob, 2026-10-05). */
.hybrid-star { display:none; position:absolute; right:4px; top:50%; transform:translateY(-50%); width:28px; height:28px; border:0; background:transparent; color:#bcd0e6; border-radius:6px; cursor:pointer; font-size:17px; }
/* Stars show only while picking favorites (Bob, 2026-10-09: "I dont want them always
   showing"): no hover reveal, no always-on filled star. body.fav-picking is set by the Edit
   button below (desktop) or the phone Favorites sheet's "Add from menu" (hybrid-command-center.js). */
body.bob-shell.fav-picking .sidebar-nav .nav-item .hybrid-star { display:block; }
body.bob-shell #hybrid-nav > .nav-label { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.hybrid-fav-edit { flex:0 0 auto; min-height:24px; padding:2px 10px; border:1px solid rgba(255,255,255,.35); border-radius:6px; background:transparent; color:#fff; font:600 11px/1.2 'Segoe UI', Arial, sans-serif; letter-spacing:normal; text-transform:none; cursor:pointer; }
.hybrid-fav-edit:hover { background:rgba(255,255,255,.12); }
body.fav-picking .hybrid-fav-edit { background:#fff; color:#003D79; border-color:#fff; }
.hybrid-fav-edit:focus-visible { outline:2px solid #fff; outline-offset:2px; }
/* A touch screen wide enough to keep the docked menu (past 1024px) gets a 44px Edit (Qwen review 2026-10-09). */
@media (pointer: coarse) { .hybrid-fav-edit { min-height:44px; min-width:44px; } }
.hybrid-star:hover { color:#fff; background:rgba(255,255,255,.12); }
#hybrid-favorites-list { display:flex; flex-direction:column; gap:2px; }
#hybrid-favorites-list .nav-item { width:100%; border:0; text-align:left; background:transparent; }
.hybrid-top-action { border:1px solid var(--border); border-radius:7px; background:var(--surface, #fff); color:var(--link, var(--accent)); padding:7px 10px; font:inherit; font-weight:700; cursor:pointer; }
.hybrid-top-action:hover { border-color:var(--link, var(--accent)); background:var(--ctl-hover, #f0f6fc); }
.hybrid-popover { position:absolute; right:18px; top:50px; z-index:950; width:310px; padding:16px; border:1px solid var(--border); border-radius:12px; background:var(--surface, #fff); box-shadow:0 16px 42px rgba(10,35,72,.22); display:block; }
.hybrid-popover[hidden] { display:none !important; }
.hybrid-popover h2 { font-size:15px; margin-bottom:12px; }
.hybrid-pref-row { display:grid; grid-template-columns:1fr 140px; gap:12px; align-items:center; margin:10px 0; }
.hybrid-pref-row label { font-size:13px; font-weight:600; }
.hybrid-pref-row select { width:100%; padding:7px; border:1px solid var(--border); border-radius:7px; background:var(--surface, #fff); color:var(--text); }
.hybrid-home { padding:24px; overflow:auto; height:100%; }
.hybrid-hero { border-radius:16px; padding:22px; background:linear-gradient(135deg,#003d79,#075b9f); color:#fff; box-shadow:0 12px 30px rgba(0,61,121,.2); }
.hybrid-hero-kicker { text-transform:uppercase; letter-spacing:.14em; font-size:11px; color:#b9d5ef; font-weight:800; }
.hybrid-hero h1 { margin-top:6px; font-size:26px; line-height:1.1; }
.hybrid-hero p { margin-top:8px; max-width:720px; color:#e6f1fb; }
.hybrid-home-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-top:16px; }
.hybrid-card { border:1px solid var(--border); border-radius:12px; background:#fff; padding:16px; min-height:120px; box-shadow:0 4px 14px rgba(10,35,72,.05); }
.hybrid-card h2 { font-size:14px; color:var(--accent); margin-bottom:8px; }
.hybrid-card p { color:var(--muted); font-size:13px; line-height:1.45; }
.hybrid-card-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:12px; }
.hybrid-card-actions button { border:1px solid #bfd0e2; border-radius:7px; padding:7px 9px; background:#f8fbfe; color:#003d79; font-weight:700; cursor:pointer; }
.hybrid-search-wrap { position:relative; align-items:center; min-width:310px; }
.hybrid-search-wrap input { width:100%; border:1px solid var(--border); border-radius:8px; padding:8px 54px 8px 34px; background:var(--ctl-soft, #f8fafc); color:var(--text); }
.hybrid-search-wrap::before { content:'⌕'; position:absolute; left:11px; top:5px; color:var(--muted); font-size:20px; z-index:1; }
.hybrid-search-wrap kbd { position:absolute; right:8px; top:7px; border:1px solid var(--kbd-line, #cbd5e1); border-radius:4px; padding:1px 5px; background:var(--surface, #fff); color:var(--kbd-ink, #64748b); font-size:10px; }
.hybrid-search-results { position:absolute; top:40px; left:0; right:0; z-index:980; max-height:360px; overflow:auto; border:1px solid var(--border); border-radius:10px; background:var(--surface, #fff); box-shadow:0 14px 36px rgba(10,35,72,.22); padding:6px; }
.hybrid-search-result { display:block; width:100%; border:0; border-radius:7px; background:var(--surface, #fff); color:var(--text); padding:9px; text-align:left; cursor:pointer; }
.hybrid-search-result:hover,.hybrid-search-result:focus-visible { background:var(--result-hover, #eaf3fb); outline:0; }
.hybrid-search-result small { display:block; color:var(--muted); margin-top:2px; }
.hybrid-home-tools { display:grid; grid-template-columns:2fr 1fr; gap:14px; margin-top:16px; }
.hybrid-job-hub { display:flex; gap:8px; flex-wrap:wrap; }
.hybrid-job-hub input { flex:1; min-width:180px; border:1px solid var(--border); border-radius:8px; padding:9px; }
.hybrid-job-hub button { border:1px solid #bfd0e2; border-radius:7px; padding:7px 9px; background:#f8fbfe; color:#003d79; cursor:pointer; }
.hybrid-crew-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(155px,1fr)); gap:8px; }
.hybrid-crew { border:1px solid #d3dfeb; border-radius:9px; background:#f8fbfe; color:var(--text); padding:10px; text-align:left; cursor:pointer; }
.hybrid-crew strong,.hybrid-crew span { display:block; }
.hybrid-crew span { color:var(--muted); font-size:12px; margin-top:3px; }
.hybrid-crew-stale { grid-column:1/-1; background:#FCEBD4; color:#7A4A0B; border-radius:8px; padding:8px 10px; font-size:13px; font-weight:600; }
.hybrid-saved-list { display:flex; flex-wrap:wrap; gap:7px; }
.hybrid-saved { border:1px solid #bfd0e2; background:#fff; color:#003d79; border-radius:999px; padding:6px 10px; cursor:pointer; }
.hybrid-save-view { margin-left:auto; border:1px solid #bfd0e2; border-radius:7px; background:#fff; color:#003d79; padding:6px 9px; cursor:pointer; }
.hybrid-job-more { border:1px solid #b9cbe0; border-radius:7px; background:#fff; color:#003d79; padding:6px 8px; font-weight:700; }
.hybrid-swo-search { min-width:220px; }
.hybrid-ar-sales { border:0; background:transparent; color:#003d79; font:inherit; font-weight:800; text-decoration:underline; cursor:pointer; }
.hybrid-loading { position:absolute; inset:56px 0 0; z-index:880; display:flex; align-items:center; justify-content:center; background:var(--loading-veil, rgba(245,247,250,.86)); color:var(--link, #003d79); font-weight:800; }
.hybrid-recovery { position:fixed; right:18px; bottom:18px; z-index:1000; max-width:380px; border:1px solid #e1b2ba; border-radius:10px; background:#fff5f6; color:#711527; padding:13px; box-shadow:0 12px 30px rgba(65,10,18,.16); }
.hybrid-recovery button { margin-top:8px; border:0; border-radius:6px; background:#003d79; color:#fff; padding:7px 10px; font-weight:700; cursor:pointer; }
.quotes-workspace { height:100%; display:grid; grid-template-rows:auto 1fr; }
.quotes-tabs { display:flex; gap:6px; padding:8px 12px; border-bottom:1px solid var(--border); background:var(--ctl-soft, #f8fafc); }
.quotes-tabs button { border:1px solid var(--tab-line, #b9cbe0); border-radius:8px; padding:8px 12px; background:var(--surface, #fff); color:var(--link, #003d79); font-weight:800; cursor:pointer; }
.quotes-tabs button[aria-selected="true"] { background:#003d79; color:#fff; }
.quotes-workspace iframe { width:100%; height:100%; border:0; }
.photos-context-picker { align-items:center; gap:5px; }
.photos-context-picker select,.photos-context-picker input,.photos-context-picker button { min-height:32px; border:1px solid #cbd5e1; border-radius:6px; background:#fff; padding:5px 7px; }
.photos-context-picker input { width:105px; }
/* Touch screens: the Photos context picker is a row of real controls, each at least 44 px
   (2026-10-09 click-through audit measured 32 px). */
@media (pointer: coarse) {
  .photos-context-picker select, .photos-context-picker input, .photos-context-picker button { min-height:44px; }
  /* 16px or Android/iOS zoom the page when the field is tapped (2026-10-15 Hal audit). */
  .photos-context-picker select, .photos-context-picker input { font-size:16px; }
  .photos-context-picker button { min-width:44px; }
}
html.nw-embedded body .sidebar,html.nw-embedded body .topbar,html.nw-embedded body .nav-fab,html.nw-embedded body .zoom-fab,html.nw-embedded body .hamburger,html.nw-embedded body .nwbot-fab { display:none !important; }
html.nw-embedded body .shell,html.nw-embedded body .main { width:100%; height:100%; }
@media (max-width:900px) { .hybrid-home-grid { grid-template-columns:1fr 1fr; } }
@media (max-width:700px), (pointer: coarse) and (max-width: 1024px) { .hybrid-search-wrap { min-width:0; flex:1; } .hybrid-search-wrap kbd { display:none; } .hybrid-home-tools { grid-template-columns:1fr; } }
@media (max-width:600px) { .hybrid-home { padding:14px; } .hybrid-home-grid { grid-template-columns:1fr; } .hybrid-popover { position:fixed; top:12px; left:12px; right:12px; width:auto; } }

/* Fold and touch-shell controls. The drawer itself stays width-bound; on a
   wider Fold this FAB toggles the persisted dock and never invokes the modal
   drawer. The primary coarse pointer keeps this touch-only so a narrow desktop
   with a mouse retains its existing topbar collapse control. */
@media (min-width:701px) and (max-width:1180px) and (pointer:coarse) {
  html:not(.nw-embedded) body .shell .nav-fab { display:flex !important; visibility:visible; opacity:1; pointer-events:auto; left:calc(var(--sidebar-w) + 16px); }
  html:not(.nw-embedded) body .shell.nav-collapsed .nav-fab { left:16px; }
}
/* Fold 7 open with the menu docked (S22/Fold 7 walkthrough 2026-10-07): about 520px
   was left for the top bar, the 310px search kept its width, the page title wrapped
   to three lines cut off at the top and Display ran off the right edge. The search
   gives way instead and the title stays on one line. */
@media (max-width:1180px) and (pointer:coarse) {
  .topbar .hybrid-search-wrap { min-width:0; flex:1 1 160px; }
  .topbar .hybrid-search-wrap kbd { display:none; }
  .topbar .topbar-spacer { flex:0 0 0; }
  .topbar .topbar-left { min-width:0; flex:0 1 auto; overflow:hidden; }
  .topbar .topbar-left > * { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
}
#nwbotFab { position:fixed; right:22px; bottom:22px; z-index:900; width:56px; height:56px; padding:0; border-radius:50%; border:0; cursor:pointer; background:#003D79; color:#fff; font-weight:800; font-size:.78rem; line-height:1.1; box-shadow:0 6px 20px rgba(10,35,72,.35); }
@media (max-width:1180px) and (pointer:coarse) {
  #nwbotFab { right:calc(16px + env(safe-area-inset-right,0px)); bottom:calc(22px + env(safe-area-inset-bottom,0px)); width:88px; height:88px; font-size:1.08rem; }
  #nwbotPop { right:calc(16px + env(safe-area-inset-right,0px)) !important; bottom:calc(122px + env(safe-area-inset-bottom,0px)) !important; width:min(420px,calc(100vw - 32px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px))) !important; height:min(560px,calc(100vh - 164px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))) !important; }
  html:not(.nw-embedded) body.native-report-active #nwbotPop { bottom:calc(208px + env(safe-area-inset-bottom,0px)) !important; height:min(560px,calc(100vh - 220px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))) !important; }
}

/* ── Touch screens wider than a phone: the Fold 7 opened (750-984px) gets bigger glyphs ──
   Bob 2026-10-09 (tiny-text root cause, 2026-10-08). The Fold's inner screen draws a CSS px
   at 2.0-2.625 device px on a 368 ppi panel, so the shell's absolute-px text (14px body,
   16px / 18px phone cards, 12.5px / 10px desktop tables) is 12-23% smaller on glass than on
   the S22, and nothing in the page scales with width or density (autosizing is off:
   width=device-width). `zoom` is the one rule that reaches every absolute-px component
   without editing them. Coarse pointer AND wider than the phone bound only: phones
   (<= 700px) keep their tuned sizes and a mouse-driven window of any width is untouched.
   Capped at the phone bound (1024px) too, so a layout is either phone + zoomed or desktop +
   unzoomed: the wider docked touch layout (1025px+, tests/fold_controls_check.mjs) is unchanged.
   On the CONTENT COLUMN (.main), not html/body: Chrome multiplies viewport units by the
   zoom, so a page-wide zoom made .shell (100vw x 100dvh), the drawer (100dvh), the NWBot
   popup, the Favorites sheet and the Display popover (all vw/vh-sized) overflow the screen
   by 15% (measured: scrollWidth 1057 in a 919px viewport, drawer 952px tall in 828px).
   .main holds every report, board and form; the fixed overlays and the dock bar are body
   children with their own 16px / 44px phone sizing. The framed boards and forms
   (quickquotes, addlwork, the TSA forms) inherit the zoom through their <iframe> — Chrome
   lays a frame out at its element's CSS px and scales it with the element — so they carry
   no zoom rule of their own (a second one would compound to 1.32). */
:root { --nw-touch-zoom: 1; }
@media (pointer: coarse) and (min-width: 701px) and (max-width: 1024px) { :root { --nw-touch-zoom: 1.15; } body .shell > .main { zoom: var(--nw-touch-zoom); } }

/* ══════════════════════════════════════════════════════════════════════════
   PHONE SHELL PASS — 2026-09-14 mobile audit (audit/shell-mobile-20260914)

   Shell-wide, NOT hybrid-specific. These live here because index.html carries
   a hard <1000-line guard (currently 998, asserted by
   tests/dashboard_shell_modules_check.js) and this stylesheet is already
   loaded unconditionally, already in gate.js ALLOW_EXACT, and already the home
   of the shell-wide .sidebar / .nav-fab / #nwbotFab responsive rules above.

   ⚠ EVERY selector below is prefixed `body ` on purpose. This file is linked
   at index.html:15 and the shell's own <style> opens at :20, so for EQUAL
   specificity the inline block always wins and a rule written as plain
   `.sidebar { … }` here silently does nothing. That was measured, not
   assumed — the first draft of this block changed zero pixels.

   Nothing here is scoped to body.bob-shell; it must work for ordinary staff.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 1. The drawer's nav had nowhere to live ───────────────────────────────
   Measured on origin/main @16c4cec0, 27-item staff account, drawer open:

     chrome ABOVE .sidebar-nav  278px  (header 101 + user 49 + meet buttons 114)
     chrome BELOW .sidebar-nav  179px  (close 44 + footer 125)
     nav content                1746px

   That 457px is viewport-independent, so the shorter the phone the worse it
   gets. Nav window / items visible / screens of scrolling, measured:

     320x568   111px    1 of 27    15.7 screens
     360x640   183px    2 of 27     9.5 screens
     414x736   279px    3 of 27     6.3 screens
     390x844   387px    5 of 27     4.5 screens

   Photos sat 762px down that window — ~2 nav-screens, which is Bob's "3
   scrolls deep in the menu". "Clipping at both ends" is the same fact: a
   scroll box squeezed between two fixed stacks.

   Two changes. Scroll the WHOLE drawer as one, so the header/user/meet block
   scrolls away instead of permanently costing the list 278px; and put the
   chrome on a diet. Sign Out / Change Password are made sticky so "scrolls
   away" never becomes "unreachable" — the Close menu button rides with the
   content because the overlay tap and the ☰ FAB both still dismiss the
   drawer. */
@media (max-width: 700px), (pointer: coarse) and (max-width: 1024px) {
  /* 286px was 89.4% of a 320px screen. Track the viewport, with the old value
     as a ceiling so no phone gets a WIDER drawer than it has today. */
  body .sidebar { width: min(286px, 82vw); }

  body .sidebar { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  body .sidebar-nav { flex: 0 0 auto; overflow-y: visible; }
  body .sidebar-footer { position: sticky; bottom: 0; z-index: 2; background: var(--sidebar-bg); }

  body .sidebar-header { padding: 12px 14px 10px; }
  body .sidebar-title { font-size: 16px; }
  body .sidebar-user { padding: 7px 14px; font-size: 13px; }
  body .sidebar-meet-btns { margin: 8px 12px 2px; }
  body .sidebar-meet-btn { min-height: 44px; }
  body .sidebar-meet-btn.ops { min-height: 46px; font-size: 15px; }
  body .sidebar-footer { padding: 8px 14px; }

  /* The list itself is the other half of "Photos is 3 scrolls deep", and it is
     the half Bob was looking at when he said the nav is "so obnoxiously big on
     it its ridiculous": at (pointer:coarse) index.html sets .nav-item to 18px
     text with 15px block padding, i.e. 54px per row, and 27-36 rows is
     1746-2313px of list no matter how much chrome sits above it. 16px/11px
     lands each row at 44px - still on the tap-target floor for a gloved hand,
     ~10px per row cheaper, and the section gaps give back another ~50px. */
  html body .sidebar-nav .nav-item { font-size: calc(16px * var(--nw-text-scale, 1)); padding: 11px 12px; min-height: 44px; }
  body .sidebar-nav .nav-section { margin-bottom: 10px; }
  body .sidebar-nav { padding: 8px 8px 4px; }
}

/* ── 2. The Photos workspace bar pushed its own status off the screen ──────
   .photos-workspace-bar is a nowrap flex row and .photos-workspace-status
   carries min-width:110px, so the right-hand span is laid out past the
   viewport and .iframe-viewer-wrap{overflow:hidden} eats it — there is no
   scroller to recover it. Measured on origin/main with #photos-auth-label
   forced to its ERROR state (the one PHOTOS-MOBILE.md says must stay
   visible), #photos-status-label's right edge is 437.7px at every width:

     320px   117.7px off-screen — entirely invisible
     360px    77.7px off-screen
     390px    47.7px off-screen
     430px     7.7px off-screen

   Note #photos-status-label never receives a data-state attribute (only
   #photos-auth-label does, in updatePhotosAuthLabel), so the
   [data-state="ok"] / [data-state="pending"] hide rules in index.html never
   apply to it and it is permanently present. Two changes: stamp that label
   in the status handler (see dashboard-shell-route-view.js) so it hides while
   healthy, and let both labels shrink and ellipsize instead of overflowing.
   The tabs keep their existing shrink behaviour. */
@media (max-width: 700px), (pointer: coarse) and (max-width: 1024px) {
  body .photos-workspace-bar { flex-wrap: wrap; row-gap: 4px; }
  body .photos-workspace-status {
    flex: 0 1 auto; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  /* The bobShell context picker is 408px wide on its own, so it always takes a
     second row. Trim it to fit one: the visible "Context" word is redundant
     next to a select whose options are Job / SO / Customer, and the number
     field does not need 105px. PHOTOS-MOBILE.md's chrome budget is why this is
     worth the two extra rules — before this pass the picker was simply laid
     out past the right edge and its Use / Clear buttons could not be tapped
     at all. */
  body .photos-context-picker { flex-wrap: wrap; gap: 4px; min-width: 0; }
  body .photos-context-picker > label[for="photos-context-kind"] { display: none; }
  body .photos-context-picker input { width: auto; flex: 1 1 64px; min-width: 56px; }
  body .photos-context-picker select { min-width: 0; }
}

/* ── 3. Admin → Users: the last two columns were unreachable ───────────────
   .admin-section{overflow:hidden} clips .admin-table, and .content-area then
   has nothing left to scroll. Measured at 390px: the table is 530px wide
   inside a 340px section, .content-area scrollWidth === clientWidth, and the
   last cell (the "Set…" / "Reset" password buttons) sits at x=410..555 — 165px
   past the viewport with no touch-scrollable ancestor. At 320px it is 235px
   past. Give the section its own horizontal scroller; vertical stays clipped
   so the rounded corners still clip. */
@media (max-width: 900px) {
  body .admin-section { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
}

/* ── 4. Login controls were all under 44px ─────────────────────────────────
   Measured at 320px and 390px on the sign-in screen: username/password inputs
   37px tall, Sign In 39px, the "Remember me" checkbox 16x16, "Forgot
   password?" 16px tall. Technicians wear gloves. 16px input text also stops
   iOS zooming the viewport on focus, which is its own small mobile bug.
   #login-remember needs !important: its 16px size is an inline style
   attribute in index.html, which no stylesheet rule can outrank otherwise. */
@media (pointer: coarse) {
  body .login-field input { min-height: 48px; padding: 12px; font-size: 16px; }
  body .login-btn { min-height: 48px; padding: 14px; font-size: 16px; }
  body #login-remember { width: 24px !important; height: 24px !important; }
  body #forget-device-row a, body .login-box a { display: inline-block; min-height: 44px; padding: 14px 8px; }
}

/* ── 5. Command Center home / topbar controls were 19-35px, in Arial ───────
   These controls declare padding and colour but never a font, so they fall
   back to the UA's `font: 400 13.333px Arial` instead of the shell's 14px
   Segoe UI — measured 13.3333px on every one of them — and the short ones
   end up 19-35px tall. Measured at 320px and 390px on panel-command:
   "Photos" 45.5x19, "Quotes" 47x19, "Job report" 64x19, the Service
   Board / Construction / Jobs / AR Aging / Copy Ops Briefing buttons 31px,
   and #hybrid-job-input 35px. `font: inherit` puts them back on the shell's
   font; the coarse-pointer floor makes them tappable with a glove.

   NOTE the `font: inherit` block is deliberately NOT inside a media query --
   an Arial control in a Segoe UI shell is wrong at every width, and desktop
   was re-measured after this change (1440 / 1024 / 800: no new overflow, the
   Command Center buttons go 13.333px Arial/31px tall -> 14px Segoe UI/35px).
   Only the 44px floor is coarse-pointer-only. */
.hybrid-card-actions button, .hybrid-job-hub input, .hybrid-job-hub button, .hybrid-job-more,
.hybrid-crew, .hybrid-saved, .hybrid-save-view, .hybrid-search-result,
.hybrid-search-wrap input, .hybrid-pref-row select, .quotes-tabs button,
.hybrid-recovery button { font: inherit; }
.hybrid-card-actions button, .hybrid-job-hub button, .hybrid-job-more, .hybrid-saved,
.hybrid-save-view, .quotes-tabs button { font-weight: 700; }
@media (pointer: coarse) {
  body .hybrid-card-actions button, body .hybrid-job-hub input, body .hybrid-job-hub button, body .hybrid-job-more,
  body .hybrid-crew, body .hybrid-saved, body .hybrid-save-view,
  body .hybrid-search-wrap input, body .hybrid-pref-row select,
  body .quotes-tabs button, body .hybrid-top-action, body .hybrid-recovery button {
    min-height: 44px; padding-block: 10px;
  }
  /* 16px stops iOS zooming the viewport when either search field takes focus. */
  body .hybrid-search-wrap input, body .hybrid-job-hub input { font-size: 16px; }
}

/* Parts: once the signed connection is up, the "Parts — warehouse parts board" bar is a
   second title under a topbar that already says "Parts" (Bob, 2026-10-15: "things are too
   big when we open parts"). Hide it then; pending and failed states still show. A phone
   has no topbar, so there the bar stays as the pane's title and only "active" goes. The
   media query is the complement of the shell's drawer query (index.html, framed-board.js). */
#parts-auth-label[data-state="authenticated"] { display: none; }
@media (min-width: 1025px), (min-width: 701px) and (not (pointer: coarse)) {
  #panel-partsintake .ss-fallback-bar:has(#parts-auth-label[data-state="authenticated"]) { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   PHONE REPORT CARDS — 2026-09-19 mobile-chrome slice 4

   Shell-wide, not hybrid-specific (same reason as the pass above: index.html is
   at its 1000-line guard). Under the shell's phone query (<= 700px, or a coarse
   pointer up to 1024px wide since 2026-10-09 — never a bare pointer:coarse, so a
   touch screen past 1024px keeps its tables) — every Jobs / AR / Inspections /
   SWO report table becomes a stack of cards: each <tr> is a card, each cell
   shows its column header as a caption. Everything here keys on
   table[data-cards], which labelReportTables() in shared/dashboard-report-views.js
   sets on the report tables it captioned (from each table's own <thead>); the
   chart data tables mk() builds under details.chart-data-alternative are never
   marked and stay tables. A cell that spans columns (totals, the expander detail
   row that holds a nested table) carries data-span and renders full width.
   Sortable tables keep their <thead> as a row of tap chips — only the sortable
   headers (data-jobs-sort-key / data-sort-key); a plain header in that row is
   hidden — so click-any-column sort still works on a phone; every other <thead>
   is clipped (the captions carry the headers).
   Specificity: index.html styles these tables with .gfx .dtable td (0,2,1),
   .gfx .dtable td.num (0,3,1), .gfx .ptable tbody tr:nth-child(even) td (0,3,3),
   .gfx .ptable tr.tot td (0,3,2), .gfx .dtable tr:hover td (0,3,2). The layout
   rules below are (0,2,n) with `body .gfx table[data-cards]`; the ones that must
   beat a (0,3,n) rule carry the .dtable / .ptable class as well. */
@media (max-width: 700px), (pointer: coarse) and (max-width: 1024px) {
  body .gfx div.tscroll { overflow: visible; max-height: none; }
  body .gfx table[data-cards] { display: block; width: 100%; border-collapse: separate; }
  body .gfx table[data-cards] > thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  body .gfx table[data-cards][data-sortable] > thead { position: static; width: auto; height: auto; margin: 0 0 10px; overflow: visible; clip: auto; white-space: normal; }
  body .gfx table[data-cards][data-sortable] > thead > tr { display: flex; flex-wrap: wrap; gap: 8px; }
  body .gfx table[data-cards][data-sortable] > thead > tr > th { display: none; }   /* a plain header in a sortable row (Billed on Completed, Datasheet) would be a chip that does nothing */
  /* Chip (0,4,5) beats index.html's .gfx .ptable th sticky/dark rule (0,2,1); the active
     state below is the same (0,4,5) and wins by source order — do not add a class here. */
  body .gfx table[data-cards][data-sortable] > thead > tr > th[data-jobs-sort-key], body .gfx table[data-cards][data-sortable] > thead > tr > th[data-sort-key] {
    display: inline-flex; align-items: center; position: static; min-height: 40px; padding: 6px 12px; border: 1px solid var(--border, #d5deea); border-radius: 999px;
    background: #fff; color: var(--navy, #003D79); font-size: 13px; font-weight: 800; letter-spacing: .02em; text-transform: none;
  }
  body .gfx table[data-cards][data-sortable] > thead > tr > th[aria-sort="ascending"], body .gfx table[data-cards][data-sortable] > thead > tr > th[aria-sort="descending"] { background: var(--navy, #003D79); color: #fff; border-color: var(--navy, #003D79); }
  body .gfx table[data-cards] > tbody { display: grid; gap: 10px; }
  body .gfx table[data-cards] > tbody > tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; min-width: 0; padding: 12px 14px; border: 1px solid var(--border, #d5deea); border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(10, 35, 72, .06); }
  body .gfx table[data-cards] > tbody > tr[hidden] { display: none; }   /* display:grid above would otherwise defeat the `hidden` attribute on expander detail rows */
  body .gfx table[data-cards] > tbody > tr > td { display: block; min-width: 0; padding: 0; border: 0; text-align: left; overflow-wrap: anywhere; font-size: 16px; }
  body .gfx table[data-cards] > tbody > tr > td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #5A6B82); }
  body .gfx table[data-cards] > tbody > tr > td:first-child { grid-column: 1 / -1; font-size: 18px; font-weight: 800; }   /* job # / account / SO # / tech: the card title */
  body .gfx table[data-cards] > tbody > tr > td:first-child::before { display: none; }   /* the title needs no caption — and a totals row ("KNOWN TOTALS", "TOTAL") must not wear the first column's header (Grok) */
  body .gfx table[data-cards] > tbody > tr > td[data-span] { grid-column: 1 / -1; }
  body .gfx table[data-cards] > tbody > tr > td[data-span] > table { margin: 0; }   /* the expander's nested table: its own stack of cards, tighter */
  body .gfx table[data-cards] > tbody > tr > td[data-span] > table > tbody > tr { padding: 10px 12px; background: var(--surface-2, #F4F7FB); box-shadow: none; }
  body .gfx table[data-cards] > tbody > tr[onclick] { cursor: pointer; }
  /* index.html rules at (0,3,n) that would paint the cells inside a card: right-aligned
     numbers, the inspections even-row stripe, the navy totals row, and the hover tint. */
  body .gfx table.dtable[data-cards] > tbody > tr > td.num, body .gfx table.ptable[data-cards] > tbody > tr > td.num { text-align: left; }
  body .gfx table.ptable[data-cards] > tbody > tr:nth-child(even) > td, body .gfx table.ptable[data-cards] > tbody > tr:hover > td, body .gfx table.dtable[data-cards] > tbody > tr:hover > td { background: transparent; }
  body .gfx table.ptable[data-cards] > tbody > tr.tot, body .gfx table.dtable[data-cards] > tbody > tr.tot { background: var(--navy, #003D79); border-color: var(--navy, #003D79); }
  body .gfx table.ptable[data-cards] > tbody > tr.tot > td, body .gfx table.ptable[data-cards] > tbody > tr.tot:hover > td, body .gfx table.dtable[data-cards] > tbody > tr.tot > td { background: transparent; color: #fff; }
  body .gfx table.ptable[data-cards] > tbody > tr.tot > td[data-label]::before, body .gfx table.dtable[data-cards] > tbody > tr.tot > td[data-label]::before { color: #C5D5E8; }
  /* Billing Status hover card: 296px wide, absolutely positioned in a chart box that is
     ~340px on a phone. Never wider than the box (jobTipHandler clamps x to the box). */
  body .gfx .jtip { max-width: calc(100% - 8px); }
}


/* ══ Compact Photos context picker; keep the root shell within its size budget. */
  .photos-context-menu { position:relative; flex:0 0 auto; }
  .photos-context-menu > summary { display:flex; align-items:center; min-height:44px; padding:0 8px; border:1px solid var(--line); border-radius:6px; color:var(--nw-navy-bright, #004a8f); font-size:13px; font-weight:600; cursor:pointer; list-style:none; }
  .photos-context-menu > summary::after { content:' ▾'; margin-left:4px; }
  .photos-context-menu[open] .photos-context-picker { position:absolute; top:100%; left:0; z-index:30; width:min(420px, calc(100vw - 24px)); box-sizing:border-box; padding:8px; background:#fff; border:1px solid var(--line); border-radius:6px; box-shadow:0 3px 12px #0002; display:flex; flex-wrap:wrap; }
  @media (max-width:700px) {
    body #panel-sightshot .photos-workspace-bar { gap:4px; padding-top:4px; padding-bottom:4px; }
    body #panel-sightshot .photos-workspace-tabs { gap:4px; min-width:0; }
    body #panel-sightshot .photos-workspace-tab { padding:3px 7px; font-size:13px; line-height:16px; }
    .photos-context-menu > summary { padding:0 5px; font-size:12px; }
    .photos-context-menu[open] .photos-context-picker { position:fixed; top:56px; left:10px; right:10px; width:auto; }
  }

/* ══════════════════════════════════════════════════════════════════════════
   DESKTOP ICON RAIL — 2026-09-19 mobile-chrome slice 5

   Shell-wide, not hybrid-specific (index.html is at its 1000-line guard). On a
   FINE-pointer layout wider than 700px (mouse / trackpad), a collapsed sidebar
   is a 56px rail of the .nav-icon badges with hover titles instead of a 0px gap.
   Coarse-pointer docks (Fold / iPad touch) keep index.html's 0px collapse and
   their recovery FAB (hybrid-command-center.css above, pointer:coarse) — nothing
   here matches them; phones never collapse. `body .shell.nav-collapsed .sidebar`
   (0,3,1) outranks index.html:150 (0,2,1). The label text of every nav item is a
   bare text node that dashboard-shell-route-view.js wraps in span.nav-text at
   boot (favorites already carry a label span); the rail CLIPS those spans rather
   than hiding them, so the item's accessible name stays "Service Board", not
   "SB". Sign out / change password live behind the chevron while collapsed. */
@media (min-width: 701px) and (pointer: fine) {
  body .shell.nav-collapsed .sidebar { width: 56px; border-right-width: 1px; }
  body .shell.nav-collapsed .sidebar-header, body .shell.nav-collapsed .sidebar-user, body .shell.nav-collapsed .sidebar-meet-btns,
  body .shell.nav-collapsed .nav-label, body .shell.nav-collapsed .sidebar-footer, body .shell.nav-collapsed .hybrid-star { display: none; }
  body .shell.nav-collapsed .sidebar-nav { padding: 12px 0; overflow-x: hidden; }
  body .shell.nav-collapsed .nav-section { margin-bottom: 12px; }
  body .shell.nav-collapsed .nav-item, body.bob-shell .shell.nav-collapsed .nav-item { display: flex; flex: 0 0 auto; gap: 0; padding: 0; width: 40px; height: 40px; margin: 2px auto; justify-content: center; align-items: center; border-radius: 8px; position: relative; }   /* flex:0 0 auto — a tile must not shrink inside a flex section; position — the clipped label's containing block */
  /* Bob's Command Center section (#hybrid-nav: Overview + favorites) is a flex ROW via
     `body.bob-shell .hybrid-only { display:flex !important }`; in the rail it must stack. (Grok) */
  body.bob-shell .shell.nav-collapsed #hybrid-nav { flex-direction: column; align-items: center; }
  body.bob-shell .shell.nav-collapsed #hybrid-favorites-list { width: 100%; align-items: center; }
  body .shell.nav-collapsed .nav-item .nav-icon { display: inline-block; width: auto; font-size: 11px; letter-spacing: .02em; opacity: 1; }
  body .shell.nav-collapsed .nav-item > span:not(.nav-icon) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; pointer-events: none; }
  /* Bob's shell: the picking-favorites rule (0,5,1, near the top) would pop the star onto a
     40px tile; more specific here, so it stays hidden in the rail even while picking. And
     #hybrid-favorites-list .nav-item { width:100% } (1,1,1) needs the id to lose its width. (Grok) */
  body.bob-shell.fav-picking .shell.nav-collapsed .sidebar-nav .nav-item .hybrid-star { display: none; }
  /* The Command Center heading (with its Edit button) is a flex row by an id rule up top; the rail hides it like every label. */
  body.bob-shell .shell.nav-collapsed #hybrid-nav > .nav-label { display: none; }
  body .shell.nav-collapsed #hybrid-favorites-list .nav-item { width: 40px; }
}
