/* Gear Room. Fieldbook workspace tokens; ink on paper, dark rail, neon only for the main action and the current view. */
.gear { margin: 0; background: var(--ws-paper); color: var(--ws-ink); font: 15px/1.45 var(--ws-ui); }
.gear * { box-sizing: border-box; }
.gear [hidden] { display: none !important; }
.gear button, .gear input, .gear select, .gear textarea { font: inherit; color: inherit; }
.gear button { cursor: pointer; }
.gear :focus-visible { outline: 2px solid var(--ws-ink); outline-offset: 2px; }
.gear .num { font-variant-numeric: tabular-nums; }

/* Rail */
.g-skip { position: absolute; left: -999px; } .g-skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--ws-sheet); padding: 8px 12px; }
.g-nav { position: fixed; inset: 0 auto 0 0; width: 236px; background: var(--ws-rail); color: var(--ws-rail-ink); display: flex; flex-direction: column; gap: 14px; padding: 20px 14px; overflow-y: auto; z-index: 30; box-sizing: border-box; }
.g-brand { color: var(--ws-rail-ink); text-decoration: none; font-weight: 600; letter-spacing: .2em; font-size: 14px; }
.g-nav-brand { padding: 4px 10px 6px; }
/* The Gear Room's views (.g-views) are the shared tab strip under the top bar (../shell.css .vs-tabs). */
.g-nav-label { margin: 14px 10px 4px; font: 500 10.5px/1 var(--ws-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ws-rail-soft); }
.g-search-btn:focus-visible { outline: 2px solid var(--ws-accent); outline-offset: -2px; }
.g-search-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: var(--ws-rail-soft); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.g-search-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.g-search-btn span { flex: 1; }
.g-search-btn kbd, .g-palette kbd { font: 500 11px/1 var(--ws-mono); border: 1px solid currentColor; padding: 3px 5px; opacity: .8; }
.g-who { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 10px; font-size: 13px; color: var(--ws-rail-soft); }
.g-who #signedInAs { color: var(--ws-rail-ink); font-weight: 500; }
.g-who #gearSignOut, .g-who #gearSetPw { color: var(--ws-rail-soft); padding: 0; min-height: 0; text-align: left; }
.g-sample { align-self: flex-start; font: 500 10.5px/1 var(--ws-mono); text-transform: uppercase; letter-spacing: .08em; border: 1px solid var(--ws-rail-soft); color: var(--ws-rail-ink); padding: 6px 8px; }
.g-sample[hidden] { display: none; }
.g-as { display: flex; flex-direction: column; gap: 6px; }
.g-as select { background: transparent; color: var(--ws-rail-ink); border: 1px solid var(--ws-rail-soft); min-height: 38px; padding: 0 8px; }
.g-as option { color: #121416; }
.g-nav .fb-theme-icons { display: inline-flex; align-self: flex-start; border: 1px solid var(--ws-rail-soft); }
.g-nav .fb-theme-icons button { width: 38px; height: 38px; border: 0; background: transparent; color: var(--ws-rail-ink); display: inline-flex; align-items: center; justify-content: center; }
.g-nav .fb-theme-icons button[aria-pressed='true'] { background: var(--ws-rail-ink); color: var(--ws-rail); }
.g-nav .fb-theme-icons svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.g-top { display: none; }
.gear .g-main { margin-left: 236px; }
.g-palette { position: fixed; inset: 0; z-index: 60; background: rgba(10,12,14,.45); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.g-palette[hidden] { display: none; }
.g-palette-box { width: min(640px, 100%); background: var(--ws-sheet); color: var(--ws-ink); border: 1px solid var(--ws-line-strong); box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.g-palette input { width: 100%; box-sizing: border-box; border: 0; border-bottom: 1px solid var(--ws-line); background: transparent; color: var(--ws-ink); font: inherit; font-size: 17px; padding: 18px 20px; outline: none; }
.g-palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.g-palette li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; cursor: pointer; }
.g-palette li[aria-selected='true'] { background: var(--ws-sunk); }
.g-palette li .k { font: 500 10.5px/1 var(--ws-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ws-soft); width: 70px; flex: none; }
.g-palette li .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-palette li .s { font-size: 12.5px; color: var(--ws-soft); white-space: nowrap; }
.g-palette .g-palette-group { font: 500 10.5px/1 var(--ws-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ws-soft); padding: 12px 12px 4px; cursor: default; }
.g-palette-foot { margin: 0; padding: 10px 16px; border-top: 1px solid var(--ws-line); font-size: 12px; color: var(--ws-soft); display: flex; gap: 6px; align-items: center; }
.g-scrim { position: fixed; inset: 0; background: rgba(10,12,14,.45); z-index: 25; }
.g-scrim[hidden] { display: none; }
.g-main { max-width: 1360px; margin: 0 auto; padding: 24px 20px 64px; outline: none; }
.g-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; padding-bottom: 16px; border-bottom: 1px solid var(--ws-line); }
.g-head h1 { margin: 0; font: 900 40px/1 var(--ws-display); text-transform: uppercase; }
.g-head .g-meta { color: var(--ws-soft); font-size: 14px; margin: 6px 0 0; }
.g-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.g-split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; padding-top: 20px; }
.g-split > .g-grow { flex: 999 1 560px; min-width: 0; }
.g-split > .g-side { flex: 1 1 340px; min-width: 0; }
/* The side panel (project dock, item details, booking) stays in view while the list scrolls.
   Only when it sits beside the list: 560 + 20 + 340 = 920px of content, plus the 236px rail, padding and a scrollbar.
   Narrower than that it stacks under the list as before. */
