/* ===== Админка mmsRoblox — светлая, мягкая: пастельные карточки, тёмный блок поставщика, минимум лишнего ===== */
:root {
  --bg: #f4f4f7; --side: #f4f4f7; --panel: #ffffff; --soft: #f6f6f9;
  --line: #ececf1; --line-2: #f2f2f6; --hover: #f5f5f8;
  --text: #15141b; --text-2: #3b3a45; --muted: #85849a; --faint: #b3b2c2;
  --accent: #15141b; --brand: #eab308;
  --green: #e3f6e9; --green-2: #ccefd7; --green-ink: #178a45;
  --blue: #e6ecfc; --blue-2: #d3ddf9; --blue-ink: #3557d6;
  --peach: #fde9de; --peach-2: #fbd7c4; --peach-ink: #c4561d;
  --dark: #15141b; --dark-2: #23222c; --dark-3: #2e2d39;
  --ok: #178a45; --ok-bg: #e9f8ee; --ok-line: #c9eed5;
  --bad: #d92d2d; --bad-bg: #fdeeee; --bad-line: #f8cfcf;
  --warn: #b65a0e; --warn-bg: #fff4e8; --warn-line: #fbdcb8;
  --info: #3557d6; --info-bg: #edf1fd; --info-line: #d3ddf9;
  --c-profit: #22a95a; --c-turnover: #4a6cf0; --c-orders: #f08a4b;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 20px; --r-sm: 12px;
  --shadow: 0 1px 2px rgba(21,20,27,.04), 0 8px 28px -12px rgba(21,20,27,.10);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.5 Onest, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.015em; }
