/* Кабинет владельца ПФ-Торга (/admin/). Палитра и шрифт – как у сайта (site/assets/css/site.css). */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/assets/fonts/manrope-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/assets/fonts/manrope-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
  --orange: #d85c28; --orange-600: #c04d1f; --orange-100: #f6dccd; --orange-50: #fbeee6;
  --ink: #1b1a18; --ink-2: #45423e; --muted: #7a766f; --muted-2: #a7a39b;
  --line: #e8e5df; --line-2: #d9d5cd; --bg: #f6f5f2; --bg-2: #efede8; --surface: #fff;
  --green: #1f8a57; --green-50: #e8f6ee; --amber: #b4720c; --amber-50: #fff6e3; --red: #b42318; --red-50: #fdecea;
  --shadow-sm: 0 1px 2px rgba(60, 40, 20, .06), 0 1px 1px rgba(60, 40, 20, .04);
  --shadow-md: 0 10px 30px -12px rgba(60, 40, 20, .18), 0 2px 6px rgba(60, 40, 20, .06);
  --r-card: 16px; --r-ctl: 12px; --r-pill: 999px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.5;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: "lnum" 1; }
a { color: var(--orange-600); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0 0 12px; font-weight: 650; letter-spacing: -.015em; line-height: 1.2; }
h1 { font-size: 26px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
p { margin: 0 0 10px; }
.boot { padding: 40px; color: var(--muted); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
[hidden] { display: none !important; }

/* каркас */
.layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.layout > div { min-width: 0; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; }
/* логотип сайта (site/assets/img/logo-480.webp → admin_static/logo.webp) и подпись «АДМИНКА» под ним */
.brand { margin: 0 12px 22px; }
.brand img { display: block; width: 150px; height: auto; }
.brand small { display: block; margin-top: 8px; font-weight: 700; font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 10px; color: var(--ink-2);
  text-decoration: none; font-weight: 550; margin-bottom: 2px; }
.nav a:hover { background: var(--bg); }
.nav a.on { background: var(--orange-50); color: var(--orange-600); }
.nav .sep { height: 1px; background: var(--line); margin: 12px 0; }
/* счётчик у пункта меню – просто оранжевая цифра, без плашки */
.nav .n { font-size: 13px; font-weight: 700; color: var(--orange-600); }
/* низ панели: прижат к левому нижнему углу, отделён линией; отступы слева – как у пунктов меню (12px) */
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.who { padding: 4px 12px 10px; font-size: 13px; color: var(--muted); line-height: 1.35; }
.who b { color: var(--ink); display: block; font-size: 14px; font-weight: 650; }
.side-act { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 10px; background: none;
  color: var(--ink-2); font: inherit; font-weight: 550; cursor: pointer; margin-bottom: 2px; }
.side-act:hover { background: var(--bg); }
.side-act:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.main { padding: 28px 32px 60px; min-width: 0; max-width: 1280px; }
.topbar { display: none; }
/* свёрнутая левая панель на компьютере: панели нет, сверху – полоса с кнопкой «Меню», которая разворачивает её обратно */
@media (min-width: 861px) {
  .layout.side-min { grid-template-columns: minmax(0, 1fr); }
  .layout.side-min .side { display: none; }
  .layout.side-min .topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface);
    border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .layout.side-min .sticky-bar { top: 57px; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 30% 0 0; z-index: 30; transform: translateX(-105%); transition: transform .25s; height: auto; box-shadow: var(--shadow-md); }
  .side.open { transform: none; }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .main { padding: 18px 16px 50px; }
  .side .side-fold { display: none; }
}

/* элементы */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); margin-bottom: 16px; }
.grid .card { margin: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-ctl);
  padding: 8px 14px; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); line-height: 1.3; }
.btn:hover { border-color: var(--muted-2); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.primary:hover { background: var(--orange-600); }
.btn.danger { color: var(--red); }
.btn.sm { padding: 4px 9px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: none; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--bg); color: var(--ink); }
input[type=text], input[type=password], input[type=search], input[type=date], input[type=url], select, textarea {
  border: 1px solid var(--line-2); border-radius: var(--r-ctl); padding: 8px 11px; background: var(--surface); min-width: 0; }
