:root { --red:#ac252c; --green:#105c35; --bg:#f5f6f8; --line:#e2e4e8; --text:#1d1f23; --muted:#6b7078; --yellow:#fff4c2; }
* { box-sizing: border-box; }
body { margin:0; font-family: "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); font-size:14px; }
.top { background:#fff; border-bottom:3px solid var(--red); display:flex; gap:16px; align-items:center; padding:10px 16px; flex-wrap:wrap; position:sticky; top:0; z-index:5; }
.brand { font-weight:700; font-size:18px; color:var(--red); }
.brand small { display:block; font-weight:400; font-size:12px; color:var(--muted); }
.logo { background:var(--red); color:#fff; padding:2px 8px; border-radius:4px; margin-right:6px; }
nav { display:flex; gap:4px; flex-wrap:wrap; }
nav button { background:none; border:none; padding:8px 12px; border-radius:6px; cursor:pointer; font-size:14px; color:var(--text); }
nav button.active { background:var(--red); color:#fff; }
.who { margin-left:auto; color:var(--muted); font-size:13px; }
main { max-width:1400px; margin:0 auto; padding:16px; }
.tab { display:none; } .tab.active { display:block; }
.card { background:#fff; border:1px solid var(--line); border-radius:10px; padding:16px; margin-bottom:14px; }
h2 { font-size:16px; margin:0 0 10px; color:var(--green); }
label { display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--muted); }
input, select, textarea { font:inherit; padding:8px 10px; border:1px solid var(--line); border-radius:6px; color:var(--text); background:#fff; }
textarea { width:100%; resize:vertical; }
.grid4 { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:10px; margin-bottom:10px; }
.row { display:flex; gap:10px; align-items:center; margin-top:10px; }
.row.wrap { flex-wrap:wrap; }
button { font:inherit; padding:8px 14px; border-radius:6px; border:1px solid var(--line); background:#fff; cursor:pointer; }
button.primary { background:var(--red); color:#fff; border-color:var(--red); }
button.green { background:var(--green); color:#fff; border-color:var(--green); }
button:disabled { opacity:.5; cursor:wait; }
.file { flex-direction:row; align-items:center; border:1px dashed var(--muted); padding:7px 12px; border-radius:6px; cursor:pointer; color:var(--text); }
.file input { display:none; }
.muted { color:var(--muted); font-weight:400; font-size:13px; }
.tablewrap { overflow-x:auto; }
table { border-collapse:collapse; width:100%; min-width:1100px; }
th, td { border-bottom:1px solid var(--line); padding:6px; vertical-align:top; text-align:left; }
th { background:#fafafa; font-size:12px; color:var(--muted); position:sticky; top:0; }
td input.num { width:115px; text-align:right; }
td input.qty { width:60px; text-align:right; }
td select { max-width:230px; }
td .req { max-width:220px; white-space:pre-wrap; }
td .name { font-weight:600; }
td .spec { font-size:12px; color:var(--muted); max-width:320px; }
td.noprice input { background:var(--yellow); }
.badge { display:inline-block; font-size:11px; padding:2px 8px; border-radius:10px; font-weight:600; margin-right:6px; }
.badge.ok { background:#d8f0e1; color:var(--green); }
.badge.eq { background:#e4ecfb; color:#2650a3; }
.badge.chk { background:var(--yellow); color:#7a5a00; }
.badge.no { background:#fbe0e1; color:var(--red); }
.legend { margin-bottom:8px; }
details summary { cursor:pointer; font-size:12px; color:var(--muted); }
details p { font-size:12px; margin:4px 0; max-width:300px; }
.totals { display:flex; gap:24px; justify-content:flex-end; margin:12px 0; font-size:15px; }
.totals .grand b { color:var(--red); font-size:18px; }
.cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:12px; }
.pcard { background:#fff; border:1px solid var(--line); border-radius:10px; padding:12px; }
.pcard .code { font-size:12px; color:var(--muted); }
.pcard .price { color:var(--red); font-weight:700; margin-top:6px; }
.pcard a { color:var(--green); font-size:12px; }
.out { background:#f7f7f7; padding:10px; border-radius:6px; white-space:pre-wrap; max-height:300px; overflow:auto; font-size:12px; }
.hidden { display:none !important; }
dialog { border:none; border-radius:10px; width:min(900px,95vw); padding:0; }
.dlg { padding:16px; }
.dres { max-height:60vh; overflow:auto; margin-top:10px; }
.dres .it { padding:8px; border-bottom:1px solid var(--line); cursor:pointer; }
.dres .it:hover { background:#fff6f6; }
#toast { position:fixed; bottom:20px; right:20px; background:#222; color:#fff; padding:10px 16px; border-radius:8px; display:none; max-width:420px; z-index:20; }
@media (max-width: 700px) { .totals { flex-direction:column; align-items:flex-end; gap:4px; } .who { width:100%; } }
