/* Phase 3 — Deploy tab, inventory lists, photos (phone-deploy mockup). */
.dp { max-width: 760px; }
.dp-head { padding: 6px 0 4px; }
.dp-back { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 550; color: var(--navy-900); text-decoration: none; margin-bottom: 8px; }
.dp-back svg { width: 18px; height: 18px; }
.dp-k { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.dp-k svg { width: 15px; height: 15px; color: var(--ink-3); }
.dp-head h1 { font-size: 30px; font-weight: 750; letter-spacing: -.02em; margin: 4px 0 8px; color: var(--navy-900); }
.dp-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dp-alerts { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 4px; }
.dp-alerts:empty { display: none; }
.banner .sub { display: block; font-size: 13px; margin-top: 2px; }
.banner.inv { align-items: center; border-radius: 14px; padding: 12px 14px; }
.banner.inv svg, .banner.attn svg { width: 20px; height: 20px; flex: none; }
.btn.amber { background: var(--surface); border: 1.5px solid var(--amber); color: var(--amber-ink); font-weight: 650; }
.banner.attn { background: var(--surface); border: 1px solid var(--amber-line); box-shadow: inset 4px 0 0 var(--amber); border-radius: 14px; padding: 12px 14px; align-items: center; color: var(--navy-900); }
.banner.attn > svg { color: var(--amber); }
.banner.attn .sub { color: var(--ink-2); }
.banner.attn .meta { display: block; margin-top: 2px; }
.banner.attn .btn, .banner.inv .btn { flex: none; align-self: center; margin-left: auto; }
.sec-t { display: flex; align-items: baseline; gap: 8px; font-size: 17px; font-weight: 700; color: var(--navy-900); margin: 18px 0 8px; }
.sec-t .meta { font-weight: 500; font-size: 13px; }
.ivlist { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.ivlist.mb, .mb { margin-bottom: 10px; }
.iv { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 14px; border: 0; border-top: 1px solid var(--border); background: none; text-align: left; font: inherit; color: var(--navy-900); cursor: pointer; }
.iv:first-child { border-top: 0; }
.iv .box { width: 26px; height: 26px; border-radius: 7px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; flex: none; background: var(--surface); }
.iv .box svg { width: 16px; height: 16px; }
.iv.ok .box { background: var(--navy-900); border-color: var(--navy-900); color: var(--surface); }
.iv.miss .box { border-color: var(--amber); color: var(--amber); background: var(--amber-bg); }
.iv .ti { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 500; }
.iv .ti small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 450; margin-top: 1px; }
.iv .ti small.bad { color: var(--red); }
.iv .cnt { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.iv .cnt.short { color: var(--amber-ink); font-weight: 650; }
.iv .step { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.iv .step button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); font-size: 18px; line-height: 1; color: var(--navy-900); cursor: pointer; }
.iv .step b { min-width: 58px; text-align: center; }
.iv.f972 .box { border-radius: 50%; }
.iv.lk .ctile.sm, .ctile.sm { width: 26px; height: 26px; border-radius: 7px; }
.pill-btn { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.pill-btn svg { width: 13px; height: 13px; }
.pill-btn.on { background: var(--navy-900); border-color: var(--navy-900); color: var(--surface); }
.add-note { display: flex; align-items: center; gap: 7px; margin: 10px 0 0; padding: 8px 2px; border: 0; background: none; font-size: 13.5px; font-weight: 600; color: var(--navy-700); cursor: pointer; }
.add-note svg { width: 15px; height: 15px; }
.go-wrap { margin: 16px 0 8px; }
.btn.go { height: 60px; border-radius: 18px; font-size: 19px; font-weight: 700; width: 100%; }
.btn.go svg { width: 22px; height: 22px; }
.btn.go:disabled { opacity: .55; }
.btn.go.danger { background: var(--red); border-color: var(--red); color: #fff; }
.go-sub { text-align: center; font-size: 12.5px; color: var(--ink-3); margin-top: 7px; }
.field.ovr { margin-bottom: 12px; }
.wide { width: 100%; }
/* Photos */
.ph-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ph-thumbs:empty { display: none; }
.ph { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--ink-3); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.ph svg { width: 20px; height: 20px; }
.ph-load { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--navy-700); animation: phspin .8s linear infinite; }
@keyframes phspin { to { transform: rotate(360deg); } }
.ph-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 8px; }
.ph-pick .ph-thumbs { margin-top: 0; }
.ph-hint { font-size: 11.5px; }
.ph-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-err { font-size: 12px; color: var(--red, #b91c1c); }
.hrow .ph-thumbs, .banner .ph-thumbs { margin-top: 6px; }
.banner .ph { width: 52px; height: 52px; }
/* Inventory page + unit tab */
.kpis.inv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cat.inv { grid-template-columns: 30px minmax(0, 1fr) auto; }
.cat.inv .ist { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.pill.green { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-line); }
.vrow .t span.wrap { white-space: normal; }
.ivtable .ivt { display: grid; grid-template-columns: minmax(0, 1fr) 76px 110px; gap: 10px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 13.5px; }
.ivt .ti small { display: block; font-size: 11.5px; color: var(--ink-3); }
.ivt .need { color: var(--ink-3); font-size: 12.5px; }
.ivt .have { display: flex; align-items: center; gap: 5px; justify-content: flex-end; font-weight: 600; font-variant-numeric: tabular-nums; }
.ivt .have svg { width: 15px; height: 15px; }
.ivt.short { background: var(--amber-bg); } .ivt.short .have { color: var(--amber-ink); }
.card-h .hbtns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.muted-row b.big { font-size: 20px; color: var(--navy-900); }
/* List editor (Program Admin) */
.seg.scroll { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg.scroll span { white-space: nowrap; cursor: pointer; } .seg span small { color: var(--ink-3); font-weight: 500; margin-left: 2px; }
.ie-head, .ie-row { display: grid; grid-template-columns: minmax(0, 2fr) 70px minmax(0, 1.4fr) auto; gap: 8px; align-items: center; padding: 6px 16px; }
.ie-head { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); border-top: 1px solid var(--border); padding-top: 10px; }
.ie-row input { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: inherit; font: inherit; font-size: 13.5px; }
.ie-row .ie-b { display: flex; gap: 4px; } .ie-row .icon-btn { width: 34px; height: 34px; } .ie-row .icon-btn svg { width: 15px; height: 15px; }
.ie-row.sm { grid-template-columns: minmax(0, 1fr) 64px auto; padding: 4px 0; }
.ie-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.lbl-s { font-size: 12.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 6px; }
.filter-in { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: inherit; font: inherit; }
.lk-list { max-height: 46vh; overflow-y: auto; }
:root[data-theme="dark"] .iv.ok .box, :root[data-theme="dark"] .pill-btn.on { background: #2d5ea8; border-color: #2d5ea8; color: #fff; }
:root[data-theme="dark"] .btn.go.primary { background: #2d5ea8; border-color: #2d5ea8; }
@media (max-width: 760px) {
  .dp { padding-top: 6px; }
  .dp-head h1 { font-size: 32px; }
  .kpis.inv { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .kpis.inv .kpi .s { display: none; }
  .ivtable .ivt { grid-template-columns: minmax(0, 1fr) auto; }
  .ivtable .ivt .need { display: none; }
  .ie-head { display: none; }
  .ie-row { grid-template-columns: minmax(0, 1fr) 64px auto; row-gap: 6px; border-top: 1px solid var(--border); padding: 10px 16px; }
  .ie-row .ie-n { grid-column: 1 / 3; grid-row: 2; }
  .ie-row .ie-b { grid-column: 3; grid-row: 1 / 3; flex-direction: column; }
  .banner.inv, .banner.attn { flex-wrap: wrap; }
  .card-h .hbtns { width: 100%; justify-content: flex-start; margin-top: 6px; }
}
/* Unit header: with the Deploy button added, iPad widths put the action buttons on their own row under the title. */
@media (min-width: 761px) and (max-width: 1180px) {
  .head { flex-wrap: wrap; }
  .head .actions { flex-basis: 100%; justify-content: flex-start; padding-left: 82px; }
}
.vrow .t b > .tag, .vrow .t b > .chip, .vrow .t b > .pill { display: inline-flex; vertical-align: 1px; margin-left: 6px; }
a.trow { text-decoration: none; color: inherit; } a.trow:hover { background: var(--surface-2); }

/* ---- Hotspot layout (Oct 14 2026): apparatus Inventory tab pictures + Settings > Inventory layouts ---- */
.lay-card { overflow: visible; }
.lay-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px 6px; flex-wrap: wrap; }
.lay-bar .seg { margin: 0; }
.lay-arr { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--navy-900); display: grid; place-items: center; cursor: pointer; }
.lay-arr svg { width: 18px; height: 18px; margin: 0; }
.lay-hint { margin-left: 4px; }
.lay-stagewrap { padding: 4px 16px 6px; }
.lay-stage { position: relative; width: 100%; margin: 0 auto; border: 1px solid var(--border); border-radius: 14px; background: radial-gradient(ellipse at 50% 35%, var(--surface) 0%, var(--surface-2) 100%); overflow: hidden; user-select: none; -webkit-user-select: none; }
.lay-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.lay-hs { position: absolute; border: 2.5px solid #fff; border-radius: 8px; background: rgba(255,255,255,.14); cursor: pointer; padding: 0; color: #fff; font: inherit; box-shadow: 0 0 0 1.5px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.25); transition: background .12s, box-shadow .12s; }
.lay-hs:hover, .lay-hs:focus-visible { background: rgba(255,255,255,.34); box-shadow: 0 0 0 4px rgba(255,255,255,.55), 0 0 0 1.5px rgba(0,0,0,.45); outline: none; }
.lay-hs.nc, .lay-hs.empty { border-style: dashed; }
.lay-hs.part { border-color: #6ab0ff; background: rgba(106,176,255,.2); }
.lay-hs.ok { border-color: #22c55e; background: rgba(34,197,94,.22); }
.lay-hs.sh { border-color: #ffb02e; background: rgba(255,176,46,.28); }
.lay-lb { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; width: 96%; }
.lay-lb b { font-size: clamp(13px, 1.9vw, 21px); font-weight: 800; letter-spacing: .02em; text-shadow: 0 1px 3px rgba(0,0,0,.9); text-align: center; line-height: 1.05; }
.lay-bd { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(8,20,32,.88); color: #fff; white-space: nowrap; }
.lay-bd svg { width: 12px; height: 12px; margin: 0; }
.lay-hs.ok .lay-bd { color: #4ade80; } .lay-hs.sh .lay-bd { color: #ffc766; }
.lay-legend { display: flex; align-items: center; gap: 16px; padding: 4px 16px 14px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.lay-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; border: 2px solid; }
.lay-legend i.ok { border-color: #22c55e; background: rgba(34,197,94,.3); } .lay-legend i.sh { border-color: #ffb02e; background: rgba(255,176,46,.35); } .lay-legend i.nc { border-color: var(--ink-3); border-style: dashed; }
.lay-legend .sp { flex: 1; }
.lay-lh { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.lay-back { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--navy-900); border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 650; cursor: pointer; }
.lay-back svg { width: 16px; height: 16px; margin: 0; }
.lay-ti { display: flex; flex-direction: column; min-width: 0; flex: 1; } .lay-ti b { font-size: 19px; color: var(--navy-900); }
.lay-chips { display: flex; gap: 6px; } .lay-chips button { border: 1px solid var(--border-strong); background: var(--surface); color: inherit; border-radius: 99px; padding: 5px 13px; font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.lay-chips button.on { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.lay-shelf { display: flex; align-items: baseline; gap: 8px; padding: 9px 16px; background: var(--surface-2); border-top: 1px solid var(--border); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.lay-shelf b { font-weight: 750; } .lay-shelf small { color: var(--ink-3); text-transform: none; letter-spacing: 0; }
.lay-none { padding: 12px 16px; font-size: 13px; color: var(--ink-3); border-top: 1px solid var(--border); }
.lay-flatbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pill.gray { background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--ink-2); }
/* Settings > Inventory layouts editor */
.lyed-top { display: flex; align-items: flex-end; gap: 14px; padding: 12px 16px 16px; flex-wrap: wrap; } .lyed-top .grow { flex: 1; min-width: 220px; }
.lyed-views, .lyed-areas { padding: 12px 16px 4px; } .lyed-areas { padding-bottom: 14px; }
.lyed-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; padding: 10px 16px 16px; align-items: start; }
.lyed-stagebox { min-width: 0; } .lay-stage.lay-ed { touch-action: none; cursor: default; }
.lay-eh { position: absolute; border: 2.5px solid #fff; background: rgba(255,255,255,.2); border-radius: 6px; cursor: move; box-shadow: 0 0 0 1.5px rgba(0,0,0,.5); }
.lay-eh .tg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-weight: 800; font-size: 13px; padding: 2px 8px; border-radius: 99px; background: rgba(8,20,32,.85); color: #fff; pointer-events: none; white-space: nowrap; }
.lay-eh.on { border-color: var(--acc, #ff6a13); background: rgba(255,106,19,.28); }
.lay-eh .hd { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid #ff6a13; border-radius: 4px; }
.lay-eh .hd.nw { left: -9px; top: -9px; cursor: nwse-resize; } .lay-eh .hd.n { left: calc(50% - 7px); top: -9px; cursor: ns-resize; } .lay-eh .hd.ne { right: -9px; top: -9px; cursor: nesw-resize; }
.lay-eh .hd.e { right: -9px; top: calc(50% - 7px); cursor: ew-resize; } .lay-eh .hd.se { right: -9px; bottom: -9px; cursor: nwse-resize; } .lay-eh .hd.s { left: calc(50% - 7px); bottom: -9px; cursor: ns-resize; }
.lay-eh .hd.sw { left: -9px; bottom: -9px; cursor: nesw-resize; } .lay-eh .hd.w { left: -9px; top: calc(50% - 7px); cursor: ew-resize; }
.lyed-panel { display: flex; flex-direction: column; gap: 12px; font-size: 13px; } .lyed-panel h4 { font-size: 13.5px; color: var(--navy-900); }
.lyed-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fld label { display: block; font-size: 11.5px; color: var(--ink-3); margin-bottom: 3px; }
.fld input, .fld select, .lyed-add select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: inherit; font: inherit; font-size: 13.5px; }
.lyed-add { display: flex; gap: 8px; }
.lyed-shelf { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.lyed-sh { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface-2); } .lyed-sh .grip svg { width: 16px; height: 16px; color: var(--ink-3); margin: 0; }
.lyed-sh input { flex: 1; height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: inherit; font: inherit; font-weight: 650; }
.lyed-sh .b { display: flex; gap: 4px; } .icon-btn[disabled] { opacity: .35; cursor: default; }
.lyed-it { display: grid; grid-template-columns: minmax(0, 2fr) 70px minmax(0, 1.4fr) 130px auto auto; gap: 8px; align-items: center; padding: 6px 10px; border-top: 1px solid var(--border); }
.lyed-it input, .lyed-it select { width: 100%; min-width: 0; height: 36px; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: inherit; font: inherit; font-size: 13px; }
.lyed-shelf .add-row-btn { border-top: 1px solid var(--border); }
.lyed-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; } .lyed-tbl th { text-align: left; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding: 8px 16px; background: var(--surface-2); }
.lyed-tbl td { padding: 8px 16px; border-top: 1px solid var(--border); } .lyed-tbl select { height: 36px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: inherit; padding: 0 10px; font: inherit; min-width: 240px; }
.lyed-save { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 -6px 18px rgba(0,0,0,.08); }
.mb { margin-bottom: 10px; }
@media (max-width: 900px) { .lyed-grid { grid-template-columns: minmax(0, 1fr); } .lyed-it { grid-template-columns: minmax(0, 1fr) 70px; } .lyed-it .n, .lyed-it select, .lyed-it .icon-btn { grid-column: auto; } }
.lay-card .card-h { flex-wrap: wrap; gap: 8px; } .lay-card .card-h h3 { white-space: nowrap; } .lay-card .card-h .meta { white-space: nowrap; }
.lay-lb b { font-size: clamp(12px, 1.45vw, 18px); } .lay-hs .lay-bd { font-size: clamp(10px, 1vw, 12px); padding: 1px 7px; }
.lay-chips { flex-wrap: wrap; } .lay-chips button { white-space: nowrap; }
/* Rig-name tag drawn over each picture (per rig; the pictures themselves carry no unit number) */
.lay-tag { position: absolute; left: 10px; top: 10px; z-index: 2; pointer-events: none; padding: 4px 13px; border-radius: 99px; font-weight: 800; font-size: clamp(13px, 1.5vw, 18px); letter-spacing: .04em; line-height: 1.2; color: #fff; background: rgba(10,24,38,.84); border: 1px solid rgba(255,255,255,.28); box-shadow: 0 2px 8px rgba(0,0,0,.28); }
.lyed-miss { display: flex; align-items: center; gap: 10px; padding: 0 16px 12px; flex-wrap: wrap; } .lyed-seeds { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.lay-tag { max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-sizing: border-box; }
/* Rig-name tag straddles the top border of the picture (legend style) so it never covers a hotspot, even on rigs whose body fills the picture */
.lay-stage { overflow: visible; } .lay-stage img { border-radius: 14px; }
.lay-stagewrap { padding-top: 22px; } .lay-tag { top: -15px; left: 14px; }
/* Oct 15: unit-page Deploy button = the blue of the Deploy screen (Log service stays the navy primary beside it). */
.btn.deploy-blue { background: #1d5fd1; border-color: #1d5fd1; color: #fff; }
.btn.deploy-blue:hover:not(:disabled) { background: #174fb0; border-color: #174fb0; }
:root[data-theme="dark"] .btn.deploy-blue { background: #2f6fe4; border-color: #2f6fe4; color: #fff; }
:root[data-theme="dark"] .btn.deploy-blue:hover:not(:disabled) { background: #3b7bf0; }

/* Oct 15: list below the picture; selected hotspot highlighted */
.lay-hs.sel { background: rgba(255,106,19,.30); border-color: #ff6a13; border-style: solid; box-shadow: 0 0 0 3px rgba(255,106,19,.55), 0 0 0 1.5px rgba(0,0,0,.5); z-index: 2; }
.lay-hs.sel .lay-bd { background: #ff6a13; color: #fff; }
.lay-stage:has(.lay-hs.sel) .lay-hs:not(.sel) { opacity: .62; }
.lay-stage:has(.lay-hs.sel) .lay-hs:not(.sel):hover { opacity: 1; }
.lay-listcard { margin-top: 12px; scroll-margin-top: 12px; }
.lay-listcard .lay-lh { border-top: 0; }
.lay-prompt { margin-top: 12px; padding: 14px 16px; text-align: center; }

/* v91: list header = one full-width title line, then chips + buttons on their own wrapping row (never squeezes the title) */
.lay-listcard .lay-lh { display: block; padding: 14px 16px 12px; }
.lay-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; width: 100%; white-space: nowrap; }
.lay-title b { font-size: 20px; color: var(--navy-900); overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.lay-title .lay-n { font-size: 13px; color: var(--ink-3); flex: none; } .lay-title .pill { flex: none; align-self: center; }
.lay-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; margin-top: 10px; }
.lay-tools .lay-chips { flex: 1 1 auto; } .lay-tools .hbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; } .lay-tools .hbtns .btn { white-space: nowrap; }

/* ---- Oct 19: one list per category, item locations ---- */
.iloc { display: inline-flex; align-items: center; gap: 3px; margin-top: 2px; font-size: 11px; font-weight: 600; color: var(--ink-3); background: var(--surface-2, rgba(127,127,127,.08)); border: 1px solid var(--border); border-radius: 6px; padding: 0 6px; line-height: 17px; white-space: nowrap; }
.iloc svg { width: 11px; height: 11px; }
.ti .iloc { display: inline-flex; width: max-content; } .ic-t .iloc { display: inline-flex; width: max-content; margin-top: 3px; }
.ivt-grp { display: flex; align-items: center; gap: 8px; padding: 9px 16px 5px; border-top: 1px solid var(--border); font-size: 11.5px; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-2); background: var(--surface-2, rgba(127,127,127,.05)); }
.ivt-grp b { display: inline-flex; align-items: center; gap: 6px; } .ivt-grp svg { width: 13px; height: 13px; }
.ivt-grp.un, .ie-grp.un { color: var(--amber-ink); background: var(--amber-bg); }
.ivtable .ivt.ed { grid-template-columns: minmax(0, 1fr) 76px 110px 34px; }
.ivt-ed { width: 32px; height: 32px; } .ivt-ed svg { width: 14px; height: 14px; }
.locpick { display: flex; gap: 6px; min-width: 0; } .locpick select { min-width: 0; flex: 1; height: 38px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: inherit; font: inherit; font-size: 13px; }
.locpick.sm select { height: 36px; font-size: 12.5px; } .locpick select[hidden] { display: none; }
.ie-head.loc, .ie-row.loc { grid-template-columns: minmax(0, 2fr) 64px minmax(0, 1.2fr) minmax(0, 1.6fr) auto; }
.ie-row.sm.loc { grid-template-columns: minmax(0, 1fr) 60px minmax(0, 1.3fr) auto; }
.ie-grp { display: flex; align-items: baseline; gap: 8px; padding: 10px 16px 4px; border-top: 1px solid var(--border); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); }
.ie-grp b { display: inline-flex; align-items: center; gap: 5px; } .ie-grp small { color: var(--ink-3); text-transform: none; letter-spacing: 0; }
.ie-noloc { font-size: 12px; }
.ie-loc { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.6fr) 40px; gap: 8px; align-items: center; padding: 6px 16px; border-top: 1px solid var(--border); }
.ie-loc input { width: 100%; min-width: 0; height: 36px; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: inherit; font: inherit; font-size: 13px; }
.ie-loc input[readonly] { background: transparent; font-weight: 700; }
.lay-unbtn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--amber-line, #f2c46b); background: var(--amber-bg); color: var(--amber-ink); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.lay-unbtn.on { outline: 2px solid var(--amber-ink); } .lay-unbtn svg { width: 13px; height: 13px; }
.lay-shelf .lay-add { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--accent, #2d6cdf); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 2px 4px; }
.lay-shelf .lay-add svg { width: 13px; height: 13px; }
.lay-listcard.un .lay-title b { color: var(--amber-ink); }
.lyed-it.loc { grid-template-columns: minmax(0, 2fr) 64px minmax(0, 1.2fr) minmax(0, 1.8fr) auto auto; }
#lyareas span.un { color: var(--amber-ink); }
.itrow2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 760px) {
  .ivtable .ivt.ed { grid-template-columns: minmax(0, 1fr) auto 32px; }
  .ie-row.loc { grid-template-columns: minmax(0, 1fr) 64px auto; }
  .ie-row.loc .locpick { grid-column: 1 / 3; grid-row: 3; }
  .ie-row.sm.loc { grid-template-columns: minmax(0, 1fr) 60px auto; } .ie-row.sm.loc .locpick { grid-column: 1 / 3; grid-row: 2; }
  .ie-loc { grid-template-columns: 70px minmax(0, 1fr) 36px; } .ie-loc .ie-ls { grid-column: 1 / 3; grid-row: 2; }
  .itrow2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) { .lyed-it.loc { grid-template-columns: minmax(0, 1fr) 70px; } .lyed-it.loc .locpick { grid-column: 1 / -1; } }

/* ---- Oct 19: inventory-only workflow (#/inventory, /c/<cat>, /u/<id>) ---- */
.ivh-search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); margin-bottom: 16px; color: var(--ink-3); }
.ivh-search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); outline: none; height: 100%; }
.ivh-search svg { width: 16px; height: 16px; }
.ivh-sec { display: flex; align-items: center; gap: 8px; margin: 18px 2px 10px; } .ivh-sec h3 { margin: 0; font-size: 15px; } .ivh-sec:first-of-type { margin-top: 4px; }
.ivh-sec[hidden], .ivh-grid[hidden] { display: none !important; }
.ivh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ivh-card { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: 14px; background: var(--surface); color: inherit; text-decoration: none; min-height: 84px; box-shadow: var(--shadow-1, none); }
.ivh-card[hidden] { display: none; }
.ivh-card:hover { border-color: var(--border-strong); }
.ivh-card.amber { border-left-color: var(--amber-ink); } .ivh-card.green { border-left-color: var(--green, #16a34a); } .ivh-card.blue { border-left-color: var(--blue, #2563eb); }
.ivh-card .ctile { width: 52px; height: 52px; border-radius: 12px; } .ivh-card .ctile svg { width: 24px; height: 24px; }
.ivh-card .ctile img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.ivh-card .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .ivh-card .t b { font-size: 16px; }
.ivh-card .t > span { font-size: 12.5px; color: var(--ink-3); } .ivh-card .t .sh { color: var(--amber-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ivh-card .r { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; } .ivh-card .r .pill { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ivh-card .r .meta { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; } .ivh-card .r svg { width: 12px; height: 12px; }
.ivh-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.ivh-cat { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 14px; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: inherit; text-decoration: none; min-height: 64px; }
.ivh-cat .ctile { width: 40px; height: 40px; } .ivh-cat .t { display: flex; flex-direction: column; min-width: 0; } .ivh-cat .t span { font-size: 12.5px; color: var(--ink-3); }
.ivh-cat > svg { color: var(--ink-3); }
.ivu-head { padding: 18px 28px 0; display: flex; flex-direction: column; gap: 10px; }
.ivu-head .back { display: inline-flex; align-items: center; gap: 4px; width: max-content; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; min-height: 36px; }
.ivu-head .back svg { width: 16px; height: 16px; }
.ivu-t { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .ivu-t h1 { margin: 0; font-size: 24px; } .ivu-t .ctile { width: 48px; height: 48px; border-radius: 12px; }
.ivu-t .ctile img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.ivu { padding-top: 14px; }
@media (max-width: 760px) { .ivu-head { padding: 12px 14px 0; } .ivu-t h1 { font-size: 20px; } .ivh-grid { grid-template-columns: 1fr; } .ivh-cats { grid-template-columns: 1fr; } }

/* Oct 19: lifeline bags inside the inventory lists (inv-bags.js) */
.ivt.ivt-bag { color: inherit; text-decoration: none; cursor: pointer; }
.ivt.ivt-bag:hover { background: var(--surface-2); }
.ivt.ivt-bag .ti { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.ivt.ivt-bag .ti small { flex-basis: 100%; }
.ivt.ivt-bag .ll-ic { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.ivt.ivt-bag .have { display: flex; align-items: center; justify-content: flex-end; gap: 4px; } .ivt.ivt-bag .have svg { color: var(--ink-3); }
.ivt.ivt-bag.over .ll-ic { background: var(--red-bg, #fde8e8); color: var(--red); }
.ivt.ivt-bag.soon .ll-ic, .ivt.ivt-bag.use .ll-ic { background: var(--amber-bg); color: var(--amber-ink); }
.lay-ll { display: inline-flex; align-items: center; gap: 1px; margin-left: 4px; padding: 0 3px; border-radius: 6px; background: rgba(255,255,255,.92); color: #333; font-size: 10px; vertical-align: middle; }
.lay-ll.due { background: #f59e0b; color: #fff; }
@media (max-width: 760px) { .ivtable .ivt.ivt-bag { grid-template-columns: minmax(0, 1fr) auto 16px; } .ivtable .ivt.ivt-bag .need { display: block; } .ivtable .ivt.ivt-bag .need:empty { display: none; } }
/* Oct 19: bag row = div with two links + Mark used button */
@media (min-width: 761px) { .ivtable .ivt.ivt-bag { grid-template-columns: minmax(0, 1fr) 96px auto; } } .ivt.ivt-bag .have .pill { white-space: nowrap; }
.ivt.ivt-bag a { color: inherit; text-decoration: none; }
.ivt.ivt-bag .need .ll-mark { padding: 3px 7px; font-size: 11.5px; min-height: 0; white-space: nowrap; }
.ivt.ivt-bag .need .ll-mark svg { width: 12px; height: 12px; }

/* ---- v96 (Oct 19): lifeline bag row = line 1 name + status chip, line 2 rope; one action on the right ---- */
.ivt.ivt-bag .ti { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.ivt.ivt-bag .ll-l1 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; min-width: 0; } .ivt.ivt-bag .ll-n { font-weight: 650; }
.ivt.ivt-bag .ti small { flex-basis: auto; } .ivt.ivt-bag .ll-l1 .pill { white-space: nowrap; }
.ivt.ivt-bag .need .ll-chk { background: var(--amber-bg); border-color: var(--amber-line, #f2c46b); color: var(--amber-ink); }
/* short badge beside an item title */
.ivb { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 99px; font-style: normal; font-size: 11.5px; font-weight: 700; line-height: 19px; vertical-align: 1px; white-space: nowrap; }
.ivb.a { background: var(--amber-bg); color: var(--amber-ink); border: 1px solid var(--amber-line, #f2c46b); }
.ivb.r { background: var(--red-bg, #fde8e8); color: var(--red, #b91c1c); border: 1px solid rgba(185,28,28,.35); }
@media (min-width: 761px) { .ivb { display: none; } } /* iPad / desktop keep the Need column + alert icon */

/* ---- v96 phone unit page (inv-phone.js + layout-ui.js phone variant) ---- */
@media (max-width: 760px) {
  .mh-h.ivu-ph { align-items: flex-start; margin-bottom: 4px; padding: 6px 12px 2px 14px !important; }
  .ivu-ph .mh-back { width: 44px; height: 48px; font-size: 38px; flex: none; margin-left: -6px; }
  .ivu-pt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; padding-top: 6px; }
  .ivu-pt .l1 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; } .ivu-pt .l1 h1 { font-size: 24px; margin-right: 2px; }
  .ivu-pt .l1 .pill { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; } .ivu-pt .l1 .pill svg { width: 12px; height: 12px; }
  .ivu-pt .l2 { display: flex; align-items: center; flex-wrap: wrap; gap: 0 12px; font-size: 13px; color: var(--ink-3); }
  .ivu-ll { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-weight: 650; color: var(--accent, #2d6cdf); text-decoration: none; } .ivu-ll svg { width: 14px; height: 14px; }
  .ivu.ivu-m { padding: 6px 12px 12px; display: flex; flex-direction: column; gap: 12px; }
  .ivu.ivu-m > .card, .ivu.ivu-m > .banner { margin: 0; }
  /* Short now */
  .ivu-sum { padding: 12px 14px; border-left: 4px solid var(--amber-ink); }
  .ivs-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--amber-ink); } .ivs-h b { font-size: 16px; } .ivs-h svg { width: 16px; height: 16px; }
  .ivs-h .btn { margin-left: auto; min-height: 44px !important; font-size: 14.5px !important; flex: none; }
  .ivs-n { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--amber-ink); color: #fff; font-size: 13px; font-weight: 800; display: inline-grid; place-items: center; }
  .ivs-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  .ivs-c { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 12px; font: inherit; font-size: 14px; text-align: left; cursor: pointer; background: var(--amber-bg); color: var(--amber-ink); border: 1px solid var(--amber-line, #f2c46b); }
  .ivs-c.r { background: var(--red-bg, #fde8e8); color: var(--red, #b91c1c); border-color: rgba(185,28,28,.35); }
  .ivs-c b { font-weight: 700; } .ivs-c small { font-size: 11.5px; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.7); color: var(--navy-900); }
  span.ivs-c { cursor: default; }
  .ivs-un { display: flex; align-items: center; gap: 10px; margin-top: 10px; } .ivu-sum > .ivs-un:first-child { margin-top: 0; }
  .ivu-sum:not(:has(.ivs-h)) { border-left-color: var(--amber-line, #f2c46b); }
  .ivs-un .lay-unbtn { min-height: 44px; padding: 0 14px; font-size: 14px; }
  /* picture card */
  .lay-picard { padding: 10px 0 4px; }
  .lay-pseg { display: flex; margin: 0 12px 8px !important; } .lay-pseg span { flex: 1; text-align: center; min-height: 44px; display: grid; place-items: center; font-size: 15px; font-weight: 650; cursor: pointer; }
  .lay-picard .lay-stagewrap { padding: 2px 10px 6px; }
  .lay-picard .lay-stage { max-width: min(100%, calc(230px * var(--ar, 2))); touch-action: pan-y; }
  .lay-picard .lay-bd { display: none; }
  .lay-picard .lay-lb b { font-size: 15px; }
  .lay-picard .lay-hs { min-width: 40px; min-height: 40px; }
  .lay-pchips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 12px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .lay-pchips::-webkit-scrollbar { display: none; }
  .lay-pchips button { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; min-width: 52px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--navy-900); font: inherit; font-size: 14.5px; font-weight: 750; cursor: pointer; white-space: nowrap; }
  .lay-pchips button.on { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
  .lay-pchips .lay-ll { margin-left: 0; }
  .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; border: 2px solid var(--ink-3); background: transparent; }
  .dot.ok { background: #22c55e; border-color: #22c55e; } .dot.sh { background: #f59e0b; border-color: #f59e0b; } .dot.part { background: #6ab0ff; border-color: #6ab0ff; } .dot.empty { opacity: .4; }
  .lay-pchips button.on .dot.nc { border-color: #fff; }
  /* compartment card */
  .lay-pcard { margin-top: 0; }
  .lay-plh { display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 16px; min-height: 56px; }
  .lay-plh b { font-size: 20px; color: var(--navy-900); } .lay-plh > span { font-size: 15px; color: var(--ink-2); flex: 1; min-width: 0; } .lay-plh .sh { color: var(--amber-ink); font-weight: 700; }
  .lay-plh .lay-px { width: 44px; height: 44px; flex: none; } .lay-pcard.un .lay-plh b { color: var(--amber-ink); }
  .ivu-m .ivtable .ivt { padding: 12px 16px; font-size: 15px; min-height: 52px; }
  .ivu-m .ivt .ti small { font-size: 12.5px; }
  .ivu-m .ivt .have { font-size: 15px; white-space: nowrap; }
  .ivu-m .lay-shelf { font-size: 12.5px; padding: 10px 16px; }
  .ivu-m .ivtable .ivt.ivt-bag { padding: 10px 12px 10px 16px; }
  .ivu-m .ivt.ivt-bag .need .ll-mark { min-height: 44px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
  .ivu-m .ivt.ivt-bag .need .ll-mark svg { width: 15px; height: 15px; }
  .ivu-m .ivt.ivt-bag .ll-p { display: none; }
  .pill.smp { display: none; }
  .ivu-m .lay-prompt { padding: 16px; font-size: 14.5px; }
  .ivu-flat .card-h { flex-wrap: wrap; }
  /* sticky bottom bar: above the tab bar (#view padding), Count is the big one */
  body.mh-admin #view:has(> .ivu-bar) { display: flex; flex-direction: column; } #view > .ivu.ivu-m { flex: 1 0 auto; width: 100%; }
  body.mh-admin .sp-acts.ivu-bar { margin-top: auto; }
  .lay-pcard > .muted-row { padding: 0 16px 10px; font-size: 13.5px; }
  body.mh-admin .sp-acts.ivu-bar .btn:not(.primary) { flex: 0 0 auto; padding: 0 16px; }
  body.mh-admin .sp-acts.ivu-bar .btn.primary { flex: 1; }
}

/* ---- v97 (Oct 19, Terry): three clear levels in the list below the picture and the Full list ----
   compartment = dark band (code badge + counts, one line) · shelf = small muted subheading with a left rule · item = indented row */
:root { --ivc-bg: #0b1f3a; --ivc-fg: #fff; --ivc-sub: #b9c7da; --ivc-badge-bg: #fff; --ivc-badge-fg: #0b1f3a; --ivc-rule: #9db7da; --ivc-gap: var(--bg); }
:root[data-theme="dark"] { --ivc-bg: #24477a; --ivc-fg: #fff; --ivc-sub: #c9d5e6; --ivc-badge-bg: #e4ebf5; --ivc-badge-fg: #0b1f3a; --ivc-rule: #4f6f9c; }
.ivc-h { display: flex; align-items: center; gap: 10px; min-width: 0; white-space: nowrap; background: var(--ivc-bg); color: var(--ivc-fg); padding: 10px 16px; min-height: 48px; box-sizing: border-box; }
.ivc-h .ivc-code { display: inline-flex; align-items: center; gap: 5px; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; padding: 3px 11px; border-radius: 8px; background: var(--ivc-badge-bg); color: var(--ivc-badge-fg); font-size: 17px; font-weight: 800; letter-spacing: .02em; line-height: 1.2; text-transform: none; }
.ivc-h .ivc-code svg { width: 14px; height: 14px; flex: none; }
.ivc-h .ivc-n { font-size: 13.5px; font-weight: 550; color: var(--ivc-sub); flex: none; letter-spacing: 0; text-transform: none; }
.ivc-h .ivc-sh { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 2px 9px; border-radius: 99px; background: #ffb02e; color: #3b2300; font-size: 12.5px; font-weight: 800; text-transform: none; letter-spacing: 0; }
.ivc-h .ivc-sh svg { width: 12px; height: 12px; }
.ivc-h.un { background: var(--amber-bg); color: var(--amber-ink); border-top: 1px solid var(--amber-line, #f2c46b); border-bottom: 1px solid var(--amber-line, #f2c46b); }
.ivc-h.un .ivc-code { background: var(--amber-ink); color: #fff; } .ivc-h.un .ivc-n { color: var(--amber-ink); }
/* the band inside the compartment card header (iPad / desktop: band, then chips + buttons) */
.lay-listcard .lay-lh { padding: 0 0 12px; border-bottom: 0; overflow: hidden; border-radius: inherit; }
.lay-listcard .lay-lh .lay-title.ivc-h { border-radius: 14px 14px 0 0; padding: 12px 16px; }
.lay-listcard .lay-lh .lay-title.ivc-h b { font-size: 18px; color: var(--ivc-badge-fg); }
.lay-listcard.un .lay-lh .lay-title.ivc-h b { color: #fff; }
.lay-listcard .lay-lh .lay-tools { padding: 0 16px; margin-top: 12px; }
.lay-listcard { overflow: hidden; }
/* phone compartment card: the band is the header (close button in white) */
.lay-plh.ivc-h { padding: 6px 6px 6px 14px; min-height: 56px; border-radius: 14px 14px 0 0; }
.lay-plh.ivc-h .ivc-code { font-size: 19px; }
.lay-plh.ivc-h .ivc-n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lay-plh.ivc-h .lay-px { margin-left: auto; width: 44px; height: 44px; flex: none; background: transparent; border-color: rgba(255,255,255,.35); color: var(--ivc-fg); }
.lay-plh.ivc-h.un .lay-px { color: var(--amber-ink); border-color: var(--amber-line, #f2c46b); }
/* shelf: muted subheading, thin left rule, indented; clearly lighter than the compartment band */
.ivt-shelf, .lay-shelf.ivt-shelf { display: flex; align-items: baseline; gap: 8px; margin: 0; padding: 12px 16px 4px 16px; background: transparent; border-top: 0; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.ivt-shelf b { position: relative; padding-left: 12px; font-weight: 700; color: var(--ink-2); }
.ivt-shelf b::before { content: ''; position: absolute; left: 0; top: -1px; bottom: -1px; width: 3px; border-radius: 2px; background: var(--ivc-rule); }
.ivt-shelf small { font-size: 11.5px; color: var(--ink-3); text-transform: none; letter-spacing: 0; }
.ivt-shelf .lay-add { margin-left: auto; }
/* items: indented under the shelf, card background, hairline dividers */
.ivtable:has(.ivc-h) .ivt, .lay-list .ivt { padding-left: 32px; background: var(--surface); border-top: 1px solid var(--border); }
.ivtable:has(.ivc-h) .ivt-shelf + .ivt, .lay-list .ivt-shelf + .ivt { border-top-color: transparent; }
.ivtable:has(.ivc-h) .ivt.short, .lay-list .ivt.short { background: var(--amber-bg); }
.ivtable:has(.ivc-h) .lay-none, .lay-list .lay-none { padding-left: 32px; border-top: 0; }
/* lifeline bags sit at item level but keep their own look: light inset tint + rope tile */
.ivtable:has(.ivc-h) .ivt.ivt-bag, .lay-list .ivt.ivt-bag { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); box-shadow: inset 3px 0 0 var(--navy-700); }
/* Full list: each compartment is its own block (gap of page background above every band but the first) */
.ivtable .ivt-grp.ivc-h { margin: 0; border-top: 12px solid var(--ivc-gap); }
.ivtable .ivt-grp.ivc-h:first-child { border-top: 0; }
.ivtable .ivt-grp.ivc-h.un { border-top: 12px solid var(--ivc-gap); }
.ivtable .ivt-grp.ivc-h.un:first-child { border-top: 0; }
.ivtable .ivt-grp.ivc-h b { display: inline-flex; }
.card:has(> .ivtable .ivc-h) { overflow: hidden; }
@media (max-width: 760px) {
  .ivtable:has(.ivc-h) .ivt, .lay-list .ivt, .ivu-m .lay-list .ivt { padding-left: 28px; }
  .ivu-m .ivtable .ivt.ivt-bag { padding-left: 28px; }
  .ivt-shelf, .lay-shelf.ivt-shelf, .ivu-m .lay-shelf { padding: 12px 14px 4px 14px; font-size: 12px; }
  .ivc-h { padding: 10px 14px; }
}

/* ---- v98 (Oct 19, Terry): shelf label centered between two thin rules, still lighter than the compartment band ----
   grid: [mirror of the button] rule | label | rule [Add button]; the mirror column keeps the label centered on the card. */
.ivt-shelf, .lay-shelf.ivt-shelf, .ivu-m .lay-shelf.ivt-shelf { --sb: 0px; display: grid; grid-template-columns: var(--sb) minmax(16px, 1fr) auto minmax(16px, 1fr) var(--sb); align-items: center; column-gap: 10px; padding: 12px 16px 6px; text-align: center; }
.ivt-shelf.has-add, .lay-shelf.ivt-shelf.has-add { --sb: 56px; }
.ivt-shelf::before, .ivt-shelf::after { content: ''; height: 1px; background: var(--ivc-rule); opacity: .9; }
.ivt-shelf::before { grid-column: 2; } .ivt-shelf::after { grid-column: 4; }
.ivt-shelf .ivs-l { grid-column: 3; grid-row: 1; display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; min-width: 0; }
.ivt-shelf .ivs-l b { padding-left: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; color: var(--ink-2); }
.ivt-shelf .ivs-l b::before { content: none; display: none; }
.ivt-shelf .ivs-l small { font-size: 12px; color: var(--ink-3); }
.ivt-shelf .lay-add { grid-column: 5; grid-row: 1; justify-self: end; margin: 0; white-space: nowrap; min-height: 32px; }
:root[data-theme="dark"] .ivt-shelf .ivs-l b { color: #c9d5e6; }
@media (max-width: 760px) { .ivt-shelf, .lay-shelf.ivt-shelf, .ivu-m .lay-shelf.ivt-shelf { padding: 12px 12px 6px; column-gap: 8px; } .ivt-shelf.has-add, .lay-shelf.ivt-shelf.has-add { --sb: 52px; } }
.ivt-shelf .ivs-l { overflow: hidden; text-overflow: ellipsis; }
.ivt-shelf .lay-add { display: inline-flex; align-items: center; gap: 3px; padding: 4px 9px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--accent, #2d6cdf); font: inherit; font-size: 12.5px; font-weight: 650; text-transform: none; letter-spacing: 0; cursor: pointer; }
@media (max-width: 760px) { .ivt-shelf.has-add .ivs-l small { display: none; } }

/* ==========================================================
   Oct 29 2026 (Terry): desktop / iPad Inventory page (.ivd). Phone (≤760px) keeps the .ivh home unchanged.
   Left: Fleet search (inline results) · My units · Categories (chips swap the list in place). Right: Short / missing.
   Accent = the Inventory sidebar violet #6b4fa0 (dark #b9a3e6).
   ========================================================== */
.ivd { --iv: #6b4fa0; --iv-ink: #5a3f8c; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
:root[data-theme="dark"] .ivd { --iv: #8f74c9; --iv-ink: #c9b8ee; }
.ivd-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ivd-side { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 14px; min-width: 0; max-height: calc(100vh - 110px); overflow: auto; }
.ivd-side .card { margin: 0; }
.ivd-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px 16px; }
.ivd-h { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; flex-wrap: wrap; }
.ivd-h h3 { margin: 0; font-size: 15px; font-weight: 650; color: var(--navy-900); }
.ivd-h .meta { font-size: 12px; color: var(--ink-3); }
.ivd-ic { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: #6b4fa0; color: #fff; flex: none; }
.ivd-ic svg { width: 15px; height: 15px; color: #fff; }
.ivd-search { margin-bottom: 0; height: 44px; }
.ivd-search:focus-within { border-color: var(--iv); box-shadow: 0 0 0 3px color-mix(in srgb, var(--iv) 22%, transparent); }
.ivd-res { margin-top: 12px; }
.ivd-res[hidden] { display: none; }
.ivd-lh { display: flex; align-items: baseline; gap: 8px; margin: 2px 2px 8px; } .ivd-lh b { font-size: 13.5px; color: var(--navy-900); } .ivd-lh .meta { font-size: 12px; }
.ivd-rows { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ivr { display: grid; grid-template-columns: 36px minmax(0, 1.3fr) minmax(0, 1fr) auto 14px; gap: 12px; align-items: center; padding: 9px 12px; color: inherit; text-decoration: none; background: var(--surface); border-left: 3px solid transparent; }
.ivr + .ivr { border-top: 1px solid var(--border); }
.ivr:hover { background: color-mix(in srgb, var(--iv) 6%, var(--surface)); }
.ivr:focus-visible { outline: 2px solid var(--iv); outline-offset: -2px; }
.ivr.amber, .ivr.red { border-left-color: var(--amber-ink); }
.ivr .ctile { width: 36px; height: 36px; border-radius: 9px; } .ivr .ctile svg { width: 18px; height: 18px; } .ivr .ctile img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.ivr-t { display: flex; flex-direction: column; min-width: 0; } .ivr-t b { font-size: 14px; color: var(--navy-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ivr-t span, .ivr-c { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ivr-s { display: flex; gap: 5px; justify-content: flex-end; flex-wrap: wrap; } .ivr-s .pill { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; } .ivr-s svg { width: 12px; height: 12px; }
.ivr > svg { color: var(--ink-3); }
.ivd-empty { display: flex; align-items: center; gap: 8px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 10px; color: var(--ink-3); font-size: 13px; }
.ivd-empty svg { flex: none; color: var(--iv-ink); }
.ivd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ivd-chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.ivd-chip svg { width: 15px; height: 15px; color: var(--iv-ink); }
.ivd-chip small { font-size: 11.5px; font-weight: 600; color: var(--ink-3); background: var(--surface-2); border-radius: 999px; padding: 1px 7px; }
.ivd-chip .sh { font-style: normal; font-size: 11px; font-weight: 700; color: var(--amber-ink); background: var(--amber-bg); border: 1px solid var(--amber-line); border-radius: 999px; padding: 0 6px; }
.ivd-chip:hover { border-color: var(--iv); background: color-mix(in srgb, var(--iv) 7%, var(--surface)); }
.ivd-chip:focus-visible { outline: 2px solid var(--iv); outline-offset: 2px; }
.ivd-chip.on { background: #6b4fa0; border-color: #6b4fa0; color: #fff; }
.ivd-chip.on svg { color: #fff; } .ivd-chip.on small { background: rgba(255,255,255,.2); color: #fff; }
:root[data-theme="dark"] .ivd-chip.on { background: #5b3f92; border-color: #8f74c9; }
/* Rows go two-line (name / last Inventory check stacked) when the main column is narrow. */
.ivd-main { container-type: inline-size; }
@container (max-width: 620px) {
  .ivr { grid-template-columns: 36px minmax(0, 1fr) auto 14px; grid-template-rows: auto auto; row-gap: 1px; }
  .ivr .ctile { grid-row: 1 / span 2; } .ivr-t { grid-column: 2; grid-row: 1; } .ivr-c { grid-column: 2; grid-row: 2; }
  .ivr-s { grid-column: 3; grid-row: 1 / span 2; } .ivr > svg { grid-column: 4; grid-row: 1 / span 2; }
}
@media (max-width: 1280px) and (min-width: 761px) { .ivd { grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; } }
/* iPad portrait (72px sidebar), 1024px iPad landscape, small windows: one column, Short / missing after the categories (not sticky). */
@media (max-width: 1100px) and (min-width: 761px) {
  .ivd { grid-template-columns: minmax(0, 1fr); }
  .ivd-side { position: static; max-height: none; overflow: visible; }
}

/* ---- Oct 29 2026: items within an item, comms box popup, lifeline items (inv-group.js) ---- */
.iv.grp { cursor: pointer; } .iv.grp .chev { color: var(--ink-3); display: grid; place-items: center; }
.iv.grp .ti svg, .iv.ll .ti svg, .ic-r b svg { width: 13px; height: 13px; margin-right: 5px; vertical-align: -1px; }
.iv.grp .gst { font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.iv.grp.part .box { border-color: var(--navy-900); }
.iv .ll-info, .ic-r .ll-info { flex: none; }
.ic-r.grp .gst { font-style: normal; font-weight: 700; } .ic-r.grp .gst.miss { color: var(--amber); }
.ivt .ivt-kids { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.ivt-bag button.ti { background: none; border: 0; padding: 0; margin: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ie-sub small { font-size: 10px; font-weight: 800; margin-left: 1px; } .ie-sub.on { color: var(--navy-900); }
.sp-bg { position: fixed; inset: 0; z-index: 1200; background: rgba(8, 16, 30, .45); display: grid; place-items: center; padding: calc(16px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left)); }
.sp { background: var(--surface); color: var(--ink, inherit); border-radius: 16px; width: min(560px, 100%); max-height: min(86vh, 760px); display: flex; flex-direction: column; box-shadow: 0 18px 50px rgba(0, 0, 0, .3); }
.sp.sm { width: min(420px, 100%); }
.sp-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px 4px; } .sp-h h2 { flex: 1; margin: 0; font-size: 19px; display: flex; align-items: center; gap: 6px; }
.sp-sub { padding: 0 16px 8px; font-size: 13px; color: var(--ink-3); }
.sp-list { overflow: auto; padding: 0 8px; border-top: 1px solid var(--border); }
.sp-r { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-bottom: 1px solid var(--border); }
.sp-r.own { background: var(--surface-2); } .sp-r.short .sp-t { color: var(--amber); }
.sp-t { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; } .sp-t small { display: block; font-weight: 450; font-size: 12px; color: var(--ink-3); }
.sp-b { display: flex; gap: 4px; flex: none; }
.sp-b button, .sp-st button { min-height: 40px; min-width: 44px; padding: 0 10px; border-radius: 9px; border: 1.5px solid var(--border-strong); background: var(--surface); font: inherit; font-size: 13.5px; font-weight: 700; color: inherit; cursor: pointer; }
.sp-b button.on.ok { background: var(--navy-900); border-color: var(--navy-900); color: var(--surface); }
.sp-b button.on.miss, .sp-b button.on.dmg { background: var(--amber-bg); border-color: var(--amber); color: var(--amber); }
.sp-st { display: flex; align-items: center; gap: 6px; flex: none; } .sp-st b { min-width: 52px; text-align: center; }
.sp-none { padding: 14px 8px; color: var(--ink-3); }
.sp-f { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.sp-n { font-weight: 700; font-size: 14px; } .sp-n.miss { color: var(--amber); } .sp-n.ok { color: var(--green, #138a3c); }
.sp-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; padding: 10px 16px 14px; border-top: 1px solid var(--border); }
.sp-dl dt { font-size: 13px; color: var(--ink-3); font-weight: 600; } .sp-dl dd { margin: 0; font-size: 14.5px; } .sp-dl dd small { display: block; color: var(--ink-3); font-size: 12px; }
@media (max-width: 520px) { .sp-r { flex-wrap: wrap; } .sp-b, .sp-st { width: 100%; } .sp-b button { flex: 1; } }

/* Oct 29 2026: hint on rows that start from the last check (missing / short then) */
small.was { display: block; color: var(--red, #c62828); font-weight: 600; font-size: 11px; margin-top: 2px; }

/* ==========================================================================================================================
   Oct 29 2026 (Terry, 7:17 PM): readable lists. Shelf colours (tn-0..tn-5 = the shelf's position in its area, layouts.js toneOf),
   rows on a contrasting well with zebra + separators, larger item names, and one-line status chips. Layout changes are iPad /
   desktop only (min-width 761px); the phone Inventory layout is unchanged (contrast only).
   ========================================================================================================================== */
:root { --tn-0: #1d4ed8; --tn-1: #0f766e; --tn-2: #6d28d9; --tn-3: #be185d; --tn-4: #0e7490; --tn-5: #8a5a00;
  --tbl-well: #e9eef5; --row-bg: #ffffff; --row-alt: #f4f7fb; --row-line: #d6dee9; --row-hover: #e8f0fb; }
:root[data-theme="dark"] { --tn-0: #7aa7ff; --tn-1: #3fd1bd; --tn-2: #b39cff; --tn-3: #f17db5; --tn-4: #45cbe6; --tn-5: #e2b75a;
  --tbl-well: #0c1320; --row-bg: #141d2c; --row-alt: #1a2538; --row-line: #2c3b54; --row-hover: #1f2d46; }
.tn-0 { --tn: var(--tn-0); } .tn-1 { --tn: var(--tn-1); } .tn-2 { --tn: var(--tn-2); } .tn-3 { --tn: var(--tn-3); } .tn-4 { --tn: var(--tn-4); } .tn-5 { --tn: var(--tn-5); }
.ivt-kids .kp { white-space: nowrap; }
.ivt .have .nchk { white-space: nowrap; }

@media (min-width: 761px) {
  /* Table well + rows */
  .ivtable { background: var(--tbl-well); container-type: inline-size; }
  .ivtable .ivt:not(.ivt-bag) { background: var(--row-bg); border-top: 1px solid var(--row-line); font-size: 15px; padding-top: 11px; padding-bottom: 11px; }
  .ivtable .ivt:not(.ivt-bag):nth-child(even of .ivt) { background: var(--row-alt); }
  .ivtable .ivt.short:not(.ivt-bag):nth-child(n of .ivt) { background: var(--amber-bg); }
  .ivtable .ivt .ti { font-size: 15px; font-weight: 600; color: var(--navy-900); line-height: 1.3; }
  .ivtable .ivt .ti small { font-size: 12.5px; font-weight: 450; color: var(--ink-2); }
  .ivtable .ivt .need { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
  .ivtable .ivt.ivt-bag { border-top: 1px solid var(--row-line); font-size: 15px; }

  /* Need / status columns wide enough for one-line chips */
  .ivtable .ivt:not(.ivt-bag) { grid-template-columns: minmax(0, 1fr) 72px 138px; }
  .ivtable .ivt.ed:not(.ivt-bag) { grid-template-columns: minmax(0, 1fr) 72px 138px 34px; }
  .ivtable .ivt .have { flex-wrap: wrap; row-gap: 4px; justify-content: flex-end; white-space: nowrap; font-size: 14.5px; }
  .ivt .have .nchk { display: inline-block; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--row-line); background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 600; line-height: 1.5; }
  .ivt .ivt-kids { flex-basis: 100%; display: flex; justify-content: flex-end; font-size: 12px; }
  .ivt-kids .kp { display: inline-block; padding: 2px 9px; border-radius: 99px; border: 1px solid; font-weight: 650; line-height: 1.5; }
  .ivt-kids .kp.nc { background: var(--blue-bg); border-color: var(--blue-line); color: var(--blue); }
  .ivt-kids .kp.ok { background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
  .ivt-kids .kp.sh { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber-ink); }

  /* Narrow list (iPad portrait, side panels): Need moves under the name, status keeps its own column */
  @container (max-width: 560px) {
    .ivtable .ivt:not(.ivt-bag) { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; }
    .ivtable .ivt.ed:not(.ivt-bag) { grid-template-columns: minmax(0, 1fr) auto 34px; }
    .ivtable .ivt:not(.ivt-bag) .ti { grid-column: 1; grid-row: 1; }
    .ivtable .ivt:not(.ivt-bag) .need { grid-column: 1; grid-row: 2; font-size: 12.5px; }
    .ivtable .ivt:not(.ivt-bag) .have { grid-column: 2; grid-row: 1 / span 2; }
    .ivtable .ivt:not(.ivt-bag) .ivt-ed { grid-row: 1 / span 2; }
  }

  /* Shelf colours: tinted header band + left accent on the header and every row of that shelf */
  .ivtable .ivt-shelf[class*="tn-"] { background: color-mix(in srgb, var(--tn) 13%, var(--row-bg)); box-shadow: inset 5px 0 0 var(--tn);
    border-top: 1px solid color-mix(in srgb, var(--tn) 40%, var(--row-line)); padding-top: 9px; padding-bottom: 9px; }
  .ivtable .ivt-shelf[class*="tn-"] .ivs-l b { color: var(--tn); font-size: 13px; }
  .ivtable .ivt-shelf[class*="tn-"] .ivs-l small { color: var(--ink-2); }
  .ivtable .ivt-shelf[class*="tn-"]::before, .ivtable .ivt-shelf[class*="tn-"]::after { background: color-mix(in srgb, var(--tn) 45%, transparent); }
  .ivtable .ivt[class*="tn-"]:not(.ivt-bag) { box-shadow: inset 5px 0 0 var(--tn); }
  .ivtable .ivt-shelf[class*="tn-"] + .ivt { border-top-color: color-mix(in srgb, var(--tn) 40%, var(--row-line)); }

  /* Check list (Inventory check on iPad / desktop): rows on a contrasting well */
  .ivlist { background: var(--tbl-well); border-color: var(--row-line); }
  .ivlist .iv { background: var(--row-bg); border-top-color: var(--row-line); }
  .ivlist .iv:nth-child(even of .iv) { background: var(--row-alt); }
  .ivlist .iv .ti { font-weight: 600; color: var(--navy-900); }

  /* Same shelf colours in Edit lists (grouped) and the Shelves editor */
  .ie-grp[class*="tn-"] { background: color-mix(in srgb, var(--tn) 13%, var(--surface)); box-shadow: inset 5px 0 0 var(--tn); padding-top: 8px; padding-bottom: 8px; }
  .ie-grp[class*="tn-"] b { color: var(--tn); }
  .lyed-shelf[class*="tn-"] { border-color: color-mix(in srgb, var(--tn) 45%, var(--border)); box-shadow: inset 5px 0 0 var(--tn); }
  .lyed-shelf[class*="tn-"] .lyed-sh { background: color-mix(in srgb, var(--tn) 13%, var(--surface)); padding-left: 15px; }
  .lyed-shelf[class*="tn-"] .lyed-it { padding-left: 15px; }
  .lyed-shelf[class*="tn-"] .lyed-sh .grip svg { color: var(--tn); }
}
/* Phone: no layout change; just clearer row separators. */
@media (max-width: 760px) {
  .ivtable .ivt { border-top-color: var(--row-line); }
  .ivtable .ivt .ti { color: var(--navy-900); }
}
/* Oct 29 2026 (Terry, 7:31 PM): shelf colours on the Inventory check list too (headings from byLocation carry tn-N; rows via inv-list rowHtml). */
@media (min-width: 761px) {
  .ivlist .ic-grp[class*="tn-"] { margin: 0; border-radius: 0; padding: 9px 14px; background: color-mix(in srgb, var(--tn) 13%, var(--row-bg)); color: var(--navy-900);
    box-shadow: inset 5px 0 0 var(--tn); border-top: 1px solid color-mix(in srgb, var(--tn) 40%, var(--row-line)); }
  .ivlist .ic-grp[class*="tn-"] b { color: var(--tn); font-size: 13.5px; font-weight: 750; }
  .ivlist .ic-grp[class*="tn-"] svg { color: var(--tn); }
  .ivlist .ic-grp[class*="tn-"] small { color: var(--ink-2); }
  .ivlist .iv[class*="tn-"] { box-shadow: inset 5px 0 0 var(--tn); padding-left: 19px; }
  .ivlist .ic-grp[class*="tn-"] + .iv { border-top-color: color-mix(in srgb, var(--tn) 40%, var(--row-line)); }
}

/* ---- Deploy: Inventory check as the rig picture (Oct 31 2026, dep-steps.js). Gray Not started, amber In progress, green Complete,
   red "n short" badge. Phone (.dps.dps-ph) and iPad / desktop share it. ---- */
.dps { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; margin: 0 0 12px; padding: 4px 0 10px; }
.dps-h { display: flex; align-items: center; gap: 12px; padding: 10px 14px 6px; }
.dps-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: #4b5563; }
.dps-ic.prog { background: #B45309; } .dps-ic.done { background: #15803D; } .dps-ic svg { width: 22px; height: 22px; }
.dps-ht { flex: 1; min-width: 0; } .dps-ht b { display: block; font-size: 17px; color: var(--navy-900); } .dps-ht small { display: block; color: var(--ink-2); font-size: 13.5px; }
.dps-st { flex: none; font-size: 12.5px; font-weight: 800; padding: 4px 10px; border-radius: 99px; color: #fff; background: #4b5563; }
.dps-st.prog { background: #B45309; } .dps-st.done { background: #15803D; }
.dps-seg { margin: 4px 14px 0; display: inline-flex; }
.dps-wrap { padding: 8px 14px 6px; }
.dps-stage { touch-action: pan-y; }
.lay-hs.dps-hs.none { border-color: #9ca3af; border-style: dashed; background: rgba(75,85,99,.22); }
.lay-hs.dps-hs.prog { border-color: #f59e0b; border-style: solid; background: rgba(245,158,11,.30); }
.lay-hs.dps-hs.done { border-color: #22c55e; border-style: solid; background: rgba(34,197,94,.28); }
.lay-hs.dps-hs.prog .lay-bd { color: #fcd34d; } .lay-hs.dps-hs.done .lay-bd { color: #4ade80; }
.dps-sh { display: inline-block; font-size: 11px; font-weight: 800; line-height: 1.2; padding: 2px 7px; border-radius: 99px; background: #B91C1C; color: #fff; white-space: nowrap; }
.dps-hs .dps-sh { margin-top: 2px; }
.dps-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 14px 8px; }
.dps-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--navy-900); font: inherit; font-size: 14.5px; font-weight: 750; cursor: pointer; }
.dps-chip small { font-weight: 600; color: var(--ink-3); font-size: 12px; }
.dps-chip .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px dashed #6b7280; background: transparent; display: inline-block; }
.dps-chip.prog { border-color: #f59e0b; background: rgba(245,158,11,.12); } .dps-chip.prog .dot { border: 2px solid #f59e0b; background: #f59e0b; }
.dps-chip.done { border-color: #22c55e; background: rgba(34,197,94,.12); } .dps-chip.done .dot { border: 2px solid #22c55e; background: #22c55e; }
.dps-chip.un svg { width: 14px; height: 14px; color: #B45309; }
.dps-leg { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0 14px; font-size: 12.5px; color: var(--ink-2); align-items: center; }
.dps-leg i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; border: 2px solid; }
.dps-leg i.none { border-color: #9ca3af; border-style: dashed; } .dps-leg i.prog { border-color: #f59e0b; background: rgba(245,158,11,.35); } .dps-leg i.done { border-color: #22c55e; background: rgba(34,197,94,.35); }
.dps-leg .dps-sh { margin-right: 6px; }
.dps .md-disc { display: block; margin: 6px 14px 0 auto; }
.dps.lock { opacity: .9; } .dps-lockmsg { display: flex; gap: 8px; align-items: center; margin: 4px 14px 4px; padding: 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: 14.5px; }
.dps-m .ic-sum { position: static; }
.dpu { margin: 0 0 6px; } .dpu-h { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; font-size: 16px; } .dpu-h b { color: var(--navy-900); }
.sec-t.sm { font-size: 14px; color: var(--ink-2); margin: 14px 0 6px; text-transform: none; }
@media (max-width: 760px) {
  .dps.dps-ph .lay-bd { display: none; } .dps.dps-ph .lay-lb b { font-size: 15px; } .dps.dps-ph .lay-hs { min-width: 40px; min-height: 40px; }
  .dps.dps-ph .dps-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .dps.dps-ph .dps-chips::-webkit-scrollbar { display: none; } .dps-chip { flex: none; }
  .dps-wrap { padding: 6px 10px; }
}
:root[data-theme="dark"] .dps-ic, :root[data-theme="dark"] .dps-st { background: #374151; }
:root[data-theme="dark"] .dps-ic.prog, :root[data-theme="dark"] .dps-st.prog { background: #B45309; } :root[data-theme="dark"] .dps-ic.done, :root[data-theme="dark"] .dps-st.done { background: #15803D; }

/* Asset-only sublist editor: keep all new selectors isolated. */
.invsub-editor { margin-top: 16px; }
.invsub-editor[hidden] { display: none; }
.invsub-editor #invsub-limit { display: block; margin-top: 6px; }
