/* p5-121b (R-1014-01/02) - THE FLEET MAINTENANCE OPERATIONS CENTER grid,
   the Tree Shop COMPUTER VIEW. Token names only (tokens.css + the Office
   look, office.css); no new colour. Glove floors: text >= 18 px, taps >= 44 px.
   900-1399 px: two columns, the rail under the table. 1400 px and wider:
   LEFT 240 / CENTRE / RIGHT 320; at 1920 the centre widens, no card is
   added. Below 900 px nothing here applies: the phone page is as before.
   p5-121h: a PHONE IN LANDSCAPE (740-1023 px wide, at most 500 px tall) also
   gets this block - it only names #tsb parts, which stay hidden until he
   taps "Command center"; the phone-size overrides are in tree-shop-board.css.
   Portrait never matches. */
@media (min-width: 900px), (min-width: 740px) and (max-width: 1023.98px) and (orientation: landscape) and (max-height: 500px) {
  body.tsb-on #tsb { max-width: none; }
  .fmoc-actions { justify-content: flex-end; flex-wrap: nowrap; margin: 8px 0 4px; }
  .fmoc-actions #tsb-asof { margin-right: auto; }
  /* p5-121i (walk YELLOW 10 / 19): ONE header row - the title left, "Samsara
     as of" one line (cut, whole on hover), the four actions TOP RIGHT as the
     primary row, Print and Refresh plain secondary buttons after them */
  .tsb-hdr { flex-wrap: wrap; min-width: 0; }          /* one row from 1400 px (below) */
  .tsb-hdr h1 { white-space: nowrap; }
  .fmoc-hdr-actions { flex: 1 1 auto; min-width: 0; margin: 0; gap: 8px; align-items: center; }
  .fmoc-hdr-actions #tsb-asof { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fmoc-hdr-actions .tsb-btn { flex: 0 0 auto; }
  /* board25: storm-look.css makes every button.primary a full-width block (specificity 0,3,2); in this row each action is content-wide */
  html:not([data-theme="light"]) .fmoc-hdr-actions button.tsb-btn.primary { width: auto; display: inline-flex; font-size: 18px; letter-spacing: 0; padding: 0 10px; }
  .tsb-hdr .tsb-right { margin-left: 0; flex: 0 0 auto; }
  .tsb-hdr .tsb-right .tsb-btn { border-color: var(--c-line); color: var(--c-text-3); font-weight: 600; }
  .fmoc-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
  /* p5-121g: a tile is at most 110 px tall - ONE title line, the number big,
     at most ONE small reason line (cut, never wrapped; whole on hover and,
     on a tap, beside the list's title) - never a third line */
  #tsb, #tsb * { word-break: normal; overflow-wrap: normal; hyphens: none; }   /* no mid-word break anywhere */
  .fmoc-kpi { min-height: 64px; max-height: 110px; padding: 6px 10px; overflow: hidden; justify-content: flex-start; min-width: 0; }
  .fmoc-kpi .fmoc-kpi-name { color: var(--c-text-3); font-weight: 800; letter-spacing: 0; text-transform: none; font-size: 18px;
    line-height: 24px; white-space: nowrap; word-break: normal; overflow-wrap: normal; hyphens: none; }   /* one line, whole words */
  .fmoc-kpi b { font-size: 34px; line-height: 40px; margin: 2px 0 0; white-space: nowrap; }
  .fmoc-kpi b.fmoc-nof { font-size: 20px; color: var(--c-text-3); font-weight: 700; }
  .fmoc-kpi[data-kpi="lift"] b:not(.fmoc-nof) { font-size: 24px; }       /* two numbers: lift · dielectric */
  .fmoc-kpi small { display: block; width: 0; min-width: 100%; color: var(--c-text-2); font-size: 18px; line-height: 24px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* width 0: the reason never widens a tile */
  .fmoc-tile-why { margin-left: 10px; }
  .fmoc-kpi.on { border-color: var(--c-accent); box-shadow: inset 0 0 0 2px var(--c-accent); }
  .fmoc-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; margin-top: 14px; align-items: start; }
  .fmoc-rail { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .fmoc-left { padding: 10px 10px 14px; }
  .fmoc-left #tsb-q { margin-top: 4px; }
  .fmoc-types { display: flex; flex-wrap: wrap; gap: 6px; }
  .fmoc-types .tsb-chip, #fmoc-yards .tsb-chip { padding: 0 10px; }
  /* p5-121i (walk YELLOW 11): one wrapping chip row - a chip is >= 44 px tall
     and only as wide as its word */
  .fmoc-types .tsb-chip { flex: 0 0 auto; width: auto; min-height: 44px; white-space: nowrap; }
  #fmoc-yards { display: flex; flex-wrap: wrap; gap: 6px; }
  .fmoc-select { width: 100%; min-height: 44px; padding: 0 10px; border: 2px solid var(--c-border); border-radius: var(--radius);
    background: var(--c-panel); color: var(--c-text); font: 700 18px var(--font-ui); }
  .fmoc-centre { display: grid; gap: 14px; min-width: 0; }
  .fmoc-map-card { position: relative; }
  .fmoc-map { position: relative; height: 440px; overflow: hidden; border-radius: 10px; background: var(--c-panel); touch-action: none; cursor: grab; }
  .fmoc-tiles img { position: absolute; width: 256px; height: 256px; user-select: none; pointer-events: none; }
  .fmoc-pins { position: absolute; inset: 0; }
  .fmoc-dot { --sc: var(--c-green); position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; padding: 0; border-radius: 50%;
    background: var(--sc); border: 3px solid var(--c-panel-2); cursor: pointer; }
  .fmoc-dot::after { content: ""; position: absolute; inset: -12px; }      /* a 44 px target around the dot */
  .fmoc-st-down { --sc: var(--c-red-text); } .fmoc-st-idle { --sc: var(--c-amber); }
  .fmoc-st-in_work, .fmoc-st-waiting_parts { --sc: var(--c-cyan); } .fmoc-st-working { --sc: var(--c-green); }
  .fmoc-st-no_data { --sc: var(--c-border); }
  .tsb-chip[class*="fmoc-st-"] { border-left: 6px solid var(--sc); }
  .fmoc-tip { position: absolute; z-index: 3; padding: 4px 10px; border-radius: 8px; background: var(--c-panel-2); border: 2px solid var(--c-accent);
    color: var(--c-text); font: 700 18px var(--font-ui); white-space: nowrap; pointer-events: none; }
  .fmoc-zoom { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; z-index: 2; }
  .fmoc-attr { position: absolute; right: 6px; bottom: 2px; margin: 0; padding: 0 6px; background: var(--c-panel); color: var(--c-text-3); font-size: 18px; }
  .fmoc-nopos-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 160px; overflow: auto; }
  /* FT-14 (JD 2026-10-14 10:16 PM): the map card folds to its head line;
     the table below takes the space. The phone never shows the button. */
  .fmoc-map-toggle { margin-left: auto; letter-spacing: normal; }
  #tsb .fmoc-map-toggle[hidden], #tsb .fmoc-map[hidden], #tsb .fmoc-nopos[hidden], body.tsb-phone #tsb .fmoc-map-toggle { display: none; }
  /* p5-121i (walk RED 7 / YELLOW 16): the drawer is FIXED to the right edge
     of the screen, full height under the KPI band (its top is set on open),
     its own scroll, at most 40 % of the width - never off screen, the map
     and the table's scroll stay where they were */
  /* TREESHOP-CC-1e (R-1015-07, JD 9:17 PM CDT 10/15): no longer fixed. The
     card is PAGE CONTENT at the top of the right column (#fmoc-rail), under
     the KPI tiles; at least 320 px, at most the window less the dock, its
     own scroll; the page scrolls down to it on a short window. */
  .fmoc-drawer { position: static; width: min(560px, 40vw); max-width: 40vw; min-height: 320px; max-height: 100vh; overflow: auto;
    overscroll-behavior: contain; background: var(--c-panel-2); border: 2px solid var(--c-accent); border-radius: 14px;
    padding: 8px 18px 16px; box-shadow: none; box-sizing: border-box; grid-column: 1 / -1; }
  .fmoc-dhead { display: flex; align-items: center; gap: 10px; }
  .fmoc-dhead h2 { margin: 8px 0; font-size: 22px; border: 0; padding: 0; }
  .fmoc-dhead button { margin-left: auto; }
  .fmoc-drawer h3 { margin: 14px 0 6px; font-size: 18px; letter-spacing: .1em; text-transform: uppercase; color: var(--c-text-3); }
  .fmoc-dl { display: flex; gap: 10px; margin: 4px 0; font-size: 18px; } .fmoc-dl b { margin-left: auto; text-align: right; }
  .fmoc-li { margin: 4px 0; padding: 6px 10px; border-left: 4px solid var(--c-line); font-size: 18px; }
  .fmoc-mount:empty { display: none; }
  .fmoc-scroll { overflow: auto; max-height: 70vh; }
  .fmoc-table { width: 100%; border-collapse: collapse; font-size: 18px; }
  .fmoc-table th { position: sticky; top: 0; background: var(--c-panel-2); text-align: left; padding: 0; z-index: 1; }
  .fmoc-sort { min-height: 44px; width: 100%; padding: 0 8px; border: 0; border-bottom: 2px solid var(--c-border); background: transparent;
    color: var(--c-text-3); font: 800 18px var(--font-ui); text-align: left; white-space: nowrap; cursor: pointer; }
  .fmoc-sort.on { color: var(--c-accent); border-bottom-color: var(--c-accent); }
  .fmoc-row { --sc: var(--c-green); height: 48px; cursor: pointer; border-bottom: 1px solid var(--c-line); }
  .fmoc-row td { padding: 6px 8px; white-space: nowrap; }
  .fmoc-row td:first-child { border-left: 6px solid var(--sc); font: 700 18px "SF Mono", Menlo, Consolas, monospace; }
  .fmoc-row:hover, .fmoc-row.on { background: var(--c-panel); }
  .fmoc-row.on td:first-child { box-shadow: inset 4px 0 0 var(--c-accent); }
  .fmoc-row .tsb-stw { color: var(--sc); }
  /* p5-121i (walk YELLOW 13): green is WORKING only; PARKED and NO MOVE
     HISTORY are neutral grey (row + its state word) */
  .fmoc-row.tsb-st-down { --sc: var(--c-red-text); } .fmoc-row.tsb-st-idle { --sc: var(--c-amber); }
  .fmoc-row.tsb-st-in_work, .fmoc-row.tsb-st-waiting_parts { --sc: var(--c-cyan); } .fmoc-row.tsb-st-working { --sc: var(--c-green); }
  .fmoc-row.tsb-st-parked, .fmoc-row.tsb-st-no_data { --sc: var(--c-border); }
  .fmoc-row.tsb-st-parked .tsb-stw, .fmoc-row.tsb-st-no_data .tsb-stw { color: var(--c-text-3); }
  /* p5-121i (walk YELLOW 12): the State column at most 140 px, one line */
  .fmoc-table th.fmoc-c-state, .fmoc-row td.fmoc-c-state { width: 140px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fmoc-row td.fmoc-c-state { letter-spacing: 0; }
  .fmoc-row .tsb-nm { margin: 0 0 0 8px; }
  /* p5-121d: the last-seen cell and note show whole ("<age> · <place>"), two lines at most, never clipped */
  .fmoc-row td.fmoc-c-seen { min-width: 15em; white-space: normal; }
  .fmoc-row .fmoc-seen { display: block; min-width: 15em; white-space: normal; }
  /* p5-121d (R-1013-15): NOT SAFE TO OPERATE is a plain red shop-status line in
     the left column, one per unit - not a band, not a strip, not a screen */
  .fmoc-notsafe { display: block; width: 100%; min-height: 44px; margin: 0 0 6px; padding: 6px 8px; border: 0;
    border-left: 4px solid var(--c-red-text); background: transparent; color: var(--c-red-text);
    font: 800 18px var(--font-ui); text-align: left; overflow-wrap: normal; cursor: pointer; }
  .fmoc-wait { display: flex; justify-content: center; padding: 8px 0; }
  .fmoc-wait .pw-hur { width: 56px; height: 56px; background: url(img/hurricane-512.png) center / contain no-repeat;
    animation: pw-hspin 1.2s linear infinite; }      /* page-wait.css's hurricane and keyframes, small */
  .fmoc-rail-mount { min-height: 44px; }
  /* p5-121i (walk YELLOW 15): each rail card at most 360 px, its own scroll */
  #fmoc-rail .fmoc-mount-card { max-height: 360px; overflow: auto; overscroll-behavior: contain; }
  .fr-duehead { margin: 10px 2px 6px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--c-text-3); }
  .fmoc-cols { display: none; }
}
/* p5-121f (R-1014-06a): iPad LANDSCAPE = the command center, never a phone
   stretch. 1024-1399 px serves iPad 9th/10th gen (1080), Air (1180), Pro 11"
   (1194), Pro 12.9" (1366 landscape; 1024 portrait too) and 1024 x 768 iPads.
   LEFT 200 / CENTRE / RIGHT 280, tiles two rows of five, the map stays, the
   drawer is a sheet from the right at most 60 % wide, every tap >= 44 px.
   Portrait 768-834 stays the < 900 phone page; 900-1023 keeps the block above. */
