@import url('/static/fonts/inter.css');
:root {
  --brand:#1f49d9; --brand-2:#4c6fe8; --brand-soft:#e9efff; --navy:#0e1835; --navy-2:#16224a;
  --ink:#141b2d; --ink-2:#3b4660; --ink-3:#6b7690; --line:#e3e8f2; --line-2:#eef1f7; --bg:#f3f5fa; --card:#ffffff;
  --ok:#139a63; --ok-soft:#e3f6ec; --warn:#c77800; --warn-soft:#fff3df; --bad:#d0392b; --bad-soft:#fdebe9;
  --amber:#f2a93b; --teal:#13a0a0; --violet:#7c5cff; --shadow:0 1px 2px rgba(20,27,45,.04), 0 8px 24px -12px rgba(20,27,45,.12);
  --radius:16px;
}
* { box-sizing:border-box; }
html, body { height:100%; }
body { margin:0; font-family:Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size:14px; color:var(--ink); background:var(--bg); -webkit-font-smoothing:antialiased; }
a { color:var(--brand); text-decoration:none; }
button { font-family:inherit; }
.hidden { display:none !important; }

/* ── каркас ── */
.layout { display:grid; grid-template-columns:240px 1fr; min-height:100vh; }
.sidebar { background:var(--navy); color:#c9d3ee; display:flex; flex-direction:column; position:sticky; top:0; height:100vh; }
.brand { padding:22px 20px 16px; display:flex; align-items:center; gap:12px; border-bottom:1px solid rgba(255,255,255,.08); }
.brand { gap:8px; padding:20px 14px 16px; }
.brand img.cy { height:18px; width:auto; filter:brightness(0) invert(1); flex:none; }
.brand img.bh { height:auto; width:118px; max-width:118px; flex:none; }
.brand .x { color:#8d9bc4; font-weight:300; font-size:14px; flex:none; }
.brand .t { font-weight:700; color:#fff; font-size:14px; line-height:1.15; }
.brand .t small { display:block; font-weight:500; color:#8d9bc4; font-size:11px; margin-top:2px; }
.nav { padding:12px 10px; display:flex; flex-direction:column; gap:2px; flex:1; }
.nav a { display:flex; align-items:center; gap:11px; padding:10px 12px; border-radius:10px; color:#b7c3e6; font-weight:500; transition:background .15s, color .15s; }
.nav a svg { width:18px; height:18px; flex:none; opacity:.85; }
.nav a:hover { background:rgba(255,255,255,.06); color:#fff; }
.nav a.active { background:var(--brand); color:#fff; box-shadow:0 6px 16px -6px rgba(31,73,217,.7); }
.nav a .badge { margin-left:auto; font-size:10px; font-weight:700; padding:2px 7px; border-radius:999px; background:rgba(255,255,255,.14); color:#fff; }
.nav .sep { height:1px; background:rgba(255,255,255,.08); margin:8px 6px; }
.sidefoot { padding:14px 18px; border-top:1px solid rgba(255,255,255,.08); font-size:12px; color:#8d9bc4; }
.sidefoot b { color:#fff; display:block; font-weight:600; }
.sidefoot .by { margin-top:10px; color:#6f7ea8; font-size:10px; letter-spacing:.06em; text-transform:uppercase; }
.sidefoot a { color:#aab8e0; cursor:pointer; }
.main { min-width:0; }
.topbar { position:sticky; top:0; z-index:20; background:rgba(243,245,250,.9); backdrop-filter:blur(8px); border-bottom:1px solid var(--line); padding:14px 28px; display:flex; flex-wrap:wrap; gap:10px 14px; align-items:center; }
.topbar h1 { font-size:20px; margin:0; font-weight:700; letter-spacing:-.01em; }
.topbar .sub { font-size:12px; color:var(--ink-3); width:100%; order:9; margin-top:-4px; }
.topbar .grow { flex:1; }
.content { padding:22px 28px 60px; max-width:1500px; }

/* ── элементы управления ── */
.chips { display:inline-flex; background:#fff; border:1px solid var(--line); border-radius:12px; padding:3px; gap:2px; }
.chips button { border:0; background:transparent; padding:7px 12px; border-radius:9px; font-weight:600; color:var(--ink-2); cursor:pointer; font-size:13px; }
.chips button.active { background:var(--brand); color:#fff; }
.chips button:hover:not(.active) { background:var(--brand-soft); color:var(--brand); }
.ctl { border:1px solid var(--line); background:#fff; border-radius:10px; padding:8px 11px; font-size:13px; color:var(--ink); font-family:inherit; height:36px; }
select.ctl { padding-right:28px; appearance:none; background:#fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7690' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 10px center; }
input.ctl[type=date] { width:140px; }
.btn { border:0; background:var(--brand); color:#fff; font-weight:600; padding:9px 14px; border-radius:10px; cursor:pointer; font-size:13px; }
.btn.ghost { background:#fff; color:var(--ink-2); border:1px solid var(--line); }
.btn:disabled { opacity:.5; cursor:default; }
.status { font-size:12px; color:var(--ink-3); display:flex; align-items:center; gap:6px; }
.status .dot { width:8px; height:8px; border-radius:50%; background:var(--ok); box-shadow:0 0 0 3px var(--ok-soft); }
.status .dot.warn { background:var(--warn); box-shadow:0 0 0 3px var(--warn-soft); }

/* ── карточки ── */
.grid { display:grid; gap:16px; }
.g-kpi { grid-template-columns:repeat(6, minmax(0,1fr)); margin-bottom:18px; }
@media (max-width:1400px) { .g-kpi { grid-template-columns:repeat(3, minmax(0,1fr)); } }
@media (max-width:700px) { .g-kpi { grid-template-columns:repeat(2, minmax(0,1fr)); } }
.g-2 { grid-template-columns:minmax(0,2fr) minmax(0,1fr); }
.g-3 { grid-template-columns:repeat(3, minmax(0,1fr)); }
.g-cards { grid-template-columns:repeat(auto-fill, minmax(290px, 1fr)); }
@media (max-width:1100px) { .g-2, .g-3 { grid-template-columns:1fr; } }
.card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px 20px; box-shadow:var(--shadow); margin-bottom:16px; min-width:0; }
.card.tight { padding:0; overflow:hidden; }
.card h3 { margin:0 0 12px; font-size:15px; font-weight:700; display:flex; align-items:center; gap:10px; }
.card h3 small { font-weight:500; color:var(--ink-3); font-size:12px; }
.card h3 .right { margin-left:auto; display:flex; gap:8px; align-items:center; }
.kpi { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:16px 18px 14px; box-shadow:var(--shadow); display:flex; flex-direction:column; gap:6px; position:relative; min-width:0; }
.kpi .l { font-size:12px; font-weight:600; color:var(--ink-3); letter-spacing:.02em; display:flex; align-items:center; gap:8px; }
.kpi .l i { width:30px; height:30px; border-radius:9px; display:inline-flex; align-items:center; justify-content:center; background:var(--brand-soft); color:var(--brand); }
.kpi .l i svg { width:16px; height:16px; }
.kpi .v { font-size:clamp(17px, 1.3vw, 26px); font-weight:700; letter-spacing:-.02em; font-variant-numeric:tabular-nums; line-height:1.15; overflow-wrap:anywhere; }
.kpi .v.sm { font-size:16px; line-height:1.3; }
.kpi .d { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--ink-3); min-height:18px; flex-wrap:wrap; }
.kpi .spark { width:100%; height:30px; margin-top:4px; opacity:.9; }
.kpi .spark svg { width:100%; height:30px; }
.delta { display:inline-flex; align-items:center; gap:3px; font-weight:700; font-size:12px; padding:2px 7px; border-radius:999px; white-space:nowrap; }
.delta.up { color:var(--ok); background:var(--ok-soft); } .delta.down { color:var(--bad); background:var(--bad-soft); } .delta.flat { color:var(--ink-3); background:var(--line-2); }
.chart { position:relative; height:300px; }
.chart.sm { height:220px; } .chart.lg { height:360px; }
.muted { color:var(--ink-3); } .ok { color:var(--ok); } .bad { color:var(--bad); } .warn { color:var(--warn); }
.num { text-align:right; font-variant-numeric:tabular-nums; }
.empty { padding:36px 20px; text-align:center; color:var(--ink-3); }
.empty b { display:block; color:var(--ink-2); margin-bottom:6px; font-size:15px; }
.note { font-size:12px; color:var(--ink-3); margin-top:10px; line-height:1.5; }
.pill { display:inline-block; padding:2px 9px; border-radius:999px; font-size:11px; font-weight:600; white-space:nowrap; }
.pill.ok { background:var(--ok-soft); color:var(--ok); } .pill.bad { background:var(--bad-soft); color:var(--bad); } .pill.warn { background:var(--warn-soft); color:var(--warn); } .pill.n { background:var(--line-2); color:var(--ink-2); } .pill.brand { background:var(--brand-soft); color:var(--brand); }
.bar { height:6px; background:var(--line-2); border-radius:3px; overflow:hidden; min-width:70px; } .bar i { display:block; height:100%; background:var(--brand); border-radius:3px; }
.bar.ok i { background:var(--ok); } .bar.warn i { background:var(--amber); } .bar.bad i { background:var(--bad); }
.skeleton { background:linear-gradient(90deg, var(--line-2) 25%, #f7f8fc 50%, var(--line-2) 75%); background-size:200% 100%; animation:sk 1.2s infinite; border-radius:8px; min-height:14px; }
@keyframes sk { 0% { background-position:200% 0 } 100% { background-position:-200% 0 } }

/* ── таблицы ── */
.tbl { width:100%; border-collapse:collapse; font-size:13px; }
.tbl th { text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--ink-3); padding:10px 12px; border-bottom:1px solid var(--line); white-space:nowrap; font-weight:600; background:#fafbfe; position:sticky; top:0; }
.tbl th.num { text-align:right; }
.tbl th.sortable { cursor:pointer; } .tbl th.sortable:hover { color:var(--brand); }
.tbl td { padding:10px 12px; border-bottom:1px solid var(--line-2); vertical-align:middle; }
.tbl tr:last-child td { border-bottom:0; }
.tbl tr.click { cursor:pointer; } .tbl tr.click:hover td { background:#f6f8fd; }
.tbl .name { font-weight:600; } .tbl .sub { display:block; font-size:11px; color:var(--ink-3); font-weight:400; margin-top:1px; }
.tbl .rank { color:var(--ink-3); width:28px; }
.scroll { overflow:auto; max-height:70vh; }
.sparkcell svg { width:90px; height:26px; display:block; }

/* ── тепловая карта ── */
.heat { display:grid; grid-template-columns:34px repeat(24, 1fr); gap:3px; font-size:11px; }
.heat .h { color:var(--ink-3); text-align:center; }
.heat .r { color:var(--ink-3); font-weight:600; display:flex; align-items:center; }
.heat .c { aspect-ratio:1.4; border-radius:4px; background:var(--brand); }
.legend { display:flex; gap:14px; flex-wrap:wrap; font-size:12px; color:var(--ink-2); margin-top:8px; }
.legend i { display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:6px; vertical-align:-1px; }

/* ── календарь ── */
.months { display:grid; grid-template-columns:repeat(auto-fill, minmax(330px,1fr)); gap:16px; }
.month h4 { margin:0 0 8px; font-size:14px; }
.mgrid { display:grid; grid-template-columns:repeat(7, 1fr); gap:4px; }
.mgrid .dh { font-size:10px; color:var(--ink-3); text-align:center; text-transform:uppercase; }
.day { border-radius:9px; padding:6px 6px 5px; min-height:62px; background:var(--line-2); position:relative; font-size:11px; }
.day .n { font-weight:700; font-size:12px; } .day .a { display:block; font-weight:600; margin-top:2px; }
.day .w { position:absolute; right:6px; top:5px; font-size:10px; color:var(--ink-3); }
.day .hname { display:block; color:var(--bad); font-weight:600; font-size:10px; line-height:1.2; margin-top:2px; }
.day.off .n { color:var(--bad); }
.day.empty { background:transparent; }
.day.future { opacity:.8; }

/* ── карточки магазинов ── */
.shopcard { cursor:pointer; transition:transform .12s, box-shadow .12s; }
.shopcard:hover { transform:translateY(-2px); box-shadow:0 14px 28px -14px rgba(20,27,45,.25); }
.shopcard .hd { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.shopcard .nm { font-weight:700; font-size:15px; } .shopcard .code { color:var(--ink-3); font-size:12px; }
.shopcard .big { font-size:24px; font-weight:700; margin:8px 0 2px; letter-spacing:-.02em; }
.shopcard .row { display:flex; justify-content:space-between; font-size:12px; color:var(--ink-3); margin-top:6px; }
.shopcard .row b { color:var(--ink); font-weight:600; }
.shopcard svg.sp { width:100%; height:44px; margin-top:8px; }

/* ── выдвижная панель ── */
.drawer-bg { position:fixed; inset:0; background:rgba(14,24,53,.45); z-index:40; opacity:0; pointer-events:none; transition:opacity .2s; }
.drawer-bg.open { opacity:1; pointer-events:auto; }
.drawer { position:fixed; top:0; right:0; bottom:0; width:min(720px, 100%); background:#fff; z-index:41; transform:translateX(100%); transition:transform .25s; overflow:auto; padding:22px 24px 40px; box-shadow:-20px 0 50px -30px rgba(0,0,0,.4); }
.drawer.open { transform:none; }
.drawer .close { position:absolute; right:18px; top:16px; border:0; background:var(--line-2); width:32px; height:32px; border-radius:50%; cursor:pointer; font-size:16px; }
.drawer h2 { margin:0 0 4px; font-size:19px; padding-right:40px; }
.drawer .sub { color:var(--ink-3); font-size:13px; margin-bottom:14px; }

/* ── чат ── */
.chat { display:grid; grid-template-rows:1fr auto; height:calc(100vh - 150px); min-height:480px; }
.msgs { overflow:auto; padding:6px 4px; display:flex; flex-direction:column; gap:12px; }
.msg { max-width:80%; padding:12px 14px; border-radius:14px; line-height:1.5; white-space:pre-wrap; font-size:14px; }
.msg.me { align-self:flex-end; background:var(--brand); color:#fff; border-bottom-right-radius:4px; }
.msg.ai { align-self:flex-start; background:#fff; border:1px solid var(--line); border-bottom-left-radius:4px; box-shadow:var(--shadow); }
.msg.ai .src { display:block; font-size:11px; color:var(--ink-3); margin-top:8px; }
.msg table { border-collapse:collapse; margin-top:8px; font-size:13px; } .msg td, .msg th { border:1px solid var(--line); padding:4px 8px; }
.composer { display:flex; gap:8px; padding-top:12px; }
.composer textarea { flex:1; border:1px solid var(--line); border-radius:12px; padding:11px 12px; font-family:inherit; font-size:14px; resize:none; height:48px; }
.suggest { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.suggest button { border:1px solid var(--line); background:#fff; border-radius:999px; padding:7px 12px; font-size:12px; cursor:pointer; color:var(--ink-2); }
.suggest button:hover { border-color:var(--brand); color:var(--brand); }

/* ── вход ── */
.login-wrap { min-height:100vh; display:grid; place-items:center; background:radial-gradient(1200px 600px at 20% -10%, #dfe7ff 0%, var(--bg) 55%); }
.login { width:380px; background:#fff; border:1px solid var(--line); border-radius:20px; padding:30px 30px 26px; box-shadow:var(--shadow); }
.login .logos { display:flex; align-items:center; gap:12px; margin-bottom:18px; }
.login .logos img.bh { height:30px; } .login .logos img.cy { height:24px; } .login .logos .x { color:var(--ink-3); font-size:18px; }
.login h2 { margin:0 0 4px; font-size:20px; } .login p { margin:0 0 18px; color:var(--ink-3); font-size:13px; }
.login label { font-size:12px; font-weight:600; color:var(--ink-2); display:block; margin-bottom:6px; }
.login input { width:100%; margin-bottom:14px; padding:11px 12px; border:1px solid var(--line); border-radius:10px; font-size:14px; font-family:inherit; }
.login .btn { width:100%; padding:12px; font-size:14px; }
.err { color:var(--bad); font-size:12px; min-height:16px; margin-bottom:8px; }
.toast { position:fixed; bottom:20px; left:50%; transform:translateX(-50%); background:var(--navy); color:#fff; padding:10px 16px; border-radius:12px; font-size:13px; z-index:60; box-shadow:var(--shadow); }

@media (max-width:900px) {
  .layout { grid-template-columns:1fr; }
  .sidebar { position:static; height:auto; }
  .nav { flex-direction:row; flex-wrap:wrap; }
  .nav a span { display:none; }
  .sidefoot { display:none; }
  .topbar, .content { padding-left:16px; padding-right:16px; }
  .heat { font-size:9px; }
}

/* ── лоудеры ── */
.progress { position:fixed; top:0; left:0; right:0; height:3px; z-index:100; background:linear-gradient(90deg, var(--brand), var(--teal), var(--brand)); background-size:200% 100%; animation:prog 1s linear infinite; opacity:0; transition:opacity .2s; pointer-events:none; }
.progress.on { opacity:1; }
@keyframes prog { 0% { background-position:0 0 } 100% { background-position:200% 0 } }
.spinner { width:14px; height:14px; border:2px solid var(--line); border-top-color:var(--brand); border-radius:50%; animation:spin .8s linear infinite; display:inline-block; vertical-align:-2px; }
@keyframes spin { to { transform:rotate(360deg) } }
.loading { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:40px 20px; color:var(--ink-3); font-size:13px; }
.loading .spinner { width:26px; height:26px; border-width:3px; }
.loading b { color:var(--ink-2); font-weight:600; }
.sk-page { display:grid; gap:16px; }
.sk-page .sk-kpis { display:grid; grid-template-columns:repeat(6, 1fr); gap:16px; } .sk-page .sk-kpis div { height:110px; }
@media (max-width:1400px) { .sk-page .sk-kpis { grid-template-columns:repeat(3, 1fr); } }
.sk-page .sk-row { display:grid; grid-template-columns:2fr 1fr; gap:16px; } .sk-page .sk-row div { height:360px; }
.card.busy { position:relative; } .card.busy:after { content:""; position:absolute; inset:0; background:rgba(255,255,255,.6); border-radius:var(--radius); }
.card.busy:before { content:""; position:absolute; left:50%; top:50%; width:26px; height:26px; margin:-13px 0 0 -13px; border:3px solid var(--line); border-top-color:var(--brand); border-radius:50%; animation:spin .8s linear infinite; z-index:2; }

/* ── отчёт в чате ── */
.msg.ai.wide { max-width:96%; }
.rep { margin-top:10px; border:1px solid var(--line); border-radius:12px; padding:12px 14px; background:#fafbfe; }
.rep .rt { font-weight:700; font-size:14px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.rep .rt .right { margin-left:auto; display:flex; gap:6px; }
.rep .rs { color:var(--ink-3); font-size:12px; margin:2px 0 10px; }
.rep .kpis { display:grid; grid-template-columns:repeat(auto-fit, minmax(140px,1fr)); gap:8px; margin-bottom:10px; }
.rep .k { background:#fff; border:1px solid var(--line); border-radius:10px; padding:8px 10px; } .rep .k .l { font-size:11px; color:var(--ink-3); font-weight:600; } .rep .k .v { font-size:18px; font-weight:700; } .rep .k .s { font-size:11px; color:var(--ink-3); }
.rep .ch { position:relative; height:220px; background:#fff; border:1px solid var(--line); border-radius:10px; padding:8px; margin-bottom:8px; }
.rep .ch h4 { margin:0 0 4px; font-size:12px; color:var(--ink-2); } .rep .ch canvas { max-height:180px; }
.rep table { width:100%; border-collapse:collapse; font-size:12px; background:#fff; } .rep th { text-align:left; background:#f3f5fa; padding:5px 8px; font-size:11px; } .rep td { padding:4px 8px; border-bottom:1px solid var(--line-2); }
.rep .notes { font-size:12px; color:var(--ink-2); border-left:3px solid var(--brand); padding-left:8px; margin:8px 0; }
.rep .check { font-size:12px; margin-top:8px; display:flex; gap:6px; align-items:center; }
.btn.sm { padding:6px 10px; font-size:12px; }

/* ── чаты ── */
.chatwrap { display:grid; grid-template-columns:260px 1fr; gap:16px; height:calc(100vh - 150px); min-height:520px; }
@media (max-width:900px) { .chatwrap { grid-template-columns:1fr; height:auto; } }
.chatlist { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:12px; display:flex; flex-direction:column; gap:6px; overflow:auto; }
.chatlist .btn { width:100%; }
.chatlist a { display:block; padding:9px 10px; border-radius:10px; color:var(--ink-2); font-size:13px; cursor:pointer; line-height:1.3; }
.chatlist a:hover { background:var(--bg); } .chatlist a.active { background:var(--brand-soft); color:var(--brand); font-weight:600; }
.chatlist a small { display:block; color:var(--ink-3); font-weight:400; font-size:11px; margin-top:2px; }
.chatlist a .del { float:right; color:var(--ink-3); font-size:12px; padding:0 4px; } .chatlist a .del:hover { color:var(--bad); }
.chat { display:grid; grid-template-rows:1fr auto; min-height:0; height:auto; }
.fc-weekend { background:rgba(242,169,59,.12); }
.sqlbox { margin-top:8px; font-size:11px; color:var(--ink-3); } .sqlbox summary { cursor:pointer; } .sqlbox pre { white-space:pre-wrap; background:#f3f5fa; padding:6px 8px; border-radius:6px; margin:6px 0 0; font-size:11px; color:var(--ink-2); }

/* ── выбор категории ── */
.catpick { position:relative; min-width:260px; }
.catpick input { width:100%; }
.catpick .dd { position:absolute; z-index:30; top:40px; left:0; width:360px; max-height:420px; overflow:auto; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 18px 40px -18px rgba(20,27,45,.35); padding:6px; display:none; }
.catpick .dd.open { display:block; }
.catpick .g { font-weight:700; font-size:13px; padding:8px 10px 4px; color:var(--ink); }
.catpick .o { padding:6px 10px 6px 22px; font-size:13px; color:var(--ink-2); cursor:pointer; border-radius:8px; }
.catpick .o.all { font-weight:600; color:var(--brand); padding-left:10px; }
.catpick .o:hover, .catpick .o.sel { background:var(--brand-soft); color:var(--brand); }
.catpick .o small { color:var(--ink-3); margin-left:6px; }
/* ── настройки ── */
.form { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px,1fr)); gap:12px 16px; }
.form label { display:block; font-size:12px; font-weight:600; color:var(--ink-2); margin-bottom:5px; }
.form .ctl { width:100%; }
.form .hint { font-size:11px; color:var(--ink-3); margin-top:3px; }
.chk { display:flex; flex-wrap:wrap; gap:6px; }
.chk label { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); border-radius:999px; padding:5px 10px; font-weight:500; font-size:12px; cursor:pointer; margin:0; }
.chk label.on { background:var(--brand-soft); border-color:var(--brand); color:var(--brand); }
.chk input { display:none; }
.rolepill { font-size:11px; font-weight:700; padding:2px 8px; border-radius:999px; }
.rolepill.admin { background:#fdecec; color:var(--bad); } .rolepill.director { background:var(--brand-soft); color:var(--brand); } .rolepill.analyst { background:var(--ok-soft); color:var(--ok); }
.bxpick { position:relative; } .bxpick .dd { position:absolute; z-index:30; top:40px; left:0; right:0; max-height:300px; overflow:auto; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 18px 40px -18px rgba(20,27,45,.35); padding:6px; display:none; }
.bxpick .dd.open { display:block; } .bxpick .o { padding:8px 10px; font-size:13px; cursor:pointer; border-radius:8px; } .bxpick .o:hover { background:var(--brand-soft); color:var(--brand); } .bxpick .o small { display:block; color:var(--ink-3); font-size:11px; }

/* выбор нескольких магазинов */
.msel { position:relative; }
.msel-btn { display:inline-flex; align-items:center; gap:8px; cursor:pointer; max-width:260px; font-weight:600; }
.msel-btn span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.msel-btn .caret { color:var(--ink-3); font-size:11px; }
.msel-btn.static { cursor:default; }
.msel .dd { display:none; position:absolute; z-index:40; top:40px; right:0; width:300px; max-height:460px; overflow:auto; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 12px 32px rgba(14,24,53,.14); padding:8px; }
.msel .dd.open { display:block; }
.msel .quick { display:flex; gap:12px; padding:4px 8px 8px; border-bottom:1px solid var(--line-2); margin-bottom:4px; }
.msel .quick a { font-size:12px; font-weight:600; color:var(--brand); cursor:pointer; }
.msel .quick a:hover { text-decoration:underline; }
.msel .o { display:flex; align-items:center; gap:8px; padding:6px 8px; font-size:13px; color:var(--ink-2); border-radius:8px; cursor:pointer; }
.msel .o:hover { background:var(--brand-soft); }
.msel .o span { flex:1; }
.msel .o small { color:var(--bad); font-size:11px; }
.msel .foot { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 8px 2px; border-top:1px solid var(--line-2); margin-top:4px; font-size:12px; }
/* выгрузка в Excel, подсказки, период сравнения */
.xls { display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 12px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ok); font-weight:600; font-size:13px; cursor:pointer; text-decoration:none; white-space:nowrap; }
.xls:hover { background:var(--ok-soft); }
.kpi .l .hint { display:inline-flex; align-items:center; justify-content:center; width:15px; height:15px; border-radius:50%; background:var(--line-2); color:var(--ink-3); font-size:10px; font-weight:700; cursor:help; }
.cmpnote { font-size:12px; color:var(--ink-3); margin:-6px 2px 14px; }
.cmpnote b { color:var(--ink-2); font-weight:600; }
.scroll.dyn { max-height:420px; overflow:auto; }
.scroll.dyn thead th { position:sticky; top:0; background:#fff; z-index:1; }
.cmpwarn { display:block; margin-top:4px; color:var(--warn); font-weight:600; }
/* остатки: устаревшая выгрузка и магазины, не вошедшие в итоги */
.stalewarn { margin:0 0 14px; padding:12px 16px; border:1px solid var(--bad); border-left-width:4px; border-radius:12px; background:var(--bad-soft); color:var(--ink); font-size:13px; line-height:1.5; }
.stalewarn > b:first-child { color:var(--bad); }
.stalenote { margin:-4px 2px 14px; font-size:12px; color:var(--ink-3); }
.tbl .sub.bad { color:var(--bad); }
/* отклонение второй строкой под значением (таблица магазинов на обзоре, карточки магазинов) */
.dsub { display:block; margin-top:2px; font-size:11px; font-weight:600; white-space:nowrap; }
.dsub.up { color:var(--ok); } .dsub.down { color:var(--bad); } .dsub.flat { color:var(--ink-3); font-weight:400; }
.shopcard .stats { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px; margin-top:8px; font-size:12px; color:var(--ink-3); white-space:nowrap; }
.shopcard .stats b { display:block; margin-top:2px; color:var(--ink); font-weight:600; font-size:14px; }
.shopcard .row { gap:10px; white-space:nowrap; }
.chips button { white-space:nowrap; }
.card h3 { flex-wrap:wrap; row-gap:8px; }
/* семь показателей на обзоре, когда есть списания */
.g-kpi.k7 { grid-template-columns:repeat(7, minmax(0,1fr)); }
.g-kpi.k7 .kpi { padding:14px 14px 12px; }
.g-kpi.k7 .kpi .v { font-size:clamp(15px, 1.1vw, 22px); }
@media (max-width:1700px) { .g-kpi.k7 { grid-template-columns:repeat(4, minmax(0,1fr)); } }
@media (max-width:700px) { .g-kpi.k7 { grid-template-columns:repeat(2, minmax(0,1fr)); } }
.bar.bad i { background:var(--bad); }
/* планы: блок «план и факт» на обзоре */
.planhint { display:flex; align-items:center; justify-content:space-between; gap:14px; border-style:dashed; color:var(--ink-2); font-size:13px; }
.planfact { margin-bottom:18px; }
.planfact h3 .right { display:inline-flex; gap:8px; align-items:center; margin-left:auto; }
.xls.sm, .btn.ghost.sm { height:30px; padding:0 10px; font-size:12px; display:inline-flex; align-items:center; text-decoration:none; }
.tbl.pf td { vertical-align:middle; }
.pfd { display:inline-block; padding:2px 8px; border-radius:999px; font-weight:700; font-size:12px; font-variant-numeric:tabular-nums; }
.pfd.ok { color:var(--ok); background:var(--ok-soft); } .pfd.bad { color:var(--bad); background:var(--bad-soft); }
.pf-month { padding:6px 20px 12px; }
.pf-bar { position:relative; height:10px; background:var(--line-2); border-radius:5px; }
.pf-bar i { display:block; height:100%; border-radius:5px; background:var(--ok); } .pf-bar i.bad { background:var(--bad); }
.pf-bar b { position:absolute; top:-4px; width:2px; height:18px; background:var(--ink); border-radius:1px; }
.pf-month-t { display:flex; flex-wrap:wrap; gap:6px 22px; margin-top:8px; font-size:12px; color:var(--ink-3); }
.pf-month-t b { color:var(--ink); } .pf-month-t b.ok { color:var(--ok); } .pf-month-t b.bad { color:var(--bad); }
/* страница «Планы» */
.tbl.plans td, .tbl.plans th { padding:8px 8px; white-space:nowrap; }
.tbl.plans th.mh { cursor:pointer; } .tbl.plans th.mh:hover, .tbl.plans th.mh.cur { color:var(--brand); }
.pcell { text-align:right; cursor:pointer; font-variant-numeric:tabular-nums; min-width:82px; border-left:1px solid var(--line-2); }
.pcell:hover { background:var(--brand-soft); }
.pcell .pv, .pd .pv { font-size:12.5px; }
.pcell.man .pv, .pd.man .pv { font-weight:700; color:var(--ink); }
.pcell.calc .pv, .pd.calc .pv { color:var(--ink-3); }
.pcell.none .pv, .pd.none .pv { color:var(--line); }
.pf2 { font-size:10.5px; color:var(--ink-3); margin-top:2px; } .pf2 b.ok { color:var(--ok); } .pf2 b.bad { color:var(--bad); }
.pin { width:100%; min-width:70px; border:1px solid var(--brand); border-radius:6px; padding:4px 6px; font:inherit; font-size:12.5px; text-align:right; outline:none; }
.plan-foot { display:flex; align-items:center; gap:18px; padding:10px 20px 14px; font-size:12px; color:var(--ink-3); flex-wrap:wrap; }
.plan-foot .lg { display:inline-block; width:22px; height:8px; border-radius:4px; margin-right:6px; vertical-align:middle; } .plan-foot .lg.man { background:var(--ink); } .plan-foot .lg.calc { background:var(--ink-3); opacity:.45; }
.plan-foot select { margin-left:auto; }
.pdays { display:grid; grid-template-columns:repeat(7, minmax(0,1fr)); gap:6px; }
.pdays .dh { font-size:11px; font-weight:600; color:var(--ink-3); text-align:center; padding:2px 0; }
.pd { border:1px solid var(--line); border-radius:10px; padding:8px 10px; min-height:66px; display:flex; flex-direction:column; gap:2px; cursor:pointer; background:#fff; font-variant-numeric:tabular-nums; }
.pd:hover { border-color:var(--brand); } .pd.empty { border:0; background:transparent; cursor:default; } .pd.today { box-shadow:inset 0 0 0 2px var(--brand-soft); }
.pd .n { font-size:11px; color:var(--ink-3); font-weight:600; }