textarea { width: 100%; min-height: 80px; resize: vertical; }
label.f { display: block; font-size: 13px; color: var(--ink-2); font-weight: 600; }
label.f > input, label.f > select, label.f > textarea { display: block; width: 100%; margin-top: 4px; font-weight: 400; }
.form { display: grid; gap: 12px; max-width: 460px; }
.badge { display: inline-block; padding: 1px 9px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 650; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.badge.new { background: var(--orange-50); color: var(--orange-600); }
.badge.work { background: var(--amber-50); color: var(--amber); }
.badge.done { background: var(--green-50); color: var(--green); }
.badge.rejected { background: var(--bg-2); color: var(--muted); }
.badge.bad { background: var(--red-50); color: var(--red); }
.badge.ok { background: var(--green-50); color: var(--green); }
.note { padding: 10px 14px; border-radius: var(--r-ctl); background: var(--amber-50); color: #6b4a08; font-size: 14px; margin-bottom: 14px; }
.note.ok { background: var(--green-50); color: #145c3a; }
.note.bad { background: var(--red-50); color: var(--red); }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-ctl); z-index: 50; box-shadow: var(--shadow-md); max-width: 420px; }
.toast.bad { background: var(--red); }

/* таблицы */
.tbl-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--bg); }
td.num, th.num { text-align: right; white-space: nowrap; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { border: 1px solid var(--line-2); background: var(--surface); padding: 6px 12px; border-radius: var(--r-pill); cursor: pointer; font-weight: 600; font-size: 14px; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
dl.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; margin: 0; }
dl.kv dt { color: var(--muted); font-size: 14px; }
dl.kv dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 600px) { dl.kv { grid-template-columns: 1fr; } dl.kv dt { margin-top: 6px; } }
.cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cols > div { min-width: 0; }
@media (max-width: 1000px) { .cols { grid-template-columns: minmax(0, 1fr); } }

/* списки с перетаскиванием */
ul.sort { list-style: none; margin: 0; padding: 0; }
ul.sort li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 6px; }
ul.sort li.dragging { box-shadow: var(--shadow-md); border-color: var(--orange); background: var(--orange-50); }
ul.sort li.hit { border-color: var(--orange-100); }
ul.sort li.dim { display: none; }
.drag { cursor: grab; touch-action: none; user-select: none; color: var(--muted-2); padding: 4px 6px; font-weight: 800; letter-spacing: -2px; }
.drag:active { cursor: grabbing; }
.pos { width: 30px; text-align: right; color: var(--muted-2); font-size: 13px; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--bg-2); flex: 0 0 auto; }
.grow { flex: 1 1 auto; min-width: 0; }
.grow b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hitbox { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.hitbox input { accent-color: var(--orange); }
.tag-hit { background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: var(--r-pill); }
.sticky-bar { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 10px 0; }
@media (max-width: 860px) { .sticky-bar { top: 57px; } .pos { display: none; } }
@media (max-width: 600px) {
  ul.sort li { flex-wrap: wrap; }
  ul.sort li .grow { flex: 1 1 calc(100% - 100px); }
  .sticky-bar { position: static; }
}

/* фото */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.photos li { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 8px; display: grid; gap: 6px; }
.photos li img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--bg-2); border-radius: 8px; }
.photos li.dragging { border-color: var(--orange); box-shadow: var(--shadow-md); }
.drop { border: 2px dashed var(--line-2); border-radius: var(--r-card); padding: 18px; text-align: center; color: var(--muted); }
.drop.over { border-color: var(--orange); background: var(--orange-50); }
.results { max-height: 340px; overflow-y: auto; }

/* хранилище */
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; }
.vault-entry { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: var(--surface); }
.vault-entry .head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }

