/* UCODEN Lab equipment register. Colours and type follow ucoden.com: ocean teal, coral for the one
   action that finds things (scanning), Archivo for Latin text and figures. */

@font-face { font-family: "Archivo"; src: url("/fonts/archivo-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #F5F7F6; --surface: #FFFFFF; --tint: #EBF1F1; --ink: #08182A; --muted: #4E6474; --line: #D6DFE2;
  --teal: #0B7A8C; --on-teal: #FFFFFF; --coral: #F26B21; --danger: #B3261E; --warn: #9A5B00;
  --st-in_use: #0B7A8C; --st-idle: #6B7F8C; --st-repair: #B26A00; --st-lost: #B3261E; --st-retired: #8A8F93;
  --sticker: #FFFFFF; --sticker-ink: #08182A;
  --sans: "Archivo", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --nav-h: 62px; --bar-h: 56px; --r: 12px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0B141B; --surface: #101C25; --tint: #16252F; --ink: #E4EDF1; --muted: #9DB1BD; --line: #22323D;
    --teal: #4CC3D4; --on-teal: #062027; --danger: #FF8A80; --warn: #F2B450;
    --st-in_use: #4CC3D4; --st-idle: #9DB1BD; --st-repair: #F2B450; --st-lost: #FF8A80; --st-retired: #7C8A93;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; overflow-x: clip; }
h1, h2, h3, p { margin: 0; }
a { color: var(--teal); text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1 1 auto; min-width: 0; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot img { width: 72px; height: 72px; }

/* ---- shell: bottom bar on phones, side rail on wide screens ---- */
.shell { min-height: 100dvh; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
.main { max-width: 760px; margin: 0 auto; }
.nav { position: fixed; z-index: 20; inset: auto 0 0 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: 1fr 88px 1fr; align-items: center; background: var(--surface); border-top: 1px solid var(--line); }
.nav-brand { display: none; }
.nav-item { display: grid; justify-items: center; gap: 1px; padding: 6px 0; color: var(--muted); font-size: 12px; font-weight: 500; }
.nav-item[aria-current="page"] { color: var(--teal); }
/* The scan button is the logo's target dot: the one coral thing on the screen. */
.nav-scan { justify-self: center; width: 60px; height: 60px; margin-top: -22px; border-radius: 50%; display: grid; place-items: center; background: var(--coral); color: #fff;
  box-shadow: 0 0 0 5px var(--surface), 0 0 0 6px var(--line); }
.nav-scan .icon { width: 28px; height: 28px; stroke-width: 2; }
.nav-scan[aria-current="page"] { box-shadow: 0 0 0 5px var(--surface), 0 0 0 7px var(--coral); }

@media (min-width: 900px) {
  .shell { padding: 0 0 0 220px; }
  .main { max-width: 980px; padding: 0 12px; }
  .nav { inset: 0 auto 0 0; width: 220px; height: auto; padding: 18px 14px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; border-top: 0; border-right: 1px solid var(--line); }
  .nav-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: var(--ink); font-weight: 600; letter-spacing: .01em; }
  .nav-brand img { width: 34px; height: 34px; }
  .nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: 15px; }
  .nav-item[aria-current="page"] { background: var(--tint); }
  .nav-scan { order: 5; width: auto; height: 44px; margin: 14px 0 0; border-radius: 22px; display: flex; gap: 8px; justify-content: center; font-weight: 600; font-size: 15px; box-shadow: none; }
  .nav-scan[aria-current="page"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--coral); }
  .nav-scan .icon { width: 22px; height: 22px; }
}
@media (max-width: 899px) { .nav-scan span { display: none; } }

/* ---- page bar ---- */
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 4px; min-height: var(--bar-h); padding: env(safe-area-inset-top) 8px 0 16px; background: var(--paper); }
.bar.has-back { padding-left: 4px; }
.bar h1 { flex: 1 1 auto; min-width: 0; font-size: 20px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar.big h1 { font-size: 26px; }
.page { padding: 4px 16px 32px; }
.section { margin-top: 28px; }
.section > h2 { font-size: 15px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.lead { color: var(--muted); max-width: 46em; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--teal); border-color: var(--teal); color: var(--on-teal); font-weight: 600; }
.btn-danger { color: var(--danger); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--teal); padding: 0 10px; }
.btn-block { display: flex; width: 100%; }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; flex: none; }
.icon-btn:active, .btn:active { background-color: var(--tint); }
.btn-primary:active { background-color: var(--teal); opacity: .85; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn-row.end { justify-content: flex-end; }

/* ---- forms ---- */
.field { display: block; margin-top: 16px; }
.field > span, .field > label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.field .hint { margin-top: 6px; font-size: 13px; color: var(--muted); }
.field .err { margin-top: 6px; font-size: 13px; color: var(--danger); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], input[type="date"], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 16px; -webkit-appearance: none; appearance: none; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select { padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: -1px; border-color: transparent; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); }
.cols { display: grid; gap: 0 14px; grid-template-columns: 1fr 1fr; }
.cols-3 { display: grid; gap: 0 14px; grid-template-columns: 2fr 1fr; }
@media (max-width: 340px) { .cols { grid-template-columns: 1fr; } }
.with-btn { display: flex; gap: 8px; }
.with-btn > :first-child { flex: 1 1 auto; min-width: 0; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 16px; min-height: 30px; }
.check input { width: 20px; height: 20px; accent-color: var(--teal); }
fieldset { border: 0; padding: 0; margin: 0; }
.group { margin-top: 28px; }
.group > legend, .group > h2 { padding: 0; font-size: 15px; font-weight: 600; color: var(--muted); }
.notice { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--tint); font-size: 14px; }
.notice.bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, var(--surface)); }
.notice.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.notice p + p { margin-top: 8px; }
.code { font-weight: 600; font-size: 22px; letter-spacing: .08em; font-variant-numeric: tabular-nums; user-select: all; }

