/* ASA OS technician / bay assignment (request 241F): Today's Tech · Bay cell, the job header control and the Bay board.
   Uses the shop.css tokens only; no colors of its own. */

/* ---------- shared badge: avatar initial + name, then bay ---------- */
.asg, .job-asg { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-size: 13.5px; color: var(--ink); }
.asg-avatar { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
  font: 600 11px/1 var(--font); }
.asg-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.asg-bay { flex: none; color: var(--ink-2); white-space: nowrap; }
.asg-name + .asg-bay::before { content: "·"; margin: 0 6px 0 0; color: var(--ink-3); }
.asg.is-none, .job-asg.is-none { color: var(--ink-3); font-size: 13px; }

/* ---------- Today cell ---------- */
.job-row > .job-asg { overflow: hidden; }

/* ---------- job header control ---------- */
.asg-ctl { position: relative; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.shop-on .asg-btn { min-height: 32px; padding: 0 12px 0 10px; gap: 8px; background: var(--fill); font-size: 13.5px; max-width: 320px; }
.shop-on .asg-btn:disabled { opacity: 1; cursor: default; background: transparent; padding-right: 0; }
.asg-btn .asg-l { color: var(--ink-2); font-weight: 500; }
.asg-btn .asg-v { font-weight: 500; }
.asg-btn .asg-v.is-none { color: var(--accent); }
.asg-btn:disabled .asg-v.is-none { color: var(--ink-3); }
/* U48-A: the visit's booked technician and bay, before the job's own assignment is recorded */
.asg-btn .asg-v.is-booked { display: inline-flex; align-items: center; gap: 6px; }
.asg-btn .asg-booked-k { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.asg-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: 330px; max-width: calc(100vw - 32px); background: var(--surface);
  border-radius: var(--r-m); box-shadow: var(--shadow-pop); padding: 14px 14px 12px; text-align: left; }
.asg-pop[hidden] { display: none; }
.asg-group { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.asg-group legend { font-size: 12px; font-weight: 500; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.asg-opt { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: var(--r-s); font-size: 14px; font-weight: 400; color: var(--ink); cursor: pointer; }
.asg-opt:hover { background: var(--fill); }
.asg-opt input { margin: 0; }
.asg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.asg-opt.is-chip { padding: 0; border-radius: 999px; }
.asg-opt.is-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.asg-opt.is-chip span { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--fill); font-size: 13.5px; }
.asg-opt.is-chip:hover { background: transparent; }
.asg-opt.is-chip:hover span { background: var(--fill-hover); }
.asg-opt.is-chip input:checked + span { background: var(--accent); color: var(--accent-ink); }
.asg-opt.is-chip input:focus-visible + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.asg-empty { font-size: 13px; color: var(--ink-3); margin: 2px 0 6px; }
.asg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.asg-msg p { font-size: 13px; margin: 0 0 8px; color: var(--ink-2); }
.asg-note { font-size: 12.5px; color: var(--ink-2); text-align: right; max-width: 320px; }
.asg-note button { min-height: 26px; font-size: 12.5px; }
.asg-warn, .asg-msg .asg-warn { color: var(--amber); }
.asg-saved { color: var(--green); }

/* ---------- Bay board (batch 30: drag or Move…, readable cards) ----------
   Bay headers are square accent bands with white lettering (UI_DIRECTION_PLAN A); cards are wide enough to read, with
   no blanket truncation. Uses the shop.css tokens and its .stage pills; the shell isn't restyled here. */
.bb-hint { margin: -4px 0 14px; font-size: 13.5px; color: var(--ink-2); max-width: 820px; }
.bb-techs { margin-bottom: 16px; }
.bb-techs:empty { display: none; }
.bb-techs .section-label { margin-top: 0; }
.bb-lane { display: flex; flex-wrap: wrap; gap: 8px; }
.bb-tech { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--surface);
  box-shadow: 0 0 0 .5px var(--hair); font-size: 14px; color: var(--ink); }
.bb-tech .bay-n { color: var(--ink-2); }
.bb-tech-name { font-weight: 500; }
[data-drop].is-over { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
.bays { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 20px; align-items: start; }
.bays > .skeleton { min-height: 160px; }
.bay-col { display: flex; flex-direction: column; gap: 10px; min-height: 150px; padding-bottom: 12px; }   /* shared .band-panel > .band (stream A) heads it */
.bay-col > :not(.band) { margin-left: 12px; margin-right: 12px; }
.bay-col.is-free { background: var(--surface-2); }
.bay-col .band-title { font-size: 19px; }
.bay-col.is-down .band { background: var(--ink-2); }
.bay-col.is-down { border-color: var(--amber); }
.bay-n { font-size: 12.5px; color: var(--ink-2); }
.band .bay-n, .band-aside.bay-n { color: inherit; font-size: 13px; font-weight: 600; }
.bay-down, .bay-occ { margin: 0; font-size: 13px; color: var(--ink-2); }
.bay-down { color: var(--amber); }
.bay-free { font-size: 13px; color: var(--ink-3); margin: auto 0; text-align: center; }
.bay-job { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--r-s); background: var(--canvas); color: var(--ink); min-width: 0;
  box-shadow: 0 0 0 .5px var(--hair); }
.bay-job[draggable="true"] { cursor: grab; }
.bay-job.is-dragging { opacity: .55; }
.bay-job.is-late { box-shadow: 0 0 0 1px var(--red); }
.bj-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
.bay-cust { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; color: var(--ink); overflow-wrap: anywhere; }
.bay-cust:hover { text-decoration: underline; }
.bay-cust:focus-visible, .bj-tel:focus-visible, .bj-move:focus-visible { outline: 0; box-shadow: 0 0 0 2px var(--accent); border-radius: 4px; }
.bj-tel { font-size: 13.5px; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bay-veh { font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.bj-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; font-size: 13px; color: var(--ink-2); }
.bj-est { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }
.bj-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.bj-pills .stage { font-size: 12px; padding: 2px 8px 2px 7px; }
.bay-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; min-width: 0; }
.bay-foot .asg { max-width: 100%; }
.bay-foot .asg-name { white-space: normal; }
.bj-move { min-height: 30px; font-size: 13px; }
.bj-prog { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink); }
.bj-prog.is-empty { color: var(--ink-3); }
.bj-bar { height: 5px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.bj-bar > span { display: block; height: 100%; background: var(--accent); }
.bj-time { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; margin: 2px 0 0; padding-top: 8px; border-top: .5px solid var(--hair); }
.bj-fact { min-width: 0; }
.bj-fact dt { font-size: 11.5px; color: var(--ink-3); }
.bj-fact dd { margin: 0; font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.bj-fact dd.is-muted { color: var(--ink-3); }
.bj-panel { display: grid; gap: 8px; padding: 10px; border-radius: var(--r-s); background: var(--surface); box-shadow: 0 0 0 .5px var(--hair); }
.bj-panel[hidden] { display: none; }
.bj-field { display: grid; gap: 3px; font-size: 12.5px; color: var(--ink-2); }
.bj-field select { min-height: 34px; font-size: 14px; }
.bj-panel-actions { display: flex; justify-content: flex-end; gap: 8px; }
.bj-msg:empty { display: none; }
.bj-msg p { margin: 0; font-size: 13px; }
.bj-confirm { display: grid; gap: 6px; padding: 10px; border-radius: var(--r-s); background: var(--amber-soft); }
.bj-confirm p { margin: 0; font-size: 13px; color: var(--ink); }
.bj-confirm input { min-height: 34px; font-size: 14px; }
.bay-wait:empty { display: none; }
.bay-wait-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.bay-wait .bay-free { text-align: left; margin: 0; }

@media (max-width: 640px) {
  .bays { grid-template-columns: 1fr; gap: 12px; }
  .bb-lane { flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 6px; -webkit-overflow-scrolling: touch; }   /* one swipeable row of technicians */
  .bb-tech { flex: none; min-height: 36px; padding: 4px 12px 4px 6px; font-size: 13.5px; }
  .bay-col { min-height: 0; }
  .bay-wait-list { grid-template-columns: 1fr; }
  .asg-ctl { align-items: flex-start; }
  .asg-pop { left: 0; right: auto; }
}
/* Oct 20: the dispatch suggestion at the top of the assign popover */
.asg-suggest { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; margin-bottom: 8px; border-radius: 10px; background: var(--accent-soft, var(--fill)); font-size: 14px; }
.asg-suggest-k { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--accent); }
.asg-suggest-why { color: var(--ink-2); }
/* Daily screens (Oct 21): when Tech · Bay is tight in a job row, the bay label gives way before the technician's name */
.job-row .asg-bay { flex: 0 3 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---------- U1-A (Oct 23): configurable card details, the Card details editor, the TV view ----------
   Cards show the shop's chosen details: the first is the title, status and blocker share one pill row, the rest one line
   each (no state repeated in several badges). */
.bay-job .bj-lines { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--ink-2); }
.bj-line { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.bj-line.is-muted { color: var(--ink-3); }
.bj-line.is-late { color: var(--red); font-weight: 600; }
.bj-line .bj-bar { flex: 1 1 60px; max-width: 120px; }
.bj-fill { display: block; height: 100%; background: var(--accent); width: 0; }
.bj-fill.p10 { width: 10%; } .bj-fill.p20 { width: 20%; } .bj-fill.p30 { width: 30%; } .bj-fill.p40 { width: 40%; } .bj-fill.p50 { width: 50%; }
.bj-fill.p60 { width: 60%; } .bj-fill.p70 { width: 70%; } .bj-fill.p80 { width: 80%; } .bj-fill.p90 { width: 90%; } .bj-fill.p100 { width: 100%; }
.bb-fresh { margin: -16px 0 24px; font-size: 12.5px; color: var(--ink-3); }
.bb-fresh:empty { display: none; }
.bb-cards { margin-bottom: 18px; max-width: 760px; }
.bb-cards[hidden] { display: none; }
.bbc-body { display: grid; gap: 12px; }
.bbc-scope { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 0; }
.bbc-scope select { min-height: 34px; }
.bbc-fine { margin: 0; font-size: 13px; color: var(--ink-2); }
.bbc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.bbc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px; border-radius: var(--r-s); }
.bbc-row:nth-child(odd) { background: var(--surface-2); }
.bbc-row label { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); cursor: pointer; }
.bbc-row.is-off label { color: var(--ink-2); }
.bbc-move { display: flex; gap: 4px; }
.bbc-move button { min-width: 36px; min-height: 32px; }
.bbc-tv { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.bbc-tv label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.bbc-tv select { min-height: 34px; font-size: 14px; }
.bbc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bbc-msg:empty { display: none; }
.bbc-msg p { margin: 0; font-size: 13.5px; }

/* The TV view: the app steps aside (navigation, the companion, the call card); one screen, no scrolling. Sizes follow the
   screen width with a readable floor (body text never below 16px; at 1920 px wide, 24px). */
body.bbtv-on { overflow: hidden; }
body.bbtv-on > :not(main) { display: none !important; }
body.bbtv-on main.main { position: fixed !important; inset: 0 !important; margin: 0 !important; padding: 0 !important; max-width: none !important; width: auto !important; overflow: hidden; background: var(--canvas); }
body.bbtv-on .main > .bbtv { max-width: none; width: 100%; margin: 0; }   /* the page width cap (shop.css) doesn't apply to the TV */
.bbtv { --tv: clamp(16px, 1.25vw, 32px); font-size: var(--tv); height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: .6em; padding: .7em .9em; box-sizing: border-box; color: var(--ink); }
.bbtv-head { display: flex; align-items: baseline; gap: 1.2em; min-width: 0; }
.bbtv-title { margin: 0; font: italic 900 1.45em/1.1 var(--font-title, var(--font)); text-transform: uppercase; letter-spacing: -0.01em; }
.bbtv-page { margin: 0; color: var(--ink-2); }
.bbtv-status { margin: 0 0 0 auto; color: var(--green); font-weight: 600; }
.bbtv.is-stale .bbtv-status { color: #fff; background: var(--red); padding: .15em .6em; border-radius: 6px; }
.bbtv-exit { font-size: .75em; color: var(--ink-3); opacity: .7; }
.bbtv-grid { display: grid; gap: .6em; min-height: 0; }
.bbtv-grid.c1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } .bbtv-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bbtv-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .bbtv-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bbtv-grid.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .bbtv-grid.c6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bbtv-grid.c7 { grid-template-columns: repeat(7, minmax(0, 1fr)); } .bbtv-grid.c8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.bbtv-grid.r1 { grid-template-rows: repeat(1, minmax(0, 1fr)); } .bbtv-grid.r2 { grid-template-rows: repeat(2, minmax(0, 1fr)); }
.bbtv-grid.r3 { grid-template-rows: repeat(3, minmax(0, 1fr)); } .bbtv-grid.r4 { grid-template-rows: repeat(4, minmax(0, 1fr)); }
.bbtv-grid.r5 { grid-template-rows: repeat(5, minmax(0, 1fr)); } .bbtv-grid.r6 { grid-template-rows: repeat(6, minmax(0, 1fr)); }
.bbtv-bay { display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--hair); border-radius: 6px; }
.bbtv-bay.is-free { background: var(--surface-2); }
.bbtv-bay.is-down { border: 2px solid var(--amber); }
.bbtv-bay-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5em; padding: .3em .6em; background: var(--accent); color: var(--accent-ink, #fff); }
.bbtv-bay.is-down .bbtv-bay-head { background: var(--ink-2); }
.bbtv-bay-head h2 { margin: 0; font: italic 900 1.15em/1.15 var(--font-title, var(--font)); text-transform: uppercase; color: inherit; }
.bbtv-bay-head span { font-weight: 600; }
.bbtv-note { margin: .3em .6em 0; color: var(--ink-2); }
.bbtv-note.is-down { color: var(--amber); font-weight: 600; }
.bbtv-note.is-muted { color: var(--ink-3); }
.bbtv-jobs { display: flex; flex-direction: column; gap: .35em; padding: .4em .5em; min-height: 0; }
.bbtv-job { display: flex; flex-wrap: wrap; align-items: center; gap: .1em .5em; padding: .3em .5em; border-radius: 5px; background: var(--canvas); box-shadow: 0 0 0 1px var(--hair); }   /* title and status on one row, the rest on the next */
.bbtv-job .bj-lines { flex-basis: 100%; }
.bbtv-job[hidden] { display: none; }
.bbtv-job.is-late { box-shadow: 0 0 0 2px var(--red); }
.bbtv-job .bay-cust { font-weight: 700; font-size: 1.05em; color: var(--ink); line-height: 1.2; }
.bbtv-job .bj-pills { display: flex; flex-wrap: wrap; gap: .3em; }
.bbtv-job .bj-pills .stage { font-size: .85em; padding: .1em .5em; }
.bbtv-job .bj-lines { display: flex; flex-wrap: wrap; gap: 0 .9em; color: var(--ink-2); font-size: .9em; }
.bbtv-job .bj-line.is-late { color: var(--red); font-weight: 700; }
.bbtv-more { margin: auto .6em .4em; font-weight: 700; color: var(--ink); }
.bbtv-more[hidden] { display: none; }
.bbtv-wait { display: flex; align-items: center; gap: .8em; min-width: 0; padding: .4em .6em; background: var(--surface); border: 1px solid var(--hair); border-radius: 6px; }
.bbtv-wait h2 { margin: 0; font-size: 1em; font-weight: 700; white-space: nowrap; }
.bbtv-wait-list { display: flex; flex-wrap: wrap; gap: .4em; max-height: 2.4em; overflow: hidden; min-width: 0; }
.bbtv-chip { padding: .15em .6em; border-radius: 999px; background: var(--fill); white-space: nowrap; font-size: .9em; }
.bbtv-chip[hidden] { display: none; }
.bbtv-empty { font-size: 1.2em; color: var(--ink-2); }
.bb-tools { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: -4px 0 14px; }
.bb-tools .bb-hint { margin: 0; flex: 1 1 420px; }
.bb-tool { font-size: 13.5px; font-weight: 500; }
.bb-tools button.quiet { min-height: 30px; font-size: 13.5px; }

/* Compact interactive Jobs board; TV retains its separate layout. */
.bb-help summary { cursor: pointer; color: var(--ink-2); font-size: 13px; }
.bb-help p { margin: 8px 0; max-width: 600px; }
.bay-col.is-free { min-height: 124px; }
.bay-col .bay-head { gap: 12px; align-items: center; }
.bay-col .band-title { min-width: 0; overflow-wrap: anywhere; }
.bay-col .bay-n { flex: none; }
.bay-job { gap: 8px; padding: 14px; }
.bay-job .bj-lines { gap: 4px; }
.bay-job .bj-line[data-field="customer"] { color: var(--ink); font-weight: 500; }
.bay-job .bay-foot { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--hair); gap: 8px; }
.shop-on .bay-job .bj-next { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.bay-job .bj-move { padding: 6px 10px; }
.bay-wait { margin-bottom: 20px; }
.bay-wait[hidden] { display: none; }
.bb-fresh { margin: 0 0 24px; }

.bay-col:has(.bay-assigned-cards) { grid-column: 1 / -1; }
.bay-assigned-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.bay-col.is-free { min-height: 100px; }
.bay-job .bj-top { align-items: center; }
.bj-number { color: var(--ink-2); font-size: 12px; }
.bay-job .bj-lines { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; }
.bay-job .bj-line[data-field="promised"] { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .bay-assigned-cards { grid-template-columns: minmax(0, 1fr); }
  .bay-job .bj-lines { grid-template-columns: minmax(0, 1fr); }
}