/* чат с покупателями: список слева, переписка справа; на телефоне – по очереди */
.chat { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; height: calc(100vh - 200px); min-height: 420px; }
.chat > .card { margin: 0; min-height: 0; display: flex; flex-direction: column; }
.chat-side { padding: 14px 10px; }
.chat-side .tabs { padding: 0 6px; }
.chat-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.chat-empty { padding: 20px 10px; text-align: center; }
.chat-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 12px; background: none; cursor: pointer; }
.chat-item:hover { background: var(--bg); }
.chat-item[aria-current=true] { background: var(--orange-50); }
.chat-item b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item time { font-size: 12px; color: var(--muted); }
.chat-item span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item .n { justify-self: end; font-style: normal; font-size: 12px; font-weight: 700; background: var(--orange); color: #fff; border-radius: var(--r-pill); padding: 0 7px; }
.chat-conv { padding: 0; overflow: hidden; }
.chat-ph { margin: auto; padding: 24px; text-align: center; }
.chat-head { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-head h2 { margin: 0 0 2px; font-size: 17px; }
.chat-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); align-items: center; }
.chat-head > .btn { flex: 0 0 auto; white-space: nowrap; }
.chat-back { display: none; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.chat-msg { max-width: min(560px, 82%); padding: 8px 12px; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.chat-msg small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.chat-msg.m { align-self: flex-end; background: var(--ink); color: #fff; box-shadow: none; }
.chat-msg.m small { color: rgba(255, 255, 255, .6); }
.chat-msg.b { align-self: center; max-width: 90%; background: var(--bg-2); box-shadow: none; font-size: 13px; color: var(--ink-2); }
.chat-msg.new { box-shadow: 0 0 0 2px var(--orange); }
.chat-conv > .note { margin: 0; border-radius: 0; }
.chat-reply { display: flex; gap: 10px; align-items: flex-end; padding: 12px 18px 4px; border-top: 1px solid var(--line); }
.chat-reply textarea { min-height: 46px; max-height: 200px; }
.chat-hint { padding: 0 18px 10px; margin: 0; }
@media (max-width: 860px) {
  .chat { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 150px); height: calc(100dvh - 150px); }
  .chat.has-conv .chat-side, .chat:not(.has-conv) .chat-conv { display: none; }
  .chat-back { display: inline-flex; }
  .chat-head { flex-wrap: wrap; padding: 12px 14px; }
  .chat-msgs { padding: 12px 14px; }
  .chat-reply { padding: 10px 14px 4px; }
}

/* вход */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: 100%; max-width: 380px; }

/* печать хранилища: только лист с доступами */
#print-area { display: none; }
@media print {
  body.printing > *:not(#print-area) { display: none !important; }
  body.printing #print-area { display: block; font-size: 12pt; color: #000; }
  #print-area table { font-size: 10.5pt; }
  #print-area td, #print-area th { border: 1px solid #999; padding: 4px 6px; }
}
a.card { display: block; color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--orange-100); }
.grid dl.kv { grid-template-columns: 1fr; gap: 0; }
.grid dl.kv dt { font-size: 12.5px; margin-top: 8px; }

/* двухфакторный вход (23.10.2026): QR-код, ключ для ручного ввода, резервные коды */
.login h2 { font-size: 18px; margin: 0 0 10px; }
.login p { margin: 0 0 10px; }
.qr { display: block; width: 220px; height: 220px; margin: 6px 0 12px; image-rendering: pixelated; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; overflow-wrap: anywhere; }
.codes { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }

/* ---------- сводка: «стол руководителя» (1.10.0, exchange/dashboard.py) ----------
   Поверхности – шагом тона без рамок и теней; рамка только у ключевых цифр (это кнопки: выбирают, что рисует график).
   Цвет статуса – у самого слова, без плашек; пояснений к очевидному нет. */
.d-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.d-head h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 0; line-height: 1.1; }
.d-ctl { display: flex; align-items: center; gap: 14px; }
.d-seg { display: inline-flex; background: var(--bg-2); border-radius: 12px; padding: 3px; }
.d-seg button { white-space: nowrap; border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.d-seg button.on { background: var(--surface); color: var(--ink); }
.d-upd { color: var(--muted); font-size: 13px; white-space: nowrap; }
.d-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line-2); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.d-tabs a { padding: 10px 0 12px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; white-space: nowrap; }
.d-tabs a.on { color: var(--ink); border-color: var(--ink); }
.d-tabs a:hover { color: var(--ink); }
.d-panel { background: var(--surface); border-radius: 16px; padding: 20px 22px; min-width: 0; }
.d-panel h2 { font-size: 17px; font-weight: 700; margin: 0 0 14px; letter-spacing: -.01em; }
.d-panel h2 span { font-weight: 500; color: var(--muted); font-size: 14px; margin-left: 8px; }
.d-panel h2.mt { margin-top: 22px; }
.d-flex { display: flex; flex-direction: column; }
.d-grow { flex: 1; display: flex; min-height: 240px; }
.d-row { display: grid; gap: 12px; margin-bottom: 12px; align-items: stretch; }
.d-row.r21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.d-row.r11 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.d-row.d-cols { align-items: start; }
.d-row.d-cols.even { align-items: stretch; }
.d-cols.even .d-col > :last-child { flex: 1; }
.d-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.d-calm { color: var(--muted); margin: 0; }
/* ключевые цифры */
.d-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.d-kpi { display: flex; flex-direction: column; align-items: flex-start; background: var(--surface); border-radius: 16px; padding: 16px 18px 14px;
  border: 2px solid transparent; text-align: left; cursor: pointer; min-width: 0; font: inherit; color: inherit; }
