:root { --bg:#f5f6fa; --card:#fff; --ink:#1f2330; --muted:#6b7280; --line:#e5e7eb;
        --brand:#7a4fc4; --ok:#15803d; --bad:#b91c1c; --warn:#a16207; }
* { box-sizing: border-box; }
body { margin:0; font:14px/1.45 -apple-system, system-ui, "Segoe UI", sans-serif; background:var(--bg); color:var(--ink); }
a { color:var(--brand); text-decoration:none; }
code { font-size:12px; background:#f1f2f6; padding:1px 5px; border-radius:4px; }
.topbar { display:flex; align-items:center; gap:24px; background:#1f2330; color:#fff; padding:12px 20px; }
.topbar .brand { color:#fff; font-weight:700; }
.topbar nav a { color:#cbd0dc; margin-right:16px; }
.topbar nav a.active, .topbar nav a:hover { color:#fff; }
.topbar .who { margin-left:auto; color:#cbd0dc; font-size:13px; }
.topbar .who a { color:#fff; }
.container { max-width:1400px; margin:0 auto; padding:20px 16px; }
.page-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.page-head h1 { margin:0 0 12px; font-size:22px; }
.head-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.inline { display:inline; }
.muted { color:var(--muted); } .small { font-size:12px; } .center { text-align:center; } .nowrap { white-space:nowrap; } .pad { padding:28px; }
.right { margin-left:auto; }
.btn { display:inline-block; border:1px solid var(--line); background:#fff; color:var(--ink); padding:7px 12px; border-radius:6px; cursor:pointer; font-size:13px; }
.btn:hover { border-color:#c7cad3; }
.btn.primary { background:var(--brand); border-color:var(--brand); color:#fff; }
.btn.ghost { background:transparent; }
.btn.sm { padding:4px 9px; font-size:12px; }
.btn[disabled] { opacity:.5; cursor:not-allowed; }
.link { background:none; border:0; color:var(--brand); cursor:pointer; padding:0 4px; }
.alert { padding:10px 14px; border-radius:6px; margin-bottom:12px; }
.alert.ok { background:#e8f6ec; color:var(--ok); } .alert.bad { background:#fdecec; color:var(--bad); } .alert.warn { background:#fdf6e3; color:var(--warn); }
.card { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:16px; margin-bottom:16px; }
.card h3 { margin:0 0 12px; font-size:15px; }
.stats { display:flex; gap:12px; margin:8px 0 14px; flex-wrap:wrap; }
.stat { background:#fff; border:1px solid var(--line); border-radius:8px; padding:10px 16px; color:var(--ink); min-width:120px; }
.stat b { font-size:20px; display:block; } .stat span { color:var(--muted); font-size:12px; }
.stat.on { border-color:var(--brand); box-shadow:0 0 0 1px var(--brand); }
.stat.warnstat { display:flex; align-items:center; }
.filters { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; align-items:center; }
.filters input[name=q] { flex:1; min-width:240px; }
input, select, textarea { font:inherit; padding:7px 9px; border:1px solid var(--line); border-radius:6px; background:#fff; }
.chk { display:flex; align-items:center; gap:6px; }
.bulkbar { display:flex; align-items:center; gap:8px; padding:8px 0; flex-wrap:wrap; position:sticky; top:0; background:var(--bg); z-index:2; }
.table-wrap { overflow-x:auto; background:#fff; border:1px solid var(--line); border-radius:8px; }
table.grid { width:100%; border-collapse:collapse; }
table.grid th, table.grid td { padding:9px 10px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
table.grid th { font-size:12px; color:var(--muted); font-weight:600; background:#fafbfc; }
table.grid.compact td, table.grid.compact th { padding:5px 8px; }
tr.cancelled td { opacity:.5; }
.text-cell .ctext { font-weight:600; font-size:15px; }
.props summary { cursor:pointer; }
.prod-img { width:64px; height:64px; object-fit:cover; border-radius:6px; border:1px solid #e5e5e5; background:#fff; display:block; }
.prod-img.zoomable { cursor: zoom-in; }
.img-popup { border:none; border-radius:10px; padding:12px; max-width:92vw; max-height:92vh; background:#fff; box-shadow:0 10px 40px rgba(0,0,0,.35); }
.img-popup::backdrop { background: rgba(0,0,0,.65); }
.img-popup img { display:block; max-width:min(85vw, 900px); max-height:80vh; object-fit:contain; margin:0 auto; }
.img-popup #imgPopupCap { text-align:center; margin-top:8px; }
.img-popup-close { position:absolute; top:4px; right:8px; border:none; background:none; font-size:28px; line-height:1; cursor:pointer; color:#555; }
.prod-img.none { display:flex; align-items:center; justify-content:center; }
.preview img { max-height:40px; max-width:180px; background:#fff; }
.badge { display:inline-block; padding:1px 7px; border-radius:10px; font-size:11px; background:#eef0f4; color:var(--muted); margin-left:4px; }
.badge.ok { background:#e8f6ec; color:var(--ok); } .badge.bad { background:#fdecec; color:var(--bad); }
.st-pending { background:#fdf6e3; color:var(--warn); } .st-downloaded { background:#e7effd; color:#1d4ed8; } .st-cut { background:#e8f6ec; color:var(--ok); }
.pager { display:flex; gap:12px; align-items:center; justify-content:center; margin:16px 0; }
.login { max-width:340px; margin:60px auto; display:flex; flex-direction:column; gap:12px; }
.login label, .stack label { display:flex; flex-direction:column; gap:4px; font-size:13px; }
.stack { display:flex; flex-direction:column; gap:10px; }
.row2 { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.two-col { display:grid; grid-template-columns:380px 1fr; gap:16px; align-items:start; }
.testbar { display:flex; gap:8px; margin-bottom:10px; }
@media (max-width: 900px) { .two-col { grid-template-columns:1fr; } }

/* Quick SVG */
.quick-card { max-width:640px; }
.quick-preview { min-height:120px; border:1px dashed var(--line); border-radius:8px; display:flex; align-items:center; justify-content:center; padding:12px; background:#fff; }
.quick-preview img { max-width:100%; max-height:200px; }