.hidden { display: none !important; }
.num, .mono, .table td.r { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--muted); } .muted-sm { color: var(--muted); font-size: 12.5px; } .faint { color: var(--faint); }
.pos { color: var(--ok); } .neg { color: var(--bad); }
.r { text-align: right; }
.mt { margin-top: 14px; } .mt-s { margin-top: 8px; }
.row { display: flex; gap: 8px; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.strong { font-weight: 600; }
.link { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); } .link:hover { border-color: var(--text); }
.empty { padding: 40px 16px; text-align: center; color: var(--faint); font-size: 13.5px; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.spin-lg { width: 26px; height: 26px; border: 2.5px solid var(--line); border-top-color: var(--text); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- каркас: сайдбар на сером, работа — на белой панели ---------- */
.layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 26px 16px 18px; overflow-y: auto; scrollbar-width: none; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 28px; text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.brand svg { width: 28px; height: 28px; }
.brand b { font-weight: 700; color: var(--brand); }
.brand em { font-style: normal; font-weight: 500; color: var(--faint); font-size: 12px; margin-left: 2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-sep { height: 1px; background: #e6e6ec; margin: 14px 12px; }
.nav-t { font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; padding: 14px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 13px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14px; transition: background .15s, color .15s; }
.nav a svg { width: 19px; height: 19px; flex: none; }
.nav a:hover { color: var(--text); background: rgba(21,20,27,.04); }
.nav a.on { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(21,20,27,.05), 0 4px 14px -6px rgba(21,20,27,.12); }
.nav .cnt { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.nav .cnt:empty { display: none; }
.nav .cnt.hot { background: var(--blue); color: var(--blue-ink); }
.side-card { margin-top: auto; background: var(--dark); color: #fff; border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.side-card .sc-st { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.side-card .sc-sub { font-size: 12px; color: #a3a2b4; margin-top: -6px; }
.side-card .sc-row { display: flex; align-items: center; gap: 6px; }
.side-card .sc-user { margin-left: auto; font-size: 12px; color: #a3a2b4; }
.sc-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: var(--dark-3); color: #e8e7f0; cursor: pointer; text-decoration: none; }
.sc-btn:hover { background: #3a3946; } .sc-btn svg { width: 15px; height: 15px; }
.tag-mock { font-size: 11px; font-weight: 600; color: #fbbf77; background: rgba(251,191,119,.12); padding: 2px 8px; border-radius: 6px; }
.main { min-width: 0; margin: 12px 12px 12px 0; background: var(--panel); border-radius: 28px; padding: 22px 34px 64px; box-shadow: var(--shadow); min-height: calc(100vh - 24px); }
.topbar { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--line-2); }
.search { display: flex; align-items: center; gap: 10px; flex: 0 1 420px; height: 42px; padding: 0 16px; border-radius: 21px; background: var(--soft); color: var(--muted); }
.search svg { width: 17px; height: 17px; flex: none; }
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; color: var(--text); font-size: 13.5px; }
.search input::placeholder { color: var(--faint); }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tb-date { font-size: 13px; color: var(--text-2); font-weight: 500; padding: 0 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tb-date b { font-weight: 600; color: var(--text); }
.tb-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); border: 0; color: var(--text-2); cursor: pointer; text-decoration: none; transition: background .15s; }
.tb-ic:hover { background: #ececf2; } .tb-ic svg { width: 18px; height: 18px; } .tb-ic.off { color: var(--faint); }
.head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; min-height: 40px; }
.head h1 { font-size: 26px; font-weight: 700; display: flex; align-items: center; gap: 8px; letter-spacing: -.025em; }
.head .sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.head .sub:empty { display: none; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.content { display: flex; flex-direction: column; gap: 22px; }

/* ---------- элементы ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.soft { background: var(--soft); border-color: transparent; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card.flush .card-head { padding: 18px 22px 0; }
.card-title { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 6px; letter-spacing: -.01em; }
.card-title .n { color: var(--faint); font-weight: 500; }
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; font-weight: 400; }
.card-head a.more, .more { color: var(--muted); font-size: 13px; text-decoration: none; font-weight: 500; } .more:hover { color: var(--text); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.grid-21 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.grid-12 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 22px; align-items: start; }
.divider { height: 1px; background: var(--line-2); margin: 16px 0; }

/* полоса чисел */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(var(--min, 180px), 1fr)); gap: 12px; }
.stat { padding: 16px 18px; background: var(--soft); border-radius: 16px; min-width: 0; }
.stat .l { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.stat .v { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 2px; }
.stat .s { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.stat .s b { color: var(--text-2); font-weight: 600; }
button.stat { text-align: left; border: 0; cursor: pointer; }
button.stat:hover { background: var(--hover); }
button.stat.on { background: var(--dark); color: #fff; } button.stat.on .l, button.stat.on .s { color: #b9b8c9; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.ok { background: #22c55e; } .dot.bad { background: #ef4444; } .dot.warn { background: #f59e0b; } .dot.info { background: #4a6cf0; }
.dot.live { animation: blink 1.4s ease-in-out infinite; } @keyframes blink { 50% { opacity: .3; } }
.delta { font-size: 12px; font-weight: 600; } .delta.up { color: var(--ok); } .delta.down { color: var(--bad); } .delta.flat { color: var(--faint); }

.st { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; font-size: 13px; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 8px; font-size: 12px; font-weight: 500; background: var(--soft); color: var(--text-2); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.info { background: var(--info-bg); color: var(--info); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel); font-weight: 500; font-size: 13.5px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn-primary:hover { background: #2a2933; border-color: #2a2933; }
.btn-soft { background: var(--soft); border-color: transparent; } .btn-soft:hover { background: #ececf2; }
.btn-danger { color: var(--bad); } .btn-danger:hover { background: var(--bad-bg); border-color: var(--bad-line); }
.btn-ok { color: var(--ok); }
.btn-ghost { border-color: transparent; background: none; color: var(--muted); } .btn-ghost:hover { color: var(--text); background: var(--soft); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text-2); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--hover); } .icon-btn svg { width: 15px; height: 15px; } .icon-btn.off { color: var(--faint); }
.input, .select, .textarea { width: 100%; height: 40px; padding: 0 13px; border: 1px solid transparent; border-radius: 12px; background: var(--soft); outline: none; transition: border-color .15s, background .15s, box-shadow .15s; }
.textarea { height: 88px; padding: 10px 13px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: #d6d5e0; background: var(--panel); box-shadow: 0 0 0 4px #f1f1f6; }
.input:disabled, .select:disabled, .textarea:disabled { color: #a1a1aa; cursor: not-allowed; }
.input::placeholder { color: var(--faint); }
.input.cell { width: 88px; height: 32px; text-align: right; font-family: var(--mono); font-size: 12.5px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 12.5px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 5px; }
.field.grow { flex: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .input { max-width: 320px; }
.error-text { color: var(--bad); font-size: 13px; }

/* сегменты-переключатели */
.seg { display: inline-flex; background: var(--soft); border-radius: 14px; padding: 4px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(21,20,27,.06), 0 3px 10px -4px rgba(21,20,27,.12); }
.seg button .c { color: var(--faint); font-weight: 500; margin-left: 6px; font-variant-numeric: tabular-nums; }
.seg button.on .c { color: var(--muted); }
.seg button .c.bad { color: var(--bad); }

/* таблицы */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line-2); white-space: nowrap; background: var(--panel); }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table th.r, .table td.r { text-align: right; }
.table td.nowrap, .table td.mono { white-space: nowrap; }
.table tr.click { cursor: pointer; } .table tr.click:hover td { background: var(--hover); }
.table th[data-sort] { cursor: pointer; user-select: none; } .table th[data-sort]:hover { color: var(--text); }
.table th.sorted { color: var(--text); } .table th.sorted::after { content: ' ↓'; } .table th.sorted[data-dir=asc]::after { content: ' ↑'; }
.card.flush .table th:first-child, .card.flush .table td:first-child { padding-left: 24px; }
.card.flush .table th:last-child, .card.flush .table td:last-child { padding-right: 24px; }
.table .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.table .strong { font-weight: 600; }
.table tr.sub-row td { background: var(--soft); }
.prog { height: 3px; width: 72px; background: var(--line); border-radius: 3px; margin: 5px 0 0 auto; overflow: hidden; } .prog i { display: block; height: 100%; background: #f59e0b; }

/* постраничная навигация */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.pager .info { color: var(--muted); font-size: 13px; }
.pages { display: flex; gap: 4px; align-items: center; }
.pg { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 10px; border: 0; background: var(--soft); font-size: 13px; font-weight: 500; cursor: pointer; font-variant-numeric: tabular-nums; }
.pg:hover:not(:disabled) { background: #ececf2; }
.pg.on { background: var(--accent); color: #fff; }
.pg:disabled { opacity: .4; cursor: default; }
.pg-gap { color: var(--faint); padding: 0 2px; }

/* списки ключ—значение */
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px 16px; font-size: 13.5px; }
.kv > .label { color: var(--muted); }
.kv-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.kv-row:last-child { border-bottom: 0; } .kv-row span { color: var(--muted); } .kv-row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.label { font-size: 12.5px; color: var(--muted); }

/* предупреждения */
.alert { display: block; padding: 13px 16px; border-radius: 14px; font-size: 13.5px; border: 0; }
.alert.warn { background: var(--warn-bg); color: #7a3d08; }
.alert.bad { background: var(--bad-bg); color: #7f1d1d; }
.alert.ok { background: var(--ok-bg); color: #14532d; }

/* график */
.chart { width: 100%; height: 200px; position: relative; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .tt { position: absolute; pointer-events: none; background: var(--dark); color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 10px; white-space: nowrap; transform: translate(-50%, -100%); opacity: 0; transition: opacity .1s; z-index: 2; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); } .legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* подсказка «?» */
.tip { position: relative; display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--soft); color: var(--faint); font-size: 10.5px; font-weight: 600; cursor: help; flex: none; }
.tip:hover, .tip:focus { color: var(--text); outline: none; }
.tip::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: 300px; padding: 9px 12px; border-radius: 10px; background: var(--dark); color: #fff; font-size: 12.5px; font-weight: 400; line-height: 1.45; white-space: normal; text-align: left; letter-spacing: 0; text-transform: none; opacity: 0; visibility: hidden; transition: opacity .12s; z-index: 50; pointer-events: none; }
.tip:hover::after, .tip:focus::after { opacity: 1; visibility: visible; }
.head .tip::after { left: 0; transform: none; }

/* хронология заказа */
.tl { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--line-2); }
.tl:last-child { border-bottom: 0; }
.tl .dot { margin-top: 6px; } .tl .t { color: var(--faint); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.code { font-family: var(--mono); font-size: 12px; background: var(--soft); border-radius: 12px; padding: 12px; white-space: pre-wrap; word-break: break-all; max-height: 320px; overflow: auto; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--mono); background: var(--soft); border-radius: 12px; padding: 10px 12px; word-break: break-all; font-size: 12.5px; }
.copy-btn { cursor: pointer; color: var(--faint); margin-left: 4px; } .copy-btn:hover { color: var(--text); }
details.raw summary { cursor: pointer; color: var(--muted); font-size: 13px; } details.raw[open] summary { margin-bottom: 10px; }

/* окна */
.modal-bg, .drawer-bg { position: fixed; inset: 0; background: rgba(21,20,27,.28); backdrop-filter: blur(2px); z-index: 80; }
.modal-bg { display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal-bg.over { z-index: 95; } /* окно поверх карточки заказа (drawer — 90) */
.modal { width: min(460px, 100%); background: var(--panel); border-radius: 24px; padding: 26px; box-shadow: 0 30px 80px -20px rgba(21,20,27,.35); animation: pop .16s ease-out; }
.modal.wide { width: min(860px, 100%); }
.modal h3 { font-size: 19px; margin-bottom: 4px; letter-spacing: -.02em; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.drawer { position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(580px, calc(100% - 20px)); background: var(--panel); border-radius: 24px; z-index: 90; overflow-y: auto; padding: 24px 26px; box-shadow: 0 30px 80px -20px rgba(21,20,27,.35); animation: slide .18s ease-out; }
@keyframes slide { from { opacity: 0; transform: translateX(16px); } }
.drawer h3 { font-size: 19px; }
.sect { margin-top: 22px; } .sect > .label { display: block; margin-bottom: 8px; font-weight: 500; }
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--dark); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 13.5px; box-shadow: 0 12px 30px rgba(0,0,0,.2); animation: tin .15s ease-out; max-width: 400px; }
.toast.bad { background: var(--bad); } .toast.ok { background: var(--dark); }
@keyframes tin { from { opacity: 0; transform: translateY(6px); } }

/* вход */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card { width: min(390px, 100%); background: var(--panel); border-radius: 28px; padding: 32px; box-shadow: var(--shadow); }
.auth-card .brand { justify-content: center; padding-bottom: 18px; }
.auth-card h1 { font-size: 21px; text-align: center; margin-bottom: 22px; }

/* прочее */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--soft); font-size: 12.5px; text-decoration: none; }
.chip a { text-decoration: none; color: var(--muted); }
.invited-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sample { display: inline-block; width: 6px; height: 14px; border-radius: 2px; margin-right: 2px; background: #86efac; } .sample.bad { background: #fca5a5; }
.st-inc { padding: 14px 0; border-bottom: 1px solid var(--line-2); } .st-inc:last-child { border-bottom: 0; }
.st-inc .t { display: flex; align-items: center; gap: 10px; font-weight: 600; flex-wrap: wrap; }
.st-inc .u { font-size: 13px; color: var(--text-2); margin-top: 6px; } .st-inc .u .label { margin-right: 8px; }
.acc-ro { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 13px; border-radius: 12px; background: var(--soft); }
.acc-pw { display: flex; gap: 8px; }
.top-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); text-decoration: none; font-size: 13.5px; }
.top-row:last-child { border-bottom: 0; } .top-row:hover b { text-decoration: underline; }
.top-row .i { width: 18px; color: var(--faint); font-size: 12px; } .top-row .m { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }

@media (max-width: 1100px) { .grid-2, .grid-3, .grid-21, .grid-12 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 16px; }
  .brand { padding-bottom: 12px; }
  .nav { flex-direction: row; flex-wrap: wrap; } .nav-sep, .nav-t { display: none; }
  .side-card { margin-top: 12px; }
  .main { margin: 0 8px 8px; padding: 18px 16px 48px; border-radius: 22px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; } .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv > .label { margin-top: 8px; }
  .topbar { flex-wrap: wrap; } .search { flex: 1 1 100%; order: 2; } .tb-date { display: none; }
}

/* ---------- метрики ---------- */
.sect-t { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 8px 0 -6px; }
.hb { display: flex; flex-direction: column; gap: 10px; }
.hb-l { display: flex; align-items: baseline; gap: 8px; font-size: 13px; } .hb-l span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hb-l b { font-variant-numeric: tabular-nums; }
.hb-bar { height: 6px; background: var(--line-2); border-radius: 4px; margin-top: 5px; overflow: hidden; } .hb-bar i { display: block; height: 100%; background: #3f3f46; border-radius: 4px; }
.fn { display: flex; flex-direction: column; gap: 12px; }
.fn-h { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.fn-n { width: 20px; height: 20px; border-radius: 50%; background: var(--line-2); color: var(--muted); font-size: 11px; font-weight: 600; display: grid; place-items: center; flex: none; }
.fn-name { flex: 1; display: flex; align-items: center; gap: 6px; } .fn-h b { font-variant-numeric: tabular-nums; } .fn-p { width: 52px; text-align: right; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.fn-bar { height: 10px; background: var(--line-2); border-radius: 5px; margin: 6px 0 0 30px; overflow: hidden; } .fn-bar i { display: block; height: 100%; background: #27272a; border-radius: 5px; }
.fn-lost { margin: 4px 0 0 30px; font-size: 12px; color: var(--bad); }
.donut { display: flex; align-items: center; gap: 18px; } .donut svg { flex: none; }
.donut-l { display: flex; flex-direction: column; gap: 7px; font-size: 13px; flex: 1; } .donut-l div { display: flex; align-items: center; gap: 8px; } .donut-l i { width: 9px; height: 9px; border-radius: 2px; } .donut-l b { margin-left: auto; font-variant-numeric: tabular-nums; }
.table.heat td, .table.heat th { padding: 8px 8px; }
.hc { display: inline-block; min-width: 46px; padding: 3px 6px; border-radius: 5px; text-align: center; font-size: 12.5px; font-weight: 600; background: rgba(34, 197, 94, var(--a)); color: #14532d; }
/* нагрузка на API поставщика */
.usage-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; } .usage-h b { font-size: 20px; font-variant-numeric: tabular-nums; }
.usage-bar { height: 8px; background: var(--line-2); border-radius: 5px; margin-top: 8px; overflow: hidden; } .usage-bar i { display: block; height: 100%; background: #22c55e; border-radius: 5px; } .usage-bar i.warn { background: #f59e0b; } .usage-bar i.bad { background: var(--bad); }
/* API клиентов: короткая сводка в карточке клиента, номер заказа у клиента в таблице заказов */
.mini-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 22px; }
.mini-kv > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mini-kv span { font-size: 12.5px; color: var(--muted); }
.mini-kv b { font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-kv em { font-style: normal; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mini-kv em.neg { color: var(--bad); }
.table .sub.ckey { max-width: 180px; overflow: hidden; text-overflow: ellipsis; font-weight: 400; }
.table.tight th, .table.tight td { padding-left: 10px; padding-right: 10px; }
.kv-row.click-row { cursor: pointer; } .kv-row.click-row:hover span { color: var(--text); }
/* телефон: шапка страницы переносится, широкие переключатели прокручиваются внутри себя, а не растягивают страницу */
@media (max-width: 760px) { .head, .actions { flex-wrap: wrap; } .seg { max-width: 100%; overflow-x: auto; } .tip:not(:hover):not(:focus)::after { display: none; } }
/* ---------- правовое: удалённые аккаунты, принятие правил, согласие на cookie ---------- */
.badge.del { background: #f4f4f5; color: #52525b; border-color: #e4e4e7; }
.table tr.is-deleted td { color: var(--faint); } .table tr.is-deleted td:first-child { white-space: nowrap; }
.table tr.is-deleted .strong { color: var(--muted); font-weight: 500; }
.alert.del-alert { background: #f4f4f5; border-color: #e4e4e7; color: var(--text-2); }
.alert.info-note { background: var(--info-bg); border-color: var(--info-line); color: #1e3a8a; }
.check.nowrap { white-space: nowrap; }
.acc-legal { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 22px; }
.acc-legal > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.acc-legal .label { display: flex; align-items: center; gap: 5px; font-weight: 500; }
.cs-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--line); margin-right: 6px; vertical-align: 0; }
.cs-dot.ok { background: #22c55e; } .cs-dot.no { background: #a1a1aa; }
.cs-bar { display: flex; height: 8px; background: var(--line); border-radius: 5px; margin-top: 16px; overflow: hidden; }
.cs-bar i { display: block; height: 100%; } .cs-bar i.ok { background: #22c55e; } .cs-bar i.no { background: #a1a1aa; }

/* ---------- Канал: редактор поста и превью в стиле Telegram ---------- */
.ch-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.ch-left { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ch-sticky { position: sticky; top: 20px; }
@media (max-width: 1150px) { .ch-wrap { grid-template-columns: 1fr; } .ch-right { order: -1; } .ch-sticky { position: static; max-width: 420px; } }
.ch-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); font-size: 13.5px; }
.ch-cfg-ok { padding: 14px 20px; }
.ch-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ch-thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: #0e1621; flex: none; }
.ch-thumb-t { display: grid; place-items: center; color: #8fa3b8; font-weight: 600; font-size: 13px; }
.ch-ex { font-size: 13px; color: var(--text-2); max-width: 520px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ch-when { color: var(--info); font-weight: 600; }

.ch-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border: 1.5px dashed #d4d4d8; border-radius: 10px; text-align: center; cursor: pointer; font-size: 13.5px; transition: background .12s, border-color .12s; }
.ch-drop:hover, .ch-drop.over { background: var(--hover); border-color: var(--faint); }
.ch-drop-i { width: 36px; height: 36px; border-radius: 50%; background: var(--line-2); display: grid; place-items: center; font-size: 16px; }
.ch-prog { width: 220px; height: 5px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin-top: 6px; } .ch-prog i { display: block; height: 100%; width: 0; background: var(--text); transition: width .15s; }
.ch-media { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ch-media-file { flex: 1; min-width: 200px; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ch-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--bg); }
.ch-bar button { min-width: 32px; height: 30px; padding: 0 8px; border: 0; border-radius: 6px; background: none; cursor: pointer; color: var(--text-2); font-size: 13.5px; }
.ch-bar button:hover { background: var(--panel); box-shadow: 0 0 0 1px var(--line); }
.ch-bar .fb { font-weight: 700; } .ch-bar .fi { font-style: italic; font-family: Georgia, serif; } .ch-bar .fu { text-decoration: underline; } .ch-bar .fs { text-decoration: line-through; }
.ch-bar-sep { flex: 1; } .ch-bar .ch-emo { font-weight: 500; }
.ch-ed { min-height: 170px; max-height: 480px; overflow-y: auto; padding: 12px 14px; border: 1px solid var(--line); border-radius: 0 0 8px 8px; outline: none; white-space: pre-wrap; word-wrap: break-word; font-size: 14.5px; line-height: 1.55; }
.ch-ed:focus { border-color: #a1a1aa; box-shadow: 0 0 0 3px #f1f1f3; }
.ch-ed:empty::before { content: attr(data-ph); color: var(--faint); }
.ch-ed a { color: var(--info); } .ch-ed code { font-family: var(--mono); background: var(--line-2); padding: 1px 4px; border-radius: 4px; font-size: .92em; }
.ch-ed blockquote { margin: 4px 0; padding: 2px 10px; border-left: 3px solid var(--info); background: var(--info-bg); border-radius: 0 6px 6px 0; }
.ch-ed .sp { background: #e4e4e7; border-radius: 3px; box-shadow: 0 0 0 1px #d4d4d8; }
.ce { width: 1.25em; height: 1.25em; vertical-align: -0.25em; object-fit: contain; margin: 0 1px; }
.ce-fb { display: inline-block; width: auto; height: auto; border-bottom: 1px dashed var(--faint); }

.ch-krow { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.ch-kbtns { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.ch-kb { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.ch-ico { width: 36px; height: 36px; flex: none; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; font-size: 16px; color: var(--faint); display: grid; place-items: center; }
.ch-ico:hover { background: var(--hover); } .ch-ico img { width: 22px; height: 22px; object-fit: contain; }
.ch-colors { display: flex; gap: 4px; flex-wrap: wrap; }
.ch-sw { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); cursor: pointer; font-size: 12px; color: var(--text-2); }
.ch-sw i { width: 12px; height: 12px; border-radius: 4px; }
.ch-sw.def i { background: #5b6b7d; } .ch-sw.primary i { background: #3e88f7; } .ch-sw.success i { background: #31b545; } .ch-sw.danger i { background: #e5484d; }
.ch-sw.on { border-color: var(--text); color: var(--text); font-weight: 600; box-shadow: 0 0 0 1px var(--text); }
.ch-quick { padding-bottom: 2px; flex-wrap: wrap; }

.ch-pick { position: absolute; z-index: 90; width: 340px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.14); overflow: hidden; }
.ch-pick-tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line-2); overflow-x: auto; background: var(--bg); scrollbar-width: none; }
.ch-pick-tabs button { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px; border: 0; border-radius: 7px; background: none; cursor: pointer; font-size: 12.5px; color: var(--muted); white-space: nowrap; flex: none; }
.ch-pick-tabs button img { width: 18px; height: 18px; object-fit: contain; }
.ch-pick-tabs button span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.ch-pick-tabs button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ch-pick-body { padding: 10px; max-height: 300px; overflow-y: auto; }
.ch-pick-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.ch-pick-grid button { aspect-ratio: 1; border: 0; background: none; border-radius: 7px; cursor: pointer; font-size: 21px; display: grid; place-items: center; padding: 3px; }
.ch-pick-grid button:hover { background: var(--hover); } .ch-pick-grid img { width: 100%; height: 100%; object-fit: contain; }
.ch-pick-note { margin-top: 10px; padding: 8px 10px; border-radius: 7px; background: var(--warn-bg); color: #78350f; font-size: 12px; line-height: 1.45; }

/* превью — тёмная тема Telegram */
.tgp { border-radius: 14px; overflow: hidden; background: #0e1621; color: #f5f5f5; font: 14.5px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.tgp-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #17212b; border-bottom: 1px solid #0b1118; }
.tgp-head b { display: block; font-size: 14.5px; font-weight: 600; } .tgp-head span { font-size: 12.5px; color: #7f91a4; }
.tgp-ava { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #facc15, #eab308); color: #111; font-weight: 700; display: grid; place-items: center; flex: none; }
.tgp-chat { min-height: 380px; padding: 14px 12px 18px; background: #0e1621 radial-gradient(circle at 20% 10%, #1b2a3a 0, transparent 45%), radial-gradient(circle at 85% 80%, #182434 0, transparent 40%); display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; }
.tgp-day { align-self: center; padding: 3px 10px; border-radius: 12px; background: rgba(0,0,0,.35); font-size: 12.5px; color: #e4ecf4; }
.tgp-hint { align-self: center; margin: auto 0; color: #7f91a4; font-size: 13px; text-align: center; max-width: 240px; }
.tgp-msg { max-width: 100%; display: flex; flex-direction: column; gap: 4px; }
.tgp-bubble { background: #182533; border-radius: 14px 14px 14px 4px; overflow: hidden; }
.tgp-mwrap { position: relative; }
.tgp-media { display: block; width: 100%; max-height: 460px; object-fit: cover; background: #000; }
.tgp-tag { position: absolute; left: 8px; top: 8px; padding: 1px 7px; border-radius: 9px; background: rgba(0,0,0,.45); font-size: 11.5px; color: #fff; }
.tgp-mwrap .tgp-meta { position: absolute; right: 8px; bottom: 8px; padding: 1px 7px; border-radius: 9px; background: rgba(0,0,0,.45); color: #fff; }
.tgp-text { padding: 7px 11px 8px; white-space: pre-wrap; word-wrap: break-word; }
.tgp-text a { color: #6ab3f3; text-decoration: none; }
.tgp-text code, .tgp-text pre { font-family: var(--mono); font-size: 13px; color: #7fd1ff; } .tgp-text pre { display: block; margin: 4px 0; padding: 8px; border-radius: 6px; background: rgba(0,0,0,.25); white-space: pre-wrap; }
.tgp-text blockquote + br, .tgp-text pre + br { display: none; }
.tgp-text blockquote { margin: 3px 0; padding: 3px 10px; border-left: 3px solid #6ab3f3; background: rgba(106,179,243,.1); border-radius: 0 6px 6px 0; }
.tgp-text .sp { background: #3a4a5c; color: transparent; border-radius: 4px; cursor: pointer; transition: color .2s, background .2s; } .tgp-text .sp.open { background: rgba(255,255,255,.08); color: inherit; }
.tgp-text .sp .ce { visibility: hidden; } .tgp-text .sp.open .ce { visibility: visible; }
.tgp-meta { float: right; display: inline-flex; align-items: center; gap: 3px; margin: 6px 0 -4px 10px; font-size: 11.5px; color: #6d7f8f; line-height: 1.6; }
.tgp-meta svg { width: 13px; height: 13px; }
.tgp-kb { display: flex; flex-direction: column; gap: 4px; }
.tgp-kr { display: flex; gap: 4px; }
.tgp-b { position: relative; flex: 1; min-width: 0; min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 18px; border-radius: 10px; background: rgba(24,37,51,.85); color: #fff; font-size: 14px; font-weight: 500; text-decoration: none; backdrop-filter: blur(8px); }
.tgp-b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tgp-b i { position: absolute; right: 6px; top: 3px; font-style: normal; font-size: 10px; opacity: .7; }
.tgp-b.primary { background: #3e88f7; } .tgp-b.success { background: #31b545; } .tgp-b.danger { background: #e5484d; }
.tgp-b:hover { filter: brightness(1.08); }

/* ---------- Уведомления ---------- */
.n-flags { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.n-flag { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.n-flag:hover { background: var(--hover); }
.n-flag input[type=checkbox] { margin-top: 2px; flex: none; }
.n-flag b { display: block; font-weight: 600; font-size: 13.5px; } .n-flag > div > span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.n-inline { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; white-space: nowrap; }
.n-inline .input, .n-inline .select { width: 100px; height: 30px; }

/* ===================== новый дизайн: общие детали ===================== */
.pill { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 9px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.created { background: #eef1f8; color: #4b5a83; }
.pill.sending { background: var(--blue); color: var(--blue-ink); } .pill.sending i { animation: blink 1.2s ease-in-out infinite; }
.pill.code { background: var(--peach); color: var(--peach-ink); } .pill.code i { animation: blink 1.2s ease-in-out infinite; }
.pill.done { background: var(--green); color: var(--green-ink); }
.pill.problem { background: var(--bad-bg); color: var(--bad); }
.pill.cancel { background: #f1f1f5; color: #7c7b8c; }
.live-t { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--blue-ink); }
.live-t::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.2s ease-in-out infinite; }
.live-t.wait { color: #6b7799; }
.done-t { color: var(--text-2); font-variant-numeric: tabular-nums; }
.av { width: 36px; height: 36px; border-radius: 12px; display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.lc-tt { padding: 10px 12px !important; border-radius: 12px !important; transform: translate(-50%, -100%) !important; }
.lc-t { font-size: 11.5px; color: #b9b8c9; margin-bottom: 5px; }
.lc-r { display: flex; align-items: center; gap: 7px; font-size: 12.5px; line-height: 1.7; } .lc-r i { width: 8px; height: 8px; border-radius: 3px; } .lc-r b { margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; }

/* ===================== дашборд ===================== */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.dash-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.dash-side { display: flex; flex-direction: column; gap: 22px; min-width: 0; position: sticky; top: 16px; }
@media (max-width: 1280px) { .dash { grid-template-columns: 1fr; } .dash-side { position: static; display: grid; grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .dash-side { grid-template-columns: 1fr; } }
.attn-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 12px 16px; border-radius: 16px; background: var(--warn-bg); color: #7a3d08; font-size: 13.5px; }
.attn-bar a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; } .attn-bar a:hover { text-decoration: underline; }
.attn-bar svg { width: 16px; height: 16px; } .attn-bar .sep { width: 4px; height: 4px; border-radius: 50%; background: #e6b98a; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: 1fr; } }
.kpi { border-radius: 24px; padding: 20px 22px; min-width: 0; display: flex; flex-direction: column; min-height: 176px; }
.kpi.green { background: var(--green); } .kpi.blue { background: var(--blue); } .kpi.peach { background: var(--peach); }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.kpi-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--dark); color: #fff; display: grid; place-items: center; flex: none; }
.kpi-ic svg { width: 21px; height: 21px; }
.spark { width: 110px; height: 40px; margin-top: 2px; }
.kpi-l { font-size: 13px; color: rgba(21,20,27,.6); font-weight: 500; }
.kpi-v { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-s { font-size: 12.5px; color: rgba(21,20,27,.62); margin-top: auto; padding-top: 8px; }
.kpi-s .delta { font-size: 12.5px; }
.kpi-link { font-size: 12.5px; color: rgba(21,20,27,.55); text-decoration: none; font-weight: 500; } .kpi-link:hover { color: var(--text); }
.kpi-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.kpi-3 a { text-decoration: none; padding: 6px 8px; margin: -6px -8px; border-radius: 12px; transition: background .15s; } .kpi-3 a:hover { background: rgba(255,255,255,.45); }
.kpi-3 b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-3 span { font-size: 12px; color: rgba(21,20,27,.6); }
.kpi-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid rgba(196,86,29,.14); margin-top: 12px; padding-top: 10px; }
.kpi-foot span { display: inline-flex; align-items: center; gap: 5px; } .kpi-foot b { color: var(--text); font-weight: 600; } .kpi-foot svg { width: 14px; height: 14px; }
.ov .card-head { align-items: flex-start; }
.ser { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.ser button { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; transition: all .15s; }
.ser button i { width: 9px; height: 9px; border-radius: 3px; opacity: .35; transition: opacity .15s; }
.ser button.on { color: var(--text); border-color: #d9d8e3; background: var(--soft); } .ser button.on i { opacity: 1; }
.acts { display: flex; flex-direction: column; padding: 6px 10px 10px; }
.act { display: grid; grid-template-columns: 40px minmax(0, 1.6fr) minmax(0, .9fr) minmax(0, .7fr) minmax(0, 1fr) minmax(0, .8fr); align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; font-size: 13.5px; }
.act.click { cursor: pointer; } .act.click:hover { background: var(--soft); }
.act-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.act-ic svg { width: 17px; height: 17px; }
.act-ic.done { background: var(--green); color: var(--green-ink); } .act-ic.sending, .act-ic.created { background: var(--blue); color: var(--blue-ink); } .act-ic.code { background: var(--peach); color: var(--peach-ink); }
.act-ic.problem { background: var(--bad-bg); color: var(--bad); } .act-ic.cancel { background: #f1f1f5; color: #8a8a99; }
.act-n { display: flex; flex-direction: column; min-width: 0; } .act-n b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .act-n span { font-size: 12px; color: var(--muted); }
.act-t { display: flex; flex-direction: column; color: var(--text-2); font-variant-numeric: tabular-nums; } .act-t span { font-size: 12px; color: var(--faint); }
.act-m { font-weight: 600; font-variant-numeric: tabular-nums; }
.act-d { text-align: right; font-size: 13px; }
@media (max-width: 900px) { .act { grid-template-columns: 40px minmax(0, 1fr) auto; } .act-t, .act-m, .act-d { display: none; } }

/* тёмный блок поставщика */
.dark { background: var(--dark); color: #fff; border-radius: 26px; padding: 22px 20px 18px; box-shadow: 0 24px 50px -24px rgba(21,20,27,.55); }
.dk-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.dk-t { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.dk-s { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: #a3a2b4; margin-top: 3px; }
.dk-more { width: 34px; height: 34px; border-radius: 11px; border: 0; background: var(--dark-3); color: #e8e7f0; display: grid; place-items: center; cursor: pointer; } .dk-more:hover { background: #3a3946; } .dk-more svg { width: 18px; height: 18px; }
.dk-box { background: var(--dark-2); border-radius: 18px; padding: 14px 16px; margin-bottom: 10px; }
.dk-l { font-size: 12.5px; color: #c9c8d6; font-weight: 500; display: flex; flex-direction: column; } .dk-l span { color: #85849a; font-weight: 400; font-size: 11.5px; }
.dk-v { font-size: 26px; font-weight: 700; letter-spacing: -.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.dk-run { font-size: 12.5px; color: #c9c8d6; margin-top: 2px; } .dk-run.ok { color: #8be0a8; } .dk-run.warn { color: #fbbf77; } .dk-run.bad { color: #ff8b8b; }
.dk-note { font-size: 11.5px; color: #85849a; margin-top: 4px; line-height: 1.4; }
.dk-warn { display: flex; gap: 8px; align-items: flex-start; background: rgba(251,191,119,.12); color: #fbbf77; border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; font-size: 12.5px; line-height: 1.4; } .dk-warn svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; }
.dk-table { width: 100%; border-collapse: separate; border-spacing: 0 2px; font-size: 13px; margin-top: 8px; }
.dk-table th { text-align: left; font-weight: 500; font-size: 12px; color: #85849a; padding: 6px 12px; } .dk-table th.r, .dk-table td.r { text-align: right; }
.dk-table td { padding: 9px 12px; color: #d5d4e0; font-variant-numeric: tabular-nums; }
.dk-table tr.on td { background: #34333f; color: #fff; } .dk-table tr.on td:first-child { border-radius: 12px 0 0 12px; } .dk-table tr.on td:last-child { border-radius: 0 12px 12px 0; }
.dk-acc { display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.dk-table em { font-style: normal; font-size: 10.5px; color: #8be0a8; margin-left: 6px; vertical-align: 1px; }
.dk-empty { font-size: 12.5px; color: #85849a; padding: 6px 4px; }
.dk-btn { width: 100%; height: 42px; margin-top: 12px; border: 0; border-radius: 14px; background: #fff; color: var(--dark); font-weight: 600; cursor: pointer; } .dk-btn:hover { background: #ececf2; }
/* новые клиенты */
.nc { padding: 20px; }
.nc-row { display: flex; align-items: center; gap: 11px; padding: 8px 0; }
.nc-n { flex: 1; min-width: 0; text-decoration: none; display: flex; flex-direction: column; } .nc-n b { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .nc-n span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-n:hover b { text-decoration: underline; }
.nc-b { text-align: right; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; } .nc-b span { font-size: 11.5px; color: var(--faint); font-weight: 400; }
.nc-add { width: 30px; height: 30px; border-radius: 10px; border: 0; background: var(--green); color: var(--green-ink); display: grid; place-items: center; cursor: pointer; flex: none; } .nc-add:hover { background: var(--green-2); } .nc-add svg { width: 15px; height: 15px; }
.nc-all { display: inline-block; margin-top: 10px; }
/* быстрое пополнение */
.tu-head { display: flex; align-items: center; gap: 12px; } .tu-head .av { width: 44px; height: 44px; font-size: 17px; border-radius: 14px; }
.tu-quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tu-quick button { height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-weight: 600; cursor: pointer; } .tu-quick button:hover { background: var(--soft); } .tu-quick button.on { background: var(--dark); color: #fff; border-color: var(--dark); }
.tu-amt { height: 52px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }

/* ===================== заказы ===================== */
.otable td { padding-top: 12px; padding-bottom: 12px; }
.prod { display: flex; align-items: center; gap: 12px; }
.prod-ic { width: 38px; height: 38px; border-radius: 12px; background: #fdf6d8; color: #a07a06; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; letter-spacing: -.02em; }
.prod b { font-weight: 600; }
/* клиенты */
.cl { display: flex; align-items: center; gap: 12px; }
.ctable .topup { background: var(--green); color: var(--green-ink); } .ctable .topup:hover { background: var(--green-2); }

/* ===================== каталог ===================== */
.cat td { padding-top: 11px; padding-bottom: 11px; }
.cat tr.off td { color: var(--faint); } .cat tr.off .strong, .cat tr.off b { color: var(--muted); }
.mg { display: flex; align-items: center; gap: 10px; }
.mg-sw { display: inline-flex; background: var(--soft); border-radius: 10px; padding: 3px; }
.mg-sw button { border: 0; background: none; height: 26px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 500; color: var(--muted); cursor: pointer; }
.mg-sw button.on { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(21,20,27,.1); }
.mg-v { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 54px; }
.mg-in { display: inline-flex; align-items: center; gap: 4px; } .mg-in .input { width: 74px; height: 32px; text-align: right; font-weight: 600; padding: 0 8px; background: var(--blue); } .mg-in span { color: var(--muted); font-weight: 500; }
.pnl { display: inline-block; min-width: 78px; padding: 6px 10px; border-radius: 10px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.pnl.plus { background: var(--green); color: var(--green-ink); } .pnl.minus { background: var(--bad-bg); color: var(--bad); } .pnl.zero { background: var(--soft); color: var(--muted); }
.sw { width: 44px; height: 26px; border-radius: 13px; border: 0; background: #dcdce4; position: relative; cursor: pointer; transition: background .18s; padding: 0; }
.sw i { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s; }
.sw.on { background: #22c55e; } .sw.on i { transform: translateX(18px); }
.hit { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px 0 9px; border-radius: 10px; border: 1px dashed #d9d8e3; background: none; color: var(--faint); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.hit svg { width: 15px; height: 15px; } .hit:hover { color: var(--peach-ink); border-color: var(--peach-2); }
.hit.on { border: 1px solid transparent; background: linear-gradient(135deg, #ffb066, #f2653a); color: #fff; box-shadow: 0 6px 16px -8px rgba(242,101,58,.8); } .hit.on svg { fill: rgba(255,255,255,.35); }
.row-del { opacity: 0; transition: opacity .15s; border: 0; } .cat tr:hover .row-del { opacity: 1; }
.eco-prev { padding: 12px 14px; border-radius: 14px; background: var(--soft); font-size: 13px; color: var(--text-2); }

/* ===================== история ===================== */
.hist-bar { padding: 14px 18px; }
.hist-bar .hb-t { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-right: 4px; }
.hist-bar .input[type=date] { width: 160px; }
.hist-pre { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.hist-pre button { height: 34px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel); font-size: 12.5px; font-weight: 500; cursor: pointer; } .hist-pre button:hover { background: var(--soft); }
.hist-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 14px 20px; border-radius: 16px; background: var(--soft); font-size: 13.5px; color: var(--muted); }
.hist-sum b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; } .hist-sum b.pos { color: var(--ok); } .hist-sum b.neg { color: var(--bad); }
.hs-t { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; } .hs-r { margin-left: auto; }
.hist-chart { padding: 14px 18px; }
.hist { display: flex; flex-direction: column; gap: 8px; }
.hd-row { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); transition: box-shadow .15s; }
.hd-row:hover { box-shadow: 0 6px 20px -12px rgba(21,20,27,.18); }
.hd-main { display: grid; grid-template-columns: 22px minmax(150px, 1.4fr) 70px 64px minmax(70px, .7fr) minmax(80px, .7fr) minmax(130px, 1fr) 130px; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; font-size: 13.5px; }
.hd-chev { color: var(--faint); display: grid; place-items: center; transition: transform .15s; } .hd-chev svg { width: 16px; height: 16px; } .hd-row.open .hd-chev { transform: rotate(90deg); }
.hd-date { font-weight: 700; letter-spacing: -.01em; }
.hd-o, .hd-c { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; } .hd-o svg, .hd-c svg { width: 14px; height: 14px; } .hd-c { color: var(--bad); }
.hd-x { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.hd-t { color: var(--muted); text-align: right; font-size: 13px; } .hd-t b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.hd-p { justify-self: end; min-width: 110px; padding: 7px 12px; border-radius: 11px; font-weight: 800; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hd-p.plus { background: var(--green); color: var(--green-ink); } .hd-p.minus { background: var(--bad-bg); color: var(--bad); } .hd-p.zero { color: var(--faint); }
.hd-detail { display: none; padding: 0 18px 18px 52px; } .hd-row.open .hd-detail { display: block; }
@media (max-width: 900px) { .hd-main { grid-template-columns: 22px 1fr auto; } .hd-o, .hd-c, .hd-x, .hd-t { display: none; } .hd-detail { padding-left: 18px; } }

/* ===================== метрики: сводка ===================== */
.m-sum { font-size: 15px; line-height: 1.7; color: var(--text-2); }
.m-sum p { margin: 0 0 8px; } .m-sum p:last-child { margin: 0; } .m-sum b { color: var(--text); font-weight: 600; }
.m-sum .up { color: var(--ok); font-weight: 600; } .m-sum .down { color: var(--bad); font-weight: 600; }
details.more-sect > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-radius: 16px; background: var(--soft); font-weight: 600; }
details.more-sect > summary::-webkit-details-marker { display: none; }
details.more-sect > summary svg { width: 16px; height: 16px; transition: transform .15s; color: var(--muted); } details.more-sect[open] > summary svg { transform: rotate(90deg); }
details.more-sect[open] > summary { margin-bottom: 22px; }
details.more-sect > .content { gap: 22px; }

/* воронки и полосы — в цветах новых карточек */
.fn-bar { height: 10px; background: var(--soft); border-radius: 6px; } .fn-bar i { background: linear-gradient(90deg, #6f8cf5, #4a6cf0); border-radius: 6px; }
.fn-n { background: var(--blue); color: var(--blue-ink); }
.hb-bar { height: 7px; background: var(--soft); border-radius: 5px; } .hb-bar i { background: linear-gradient(90deg, #5fcf8a, #22a95a); border-radius: 5px; }
.sect-t { font-size: 12px; letter-spacing: .08em; }

/* маркетинговый номинал: осознанный минус */
.promo-tag { margin-top: 4px; border: 0; background: var(--peach); color: var(--peach-ink); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 7px; cursor: pointer; } .promo-tag:hover { background: var(--peach-2); }