/* ---- sign-in and setup ---- */
.auth { min-height: 100dvh; display: grid; align-content: center; padding: 32px 22px calc(32px + env(safe-area-inset-bottom)); max-width: 440px; margin: 0 auto; }
.auth-mark { width: 76px; height: 76px; }
.auth h1 { margin-top: 18px; font-size: 26px; font-weight: 600; line-height: 1.2; }
.auth .lead { margin-top: 8px; }
.auth-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; font-size: 14px; }

/* ---- the tag, drawn like the sticker on the equipment ---- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px 1px 5px; border: 1.5px solid var(--sticker-ink); border-radius: 6px; background: var(--sticker); color: var(--sticker-ink);
  font-weight: 600; font-size: 13px; line-height: 1.55; letter-spacing: .03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag svg { width: 12px; height: 12px; fill: currentColor; flex: none; }
.tag.large { font-size: 17px; padding: 3px 12px 3px 8px; border-width: 2px; border-radius: 8px; }
.tag.large svg { width: 16px; height: 16px; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dot, var(--muted)); }
.status[data-status="in_use"] { --dot: var(--st-in_use); }
.status[data-status="idle"] { --dot: var(--st-idle); }
.status[data-status="repair"] { --dot: var(--st-repair); color: var(--st-repair); }
.status[data-status="lost"] { --dot: var(--st-lost); color: var(--st-lost); }
.status[data-status="retired"] { --dot: var(--st-retired); color: var(--st-retired); }

/* ---- equipment list ---- */
.search { position: relative; margin: 2px 16px 0; }
.search .icon { position: absolute; left: 12px; top: 12px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 42px; border-radius: 23px; }
.segments { display: flex; gap: 6px; padding: 12px 16px 4px; overflow-x: auto; scrollbar-width: none; }
.segments::-webkit-scrollbar { display: none; }
.seg { flex: none; min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 18px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; }
.seg b { font-weight: 500; margin-left: 5px; font-variant-numeric: tabular-nums; opacity: .75; }
.seg[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.toolbar { display: flex; align-items: center; gap: 4px; padding: 4px 8px 4px 16px; min-height: 44px; font-size: 14px; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 6px; }
.pill { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 4px 0 11px; border-radius: 15px; background: var(--tint); font-size: 13px; }
.pill button { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.pill .icon { width: 15px; height: 15px; }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); background: var(--surface); }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
.row-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 3px; }
.row-name { font-size: 17px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row-where { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-side, .rows-head { display: none; }
.under-gallery { padding: 0 16px; }
.thumb { width: 60px; height: 60px; border-radius: 10px; background: var(--tint); object-fit: cover; flex: none; }
.thumb.none { display: grid; place-items: center; color: var(--muted); }
.row-check { width: 22px; height: 22px; accent-color: var(--teal); flex: none; }
.more-rows { padding: 16px; text-align: center; color: var(--muted); font-size: 14px; }
.fab { position: fixed; z-index: 15; right: 16px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); min-height: 50px; padding: 0 20px 0 16px; border-radius: 25px; border: 0;
  background: var(--teal); color: var(--on-teal); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 4px 14px rgba(8, 24, 42, .22); cursor: pointer; }
.selectbar { position: fixed; z-index: 16; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--ink); color: var(--paper); }
.selectbar .btn { background: var(--paper); color: var(--ink); border-color: transparent; min-height: 38px; }
@media (min-width: 900px) {
  .row-side { display: block; width: 150px; flex: none; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rows-head { display: flex; gap: 12px; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
  .fab { right: 32px; bottom: 32px; }
  .selectbar { left: 220px; bottom: 0; }
  .rows { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
  .row:last-child { border-bottom: 0; }
}

.empty { padding: 56px 24px; text-align: center; color: var(--muted); }
.empty h2 { font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.empty .btn-row { justify-content: center; }

/* ---- one piece of equipment ---- */
.gallery { display: flex; gap: 8px; padding: 0 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.shot { position: relative; flex: none; width: min(78vw, 360px); aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--tint); scroll-snap-align: center; border: 0; padding: 0; cursor: zoom-in; }
.shot:only-child { width: 100%; max-width: 560px; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot .flag { position: absolute; left: 8px; top: 8px; padding: 1px 8px; border-radius: 6px; background: rgba(8, 24, 42, .72); color: #fff; font-size: 12px; }
.no-photo { margin: 0 16px; padding: 22px 16px; border: 1.5px dashed var(--line); border-radius: var(--r); text-align: center; color: var(--muted); }
.headline { padding: 14px 16px 0; }
.headline h2 { font-size: 24px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.headline-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 10px; }
.facts { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.facts > div { display: flex; gap: 14px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { flex: none; width: 6.5em; color: var(--muted); font-size: 14px; padding-top: 1px; }
.facts dd { margin: 0; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.files { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.files li { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-bottom: 1px solid var(--line); }
.files li:last-child { border-bottom: 0; }
.files a { flex: 1 1 auto; min-width: 0; color: var(--ink); display: grid; padding: 6px 0; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.history li:last-child { border-bottom: 0; }
.history .who { color: var(--muted); font-size: 13px; }
.history .change { overflow-wrap: anywhere; }
.inline-select { width: auto; min-height: 36px; padding: 4px 30px 4px 10px; font-size: 16px; border-radius: 8px; background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; }
@media (min-width: 900px) {
  .detail-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 0 28px; align-items: start; }
  .detail-grid .gallery, .detail-grid .no-photo { padding: 0; margin: 0; flex-wrap: wrap; }
  .detail-grid .shot { width: calc(50% - 4px); }
  .detail-grid .shot:first-child { width: 100%; }
  .detail-grid .headline { padding: 0; }
  .detail-grid .page { padding-left: 0; padding-right: 0; }
  .detail-grid .under-gallery { padding: 0; }
}

/* ---- sheets, dialogs, toasts ---- */
.backdrop { position: fixed; inset: 0; z-index: 40; display: grid; align-items: end; background: rgba(8, 24, 42, .45); }
.sheet { width: 100%; max-height: 92dvh; overflow-y: auto; padding: 8px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--paper); }
.sheet-head { display: flex; align-items: center; gap: 8px; min-height: 52px; position: sticky; top: -8px; background: var(--paper); margin: 0 -6px; padding: 0 0 0 6px; z-index: 1; }
.sheet-head h2 { flex: 1 1 auto; font-size: 18px; font-weight: 600; }
@media (min-width: 640px) {
  .backdrop { align-items: center; justify-items: center; }
  .sheet { width: min(520px, calc(100vw - 48px)); border-radius: 18px; padding-bottom: 22px; }
}
.toasts { position: fixed; z-index: 60; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { max-width: 520px; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: 14px; box-shadow: 0 6px 20px rgba(8, 24, 42, .25); }
.toast.bad { background: var(--danger); color: #fff; }
.viewer { position: fixed; inset: 0; z-index: 50; background: #000; display: grid; grid-template-rows: auto 1fr; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; padding: env(safe-area-inset-top) 6px 0; color: #fff; }
.viewer-bar .icon-btn, .viewer-bar .btn-quiet { color: #fff; }
.viewer img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }

/* ---- scanning ---- */
.scan { position: fixed; inset: 0 0 calc(var(--nav-h) + env(safe-area-inset-bottom)) 0; background: #000; color: #fff; display: grid; grid-template-rows: 1fr auto; }
@media (min-width: 900px) { .scan { inset: 0 0 0 220px; } }
.scan-stage { position: relative; overflow: hidden; display: grid; place-items: center; }
.scan-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reticle { position: relative; width: min(64vw, 300px); aspect-ratio: 1; border-radius: 22px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .42); }
.reticle::before, .reticle::after { content: ""; position: absolute; inset: -2px; border: 3px solid #fff; border-radius: 24px; clip-path: polygon(0 0, 26% 0, 26% 8%, 74% 8%, 74% 0, 100% 0, 100% 26%, 92% 26%, 92% 74%, 100% 74%, 100% 100%, 74% 100%, 74% 92%, 26% 92%, 26% 100%, 0 100%, 0 74%, 8% 74%, 8% 26%, 0 26%); }
.reticle::after { display: none; }
.reticle.found::after { display: block; border-color: var(--coral); animation: ping .5s ease-out forwards; clip-path: none; }
@keyframes ping { from { transform: scale(.55); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .reticle.found::after { animation: none; opacity: 1; transform: none; } }
.scan-top { position: absolute; top: env(safe-area-inset-top); left: 0; right: 0; display: flex; justify-content: space-between; padding: 8px; z-index: 2; }
.scan-top .icon-btn { color: #fff; background: rgba(0, 0, 0, .35); }
.scan-msg { position: absolute; left: 20px; right: 20px; bottom: 18px; text-align: center; font-size: 15px; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); z-index: 2; }
.scan-manual { display: flex; gap: 8px; padding: 12px 14px; background: #0A1A26; }
.scan-manual input { background: #132B3B; border-color: #1F3D50; color: #fff; text-transform: uppercase; }
.scan-manual input::placeholder { color: #8FA8B6; text-transform: none; }

/* ---- lists used in settings ---- */
.menu { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.menu li { border-bottom: 1px solid var(--line); }
.menu li:last-child { border-bottom: 0; }
.menu > li > a, .menu > li > .menu-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px 8px 14px; color: var(--ink); }
.menu > li > a > .icon:first-child, .menu > li > .menu-row > .icon:first-child { color: var(--teal); }
.choice { display: flex; gap: 6px; flex: none; }
.menu .chev { color: var(--muted); width: 18px; height: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.item { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 6px 8px 14px; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item .sub { font-size: 13px; color: var(--muted); }
.item.off .grow { opacity: .55; }
.badge { padding: 1px 8px; border-radius: 6px; background: var(--tint); font-size: 12px; font-weight: 500; white-space: nowrap; }
.indent-1 { padding-left: 34px; } .indent-2 { padding-left: 54px; } .indent-3 { padding-left: 74px; } .indent-4 { padding-left: 94px; } .indent-5 { padding-left: 114px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
th { font-weight: 600; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.progress { height: 6px; border-radius: 3px; background: var(--tint); overflow: hidden; margin-top: 12px; }
.progress i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .2s; }

/* ---- labels ---- */
.label-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.label-face { position: relative; background: #fff; color: #000; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; flex: none; }
.label-face svg { position: absolute; }
.label-face span { position: absolute; display: block; overflow: hidden; white-space: nowrap; font-family: var(--sans); line-height: 1.15; }
.label-face .l-tag { font-weight: 600; letter-spacing: .02em; }
.label-face .l-name { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
#print-root { display: none; }
@media print {
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block; }
  body { background: #fff; }
  .label-face { border: 0; border-radius: 0; break-inside: avoid; }
  .print-page { break-after: page; page-break-after: always; position: relative; overflow: hidden; }
  .print-page:last-child { break-after: auto; page-break-after: auto; }
  .print-sheet { display: grid; align-content: start; }
}