@media (min-width: 1220px) {
  .g-split > aside.g-side:not(.g-plan-side) {
    position: sticky; top: 16px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  }
}
.g-h2 { margin: 0 0 10px; font-size: 18px; font-weight: 600; }
.g-label { font: 500 10.5px/1.2 var(--ws-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ws-soft); }
.g-soft { color: var(--ws-soft); }
.g-empty { color: var(--ws-soft); padding: 28px 0; }

/* Controls */
.g-btn { min-height: 44px; padding: 0 14px; border: 1px solid var(--ws-line-strong); background: var(--ws-sheet); }
.g-btn:hover { background: var(--ws-sunk); }
.g-btn:disabled { opacity: .5; cursor: not-allowed; }
.g-btn.ink { background: var(--ws-ink); color: var(--ws-sheet); border-color: var(--ws-ink); font-weight: 600; }
.g-btn.go { background: var(--ws-accent); color: var(--ws-on-accent); border-color: var(--ws-accent); font-weight: 600; }
.g-btn.go:disabled { background: var(--ws-sunk); color: var(--ws-soft); border-color: var(--ws-line); }
.g-btn.quiet { border-color: transparent; background: transparent; text-decoration: underline; text-underline-offset: 3px; padding: 0 6px; }
.g-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--ws-line-strong); }
.g-seg button { min-height: 40px; padding: 0 12px; border: 0; background: var(--ws-sheet); }
.g-seg button[aria-pressed='true'] { background: var(--ws-ink); color: var(--ws-sheet); }
.g-field { display: grid; gap: 4px; font-size: 13px; color: var(--ws-soft); }
.g-field input, .g-field select, .g-field textarea { min-height: 44px; padding: 0 10px; border: 1px solid var(--ws-line-strong); background: var(--ws-sheet); color: var(--ws-ink); font-size: 15px; }
.g-field textarea { padding: 8px 10px; min-height: 64px; resize: vertical; }
/* A field in a narrow grid cell (Setup's Team and Kits forms at 390px) never pushes past its cell. */
.g-field > input, .g-field > select { min-width: 0; max-width: 100%; box-sizing: border-box; }
.g-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--ws-line-strong); background: var(--ws-sheet); padding: 0 10px; min-height: 44px; min-width: 240px; flex: 1 1 260px; max-width: 420px; }
.g-search input { border: 0; outline: 0; background: transparent; flex: 1; min-height: 40px; font-size: 15px; }
.g-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0; }
.g-chips button { min-height: 36px; padding: 0 12px; border: 1px solid var(--ws-line); background: var(--ws-sheet); font-size: 14px; }
.g-chips button[aria-pressed='true'] { background: var(--ws-ink); color: var(--ws-sheet); border-color: var(--ws-ink); }
.g-chips .n { opacity: .7; margin-left: 4px; }