@media (min-width: 1024px) and (max-width: 1399.98px) {
  body.tsb-on { padding: 10px 16px 96px; }
  .fmoc-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .fmoc-kpi { min-height: 84px; padding: 6px 10px; }
  .fmoc-kpi b { font-size: 28px; }
  .fmoc-grid { grid-template-columns: 200px minmax(0, 1fr) 280px; gap: 10px; }
  .fmoc-rail { grid-column: auto; grid-template-columns: 1fr; gap: 10px; }
  .fmoc-map { height: 360px; }
  .fmoc-drawer { width: min(480px, 60vw); max-width: 60vw; }   /* TREESHOP-CC-1e: in the page (above), the right column's width */
  body:not(.tsb-phone) .fmoc-grid.fmoc-card-on { grid-template-columns: 200px minmax(0, 1fr) min(480px, 60vw); }
  .tsb-sheet { max-width: 60vw; }
  /* the six that matter show first; the rest behind "See all" (.fmoc-allcols) */
  .fmoc-cols { display: inline-flex; margin: 0 0 8px; }
  .fmoc-table:not(.fmoc-allcols) :is(.fmoc-c-type, .fmoc-c-year, .fmoc-c-meter, .fmoc-c-dot,
    .fmoc-c-lift, .fmoc-c-tag, .fmoc-c-shopdays) { display: none; }
  .fmoc-row td.fmoc-c-seen, .fmoc-row .fmoc-seen { min-width: 11em; }
  /* a finger, not a mouse: nothing tappable under 44 px */
  .tsb-btn, .tsb-chip, .tsb-seg button, #tsb-q, .fmoc-select, .fmoc-sort, .fmoc-notsafe, .fmoc-cols,
  .fmoc-zoom button, .fmoc-dhead button, .tsb-door, .tsb-iss, .tsb-ln, .fmoc-kpi { min-height: 44px; min-width: 44px; }
  .fmoc-row { height: 48px; }
  /* p5-121i (walk YELLOW 17): the filter column stays 200 px with its groups
     closed (State open); the rail stays the THIRD column; the header row may
     wrap here (the iPad is narrower than the actions + title) */
  .fmoc-left { min-width: 0; max-width: 200px; }
  .fmoc-left .fmoc-ghead { min-height: 44px; cursor: pointer; }
  .fmoc-left .fmoc-ghead.fmoc-closed + * { display: none; }
  .tsb-hdr { flex-wrap: wrap; }
}
@media (min-width: 1400px) {
  /* p5-121g: 1400-1599 px two rows of five (ten whole titles + numbers do
     not fit one row there); one row of ten from 1600 px */
  .fmoc-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .fmoc-grid { grid-template-columns: 240px minmax(0, 1fr) 320px; }
  /* TREESHOP-CC-1e: while a card or the list is open the right column is the card's width */
  body:not(.tsb-phone) .fmoc-grid.fmoc-card-on { grid-template-columns: 240px minmax(0, 1fr) min(560px, 40vw); }
  .fmoc-rail { grid-column: auto; grid-template-columns: 1fr; }
  .fmoc-map { height: 480px; }
  /* "2 h ago · Owasso yard" on ONE line */
  .fmoc-row td.fmoc-c-seen { min-width: 15em; white-space: nowrap; }
  /* p5-121i (walk YELLOW 12): dense - rows one line (40 px); unit · type ·
     GF · state · last seen · next PM · open defects · days down first, the
     rest behind "See all"; sideways scroll only inside the table card */
  .fmoc-row { height: 40px; }
  .fmoc-row td { padding: 4px 8px; }
  .tsb-hdr { flex-wrap: wrap; }                       /* board25 release-fix: 1400-1599 px the header wraps (the one row needed 93 px more than the page); one row from 1600 (below) */
  .fmoc-cols { display: inline-flex; margin: 0 0 8px; }
  .fmoc-table:not(.fmoc-allcols) :is(.fmoc-c-year, .fmoc-c-meter, .fmoc-c-dot, .fmoc-c-lift, .fmoc-c-tag) { display: none; }
  .fmoc-table-card { min-width: 0; overflow: hidden; }
}
@media (min-width: 1600px) {
  .fmoc-kpis { grid-template-columns: repeat(10, minmax(max-content, 1fr)); }   /* ONE row of 10, never narrower than its words */
  .tsb-hdr { flex-wrap: nowrap; }                     /* title · as of · four actions · Print · Refresh on ONE row (p5-121i Y10) */
}
@media (min-width: 1920px) {
  .fmoc-map { height: 560px; }
}
@media print {
  #tsb .fmoc-left, #tsb .fmoc-map-card, #tsb .fmoc-actions button { display: none !important; }
}
/* TREESHOP-CC-1 (JD 2026-10-15 6:55-7:01 PM, the command center notes).
   Appended only; the computer view and the phone-landscape command center. */
