:root { color-scheme:light; --ink:#17202a; --muted:#667085; --line:#dfe4ea; --surface:#fff; --surface-2:#f5f7f9; --accent:#155eef; --accent-soft:#eaf1ff; --good:#157f55; --bad:#b42318; font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
* { box-sizing:border-box; }
[hidden] { display:none!important; }
body { margin:0; background:#eef2f6; color:var(--ink); }
button,input,select { font:inherit; }
.shell { width:min(100% - 24px,1960px); margin:0 auto; padding:18px 0 32px; }
.hero { display:flex; align-items:end; justify-content:space-between; gap:22px; margin-bottom:12px; }
.eyebrow { margin:0 0 3px; color:var(--accent); font-size:10px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
h1 { margin:0; font-size:clamp(22px,3vw,31px); line-height:1.08; letter-spacing:-.025em; }
.lead { margin:6px 0 0; color:var(--muted); font-size:12px; }
.actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:7px; flex:none; }
.save-status { color:#2f6b3c; font-size:10px; font-weight:700; white-space:nowrap; }
.save-status.save-error { color:#9b3a32; }
.button { min-height:34px; padding:0 11px; border:1px solid #cfd6df; border-radius:8px; background:var(--surface); color:#334155; font-size:11px; cursor:pointer; }
.button.primary { border-color:var(--accent); background:var(--accent); color:#fff; }
.button.add { border-color:#9db8f3; background:var(--accent-soft); color:#174ea6; font-weight:700; }
.rule-strip { display:flex; align-items:center; gap:18px; margin-bottom:9px; padding:9px 13px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.rule { display:flex; align-items:baseline; gap:7px; padding-right:18px; border-right:1px solid var(--line); }
.rule:last-child { padding-right:0; border-right:0; }
.rule span { color:var(--muted); font-size:10px; }
.rule strong { font-size:15px; }
.notice { margin:0 0 10px; padding:8px 12px; border:1px solid #bfd4ff; border-radius:9px; background:#f4f7ff; color:#294b8b; font-size:10px; line-height:1.45; }
.table-card { overflow:hidden; border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:0 16px 40px -36px rgba(17,24,39,.6); }
.table-meta { display:flex; gap:12px; align-items:baseline; padding:9px 12px; border-bottom:1px solid var(--line); }
.table-meta strong { font-size:11px; }
.table-meta span { color:var(--muted); font-size:9px; }
.table-scroll { overflow-x:auto; scrollbar-gutter:stable; }
table { width:100%; min-width:3050px; border-collapse:separate; border-spacing:0; font-size:10px; font-variant-numeric:tabular-nums; }
th { position:sticky; top:0; z-index:3; height:42px; padding:5px 7px; border-bottom:1px solid var(--line); border-right:1px solid #e9edf2; background:var(--surface-2); color:#576170; font-size:8.5px; font-weight:750; text-align:right; white-space:nowrap; }
td { height:94px; padding:7px; border-bottom:1px solid #ebeff3; border-right:1px solid #f0f2f5; background:#fff; text-align:right; vertical-align:middle; white-space:nowrap; }
tbody tr:last-child td { border-bottom:0; }
tbody tr:hover td { background:#fbfcfe; }
.product-head,.product-cell { position:sticky; left:0; min-width:220px; max-width:220px; text-align:left; }
.product-head { z-index:6; }
.product-cell { z-index:2; border-right-color:#d8dee6; }
.product-edit { display:flex; flex-direction:column; gap:5px; }
.product-edit input { width:100%; text-align:left; }
.sku-input { color:var(--accent); font-size:10px; font-weight:750; }
.name-input { font-size:8.5px; }
.product-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.product-actions a { color:#315fae; font-size:8px; text-decoration:none; }
.product-actions button { padding:0; border:0; background:transparent; color:#9b3a32; font-size:8px; cursor:pointer; }
.profit-head,.profit-cell { position:sticky; right:0; min-width:170px; max-width:170px; border-left:1px solid #cfd6df; }
.profit-head { z-index:6; }
.profit-cell { z-index:2; background:#f1faf6; }
.profit-cell strong { display:block; color:var(--good); font-size:13px; }
.profit-cell span { display:block; margin-top:2px; color:var(--good); font-size:10px; font-weight:750; }
.profit-cell small { display:block; overflow:hidden; max-width:155px; margin-top:5px; color:var(--muted); font-size:7.5px; line-height:1.2; white-space:normal; }
input,select { height:29px; border:1px solid #d5dbe3; border-radius:6px; background:#fff; color:var(--ink); font-size:9px; outline:none; }
input { padding:4px 5px; text-align:right; }
select { padding:3px 20px 3px 6px; }
input:focus,select:focus { border-color:var(--accent); box-shadow:0 0 0 2px rgba(21,94,239,.1); }
td>small,.stack-cell small { display:block; margin-top:4px; color:var(--muted); font-size:7.5px; line-height:1.15; }
.stack-cell { display:flex; min-width:112px; flex-direction:column; align-items:flex-end; gap:4px; }
.stack-cell strong { color:#344054; }
.fbs-only { display:flex; flex-direction:column; align-items:flex-end; gap:4px; }
.money-input { width:70px; }
.percent-input { width:56px; }
.mini-input { width:70px; }
.tiny-input { width:48px; height:25px; }
.date-input { width:112px; }
.scheme-select { width:60px; }
.wide-select { width:148px; }
.log-mode { width:130px; }
.category-cell { display:flex; align-items:center; gap:4px; }
.category-picker { display:flex; width:215px; min-height:64px; padding:6px 8px; flex-direction:column; align-items:flex-start; justify-content:center; gap:3px; border:1px solid #d5dbe3; border-radius:7px; background:#fff; color:var(--ink); text-align:left; cursor:pointer; }
.category-picker:hover { border-color:#8fb0ef; background:#f8faff; }
.category-picker strong,.category-picker span,.category-picker small { display:block; overflow:hidden; width:100%; text-overflow:ellipsis; white-space:nowrap; }
.category-picker strong { font-size:9px; }
.category-picker span { color:var(--muted); font-size:7.5px; }
.category-picker small { margin:0; color:var(--accent); font-size:7.5px; font-weight:700; }
.custom-rate-input { width:52px; }
.dimension-cell { display:flex; align-items:center; gap:3px; }
.dimension-cell b { color:#98a2b3; font-weight:500; }
.dimension-input { width:47px; }
.mini-label { display:flex; align-items:center; gap:3px; color:var(--muted); font-size:7.5px; }
.returns-cell { min-width:136px; }
.returns-cell select { width:130px; }
.calc-cell { color:#344054; font-weight:650; }
.calc-cell strong { display:block; color:var(--accent); font-size:11px; }
.calc-cell small { display:block; margin-top:3px; color:var(--muted); font-weight:500; }
.ozon-total strong { color:#344054; }
.buyer-price-cell strong { color:#7a4b00; }
.negative { color:var(--bad)!important; }
.row-error td { background:#fff4f2!important; }
.empty-row td { height:120px; color:var(--muted); font-size:11px; text-align:center; }
.table-note { margin:0; padding:8px 12px; border-top:1px solid var(--line); color:var(--muted); font-size:9px; line-height:1.45; }
.method { margin-top:9px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--muted); font-size:10px; }
.method summary { color:#344054; font-weight:750; cursor:pointer; }
.method ul { margin:10px 0 0; padding-left:17px; line-height:1.55; }
.method li+li { margin-top:3px; }
.sources { margin:8px 0 0; line-height:1.45; }
.sources a { color:#315fae; }
.modal-open { overflow:hidden; }
.category-modal { position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:22px; }
.category-backdrop { position:absolute; inset:0; background:rgba(15,23,42,.58); backdrop-filter:blur(3px); }
.category-panel { position:relative; display:flex; width:min(980px,96vw); height:min(820px,90vh); padding:18px; flex-direction:column; border:1px solid #d6deea; border-radius:16px; background:#f8fafc; box-shadow:0 30px 90px rgba(15,23,42,.35); }
.category-panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:12px; }
.category-panel-head h2 { margin:0; font-size:22px; }
.category-close { width:34px; height:34px; border:1px solid #d2d9e3; border-radius:9px; background:#fff; color:#475467; font-size:22px; line-height:1; cursor:pointer; }
.category-search { width:100%; height:44px; padding:0 14px; border-color:#b9c9e8; border-radius:10px; font-size:13px; text-align:left; }
.category-results-meta { margin:8px 2px; color:var(--muted); font-size:10px; }
.category-results { min-height:0; overflow-y:auto; border:1px solid var(--line); border-radius:11px; background:#fff; }
.category-result { display:flex; width:100%; min-height:58px; padding:9px 12px; align-items:center; justify-content:space-between; gap:16px; border:0; border-bottom:1px solid #edf0f4; border-radius:0; background:#fff; color:var(--ink); text-align:left; cursor:pointer; }
.category-result:last-child { border-bottom:0; }
.category-result:hover,.category-result:focus { position:relative; background:#f2f6ff; outline:1px solid #8bb0f7; }
.category-result>span:first-child { min-width:0; }
.category-result strong,.category-result small { display:block; }
.category-result strong { overflow:hidden; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.category-result small { margin-top:4px; color:var(--muted); font-size:9px; }
.manual-result { background:#fffaf0; }
.rate-badges { display:flex; flex:none; gap:6px; }
.rate-badges b { min-width:66px; padding:5px 7px; border-radius:6px; background:var(--accent-soft); color:#174ea6; font-size:9px; text-align:center; }
.category-empty { padding:24px; color:var(--muted); font-size:11px; text-align:center; }
.category-source { margin:10px 2px 0; color:var(--muted); font-size:9px; line-height:1.4; }
@media (max-width:760px) { .shell { width:min(100% - 14px,1960px); padding-top:12px; }.hero { align-items:stretch; flex-direction:column; }.rule-strip { align-items:flex-start; flex-direction:column; gap:6px; }.rule { width:100%; padding:0 0 6px; border-right:0; border-bottom:1px solid var(--line); }.rule:last-child { padding-bottom:0; border-bottom:0; } }
@media print { body { background:#fff; }.shell { width:100%; padding:0; }.actions,.notice,.method { display:none; }.table-scroll { overflow:visible; }table { min-width:0; font-size:6px; } }