/* Status words: tags carry meaning by text and outline, never by colored dots. */
.g-tag { display: inline-block; font: 600 10.5px/1 var(--ws-mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 6px; border: 1px solid var(--ws-line-strong); color: var(--ws-soft); background: var(--ws-sheet); white-space: nowrap; }
.g-tag.out { background: var(--ws-ink); color: var(--ws-sheet); border-color: var(--ws-ink); }
.g-tag.reserved { border-style: dashed; color: var(--ws-ink); border-color: var(--ws-ink); }
.g-tag.warn { color: var(--ws-ink); border: 2px solid var(--ws-ink); font-weight: 700; }

/* Gear grid */
.g-who-has { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; padding-top: 16px; }
.g-who-has button { text-align: left; border: 1px solid var(--ws-line); background: var(--ws-sheet); padding: 10px 12px; min-height: 64px; }
.g-who-has button[aria-pressed='true'] { background: var(--ws-ink); color: var(--ws-sheet); border-color: var(--ws-ink); }
.g-who-has b { display: block; font-weight: 600; }
.g-who-has span { font-size: 13px; opacity: .75; }
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.g-card { display: flex; flex-direction: column; border: 1px solid var(--ws-line); background: var(--ws-sheet); text-align: left; padding: 0; min-height: 0; }
.g-card[aria-current='true'] { outline: 2px solid var(--ws-ink); outline-offset: -2px; }
.g-card .ph { height: 120px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--ws-line); color: var(--ws-soft); position: relative; }
.g-card .ph img { max-width: 80%; max-height: 96px; object-fit: contain; }
.g-card .ph .g-tag { position: absolute; top: 8px; right: 8px; }
.g-card .tx { padding: 10px 12px 12px; display: grid; gap: 3px; }
.g-card .nm { font-weight: 600; line-height: 1.25; }
.g-card .ln { font-size: 13px; color: var(--ws-soft); }
.g-ico { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* Detail panel */
.g-panel { border: 1px solid var(--ws-line); background: var(--ws-sheet); }
.g-panel .ph { height: 180px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--ws-line); color: var(--ws-soft); }
.g-panel .ph .g-ico { width: 72px; height: 72px; }
.g-panel .bd { padding: 16px 18px 18px; display: grid; gap: 14px; }
.g-panel h2 { margin: 2px 0 6px; font-size: 22px; font-weight: 600; line-height: 1.2; }
.g-dl { margin: 0; display: grid; font-size: 14px; }
.g-dl div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--ws-line); }
.g-dl dt { color: var(--ws-soft); }
.g-dl dd { margin: 0; }
/* Edit in place: a value you can change looks like text with a dotted underline until you hover or focus it. */
.g-edit { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; text-decoration: underline dotted var(--ws-line-strong); text-underline-offset: 4px; min-height: 0; }
.g-edit:hover, .g-edit:focus-visible { text-decoration-style: solid; text-decoration-color: currentColor; }
.g-link { font: inherit; font-size: 13px; color: inherit; background: none; border: 0; padding: 0; margin-left: 6px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 0; }
.g-dl dd a { color: inherit; text-underline-offset: 3px; }
.g-inline { display: grid; gap: 8px; }
.g-dl .g-inline .g-row { display: flex; grid-template-columns: none; border-top: 0; padding: 0; gap: 8px; }
.g-inline .g-dock-input { width: 100%; box-sizing: border-box; }
.g-inline .g-soft, .g-add .g-soft { font-size: 12.5px; }
.g-market-how { display: block; font-size: 12.5px; color: var(--ws-soft); margin-top: 2px; }
.g-money { display: flex; align-items: center; gap: 6px; }
.g-money > span { color: var(--ws-soft); }
.g-money input { flex: 1; min-width: 0; }
.g-add { gap: 12px; }
.g-add > label:not(.g-tick) { display: grid; gap: 4px; }
.g-tick { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14px; color: var(--ws-ink); cursor: pointer; }
.g-field .g-tick input { width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; flex: none; }
.g-add .g-dock-input { width: 100%; box-sizing: border-box; }
.g-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.g-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.g-log time { color: var(--ws-soft); font-variant-numeric: tabular-nums; }