@media (min-width: 900px), (min-width: 740px) and (max-width: 1023.98px) and (orientation: landscape) and (max-height: 500px) {
  /* item 1: "the request to change is smashed between the other two". FOUND:
     tree-shop.css gives EVERY button width 100%, so the strip's Back and
     "Send Jarvis a photo" buttons grew and squeezed the "Request a change"
     link between them. Each strip key is as wide as its words, 12 px apart. */
  .ph-bar .ph-nav { gap: 12px; }
  .ph-bar .ph-btn { width: auto; margin: 0; flex: 0 0 auto; white-space: nowrap; }
  /* item 2: "the verbiage under the fire danger ... gets hidden by some green
     boxes". FOUND: the green action buttons sat in a one-line, min-width 0
     row aligned right, so when the row was narrower than its buttons they
     spilled LEFT over the title. The row now wraps inside its own box and
     is never narrower than its widest button; the title never shrinks. */
  .tsb-hdr h1 { flex: 0 0 auto; }
  .fmoc-actions.fmoc-hdr-actions { flex-wrap: wrap; min-width: auto; row-gap: 8px; }
  /* items 7 + 8: the unit card (and the work orders list) is ONE window.
     TREESHOP-CC-1e (R-1015-07): in the page, never taller than the window
     less the dock - the dock (z-index 1000) covered the card's last 74 px,
     where "Open work order" opens its form. tree-shop-board.js (place())
     also takes off the sticky page strip it measures, never under 320 px. */
  html.bb-on .fmoc-drawer { max-height: calc(100vh - var(--bb-h, 0px)); scroll-margin-bottom: var(--bb-h, 0px); }
  /* item 8 in the page: "Open work order"'s form (tree-shop-wo.js scrolls it
     to, block nearest) stops above the dock, the page scrolled or not */
  html.bb-on .fmoc-drawer form { scroll-margin-bottom: var(--bb-h, 0px); }
  html.bb-on body.tsb-phone .fmoc-drawer { bottom: var(--bb-h, 0px); height: auto; }
  /* item 10 (R-1015-04, the one-way-Home standard): the card's close sits
     TOP-LEFT, the Back family - black, grey edge, 56 px, caps - the same on
     the MacBook and the iPad */
  .fmoc-dhead { gap: 12px; }
  .fmoc-dhead .fmoc-close { --c: #7A8AA0; order: -1; flex: 0 0 auto; margin: 0; min-height: 56px; min-width: 56px; padding: 0 14px;
    background: #000; border: 2px solid #7A8AA0; border-radius: 12px; box-shadow: none; color: #C7C7C7;
    font: 800 18px var(--font-ui); letter-spacing: .04em; text-transform: uppercase; }
  .fmoc-dhead .fmoc-close::before { content: "\2715"; margin-right: 8px; }
  /* TREESHOP-CC-1c (tester F-4): tree-shop.css's "button { width: 100% }"
     made Close 440 px wide and pushed the unit title off the card. Close is
     one fixed small box (the Home box family, R-1015-04); the title takes
     the rest of the header and stays in sight. */
  .fmoc-dhead .fmoc-close { width: 132px; max-width: 132px; flex: 0 0 132px; white-space: nowrap; }
  .fmoc-dhead h2 { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* item 9: a work order line is a tap (that unit's card) */
  #wo-list .wo-list-line { cursor: pointer; }
}