.d-kpi:hover { border-color: var(--line-2); }
.d-kpi.on { border-color: var(--orange); }
.d-kpi .t { color: var(--ink-2); font-weight: 600; font-size: 14px; }
.d-kpi .v { font-size: 30px; font-weight: 750; letter-spacing: -.02em; line-height: 1.15; margin: 6px 0 2px; }
.d-kpi .s { color: var(--muted); font-size: 13px; }
.d-kpi .s b { font-weight: 650; color: var(--ink-2); }
.d-spark { display: flex; align-items: flex-end; gap: 2px; height: 34px; margin-top: auto; padding-top: 12px; width: 100%; box-sizing: content-box; }
.d-spark i { flex: 1; background: var(--bg-2); border-radius: 2px 2px 0 0; }
.d-spark i.v { background: var(--muted-2); }
.d-spark.on i.v { background: var(--orange); }
/* большой график */
.d-chart { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; width: 100%; }
.d-y { display: flex; flex-direction: column; justify-content: space-between; color: var(--muted-2); font-size: 12px; text-align: right; padding-bottom: 26px; }
.d-plotwrap { display: flex; flex-direction: column; min-width: 0; }
.d-plot { flex: 1; display: flex; align-items: flex-end; gap: 6px; border-bottom: 1px solid var(--line-2); min-height: 200px; }
.d-b { flex: 1; height: 100%; position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.d-b i { display: block; background: var(--orange); border-radius: 4px 4px 0 0; }
.d-b.part i { background: var(--orange-100); }
.d-b em { position: absolute; left: -10px; right: -10px; text-align: center; font-style: normal; font-size: 12px; font-weight: 650; color: var(--ink-2); padding-bottom: 4px; white-space: nowrap; }
.d-x { display: flex; gap: 6px; margin-top: 8px; height: 18px; color: var(--muted); font-size: 12px; }
.d-x span { flex: 1; text-align: center; white-space: nowrap; min-width: 0; }
/* требует внимания */
.d-todo a { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 11px 10px; border-radius: 10px;
  margin: 0 -10px; text-decoration: none; color: inherit; }
.d-todo a:hover { background: var(--bg); }
.d-todo .c { font-size: 22px; font-weight: 750; text-align: right; letter-spacing: -.02em; white-space: nowrap; }
.d-todo .c.red { color: var(--red); } .d-todo .c.amber { color: var(--amber); } .d-todo .c.muted { color: var(--muted-2); }
.d-todo .d b { display: block; font-weight: 650; }
.d-todo .d span { color: var(--muted); font-size: 13px; }
/* таблицы сводки */
.d-tbl { font-size: 14.5px; }
.d-tbl th { padding: 0 0 8px; border-bottom: 0; }
.d-tbl td { padding: 9px 0; border-bottom: 0; border-top: 1px solid var(--line); vertical-align: middle; }
.d-tbl td.num, .d-tbl th.num { padding-left: 14px; }
.d-tbl td.name { overflow-wrap: anywhere; }
.d-tbl td.path { font-size: 13.5px; color: var(--ink-2); }
.d-tbl td.share { width: 24%; padding-left: 14px; }
.d-tbl td.share i { display: block; height: 8px; background: var(--muted-2); border-radius: 4px; min-width: 2px; }
.d-tbl tr.sub td { color: var(--muted); font-size: 13.5px; }
.d-tbl td.sub { padding-left: 18px; }
.d-panel .green { color: var(--green); } .d-panel .red { color: var(--red); } .d-panel .muted { color: var(--muted); }
/* путь до заявки */
.d-funnel > div { display: grid; grid-template-columns: 150px minmax(0, 1fr) 64px 48px; gap: 12px; align-items: center; padding: 6px 0; }
.d-funnel .track { height: 22px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.d-funnel .track i { display: block; height: 100%; background: var(--orange); border-radius: 6px; }
.d-funnel .n { text-align: right; font-weight: 650; }
.d-funnel .p { text-align: right; color: var(--muted); font-size: 13px; }
.d-funnel .p.red { color: var(--red); font-weight: 650; }
/* реклама */
.d-ads { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 16px; }
.d-ads b { display: block; font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.d-ads span { color: var(--muted); font-size: 13px; }
.d-flags p { margin: 0; padding: 9px 0; border-top: 1px solid var(--line); }
.d-flags p:first-child { border-top: 0; padding-top: 0; }
/* статусы строками: цвет только у слова */
.d-sys > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); align-items: baseline; }
.d-sys > div:first-child { border-top: 0; padding-top: 0; }
.d-sys b { display: block; font-weight: 600; }
.d-sys span span { color: var(--muted); font-size: 13.5px; }
.d-sys em { font-style: normal; font-weight: 650; font-size: 14px; white-space: nowrap; text-align: right; }
.d-sys em.ok { color: var(--green); } .d-sys em.warn { color: var(--amber); } .d-sys em.bad { color: var(--red); } .d-sys em.muted { color: var(--muted); }
@media (max-width: 1100px) {
  .d-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-row.r21, .d-row.r11 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .d-head h1 { font-size: 26px; }
  .d-ctl { width: 100%; }
  .d-upd { display: none; }
  .d-tabs { gap: 18px; }
  .d-kpi { padding: 14px; } .d-kpi .v { font-size: 23px; }
  .d-panel { padding: 16px; }
  .d-ads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-funnel > div { grid-template-columns: 104px minmax(0, 1fr) 48px 40px; gap: 8px; font-size: 14px; }
  .d-tbl td.share { display: none; } .d-tbl.channels th:nth-child(2) { display: none; }
  .d-chart { grid-template-columns: 40px minmax(0, 1fr); }
}
