/* ESL M&E Hub. Design language follows the other ASA M&E apps (FA Garden, ESL Poultry): brand header and menu,
   white cards on a warm page, status colours only as a dot beside a text label, chart colours by pathway. */
:root {
  color-scheme: light only;
  --brand:#AD1457; --brand-2:#880E4F; --accent:#AD1457; --accent-ink:#880E4F; --tint:#FCE4EC; --band:#FDF2F6;
  --page:#f9f9f7; --card:#ffffff; --ink:#0b0b0b; --ink-2:#52514e; --muted:#6b6a65; --grid:#e1e0d9; --axis:#c3c2b7;
  --border:rgba(11,11,11,.10); --border-strong:rgba(11,11,11,.20);
  --good:#0ca30c; --good-ink:#006300; --watch:#fab219; --watch-ink:#7a5200; --bad:#d03b3b; --bad-ink:#a02525; --nodata:#a9a8a2;
  --danger-bg:#fdecec; --warn-bg:#fff6e0; --ok-bg:#e9f7e9;
  --header-h:56px;
}
* { box-sizing:border-box; }
html, body { margin:0; background:var(--page); color:var(--ink); }
body { font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif; font-size:14px; line-height:1.5; -webkit-font-smoothing:antialiased; }
body.modal-open { overflow:hidden; }
a { color:var(--accent-ink); }
h1,h2,h3,h4 { line-height:1.25; margin:0; }
h1 { font-size:22px; font-weight:700; } h2 { font-size:19px; font-weight:650; } h3 { font-size:15px; font-weight:650; margin-bottom:8px; } h4 { font-size:13px; margin:12px 0 4px; color:var(--ink-2); }
p { margin:0 0 8px; }
button, input, select, textarea { font:inherit; color:inherit; }
code { background:#efefec; padding:1px 6px; border-radius:4px; font-size:12.5px; word-break:break-all; }
.num { font-variant-numeric:tabular-nums; }
.muted { color:var(--ink-2); } .small { font-size:12px; } .center { text-align:center; } .hidden { display:none !important; }
.skip { position:absolute; left:-999px; top:0; background:#fff; padding:8px 12px; z-index:300; } .skip:focus { left:8px; top:8px; }
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
::selection { background:var(--tint); }

/* header */
header.top { background:var(--brand); color:#fff; min-height:var(--header-h); display:flex; align-items:center; justify-content:space-between; gap:10px; padding:6px 18px; position:sticky; top:0; z-index:60; padding-top:calc(6px + env(safe-area-inset-top,0px)); }
header.top .brand { display:flex; align-items:center; gap:10px; min-width:0; }
header.top .logo { width:32px; height:32px; border-radius:8px; background:rgba(255,255,255,.18); display:grid; place-items:center; font-size:11px; font-weight:800; letter-spacing:.04em; flex:0 0 32px; }
header.top h1 { font-size:16px; font-weight:650; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
header.top .t-short { display:none; }
header.top .who { display:flex; align-items:center; gap:8px; }
header.top button.back { display:none; background:rgba(255,255,255,.16); color:#fff; border:0; border-radius:8px; min-width:44px; min-height:44px; cursor:pointer; place-items:center; }
.whobtn { background:rgba(255,255,255,.14); color:#fff; border:1px solid rgba(255,255,255,.35); border-radius:8px; padding:4px 10px; min-height:40px; display:flex; align-items:center; gap:8px; cursor:pointer; text-align:right; }
.whobtn b { display:block; font-size:13px; line-height:1.2; max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .whobtn i { display:block; font-style:normal; font-size:11px; opacity:.85; }
.syncpill { display:inline-flex; align-items:center; gap:6px; border:1px solid rgba(255,255,255,.4); background:rgba(255,255,255,.14); color:#fff; border-radius:999px; padding:0 12px; min-height:40px; font-size:12.5px; font-weight:600; cursor:pointer; white-space:nowrap; }
.syncpill.offline { background:#fff6e0; color:#0b0b0b; border-color:#fff6e0; } .syncpill.waiting { background:#fff; color:var(--brand-2); } .syncpill.failed { background:#fdecec; color:#8e1f1f; border-color:#fdecec; }
.syncpill.syncing svg { animation:spin 1s linear infinite; } @keyframes spin { to { transform:rotate(360deg); } }
.netbar { background:var(--warn-bg); border-bottom:1px solid var(--border-strong); padding:8px 18px; font-size:13px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; position:relative; z-index:55; }

/* shell */
.shell { display:flex; align-items:flex-start; }
nav.side { width:216px; flex:0 0 216px; background:var(--brand-2); min-height:calc(100vh - var(--header-h)); position:sticky; top:var(--header-h); padding:12px 0; }
nav.side button { display:flex; width:100%; align-items:center; gap:10px; background:none; border:0; border-left:3px solid transparent; color:rgba(255,255,255,.92); padding:11px 16px; text-align:left; cursor:pointer; font-size:14px; }
nav.side button:hover { background:rgba(255,255,255,.10); }
nav.side button[aria-current=page] { background:rgba(255,255,255,.18); color:#fff; border-left-color:#F8BBD0; font-weight:650; }
nav.side button.sub { padding-left:38px; font-size:13px; min-height:36px; padding-top:7px; padding-bottom:7px; }
nav.side .sidelab { color:rgba(255,255,255,.65); font-size:11px; text-transform:uppercase; letter-spacing:.07em; padding:14px 18px 4px; }
.count { margin-left:auto; background:#fff; color:var(--brand-2); border-radius:10px; font-size:11px; font-weight:700; padding:0 7px; min-width:18px; text-align:center; line-height:18px; }
main { flex:1; min-width:0; padding:22px; max-width:1240px; }
main:focus { outline:none; }
nav.bar { display:none; }
.page-head { display:flex; justify-content:space-between; align-items:flex-end; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
.page-head p { margin:4px 0 0; }

@media (max-width:820px) {
  body { padding-bottom:calc(64px + env(safe-area-inset-bottom,0px)); }
  .shell { display:block; } nav.side { display:none; } main { padding:14px; }
  header.top { padding:6px 10px 6px 12px; padding-top:calc(6px + env(safe-area-inset-top,0px)); }
  header.top .t-full, .whobtn span { display:none; } header.top .t-short { display:inline; }
  body.has-back header.top button.back { display:grid; } body.has-back header.top .logo { display:none; }
  .whobtn { padding:4px 8px; }
  nav.bar { display:flex; position:fixed; left:0; right:0; bottom:0; z-index:60; background:#fff; border-top:1px solid var(--border-strong); padding-bottom:env(safe-area-inset-bottom,0px); box-shadow:0 -2px 10px rgba(0,0,0,.06); }
  nav.bar button { position:relative; flex:1 1 0; min-width:0; min-height:58px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; background:none; border:0; color:var(--ink-2); font-size:11.5px; cursor:pointer; }
  nav.bar button svg { width:24px; height:24px; }
  nav.bar button[aria-current=page] { color:var(--brand-2); font-weight:700; }
  nav.bar button[aria-current=page]::before { content:''; position:absolute; top:0; left:25%; right:25%; height:3px; border-radius:0 0 3px 3px; background:var(--brand); }
  nav.bar .count { position:absolute; top:4px; left:calc(50% + 6px); background:var(--bad); color:#fff; }
  .sticky-actions { bottom:calc(60px + env(safe-area-inset-bottom,0px)) !important; }
  .toasts { bottom:calc(76px + env(safe-area-inset-bottom,0px)) !important; }
}
.more-sheet { position:fixed; inset:0; z-index:120; background:var(--page); overflow:auto; padding-bottom:calc(24px + env(safe-area-inset-bottom,0px)); }
@media (min-width:821px) { .more-sheet { display:none; } }
.ms-head { position:sticky; top:0; background:var(--brand); color:#fff; display:flex; align-items:center; gap:10px; padding:8px 10px 8px 16px; min-height:var(--header-h); }
.ms-head h2 { color:#fff; flex:1; } .ms-head button { background:rgba(255,255,255,.16); color:#fff; border:0; border-radius:8px; min-width:44px; min-height:44px; cursor:pointer; }
.ms-user { padding:14px 16px; border-bottom:1px solid var(--border); background:#fff; } .ms-user b { display:block; font-size:15px; }
.ms-lab { padding:12px 16px 4px; font-size:11.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--ink-2); font-weight:600; }
.ms-item { display:flex; width:100%; align-items:center; gap:10px; min-height:52px; padding:10px 16px; background:#fff; border:0; border-bottom:1px solid var(--border); text-align:left; font-size:15px; cursor:pointer; } .ms-item.sub { padding-left:32px; font-size:14px; background:var(--band); }

/* building blocks */
.card { background:var(--card); border:1px solid var(--border); border-radius:10px; padding:14px 16px; margin-bottom:14px; }
.card.flat { background:#fcfcfb; } .card.alert { border-left:4px solid var(--bad); } .card.filters { padding:10px 14px; }
.grid { display:grid; gap:12px; margin-bottom:14px; } .g2 { grid-template-columns:repeat(2,minmax(0,1fr)); } .tiles { grid-template-columns:repeat(3,minmax(0,1fr)); } .fcards { grid-template-columns:repeat(3,minmax(0,1fr)); }
@media (max-width:1000px) { .tiles, .fcards { grid-template-columns:repeat(2,minmax(0,1fr)); } .g2 { grid-template-columns:minmax(0,1fr); } }
@media (max-width:620px) { .tiles, .fcards { grid-template-columns:minmax(0,1fr); } }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:8px; } .row.between { justify-content:space-between; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; border:1px solid var(--accent); background:var(--accent); color:#fff; border-radius:8px; padding:0 14px; min-height:44px; font-weight:600; font-size:14px; cursor:pointer; text-decoration:none; }
.btn:hover { filter:brightness(1.06); } .btn.primary { background:var(--accent); } .btn.ghost { background:#fff; color:var(--accent-ink); border-color:var(--border-strong); } .btn.danger { background:#fff; color:var(--bad-ink); border-color:var(--bad); }
.btn.small { min-height:36px; padding:0 12px; font-size:13px; } .btn.block { width:100%; } .btn[disabled] { background:#e4e3dd; border-color:#c3c2b7; color:#4a4945; cursor:not-allowed; }
.btn:not(.primary):not(.ghost):not(.danger) { background:#fff; color:var(--accent-ink); border-color:var(--accent); }
.linkbtn { background:none; border:0; color:var(--accent-ink); text-decoration:underline; cursor:pointer; padding:4px 0; min-height:36px; }
.icon-btn { background:none; border:0; min-width:44px; min-height:44px; display:inline-grid; place-items:center; cursor:pointer; border-radius:8px; color:var(--ink-2); } .icon-btn.tiny { min-width:24px; min-height:24px; position:absolute; top:2px; right:2px; background:#fff; border-radius:50%; }
.tag { display:inline-block; border:1px solid var(--border-strong); border-radius:999px; padding:0 8px; font-size:11.5px; line-height:18px; color:var(--ink-2); background:#fff; } .tag.warn { background:var(--warn-bg); color:#5a3d00; border-color:#e8c46a; }
.status { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; white-space:nowrap; } .status i { width:9px; height:9px; border-radius:50%; background:var(--nodata); display:inline-block; }
.status.good { color:var(--good-ink); } .status.good i { background:var(--good); } .status.watch { color:var(--watch-ink); } .status.watch i { background:var(--watch); } .status.bad { color:var(--bad-ink); } .status.bad i { background:var(--bad); } .status.warn { color:var(--watch-ink); } .status.warn i { background:var(--watch); } .status.none { color:var(--ink-2); }
.pchip { display:inline-flex; align-items:center; gap:6px; padding:1px 9px; border-radius:999px; background:var(--pt); color:var(--pi); font-size:11.5px; font-weight:700; border:1px solid var(--border); } .pchip i { width:9px; height:9px; border-radius:50%; background:var(--pc); }
.chips { display:flex; flex-wrap:wrap; gap:8px; margin:6px 0; }
.chip { min-height:40px; padding:0 14px; border-radius:999px; border:1px solid var(--border-strong); background:#fff; cursor:pointer; font-weight:550; display:inline-flex; align-items:center; gap:6px; }
.chip.on { background:var(--pc, var(--brand)); color:#fff; border-color:var(--pc, var(--brand)); } .chip .dot, .fgroup .dot { width:9px; height:9px; border-radius:50%; background:var(--pc); display:inline-block; } .chip.on .dot { background:#fff; }
.notice { border-radius:8px; padding:10px 12px; background:var(--tint); border:1px solid var(--border); margin-bottom:12px; } .notice.warn { background:var(--warn-bg); } .notice.err { background:var(--danger-bg); }
.err { color:var(--bad-ink); font-size:12.5px; margin:4px 0 0; }
.search, input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=date], input[type=search], select, textarea { width:100%; min-height:44px; padding:8px 12px; border:1px solid var(--border-strong); border-radius:8px; background:#fff; }
textarea { min-height:84px; resize:vertical; } select { appearance:auto; }
input[type=checkbox] { width:20px; height:20px; accent-color:var(--brand); vertical-align:middle; }
.frow { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin-bottom:6px; }
.fsel { display:flex; flex-direction:column; gap:2px; font-size:12px; color:var(--ink-2); } .fsel select { font-size:14px; color:var(--ink); }
.tablewrap { overflow-x:auto; background:#fff; border:1px solid var(--border); border-radius:10px; margin-bottom:14px; }
.tbl { width:100%; border-collapse:collapse; font-size:13px; } .tbl th { text-align:left; background:var(--band); font-size:12px; color:var(--ink-2); padding:8px 10px; border-bottom:1px solid var(--border-strong); white-space:nowrap; } .tbl td { padding:9px 10px; border-bottom:1px solid var(--border); vertical-align:top; }
.tbl .clickrow { cursor:pointer; } .tbl .clickrow:hover { background:var(--band); }
.tbl.matrix th.rot { height:150px; vertical-align:bottom; padding:4px; } .tbl.matrix th.rot span { writing-mode:vertical-rl; transform:rotate(180deg); white-space:nowrap; }
.yes { color:var(--good-ink); }
.tabs { display:flex; gap:4px; border-bottom:1px solid var(--border-strong); margin-bottom:14px; overflow-x:auto; } .tab { background:none; border:0; padding:10px 14px; min-height:44px; cursor:pointer; font-weight:600; color:var(--ink-2); border-bottom:3px solid transparent; white-space:nowrap; } .tab.on { color:var(--brand-2); border-bottom-color:var(--brand); }
.sticky-actions .btn { flex:1 1 auto; } .sticky-actions { position:sticky; bottom:0; z-index:40; display:flex; gap:8px; justify-content:flex-end; align-items:center; flex-wrap:wrap; background:rgba(249,249,247,.96); border-top:1px solid var(--border-strong); padding:10px 0; margin-top:12px; backdrop-filter:blur(4px); }
.loading i { display:block; height:74px; border-radius:10px; margin-bottom:12px; background:linear-gradient(90deg,#ecece6 25%,#f6f6f2 50%,#ecece6 75%); background-size:200% 100%; animation:sh 1.3s linear infinite; } @keyframes sh { to { background-position:-200% 0; } }
@media (prefers-reduced-motion:reduce) { .loading i, .syncpill.syncing svg { animation:none; } }
.toasts { position:fixed; bottom:18px; left:50%; transform:translateX(-50%); z-index:250; display:flex; flex-direction:column; gap:8px; align-items:center; max-width:92vw; pointer-events:none; }
.toast { pointer-events:auto; display:flex; align-items:center; gap:12px; background:var(--ink); color:#fff; padding:10px 16px; border-radius:8px; max-width:92vw; box-shadow:0 4px 16px rgba(0,0,0,.2); } .toast.err { background:#8e1f1f; } .toast button { background:none; border:1px solid rgba(255,255,255,.6); color:#fff; border-radius:6px; min-height:36px; padding:0 12px; font-weight:700; cursor:pointer; }
.modal-back { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:200; display:flex; align-items:flex-end; justify-content:center; }
.modal { background:#fff; width:100%; max-width:520px; max-height:92vh; border-radius:14px 14px 0 0; display:flex; flex-direction:column; } .modal.wide { max-width:760px; }
@media (min-width:821px) { .modal-back { align-items:center; } .modal { border-radius:14px; } }
.modal-head { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:12px 8px 8px 18px; border-bottom:1px solid var(--border); } .modal-head h2 { font-size:17px; }
.modal-body { padding:14px 18px; overflow:auto; flex:1; } .modal-foot { display:flex; gap:8px; justify-content:flex-end; padding:10px 18px calc(10px + env(safe-area-inset-bottom,0px)); border-top:1px solid var(--border); }
.lbl { display:block; font-weight:600; margin:10px 0 4px; font-size:13px; } .req { color:var(--bad-ink); } .opt { color:var(--muted); font-weight:400; font-size:12px; } .help { color:var(--ink-2); font-size:12px; margin:4px 0 0; }
.check { display:flex; align-items:flex-start; gap:8px; margin:8px 0; } .checks { max-height:240px; overflow:auto; border:1px solid var(--border); border-radius:8px; padding:6px 10px; margin:8px 0; }
.stack-form .lbl:first-child { margin-top:0; } .row2 { display:grid; grid-template-columns:1fr 1fr; gap:10px; }

/* dashboard */
.asof { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:10px; font-size:13px; }
.tile { text-align:left; background:#fff; border:1px solid var(--border); border-top:4px solid var(--pc); border-radius:10px; padding:12px 14px; cursor:pointer; display:flex; flex-direction:column; gap:4px; min-width:0; }
.tile:hover { box-shadow:0 2px 10px rgba(0,0,0,.08); } .tile-top { display:flex; justify-content:space-between; gap:6px; flex-wrap:wrap; } .tile-name { font-weight:600; font-size:13px; line-height:1.3; } .tile-val { font-size:28px; font-weight:750; line-height:1.1; color:var(--pi); }
.pbar { position:relative; height:8px; background:#ecece6; border-radius:4px; overflow:visible; margin-top:6px; min-width:60px; } .pbar i { display:block; height:100%; border-radius:4px; background:var(--c); } .pbar .pace { position:absolute; top:-3px; width:2px; height:14px; background:var(--ink); }
.psec { background:#fff; border:1px solid var(--border); border-left:6px solid var(--pc); border-radius:10px; margin-bottom:14px; }
.psec > summary { list-style:none; cursor:pointer; padding:12px 16px; display:flex; justify-content:space-between; gap:12px; align-items:center; flex-wrap:wrap; background:var(--pt); border-radius:0 10px 10px 0; } .psec > summary::-webkit-details-marker { display:none; }
.psec .ph { display:flex; flex-direction:column; } .psec .ph b { color:var(--pi); font-size:16px; } .psec .pc { font-size:12px; color:var(--ink-2); }
.sub-h { font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--ink-2); padding:12px 16px 2px; }
.igroup { padding:6px 8px 10px; } .ghead { display:flex; gap:8px; font-size:13px; font-weight:600; padding:6px 8px; } .gid { color:var(--pi); font-weight:800; min-width:44px; }
.irow { display:grid; grid-template-columns:minmax(0,3fr) 90px 120px minmax(80px,1.2fr) 120px; gap:8px; align-items:center; width:100%; text-align:left; background:none; border:0; border-top:1px solid var(--border); padding:8px; cursor:pointer; min-height:44px; } .irow:hover { background:var(--band); }
.iname { font-size:13px; } .iid { display:inline-block; min-width:52px; font-size:11px; font-weight:800; color:var(--ink-2); margin-right:4px; } .ival { font-weight:700; text-align:right; }
@media (max-width:760px) { .irow { grid-template-columns:1fr auto; } .irow .itar, .irow .ibar { grid-column:1 / -1; } .irow .ist { grid-column:1 / -1; } .ival { text-align:right; } }
.bigval { font-size:34px; font-weight:800; margin:6px 0; } .facts { display:grid; grid-template-columns:150px 1fr; gap:6px 12px; font-size:13px; margin:10px 0; } .facts dt { color:var(--ink-2); font-weight:600; } .facts dd { margin:0; } .facts.wide { grid-template-columns:200px 1fr; }
@media (max-width:620px) { .facts, .facts.wide { grid-template-columns:1fr; } .facts dt { margin-top:6px; } }
.fchip { display:inline-flex; gap:4px; align-items:center; border:1px solid var(--pc); border-radius:6px; padding:1px 8px; margin:2px 4px 2px 0; font-size:12px; background:#fff; } button.fchip { cursor:pointer; min-height:32px; }
.bd { list-style:none; margin:0; padding:0; } .bd li { display:grid; grid-template-columns:120px 1fr 80px auto; gap:8px; align-items:center; padding:5px 0; border-top:1px solid var(--border); } .bbar { background:#ecece6; height:8px; border-radius:4px; } .bbar i { display:block; height:100%; border-radius:4px; } .bv { text-align:right; font-weight:650; }
@media (max-width:620px) { .bd li { grid-template-columns:90px 1fr 70px; } .bd .status { grid-column:1 / -1; } }
.chart { width:100%; height:auto; } .chart .ct { font-size:11px; fill:var(--ink-2); } .chart .cv { font-size:12px; font-weight:650; fill:var(--ink); } .chart .cb { fill:#ecece6; } .chart .cg { stroke:var(--grid); stroke-width:1; }
.stack { display:flex; height:22px; border-radius:6px; overflow:hidden; margin:10px 0; } .stack i { display:block; height:100%; }
.legend { list-style:none; display:flex; flex-wrap:wrap; gap:6px 16px; padding:0; margin:6px 0; font-size:12.5px; } .legend i { display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:6px; }
.sumh { cursor:pointer; display:flex; gap:12px; align-items:center; flex-wrap:wrap; justify-content:space-between; }

/* collect + forms */
.fgroup { margin-bottom:20px; } .fgroup > h2 { display:flex; gap:8px; align-items:center; margin-bottom:10px; color:var(--pi); font-size:17px; } .fgroup .dot { width:12px; height:12px; }
.fcard { background:#fff; border:1px solid var(--border); border-top:4px solid var(--pc); border-radius:10px; padding:12px 14px; display:flex; flex-direction:column; gap:6px; } .fcard h3 { margin:0; } .fc-top { display:flex; gap:8px; align-items:center; } .fid { background:var(--pt); color:var(--pi); font-weight:800; font-size:12px; padding:1px 8px; border-radius:6px; }
.clamp { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.listrow { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; text-align:left; background:none; border:0; border-top:1px solid var(--border); padding:10px 0; min-height:44px; cursor:pointer; } .linkrow { background:none; border:0; text-align:left; cursor:pointer; flex:1; min-height:44px; }
.form-head { background:var(--pt); border-left:6px solid var(--pc); border-radius:10px; padding:12px 16px; margin-bottom:14px; } .form-head h2 { color:var(--pi); margin:6px 0 4px; font-size:20px; }
.form { background:#fff; border:1px solid var(--border); border-radius:10px; padding:6px 16px 12px; max-width:760px; }
fieldset.field { border:0; padding:0; margin:0; min-width:0; } .field { margin:12px 0; } .field.bad input, .field.bad select, .field.bad textarea, .field.bad .picker { border-color:var(--bad); background:#fff8f8; } .field legend { padding:0; }
.picker { width:100%; min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:8px; border:1px solid var(--border-strong); border-radius:8px; background:#fff; padding:6px 12px; cursor:pointer; text-align:left; }
.static { padding:10px 12px; background:#f4f4f1; border-radius:8px; } .calc { display:block; padding:10px 12px; background:var(--band); border:1px dashed var(--border-strong); border-radius:8px; font-weight:650; }
.thumbs { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:8px; } .thumb { position:relative; width:84px; height:84px; border:1px solid var(--border); border-radius:8px; display:grid; place-items:center; overflow:hidden; background:#f4f4f1; } .thumb.big { width:160px; height:160px; } .thumb img { width:100%; height:100%; object-fit:cover; }
.hidden-file { position:absolute; width:1px; height:1px; opacity:0; } .draft-note { text-align:right; padding:4px 2px; }
.picklist { list-style:none; margin:8px 0; padding:0; max-height:46vh; overflow:auto; } .pick { display:flex; flex-direction:column; width:100%; text-align:left; background:none; border:0; border-bottom:1px solid var(--border); padding:10px 4px; min-height:48px; cursor:pointer; } .pick.on { background:var(--tint); }

/* records, review, sync */
.rrow { display:flex; justify-content:space-between; gap:10px; width:100%; text-align:left; background:#fff; border:1px solid var(--border); border-left:5px solid var(--pc); border-radius:8px; padding:10px 12px; margin-bottom:8px; cursor:pointer; min-height:56px; } .rr-main { display:flex; flex-direction:column; min-width:0; } .rr-sum { color:var(--ink-2); font-size:13px; overflow:hidden; text-overflow:ellipsis; } .rr-st { flex:0 0 auto; align-self:center; }
.rvrow { display:grid; grid-template-columns:44px minmax(0,1fr) auto; gap:6px; align-items:center; background:#fff; border:1px solid var(--border); border-radius:8px; margin-bottom:8px; padding:4px 8px; } .rvck { display:grid; place-items:center; min-height:44px; } .rvmain { background:none; border:0; text-align:left; cursor:pointer; display:flex; flex-direction:column; min-height:48px; padding:4px; } .rvbtn { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
@media (max-width:620px) { .rvrow { grid-template-columns:44px 1fr; } .rvbtn { grid-column:1 / -1; justify-content:flex-start; } }
.hist { padding-left:18px; margin:0; } .qitem { border-top:1px solid var(--border); padding:10px 0; } .qitem.bad { border-left:3px solid var(--bad); padding-left:10px; } .queue { padding-left:20px; margin:0; } .queue li { margin:6px 0; }

/* results map */
.maprow { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:14px; align-items:start; } @media (max-width:1100px) { .maprow { grid-template-columns:minmax(0,1fr); } }
.schem-scroll { overflow:auto; border:1px solid var(--border); border-radius:10px; background:#fff; max-height:78vh; } .schematic svg { display:block; min-width:900px; width:100%; height:auto; }
.schematic .node { cursor:pointer; } .schematic svg.has-hit .dim { opacity:.14; } .schematic svg.has-hit .hit rect.box { stroke-width:3; } .schematic .edge.dim { opacity:.06; }
.trace { position:sticky; top:calc(var(--header-h) + 10px); max-height:80vh; overflow:auto; } .trace .fchip { text-align:left; display:flex; width:100%; white-space:normal; align-items:flex-start; padding:4px 8px; gap:6px; } .trace .fchip b { flex:0 0 auto; }

/* login */
.login-wrap { min-height:100vh; display:grid; place-content:center; padding:20px; background:linear-gradient(180deg,var(--brand) 0,var(--brand) 180px,var(--page) 180px); }
.login-card { background:#fff; width:min(420px,92vw); border:1px solid var(--border); border-radius:14px; padding:24px 22px; box-shadow:0 8px 28px rgba(0,0,0,.12); margin-bottom:14px; } .login-card h1 { margin:8px 0 4px; } .login-logo { width:48px; height:48px; border-radius:12px; background:var(--brand); color:#fff; display:grid; place-items:center; font-weight:800; }
.login-card .btn { margin-top:14px; } .login-msg { min-height:20px; margin:10px 0 0; font-size:13px; } .login-msg.bad { color:var(--bad-ink); } .code { font-size:26px; letter-spacing:.35em; text-align:center; font-variant-numeric:tabular-nums; }
.kit { flex-wrap:nowrap; } .kit input[type=text] { max-width:260px; } .kit input[type=url] { flex:1; }
body.one-nav nav.bar { display:none !important; }
@media print { header.top, nav.side, nav.bar, .netbar, .sticky-actions, .filters { display:none !important; } main { padding:0; } }
