:root{
  --bg:#f3f5fa; --card:#fff; --ink:#161a2b; --muted:#6b7390; --line:#e6e9f2;
  --nav:#1b1f33; --nav-ink:#c3c8dd; --nav-active:#2b3150;
  --accent:#3b5bfd; --accent2:#6b46f5;
  --good:#12a150; --bad:#e03131; --warn:#e8a70b;
  --a:#3b5bfd; --b:#22a6b3; --c:#9aa2bd;
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);
  font:14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}
a{color:inherit;text-decoration:none}
.layout{display:flex;min-height:100vh}

/* ---------- бічне меню ---------- */
.side{width:232px;flex:0 0 232px;background:var(--nav);color:var(--nav-ink);
  padding:18px 12px;position:sticky;top:0;height:100vh;overflow:auto}
.brand{display:flex;align-items:baseline;gap:8px;padding:0 10px 18px}
.brand b{color:#fff;font-size:18px;letter-spacing:-.3px}
.brand span{font-size:11px;color:#7d85a8}
.side a{display:flex;gap:10px;align-items:center;padding:9px 10px;border-radius:9px;
  margin-bottom:2px;font-weight:500}
.side a:hover{background:#242942;color:#fff}
.side a.on{background:var(--nav-active);color:#fff}
.side .grp{font-size:10px;letter-spacing:.12em;color:#606a91;padding:14px 10px 6px}

/* ---------- каркас ---------- */
.main{flex:1;min-width:0;padding:22px 26px 60px}
.crumb{font-size:11px;letter-spacing:.14em;color:var(--muted);font-weight:700}
h1{font-size:26px;margin:4px 0 16px;letter-spacing:-.4px}
h2{font-size:16px;margin:0 0 12px}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;
  padding:18px;margin-bottom:16px}
.row{display:flex;gap:14px;flex-wrap:wrap}
.muted{color:var(--muted)}
.small{font-size:12px}

/* ---------- фільтри ---------- */
.filters{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:16px}
.chip{background:#fff;border:1px solid var(--line);border-radius:999px;
  padding:6px 13px;cursor:pointer;font-size:13px;font-weight:500}
.chip:hover{border-color:#c3cbe6}
.chip.on{background:var(--accent);border-color:var(--accent);color:#fff}
input[type=date],select,input[type=text],input[type=number],
input[type=password],input[type=email],input:not([type]){
  border:1px solid var(--line);border-radius:9px;padding:7px 10px;font:inherit;background:#fff}
button.act{background:var(--accent);color:#fff;border:0;border-radius:9px;
  padding:8px 15px;font:inherit;font-weight:600;cursor:pointer}
button.act:hover{filter:brightness(1.08)}
button.ghost{background:#fff;border:1px solid var(--line);border-radius:9px;
  padding:7px 12px;cursor:pointer;font:inherit}

/* ---------- герой ---------- */
.hero{background:linear-gradient(115deg,#2f3ae0,#6b46f5 62%,#8b5cf6);
  border-radius:16px;padding:24px;color:#fff;display:flex;gap:20px;flex-wrap:wrap;
  margin-bottom:16px}
.hero .big{flex:1 1 260px;min-width:240px}
.hero .lbl{font-size:11px;letter-spacing:.13em;opacity:.8;font-weight:700}
.hero .val{font-size:44px;font-weight:800;letter-spacing:-1.5px;margin:6px 0}
.hero .note{opacity:.85;font-size:12px;max-width:340px}
.hero .box{background:rgba(255,255,255,.13);border-radius:12px;padding:14px 16px;
  min-width:150px;flex:0 1 auto}
.hero .box .v{font-size:24px;font-weight:700;margin:4px 0}
.hero .box .s{font-size:11px;opacity:.85}

/* ---------- плитки ---------- */
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(178px,1fr));gap:12px}
.tile{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px}
.tile .t{font-size:11px;color:var(--muted);font-weight:600;text-transform:uppercase;
  letter-spacing:.04em}
.tile .v{font-size:21px;font-weight:700;margin-top:5px;letter-spacing:-.4px}
.tile .s{font-size:11px;color:var(--muted);margin-top:2px}
.pos{color:var(--good)} .neg{color:var(--bad)}

/* ---------- воронка ---------- */
.funnel div.f{display:flex;align-items:center;gap:12px;margin-bottom:9px}
.funnel .nm{width:150px;font-size:13px;color:var(--muted)}
.funnel .bar{flex:1;background:#eef1f9;border-radius:8px;height:26px;overflow:hidden}
.funnel .bar i{display:block;height:100%;border-radius:8px;
  background:linear-gradient(90deg,#3b5bfd,#7c5cf7);color:#fff;font-style:normal;
  font-size:12px;font-weight:700;text-align:right;padding:5px 9px 0 0}
.funnel .pc{width:60px;text-align:right;font-weight:700;color:var(--good)}

/* ---------- витрати ---------- */
.costbar{display:flex;height:16px;border-radius:8px;overflow:hidden;margin:10px 0 14px}
.costbar i{display:block;height:100%}
.legend{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px}
.legend div{display:flex;align-items:center;gap:8px;font-size:13px}
.legend b{margin-left:auto}
.dot{width:10px;height:10px;border-radius:3px;flex:0 0 10px}

/* ---------- таблиці ---------- */
table{width:100%;border-collapse:collapse;font-size:13px}
th,td{padding:8px 10px;text-align:right;border-bottom:1px solid var(--line);
  white-space:nowrap}
th:first-child,td:first-child{text-align:left}
th{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;
  font-weight:700;position:sticky;top:0;background:#fff}
tbody tr:hover{background:#fafbff}
tfoot td{font-weight:700;border-top:2px solid var(--line)}
.scroll{overflow:auto;max-height:520px;border-radius:10px}
.tag{display:inline-block;padding:2px 8px;border-radius:999px;font-size:11px;
  font-weight:700}
.st-delivered{background:#e6f6ec;color:#0f7a3d}
.st-returned{background:#fdecec;color:#c02626}
.st-shipped{background:#e9effe;color:#2743c4}
.st-confirmed{background:#fff5e0;color:#9a6b04}
.st-new{background:#f0f2f7;color:#5b6580}
.st-canceled{background:#f3f0f7;color:#6b5a86}
.abcA{background:#e9effe;color:#2743c4}
.abcB{background:#e4f6f8;color:#12707d}
.abcC{background:#f0f2f7;color:#5b6580}

/* ---------- графік ---------- */
.chart{width:100%;height:190px;display:block}
.chart .gl{stroke:#eceffa;stroke-width:1}

.warn{background:#fff8e6;border:1px solid #f2dfae;border-radius:12px;padding:12px 14px;
  margin-bottom:16px;font-size:13px}
.err{background:#fdecec;border:1px solid #f3c2c2;color:#a41d1d;border-radius:12px;
  padding:12px 14px;margin-bottom:16px}
.spin{padding:40px;text-align:center;color:var(--muted)}
@media(max-width:900px){
  .side{position:fixed;left:-232px;z-index:20;transition:.2s}
  .side.open{left:0}
  .main{padding:16px}
  .burger{display:inline-block!important}
}
.burger{display:none;margin-bottom:10px}

/* ---------- панель оновлення ---------- */
.topbar{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--line);
  border-radius:12px;padding:9px 14px;margin-bottom:14px;flex-wrap:wrap}
.topbar .stale{color:var(--warn);font-weight:600}
.topbar .busy{color:var(--accent);font-weight:600}

/* ---------- генератор лендінгів ---------- */
.genframe{width:100%;height:calc(100vh - 210px);min-height:520px;border:1px solid var(--line);
  border-radius:12px;background:#0f1115;display:block}
.genwrap.full .genframe{height:calc(100vh - 40px)}

/* ---------- логотип і іконки меню ---------- */
.brand{display:flex;align-items:center;gap:10px;padding:2px 10px 18px;text-decoration:none}
.brand .logo{width:30px;height:30px;flex:0 0 30px;border-radius:9px;
  box-shadow:0 4px 14px rgba(59,91,253,.35)}
.brand .wm{display:flex;flex-direction:column;line-height:1.05}
.brand .wm b{color:#fff;font-size:16px;letter-spacing:-.3px}
.brand .wm i{font-style:normal;font-size:10px;color:#7d85a8;letter-spacing:.09em;
  text-transform:uppercase}
.side a .ic{width:18px;height:18px;flex:0 0 18px;opacity:.72}
.side a:hover .ic{opacity:1}
.side a.on .ic{opacity:1;color:#8fa6ff}
.side a.out{color:#8a90ad;margin-top:6px}
.side a.out:hover{color:#ff8fa3;background:#2a2233}

/* ---------- каталог ---------- */
th.l,td.l{text-align:left}
.ok{background:#eaf7ee;border:1px solid #bfe3ca;color:#1c6b34;border-radius:12px;
  padding:10px 12px;font-size:13px}