/* Calendar */
.g-cal { overflow-x: auto; border: 1px solid var(--ws-line); background: var(--ws-sheet); }
.g-cal-in { min-width: 900px; }
.g-cal-row { display: grid; grid-template-columns: 172px repeat(14, minmax(52px, 1fr)); border-bottom: 1px solid var(--ws-line); }
.g-cal-row:last-child { border-bottom: 0; }
.g-cal-name { grid-column: 1; padding: 8px 12px; border-right: 1px solid var(--ws-line); display: flex; flex-direction: column; justify-content: center; min-height: 44px; }
.g-cal-name b { font-weight: 600; font-size: 14px; line-height: 1.2; }
.g-cal-name span { font-size: 12px; color: var(--ws-soft); }
.g-cal-day { text-align: center; padding: 6px 2px; border-left: 1px solid var(--ws-line); font-size: 12px; color: var(--ws-soft); }
.g-cal-day b { display: block; font-size: 15px; color: var(--ws-ink); font-weight: 500; }
.g-cal-day.today { box-shadow: inset 0 -3px 0 var(--ws-ink); }
.g-cal-day.today b { font-weight: 700; }
.g-cal-cell { border-left: 1px solid var(--ws-line); }
.g-cal-cell.we { background: var(--ws-sunk); }
.g-bar { margin: 6px 2px; min-height: 30px; padding: 0 8px; font-size: 12.5px; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border: 1px solid var(--ws-ink); background: var(--ws-sheet); position: relative; z-index: 1; }
.g-bar.reserved { border-style: dashed; }
.g-bar.out { background: var(--ws-ink); color: var(--ws-sheet); }
.g-bar.overdue { background: var(--ws-ink); color: var(--ws-sheet); box-shadow: inset 0 0 0 2px var(--ws-sheet); font-weight: 700; }
.g-bar.repair { border-width: 2px; font-weight: 600; }
.g-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--ws-soft); align-items: center; }
.g-legend i { display: inline-block; width: 22px; height: 12px; vertical-align: middle; margin-right: 6px; border: 1px solid var(--ws-ink); }
.g-legend i.reserved { border-style: dashed; }
.g-legend i.out { background: var(--ws-ink); }

/* Lists and desk */
.g-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--ws-line); background: var(--ws-sheet); }
.g-list > li { border-bottom: 1px solid var(--ws-line); }
.g-list > li:last-child { border-bottom: 0; }
.g-pick { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: transparent; border: 0; padding: 10px 14px; min-height: 56px; }
.g-pick[aria-current='true'] { background: var(--ws-sunk); box-shadow: inset 3px 0 0 var(--ws-ink); }
.g-pick .t { flex: 1; min-width: 0; display: grid; }
.g-pick .t b { font-weight: 600; }
.g-pick .t span { font-size: 13px; color: var(--ws-soft); }
.g-check { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 10px 14px; }
.g-check .t { flex: 1 1 200px; min-width: 0; }
.g-check .t b { font-weight: 600; display: block; }
.g-check .t span { font-size: 12.5px; color: var(--ws-soft); }
.g-check .note { flex: 1 1 100%; }
.g-kit-head { padding: 10px 14px; background: var(--ws-sunk); font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.g-count { display: flex; align-items: center; gap: 8px; padding: 8px 14px; }
.g-count .t { flex: 1; }
.g-count .v { min-width: 72px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.g-bar-foot { margin-top: 16px; background: var(--ws-rail); color: var(--ws-rail-ink); padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.g-bar-foot .t { flex: 1 1 260px; }
.g-bar-foot .t span { display: block; font-size: 13px; color: var(--ws-rail-soft); }
.g-error { border: 2px solid var(--ws-ink); background: var(--ws-sheet); padding: 10px 12px; font-size: 14px; }
.g-error ul { margin: 6px 0 0; padding-left: 18px; }
.g-scan { display: flex; gap: 8px; }
.g-scan input { flex: 1; min-height: 44px; padding: 0 10px; border: 1px solid var(--ws-line-strong); background: var(--ws-sheet); font: 14px var(--ws-mono); }

/* Labels */
.g-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.g-lbl { border: 1px solid var(--ws-line-strong); background: #fff; color: #121416; padding: 10px; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: center; break-inside: avoid; }
.g-lbl svg { width: 96px; height: 96px; display: block; }
.g-lbl b { display: block; font-size: 13px; line-height: 1.2; }
.g-lbl span { display: block; font: 10px/1.3 var(--ws-mono); margin-top: 4px; }

/* Alerts table */
.g-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--ws-sheet); }
.g-table th { text-align: left; font: 500 10.5px/1.2 var(--ws-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ws-soft); padding: 10px 12px; border-bottom: 1px solid var(--ws-line); }
.g-table td { padding: 10px 12px; border-bottom: 1px solid var(--ws-line); vertical-align: top; }
.g-scroll { overflow-x: auto; border: 1px solid var(--ws-line); }

.g-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ws-rail); color: var(--ws-rail-ink); padding: 12px 16px; max-width: min(560px, calc(100vw - 32px)); font-size: 14px; z-index: 10; }

