/* Perraro SourceHub — design system. Mobile-first, system fonts only (China/WeChat-safe), no external assets. */
:root {
  --p: #1F5C4B; --p-dark: #143F33; --p-600: #2A6E5B; --p-50: #ECF4F0; --p-100: #D5E7DE;
  --bg: #F5F6F3; --card: #FFFFFF; --ink: #15201B; --ink-2: #39463F; --muted: #5F6B65; --line: #E1E5E0; --line-2: #EDF0EC; --field: #C9D1CB;
  --warn: #8A5300; --warn-bg: #FFF4DE; --warn-line: #F0CF8F; --bad: #B02A20; --bad-bg: #FCEDEB; --bad-line: #EFC1BB;
  --ok: #1B6E45; --ok-bg: #E5F3EB; --info: #285A87; --info-bg: #EBF2F9;
  --r: 14px; --r-md: 10px; --r-sm: 8px;
  --sh: 0 1px 2px rgba(21,32,27,.05); --sh-md: 0 2px 8px rgba(21,32,27,.06), 0 1px 2px rgba(21,32,27,.04); --sh-lg: 0 12px 32px rgba(21,32,27,.16);
  --f: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --top-h: 56px; --bnav-h: 60px;
}
* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--f); color: var(--ink); background: var(--bg); overflow-x: clip; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-appearance: none; appearance: none; }
a { color: var(--p); text-decoration: none; } a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #4F9A82; outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; }
h1 { font-size: 22px; line-height: 1.25; margin: 0 0 4px; letter-spacing: -.015em; font-weight: 700; }
h2 { font-size: 16px; line-height: 1.3; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 650; }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.bi { display: inline-flex; flex-direction: column; line-height: 1.25; }
.bi .cn { font-size: .84em; color: var(--muted); font-weight: 400; }
.btn .bi .cn, .chip .bi .cn, .bnav .bi .cn, .alert .bi .cn, .toast .cn { color: inherit; opacity: .8; }
.bi.inl { flex-direction: row; flex-wrap: wrap; gap: 0 .4em; align-items: baseline; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .grow { flex: 1; } .nowrap { white-space: nowrap; }
.stack-v { display: flex; flex-direction: column; gap: 10px; }
.mt { margin-top: 12px; } .mb { margin-bottom: 12px; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: var(--top-h); padding-top: env(safe-area-inset-top); }
.logo { width: 32px; height: 32px; border-radius: 9px; background: var(--p); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none; letter-spacing: -.02em; }
.brand { font-weight: 700; font-size: 15px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; color: var(--ink); }
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.top .sp { flex: 1; }
.top .who { font-size: 13px; text-align: right; color: var(--ink-2); line-height: 1.25; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .who small { display: block; color: var(--muted); font-size: 12px; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 10px; border: 0; background: transparent; border-radius: var(--r-md); cursor: pointer; color: var(--ink-2); }
.iconbtn:hover { background: var(--line-2); }
.iconbtn .ico { width: 20px; height: 20px; }
.iconbtn .bi { white-space: nowrap; align-items: center; }
@media (max-width: 520px) { .top .who { display: none; } }

main { max-width: 760px; margin: 0 auto; padding: 18px 16px calc(var(--bnav-h) + 40px + env(safe-area-inset-bottom)); }
main.wide { max-width: 1040px; }
main.ed { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 12px; box-shadow: var(--sh); }
.card.flush { padding: 0; overflow: hidden; }
.card > h2:first-child { margin-top: 0; }
.card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; } .card-h h2 { margin: 0; flex: 1; }
.phead { display: flex; align-items: flex-end; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 16px; }
.phead .ttl { flex: 1 1 auto; }
.phead .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.phead h1 { margin: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 6px 16px; border-radius: var(--r-md); border: 1px solid var(--field); background: #fff; cursor: pointer; text-align: center; font-weight: 600; color: var(--ink); text-decoration: none !important; line-height: 1.2; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { border-color: #AEB9B1; background: #FAFBF9; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--p); color: #fff; border-color: var(--p); box-shadow: 0 1px 2px rgba(20,63,51,.25); }
.btn.primary:hover { background: var(--p-dark); border-color: var(--p-dark); }
.btn.soft { background: var(--p-50); border-color: transparent; color: var(--p-dark); } .btn.soft:hover { background: var(--p-100); }
.btn.danger { color: var(--bad); border-color: var(--bad-line); } .btn.danger:hover { background: var(--bad-bg); }
.btn.dlg-danger, .btn.danger.solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.small { min-height: 36px; padding: 4px 12px; font-size: 13.5px; border-radius: var(--r-sm); gap: 6px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn .ico { width: 18px; height: 18px; }
@media (pointer: coarse) { .btn.small { min-height: 44px; } }
.seg { display: inline-flex; background: var(--line-2); border-radius: var(--r-md); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: var(--r-sm); cursor: pointer; min-height: 36px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-md); font-weight: 650; }

/* ---------- chips / badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; line-height: 1.3; background: var(--info-bg); color: var(--info); white-space: nowrap; font-weight: 600; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; opacity: .85; }
.chip.plain::before, .chip.btnchip::before, .chip.count::before { display: none; }
.chip .bi { flex-direction: row; gap: 0 .35em; flex-wrap: wrap; align-items: baseline; }
.chip.ok { background: var(--ok-bg); color: var(--ok); } .chip.warn { background: var(--warn-bg); color: var(--warn); } .chip.bad { background: var(--bad-bg); color: var(--bad); } .chip.grey { background: var(--line-2); color: var(--ink-2); }
.chip.info { background: var(--info-bg); color: var(--info); }
.chip.btnchip { cursor: pointer; background: #fff; border: 1px solid var(--line); color: var(--muted); min-height: 32px; font-weight: 500; }
.chip.btnchip.on { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); font-weight: 650; }
.filterchips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; margin: 0 -16px 14px; padding-inline: 16px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.filterchips::-webkit-scrollbar { display: none; }
.filterchips button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 0 14px; min-height: 44px; cursor: pointer; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.filterchips button .bi { flex-direction: row; gap: .35em; align-items: baseline; }
.filterchips button .n { font-size: 12px; background: var(--line-2); color: var(--ink-2); border-radius: 99px; padding: 0 7px; font-weight: 650; }
.filterchips button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.filterchips button.on .cn { color: #fff; opacity: .75; } .filterchips button.on .n { background: rgba(255,255,255,.2); color: #fff; }

/* ---------- progress ---------- */
.prog { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.prog > i { display: block; height: 100%; background: var(--p-600); border-radius: 99px; transition: width .3s; }
.prog.warn > i { background: #D08A1E; }

/* ---------- forms ---------- */
.field { padding: 14px 0; border-top: 1px solid var(--line-2); position: relative; }
.field:first-child { border-top: 0; }
.field > label, .flabel { display: block; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.flabel { font-size: 14px; }
.lrow { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 6px; }
.lrow > label { flex: 1; font-weight: 600; }
.field.flag::before { content: ""; position: absolute; left: -16px; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: #E2A846; }
.field.conflict::before { background: var(--bad); }
.field.haserr::before { background: var(--bad); }
.field .miss-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #E2A846; margin-left: 6px; vertical-align: middle; }
.inp { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--field); border-radius: var(--r-md); background: #fff; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.inp:hover { border-color: #AEB9B1; }
.inp:focus { outline: none; border-color: var(--p); box-shadow: 0 0 0 3px rgba(31,92,75,.18); }
.inp:disabled { background: var(--line-2); color: var(--muted); }
.inp.err { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(176,42,32,.12); }
select.inp { -webkit-appearance: none; appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, #5F6B65 50%), linear-gradient(135deg, #5F6B65 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea.inp { min-height: 96px; resize: vertical; line-height: 1.45; }
.unit { display: flex; align-items: stretch; }
.unit .inp { border-radius: var(--r-md) 0 0 var(--r-md); }
.unit .u { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--field); border-left: 0; border-radius: 0 var(--r-md) var(--r-md) 0; background: #F3F5F2; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.unit .pre { border-radius: var(--r-md) 0 0 var(--r-md); border: 1px solid var(--field); border-right: 0; font-weight: 600; color: var(--ink-2); }
.unit .pre + .inp { border-radius: 0; }
.src { font-size: 12.5px; color: var(--muted); margin-top: 6px; } .note { font-size: 12.5px; color: var(--warn); margin-top: 6px; }
.usconv { font-size: 13px; color: var(--p); font-weight: 600; margin-top: 4px; }
.usconv:empty { display: none; }
.alert { border-radius: var(--r-md); padding: 10px 12px; font-size: 13.5px; margin-top: 8px; border: 1px solid transparent; display: flex; gap: 8px; align-items: flex-start; }
.alert > .ico { margin-top: 1px; }
.alert.bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); } .alert.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); } .alert.info { background: var(--info-bg); color: var(--info); } .alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.inl { padding: 6px 10px; font-size: 13px; }
.alert.inl::before { content: "!"; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--bad); color: #fff; font-weight: 800; font-size: 12px; display: grid; place-items: center; margin-top: 1px; }
.hint { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.specials { display: flex; gap: 6px; flex: none; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--p); flex: none; margin: 0; }
.advtoggle { margin-top: 10px; width: 100%; justify-content: space-between; border: 1px dashed var(--field) !important; background: #FAFBF9 !important; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 44px; font-size: 13.5px; user-select: none; }
.switch .trk { position: relative; width: 40px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; z-index: 1; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: #BDC6C0; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + i { background: var(--p); } .switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 3px solid #4F9A82; outline-offset: 2px; }
.altcard.field { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin-top: 10px; background: #FCFDFC; }
.altcard.field.flag::before { left: -1px; top: 12px; bottom: 12px; }
.altcard .flabel { font-size: 13.5px; margin-top: 10px; }
.lrow .specials .btnchip { min-height: 32px; padding: 2px 10px; }
@media (pointer: coarse) { .lrow .specials .btnchip { min-height: 44px; } }
button.psum-nophoto { gap: 2px; color: var(--ink-2); }
button.psum-nophoto .bi { align-items: center; }

/* ---------- collapsible editor sections ---------- */
details.sec { background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; box-shadow: var(--sh); scroll-margin-top: calc(var(--top-h) + 64px); }
details.sec > summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; align-items: center; gap: 12px; font-weight: 650; min-height: 64px; border-radius: var(--r); }
details.sec > summary:hover { background: #FBFCFA; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary .num { width: 30px; height: 30px; border-radius: 50%; background: var(--line-2); color: var(--ink-2); display: grid; place-items: center; font-size: 13px; flex: none; font-weight: 700; }
details.sec.done > summary .num { background: var(--ok-bg); color: var(--ok); }
details.sec.req > summary .num { background: var(--warn-bg); color: var(--warn); }
details.sec > summary .sp { flex: 1; }
details.sec > summary .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--muted); width: 76px; flex: none; }
details.sec > summary .meta .prog { width: 100%; height: 5px; }
details.sec > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 2px 0 2px; transition: transform .2s; flex: none; }
details.sec[open] > summary { border-bottom: 1px solid var(--line-2); border-radius: var(--r) var(--r) 0 0; }
details.sec[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
details.sec > .body { padding: 4px 16px 16px; }
.subh { margin: 18px 0 2px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--p); font-weight: 700; }
.subh .cn { text-transform: none; letter-spacing: 0; }

/* ---------- supplier: to-do panel ---------- */
.todo { padding: 0; overflow: hidden; }
.todo .card-h { padding: 14px 16px 0; margin-bottom: 6px; }
.todo-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 64px; border-top: 1px solid var(--line-2); color: var(--ink); text-decoration: none !important; cursor: pointer; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; }
.todo-item:hover { background: #FAFBF9; }
.todo-item .ti { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--line-2); color: var(--ink-2); }
.todo-item.bad .ti { background: var(--bad-bg); color: var(--bad); } .todo-item.warn .ti { background: var(--warn-bg); color: var(--warn); } .todo-item.ok .ti { background: var(--ok-bg); color: var(--ok); }
.todo-item .tt { flex: 1; min-width: 0; } .todo-item .tt b { display: block; font-size: 14.5px; }
.todo-item .tt .d { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.todo-item .chev { color: var(--muted); }
.todo-more { display: block; padding: 12px 16px; border-top: 1px solid var(--line-2); font-weight: 600; font-size: 14px; min-height: 44px; }
.allgood { display: flex; align-items: center; gap: 12px; }
.allgood .ti { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); flex: none; }
.sechead { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; } .sechead h2 { margin: 0; flex: 1; }

/* ---------- product rows / cards ---------- */
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--sh); transition: box-shadow .15s, border-color .15s; }
.pcard:hover { border-color: #CFD7D1; box-shadow: var(--sh-md); }
.pcard .ph { background: #EFF2EE; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; cursor: pointer; border: 0; padding: 0; width: 100%; text-align: center; }
.pcard .ph img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pcard .bd { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.pcard .model { font-weight: 700; font-size: 16px; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.pcard .acts { display: flex; gap: 8px; } .pcard .acts .btn.grow { flex: 1; }
/* supplier: horizontal row card */
.srow { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 12px; }
.srow .ph { width: 76px; height: 76px; border-radius: var(--r-md); overflow: hidden; grid-row: span 2; }
.srow .bd { padding: 0; gap: 6px; }
.srow .acts { grid-column: 1 / -1; }
.srow .meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.searchbar { position: relative; margin-bottom: 10px; } .searchbar .ico { position: absolute; left: 14px; top: 15px; color: var(--muted); } .searchbar .inp { padding-left: 42px; background: #fff; }
.whoami { font-size: 13px; color: var(--muted); }

/* ---------- supplier bottom nav + action bar ---------- */
.bnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bnav a { flex: 1; text-align: center; padding: 6px 2px; color: var(--muted); font-size: 11.5px; position: relative; min-height: var(--bnav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none !important; font-weight: 500; }
.bnav a .ico { width: 22px; height: 22px; }
.bnav a .bi { align-items: center; }
.bnav a.on { color: var(--p); font-weight: 700; }
.bnav a.on .ico { stroke-width: 2.2; }
@media (min-width: 900px) { .bnav { left: 50%; transform: translateX(-50%); bottom: 12px; width: 520px; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sh-lg); padding-bottom: 0; overflow: hidden; } }
.badge { position: absolute; top: 5px; left: calc(50% + 6px); background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; line-height: 17px; min-width: 18px; padding: 0 5px; font-weight: 700; border: 2px solid #fff; box-sizing: content-box; }
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(21,32,27,.07); }
.actionbar .in { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.actionbar .btns { display: flex; gap: 8px; }
.actionbar .btn { flex: 1; min-height: 50px; font-size: 15px; }
.actionbar .btn.primary { flex: 1.5; }
.actionbar .stat { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-height: 18px; }
@media (min-width: 900px) { .actionbar { left: 50%; transform: translateX(-50%); bottom: 12px; width: 760px; border: 1px solid var(--line); border-radius: 18px; } }

/* ---------- photos ---------- */
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 600px) { .photos { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.photos .ph { position: relative; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; background: #EFF2EE; border: 1px solid var(--line); }
.photos.slots .ph[data-slot="main"] { grid-column: span 2; grid-row: span 2; }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos .x { position: absolute; top: 4px; right: 4px; background: rgba(15,22,19,.66); color: #fff; border: 0; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 18px; line-height: 1; display: grid; place-items: center; }
.photos .x::after { content: ""; position: absolute; inset: -6px; }
.photos .doc { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; text-align: center; font-size: 11.5px; padding: 6px; height: 100%; overflow-wrap: anywhere; }
.photos .ph.empty { border: 1.5px dashed #B5C1B9; background: #FAFBF9; }
.photos .ph.empty:hover { border-color: var(--p); background: var(--p-50); }
.photos .slotbtn { width: 100%; height: 100%; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink-2); font-size: 12px; text-align: center; padding: 4px; }
.photos .slotbtn .plus { width: 28px; height: 28px; border-radius: 50%; background: var(--p-50); color: var(--p); display: grid; place-items: center; font-size: 20px; line-height: 1; font-weight: 500; }
.photos .slotbtn .bi { align-items: center; }
.photos .ph[data-slot="main"] .slotbtn { font-size: 14px; font-weight: 600; }
.photos .ph[data-slot="main"].empty .slotbtn .plus { width: 40px; height: 40px; font-size: 26px; }
.photos .cap { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; font-size: 11px; padding: 12px 6px 4px; } .photos .cap .cn { color: #fff; opacity: .85; }
.phguide { display: flex; gap: 10px; align-items: flex-start; background: var(--p-50); color: var(--p-dark); border-radius: var(--r-md); padding: 10px 12px; font-size: 13px; margin: 8px 0 12px; }

/* ---------- editor chrome ---------- */
.edbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.stickybar { position: sticky; top: var(--top-h); z-index: 20; margin: 0 -16px 12px; padding: 6px 16px; background: var(--bg); display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; box-shadow: 0 6px 8px -8px rgba(21,32,27,.25); }
.stickybar .chip { overflow: hidden; } .stickybar .chip .bi { flex-wrap: nowrap; overflow: hidden; text-overflow: ellipsis; }
.savestate { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.savestate::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #C5CDC7; flex: none; }
.savestate:empty::before { display: none; }
.savestate.ok { color: var(--ok); } .savestate.ok::before { background: var(--ok); }
.savestate.bad { color: var(--bad); font-weight: 600; } .savestate.bad::before { background: var(--bad); }
.savestate.busy::before { background: #D08A1E; }
.savestate .bi { flex-direction: row; gap: .4em; flex-wrap: wrap; }
.errsum { border: 1px solid var(--bad-line); background: var(--bad-bg); color: var(--bad); border-radius: var(--r); padding: 12px 14px; margin-bottom: 12px; }
.errsum b { display: block; margin-bottom: 4px; }
.errsum button { background: none; border: 0; color: var(--bad); text-decoration: underline; padding: 4px 0; min-height: 40px; text-align: left; cursor: pointer; font: inherit; }

/* product summary (supplier editor) */
.psum { padding: 16px; }
.psum-top { display: flex; gap: 14px; align-items: center; }
.psum-top img, .psum-nophoto { width: 84px; height: 84px; object-fit: contain; background: #EFF2EE; border-radius: var(--r-md); flex: none; display: grid; place-items: center; font-size: 11.5px; color: var(--muted); text-align: center; padding: 4px; }
.psum-top h1 { margin: 0 0 6px; font-size: 20px; overflow-wrap: anywhere; }
.psum-msg { margin: 12px 0; font-size: 14px; color: var(--ink-2); }
.psum-req { margin: 0 0 12px; display: block; }
.psum-req a { display: inline-block; margin-top: 6px; font-weight: 600; color: var(--bad); text-decoration: underline; }
.psum-prog { margin: 4px 0 12px; } .psum-prog .row { margin-bottom: 6px; } .psum-prog .prog { height: 8px; }
.psum-next { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r-md); background: var(--warn-bg); margin-bottom: 12px; flex-wrap: wrap; }
.psum-next.ok { background: var(--ok-bg); color: var(--ok); }
.psum-next .grow { min-width: 160px; }
.psum-check { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px -4px; padding: 2px 16px 4px; scrollbar-width: none; }
.psum-check::-webkit-scrollbar { display: none; }
.psum-item { flex: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 12px 4px 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px; cursor: pointer; text-align: left; font-size: 13px; }
.psum-item:hover { border-color: #BCC7BF; }
.psum-item .bi { flex-direction: row; gap: .35em; align-items: baseline; white-space: nowrap; }
.psum-item .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; background: var(--line-2); color: var(--ink-2); }
.psum-item.done .dot { background: var(--ok-bg); color: var(--ok); } .psum-item.req .dot { background: var(--warn-bg); color: var(--warn); }
.psum-item .cnt { font-size: 12px; color: var(--muted); white-space: nowrap; } .psum-item .cnt.req { color: var(--warn); font-weight: 700; }
@media (min-width: 760px) { .psum-check { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; } .psum-item { border-radius: var(--r-md); } .psum-item .bi { white-space: normal; flex-wrap: wrap; } .psum-item > .grow { flex: 1; } }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); background: radial-gradient(1200px 500px at 50% -10%, #E3EFE8, transparent 70%), var(--bg); }
.auth .card { width: 100%; max-width: 400px; padding: 28px 24px 24px; border-radius: 18px; box-shadow: var(--sh-md); }
.auth .mark { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth .mark .logo { width: 40px; height: 40px; border-radius: 11px; font-size: 18px; }
.auth h1 { font-size: 22px; margin-bottom: 4px; }
.auth .lead { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.auth .flabel { margin-top: 14px; }
.auth .btn.primary { width: 100%; margin-top: 20px; min-height: 50px; font-size: 16px; }
.auth .foot { margin-top: 18px; font-size: 12.5px; color: var(--muted); text-align: center; }
.auth .below { margin-top: 18px; font-size: 13px; color: var(--muted); text-align: center; max-width: 400px; }
.pwwrap { position: relative; } .pwwrap .inp { padding-right: 56px; }
.pwwrap .iconbtn { position: absolute; right: 2px; top: 2px; min-height: 44px; color: var(--muted); }
.login { max-width: 400px; margin: 0 auto; }

/* ---------- toast + dialog ---------- */
.toast { position: fixed; left: 50%; bottom: calc(132px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(16px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; z-index: 120; transition: opacity .2s, transform .2s; max-width: min(92vw, 440px); box-shadow: var(--sh-lg); font-size: 14px; }
.toast.show { opacity: 1; transform: translateX(-50%); } .toast.err { background: var(--bad); } .toast.ok { background: var(--p-dark); }
.admin-app .toast, body.admin .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
.dlg-bg { position: fixed; inset: 0; background: rgba(12,20,16,.5); z-index: 100; display: flex; align-items: flex-end; justify-content: center; padding: 0; animation: fade .15s ease-out; }
.dlg { background: #fff; border-radius: 20px 20px 0 0; padding: 22px 20px calc(18px + env(safe-area-inset-bottom)); width: 100%; max-width: 480px; max-height: 88vh; overflow: auto; box-shadow: var(--sh-lg); animation: up .2s ease-out; }
.dlg h2 { font-size: 18px; margin-bottom: 8px; }
.dlg p { color: var(--ink-2); margin: 0 0 8px; }
.dlg .inp { margin-top: 8px; }
.dlg .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.dlg .acts .btn { flex: 1; min-height: 48px; }
@media (min-width: 600px) { .dlg-bg { align-items: center; padding: 16px; } .dlg { border-radius: 18px; padding: 22px; } .dlg .acts .btn { flex: 0 0 auto; min-width: 110px; } }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(24px); opacity: .6; } }

/* ---------- loading / empty ---------- */
.skel { display: flex; flex-direction: column; gap: 10px; }
.skel i { display: block; height: 64px; border-radius: var(--r); background: linear-gradient(90deg, #ECEFEB 25%, #F5F7F4 50%, #ECEFEB 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.skel i:nth-child(2) { opacity: .8; } .skel i:nth-child(3) { opacity: .6; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.empty .ei { width: 52px; height: 52px; border-radius: 16px; background: var(--line-2); color: var(--ink-2); display: grid; place-items: center; margin: 0 auto 12px; }
.empty .ei .ico { width: 24px; height: 24px; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.empty .bi { align-items: center; }
.empty .btn { margin-top: 14px; }
.boot { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--sh); }
.card .tbl-wrap { box-shadow: none; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.tbl th, .tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
.tbl th { background: #F8F9F7; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #FAFBF9; }
.tbl tr.click { cursor: pointer; }
.tbl td.num, .tbl th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl td.miss { color: var(--warn); background: var(--warn-bg); } .tbl td.conf { background: var(--bad-bg); color: var(--bad); }
.tbl td.diff { box-shadow: inset 3px 0 0 #D69222; } .tbl td.best, .best { background: var(--ok-bg) !important; color: var(--ok); font-weight: 700; }
.tbl tr.sect th { background: var(--p-50); color: var(--p-dark); text-transform: none; letter-spacing: 0; font-size: 13px; }
.kv td:first-child { width: 36%; color: var(--ink-2); } .kv td { vertical-align: top; }
.cmp { table-layout: fixed; min-width: 720px; }
.cmp th, .cmp td { vertical-align: top; }
.cmp th:first-child, .cmp td:first-child { position: sticky; left: 0; background: #F8F9F7; width: 190px; z-index: 2; }
.cmp thead th, .cmp tr:first-child th { text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--ink); background: #fff; }
.cmp img { width: 100%; max-width: 180px; height: 110px; object-fit: contain; background: #EFF2EE; border-radius: var(--r-sm); display: block; margin-bottom: 6px; }
.thumb { width: 52px; height: 40px; object-fit: contain; background: #EFF2EE; border-radius: 6px; display: block; }
@media (max-width: 640px) {
  .stack, .stack tbody { display: block; }
  .stack thead { display: none; }
  .tbl-wrap.sw { border: 0; background: none; box-shadow: none; overflow: visible; }
  .stack tr { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; padding: 10px 0; box-shadow: var(--sh); }
  .stack tbody tr:hover td { background: none; }
  .stack td { display: flex; gap: 12px; align-items: baseline; border: 0; padding: 5px 14px; text-align: start; }
  .stack td::before { content: attr(data-l); flex: 0 0 8em; color: var(--muted); font-size: 12.5px; }
  .stack td[data-l=""]::before { display: none; }
  .stack td:empty { display: none; }
  .stack td.num { text-align: start; justify-content: flex-start; }
  .stack td.miss, .stack td.conf { background: none; }
  .stack td > .row { flex: 1; }
}

/* ---------- admin shell ---------- */
.ashell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: #fff; border-right: 1px solid var(--line); padding: 14px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.side .sbrand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.side .grp { font-size: 11px; color: var(--muted); padding: 14px 12px 6px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.side a { display: flex; align-items: center; gap: 12px; padding: 0 12px; min-height: 40px; color: var(--ink-2); border-radius: var(--r-sm); margin-bottom: 2px; text-decoration: none !important; white-space: nowrap; font-size: 14px; font-weight: 500; }
.side a:hover { background: var(--line-2); color: var(--ink); }
.side a.on { background: var(--p-50); color: var(--p-dark); font-weight: 650; }
.side a.on .ico { color: var(--p); }
.side a > span:not(.cnt) { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.side a .cnt { flex: none; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 0 7px; line-height: 18px; }
.side .sfoot { margin-top: auto; padding: 12px 8px 4px; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--p-100); color: var(--p-dark); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.side .sfoot .nm { flex: 1; font-size: 13px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .sfoot .nm small { display: block; color: var(--muted); font-size: 12px; }
.amain { padding: 24px 28px 64px; max-width: 1400px; width: 100%; }
.atop { display: none; }
.mnav { display: none; }
.scrim { display: none; }
@media (max-width: 899px) {
  .ashell { display: block; }
  .atop { display: flex; }
  .side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; width: min(300px, 86vw); height: auto; transform: translateX(-102%); visibility: hidden; transition: transform .2s ease, visibility .2s; box-shadow: var(--sh-lg); padding-top: calc(14px + env(safe-area-inset-top)); padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .side.open { transform: none; visibility: visible; }
  .side a { min-height: 46px; }
  .scrim.open { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(12,20,16,.4); }
  .amain { padding: 16px 16px calc(var(--bnav-h) + 32px + env(safe-area-inset-bottom)); }
  .mnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .mnav a, .mnav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--bnav-h); color: var(--muted); font-size: 11.5px; font-weight: 500; text-decoration: none !important; position: relative; background: none; border: 0; cursor: pointer; padding: 4px 2px; }
  .mnav .ico { width: 22px; height: 22px; }
  .mnav .on { color: var(--p); font-weight: 700; }
}
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--sh); color: inherit; text-decoration: none !important; display: flex; flex-direction: column; gap: 2px; transition: border-color .15s, box-shadow .15s; }
.kpi:hover { border-color: #C9D3CC; box-shadow: var(--sh-md); }
.kpi b { display: block; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: 13px; line-height: 1.3; }
.kpi.hot b { color: var(--bad); } .kpi.warm b { color: var(--warn); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 0 14px; min-height: 46px; display: flex; align-items: center; color: var(--muted); white-space: nowrap; text-decoration: none !important; font-weight: 500; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--p-dark); box-shadow: inset 0 -2px 0 var(--p); font-weight: 650; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
@media (max-width: 640px) { .kanban { grid-auto-columns: 82%; } }
.kcol { background: #ECEFEA; border-radius: var(--r); padding: 10px; min-height: 220px; scroll-snap-align: start; }
.kcol h3 { font-size: 13px; display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 8px; margin: 0; }
.kcol h3 .n { background: #fff; border-radius: 99px; padding: 0 8px; font-size: 12px; color: var(--ink-2); }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; margin-bottom: 8px; font-size: 13px; cursor: pointer; box-shadow: var(--sh); display: flex; flex-direction: column; gap: 4px; }
.kcard:hover { border-color: #C3CDC6; box-shadow: var(--sh-md); }
.kcard b { font-size: 14px; }
.kcard select.inp { min-height: 40px; font-size: 13px; margin-top: 6px; padding-top: 6px; padding-bottom: 6px; }
.kempty { font-size: 12.5px; color: var(--muted); text-align: center; padding: 18px 6px; border: 1.5px dashed #CDD5CF; border-radius: var(--r-md); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.grid3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
@media (min-width: 900px) { .grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .grid3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (min-width: 1200px) { .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid2 > .card, .grid3 > .card { margin-bottom: 0; }
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
@media (max-width: 480px) { .agrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .agrid .pcard .bd { padding: 10px; } .agrid .pcard .model { font-size: 14px; } }
.agrid .pcard .ph { aspect-ratio: 4/3; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.filters .inp { width: auto; min-width: 150px; flex: 1; min-height: 44px; font-size: 14.5px; }
.filters .searchbar { flex: 2 1 240px; margin: 0; } .filters .searchbar .inp { width: 100%; }
.filters .searchbar .ico { top: 13px; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.list .li { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line-2); }
.list .li:first-child { border-top: 0; padding-top: 0; }
.list .li .ttl { font-weight: 600; }
.list .li .ico { color: var(--muted); }
.bar { display: flex; align-items: center; gap: 10px; margin: 10px 0; } .bar .lbl { width: 44%; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bar .prog { flex: 1; height: 8px; } .bar b { width: 44px; text-align: right; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.media { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
@media (max-width: 480px) { .media { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.media figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh); }
.media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #EFF2EE; }
.media .doc { display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; aspect-ratio: 4/3; background: #F3F5F2; font-size: 12px; padding: 8px; text-align: center; overflow-wrap: anywhere; }
.media figcaption { padding: 8px 10px; font-size: 12.5px; }
.media figcaption a { font-weight: 600; }
.cost { font-size: 22px; font-weight: 750; color: var(--p-dark); font-variant-numeric: tabular-nums; }
.pipe { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.pipe .kpi { padding: 12px 14px; } .pipe .kpi b { font-size: 22px; }
.attn .li { padding: 12px 0; }
.attn .ti { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--line-2); color: var(--ink-2); }
.attn .ti.bad { background: var(--bad-bg); color: var(--bad); } .attn .ti.warn { background: var(--warn-bg); color: var(--warn); } .attn .ti.info { background: var(--info-bg); color: var(--info); }
.optrow { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 0; border-top: 1px solid var(--line-2); cursor: pointer; }
.optrow:first-of-type { border-top: 0; }
.optrow.dis { opacity: .45; cursor: not-allowed; }
.cfgsum { position: sticky; top: 16px; }
.asum-top { display: flex; gap: 16px; align-items: center; }
.asum-top img, .asum-top .psum-nophoto { width: 112px; height: 84px; object-fit: contain; background: #EFF2EE; border-radius: var(--r-md); flex: none; }
.asum-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 14px; }
.asum-stat { background: #F8F9F7; border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.asum-stat b { font-size: 14px; } .asum-stat b.ok { color: var(--ok); } .asum-stat b.warn { color: var(--warn); }
.crumb { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; min-height: 36px; margin-bottom: 6px; }
.crumb .ico { width: 16px; height: 16px; }
.chat { border-left: 3px solid var(--line); padding: 4px 0 4px 12px; margin: 10px 0; }
.chat.open { border-left-color: var(--bad); } .chat.answered { border-left-color: #D69222; } .chat.closed { border-left-color: var(--ok); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--line-2); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.invite { word-break: break-all; }
@media (max-width: 640px) {
  .admin .phead > :not(.ttl) { width: 100%; }
  .asum-top img, .asum-top .psum-nophoto { width: 84px; height: 64px; }
  .cfgsum { position: static; }
  h1 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media (max-width: 640px) {
  .kv, .kv tbody, .kv tr, .kv td { display: block; }
  .kv tr { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
  .kv tr:last-child { border-bottom: 0; }
  .kv td { border: 0; padding: 2px 12px; width: auto !important; }
  .kv td:first-child { font-weight: 600; color: var(--ink); }
  .kv td:empty { display: none; }
}
@media (max-width: 640px) {
  .kpis { gap: 8px; } .kpi { padding: 10px 12px; } .kpi b { font-size: 22px; } .kpi span { font-size: 12.5px; }
  .list .li { flex-wrap: wrap; row-gap: 6px; } .list .li > .grow { flex: 1 1 60%; }
  .pipe { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pipe .kpi b { font-size: 18px; } .pipe .kpi span { font-size: 11.5px; }
  .attn .li > .btn { margin-left: 46px; }
}
.pcard .row > span { min-width: auto; }
@media (max-width: 480px) { .filters > select.inp { flex: 1 1 40%; min-width: 0; } }
