:root {
  --black: #0F0F0F;
  --white: #FFFFFF;
  --g1: #F4F3EB;
  --g2: #CFCEBE;
  --g3: #6E6E63;
  --orange: #FF2B00;
  --yellow: #FBE755;
  --teal: #77F5ED;
  --line: #E4E3D8;
  --font-head: "obviously-variable", "obviously", "Obviously", "Archivo", "Arial Black", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 2px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--g1); color: var(--black); font-family: var(--font-body); font-size: 14px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
code { font-family: var(--font-mono); font-size: 0.92em; background: var(--g1); padding: 1px 4px; }
.head { font-family: var(--font-head); font-weight: 700; font-stretch: 100%; font-variation-settings: "wght" 700, "wdth" 100; letter-spacing: -0.01em; line-height: 1; margin: 0 0 12px; }
.mono { font-family: var(--font-mono); letter-spacing: 0.04em; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--g3); margin-bottom: 8px; }
.eyebrow.accent { color: var(--orange); }
.muted { color: var(--g3); }
.dim { color: var(--g3); }
.small { font-size: 12px; }
.grow { flex: 1; }
.row { display: flex; align-items: center; }
.row.gap { gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.right { text-align: right; }
.err { background: #FFE9E3; border-left: 3px solid var(--orange); padding: 8px 12px; font-size: 13px; }
.loading, .empty-state { padding: 80px; text-align: center; font-family: var(--font-mono); color: var(--g3); }
.tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; background: var(--g1); border: 1px solid var(--g2); padding: 1px 5px; }

/* Buttons */
.btn { border: 1px solid var(--black); background: var(--white); padding: 7px 14px; cursor: pointer; border-radius: var(--radius); font-weight: 600; font-size: 13px; white-space: nowrap; }
.btn:hover { background: var(--g1); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: var(--white); }
.btn.primary:hover { background: #E02600; }
.btn.dark { background: var(--black); color: var(--white); }
.btn.dark:hover { background: #2a2a28; }
.btn.ghost { background: transparent; border-color: var(--g2); }
.btn.ghost:hover { border-color: var(--black); }
.btn.danger { color: #C42000; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.big { padding: 12px 18px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: default; }
.linkbtn { background: none; border: 0; padding: 0 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-size: 12px; color: inherit; }
.linkbtn.danger { color: #C42000; }
.linkbtn:disabled { opacity: .3; }
.icon-btn { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 6px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; cursor: pointer; }
.seg { display: inline-flex; border: 1px solid var(--black); border-radius: var(--radius); overflow: hidden; }
.seg button { border: 0; background: var(--white); padding: 4px 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.seg button.on { background: var(--black); color: var(--white); }
.seg.big button { padding: 7px 14px; }

/* Inputs */
input:not([type=checkbox]):not([type=color]):not([type=file]), select, textarea {
  border: 1px solid var(--g2); background: var(--white); padding: 7px 9px; border-radius: var(--radius); width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--black); outline-offset: -1px; border-color: var(--black); }
textarea { resize: vertical; line-height: 1.45; }
input[type=color] { width: 44px; height: 34px; padding: 0; border: 1px solid var(--g2); background: none; }
.field { display: flex; flex-direction: column; gap: 4px; position: relative; }
.lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--g3); }
.hint { font-size: 11px; color: var(--g3); }
.field-link { position: absolute; right: 8px; top: 25px; font-size: 11px; font-family: var(--font-mono); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.fields .field { grid-column: span 2; }
.fields .field.half { grid-column: span 1; }

/* Auth */
.auth { min-height: 100vh; display: grid; place-items: center; background: var(--black); padding: 24px; }
.auth-card { background: var(--white); width: 100%; max-width: 420px; padding: 36px; }
.auth-card .head { font-size: 34px; margin: 6px 0 22px; }
.brandline { display: flex; align-items: center; gap: 8px; margin-bottom: 26px; }
.wordmark { display: inline-block; height: 20px; width: auto; color: var(--black); align-self: center; }
.wordmark svg { display: block; height: 100%; width: auto; fill: currentColor; }

/* Top bar */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; background: var(--black); color: var(--white); padding: 0 18px; height: 56px; }
.topbar .brandline { margin: 0; }
.topbar .wordmark { color: var(--white); height: 18px; }
.topbar .dim { color: var(--g2); font-size: 11px; }
.project-select { width: auto !important; max-width: 240px; background: #1E1E1C !important; color: var(--white); border-color: #3A3A36 !important; font-weight: 600; }
.tabs { display: flex; gap: 2px; height: 100%; }
.tab { background: none; border: 0; color: var(--g2); padding: 0 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; border-bottom: 3px solid transparent; height: 100%; }
.tab:hover { color: var(--white); }
.tab.on { color: var(--white); border-bottom-color: var(--orange); }
.sync { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--g2); display: inline-flex; align-items: center; gap: 6px; }
.sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.sync.saving i { background: var(--yellow); }
.sync.offline i { background: var(--orange); }
.usermenu, .export { position: relative; }
.avatar { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--g3); background: #1E1E1C; color: var(--white); font-family: var(--font-mono); font-size: 11px; cursor: pointer; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--white); color: var(--black); border: 1px solid var(--black); min-width: 220px; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px 0; }
.menu.wide { width: 380px; }
.menu button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; padding: 8px 14px; cursor: pointer; }
.menu button:hover { background: var(--g1); }
.menu button span { font-size: 12px; color: var(--g3); }
.menu-head { padding: 8px 14px 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.menu-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; color: var(--g3); padding: 10px 14px 4px; }
.menu-sep { border-top: 1px solid var(--line); margin: 6px 0; }
.menu .check { white-space: normal; padding: 5px 14px; align-items: flex-start; }

.main { flex: 1; min-height: 0; }

/* Toolbar + status strip */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: var(--white); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.toolbar select { width: auto; max-width: 170px; }
.toolbar .search { max-width: 260px; }
.status-strip { display: flex; align-items: center; gap: 6px; padding: 10px 18px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--g2); background: var(--white); padding: 3px 9px 3px 4px; font-size: 12px; cursor: pointer; border-radius: 20px; }
.chip .n { font-family: var(--font-mono); font-size: 11px; min-width: 22px; height: 18px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--g1); }
.chip.on { border-color: var(--black); box-shadow: inset 0 0 0 1px var(--black); }
.chip .n.zero { background: var(--g1) !important; color: var(--g3) !important; }
.chip.s-release .n, .chip.s-proof .n, .chip.s-production .n { background: var(--orange); color: var(--white); }
.chip.s-installed .n { background: var(--teal); }
.chip.s-hold .n { background: var(--yellow); }
.chip.s-cancelled .n { background: var(--g3); color: var(--white); }