@media (max-width: 900px) {
  .g-top { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; background: var(--ws-rail); color: var(--ws-rail-ink); padding: 8px 12px; min-height: 56px; box-sizing: border-box; }
  .g-top .g-search-btn { flex: 1; max-width: 360px; margin-left: auto; }
  .g-top .g-search-btn kbd { display: none; }
  .g-menu { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--ws-rail-ink); }
  .g-menu svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .g-nav { transform: translateX(-100%); transition: transform .18s ease; width: min(280px, 84vw); }
  body.g-nav-open .g-nav { transform: none; }
  .g-nav-search { display: none; }
  .gear .g-main { margin-left: 0; padding: 16px 16px 48px; }
  .g-head h1 { font-size: 32px; }
}

@media print {
  .g-nav, .g-top, .g-palette, .g-scrim, .g-noprint, .g-toast { display: none !important; }
  .gear .g-main { margin-left: 0; }
  .gear { background: #fff; }
  .g-main { padding: 0; max-width: none; }
  .g-sheet { grid-template-columns: repeat(3, 1fr); gap: 6mm; }
  .g-lbl { border: 0.3mm solid #000; }
}

/* Projects: gear plans, estimates, invoices */
.g-plan-side { flex: 0 1 520px; min-width: 0; }
.g-plan-side .g-field input, .g-plan-side .g-field select { min-width: 0; width: 100%; box-sizing: border-box; }
.g-plan-pool { max-height: 70vh; overflow: auto; margin-top: 12px; }
.g-plan-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; min-height: 60px; cursor: grab; background: var(--ws-sheet); }
.g-plan-row.on { opacity: .55; }
.g-plan-row .ph { width: 52px; height: 44px; display: grid; place-items: center; flex: none; }
.g-plan-row .ph img { max-width: 52px; max-height: 44px; object-fit: contain; }
.g-plan-row .ph .g-ico { width: 26px; height: 26px; }
.g-plan-row .t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.g-plan-row .t b { font-weight: 600; font-size: 14px; }
.g-plan-row .t span { font-size: 12.5px; color: var(--ws-soft); }
.g-drop { min-height: 120px; }
.g-drop.over { outline: 2px dashed var(--ws-ink); outline-offset: -6px; }
.g-drop-hint { padding: 36px 16px; text-align: center; color: var(--ws-soft); }
.g-plan-line { display: grid; grid-template-columns: 96px 72px minmax(0,1fr) 44px; grid-template-areas: 'name name name name' 'rate qty amt x'; gap: 6px 8px; align-items: end; padding: 10px 16px; border-bottom: 1px solid var(--ws-line); }
.g-plan-line .t { grid-area: name; }
.g-plan-line > label:nth-of-type(1) { grid-area: rate; } .g-plan-line > label:nth-of-type(2) { grid-area: qty; }
.g-plan-line .amt { grid-area: amt; } .g-plan-line > button { grid-area: x; }
.g-plan-line .t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.g-plan-line .t b { font-weight: 600; font-size: 14px; }
.g-plan-line .amt { text-align: right; align-self: center; font-weight: 600; }
.g-mini { display: flex; flex-direction: column; font-size: 11.5px; color: var(--ws-soft); gap: 2px; }
.g-mini input { min-height: 36px; width: 100%; padding: 0 6px; border: 1px solid var(--ws-line-strong); background: var(--ws-sheet); color: var(--ws-ink); font: inherit; font-size: 14px; }
.g-total { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.g-total.big { font-size: 20px; font-weight: 700; border-top: 1px solid var(--ws-line-strong); padding-top: 8px; }


.g-doc { position: fixed; inset: 0; z-index: 50; overflow: auto; background: var(--ws-paper); padding: 24px 16px 64px; }
.g-doc-bar { max-width: 864px; margin: 0 auto 16px; display: flex; gap: 8px; }
/* The page itself is the shared document look (vault/doc/doc.css). */
@media print {
  body.g-doc-open > *:not(#gearDoc) { display: none !important; }
  body.g-doc-open { background: #fff !important; min-height: 0 !important; }
  body.g-doc-open .g-doc { position: static; padding: 0; background: #fff; }
}
.g-owner { font-weight: 700; color: var(--ws-ink); }
.g-signin { max-width: 420px; margin: 10vh auto 0; display: flex; flex-direction: column; gap: 14px; }
.g-signin form { display: grid; gap: 10px; }
.g-pw { width: min(440px, 100%); padding: 22px; display: grid; gap: 12px; box-sizing: border-box; }
.g-pw h2 { margin: 0; font-size: 20px; }
.g-pw .g-meta { margin: 0; color: var(--ws-soft); font-size: 14px; }
.g-pw .g-error[hidden] { display: none; }
.g-signin input { min-height: 46px; padding: 0 12px; border: 1px solid var(--ws-line-strong); background: var(--ws-sheet); color: var(--ws-ink); font: inherit; font-size: 16px; }
.g-dock-input { min-height: 40px; padding: 0 10px; border: 1px solid var(--ws-line-strong); background: var(--ws-sheet); color: var(--ws-ink); font: inherit; font-size: 14px; }
.g-dock-drop { border: 1px dashed var(--ws-line-strong); padding: 14px; display: flex; flex-direction: column; gap: 2px; min-height: 64px; justify-content: center; }
.g-dock-drop span { font-size: 13px; color: var(--ws-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-dock-drop.over, .g-drop.over { outline: 2px solid var(--ws-ink); outline-offset: -2px; background: var(--ws-sunk); }
.g-card[draggable='true'] { cursor: grab; }
.g-palette input::-webkit-search-cancel-button { display: none; }
.g-cal-dept { background: var(--ws-sunk); }
.g-cal-toggle { flex-direction: row !important; justify-content: flex-start !important; align-items: center; gap: 8px; border: 0; border-right: 1px solid var(--ws-line); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; min-height: 48px; }
.g-cal-toggle b { font-weight: 700; font-size: 14.5px; }
.g-cal-toggle span:last-child { margin-left: auto; font-size: 12px; color: var(--ws-soft); }
.g-cal-toggle .chev { width: 12px; font-size: 12px; }
.g-cal-toggle:focus-visible { outline: 2px solid var(--ws-ink); outline-offset: -2px; }
.g-cal-sum { display: flex; align-items: center; justify-content: center; font-size: 13px; }
.g-side .g-field input, .g-side .g-field select { min-width: 0; width: 100%; box-sizing: border-box; }
.g-inbox-row { display: flex; align-items: flex-start; gap: 16px; width: 100%; text-align: left; padding: 14px 16px; background: var(--ws-sheet); border: 0; color: inherit; font: inherit; cursor: pointer; }
.g-inbox-row .t { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.g-inbox-row .t b { font-weight: 500; }
.g-inbox-row.unread .t b { font-weight: 700; }
.g-inbox-row .t span { font-size: 13.5px; color: var(--ws-soft); }
.g-inbox-row time { font-size: 12.5px; color: var(--ws-soft); white-space: nowrap; }
.g-inbox-row:hover { background: var(--ws-sunk); }
.g-step { display: inline-flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.g-step .g-btn { min-width: 40px; min-height: 40px; padding: 0; font-size: 18px; line-height: 1; }
.g-step .g-btn:disabled { opacity: .35; cursor: default; }
.g-step .v { min-width: 64px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.g-dates { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; padding-top: 10px; }
.g-dates .g-mini input { min-width: 0; }
.g-table-wrap { overflow-x: auto; border: 1px solid var(--ws-line); background: var(--ws-sheet); }
.g-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.g-table th, .g-table td { text-align: left; padding: 8px 12px; border-top: 1px solid var(--ws-line); vertical-align: middle; white-space: nowrap; }
.g-table thead th { border-top: 0; position: sticky; top: 0; background: var(--ws-sheet); }
.g-table th button { border: 0; background: none; font: inherit; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ws-soft); cursor: pointer; padding: 0; }
.g-table th[aria-sort="ascending"] button, .g-table th[aria-sort="descending"] button { color: var(--ws-ink); }
.g-table .r { text-align: right; }
.g-table tr[aria-current="true"] td { background: var(--ws-paper, rgba(0,0,0,.04)); }
.g-trow { display: flex; align-items: center; gap: 10px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 0; text-align: left; white-space: normal; min-width: 220px; }
.g-trow .ph { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; overflow: hidden; }
.g-trow .ph img { max-width: 100%; max-height: 100%; object-fit: contain; }
.g-trow .ph .g-ico { width: 20px; height: 20px; }
.g-toast { display: flex; align-items: center; gap: 14px; }
.g-toast-undo { border: 1px solid currentColor; background: none; color: inherit; font: inherit; font-weight: 600; padding: 4px 10px; cursor: pointer; }
.g-help { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.g-help li { display: grid; gap: 2px; font-size: 13.5px; }
.g-help li span { color: var(--ws-soft); }
.g-help .g-btn { min-height: 34px; font-size: 13px; }
.g-net { position: fixed; left: 0; right: 0; top: 0; z-index: 50; padding: calc(8px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); background: var(--ws-ink); color: var(--ws-sheet); font-size: 13.5px; text-align: center; }
.g-back { display: inline-block; margin-bottom: 6px; color: var(--ws-soft); text-decoration: none; font-size: 14px; }
.g-back:hover, .g-back:focus-visible { color: var(--ws-ink); text-decoration: underline; }
.g-item-photo { background: var(--ws-sheet); border: 1px solid var(--ws-line); display: grid; place-items: center; min-height: 260px; padding: 24px; }
.g-item-photo img { max-height: 380px; object-fit: contain; }
.g-item-photo .g-ico { width: 64px; height: 64px; }
.g-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--ws-line); background: var(--ws-sheet); }
.g-strip-day { display: grid; gap: 2px; padding: 8px 6px; border-right: 1px solid var(--ws-line); border-bottom: 1px solid var(--ws-line); font-size: 12px; text-align: center; }
.g-strip-day span { color: var(--ws-soft); }
.g-strip-day b { font-size: 15px; }
.g-strip-day em { font-style: normal; font-weight: 600; }
.g-strip-day.none { background: var(--ws-ink); color: var(--ws-sheet); }
.g-strip-day.none span { color: inherit; opacity: .7; }
.g-tabbar { display: none; }
@media (max-width: 760px) {
  .g-tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--ws-ink); padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
  .g-tabbar a { color: var(--ws-sheet); text-decoration: none; text-align: center; padding: 14px 4px; font-size: 14px; font-weight: 500; opacity: .75; }
  .g-tabbar a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
  .g-toast { bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important; }
  .g-scan input { min-height: 56px; font-size: 18px; }
  .g-scan .g-btn { min-height: 56px; }
  .g-seg button { min-height: 44px; }
  .g-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

/* 008: crew requests, kit cards, cart sync note */
.g-bar.requested { border-style: dotted; border-width: 2px; color: var(--ws-ink); background: transparent; }
.g-legend i.requested { border-style: dotted; border-width: 2px; }
.g-grid-head { margin: 4px 0 8px; }
.g-grid + .g-grid-head { margin-top: 20px; }
.g-kit-card .ln.num { color: var(--ws-ink); font-weight: 600; }
.g-cart-sync { margin: 8px 0 0; font-size: 14px; color: var(--ws-soft); }
.g-kit-panel .g-dl dd .g-edit { margin-left: 6px; }
@media (pointer: coarse) { .g-kit-panel .g-edit { min-height: 44px; min-width: 44px; } }

/* ---------- Visual pass: depth and the color tape ----------
   Cards and lists sit white on the canvas; the side panel is the page, with the one shadow token.
   Status words are filled tapes (In, Reserved, Requested, Out, Overdue, Repair). Selection is a tinted fill in the
   Prep color (the gear list belongs to Prep). No dots, no edge strips, no gradients. */
.gear { --ph: var(--ph-prep); --ph-strong: var(--ph-prep-strong); --ph-tint: var(--ph-prep-tint); }
.g-head { border-bottom: 0; padding-bottom: 8px; }
.g-head .g-meta { font-size: 15px; }
.g-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 12px 2px 8px; border: 0; background: var(--st-quiet); color: var(--ws-tape-ink);
  font: 500 14px/1.2 var(--ws-ui); letter-spacing: 0; text-transform: none;
  clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 25%, 100% 50%, calc(100% - 4px) 75%, 100% 100%, 0 100%); }
.g-tag.out { background: var(--st-out); color: var(--ws-tape-ink); border: 0; }
.g-tag.reserved { background: var(--st-teal); color: var(--ws-tape-ink); border: 0; }
.g-tag.requested { background: var(--st-hold2); color: var(--ws-tape-ink); border: 0; }
.g-tag.warn { background: var(--st-hold); color: var(--ws-tape-ink); border: 0; font-weight: 700; }
.g-card { border-color: var(--ws-page-edge); border-radius: 6px; overflow: hidden; }
.g-card:hover { border-color: var(--ws-line-strong); }
.g-card[aria-current='true'] { background: var(--ph-tint); outline: 2px solid var(--ph-strong); outline-offset: -2px; }
.g-card[aria-current='true'] .ph { border-bottom-color: transparent; }
.g-card .ln { font-size: 14px; }
.g-card .nm { font-weight: 700; }
.g-who-has button { border-color: var(--ws-page-edge); border-radius: 6px; }
.g-who-has button[aria-pressed='true'] { background: var(--ph-tint); color: var(--ws-ink); border-color: var(--ph-strong); box-shadow: inset 0 0 0 1px var(--ph-strong); }
.g-who-has span { font-size: 14px; opacity: 1; color: var(--ws-soft); }
.g-chips button { border-color: var(--ws-page-edge); }
.g-chips button[aria-pressed='true'] { background: var(--ph-tint); color: var(--ws-ink); border-color: var(--ph-strong); font-weight: 600; }
.g-chips .n { opacity: 1; color: var(--ws-soft); }
.g-split > .g-side > .g-panel, .g-split > .g-side > section, .g-split > aside.g-side > div:not([hidden]) { border: 0; border-radius: var(--ws-radius-page, 8px); box-shadow: var(--ws-shadow); background: var(--ws-page); }
.g-panel h2 { font-weight: 700; }
.g-list { border-color: var(--ws-page-edge); border-radius: 6px; overflow: hidden; }
.g-pick[aria-current='true'] { background: var(--ph-tint); box-shadow: none; }
.g-table tr[aria-current="true"] td { background: var(--ph-tint); }
.g-kit-head { background: var(--ws-band); }
/* Calendar bars: the word is on a status fill. */
.g-bar { border: 0; border-radius: 3px; background: var(--st-quiet); color: var(--ws-tape-ink); font-size: 14px; }
.g-bar.reserved { background: var(--st-teal); }
.g-bar.requested { background: var(--st-hold2); }
.g-bar.out { background: var(--st-out); color: var(--ws-tape-ink); }
.g-bar.overdue { background: var(--st-out); color: var(--ws-tape-ink); box-shadow: inset 0 0 0 2px var(--ws-tape-ink); }
.g-bar.repair { background: var(--st-hold); border: 0; }
.g-legend > span { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 12px 2px 8px; background: var(--st-quiet); color: var(--ws-tape-ink); font-size: 14px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 25%, 100% 50%, calc(100% - 4px) 75%, 100% 100%, 0 100%); }
.g-legend > span > i { display: none; }
.g-legend > span:has(> i.reserved) { background: var(--st-teal); }
.g-legend > span:has(> i.requested) { background: var(--st-hold2); }
.g-legend > span:has(> i.out) { background: var(--st-out); }
.g-legend > span:has(> i.repair), .g-legend > span:has(> i.overdue) { background: var(--st-hold); }
@media print {
  .g-tag, .g-bar, .g-legend > span { background: none !important; color: #000 !important; border: 1px solid #000 !important; clip-path: none; box-shadow: none !important; }
  .g-split > .g-side > * { box-shadow: none !important; }
}

/* Producer view (gear/producer.js, Gear Room 010): one job, browse, request, my requests. Phone first, 14px and up. */
.gp { display: grid; gap: 14px; max-width: 860px; }
.gp-head .g-btn.quiet { font-size: 15px; }
.gp-job { margin: 0; font-size: 15px; }
.gp-field { display: grid; gap: 4px; font-size: 14px; color: var(--ws-soft); min-width: 0; }
.gp-field input, .gp-field select { min-height: 44px; padding: 0 10px; border: 1px solid var(--ws-line-strong); background: var(--ws-sheet); color: var(--ws-ink); font: inherit; font-size: 16px; min-width: 0; max-width: 100%; box-sizing: border-box; }
.gp-search { max-width: 420px; }
.gp-tabs { width: fit-content; max-width: 100%; }
.gp-tabs button { font-size: 15px; }
.gp-msg { margin: 0; min-height: 1.2em; font-size: 15px; }
.gp-msg:empty { display: none; }
.gp-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--ws-page-edge); border-radius: 6px; background: var(--ws-sheet); }
.gp-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 14px; border-top: 1px solid var(--ws-line); }
.gp-row:first-child { border-top: 0; }
.gp-tx { display: grid; gap: 2px; min-width: 0; flex: 1 1 220px; }
.gp-photo { flex: 0 0 56px; width: 56px; height: 56px; object-fit: cover; border-radius: 4px; background: var(--ws-line); }
.gp-nm { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.gp-sub, .gp-note, .gp-rate { font-size: 14px; color: var(--ws-soft); overflow-wrap: anywhere; }
.gp-rate { color: var(--ws-ink); }
.gp-note { margin: 0; }
.gp-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gp-qty { width: 96px; }
.gp-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; max-width: 420px; margin-bottom: 12px; }
.gp-form { display: grid; gap: 12px; }
.gp-form > .g-btn.go { justify-self: start; }
