@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(fonts/barlow-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(fonts/barlow-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(fonts/barlow-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }

/* Base reset */
:root { color-scheme: light; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html, body { height: 100%; }
body { margin: 0; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; }
[hidden] { display: none !important; }
/* Layout: field-clipboard app. Sticky top bar, one column on phones; on desktop the checklist rows put result buttons beside the text and components run two-up. */
:root {
  --bg: #f3f5f4;
  --surface: #ffffff;
  --ink: #15201e;
  --muted: #5d6b68;
  --line: #d8dfdd;
  --accent: #0d6b5f;
  --accent-ink: #ffffff;
  --ok: #1d7a3e;   --ok-bg: #e2f3e7;
  --iss: #c0392b;  --iss-bg: #fbe5e2;
  --na: #66706e;   --na-bg: #e9eceb;
  --q: #a96a00;    --q-bg: #fbefd6;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #101716; --surface: #18211f; --ink: #e6eeec; --muted: #9aa9a5; --line: #2c3936;
  --accent: #3fb8a5; --accent-ink: #0b1513;
  --ok: #5fcf85; --ok-bg: #173323; --iss: #ff7a6b; --iss-bg: #3a1b18;
  --na: #a3adab; --na-bg: #242d2b; --q: #f0b54a; --q-bg: #3a2c12; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #101716; --surface: #18211f; --ink: #e6eeec; --muted: #9aa9a5; --line: #2c3936;
  --accent: #3fb8a5; --accent-ink: #0b1513;
  --ok: #5fcf85; --ok-bg: #173323; --iss: #ff7a6b; --iss-bg: #3a1b18;
  --na: #a3adab; --na-bg: #242d2b; --q: #f0b54a; --q-bg: #3a2c12; color-scheme: dark; }

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 var(--body); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 980px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; padding-block: 10px; }
.brand { font: 700 1.25rem/1.1 var(--display); letter-spacing: .02em; text-transform: uppercase; flex: 1; min-width: 0; }
.brand small { display: block; font: 500 .75rem var(--mono); color: var(--muted); letter-spacing: .04em; text-transform: none; }
.tabs { display: flex; gap: 4px; background: var(--bg); padding: 3px; border-radius: 8px; }
.tabs button { border: 0; background: transparent; padding: 6px 12px; border-radius: 6px; font-weight: 600; color: var(--muted); }
@media (max-width: 420px) { .tabs button { padding: 6px 8px; font-size: .9rem; } .brand small { display: none; } }
.tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }

main .wrap { padding-block: 16px 64px; display: grid; gap: 16px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; text-wrap: balance; line-height: 1.1; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; text-transform: uppercase; letter-spacing: .03em; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.banner { background: var(--q-bg); color: var(--ink); border: 1px solid var(--q); border-radius: 8px; padding: 10px 12px; font-size: .95rem; }
.banner.err { background: var(--iss-bg); border-color: var(--iss); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stat { background: var(--surface); padding: 10px 12px; }
.stat b { display: block; font: 700 1.6rem/1 var(--display); font-variant-numeric: tabular-nums; }
.stat span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat.p1 b { color: var(--iss); }
@media (max-width: 480px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.sites { display: grid; gap: 8px; }
@media (min-width: 860px) { .sites { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.site { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.site:hover { border-color: var(--accent); }
.site .num { font: 500 .9rem var(--mono); color: var(--muted); grid-row: span 2; }
.site .nm { font-weight: 600; min-width: 0; }
.site .meta { grid-column: 2 / 4; display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.bar { height: 6px; background: var(--na-bg); border-radius: 3px; overflow: hidden; flex: 1; min-width: 80px; }
.bar i { display: block; height: 100%; background: var(--accent); }
.chip { display: inline-block; font: 600 .72rem/1 var(--body); text-transform: uppercase; letter-spacing: .05em; padding: 4px 7px; border-radius: 4px; white-space: nowrap; }
.chip.done, .chip.good { background: var(--ok-bg); color: var(--ok); }
.chip.prog, .chip.fair { background: var(--q-bg); color: var(--q); }
.chip.none { background: var(--na-bg); color: var(--na); }
.chip.p1, .chip.poor, .chip.faulty { background: var(--iss-bg); color: var(--iss); }
.chip.p2 { background: var(--q-bg); color: var(--q); }
.chip.p3 { background: var(--na-bg); color: var(--na); }

.back { border: 0; background: none; color: var(--accent); font-weight: 600; padding: 0; justify-self: start; }
.sitehead { display: grid; gap: 6px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.panel > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary h2 { flex: 1; min-width: 0; font-size: 1.15rem; }
.panel > summary .letter { font: 700 1.15rem var(--display); color: var(--accent); width: 1.4rem; }
.panel > summary .cnt { font: 500 .8rem var(--mono); color: var(--muted); text-align: right; }
.panel > summary::after { content: "+"; font: 600 1.2rem var(--mono); color: var(--muted); }
.panel[open] > summary::after { content: "–"; }
.panel .body { border-top: 1px solid var(--line); }
.group-label { font: 600 .78rem var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 8px; }

.fields { display: grid; gap: 12px; padding: 14px; }
@media (min-width: 720px) { .fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fields.two .full { grid-column: 1 / -1; } }
.field { display: grid; gap: 4px; min-width: 0; }
.field label, .issbox label { font-size: .82rem; color: var(--muted); font-weight: 500; }
.field input, .field textarea, .field select, textarea.note, input.act, select { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; min-width: 0; }
textarea { resize: vertical; min-height: 2.6rem; }

/* Diagrams */
.diagrams { display: grid; gap: 12px; padding: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.dg { display: grid; gap: 6px; min-width: 0; }
.dg button.pic { border: 1px solid var(--line); border-radius: 8px; padding: 0; background: #fff; overflow: hidden; aspect-ratio: 16 / 10; max-width: 100%; }
.dg button.pic img { width: 100%; height: 100%; object-fit: contain; }
.dg .cap { font-size: .88rem; display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.dg .warn { font-size: .82rem; color: var(--q); }
.dgempty { padding: 14px; color: var(--muted); }

/* Checklist items */
.item { padding: 14px; display: grid; gap: 10px; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item.st-ISS { box-shadow: inset 3px 0 0 var(--iss); }
.item-top { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 8px; }
.item-top .code { font: 500 .85rem/1.6 var(--mono); color: var(--muted); }
.item-top p { margin: 0; }
@media (min-width: 760px) {
  .item { grid-template-columns: minmax(0, 1fr) 300px; column-gap: 20px; align-items: start; }
  .item > *:not(.item-top):not(.seg.res) { grid-column: 1 / -1; }
}
.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.seg.pri, .seg.cond3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg.cond { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg button { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 9px 0; font-weight: 600; font-size: .9rem; min-height: 42px; }
.seg button[data-v="OK"][aria-pressed="true"], .seg button[data-v="Good"][aria-pressed="true"] { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.seg button[data-v="ISS"][aria-pressed="true"], .seg button[data-v="P1"][aria-pressed="true"], .seg button[data-v="Poor"][aria-pressed="true"], .seg button[data-v="Faulty"][aria-pressed="true"] { background: var(--iss-bg); border-color: var(--iss); color: var(--iss); }
.seg button[data-v="NA"][aria-pressed="true"], .seg button[data-v="P3"][aria-pressed="true"] { background: var(--na-bg); border-color: var(--na); color: var(--na); }
.seg button[data-v="Q"][aria-pressed="true"], .seg button[data-v="P2"][aria-pressed="true"], .seg button[data-v="Fair"][aria-pressed="true"] { background: var(--q-bg); border-color: var(--q); color: var(--q); }
.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tool { border: 1px dashed var(--line); background: transparent; border-radius: 6px; padding: 7px 12px; font-size: .88rem; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.tool svg { width: 18px; height: 18px; }
.tool.danger { color: var(--iss); }
.tool.danger.armed { background: var(--iss-bg); border-style: solid; border-color: var(--iss); }
.issbox { display: grid; gap: 8px; background: var(--iss-bg); border-radius: 8px; padding: 10px; }
.media { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { width: 76px; height: 76px; border-radius: 6px; border: 1px solid var(--line); background: var(--na-bg); padding: 0; overflow: hidden; position: relative; display: grid; place-items: center; color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .play { width: 30px; height: 30px; }
.thumb.up { font-size: .72rem; text-align: center; padding: 4px; }
.thumb.up::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 40%; background: var(--accent); animation: slide 1s infinite linear; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { .thumb.up::after { animation: none; width: 100%; } }
.upfail { font-size: .85rem; color: var(--iss); }

/* Components */
.comps { display: grid; gap: 10px; padding: 14px; }
@media (min-width: 860px) { .comps { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } .comps .addbar { grid-column: 1 / -1; } .comps .comp.open { grid-column: 1 / -1; } }
.comp { border: 1px solid var(--line); border-radius: 8px; background: var(--bg); min-width: 0; }
.comp > button.head { width: 100%; border: 0; background: none; text-align: left; padding: 10px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; }
.comp .ty { font: 600 .72rem var(--body); text-transform: uppercase; letter-spacing: .07em; color: var(--accent); }
.comp .nm { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.comp .sub { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.comp .right { grid-row: 1 / 3; grid-column: 2; display: grid; gap: 4px; justify-items: end; align-content: start; }
.comp .fields { border-top: 1px solid var(--line); background: var(--surface); border-radius: 0 0 8px 8px; }
.addbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.addbar select { width: auto; flex: 1; min-width: 160px; max-width: 280px; }

.primary { border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 11px 16px; border-radius: 8px; }
.secondary { border: 1px solid var(--line); background: var(--surface); font-weight: 600; padding: 10px 14px; border-radius: 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.finding { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; }
.finding .hd { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.finding .hd .site-l { font-weight: 600; color: var(--ink); }
.finding p { margin: 0; }
.finding .act { font-size: .9rem; color: var(--muted); }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; }

/* Viewer */
.lb { position: fixed; inset: 0; z-index: 20; background: rgb(0 0 0 / .9); display: grid; grid-template-rows: auto minmax(0, 1fr); padding: calc(env(safe-area-inset-top, 0px) + 10px) max(12px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 12px) max(12px, env(safe-area-inset-left, 0px)); gap: 10px; }
.lb .bar2 { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.lb .bar2 .ttl { color: #fff; font-weight: 600; margin-right: auto; min-width: 0; }
.lb .bar2 button, .lb .bar2 a { border: 1px solid rgb(255 255 255 / .35); background: rgb(255 255 255 / .1); color: #fff; padding: 8px 12px; border-radius: 6px; font-weight: 600; text-decoration: none; font-size: .9rem; }
.lb .bar2 button.danger { border-color: #ff7a6b; color: #ffb3aa; }
.lb .stage { display: grid; place-items: center; min-height: 0; }
.lb .stage.zoom { display: block; overflow: auto; -webkit-overflow-scrolling: touch; background: #fff; border-radius: 6px; }
.lb .stage.zoom img { max-width: none; display: block; }
.lb img, .lb video { max-width: 100%; max-height: 100%; border-radius: 6px; }
/* Country groups */
.country { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.country h2 { font-size: 1.2rem; }

/* Tasks */
.tasks { display: grid; gap: 8px; padding: 14px; }
.task { border: 1px solid var(--line); border-radius: 8px; background: var(--bg); min-width: 0; }
.task.done .ttl-t { text-decoration: line-through; color: var(--muted); }
.task-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
.check { width: 44px; height: 44px; margin: 4px; border: 2px solid var(--line); border-radius: 8px; background: var(--surface); display: grid; place-items: center; color: transparent; font-weight: 700; }
.check[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: var(--accent-ink); }
.task-open { border: 0; background: none; text-align: left; padding: 8px 12px 8px 4px; display: grid; gap: 4px; min-width: 0; }
.task-open .ttl-t { font-weight: 600; overflow-wrap: anywhere; }
.task-open .tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: .82rem; color: var(--muted); }
.chip.hw { background: var(--iss-bg); color: var(--iss); }
.chip.site-c { background: var(--na-bg); color: var(--ink); text-transform: none; letter-spacing: 0; }
.needs { display: grid; gap: 8px; }
.need { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) 4.5rem 2.6rem; gap: 6px; align-items: center; }
.need select, .need input { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px; min-width: 0; }
.need .x { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; height: 40px; color: var(--iss); font-weight: 700; }
.need .x.armed { background: var(--iss-bg); border-color: var(--iss); }
@media (max-width: 460px) { .need { grid-template-columns: minmax(0, 1fr) 4.2rem 2.6rem; } .need select { grid-column: 1 / -1; } }
.needhead { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) 4.5rem 2.6rem; gap: 6px; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 460px) { .needhead { display: none; } }
.tablewrap { overflow-x: auto; }
table.shop { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.shop th, table.shop td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.shop th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
table.shop td.q { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
table.shop th.q { text-align: right; }

/* Issues, info and wishes log */
.logs { display: grid; gap: 10px; padding: 14px; }
.prompts { margin: 0; padding-left: 1.2em; color: var(--muted); font-size: .9rem; display: grid; gap: 2px; }
.logent { display: grid; gap: 8px; grid-template-columns: 11rem minmax(0, 1fr); border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--bg); }
.logent .full { grid-column: 1 / -1; }
.logent select, .logent input, .logent textarea { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px; min-width: 0; }
@media (max-width: 520px) { .logent { grid-template-columns: minmax(0, 1fr); } }
.cat-Wish, .cat-Request { box-shadow: inset 3px 0 0 var(--accent); }
.cat-Known-issue, .cat-Common-complaint, .cat-Recent-outage { box-shadow: inset 3px 0 0 var(--iss); }
.tasklink { font-size: .85rem; color: var(--ok); font-weight: 600; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; z-index: 30; font-size: .9rem; max-width: calc(100% - 32px); }

/* ---------- self-hosted additions ---------- */
.top .user { position: relative; }
.top .user > button { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; width: 38px; height: 38px; font: 600 .9rem var(--body); color: var(--accent); }
.menu { position: absolute; right: 0; top: 46px; z-index: 8; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / .15); min-width: 220px; padding: 6px; display: grid; }
.menu .who { padding: 8px 10px; font-size: .9rem; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu .who small { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
.menu button { text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 6px; font-weight: 500; }
.menu button:hover { background: var(--bg); }
.loginwrap { min-height: 100%; display: grid; place-items: center; padding-block: 40px; }
.loginbox { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: grid; gap: 14px; }
.loginbox .brand { font-size: 1.6rem; }
.err { color: var(--iss); font-size: .9rem; }
.ok-msg { color: var(--ok); font-size: .9rem; }
body.ro .edit-only { display: none !important; }
.rolebadge { font-size: .8rem; color: var(--muted); }

/* Diagram */
.dgbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.dgbar .sp { flex: 1; }
.dgbar button { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 7px 10px; font-weight: 600; font-size: .85rem; }
.dgbar button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.dgview { overflow: auto; max-height: 70vh; background: var(--dg-bg); -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }
.dgview.full { position: fixed; inset: 0; z-index: 15; max-height: none; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.dgview svg { display: block; }
.dgview.editing .node { cursor: grab; }
.dglegend { display: flex; gap: 14px; flex-wrap: wrap; padding: 8px 14px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); }
.dglegend i { display: inline-block; width: 26px; height: 0; border-top: 3px solid; vertical-align: middle; margin-right: 6px; }
.dghint { padding: 8px 14px; font-size: .85rem; color: var(--muted); }
.fsclose { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); right: calc(env(safe-area-inset-right, 0px) + 10px); z-index: 16; }
.originals { display: grid; gap: 12px; padding: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
:root { --dg-bg: #fbfcfc; --dg-node: #ffffff; --dg-ink: #15201e; --dg-line: #5d6b68; --dg-fiber: #c26a00; --dg-wifi: #0d6b5f; --dg-cat6: #2457a6; --dg-un: #c0392b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --dg-bg: #121a19; --dg-node: #1c2725; --dg-ink: #e6eeec; --dg-line: #9aa9a5; --dg-fiber: #f0a447; --dg-wifi: #3fb8a5; --dg-cat6: #7aa7f0; --dg-un: #ff7a6b; } }
:root[data-theme="dark"] { --dg-bg: #121a19; --dg-node: #1c2725; --dg-ink: #e6eeec; --dg-line: #9aa9a5; --dg-fiber: #f0a447; --dg-wifi: #3fb8a5; --dg-cat6: #7aa7f0; --dg-un: #ff7a6b; }

/* Asset tag */
.tagrow { display: flex; gap: 6px; }
.tagrow input { flex: 1; font-family: var(--mono); }
.tagrow button { white-space: nowrap; }
.warnline { font-size: .82rem; color: var(--q); }
.chip.tag { background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-family: var(--mono); text-transform: none; letter-spacing: 0; }

/* Admin */
.admin-grid { display: grid; gap: 16px; }
table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th, table.list td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
table.list input, table.list select { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; width: 100%; min-width: 0; }
.formrow { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }

/* Upload progress */
.thumb.up .pct { font-family: var(--mono); }

/* Print report */
#print { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff !important; color: #000 !important; font-size: 10.5pt; }
  body::before, .top, main, #lb, #toast { display: none !important; }
  #print { display: block; }
  #print h1 { font-size: 20pt; margin-bottom: 2mm; }
  #print h2 { font-size: 13pt; margin: 6mm 0 2mm; break-after: avoid; }
  #print table { width: 100%; border-collapse: collapse; font-size: 9pt; }
  #print th, #print td { border-bottom: 0.3mm solid #999; padding: 1.2mm 1.5mm; text-align: left; vertical-align: top; }
  #print th { background: #eef2f1; }
  #print tr { break-inside: avoid; }
  #print .dgprint svg { width: 100%; height: auto; max-height: 160mm; }
  #print .meta { color: #444; }
}
main .wrap { grid-template-columns: minmax(0, 1fr); }
.panel, .panel .body, .dgview { min-width: 0; max-width: 100%; }