/* Grid */
.grid-view { display: flex; flex-direction: column; height: calc(100vh - 56px); }
.table-wrap { flex: 1; overflow: auto; margin: 0 18px 18px; background: var(--white); border: 1px solid var(--line); }
table.grid { border-collapse: separate; border-spacing: 0; table-layout: fixed; }
table.grid th { position: sticky; top: 0; z-index: 3; background: var(--black); color: var(--white); font-family: var(--font-mono); font-weight: 400; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; text-align: left; padding: 9px 8px; cursor: pointer; user-select: none; white-space: nowrap; }
table.grid th.sticky, table.grid th:first-child { z-index: 4; }
table.grid td { border-bottom: 1px solid var(--line); padding: 0 2px; height: 46px; background: var(--white); vertical-align: middle; position: relative; }
table.grid td.sticky { position: sticky; z-index: 2; }
table.grid td.c-name.sticky { box-shadow: 1px 0 0 var(--line); }
table.grid tr:hover td { background: #FBFAF5; }
table.grid tr.selected td { background: #FFF6F3; }
table.grid tr.cancelled td { color: var(--g3); }
table.grid tr.cancelled .c-name input { text-decoration: line-through; }
.group-row td { background: var(--g1) !important; height: 34px !important; padding: 0 !important; }
.group-row .sticky-label { position: sticky; left: 12px; display: inline-flex; gap: 10px; align-items: center; font-size: 13px; }
.cell-input { border: 1px solid transparent !important; background: transparent !important; padding: 6px 6px !important; width: 100%; text-overflow: ellipsis; }
.cell-input:hover:not(:disabled) { border-color: var(--g2) !important; }
.cell-input:focus { background: var(--white) !important; border-color: var(--black) !important; }
.cell-input:disabled { color: inherit; opacity: 1; }
select.cell-input { appearance: none; cursor: pointer; }
.cell-input.mono { font-family: var(--font-mono); font-size: 12px; }
.cell-input.strong { font-weight: 600; padding-right: 26px !important; }
.cell-input.overdue { color: #C42000; font-weight: 600; }
.cell-btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: none; border: 0; width: 100%; height: 100%; text-align: left; padding: 0 6px; cursor: pointer; font-size: 13px; }
.open-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: var(--g1); width: 22px; height: 22px; cursor: pointer; opacity: 0; font-size: 12px; }
tr:hover .open-btn { opacity: 1; }
.thumb { width: 40px; height: 34px; margin-left: 6px; border: 1px solid var(--line); background: var(--g1); display: grid; place-items: center; cursor: pointer; padding: 0; overflow: hidden; color: var(--g3); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.flag-dot { position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; background: var(--yellow); }
td.empty { text-align: center; padding: 40px; color: var(--g3); }

.mini-pipe span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-pipe { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.mini-pipe .segs { display: flex; gap: 2px; }
.mini-pipe .segs i { width: 9px; height: 9px; background: var(--g1); border: 1px solid var(--g2); transform: skewX(-20deg); }
.mini-pipe .segs i.done { background: var(--black); border-color: var(--black); }
.mini-pipe .segs i.cur { background: var(--orange); border-color: var(--orange); }
.mini-pipe.s-installed .segs i.cur { background: var(--black); border-color: var(--black); }
.mini-pipe.s-installed span { font-weight: 600; }
.mini-pipe.s-hold span { background: var(--yellow); padding: 0 4px; }
.mini-pipe.s-cancelled { opacity: .6; }

/* Drawer */
.drawer-back { position: fixed; inset: 56px 0 0 0; z-index: 40; background: rgba(15,15,15,.25); display: flex; justify-content: flex-end; }
.drawer { width: min(760px, 100%); background: var(--white); display: flex; flex-direction: column; height: 100%; box-shadow: -10px 0 40px rgba(0,0,0,.15); }
.drawer-head { display: flex; align-items: flex-end; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.drawer-head .field { width: 160px; }
.drawer-head .field:first-child input { font-family: var(--font-mono); }
.drawer-body { overflow: auto; padding: 0 20px 40px; }
.name-field { padding: 16px 0 6px; }
.name-field input { font-family: var(--font-head) !important; font-weight: 700; font-stretch: 100%; font-variation-settings: "wght" 700, "wdth" 100; font-size: 26px !important; border: 0 !important; border-bottom: 2px solid var(--black) !important; padding: 4px 0 !important; border-radius: 0 !important; }
.name-field .lbl { display: none; }
.drawer section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sec-head h3 { margin: 0; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; flex: 1; }
.preview { border: 1px solid var(--line); }
.drawer-foot { display: flex; gap: 10px; padding: 20px 0 8px; }
.meta { margin-top: 6px; }

.stages .pipe { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; margin-bottom: 12px; }
.stage { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stage-chev { border: 0; background: var(--g1); color: var(--g3); height: 30px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .06em; cursor: pointer; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); padding-left: 8px; }
.stage:first-child .stage-chev { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); padding-left: 0; }
.stage.done .stage-chev { background: var(--black); color: var(--white); }
.stage.cur .stage-chev { background: var(--orange); color: var(--white); }
.stage input[type=date] { font-size: 10px; padding: 3px 2px !important; font-family: var(--font-mono); }
.stages .row { margin: 8px 0; }
.status-now b { font-size: 15px; }

.img-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; }
.img-slot { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.img-slot .lbl .dim { color: var(--g3); }
.drop { height: 150px; border: 1px dashed var(--g2); background: var(--g1); display: grid; place-items: center; cursor: pointer; overflow: hidden; }
.drop.has { border-style: solid; cursor: default; }
.drop.over { border-color: var(--orange); background: #FFF1EC; }
.drop img { max-width: 100%; max-height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 4px; flex-wrap: wrap; }
.thumbs .t { position: relative; width: 40px; height: 40px; border: 1px solid var(--line); background: var(--g1); padding: 0; cursor: pointer; }
.thumbs .t.primary { outline: 2px solid var(--black); }
.thumbs .t img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .t .x { position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%; border: 0; background: var(--black); color: var(--white); font-size: 11px; line-height: 1; cursor: pointer; display: none; }
.thumbs .t:hover .x { display: block; }
.thumbs .t.add { font-size: 18px; }

.activity { list-style: none; padding: 0; margin: 0; }
.activity li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; font-size: 13px; align-items: baseline; }
.activity li .when { width: 120px; flex-shrink: 0; }
.activity.compact li { font-size: 12px; padding: 6px 0; display: block; }
.chg { display: inline; margin-right: 8px; }
.chg i { font-style: normal; font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--g3); }
.chg s { color: var(--g3); }

/* Deck */
.deck-view .slides { padding: 24px 18px 60px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.deck-view .slides.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; gap: 18px; }
.slide-card { margin: 0; width: 100%; max-width: 1100px; }
.slide-card figcaption { margin-top: 6px; }
.fluid-slide { width: 100%; }
.slide { position: relative; overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 6px 24px rgba(15,15,15,.07); }
.slide.clickable { cursor: pointer; }
.slide.clickable:hover { outline: 2px solid var(--orange); }
.sl-abs { position: absolute; }
.sl-center { display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; }
.sl-text { overflow: hidden; }
.print-deck { display: none; }

/* Settings */
.page { padding: 28px 18px 80px; max-width: 1180px; margin: 0 auto; }
.page.narrow { max-width: 860px; }
.page > .head { font-size: 44px; }
.settings-grid { display: grid; gap: 18px; }
.card { background: var(--white); border: 1px solid var(--line); padding: 24px; }
.card .head { font-size: 24px; margin-bottom: 6px; }
.card form .btn, .card > div > .btn { margin-top: 14px; }
h3.sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; margin: 26px 0 12px; }
.mini-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.mini-table th { text-align: left; font-family: var(--font-mono); font-weight: 400; font-size: 10px; letter-spacing: .1em; color: var(--g3); padding: 6px; border-bottom: 1px solid var(--black); }
.mini-table td { padding: 6px; border-bottom: 1px solid var(--line); }
.mini-table tr.dim td { opacity: .5; }
.lists-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 12px 0; }
.add-user input, .add-user select { width: auto; flex: 1; min-width: 160px; }
.secret { background: var(--black); color: var(--white); padding: 18px; margin-bottom: 16px; }
.secret .eyebrow { color: var(--teal); }
.secret code.big { display: inline-block; font-size: 20px; background: #222; color: var(--white); padding: 6px 12px; margin: 4px 0 8px; }
.secret .btn { color: var(--white); border-color: #555; }
.secret .muted { color: var(--g2); }
.logo-prev { max-height: 48px; max-width: 200px; object-fit: contain; align-self: flex-start; background: var(--g1); padding: 4px; }

/* Modal + toasts */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(15,15,15,.5); display: grid; place-items: center; padding: 20px; }
.modal { background: var(--white); padding: 28px; width: 100%; max-width: 420px; }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--black); color: var(--white); padding: 10px 16px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.toast.error { background: var(--orange); }
.toast .linkbtn { color: var(--teal); }

