/* Cabinet-wide semantic surfaces. Scope to staff screens, including the workshop. */
.tech-theme {
  --critical-bg:#fcebed; --critical-ink:#812c40; --critical-edge:#b96276;
  --attention-bg:#fff3d6; --attention-ink:#694b12; --attention-edge:#a07730;
  --success-bg:#e4f3ea; --success-ink:#24583f;
  --selected-bg:#e4efeb; --selected-ink:#285e4f;
  --muted:#586578; --focus:#216a89;
}
.tech-theme .main :is(h2,.card h2) {font:600 16px/22px var(--f-body)}
.tech-theme .main :is(.ch small,.sech small,.kicker,.q-s,.mut.xs,.fi-t,.fi-q,.fq-h,.lbl) {font:400 12px/16px var(--f-body);color:var(--muted)}
.tech-theme .main .ch {gap:8px;flex-wrap:wrap}
.tech-theme :is(button,.btn,select,input,textarea,summary) {font-family:var(--f-body)}
.tech-theme .main :is(.btn,button.sm,.roles-t button) {font-size:13px;line-height:18px}
.tech-theme .main :is(.f input,.f select,.et-form input,.et-form textarea) {font:400 14px/20px var(--f-body)}
.tech-theme .main :is(.main-table,.tbl,.wtbl,.q-time,.record-timing) {font-variant-numeric:tabular-nums}
.tech-theme .main .pz :is(.action-primary,.btn:not(.ghost)),.tech-theme .main .amber {
  background:var(--btn);color:var(--btn-ink);border:1px solid var(--btn);border-radius:6px;
  font:600 13px/18px var(--f-body);padding:7px 12px;min-height:34px;
}
.tech-theme .main .pz :is(.action-primary,.btn:not(.ghost)):is(:hover,:active),.tech-theme .main .amber:is(:hover,:active) {background:var(--btn-hover);color:white}
.tech-theme .main :is(button,.btn).ghost {background:white;color:#34455b;border-color:#a2adba}
.tech-theme .main :is(button,.btn).ghost:hover {background:#eef2f5;color:#223349}
.tech-theme .main :is(button:disabled,.pz button:disabled) {background:#edf0f2;color:#626e7d;border-color:#d0d6dd;opacity:1;cursor:not-allowed}
.tech-theme :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible {outline:2px solid var(--focus);outline-offset:2px}
.tech-theme .snav a .cnt {background:#e9edf1;color:#405066}
.tech-theme .snav a .overdue-count {background:var(--critical-bg);color:var(--critical-ink)}
/* One dominant signal per lead. Deadlines come from worklist, never from the date string. */
.tech-theme .main .q-row {position:relative;gap:4px 14px;padding:13px 16px;border-inline-start:3px solid transparent}
.tech-theme .q-row[data-attention="late"] {border-inline-start-color:var(--critical-edge);background:#fffafb}
.tech-theme .q-row[data-attention="attention"] {border-inline-start-color:var(--attention-edge);background:#fffdf8}
.tech-theme .main .q-row:hover {background:#f1f5f4}
.tech-theme .q-row .q-t {grid-column:1;font:600 14px/20px var(--f-body);overflow-wrap:anywhere}
.tech-theme .q-row .q-step {grid-column:1;color:#34455a;font:500 13px/18px var(--f-body)}
.tech-theme .q-row .q-signals {grid-column:1;display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.tech-theme .q-row .q-signals:empty {display:none}
.tech-theme .q-row .q-s {grid-column:1;line-height:18px}
.tech-theme .q-row .q-r {grid-row:1 / span 4;align-self:start;gap:8px}
.tech-theme .q-row.q-new .q-r {grid-row:1 / span 2}
.tech-theme .main :is(.q-time,.due,.newmine,.urg,.esc-tag,.rz-st) {font:500 12px/16px var(--f-body);font-variant-numeric:tabular-nums}
.tech-theme .q-row :is(.newmine,.urg,.esc-tag),.tech-theme .main :is(.q-time.late,.q-time.warn,.q-time.today,.rz-st) {padding:3px 7px;border:0;border-radius:5px;min-width:0}
.tech-theme .q-row :is(.newmine,.badge.b-new,.rt-tag,.newco) {background:#edf1f4;color:#475567}
.tech-theme .main :is(.q-time.late,.due.late,.due.over,.newmine.late,.fq-late,.errorlist,.msg.error) {background:var(--critical-bg);color:var(--critical-ink)}
.tech-theme .main :is(.urg,.newmine.warn,.esc-tag,.q-time.today,.q-time.warn,.due.today,.due.soon,.rz-maybe,.attn,.msg.warn,.msg.warning) {background:var(--attention-bg);color:var(--attention-ink)}
.tech-theme .q-row[data-attention="late"] :is(.urg,.esc-tag),.tech-theme .q-row:has(.q-time.late) .newmine {background:transparent;color:var(--muted);padding-inline:0}
.tech-theme .q-row:has(.urg) .newmine.warn {background:transparent;color:var(--muted)}
.tech-theme .main :is(.rz-ok,.msg.success) {background:var(--success-bg);color:var(--success-ink)}
.tech-theme .main :is(.rz-new,.rz-no) {background:#edf1f4;color:#455468}
.tech-theme .main .kcard.is-late {border-left-color:var(--critical-edge)}
.tech-theme .main .kcard.is-today,.tech-theme .main .kcard.is-stuck {border-left-color:var(--attention-edge)}
.tech-theme .main :is(.wtbl .is-late,.today-bar .over) .q-time.late {color:var(--critical-ink)}
.tech-theme .main .attn {border-left-color:var(--attention-edge)}
.tech-theme .main .attn b {color:inherit}
.tech-theme .main .file[data-ext]::before {color:#425268;background:#edf1f4}
.tech-theme .main .queue-layout {grid-template-columns:minmax(0,1.45fr) minmax(440px,1fr)}
.tech-theme .main .queue-layout>* {min-width:0}
.tech-theme .main .team-load.tbl {table-layout:auto;width:100%}
.tech-theme .main .team-load.tbl :is(td,th) {overflow:visible;text-overflow:clip;width:auto;padding:8px 6px;white-space:normal}
.tech-theme .main .team-load.tbl th {font:500 12px/16px var(--f-body)}
.tech-theme .main .team-load.tbl :is(td,th):first-child {width:auto;padding-left:12px}
.tech-theme .main .team-load .who {white-space:normal}
.tech-theme .main .team-load .late span {display:inline-block;background:var(--critical-bg);color:var(--critical-ink);font-weight:600;padding:2px 6px;border-radius:5px}
@media (max-width:1320px) {
  .tech-theme .main .queue-layout {grid-template-columns:minmax(0,1fr)}
}
@media (max-width:600px) {
  .tech-theme .q-row .q-r,.tech-theme .q-row.q-new .q-r {grid-row:auto;grid-column:1;justify-content:start}
  .tech-theme .main .team-load {min-width:415px}
  .tech-theme .main .queue-layout .tw {max-width:100%;overflow-x:auto}
}
/* Current decision, then completed history and customer context. */
.tech-theme .main .fq {padding:16px;border:1px solid #c9d3dc;border-radius:8px;box-shadow:none}
.tech-theme .main .fq.alarm {border-inline-start:3px solid var(--critical-edge)}
.tech-theme .main .fq .fq-q {font:600 18px/24px var(--f-body);color:var(--ink)}
.tech-theme .main .fq .fq-b {background:white;border:1px solid #97a4b1;color:var(--ink);border-radius:6px;box-shadow:none;opacity:1;text-align:left;align-items:flex-start}
.tech-theme .main .fq .fq-b .t {font:600 14px/20px var(--f-body)}
.tech-theme .main .fq .fq-b .d {font:400 12px/16px var(--f-body);color:var(--muted);opacity:1}
.tech-theme .main .fq .fq-b:not([aria-disabled=true]):hover {border-color:#698576;background:#f2f7f4}
.tech-theme .main .fq .fq-b.chosen {background:var(--selected-bg);color:var(--selected-ink);border-color:#52836f;box-shadow:inset 3px 0 #52836f}
.tech-theme .main .fq.ro .fq-b {color:var(--muted);background:#f5f7f9;border-color:#d4dbe1}
.tech-theme .main .fi-pick {background:#e9edf1;color:#334459;border-radius:4px;padding:3px 7px;font:500 13px/18px var(--f-body)}
.tech-theme .main .et-dog :is(.next-label,.next-value) {font-weight:600;color:#334459}
.tech-theme .main .et-dog .next-value:is(.late,.today) {padding:3px 7px;border-radius:4px}
.tech-theme .main .et-dog .next-value.late {color:var(--critical-ink);background:var(--critical-bg)}
.tech-theme .main .et-dog .next-value.today {color:var(--attention-ink);background:var(--attention-bg)}
.tech-theme .main .related-list {margin:6px 0 0;padding:0;list-style:none}
.tech-theme .main .related-list li {display:grid;grid-template-columns:100px minmax(0,1fr);align-items:baseline;gap:8px;border-top:1px solid var(--line);padding:5px 0;font:400 13px/18px var(--f-body)}
.tech-theme .main .related-list a {color:#285e4f;text-decoration:underline}
.tech-theme .main .record-timing {display:flex;gap:12px 26px;background:#fff;border:1px solid var(--line);border-radius:6px;padding:10px 14px;color:var(--ink)}
.tech-theme .record-timing>div {display:grid;gap:3px;font:400 13px/18px var(--f-body)}
.tech-theme .record-timing small {font:400 12px/16px var(--f-body);color:var(--muted)}
.tech-theme .record-timing .timing-next {margin-right:auto}
.tech-theme .record-timing .timing-next:is(.over,.today) {padding:5px 8px;border-radius:5px}
.tech-theme .record-timing .timing-next.over {color:var(--critical-ink);background:var(--critical-bg)}
.tech-theme .record-timing .timing-next.today {color:var(--attention-ink);background:var(--attention-bg)}
.tech-theme .record-timing .timing-next:is(.over,.today) small {color:inherit}
.tech-theme .pz [role=status][data-tone]:not(:empty) {border-radius:5px;padding:6px 10px;font:500 13px/18px var(--f-body)}
.tech-theme .pz [data-tone=error] {color:var(--critical-ink);background:var(--critical-bg)}
.tech-theme .pz [data-tone=attention] {color:var(--attention-ink);background:var(--attention-bg)}
.tech-theme .pz [data-tone=success] {color:var(--success-ink);background:var(--success-bg)}

.tech-theme .main :is(.p-bad,.row-err td) {background:var(--critical-bg);color:var(--critical-ink)}
.tech-theme .main :is(.p-warn,.chip-wait) {background:var(--attention-bg);color:var(--attention-ink)}
.tech-theme .main :is(.p-ok,.rz-ok) {background:var(--success-bg);color:var(--success-ink)}
.tech-theme .main .file[data-ext]::before {font:600 10px/1.2 var(--f-body)}
.tech-theme .main .pz .tw-machine b {font:600 14px/20px var(--f-body)}
.tech-theme .main .pz .tw-job b {font:600 13px/16px var(--f-body)}
.tech-theme .main .pz .tw-drop {background:var(--btn);color:white;border-color:var(--btn);font:500 13px/18px var(--f-body)}
.tech-theme .main .pz .tw-drop:hover {background:var(--btn-hover);color:white}
.tech-theme .main .pz .tw-queue button:disabled {color:#626e7d;background:#edf0f2;opacity:1}

/* Consistent geometry for peer controls and summary cards. */
.tech-theme .main :is(input:not([type]),input:is([type=text],[type=number],[type=date],[type=datetime-local],[type=email],[type=search],[type=password]),select:not([multiple]):not([size])) {box-sizing:border-box;height:38px;min-height:38px;padding-block:5px;line-height:20px}
.tech-theme .main :is(.tiles,.tiles3,.tiles6,.si-tiles) {align-items:stretch;grid-auto-rows:1fr}
.tech-theme .main :is(.tile,.tile3,.si-tile) {box-sizing:border-box;min-height:88px;padding:14px 16px}
.tech-theme .main .seg.s-A {color:white;background:#336f5e;border-color:#336f5e}
.tech-theme .main .seg.s-B {color:white;background:#37465a}
.tech-theme .pz {
  --g-glass:#cbdce7;--g-el:#dbd5e9;--g-bas:#dfd8cf;--g-si:#c9ded8;--g-tape:#e7dfc8;--g-own:#e9d3da;
  --idle:#e6eaec;--down:#d8aeb7;
}
.tech-theme .pz .gantt .seg {color:#293749}
.tech-theme .pz :is(.seg.co,.legend .co) {background:repeating-linear-gradient(135deg,#bacfc3 0 3px,#edf3ef 3px 8px)}
.tech-theme .pz :is(.seg.to,.legend .to) {background:repeating-linear-gradient(135deg,#b4c4d4 0 3px,#edf2f7 3px 8px)}
.tech-theme .pz .seg.down {color:#642f40}

.week-brief .week-metrics {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));gap:12px}
.week-metrics > div {display:flex;flex-direction:column;gap:5px;padding:14px 16px;background:#f5f8f7;border:1px solid #d6e2dc;border-radius:8px}
.week-metrics strong {font-size:clamp(24px,2vw,32px);line-height:1.2;font-variant-numeric:tabular-nums}
.week-metrics small,.week-alerts span {color:#455568}
.week-brief h3 {margin:18px 0 8px}
.week-alerts {list-style:none;padding:0;margin:0;display:grid;gap:6px}
.week-alerts li[data-rank] {background:#fff4d9;border-radius:6px}
.week-alerts li[data-rank="0"] {background:#fbe8eb}
.week-alerts a {display:flex;align-items:baseline;justify-content:space-between;gap:8px 18px;flex-wrap:wrap;padding:10px 14px;color:#253346;text-decoration:none}
.week-alerts a:hover b,.week-alerts a:focus-visible b {text-decoration:underline}

@media (hover:hover) {
  .tech-theme .main .pills label:hover input:not(:disabled):not(:checked) + span,
  .tech-theme .main :is(button,.btn).ghost:not(:disabled):hover,
  .tech-theme .main .roles button:not(.on):not(:disabled):hover,
  #loom-app button:not(.primary):not(:disabled):hover {
    background:#d9ebe3;color:#194e40;border-color:#76a18e
  }
  #loom-app button.primary:not(:disabled):hover {background:#163c32;color:white}
}
.tech-theme .main .newf .pills input:checked + span {background:#285c4e;color:white;border-color:#285c4e}
.tech-theme .main .pills input:focus-visible + span {outline:2px solid #285c4e;outline-offset:2px}
.weekly-load .wl-legend {display:flex;gap:20px;color:#405368;font-size:13px;margin:10px 0 18px}
.wl-legend span::before {content:"";display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:6px;background:#4b8878}
.wl-legend span+span::before {background:#687fab}
.wl-scroll {overflow-x:auto}
.wl-plot {display:grid;grid-auto-columns:minmax(66px,1fr);grid-auto-flow:column}
.wl-week {text-align:center;border-inline-start:1px solid #e6ecee;padding:0 4px}
.wl-week:first-child {border:0}
.wl-pair {display:flex;justify-content:center;gap:5px}
.wl-bar {width:min(36px,45%);font-size:12px;color:#304453;font-variant-numeric:tabular-nums}
.wl-bar svg {display:block;width:100%;height:124px;margin-top:5px;fill:#4b8878}
.wl-series-1 svg {fill:#687fab}
.wl-bar .wl-track {fill:#edf2f4}
.wl-week time {display:block;margin:8px 0;color:#405368;font-size:13px}

.tech-theme .factory-calendar {margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}
.factory-calendar h4 {margin:0 0 10px}
.factory-calendar .cal-grid {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;max-width:400px;margin:12px 0;text-align:center}
.cal-grid b {font-size:12px;color:#576577}
.tech-theme .main .pz .cal-day {background:#f7e9e9;color:#77464c;border:1px solid #ead1d4;border-radius:6px;padding:5px;min-height:32px}
.tech-theme .main .pz .cal-day[data-work=true] {background:#e7f1ec;color:#245940;border-color:#cde0d6}
.tech-theme .main .pz .cal-day:enabled:hover {box-shadow:inset 0 0 0 2px #597669}

/* Peer controls align by their input edge; labels can wrap independently. */
.tech-theme .main form.filters {
  align-items: flex-end;
  gap: 8px 12px;
  padding: 12px;
  box-sizing: border-box;
}
.tech-theme .main form.filters > label:has(> :is(input:not([type=checkbox],[type=radio]),select)) {
  display: grid;
  align-content: end;
  gap: 4px;
  flex: 0 1 14rem;
  min-width: 0;
  margin: 0;
}
.tech-theme .main form.filters > label > :is(input:not([type=checkbox],[type=radio]),select) {
  width: 100%;
  min-width: 0;
  margin: 0;
}
.tech-theme .main form.filters > :is(input:not([type=hidden]),select,button,.btn),
.tech-theme .main form.filters > label > :is(input:not([type=checkbox],[type=radio]),select) {
  box-sizing: border-box;
  max-width: 100%;
  min-height: 38px;
}
.tech-theme .main form.filters.big > :is(input,button) {min-height: 46px}
.tech-theme .main :is(.ph-a,.btnrow,.bt,.pz .row) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.tech-theme .main :is(.ph-a,.btnrow,.bt) > :is(form,button,.btn) {margin: 0; max-width: 100%}
.tech-theme .main :is(.ph-a,.btnrow,.bt) :is(button,.btn) {
  box-sizing: border-box;
  min-height: 38px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.tech-theme .access-actions {display: grid; gap: 8px; margin-block: 12px}
.tech-theme .access-actions:empty {display: none}
.tech-theme .access-actions > form {display: flex; min-width: 0; margin: 0}
.tech-theme .main .access-actions button {
  width: 100%;
  min-height: 38px;
  height: auto;
  margin: 0;
  padding: 8px 12px;
  white-space: normal;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.tech-theme .main :is(.grid,.grid2,.grid3,.lgrid2,.fgrid,.pz .edit,.pz .shr) > * {min-width: 0}
.tech-theme .main :is(.grid,.grid2,.grid3,.pz .grid) > .card {align-self: stretch}
.tech-theme .main .roles-t {flex-wrap: wrap; row-gap: 4px; max-width: 100%}
.tech-theme .main .roles-t button {min-width: max-content}
.tech-theme .pz .edit > label.f {display: flex; flex-direction: column; justify-content: flex-end}
.tech-theme .pz .edit > label.f > :is(input,select) {max-width: 100%; margin-bottom: 0}
@media (max-width: 700px) {
  .tech-theme .main form.filters > label:has(> :is(input:not([type=checkbox],[type=radio]),select)) {flex: 1 1 12rem}
  .tech-theme .main .fgrid.f3 {grid-template-columns: minmax(0,1fr)}
}

.tech-theme .main .pz .row.shift-actions {align-items:flex-end}
.tech-theme .main .pz .shift-actions :is(.btn,input[type=file]) {box-sizing:border-box;min-height:38px;margin-block:0}
.tech-theme .main .pz .shift-actions .f {margin:0}
.factory-calendar summary {cursor:pointer;font-weight:600}
.factory-calendar .cal-nav,.factory-calendar .cal-months {display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-block:12px}
.factory-calendar .cal-months {align-items:flex-start;gap:24px}
.factory-calendar .cal-months section {flex:1 1 250px;max-width:340px;min-width:0}
.factory-calendar .cal-nav input {width:auto}
.tech-theme .main .pz .cal-day.in-range {box-shadow:inset 0 0 0 2px #286a58}
.brief-head,.brief-head nav {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.brief-head {justify-content:space-between}
.brief-head a {padding:5px 10px;border-radius:6px;color:#35495a}
.brief-head a[aria-current=page] {background:#e4efea;color:#225744;font-weight:600}
#week-more {margin-top:8px}
#week-more summary {cursor:pointer;color:#285f51}

/* Match adjoining toolbar controls, including links and native date inputs. */
.tech-theme .main {--toolbar-height:38px;--toolbar-gap:8px;--filter-inset:12px}
.tech-theme .main form.filters {padding-inline:var(--filter-inset)}
.tech-theme .main .leads-heading {padding-inline-end:calc(var(--filter-inset) + 1px)}
.tech-theme .main .leads-heading .ph-a {margin-inline-start:auto}
.tech-theme .main :is(.ph-a .seg-ctl,form.filters .qtabs,.leads-heading .ph-a,.filters .per-r) {
  gap:var(--toolbar-gap);align-items:center
}
.tech-theme .main :is(.ph-a .seg-ctl>a,.ph-a>.btn,form.filters .qtabs>button,
  form.filters.wf>select,form.filters.wf>input:not([type=hidden]),form.filters.wf button,
  form.filters.wf .per-d input) {
  box-sizing:border-box;height:auto;min-height:var(--toolbar-height);margin-block:0;
  padding-block:8px;line-height:20px
}
.tech-theme .main :is(.ph-a .seg-ctl>a,.ph-a>.btn,form.filters .qtabs>button,form.filters.wf button) {
  display:inline-flex;align-items:center;justify-content:center
}
.tech-theme .main form.filters.wf .per-d {margin:0;align-items:center}
.tech-theme .main form.filters.wf .per {align-items:center}
@media (max-width:700px) {
  .tech-theme .main form.filters.wf .qtabs {flex-wrap:wrap;overflow:visible}
  .tech-theme .main form.filters.wf .per-r {margin-inline-start:0}
}
.tech-theme .main form.filters.wf .per-d input[type=date] {
  height:var(--toolbar-height);padding-block:0
}

.sales-board .col {--stage-bg:#e6edf4;--stage-ink:#415c76}
.sales-board :is(#st-agkp,#st-agtz) {--stage-bg:#eeeaf4;--stage-ink:#67527b}
.sales-board :is(#st-wait,#st-later,#st-miss) {--stage-bg:#f3edde;--stage-ink:#705d34}
.sales-board #st-order {--stage-bg:#e0eeec;--stage-ink:#30665e}
.sales-board #st-ship {--stage-bg:#e7eee3;--stage-ink:#48633e}
.sales-board .col-h {display:grid;grid-template-columns:1fr auto;gap:6px;align-content:center;min-height:64px;
  box-sizing:border-box;background:var(--stage-bg);color:var(--stage-ink);border:0;border-radius:7px 7px 0 0;line-height:1.3}
.sales-board .col-h em {background:var(--stage-ink);color:#fff;border:0}
.sales-board .late-count {grid-column:1/-1;font:600 12px/16px var(--f-body);letter-spacing:0;text-transform:none;color:#85394a}
.sales-board .col-b {padding-top:8px}
.tech-theme .main .sales-board .kcard {gap:6px;overflow-wrap:anywhere}
.tech-theme .main .sales-board .kcard.is-late {background:#fae9ec;border-left:4px solid #984558}
.tech-theme .main .sales-board .kcard.is-stuck {background:#f8eddf;border-left:4px solid #9b6135}
.tech-theme .main .sales-board .kcard:is(.is-urgent,.is-today) {background:#fcf3dc;border-left:4px solid #99702c}
.sales-board .board-step,.sales-board .board-reason {font-size:13px;line-height:1.4}
.sales-board .is-late .board-step {font-weight:600;color:#772e40}
.sales-board .board-reason {font-weight:600}
.sales-board .board-tags {display:flex;gap:4px;flex-wrap:wrap}
.sales-board .board-tags small {background:#eef1f3;color:#485664;border-radius:4px;padding:2px 6px}
.tech-theme .main .sales-board .kcard:is(:hover,:focus-visible) {outline:2px solid #41695f;outline-offset:0}