@media (max-width: 760px) {
  .topbar { gap: 10px; padding: 0 10px; overflow-x: auto; }
  .topbar .brandline .dim, .sync { display: none; }
  .tab { padding: 0 8px; }
  .fields { grid-template-columns: 1fr; }
  .fields .field.half { grid-column: span 2; }
  .img-grid { grid-template-columns: 1fr; }
  .stages .pipe { grid-template-columns: repeat(4, 1fr); row-gap: 8px; }
  .table-wrap { margin: 0 8px 8px; }
}

@media print {
  @page { size: 13.333in 7.5in; margin: 0; }
  body { background: white; }
  .app > *:not(.main), .main > *:not(.deck-view), .deck-view > *:not(.print-deck), .toasts, .drawer-back { display: none !important; }
  .print-deck { display: block; }
  .print-page { width: 13.333in; height: 7.5in; overflow: hidden; break-after: page; page-break-after: always; }
  .print-page .slide { box-shadow: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Grid: view picker + column menu */
.view-pick { display: inline-flex; align-items: center; gap: 6px; }
.view-pick select { width: auto; }
.col-menu { position: relative; }
.col-menu .col-list { right: 0; left: auto; top: calc(100% + 4px); max-height: 60vh; overflow: auto; min-width: 220px; padding-bottom: 8px; }
.col-menu .col-list .check { display: flex; padding: 5px 14px; gap: 8px; font-size: 13px; cursor: pointer; }
.col-menu .col-list .check:hover { background: var(--g1); }

/* On-site status badges (grid column + gallery) */
.inv-badge { display: inline-block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; background: var(--g1); color: var(--g3); white-space: nowrap; }
.inv-badge.inv-progress { background: var(--yellow); color: var(--black); }
.inv-badge.inv-approved { background: var(--teal); color: var(--black); }
.inv-badge.inv-rejected { background: var(--orange); color: var(--white); }
.chip.inv-progress .n { background: var(--yellow); }
.chip.inv-approved .n { background: var(--teal); }
.chip.inv-rejected .n { background: var(--orange); color: var(--white); }

/* On-site gallery */
.inv-progress { display: flex; align-items: center; gap: 10px; }
.inv-progress .bar { width: 160px; height: 8px; background: var(--g1); display: flex; overflow: hidden; }
.inv-progress .bar .ok { background: var(--teal); }
.inv-progress .bar .bad { background: var(--orange); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding: 18px; }
.gallery .empty { grid-column: 1 / -1; text-align: center; color: var(--g3); padding: 40px; }
.g-card { display: flex; flex-direction: column; text-align: left; border: 1px solid var(--line); background: var(--white); padding: 0; cursor: pointer; font: inherit; color: inherit; border-top: 4px solid var(--g2); }
.g-card:hover { border-color: var(--black); }
.g-card.inv-progress { border-top-color: var(--yellow); }
.g-card.inv-approved { border-top-color: var(--teal); }
.g-card.inv-rejected { border-top-color: var(--orange); }
.g-img { aspect-ratio: 4 / 3; background: var(--g1); display: grid; place-items: center; overflow: hidden; }
.g-img img { width: 100%; height: 100%; object-fit: contain; }
.g-meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.g-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }

/* On-site checklist */
.checklist .drawer-head { align-items: center; }
.inv-title { font-size: 24px; margin: 2px 0 0; }
.inv-art { margin-top: 16px; background: var(--g1); height: 300px; display: grid; place-items: center; cursor: zoom-in; overflow: hidden; }
.inv-art img { max-width: 100%; max-height: 100%; object-fit: contain; }
.inv-zoom { max-width: 100%; max-height: 100%; object-fit: contain; }
.inv-spec { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 16px; margin: 16px 0; padding: 14px; background: var(--g1); }
.inv-spec dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--g3); text-transform: uppercase; }
.inv-spec dd { margin: 2px 0 0; font-weight: 600; }
.checklist .field { display: flex; flex-direction: column; gap: 4px; margin: 14px 0; }
.checks { list-style: none; padding: 0; margin: 6px 0; counter-reset: c; }
.checks li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); counter-increment: c; }
.checks li .q { flex: 1; font-size: 15px; }
.checks li .q::before { content: counter(c) '.'; font-family: var(--font-mono); font-size: 11px; color: var(--g3); margin-right: 8px; }
.yn { display: flex; gap: 6px; }
.yn button { min-width: 56px; height: 44px; border: 1px solid var(--g2); background: var(--white); font-weight: 600; font-size: 14px; cursor: pointer; }
.yn button.yes.on { background: var(--teal); border-color: var(--black); }
.yn button.no.on { background: var(--orange); border-color: var(--orange); color: var(--white); }
.yn button.na.on { background: var(--g2); border-color: var(--black); }
.inv-photos .thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.decision { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.decision .btn { height: 56px; font-size: 16px; }
.decision .approve.on { background: var(--teal); border-color: var(--black); }
.decision .reject.on { background: var(--orange); border-color: var(--orange); color: var(--white); }
.warn { color: #C42000; }
.inv-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }

@media (max-width: 760px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 10px; }
  .inv-progress .bar { width: 90px; }
  .checks li { flex-direction: column; align-items: stretch; gap: 8px; }
  .yn button { flex: 1; }
  .inv-art { height: 220px; }
}
.inv-photos .thumbs .t { width: 72px; height: 72px; }
.inv-photos .thumbs .t a { display: block; width: 100%; height: 100%; }
.inv-photos .thumbs .t .x { display: block; }
.inv-art.empty { height: 64px; cursor: default; }
.inv-cell { display: block; color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-cell.a-yes, .inv-cell.a-no, .inv-cell.a-na { display: inline-block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; padding: 2px 8px; }
.inv-cell.a-yes { background: var(--teal); }
.inv-cell.a-no { background: var(--orange); color: var(--white); }
.inv-cell.a-na { background: var(--g2); }

/* Item detail: on-site summary */
.onsite-sum .sum-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.onsite-sum .sum-head .btn { text-decoration: none; color: inherit; }
.sum-checks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.sum-checks li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.sum-checks .inv-cell { flex: none; font-weight: 500; }
.sum-checks .inv-cell.a-none { color: var(--g3); font-family: var(--font-mono); font-size: 11px; }
.sum-note { margin: 12px 0 0; white-space: pre-wrap; }
.sum-photos { margin-top: 12px; }
.sum-photos .t { width: 64px; height: 64px; display: block; }
@media (max-width: 760px) { .sum-checks { grid-template-columns: 1fr; } }
table.grid .inv-cell { display: flex; align-items: center; }
table.grid .inv-cell.a-yes, table.grid .inv-cell.a-no, table.grid .inv-cell.a-na { display: inline-flex; width: auto; height: auto; margin: 0 6px; }
