:root {
  --bg: #f4f2ee;
  --panel: #ffffff;
  --ink: #1d1f22;
  --muted: #6b6f76;
  --line: #e4e0d8;
  --side: #1B1E22;
  --side-ink: #c9ccd1;
  --accent: #D62B1F;
  --accent-soft: #FDECEA;
  --ok: #1f8a4c;
  --ok-soft: #e5f4ea;
  --bad: #A8231A;
  --bad-soft: #FBE5E3;
  --radius: 10px;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; }
.side { background: var(--side); color: var(--side-ink); padding: 22px 14px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; letter-spacing: .2px; padding: 0 10px 22px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; font-size: 16px; }
.side nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin: 2px 0;
  border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 14px;
}
.side nav a:hover { background: #2b2f34; color: #fff; }
.side nav a.on { background: var(--accent); color: #fff; }
.side .badge { margin-left: auto; background: #fff; color: var(--accent); border-radius: 99px; font-size: 12px; padding: 0 7px; }
.side .foot a { color: var(--side-ink); }
main { padding: 28px 36px 60px; max-width: 1200px; width: 100%; }
h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -.3px; }
.sub { color: var(--muted); margin: 0 0 24px; }
h2 { font-size: 17px; margin: 0 0 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 { grid-template-columns: 1fr 1fr; }
.stat .k { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .v { font-size: 30px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat .h { color: var(--muted); font-size: 13px; }
.stat.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.stat.accent .k, .stat.accent .h { color: #ffe3d2; }
.flash { background: var(--ok-soft); color: var(--ok); border: 1px solid #bfe3cc; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; font-weight: 600; }
.err { background: var(--bad-soft); color: var(--bad); border: 1px solid #f2c4bd; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-weight: 600; }
.warn { background: #fff7e0; color: #8a6100; border: 1px solid #f1dd9f; padding: 10px 14px; border-radius: 8px; margin: 6px 0; font-size: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid #f0ede7; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--accent); color: #fff; font: inherit; font-weight: 700; padding: 10px 18px; border-radius: 8px;
}
.btn:hover { filter: brightness(.95); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 5px 12px; font-size: 13px; }
input[type=text], input[type=password], input[type=search], input[type=url], input[type=email], textarea, select {
  width: 100%; font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { min-height: 84px; resize: vertical; }
label.f { display: block; font-weight: 700; font-size: 13px; margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.drop {
  border: 2px dashed #d6cfc3; border-radius: 14px; padding: 48px 20px; text-align: center; background: #fbfaf7;
  transition: .15s; cursor: pointer; display: block;
}
.drop.over, .drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop .big { font-size: 40px; }
.drop b { display: block; font-size: 18px; margin: 8px 0 4px; }
.drop input { display: none; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.acc { background: var(--accent-soft); color: var(--accent); }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; text-decoration: none; font-size: 14px; font-weight: 600; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip span { color: var(--muted); font-weight: 500; margin-left: 4px; }
.pager { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pager a, .pager span { padding: 5px 11px; border-radius: 6px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-size: 14px; }
.pager .cur { background: var(--ink); color: #fff; border-color: var(--ink); }
.up { color: var(--bad); } .down { color: var(--ok); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; }
.login { width: 360px; }
.stack > * + * { margin-top: 16px; }
@media (max-width: 900px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .g2 { grid-template-columns: 1fr; }
  .hide-m { display: none; }
}
.layout > *, .grid > * { min-width: 0; }
.card { overflow-x: auto; }
@media (max-width: 600px) { .g4 { grid-template-columns: 1fr 1fr; gap: 10px; } .stat .v { font-size: 24px; } th, td { padding: 7px 6px; } }

/* ---------- структура каталога ---------- */
.st-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px; margin-bottom: 12px; }
.st-toolbar input { flex: 1; min-width: 200px; }
.st-selbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--ink); color: #fff;
  padding: 10px 14px; border-radius: var(--radius); margin-bottom: 12px; position: sticky; top: 8px; z-index: 5; }
.st-selbar .btn.ghost { color: #fff; border-color: #555; }
.st-grid { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.st-tree { padding: 8px; max-height: calc(100vh - 230px); overflow: auto; }
.st-panel { position: sticky; top: 16px; }
.st-help { margin: 0; padding-left: 18px; font-size: 14px; }
.st-help li { margin: 6px 0; }
.st-row { display: flex; align-items: center; gap: 6px; padding: 5px 8px 5px calc(8px + var(--d) * 22px);
  border-radius: 7px; cursor: pointer; user-select: none; font-size: 14px; border: 1px solid transparent; }
.st-row:hover { background: #f7f4ef; }
.st-row.on { background: var(--accent-soft); border-color: #f5c9ad; }
.st-row.hid .st-name { color: var(--muted); text-decoration: line-through; text-decoration-color: #c9c3b8; }
.st-chk { margin: 0; width: 15px; height: 15px; accent-color: var(--accent); }
.st-tog { width: 16px; text-align: center; color: var(--muted); font-size: 12px; }
.st-ico.v { filter: hue-rotate(-15deg) saturate(1.6); }
.st-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-ua { color: var(--muted); font-size: 12px; margin-left: 8px; }
.st-cnt { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; min-width: 44px; text-align: right; }
.st-row .pill { font-size: 11px; padding: 1px 7px; }
.st-row.drop-into { background: var(--accent-soft); border: 1px dashed var(--accent); }
.st-row.drop-before { box-shadow: inset 0 3px 0 var(--accent); }
.st-row.drop-after { box-shadow: inset 0 -3px 0 var(--accent); }
.st-orig { background: #f7f4ef; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 14px; color: var(--muted); }
.st-hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.st-danger { color: var(--bad) !important; }
.st-dlg { border: 0; border-radius: 14px; padding: 20px; width: min(560px, 92vw); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.st-dlg::backdrop { background: rgba(20,20,20,.35); }
.st-movelist { max-height: 55vh; overflow: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; }
.st-mv { padding: 7px 10px 7px calc(10px + var(--d) * 18px); cursor: pointer; font-size: 14px; border-bottom: 1px solid #f2efe9; }
.st-mv:hover { background: var(--accent-soft); }
.st-toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 99px; font-weight: 600; z-index: 50; }
.st-toast.bad { background: var(--bad); }
.btn[disabled] { opacity: .4; cursor: default; }
@media (max-width: 900px) { .st-grid { grid-template-columns: 1fr; } .st-panel { position: static; order: -1; } .st-tree { max-height: none; } }
.st-selbar[hidden] { display: none; }

/* ---------- темы каталога (плитки) ---------- */
.th-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.th-search { position: relative; width: min(360px, 100%); }
.th-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.12); z-index: 30; max-height: 380px; overflow: auto; }
.th-results .res { padding: 9px 12px; cursor: pointer; border-bottom: 1px solid #f2efe9; }
.th-results .res:hover { background: var(--accent-soft); }
.th-results .res small { display: block; color: var(--muted); font-size: 12px; }
.th-note { display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(120deg, #fff7f0, #fff);
  border: 1px solid #f6d6c1; border-radius: 14px; padding: 14px 18px; margin-bottom: 20px; font-size: 14px; color: #5b4a3e; }
.th-note-ico { font-size: 24px; line-height: 1; }
.th-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.th-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 6px; font-size: 15px; }
.crumb { padding: 6px 12px; border-radius: 99px; cursor: pointer; font-weight: 600; color: var(--muted); border: 1px dashed transparent; }
.crumb:hover { background: #fff; color: var(--ink); }
.crumb.cur { color: var(--ink); background: #fff; border: 1px solid var(--line); cursor: default; }
.crumb.drop { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.crumb-sep { color: #c3bcb0; }
.th-info { color: var(--muted); font-size: 14px; margin: 0 0 14px 4px; min-height: 22px; }
.link { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; padding: 0 0 0 6px; }
.th-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
.tile { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 14px;
  cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; min-height: 148px; display: flex; flex-direction: column;
  text-align: left; font: inherit; color: inherit; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(40,30,20,.08); border-color: #ddd5c8; }
.tile.theme { background: linear-gradient(160deg, #fff5ec 0%, #fff 60%); border-color: #f3cfb4; }
.tile.sel { outline: 3px solid var(--accent); outline-offset: -1px; }
.tile.is-hidden { opacity: .55; }
.tile.dragging { opacity: .35; }
.tile.flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 4px var(--accent); } 100% { box-shadow: none; } }
.tile-ico { font-size: 30px; line-height: 1; margin-bottom: 10px; }
.tile-name { font-weight: 700; font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile-uk { color: var(--muted); font-size: 12px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.tile-foot { margin-top: auto; padding-top: 10px; font-size: 12.5px; color: var(--muted); display: flex; gap: 4px; flex-wrap: wrap; }
.tile-badges { position: absolute; top: 12px; right: 44px; display: flex; gap: 4px; }
.tb { font-size: 10.5px; font-weight: 700; background: var(--accent-soft); color: var(--accent); padding: 1px 7px; border-radius: 99px; }
.tb.hid { background: var(--bad-soft); color: var(--bad); }
.tile-chk { position: absolute; top: 10px; left: 10px; width: 26px; height: 26px; display: grid; place-items: center; opacity: 0; transition: opacity .1s; }
.tile-chk input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.tile:hover .tile-chk, .tile.sel .tile-chk, .th-grid:has(.sel) .tile-chk { opacity: 1; }
.tile:hover .tile-ico, .tile.sel .tile-ico { padding-left: 26px; }
.tile-more { position: absolute; top: 8px; right: 8px; border: 0; background: transparent; font-size: 20px; line-height: 1; width: 32px; height: 32px;
  border-radius: 8px; cursor: pointer; color: var(--muted); }
.tile-more:hover { background: #f3efe8; color: var(--ink); }
.tile-drop { display: none; position: absolute; inset: 0; border-radius: 16px; background: rgba(232,100,28,.10); border: 2px dashed var(--accent);
  color: var(--accent); font-weight: 800; place-items: center; }
.tile.drop-into .tile-drop { display: grid; }
.tile.drop-before { box-shadow: -5px 0 0 var(--accent); }
.tile.drop-after { box-shadow: 5px 0 0 var(--accent); }
.tile-new { border: 2px dashed #d9d1c4; background: transparent; align-items: center; justify-content: center; text-align: center; gap: 4px; }
.tile-new:hover { border-color: var(--accent); background: var(--accent-soft); }
.tile-new b { font-size: 15px; }
.tile-new small { color: var(--muted); font-size: 12px; }
.tile-plus { font-size: 30px; color: var(--accent); line-height: 1; }
.th-tip { color: var(--muted); font-size: 13px; margin: 18px 4px 0; }
.th-reset { margin-top: 26px; text-align: right; }
.th-side { position: sticky; top: 16px; }
.th-side-title { display: flex; justify-content: space-between; align-items: center; font-weight: 800; margin-bottom: 10px; }
.th-lang { display: inline-flex; background: #ebe6de; border-radius: 99px; padding: 3px; }
.th-lang button { border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; cursor: pointer; color: var(--muted); }
.th-lang button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.phone { border-radius: 32px; border: 10px solid #1f2226; background: linear-gradient(165deg, #a7c4a0, #7fa8c9); overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.phone-top { background: #fff; display: flex; gap: 10px; align-items: center; padding: 10px 12px; font-size: 14px; }
.phone-top small { display: block; color: #8a8f96; font-size: 11px; }
.phone-ava { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.phone-chat { padding: 10px 8px 12px; min-height: 420px; max-height: 62vh; overflow: auto; font-size: 13px; }
.pmsg { background: #fff; border-radius: 12px 12px 12px 4px; padding: 8px 10px; line-height: 1.4; }
.pkb { margin-top: 4px; display: flex; flex-direction: column; gap: 4px; }
.pb { background: rgba(40,60,80,.38); color: #fff; text-align: center; border-radius: 8px; padding: 7px 8px; font-weight: 600; font-size: 12.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb[data-id] { cursor: pointer; }
.pb[data-id]:hover { background: rgba(40,60,80,.55); }
.muted-pb { background: rgba(255,255,255,.5); color: #444; font-weight: 500; }
.pr { display: flex; gap: 4px; } .pr .pb { flex: 1; }
.th-stat { color: var(--muted); font-size: 13px; text-align: center; margin-top: 10px; }
.th-selbar { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; z-index: 40;
  display: flex; gap: 8px; align-items: center; padding: 10px 12px 10px 18px; border-radius: 99px; box-shadow: 0 12px 34px rgba(0,0,0,.3); flex-wrap: wrap; justify-content: center; max-width: 94vw; }
.th-selbar[hidden] { display: none; }
.th-selbar .btn.ghost { color: #fff; border-color: #4a4d52; }
.th-menu { position: absolute; z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.16);
  padding: 6px; min-width: 210px; display: flex; flex-direction: column; }
.th-menu[hidden] { display: none; }
.th-menu button { border: 0; background: transparent; text-align: left; font: inherit; font-size: 14px; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.th-menu button:hover { background: #f5f1ea; }
.th-danger { color: var(--bad) !important; }
.th-dlg { border: 0; border-radius: 18px; padding: 24px; width: min(520px, 92vw); box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.th-dlg::backdrop { background: rgba(25,22,18,.4); backdrop-filter: blur(2px); }
.th-orig { background: #f7f4ef; border-radius: 10px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px; color: var(--muted); }
.th-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14px; }
.th-switch input { display: none; }
.th-switch span { width: 40px; height: 22px; background: #d8d2c7; border-radius: 99px; position: relative; transition: .15s; }
.th-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: .15s; }
.th-switch input:checked + span { background: var(--accent); }
.th-switch input:checked + span::after { left: 21px; }
.th-movelist { max-height: 55vh; overflow: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; }
.mv { padding: 8px 12px 8px calc(12px + var(--d) * 18px); cursor: pointer; font-size: 14px; border-bottom: 1px solid #f2efe9; }
.mv:hover { background: var(--accent-soft); }
.mv.theme { font-weight: 700; }
@media (max-width: 1100px) { .th-layout { grid-template-columns: minmax(0, 1fr); } .th-side { position: static; max-width: 380px; margin: 0 auto; } }
@media (max-width: 600px) { .th-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .tile { min-height: 130px; padding: 12px; } .tile-chk { opacity: 1; } .tile-ico { padding-left: 26px; } }
.tile-name, .tile-uk { overflow-wrap: anywhere; }
.th-grid > *, .th-layout > * { min-width: 0; }
@media (max-width: 1100px) { .th-side { width: 100%; max-width: 380px; } }
/* правки: галочка справа сверху, бейджи в подвале, панель выбора в одну строку */
.tile-chk { left: auto; right: 42px; top: 11px; }
.tile:hover .tile-ico, .tile.sel .tile-ico { padding-left: 0; }
.tile-badges { position: static; margin-top: 8px; }
.th-selbar { left: 0; right: 0; margin: 0 auto; width: max-content; transform: none; }
@media (max-width: 600px) { .tile-ico { padding-left: 0; } .th-selbar { width: auto; left: 8px; right: 8px; border-radius: 18px; } }

/* ---------- темы: панель вида и режим «список» ---------- */
.th-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.th-bar .th-crumbs { margin: 0; }
.th-view { display: inline-flex; background: #ebe6de; border-radius: 10px; padding: 3px; }
.th-view button { border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.th-view button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.th-list { display: flex; flex-direction: column; gap: 8px; }
.th-list > * { min-width: 0; }
.tile.rc { flex-direction: row; align-items: center; gap: 12px; min-height: 0; padding: 12px 14px; border-radius: 12px; }
.tile.rc:hover { transform: none; }
.rc-grip { color: #c2b9ab; font-size: 18px; cursor: grab; user-select: none; }
.tile.rc .tile-chk { position: static; opacity: 1; width: auto; height: auto; }
.rc-ico { font-size: 24px; }
.rc-body { flex: 1; min-width: 0; }
.rc-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rc-title .tile-name { -webkit-line-clamp: 1; font-size: 15px; }
.rc-title .tile-uk { margin: 0; }
.rc-kids { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.rc-chip { font-size: 12px; background: #f4f1ec; border: 1px solid #ebe5db; border-radius: 6px; padding: 1px 8px; color: #4a4d52;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-chip.theme { background: var(--accent-soft); border-color: #f5c9ad; color: #9a4310; }
.rc-chip.hid { text-decoration: line-through; opacity: .6; }
.rc-more { font-size: 12px; color: var(--muted); padding: 1px 4px; }
.rc-num { text-align: right; white-space: nowrap; }
.rc-num b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.rc-num small { color: var(--muted); font-size: 12px; }
.tile.rc .tile-more { position: static; }
.tile.rc .tile-drop { border-radius: 12px; }
.tile.rc.drop-before { box-shadow: 0 -4px 0 var(--accent); }
.tile.rc.drop-after { box-shadow: 0 4px 0 var(--accent); }
.th-list .tile-new { min-height: 64px; flex-direction: row; gap: 10px; }
.th-list .tile-plus { font-size: 24px; }
.th-dlg textarea { min-height: 0; }
@media (max-width: 600px) { .tile.rc { flex-wrap: wrap; } .rc-num { text-align: left; } .rc-grip { display: none; } }

/* ---------- каталог: таблица разделов ---------- */
.cat-table { padding: 4px 8px; margin-bottom: 16px; }
.cat-row { cursor: pointer; }
.cat-row:hover td { background: #faf8f4; }
.cat-row td { padding-top: 11px; padding-bottom: 11px; vertical-align: middle; }
.cat-ico { margin-right: 8px; }
.cat-name { text-decoration: none; font-weight: 600; }
.cat-row:hover .cat-name { color: var(--accent); }
.cat-uk { font-size: 12px; margin: 2px 0 0 30px; }
.rc-chip { max-width: 220px; } .rc-kids { max-height: 50px; overflow: hidden; }

/* ================= бренд и иконки (1.4) ================= */
.ic { flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; padding: 2px 8px 22px; color: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text small { font-size: 10.5px; letter-spacing: 2.6px; text-transform: uppercase; color: #aeb3ba; font-weight: 700; }
.brand-text b { font-size: 17px; letter-spacing: .6px; text-transform: uppercase; font-weight: 800; }
.brand-text i { font-style: normal; color: var(--accent); }
.flash { display: flex; gap: 10px; align-items: center; }
.btn .ic { margin: 0 -2px; }
h2 .ic { color: var(--accent); margin-right: 6px; }
.login-bg { background: radial-gradient(1200px 600px at 20% 0%, #fff 0%, var(--bg) 60%); }
.login { width: 380px; padding: 30px; }
.login-logo { width: 100%; height: auto; margin-bottom: 4px; }
.ico-badge { width: 34px; height: 34px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.stat .k { display: flex; align-items: center; gap: 7px; }
.stat .k .ic { opacity: .7; }
.ic.ok{color:var(--ok)} .ic.bad{color:var(--bad)} .ic.muted{color:var(--muted)} .drop .big .ic{color:var(--accent);stroke-width:1.5}
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.settings-side { position: sticky; top: 16px; }
@media (max-width: 900px) { .settings-grid { grid-template-columns: minmax(0, 1fr); } .settings-side { position: static; } }

/* ================= редактор каталога (1.4) ================= */
.ed-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.ed-note { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: #5d6168; background: #fff; border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.ed-note .ic { color: var(--accent); margin-top: 1px; }
.ed-toolbar { position: sticky; top: 0; z-index: 20; background: rgba(244,242,238,.96); backdrop-filter: blur(6px);
  margin: 0 -8px 14px; padding: 8px; border-radius: 0 0 14px 14px; }
.ed-path { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ed-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.ed-crumbs .sep { color: #b9b2a6; }
.crumb { border: 1px solid transparent; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted);
  padding: 4px 9px; border-radius: 8px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.crumb:hover { background: #fff; color: var(--ink); }
.crumb.cur { color: var(--ink); background: #fff; border-color: var(--line); }
.crumb.drop-into { border: 1px dashed var(--accent); background: var(--accent-soft); color: var(--accent); }
.ed-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 6px; box-shadow: 0 2px 10px rgba(30,25,20,.04); }
.tbtn { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; font: inherit; font-size: 13.5px;
  font-weight: 600; color: var(--ink); padding: 7px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.tbtn:hover:not(:disabled) { background: #f3f0ea; }
.tbtn:disabled { opacity: .35; cursor: default; }
.tbtn.primary { background: var(--accent); color: #fff; }
.tbtn.primary:hover { background: #bf2419; }
.tbtn.icon-only { padding: 7px 8px; }
.tbtn.on { background: #f3f0ea; color: var(--accent); }
.tbtn.danger:not(:disabled):hover { background: var(--bad-soft); color: var(--bad); }
.tsep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.tgrow { flex: 1; }
.ibtn { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 34px; height: 34px; display: inline-grid; place-items: center;
  cursor: pointer; color: var(--ink); }
.ibtn.sm { width: 28px; height: 28px; border-color: transparent; background: transparent; color: var(--muted); }
.ibtn:hover:not(:disabled) { background: #f3f0ea; color: var(--ink); }
.ibtn:disabled { opacity: .35; cursor: default; }
.ibtn.danger:hover { color: var(--bad); }
.ed-search { position: relative; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px;
  background: #fbfaf8; color: var(--muted); }
.ed-search input { border: 0; background: transparent; padding: 7px 2px; width: 170px; outline: none; font-size: 13.5px; }
.ed-search.wide input { width: 100%; }
.ed-results { position: absolute; top: calc(100% + 6px); right: 0; width: 360px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0,0,0,.14); z-index: 40; max-height: 380px; overflow: auto; color: var(--ink); }
.ed-results .res { display: flex; gap: 10px; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid #f2efe9; align-items: flex-start; }
.ed-results .res:hover { background: var(--accent-soft); }
.ed-results .res small { display: block; color: var(--muted); font-size: 12px; }
.ed-selinfo { font-size: 13px; padding: 7px 6px 0; min-height: 22px; }
.link-btn { border: 0; background: none; font: inherit; color: var(--accent); font-weight: 700; cursor: pointer; padding: 0 4px; display: inline-flex; gap: 5px; align-items: center; }
.ed-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.ed-grid.no-phone { grid-template-columns: 290px minmax(0, 1fr); }
.ed-grid.no-phone .ed-phone { display: none; }
.ed-tree { padding: 0; position: sticky; top: 130px; overflow: hidden; }
.ed-tree-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.ed-tree-body { max-height: calc(100vh - 260px); overflow: auto; padding: 6px; }
.ed-tree-tip { font-size: 12px; color: var(--muted); padding: 8px 12px; border-top: 1px solid var(--line); background: #fbfaf8; }
.trow { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px calc(6px + var(--d) * 16px); border-radius: 7px; cursor: pointer;
  font-size: 13.5px; border: 1px solid transparent; user-select: none; }
.trow:hover { background: #f6f3ee; }
.trow.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.trow.hid .tname { opacity: .5; text-decoration: line-through; }
.trow.drop-into { border: 1px dashed var(--accent); background: var(--accent-soft); }
.ttog { width: 14px; display: inline-grid; place-items: center; color: var(--muted); }
.tname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcnt { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 500; }
.ic.f { color: #8a8478; } .ic.v { color: var(--accent); } .ic.leaf { color: #b3ada3; }
.ed-list { padding: 0; overflow: hidden; }
.ed-lhead, .lrow { display: grid; grid-template-columns: 22px 22px 26px minmax(0, 1.4fr) minmax(0, 1fr) 80px 34px; gap: 10px; align-items: center; padding: 0 14px; }
.ed-lhead { grid-template-columns: 22px minmax(0, 1.4fr) minmax(0, 1fr) 80px 34px; padding: 10px 14px 10px 46px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .5px; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); background: #fbfaf8; }
.ed-lhead .chk { margin-left: -32px; }
.lrow { min-height: 54px; border-bottom: 1px solid #f1eee8; cursor: pointer; user-select: none; transition: background .1s; }
.lrow:hover { background: #faf8f4; }
.lrow.sel { background: #fff5f4; box-shadow: inset 3px 0 0 var(--accent); }
.lrow.hid .lname b { opacity: .5; text-decoration: line-through; }
.lrow.flash { animation: flash 1.4s ease; }
.lrow.drop-into { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.lrow.drop-before { box-shadow: inset 0 3px 0 var(--accent); }
.lrow.drop-after { box-shadow: inset 0 -3px 0 var(--accent); }
.grip { color: #c9c2b7; cursor: grab; display: grid; place-items: center; }
.chk { display: grid; place-items: center; }
.chk input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.lico { display: grid; place-items: center; }
.lname { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 8px 0; }
.lname b { font-size: 14.5px; font-weight: 700; }
.lname small { color: var(--muted); font-size: 12px; width: 100%; }
.tag { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: #f1ede6; color: #6d675d; }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.lrow.v .tag:not(.bad) { background: var(--accent-soft); color: var(--accent); }
.lkids { display: flex; gap: 4px; overflow: hidden; white-space: nowrap; }
.lchip { font-size: 12px; background: #f4f1ec; border-radius: 5px; padding: 1px 7px; color: #57524a; overflow: hidden; text-overflow: ellipsis; max-width: 150px; flex: none; }
.lchip.v { background: var(--accent-soft); color: var(--accent); }
.lmore { font-size: 12px; color: var(--muted); }
.lnum { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.lopen { display: grid; place-items: center; }
.ed-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 20px; color: var(--muted); text-align: center; }
.ed-empty b { color: var(--ink); }
.ed-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; font-size: 13px; background: #fbfaf8; }
.ed-orphans { padding: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.ed-phone { position: sticky; top: 130px; }
.ed-phone .phone-top img { border-radius: 50%; }
.ed-pop { position: absolute; z-index: 60; width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px;
  box-shadow: 0 18px 48px rgba(0,0,0,.18); }
.ed-pop[hidden] { display: none; }
.ed-pop-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ed-movelist { max-height: 340px; overflow: auto; margin-top: 8px; }
.mv { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px calc(8px + var(--d) * 16px); border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.mv:hover { background: var(--accent-soft); }
.mv span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv.here { color: var(--muted); }
.mv em { font-style: normal; font-size: 11px; color: var(--muted); }
.drag-ghost { position: fixed; top: -100px; left: -100px; background: var(--ink); color: #fff; padding: 6px 12px; border-radius: 8px; font: 600 13px Manrope, sans-serif; }
.th-dlg.wide { width: min(720px, 94vw); }
.th-dlg h2 { display: flex; align-items: center; gap: 8px; }
.th-dlg textarea { min-height: 0; }
.ver-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.ver { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ver.auto { background: #fbfaf8; }
.ver-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.ver.auto .ver-ico { background: #efebe4; color: var(--muted); }
.ver-main { flex: 1; min-width: 0; }
.ver-main small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 1280px) { .ed-grid { grid-template-columns: 260px minmax(0, 1fr); } .ed-phone { display: none; } #btnPhone { display: none; } }
@media (max-width: 900px) {
  .ed-grid, .ed-grid.no-phone { grid-template-columns: minmax(0, 1fr); }
  .ed-tree { position: static; } .ed-tree-body { max-height: 240px; }
  .tbtn span { display: none; } .tbtn.primary span { display: inline; }
  .ed-search input { width: 110px; }
  .lrow { grid-template-columns: 22px 26px minmax(0, 1fr) 64px 30px; padding: 0 10px; } .lrow .grip { display: none; }
  .ed-lhead { grid-template-columns: 22px minmax(0, 1fr) 64px 30px; padding-left: 10px; } .ed-lhead .chk { margin-left: 0; }
}
.ed-path .ed-search { background: #fff; }
.ed-path .tbtn { background: #fff; border: 1px solid var(--line); }
.lrow { grid-template-columns: 22px 22px 26px minmax(0, 1.6fr) minmax(0, .8fr) 80px 34px; }
.ed-lhead { grid-template-columns: 22px minmax(0, 1.6fr) minmax(0, .8fr) 80px 34px; }
.ed-grid:not(.no-phone) .lkids { display: none; }
.ed-grid:not(.no-phone) .lrow { grid-template-columns: 22px 22px 26px minmax(0, 1fr) 70px 34px; }
.ed-grid:not(.no-phone) .ed-lhead { grid-template-columns: 22px minmax(0, 1fr) 70px 34px; }
.ed-grid:not(.no-phone) .ed-lhead span:nth-child(3) { display: none; }
@media (max-width: 900px) { .ed-path { flex-wrap: wrap; } .ed-path .tgrow { display: none; } }
/* шапка списка — та же сетка, что у строк */
.ed-lhead.lrow-grid { grid-template-columns: 22px 22px 26px minmax(0, 1.6fr) minmax(0, .8fr) 80px 34px; padding: 10px 14px; }
.ed-lhead .chk { margin-left: 0; }
.ed-grid:not(.no-phone) .ed-lhead.lrow-grid { grid-template-columns: 22px 22px 26px minmax(0, 1fr) 70px 34px; }
.ed-grid:not(.no-phone) .ed-lhead .lk-h { display: none; }
.ed-grid:not(.no-phone) .ed-lhead span:nth-child(3) { display: block; }
@media (max-width: 900px) {
  .ed-lhead.lrow-grid { grid-template-columns: 22px 26px minmax(0, 1fr) 64px 30px; padding: 10px; }
  .ed-lhead .grip-sp { display: none; }
}
.settings-side label.row { flex-wrap: nowrap; align-items: flex-start; margin-bottom: 8px; font-size: 14px; } .settings-side label.row input { margin-top: 3px; flex: none; }
.danger-btn:hover { color: var(--bad); border-color: #f0b9b3; background: var(--bad-soft); } .th-dlg select { width: 100%; font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* редактор: вся ширина экрана, превью бота — в правой колонке, без полос прокрутки */
main.wide { max-width: none; }
main.wide .ed-head, main.wide .ed-note { max-width: none; }
.ed-grid { grid-template-columns: 290px minmax(0, 1fr) 340px; }
.ed-grid.no-phone { grid-template-columns: 290px minmax(0, 1fr); }
.ed-phone .phone-chat { max-height: calc(100vh - 230px); min-height: 360px; scrollbar-width: none; -ms-overflow-style: none; }
.ed-phone .phone-chat::-webkit-scrollbar { display: none; }
.ed-tree-body { scrollbar-width: thin; scrollbar-color: #d6d0c6 transparent; }
.ed-tree-body::-webkit-scrollbar { width: 6px; }
.ed-tree-body::-webkit-scrollbar-thumb { background: #d6d0c6; border-radius: 6px; }
.ed-tree-body::-webkit-scrollbar-button { display: none; height: 0; }
.ed-grid:not(.no-phone) .lkids { display: flex; }
.ed-grid:not(.no-phone) .lrow { grid-template-columns: 22px 22px 26px minmax(0, 1.6fr) minmax(0, .8fr) 80px 34px; }
.ed-grid:not(.no-phone) .ed-lhead.lrow-grid { grid-template-columns: 22px 22px 26px minmax(0, 1.6fr) minmax(0, .8fr) 80px 34px; }
.ed-grid:not(.no-phone) .ed-lhead .lk-h { display: block; }
@media (max-width: 1500px) {
  .ed-grid:not(.no-phone) .lkids, .ed-grid:not(.no-phone) .ed-lhead .lk-h { display: none; }
  .ed-grid:not(.no-phone) .lrow, .ed-grid:not(.no-phone) .ed-lhead.lrow-grid { grid-template-columns: 22px 22px 26px minmax(0, 1fr) 70px 34px; }
}
@media (max-width: 1180px) { .ed-grid, .ed-grid.no-phone { grid-template-columns: 260px minmax(0, 1fr); } .ed-phone { display: none; } #btnPhone { display: none; } }
@media (max-width: 900px) { .ed-grid, .ed-grid.no-phone { grid-template-columns: minmax(0, 1fr); } }

/* ---------- наценки ---------- */
.mk-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; max-width: 220px; }
.mk-input input { border: 0 !important; outline: 0; flex: 1; min-width: 0; font: inherit; font-weight: 700; padding: 10px 12px; box-shadow: none !important; }
.mk-input span { padding: 0 12px; color: var(--muted); font-weight: 700; }
.mk-input.big input { font-size: 22px; }
.mk-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mk-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mk-quick .chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 11px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.mk-quick .chip:hover { border-color: var(--accent); color: var(--accent); }
.mk-now { font-size: 14px; margin-bottom: 14px; line-height: 1.6; }
.mk-err { color: var(--bad); font-size: 13px; font-weight: 600; margin-top: 6px; min-height: 1em; }
.mk-example { background: #f7f4ef; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin: 4px 0 14px; line-height: 1.6; }
.mk-table { width: 100%; margin-top: 10px; }
.mk-table td { vertical-align: middle; }
.mk-help { padding-left: 18px; font-size: 14px; line-height: 1.55; display: flex; flex-direction: column; gap: 8px; }
.icon-btn { border: 1px solid transparent; background: transparent; border-radius: 8px; width: 32px; height: 32px; display: inline-grid; place-items: center; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.mk-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: #f1ede6; color: var(--muted); border: 0; cursor: pointer; font-family: inherit; white-space: nowrap; }
.mk-badge.own { background: var(--accent-soft); color: var(--accent); }
.mk-badge:hover { outline: 1px solid var(--accent); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.mk-sec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 14px; font-size: 14px; }

/* ---------- команда ---------- */
.tm-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.tm { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; flex-wrap: wrap; }
.tm.off { opacity: .55; }
.tm-ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #efebe4; color: var(--muted); flex: none; }
.tm-ava.owner, .tm-ava.admin { background: var(--accent-soft); color: var(--accent); }
.tm-main { flex: 1; min-width: 220px; }
.tm-name { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tm-name a { font-weight: 500; text-decoration: none; }
.tm-meta { font-size: 13px; margin-top: 2px; }
.tm-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tm-ctl select { font: inherit; font-size: 13.5px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.tm-ctl .th-switch { font-size: 13px; font-weight: 600; }
.tm-fixed { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.inv { display: flex; align-items: center; gap: 10px; border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.inv.new { border-color: var(--accent); background: var(--accent-soft); }
.inv-link { font-size: 12.5px; overflow-wrap: anywhere; color: var(--muted); margin-top: 2px; }
.log-table td { font-size: 13.5px; vertical-align: top; }
.nowrap { white-space: nowrap; }
.bc-prev { background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 10px 12px; font-size: 14px; max-width: 320px; overflow-wrap: anywhere; }
.bc-prev img { width: 100%; border-radius: 8px; margin-bottom: 8px; display: block; }
.bc-prev img[hidden] { display: none; }
.bc-prev-wrap { background: #e7ebe3; }
.bc-btn { max-width: 320px; margin-top: 4px; text-align: center; background: rgba(255,255,255,.8); border-radius: 10px; padding: 8px; font-size: 13.5px; font-weight: 600; }
.bc-btn[hidden] { display: none; }

/* ---------- почта ---------- */
.mail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, .8fr) minmax(0, 1.2fr); gap: 12px; }
.mail-grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mail-grid select { width: 100%; font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.mail-help { font-size: 13.5px; line-height: 1.55; }
.mail-help ol { padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.mail-help code { overflow-wrap: anywhere; }
@media (max-width: 700px) { .mail-grid, .mail-grid.two { grid-template-columns: minmax(0, 1fr); } }

/* ---------- фото из Prom ---------- */
.media-stats { margin-bottom: 16px; }
.pm-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.pm { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px; transition: opacity .2s, transform .2s; }
.pm.done { background: var(--ok-soft); } .pm.gone { opacity: 0; transform: translateX(20px); }
.pm-img { width: 84px; height: 84px; border-radius: 10px; background: #f3f0ea; display: grid; place-items: center; overflow: hidden; flex: none; color: var(--muted); }
.pm-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pm-pair { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pm-side { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 14px; }
.pm-side b { font-weight: 600; }
.pm-lbl { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #7a5cc4; background: #f0ebfb; padding: 1px 6px; border-radius: 4px; }
.pm-lbl.ours { color: var(--accent); background: var(--accent-soft); }
.pm-why { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12.5px; margin-top: 2px; }
.pm-act { display: flex; flex-direction: column; gap: 6px; flex: none; }
#review select { width: auto; font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 640px) { .pm { flex-wrap: wrap; } .pm-act { flex-direction: row; width: 100%; } .pm-act .btn { flex: 1; justify-content: center; } }
.prod-cell { display: flex; gap: 10px; align-items: flex-start; }
.prod-thumb { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; background: #fff; border: 1px solid var(--line); flex: none; }
.pm-all { flex-wrap: wrap; }
.tm-ctl select { width: auto; }
.page-sections > .card + .card, main > section.card + section.card { margin-top: 16px; }
.bc-target { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; }
.bc-target .ic { flex: none; margin-top: 3px; color: var(--muted); }
.mk-import.danger { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mk-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.mk-choices label { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-weight: 600; font-size: 14px; }
.mk-choices label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- фото товара: диалог ---------- */
.ph-cur { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.ph-item { position: relative; width: 110px; height: 110px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.ph-item.main { border: 2px solid var(--accent); }
.ph-item img { width: 100%; height: 100%; object-fit: contain; }
.ph-item button { position: absolute; top: 4px; left: 4px; border: 0; border-radius: 6px; background: rgba(255,255,255,.9); cursor: pointer; font-size: 13px; padding: 2px 6px; }
.ph-item .ph-del { left: auto; right: 4px; color: var(--bad); }
.ph-badge { position: absolute; bottom: 4px; left: 4px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 4px; padding: 1px 6px; }
.ph-h { font-size: 14px; margin: 16px 0 8px; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 6px; }
.ph-card { border: 1px solid var(--line); border-radius: 10px; padding: 6px; cursor: pointer; font-size: 12px; line-height: 1.3; }
.ph-card:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ph-card img { width: 100%; height: 90px; object-fit: contain; background: #fff; display: block; margin-bottom: 4px; }
.ph-card div { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ph-err { color: var(--bad); font-size: 13px; font-weight: 600; min-height: 1em; }
.ps-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ps { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; cursor: pointer; }
.ps > div:nth-child(2) { flex: 1; }
.ps:hover { border-color: var(--accent); }
.ps-img { width: 44px; height: 44px; flex: none; display: grid; place-items: center; color: var(--muted); background: #f3f0ea; border-radius: 8px; overflow: hidden; }
.ps-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pm.was-rej { border-color: #e9c46a; }
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
#own, #review, #rejected { margin-top: 16px; }
.prod-ph { border: 1px dashed var(--line); background: #faf8f4; border-radius: 8px; width: 42px; height: 42px; padding: 0; display: grid; place-items: center; cursor: pointer; color: var(--muted); flex: none; }
.prod-ph:hover { border-color: var(--accent); color: var(--accent); }
.prod-ph .prod-thumb { border: 0; }
.ph-grid > p { grid-column: 1 / -1; margin: 0; }

/* ---------- клиенты и корзины ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg a { padding: 8px 12px; text-decoration: none; font-weight: 600; font-size: 14px; }
.seg a.on { background: var(--accent); color: #fff; }
.us-list { display: flex; flex-direction: column; gap: 8px; }
.us { border: 1px solid var(--line); border-radius: 12px; }
.us > summary { display: flex; gap: 12px; align-items: center; padding: 10px 12px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.us > summary::-webkit-details-marker { display: none; }
.us[open] > summary { border-bottom: 1px solid var(--line); }
.us-main { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.us-main a { text-decoration: none; font-size: 13px; }
.us-meta { font-size: 12.5px; }
.us-cart { font-size: 14px; white-space: nowrap; }
.us-items { width: 100%; }
.us-items td { padding: 8px 12px; font-size: 14px; }

/* ---------- фото разделов, несовпавшие карточки Prom ---------- */
.media-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 16px; }
.media-tabs .pill { margin-left: 4px; }
.cp-list { display: flex; flex-direction: column; gap: 8px; }
.cp { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.cp.ok { background: var(--ok-soft); }
.cp-img { width: 84px; height: 84px; flex: none; border: 1px dashed var(--line); border-radius: 10px; display: grid; place-items: center; align-content: center; cursor: pointer; color: var(--muted); font-size: 11px; background: #faf8f4; overflow: hidden; }
.cp-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.cp-img:hover { border-color: var(--accent); color: var(--accent); }
.cp-main { flex: 1; min-width: 0; }
.cp-samples { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 300px; }
.cp-err { color: var(--bad); font-size: 13px; font-weight: 600; }
.um { display: flex; gap: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; transition: opacity .2s, transform .2s; }
.um.gone { opacity: 0; transform: translateX(20px); }
.um-main { flex: 1; min-width: 0; }
.um-sugg, .um-found { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.um-s { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 14px; }
@media (max-width: 640px) { .cp { flex-wrap: wrap; } .cp-act { max-width: none; justify-content: flex-start; } .um { flex-direction: column; } }

/* ---------- фото во весь экран ---------- */
.prod-thumb, .pm-img img, .ph-item img, .cp-img img, img[data-zoom] { cursor: zoom-in; }
dialog.zoom { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
  display: none; align-items: center; justify-content: center; flex-direction: column; gap: 12px; cursor: zoom-out; }
dialog.zoom[open] { display: flex; }
dialog.zoom::backdrop { background: rgba(10, 10, 12, .55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
dialog.zoom.on figure { transform: scale(1); opacity: 1; }
dialog.zoom figcaption { background: rgba(24, 25, 28, .92); color: #fff; padding: 12px 16px 14px; display: flex; flex-direction: column;
  gap: 3px; max-width: 92vw; cursor: zoom-out; }
dialog.zoom figcaption[hidden] { display: none; }
dialog.zoom figcaption b { font-size: 15px; font-weight: 700; line-height: 1.35; }
dialog.zoom figcaption span { display: flex; flex-direction: column; gap: 2px; }
dialog.zoom figcaption span span { font-size: 13px; color: rgba(255,255,255,.72); line-height: 1.4; }
.zoom-hint { color: rgba(255,255,255,.75); font-size: 13px; opacity: 0; transition: opacity .2s; }
dialog.zoom.on .zoom-hint { opacity: 1; }
.prod-ph { position: relative; }
.prod-ph .ph-edit { position: absolute; right: -6px; bottom: -6px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); }
.prod-ph .ph-edit:hover { color: var(--accent); border-color: var(--accent); }
.um-hist { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; height: 120px; align-items: end; margin: 6px 0 14px; }
.um-bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-decoration: none; gap: 3px; }
.um-bar span { width: 100%; background: #e6e1d8; border-radius: 6px 6px 2px 2px; min-height: 3px; }
.um-bar.on span, .um-bar:hover span { background: var(--accent); }
.um-bar b { font-size: 12px; } .um-bar i { font-style: normal; font-size: 11px; color: var(--muted); }
.um-ctl { gap: 10px; flex-wrap: wrap; align-items: center; }
.um-ctl label { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: 14px; }
.um-ctl input[type=number] { width: 72px; font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.um-ctl select { width: auto; }
.mk-quick a.chip { text-decoration: none; }
.um-bulk { justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.um-s.best { border-color: var(--ok); background: var(--ok-soft); }

/* ---------- просмотр фото: увеличение и перетаскивание ---------- */
dialog.zoom { gap: 10px; }
.zoom-view.grabbing { cursor: grabbing; }
.zoom-bar { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px;
  background: rgba(24, 25, 28, .88); color: #fff; border-radius: 99px; padding: 4px; box-shadow: 0 8px 30px rgba(0,0,0,.35);
  backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s; cursor: default; z-index: 2; }
dialog.zoom.on .zoom-bar { opacity: 1; }
.zoom-bar button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 18px;
  font-weight: 600; cursor: pointer; display: grid; place-items: center; font-family: inherit; }
.zoom-bar button:hover { background: rgba(255,255,255,.14); }
.zoom-bar button[data-z="close"] { margin-left: 4px; background: rgba(255,255,255,.1); font-size: 15px; }
#zoomPct { min-width: 54px; text-align: center; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.85); }

/* ---------- единый стиль полей: списки, файлы, галочки ---------- */
select.sel-native { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important; }
.sel-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-width: 120px;
  font: inherit; font-size: 14.5px; color: var(--ink); text-align: left; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.sel-btn:hover { border-color: #cfc8bc; }
.sel-btn:focus-visible, .sel-btn.open { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sel-btn:disabled { opacity: .55; cursor: not-allowed; }
.sel-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-chev { flex: none; color: var(--muted); transition: transform .18s; }
.sel-btn.open .sel-chev { transform: rotate(180deg); color: var(--accent); }
.um-ctl .sel-btn, .tm-ctl .sel-btn, #review .sel-btn, .pm-all .sel-btn { width: auto; }
.sel-menu { position: fixed; z-index: 1000; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 16px 40px rgba(27, 30, 34, .16), 0 2px 6px rgba(27, 30, 34, .06); overflow-y: auto; max-width: min(420px, 94vw);
  opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top; transition: opacity .12s, transform .12s; }
.sel-menu.show { opacity: 1; transform: none; }
.sel-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 8px;
  font-size: 14.5px; cursor: pointer; white-space: nowrap; }
.sel-opt svg { opacity: 0; color: var(--accent); flex: none; }
.sel-opt:hover, .sel-opt.hi { background: #f5f2ec; }
.sel-opt.on { font-weight: 700; color: var(--accent); }
.sel-opt.on svg { opacity: 1; }
.sel-opt.off { opacity: .45; cursor: not-allowed; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }
input[type=file] { font: inherit; font-size: 14px; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; font-size: 14px; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; margin-right: 10px; cursor: pointer; transition: border-color .15s, color .15s; }
input[type=file]::file-selector-button:hover { border-color: var(--accent); color: var(--accent); }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number], input[type=url], input[type=email] { border-radius: 10px; }
input[type=search]::-webkit-search-cancel-button { cursor: pointer; }

/* просмотр фото: своё соотношение сторон; при увеличении — на весь экран, как в Telegram */
dialog.zoom figure { margin: 0; display: inline-flex; flex-direction: column; width: fit-content; max-width: 92vw;
  border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.45);
  transform: scale(.94); opacity: 0; transition: transform .18s ease, opacity .18s ease; }
dialog.zoom figcaption { width: 0; min-width: 100%; box-sizing: border-box; transition: opacity .15s; }
.zoom-view { position: relative; display: block; line-height: 0; touch-action: none; cursor: zoom-in; background: #fff; }
.zoom-view img { display: block; width: auto; height: auto; max-width: 92vw; max-height: 74vh; object-fit: contain;
  transform-origin: center center; will-change: transform; user-select: none; -webkit-user-drag: none; }
.zoom-view.zoomed { position: fixed; inset: 0; z-index: 1; background: transparent; cursor: grab;
  display: flex; align-items: center; justify-content: center; }
.zoom-view.zoomed img { max-width: 96vw; max-height: 92vh; }
.zoom-view.zoomed.grabbing { cursor: grabbing; }
dialog.zoom figure:has(.zoomed) { box-shadow: none; background: transparent; transform: none !important;
  overflow: visible; transition: none; }
dialog.zoom figure:has(.zoomed) figcaption, dialog.zoom:has(.zoomed) .zoom-hint { opacity: 0; pointer-events: none; }

/* ---------- клиенты: онлайн и карточка ---------- */
.dot-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: live 1.8s infinite; vertical-align: middle; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.seg a.on .dot-live { background: #fff; animation: none; }
.live-badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; color: #15803d; background: #dcfce7;
  border-radius: 99px; padding: 2px 9px 2px 7px; margin-left: 6px; vertical-align: middle; }
.live-badge.big { font-size: 13px; padding: 4px 12px 4px 9px; }
.us-link { text-decoration: none; color: inherit; } .us-link:hover { color: var(--accent); }
.us-act { font-size: 13px; color: var(--ink); background: #f5f2ec; border-radius: 8px; padding: 2px 8px; margin: 2px 0; align-self: flex-start; }
.uc-head { display: flex; gap: 16px; align-items: center; }
.uc-ava { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 26px;
  font-weight: 800; display: grid; place-items: center; flex: none; }
.uc-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: 14px; }
.uc-meta a { text-decoration: none; display: inline-flex; gap: 5px; align-items: center; font-weight: 600; }
.uc-meta a:hover { color: var(--accent); }
.uc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.uc-tag { background: #f5f2ec; border-radius: 99px; padding: 4px 10px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.uc-tag i { font-style: normal; color: var(--muted); font-size: 11.5px; }
.uc-tag.bad { background: var(--bad-soft); color: var(--bad); }
.uc-notes { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.uc-note { position: relative; background: #fbf8f2; border: 1px solid var(--line); border-radius: 10px; padding: 10px 36px 10px 12px; font-size: 14px; }
.uc-note form { position: absolute; top: 6px; right: 4px; }

.login-logo.login-mark { width: 120px; height: 120px; display: block; margin: 0 auto 8px; }
@media (max-width: 900px) { .brand.brand-logo { justify-content: flex-start; padding-bottom: 10px; } .brand.brand-logo img { width: 48px; height: 48px; } }

/* ---------- карточка клиента: справочник слева, переписка ---------- */
.uc-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 20px; align-items: start; }
.uc-dir { position: sticky; top: 16px; height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.uc-dir-top { padding: 12px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); }
.uc-dir-tabs { display: flex; gap: 4px; }
.uc-dir-tabs button { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 4px; font: inherit;
  font-size: 12.5px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.uc-dir-tabs button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.uc-dir-tabs button.on .dot-live { background: #fff; animation: none; }
.uc-dir-list { flex: 1; overflow-y: auto; padding: 6px; scrollbar-width: thin; }
.uc-dir-item { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; text-decoration: none; color: inherit; }
.uc-dir-item:hover { background: #f5f2ec; }
.uc-dir-item.on { background: var(--accent-soft); }
.uc-dir-ava { position: relative; width: 36px; height: 36px; border-radius: 50%; background: #efebe4; color: var(--muted);
  display: grid; place-items: center; font-weight: 800; flex: none; }
.uc-dir-item.on .uc-dir-ava { background: var(--accent); color: #fff; }
.uc-dir-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; }
.uc-dir-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.uc-dir-main b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-dir-main small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-dir-badge { background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 800; padding: 1px 7px; }
.uc-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.uc-chat { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; padding: 4px 2px 10px; }
.uc-msg { max-width: 80%; padding: 8px 12px; border-radius: 14px; font-size: 14px; overflow-wrap: anywhere; }
.uc-msg > div { white-space: pre-wrap; }
.uc-msg small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; white-space: normal; }
.uc-msg.out { align-self: flex-end; background: var(--accent-soft); border-bottom-right-radius: 4px; }
.uc-msg.in { align-self: flex-start; background: #f1efe9; border-bottom-left-radius: 4px; }
.uc-msg.fail { opacity: .7; outline: 1px dashed var(--bad); }
.uc-send { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 1000px) {
  .uc-layout { grid-template-columns: minmax(0, 1fr); }
  .uc-dir { position: static; height: 300px; }
}
.us-ren { width: 24px; height: 24px; vertical-align: middle; opacity: .5; }
.us:hover .us-ren { opacity: 1; }

/* ---------- свои товары, описания, выгрузка на Prom ---------- */
.pe-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 700px) { .pe-grid { grid-template-columns: 1fr 1fr; } }
.cat-pick { position: relative; }
.cat-sel { margin-top: 6px; font-size: 14px; font-weight: 600; }
.cat-list { position: absolute; z-index: 20; left: 0; right: 0; top: 46px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(27,30,34,.16); max-height: 320px; overflow-y: auto; padding: 6px; }
.cat-opt { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.cat-opt:hover { background: #f5f2ec; } .cat-opt i { font-style: normal; color: var(--muted); font-size: 12px; }
.ds-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.ds { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; transition: opacity .2s; }
.ds-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ds-text { white-space: pre-wrap; font-size: 14px; background: #fbf9f5; border-radius: 10px; padding: 10px 12px; max-height: 220px; overflow-y: auto; line-height: 1.5; }
.ds-text mark { background: #fff1a8; border-radius: 3px; padding: 0 2px; }
.ds-edit { width: 100%; }
.ds-auto { border: 1px dashed var(--line); border-radius: 12px; padding: 10px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.pe-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pe-cards .card { display: flex; flex-direction: column; gap: 6px; }
.pe-num { font-size: 32px; font-weight: 800; } .pe-num span { font-size: 14px; color: var(--muted); font-weight: 600; }
.pe-full { border-color: #f1dd9f; }
@media (max-width: 1100px) { .pe-cards { grid-template-columns: minmax(0, 1fr); } }
.prod-link { color: inherit; text-decoration: none; } .prod-link:hover { color: var(--accent); text-decoration: underline; }

/* ---------- источник заказа ---------- */
.pill.src-bot { background: #e8eefc; color: #2f55c4; }
.pill.src-site { background: var(--accent-soft); color: var(--accent); }
.pill.src-admin { background: #efede8; color: var(--muted); }
.pill .ico, .pill svg { vertical-align: -2px; }
.src-split { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--line); margin: 10px 0 6px; }
.src-split span { display: block; height: 100%; }
.src-bar-bot { background: #2f55c4; } .src-bar-site { background: var(--accent); } .src-bar-admin { background: var(--muted); }

/* ---------- Сайт: предпросмотр контактов ---------- */
.site-preview { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 12px; font-size: 13px; }
.site-preview .sp-top { background: var(--side); color: var(--side-ink); padding: 6px 10px; font-size: 12px; }
.site-preview .sp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px; flex-wrap: wrap; }
.site-preview .sp-contacts { text-align: right; line-height: 1.35; }
.site-preview .sp-msg { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 10px 8px; }
.site-preview .sp-line { padding: 4px 10px; border-top: 1px solid #f0ede7; display: flex; gap: 6px; align-items: center; }

/* ---------- редактор страниц и статей ---------- */
.mono-area { font-family: var(--mono); font-size: 13.5px; line-height: 1.55; }
.md-help { font-size: 12.5px; }
.md-help td { padding: 5px 6px; vertical-align: top; }
.content-preview { border: 1px dashed var(--line); border-radius: 8px; padding: 12px 16px; margin-top: 8px; background: #fcfbf9; font-size: 14px; }
.content-preview table { width: auto; }
.content-preview .callout { background: var(--accent-soft); padding: 8px 12px; border-radius: 6px; }

/* ---------- статистика сайта на «Обзоре» ---------- */
.site-funnel { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin: 14px 0 10px; }
.site-funnel > div { background: #faf8f5; border-radius: 8px; padding: 10px 12px; display: grid; }
.site-funnel b { font-size: 22px; font-variant-numeric: tabular-nums; }
.site-funnel span { color: var(--muted); font-size: 12.5px; }
.site-funnel .acc { background: var(--accent-soft); }
.site-funnel .acc b { color: var(--accent); }
.site-days { display: flex; gap: 6px; align-items: flex-end; height: 84px; }
.site-days > div { flex: 1; display: grid; justify-items: center; align-content: end; gap: 4px; }
.site-days i { display: block; width: 100%; max-width: 36px; background: var(--accent); border-radius: 4px 4px 0 0; opacity: .85; }
.site-days span { font-size: 11px; color: var(--muted); }
.h3 { font-size: 14px; margin: 0 0 8px; }
@media (max-width: 900px) { .site-funnel { grid-template-columns: repeat(2, 1fr); } }

/* --- карточка товара как на Prom: редактор описания и характеристики --- */
.de-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.de-tabs, .de-mode { display: flex; gap: 2px; }
.de-tabs button { border: 0; background: none; font: inherit; font-weight: 700; font-size: 14px; color: var(--muted); padding: 8px 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.de-tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.de-mode { background: var(--bg); border-radius: 8px; padding: 3px; margin-bottom: 6px; }
.de-mode button { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.de-mode button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.de-bar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 8px 0; }
.de-bar.off { opacity: .4; pointer-events: none; }
.de-bar button { min-width: 34px; height: 32px; padding: 0 9px; border: 1px solid var(--line); background: var(--panel); border-radius: 7px;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; display: inline-grid; place-items: center; }
.de-bar button:hover { border-color: var(--ink); }
.de-hint { margin-left: auto; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.de textarea { width: 100%; min-height: 240px; font: 14.5px/1.6 "Manrope", system-ui, sans-serif; resize: vertical; }
.de-view { min-height: 240px; border: 1px solid var(--line); border-radius: 8px; padding: 16px 20px; background: #fff; }
.prose { font-size: 15px; line-height: 1.65; }
.prose h2 { font-size: 19px; margin: 18px 0 8px; } .prose h3 { font-size: 16.5px; margin: 14px 0 6px; }
.prose p { margin: 0 0 10px; } .prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; }
.prose li::marker { color: var(--accent); }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 0 0 12px; }
.prose th { text-align: left; border-bottom: 2px solid var(--ink); padding: 7px 10px; }
.prose td { border-bottom: 1px solid var(--line); padding: 7px 10px; }
.prose .callout { background: var(--bg); border-left: 3px solid var(--accent); padding: 10px 14px; margin: 0 0 12px; }
.sp-tbl { font-size: 14px; width: 100%; }
.sp-tbl td { vertical-align: middle; }
.sp-tbl input[type=text] { width: 100%; }
.sp-h { width: 72px; text-align: center; }
.sp-add { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(160px, 1fr); gap: 8px; margin-top: 12px; }
.sp-add .sp-new { grid-column: auto; }
.sp-size { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.sp-size summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.sp-size label input { display: block; width: 100%; margin-top: 4px; }

/* 2.28 счётчик новых сообщений с сайта в меню */

/* =====================================================================================
   2.31 — каркас как у админки университетского бота: группы меню с подсказками, главная кнопка над меню,
   свёртывание меню (Ctrl+B), вкладки связанных страниц в шапке, на телефоне — выезжающее меню + нижняя панель.
   Цвета — из дизайна сайта v4.2: ровный графит, красный акцент, шестерня логотипа срезана краем.
   ===================================================================================== */
:root {
  --bg: #f3f4f5; --line: #dfe1e4; --side: #3e4044; --side-2: #4e5055; --side-ink: #d4d5d8; --side-mut: #9c9ea3;
  --side-w: 248px;
}
html[data-side="min"] { --side-w: 76px; }
.layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 16px 12px 12px;
  background: var(--side); color: var(--side-ink); overflow: hidden; isolation: isolate; border-right: 3px solid var(--accent); }
.side::after { content: ""; position: absolute; z-index: -1; pointer-events: none; width: 300px; height: 300px; left: -96px; bottom: -120px;
  background: url("gear.svg") center / contain no-repeat; opacity: .07; filter: invert(1); }
.side .brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 14px; }
.brand-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; min-width: 0; }
.brand-logo img { flex: none; border-radius: 50%; background: #fff; }
.brand-logo .t { display: flex; flex-direction: column; line-height: 1.1; }
.brand-logo b { font-size: 18px; letter-spacing: .4px; }
.brand-logo small { color: var(--side-mut); font-size: 12px; font-weight: 600; }
.side-t { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--side-mut); transform: rotate(180deg); transition: background .15s, color .15s; }
.side-t:hover { background: var(--side-2); color: #fff; }
.side-cta { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 0 2px 10px; padding: 11px 12px; border-radius: 9px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; transition: filter .15s; }
.side-cta:hover { filter: brightness(1.08); }
.side-cta.on { box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.side nav { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; scrollbar-color: #5c5e63 transparent; }
.side .nav-group { color: var(--side-mut); font-size: 12px; font-weight: 700; letter-spacing: .2px; padding: 11px 12px 3px; white-space: nowrap; }
.side .nav-gap { height: 4px; }
.side nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 7px 12px; margin: 1px 0; border-radius: 8px;
  color: var(--side-ink); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, color .15s; }
.side nav a .ic { flex: none; opacity: .85; }
.side nav a:hover { background: var(--side-2); color: #fff; }
.side nav a.on { background: #fff; color: var(--ink); }
.side nav a.on .ic { color: var(--accent); opacity: 1; }
.side nav a .t { overflow: hidden; text-overflow: ellipsis; }
.side nav a .ext { margin-left: auto; opacity: .55; display: flex; }
.nav-n { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff;
  font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.side .foot { position: static; padding: 10px 2px 0; margin-top: 8px; border-top: 1px solid #55575c; font-size: 13.5px; }
.side .foot a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--side-ink); text-decoration: none; font-weight: 600; }
.side .foot a:hover { background: var(--side-2); color: #fff; }

/* свёрнутое меню: только значки, подпись — подсказкой справа */
html[data-side="min"] .side .t, html[data-side="min"] .side .nav-group, html[data-side="min"] .side nav a .ext { display: none; }
html[data-side="min"] .side .brand { flex-direction: column; gap: 10px; }
html[data-side="min"] .side-t { transform: none; }
html[data-side="min"] .side::after { display: none; }   /* шестерня 300 px в узкой полосе вылезала на страницу */
html[data-side="min"] .side-cta, html[data-side="min"] .side nav a, html[data-side="min"] .side .foot a { justify-content: center; padding-left: 0; padding-right: 0; }
html[data-side="min"] .side .nav-group + a { margin-top: 12px; }
html[data-side="min"] .nav-n { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
html[data-side="min"] .side, html[data-side="min"] .side nav { overflow: visible; }
html[data-side="min"] [data-tip]:hover::after { content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 7px; white-space: nowrap; z-index: 50; pointer-events: none; }
html[data-side="min"] .side-cta { position: relative; }

/* шапка раздела: путь и вкладки связанных страниц (остаётся сверху при прокрутке) */
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.pgbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  padding: 12px 36px 0; background: rgba(243,244,245,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.pg-crumb { color: var(--muted); font-size: 13px; font-weight: 600; padding-bottom: 11px; white-space: nowrap; }
.pg-crumb span { margin: 0 7px; opacity: .6; }
.pg-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.pg-tabs a { position: relative; padding: 8px 12px 11px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 14px; white-space: nowrap; border-radius: 7px 7px 0 0; }
.pg-tabs a:hover { color: var(--ink); background: rgba(0,0,0,.035); }
.pg-tabs a.on { color: var(--ink); }
.pg-tabs a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
main { padding: 26px 36px 60px; max-width: 1240px; }
.tabbar, .side-shade { display: none; }

/* «Обзор»: приветствие, счётчики-ссылки, «требует внимания» */
.hero { position: relative; overflow: hidden; isolation: isolate; background: var(--side); color: #fff; border-radius: var(--radius);
  padding: 24px 28px; margin-bottom: 16px; border-top: 3px solid var(--accent); }
.hero::after { content: ""; position: absolute; z-index: -1; right: -70px; top: -90px; width: 280px; height: 280px;
  background: url("gear.svg") center / contain no-repeat; filter: invert(1); opacity: .08; }
.hero h1 { color: #fff; font-size: 26px; }
.hero p { margin: 6px 0 0; color: var(--side-ink); font-size: 15.5px; max-width: 760px; }
.hero .meta { display: block; margin-top: 12px; color: var(--side-mut); font-size: 12.5px; }
.hero .meta a { color: var(--side-ink); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (min-width: 1360px) { .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); } .st { flex-direction: column; align-items: flex-start; gap: 10px; } }
@media (max-width: 600px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.st { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; text-decoration: none; transition: border-color .15s, transform .15s; }
a.st:hover { border-color: #c4c6ca; transform: translateY(-1px); }
.st .si { flex: none; width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: #eceef0; color: var(--ink); }
.st b { display: block; font-size: 22px; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; }
.st span { color: var(--muted); font-size: 13px; }
.st.hot .si { background: var(--accent); color: #fff; }
.st.attn .si { background: #fff1d6; color: #8a6100; }
.st.ok .si { background: var(--ok-soft); color: var(--ok); }
.todo { display: flex; flex-direction: column; }
.todo a { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid #eef0f2; text-decoration: none; font-size: 14.5px; }
.todo a:last-child { border-bottom: 0; }
.todo a:hover { color: var(--accent); }
.todo a > .ic:last-child { margin-left: auto; color: var(--muted); flex: none; }
.todo .ti { flex: none; color: var(--accent); }
.empty-ok { display: flex; align-items: center; gap: 10px; color: var(--ok); font-weight: 600; padding: 6px 0; }
.card h2 { display: flex; align-items: center; gap: 8px; }
.card h2 .more { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: 280px; height: auto; padding: 16px 12px 12px; transform: translateX(-102%); transition: transform .22s; }
  .side nav { display: block; }
  html.menu-open .side { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  html.menu-open .side-shade { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(20,22,25,.45); }
  .side-t { display: none; }
  .side .foot { position: static; padding: 10px 2px 0; }
  html[data-side="min"] .side .t, html[data-side="min"] .side .nav-group { display: revert; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--side); color: #fff; border-bottom: 3px solid var(--accent); }
  .tb-menu { border: 0; background: transparent; color: #fff; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; }
  .tb-brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
  .tb-brand img { border-radius: 50%; background: #fff; }
  .pgbar { padding: 8px 16px 0; gap: 0; }
  .pg-crumb { width: 100%; padding-bottom: 2px; }
  main { padding: 18px 16px 96px; }
  .tabbar { display: flex; position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar > * { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; border: 0; background: none;
    color: var(--muted); font: inherit; font-size: 11px; font-weight: 700; text-decoration: none; cursor: pointer; }
  .tabbar .on { color: var(--accent); }
  .tabbar .plus { flex: none; width: 52px; height: 44px; margin: 0 6px; justify-content: center; border-radius: 12px; background: var(--accent); color: #fff; }
  .tabbar i { position: absolute; top: 0; left: 50%; margin-left: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--accent);
    color: #fff; font-style: normal; font-size: 10px; display: grid; place-items: center; }
  .hero { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { .side, .side-t, a.st { transition: none; } }

/* =====================================================================================
   2.32 — место используется целиком: без ограничения ширины, формы колонками, плотные списки;
   теги в списках, превью «как в Telegram сейчас», редактор с живым просмотром, сворачиваемые слайды.
   ===================================================================================== */
main { max-width: none; padding: 26px 40px 60px; }
.pgbar { padding-left: 40px; padding-right: 40px; }
.layout > .side-t { position: fixed; z-index: 45; top: 30px; left: calc(var(--side-w) - 13px); width: 26px; height: 26px; padding: 0;
  display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.12); transform: rotate(180deg); transition: background .15s, color .15s, transform .2s; }
.layout > .side-t:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
html[data-side="min"] .layout > .side-t { transform: none; }
html[data-side="min"] .side .brand { flex-direction: row; justify-content: center; }

/* формы: поля в несколько колонок, длинные — на всю ширину */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); column-gap: 18px; }
.fgrid > .wide { grid-column: 1 / -1; }
.settings-grid { grid-template-columns: minmax(0, 1fr) 340px; }
@media (max-width: 900px) { .settings-grid { grid-template-columns: minmax(0, 1fr); } }

/* плотнее строки списка товаров */
.prod-ph { width: 38px; height: 38px; }
.prod-thumb { width: 38px; height: 38px; }

/* теги в списках — как наценка */
.tg-badge { display: inline-block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
  font: inherit; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; border: 1px dashed #c9cbcf; background: transparent;
  color: var(--muted); cursor: pointer; }
.tg-badge:hover { border-color: var(--accent); color: var(--accent); }
.tg-badge.own { border: 0; background: #eceef0; color: var(--ink); }
.tg-badge.inh { border-style: solid; border-color: #e1e2e5; color: #9a9ca1; }
.tg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tg-chip { background: #eceef0; border-radius: 99px; padding: 3px 10px; font-size: 13px; font-weight: 600; }

/* заказы — в две колонки на широком экране */
.ord-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 700px) { .ord-grid { grid-template-columns: minmax(0, 1fr); } }

/* баннеры: слайд сворачивается, в заголовке — его название */
.bn-fold > summary { list-style: none; cursor: pointer; }
.bn-fold > summary::-webkit-details-marker { display: none; }
.bn-chev { display: inline-flex; color: var(--muted); transition: transform .15s; }
.bn-fold[open] .bn-chev { transform: rotate(90deg); }
.bn-sum { color: var(--muted); font-weight: 600; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn-fold:not([open]) > summary { margin-bottom: 0; }
details.bn-card + details.bn-card { margin-top: 12px; }

/* редактор страниц и статей: языки вкладками, справа — как на сайте */
.seg button { padding: 8px 14px; border: 0; background: #fff; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--ink); color: #fff; }
.ed-langs { margin-bottom: 0; }
.ed-title { font-size: 18px; font-weight: 700; }
.ed-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ed-split textarea { min-height: 520px; }
.ed-pv { position: sticky; top: 70px; }
.ed-pv .content-preview { max-height: 600px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; background: #fff; }
@media (max-width: 1100px) { .ed-split { grid-template-columns: minmax(0, 1fr); } .ed-pv { position: static; } }

/* превью сообщения — как в Telegram сейчас: обои, «пузырь» с хвостиком и временем, кнопки-плашки под ним */
.bc-grid { grid-template-columns: minmax(0, 1fr) 380px; }
.tgp-card { padding: 16px; position: sticky; top: 16px; }
.tgp { border-radius: 18px; overflow: hidden; border: 1px solid #d5d7da; font-family: -apple-system, "Segoe UI", Roboto, "Manrope", sans-serif; }
.tgp-head { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: rgba(255,255,255,.96); border-bottom: 1px solid #e3e4e6; }
.tgp-back { color: #3390ec; font-size: 26px; line-height: 1; margin-top: -3px; }
.tgp-ava { width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px #e3e4e6; }
.tgp-who { display: flex; flex-direction: column; line-height: 1.2; }
.tgp-who b { font-size: 15px; } .tgp-who small { color: #8a8d91; font-size: 12.5px; }
.tgp-chat { min-height: 300px; padding: 14px 12px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  background: radial-gradient(circle at 15% 20%, #d6e6b9 0, transparent 45%), radial-gradient(circle at 85% 30%, #a9d3b8 0, transparent 50%),
              radial-gradient(circle at 40% 90%, #c8dfa4 0, transparent 55%), #b9d7b0; }
.tgp-day { align-self: center; background: rgba(0,0,0,.18); color: #fff; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; margin-bottom: 4px; }
.tgp-msg { position: relative; max-width: 88%; background: #fff; border-radius: 16px 16px 16px 4px; padding: 6px 10px 6px; font-size: 14.5px; line-height: 1.38;
  box-shadow: 0 1px 1px rgba(0,0,0,.12); overflow-wrap: anywhere; }
.tgp-msg::before { content: ""; position: absolute; left: -7px; bottom: 0; width: 12px; height: 16px; background: #fff;
  clip-path: path("M12 0 V16 H0 C6 15 10 10 12 0 Z"); }
.tgp-msg img { display: block; width: calc(100% + 20px); margin: -6px -10px 6px; border-radius: 16px 16px 0 0; }
.tgp-msg img[hidden] { display: none; }
.tgp-text { display: inline; } .tgp-text a { color: #3390ec; }
.tgp-ph { color: #9a9ca1; }
.tgp-time { float: right; margin: 6px 0 -4px 10px; font-size: 11.5px; color: #8a8d91; }
.tgp-kb { width: 88%; display: grid; }
.tgp-kb[hidden] { display: none; }
.tgp-kb span { display: block; text-align: center; padding: 9px 10px; border-radius: 10px; background: rgba(40,56,40,.28); color: #fff; font-size: 14px; font-weight: 600;
  backdrop-filter: blur(6px); }
.tgp-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(255,255,255,.96); border-top: 1px solid #e3e4e6; }
.tgp-field { flex: 1; color: #9a9ca1; font-size: 14px; padding: 7px 12px; border-radius: 99px; background: #f1f2f4; }
.tgp-mic { width: 32px; height: 32px; border-radius: 50%; background: #3390ec; }
@media (max-width: 1100px) { .bc-grid { grid-template-columns: minmax(0, 1fr); } .tgp-card { position: static; } }
@media (max-width: 900px) { main { padding: 18px 16px 96px; } .pgbar { padding: 8px 16px 0; } .layout > .side-t { display: none; } }

/* =====================================================================================
   2.33 — оставшиеся разделы: почта, клиенты, бот, команда, настройки, безопасность, разделы
   ===================================================================================== */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.stack > .duo + *, .duo + .card, main > .duo { margin-top: 16px; }
main > section.card + .duo { margin-top: 16px; }
@media (max-width: 1250px) { .duo { grid-template-columns: minmax(0, 1fr); } }

/* полоса состояния (почта) */
.state-strip { display: grid; grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.ss { display: flex; align-items: center; gap: 12px; background: var(--panel); padding: 14px 18px; min-width: 0; }
.ss b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss span { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss > div { min-width: 0; }
.ss > i { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #c4c6ca; box-shadow: 0 0 0 4px #eceef0; }
.ss.ok > i { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.ss.off > i { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ss.ok b { color: var(--ok); } .ss.bad b { color: var(--bad); }
@media (max-width: 1000px) { .state-strip { grid-template-columns: 1fr 1fr; } }

/* пример письма */
.ms-subj { font-size: 13.5px; margin: -4px 0 10px; overflow-wrap: anywhere; }
.ms-frame { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 8px; background: #f3f4f5; }

/* клиенты — карточки сеткой, раскрытая — во всю ширину */
.us-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 10px; align-items: start; }
.us { background: var(--panel); transition: border-color .15s; }
.us:hover { border-color: #c4c6ca; }
.us[open] { grid-column: 1 / -1; border-color: #c4c6ca; }
@media (max-width: 700px) { .us-list { grid-template-columns: minmax(0, 1fr); } }

/* бот: графитовая полоса состояния */
.bot-hero { display: flex; align-items: center; gap: 0; flex-wrap: wrap; background: var(--side); color: #fff; border-radius: var(--radius);
  border-top: 3px solid var(--accent); margin-bottom: 16px; position: relative; overflow: hidden; isolation: isolate; }
.bot-hero::after { content: ""; position: absolute; z-index: -1; right: 140px; top: -80px; width: 240px; height: 240px;
  background: url("gear.svg") center / contain no-repeat; filter: invert(1); opacity: .07; }
.bot-hero > * { padding: 18px 24px; }
.bh-st { display: flex; align-items: center; gap: 14px; flex: 1.4; min-width: 240px; }
.bh-st b { display: block; font-size: 20px; } .bh-st span { color: var(--side-ink); font-size: 13px; }
.bh-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(229,35,27,.25); }
.bot-hero.on .bh-dot { background: #3ccf7a; box-shadow: 0 0 0 5px rgba(60,207,122,.22); }
.bh-n { flex: 1; min-width: 150px; border-left: 1px solid #55575c; }
.bh-n b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; } .bh-n span { color: var(--side-mut); font-size: 12.5px; }
.bh-go { margin-left: auto; }

/* журнал действий — читаемые строки */
.seg-a { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.seg-a a { padding: 6px 12px; text-decoration: none; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg-a a span { font-weight: 600; opacity: .7; margin-left: 2px; }
.seg-a a.on { background: var(--ink); color: #fff; }
.jr { margin-top: 12px; border-top: 1px solid var(--line); }
.jr-row { display: grid; grid-template-columns: 130px 210px minmax(0, 1fr) 190px; gap: 14px; align-items: baseline; padding: 9px 4px;
  border-bottom: 1px solid #eef0f2; font-size: 14px; }
.jr-t { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.jr-a { font-weight: 700; }
.jr-a.in { color: var(--ok); } .jr-a.bad { color: var(--bad); }
.jr-d { color: var(--ink); overflow-wrap: anywhere; }
.jr-w { color: var(--muted); font-size: 13px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) { .jr-row { grid-template-columns: 1fr; gap: 2px; } .jr-w { text-align: left; } }

/* настройки: превью бота до «Старт», как в Telegram */
.tgp-start { min-height: 280px; justify-content: center; align-items: center; }
.tgp-about { max-width: 92%; background: rgba(255,255,255,.92); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; line-height: 1.42;
  white-space: pre-line; text-align: left; box-shadow: 0 1px 1px rgba(0,0,0,.1); }
.tgp-about b { display: block; text-align: center; margin-bottom: 6px; font-size: 14px; }
.tgp-startbtn { justify-content: center; color: #3390ec; font-weight: 700; font-size: 14px; letter-spacing: .4px; padding: 12px; }
.settings-side.stack > .card + .card { margin-top: 16px; }

/* разделы: на широком экране колонке «Внутри» больше места */
@media (min-width: 1500px) {
  .ed-grid { grid-template-columns: 300px minmax(0, 1fr) 320px; }
  .ed-grid .lrow, .ed-grid:not(.no-phone) .lrow, .ed-grid .ed-lhead.lrow-grid, .ed-grid:not(.no-phone) .ed-lhead.lrow-grid {
    grid-template-columns: 22px 22px 26px minmax(0, 1.3fr) minmax(0, 1fr) 80px 34px; }
}

/* превью бота в «Разделах» — как Telegram сейчас (как в рассылке): обои, «пузырь» с хвостиком, кнопки-плашки */
.phone { border-radius: 26px; border: 8px solid #2a2c30; box-shadow: 0 14px 34px rgba(0,0,0,.16);
  background: radial-gradient(circle at 15% 20%, #d6e6b9 0, transparent 45%), radial-gradient(circle at 85% 30%, #a9d3b8 0, transparent 50%),
              radial-gradient(circle at 40% 90%, #c8dfa4 0, transparent 55%), #b9d7b0; }
.phone-top { background: rgba(255,255,255,.96); border-bottom: 1px solid #e3e4e6; font-family: -apple-system, "Segoe UI", Roboto, "Manrope", sans-serif; }
.phone-top img { box-shadow: 0 0 0 1px #e3e4e6; background: #fff; }
.phone-chat { font-family: -apple-system, "Segoe UI", Roboto, "Manrope", sans-serif; }
.pmsg { position: relative; border-radius: 16px 16px 16px 4px; box-shadow: 0 1px 1px rgba(0,0,0,.12); margin-left: 6px; }
.pmsg::before { content: ""; position: absolute; left: -7px; bottom: 0; width: 12px; height: 16px; background: #fff; clip-path: path("M12 0 V16 H0 C6 15 10 10 12 0 Z"); }
.pkb { margin-left: 6px; }
.pb { background: rgba(40,56,40,.28); border-radius: 10px; padding: 8px 8px; backdrop-filter: blur(6px); }
.pb[data-id]:hover { background: rgba(40,56,40,.45); }
.stats.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats.stats-4 .st { flex-direction: row; align-items: center; }
@media (max-width: 1000px) { .stats.stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 2.33.1 — кнопка сворачивания меню снова в шапке меню (без «кружочка» на краю) */
.side .side-t { width: 30px; height: 30px; border-radius: 8px; transform: none; color: var(--side-mut); background: transparent; border: 1px solid #55575c; }
.side .side-t:hover { background: var(--side-2); color: #fff; border-color: #6a6c71; }
html[data-side="min"] .side .brand { flex-direction: column; gap: 10px; }

/* =====================================================================================
   2.34 — верхняя строка с общим поиском, «Обзор» как в SaaS-панели (KPI с графиками, последние заказы,
   что ищут, заказы по дням). Спокойно: графит + один красный, без градиентов.
   ===================================================================================== */
.tbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 10px 40px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.tb-find { position: relative; flex: 1; max-width: 720px; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px;
  background: #f3f4f5; border: 1px solid transparent; border-radius: 10px; color: var(--muted); transition: border-color .15s, background .15s; }
.tb-find:focus-within { background: #fff; border-color: var(--ink); color: var(--ink); }
.tb-find input { flex: 1; border: 0 !important; background: transparent !important; outline: 0 !important; padding: 0 !important; font-size: 14.5px; color: var(--ink); }
.tb-find kbd { font: 600 11.5px/1 var(--mono); color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
.tb-find:focus-within kbd { display: none; }
.tb-drop { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 50px rgba(20,22,25,.16); padding: 8px; max-height: 70vh; overflow: auto; color: var(--ink); }
.tb-drop[hidden] { display: none; }
.td-h { font-size: 12px; font-weight: 700; color: var(--muted); padding: 8px 10px 4px; }
.td-i { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; text-decoration: none; font-size: 14px; }
.td-i:hover, .td-i.on { background: #f3f4f5; }
.td-i .td-s { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.td-i .mono { color: var(--muted); min-width: 58px; }
.td-all { display: block; text-align: center; padding: 9px; margin-top: 4px; border-top: 1px solid var(--line); font-weight: 700; font-size: 13.5px; text-decoration: none; color: var(--accent); }
.td-none { padding: 14px 10px; color: var(--muted); font-size: 14px; }
.tb-acts { display: flex; gap: 8px; margin-left: auto; }
.tb-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; text-decoration: none; font-weight: 700; font-size: 13.5px; color: var(--ink); white-space: nowrap; }
.tb-chip:hover { border-color: #b9bbbf; }
.tb-chip.hot { background: var(--accent); border-color: var(--accent); color: #fff; }
.pgbar { top: 63px; background: rgba(243,244,245,.94); }
@media (max-width: 900px) { .tbar { padding: 8px 12px; top: 0; } .tb-acts, .tb-find kbd { display: none; } .pgbar { top: 59px; } }

/* «Обзор» */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-head h1 { font-size: 28px; }
.dh-meta { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dh-meta .pill { text-decoration: none; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { position: relative; display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 0;
  text-decoration: none; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.kpi:hover { border-color: #b9bbbf; box-shadow: 0 6px 18px rgba(20,22,25,.06); }
.kpi-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; font-weight: 700; }
.kpi > b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi > b small { font-size: 15px; color: var(--muted); font-weight: 700; }
.kpi-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.kpi .spark { display: block; width: calc(100% + 36px); height: 44px; margin: 8px -18px 0; color: #6b6e74; }
.kpi.hot .kpi-top .ic, .kpi.hot > b { color: var(--accent); }
.kpi.hot .spark { color: var(--accent); }
.kpi.attn .spark { color: #b8860b; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(320px, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
@media (max-width: 1200px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
.tbl-orders td { vertical-align: middle; }
.tbl-orders tr.o-cancelled td { opacity: .55; }
.tbl-orders a { text-decoration: none; }
.bars { display: flex; flex-direction: column; gap: 4px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) 90px 32px; gap: 10px; align-items: center; padding: 5px 4px; border-radius: 7px; text-decoration: none; font-size: 14px; }
.bar:hover { background: #f3f4f5; }
.bar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-t { height: 8px; border-radius: 99px; background: #eceef0; overflow: hidden; }
.bar-t i { display: block; height: 100%; border-radius: 99px; background: #6b6e74; }
.bar.miss .bar-t i { background: var(--accent); }
.bar.miss .bar-l::after { content: " · не нашли"; color: var(--accent); font-size: 12px; font-weight: 700; }
.bar-n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.dash-days { margin-bottom: 16px; }
.days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; align-items: end; height: 170px; padding-top: 8px; }
.day { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; font-size: 11.5px; color: var(--muted); }
.day i { display: block; width: 100%; max-width: 46px; border-radius: 6px 6px 2px 2px; background: #c9cbcf; transition: background .15s; }
.day:hover i { background: var(--accent); }
.day:last-child i { background: var(--ink); }
.dv { font-weight: 700; color: var(--ink); font-size: 12px; min-height: 14px; }
.find-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .find-grid { grid-template-columns: minmax(0, 1fr); } }


/* =====================================================================================
   2.34.1 — исправления после полной проверки: липкие панели страниц не уезжают под верхнюю строку,
   меню помещается по высоте («Выйти» — в верхней строке), вкладки «Разделов» не перекрываются.
   ===================================================================================== */
body { --top: 64px; }
body.has-tabs { --top: 115px; }
.ed-toolbar { top: var(--top); z-index: 15; }
.ed-tree, .ed-phone { top: calc(var(--top) + 130px); }
.st-selbar { top: calc(var(--top) + 8px); }
.st-panel, .th-side, .settings-side, .tgp-card { top: calc(var(--top) + 16px); }
.ed-pv { top: calc(var(--top) + 16px); }
.uc-dir { top: calc(var(--top) + 16px); height: calc(100vh - var(--top) - 32px); }
.side nav a { padding-top: 6px; padding-bottom: 6px; }
.side .nav-group { padding-top: 10px; padding-bottom: 3px; }
.side nav { padding-bottom: 8px; }
.tb-chip.ico { width: 36px; padding: 0; justify-content: center; }
@media (max-width: 900px) { body, body.has-tabs { --top: 0px; } }
@media (max-width: 900px) { .tbar .tb-acts { display: flex; } .tb-acts .tb-chip:not(.ico) { display: none; } }
body.has-tabs { --top: 116px; }
@media (min-width: 901px) and (max-height: 860px) {
  .side { padding-top: 12px; padding-bottom: 8px; }
  .side .brand { padding-bottom: 8px; }
  .side-cta { padding: 8px 12px; margin-bottom: 6px; }
  .side nav a { padding-top: 5px; padding-bottom: 5px; font-size: 13.5px; }
  .side .nav-group { padding: 7px 12px 2px; font-size: 11.5px; }
}
@media (min-width: 901px) and (max-height: 860px) {
  .side nav a { padding-top: 4px; padding-bottom: 4px; }
  .side .nav-group { padding: 6px 12px 1px; }
}
@media (min-width: 901px) and (max-height: 720px) { .side .nav-group { display: none; } .side .nav-gap { display: none; } }

/* =====================================================================================
   2.35 — теги наследуются как наценка (серые ↳ от раздела/группы); заказы — вид «Таблица»
   ===================================================================================== */
.tg-badge { max-width: 200px; }
.tg-badge .tg-inh-ic { margin-right: 3px; opacity: .7; font-weight: 600; }
.tg-badge .tg-plus { margin-left: 6px; padding-left: 6px; border-left: 1px solid #c9cbcf; color: #9a9ca1; font-weight: 600; }
.tg-badge.inh { font-weight: 600; background: #f6f6f7; }
.mk-sec .mk-sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }

/* заказы: панель фильтров, сворачиваемые получатели */
.ord-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.ord-bar .seg a .n, .ord-view a .n { color: var(--muted); font-weight: 500; margin-left: 2px; }
.ord-bar .seg a.on .n { color: rgba(255,255,255,.75); }
.seg a { display: inline-flex; align-items: center; gap: 6px; }
.seg a + a { border-left: 1px solid var(--line); }
.seg a:not(.on):hover { background: #f4f4f5; }
details.rcp > summary { list-style: none; cursor: pointer; }
details.rcp > summary::-webkit-details-marker { display: none; }
details.rcp .rcp-more .ic { transition: transform .2s; }
details.rcp[open] .rcp-more .ic { transform: rotate(180deg); }

/* заказы: вид «Таблица» — строго, одна строка на заказ */
.ord-tw { padding: 0; overflow: visible; }
.ord-tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.ord-tbl thead th { position: sticky; top: var(--top); z-index: 2; background: #f7f7f8; text-align: left; font-size: 11.5px;
  font-weight: 700; letter-spacing: .04em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ord-tbl thead th:first-child { border-top-left-radius: inherit; }
.ord-tbl thead th:last-child { border-top-right-radius: inherit; }
.ord-tbl td { padding: 9px 12px; border-bottom: 1px solid #eef0f2; vertical-align: middle; }
.ord-tbl .num { text-align: right; }
.ord-main { cursor: pointer; }
.ord-main:hover > td { background: #fafafa; }
.ord-main.open > td { background: #f6f6f7; border-bottom-color: transparent; }
tbody.st-new .ord-main > td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
tbody.st-cancelled .ord-main > td { color: #9a9ca1; }
tbody.st-cancelled .ord-main .c-sum { text-decoration: line-through; }
.ord-tbl .c-no { width: 64px; white-space: nowrap; }
.ord-tbl .c-dt { width: 1%; white-space: nowrap; color: var(--muted); }
.ord-tbl .c-ph { width: 1%; white-space: nowrap; }
.ord-tbl .c-who { min-width: 160px; }
.ord-tbl .c-who a { font-weight: 600; text-decoration: none; }
.ord-tbl .c-who .muted { font-size: 12.5px; margin-left: 4px; }
.ord-tbl .c-np { color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-tbl .c-it { max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ord-tbl .it-n { display: inline-block; min-width: 22px; padding: 0 6px; margin-right: 8px; border-radius: 6px; background: #eceef0;
  font-size: 12px; font-weight: 700; text-align: center; }
.ord-tbl .it-first { color: #55575c; }
.ord-tbl .it-flag { margin-left: 6px; color: var(--muted); vertical-align: -2px; }
.ord-tbl .it-flag.bad { color: var(--bad); }
.ord-tbl .c-sum { width: 1%; white-space: nowrap; font-weight: 700; }
.ord-tbl .c-st { width: 1%; white-space: nowrap; }
.ord-tbl .c-act { width: 1%; white-space: nowrap; text-align: right; }
.ord-tbl .c-act form { display: inline; }
.ib { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); cursor: pointer; vertical-align: middle; }
.ib:hover { color: var(--ink); border-color: #c9cbcf; }
.ib.ok { background: var(--ink); border-color: var(--ink); color: #fff; }
.ib.ok:hover { background: var(--accent); border-color: var(--accent); }
.ib.bad:hover { color: var(--bad); border-color: var(--bad); }
.ord-chev { display: inline-flex; width: 22px; justify-content: center; color: #b4b6ba; vertical-align: middle; }
.ord-chev .ic { transition: transform .2s; }
.ord-main.open .ord-chev .ic { transform: rotate(180deg); }
.ord-det > td { background: #f6f6f7; padding: 4px 16px 16px 76px; }
.od-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); gap: 20px; align-items: start; }
.od-items { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.od-items td { padding: 7px 12px; border-bottom: 1px solid #eef0f2; }
.od-items tr:last-child td { border-bottom: 0; }
.od-meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 4px 0 0; font-size: 13.5px; }
.od-meta dt { color: var(--muted); }
.od-meta dd { margin: 0; }
.ord-tbl tfoot td { padding: 11px 12px; border-bottom: 0; }
@media (max-width: 900px) {
  .ord-tbl .c-dt, .ord-tbl .c-ph, .ord-tbl .c-it { display: none; }
  .ord-det > td { padding-left: 12px; }
  .od-grid { grid-template-columns: minmax(0, 1fr); }
}
.ord-tbl .c-it { width: 100%; max-width: 0; }          /* «Товары» забирает остаток ширины и обрезается многоточием */
.ord-tbl .c-who { white-space: nowrap; min-width: 0; }
@media (max-width: 1500px) { .ord-tbl .c-who .muted { display: none; } }
@media (max-width: 600px) {
  .ord-view, .ord-bar .seg { display: flex; width: 100%; }
  .ord-view a, .ord-bar .seg a { flex: 1 1 auto; justify-content: center; padding: 8px 8px; font-size: 13px; }
  .ord-bar .seg { flex-wrap: wrap; }
  .ord-tbl td, .ord-tbl thead th { padding-left: 8px; padding-right: 8px; }
  .ord-tbl .c-st, .ord-tbl .ord-chev { display: none; }
  .ord-tbl .c-no { width: 44px; }
  .ord-tbl .c-who { white-space: normal; }
  .ord-tbl .c-act .ib { width: 34px; height: 34px; }
}
.ord-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* 2.36 — теги по-русски и по-украински */
.tg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tg-two label { position: relative; display: block; }
.tg-two .tg-lang { position: absolute; top: 8px; right: 10px; font-size: 11px; font-weight: 800; color: #9a9ca1; letter-spacing: .04em; pointer-events: none; }
.tg-two input, .tg-two textarea { width: 100%; padding-right: 38px; }
.tg-chip.uk { background: #e8eefc; color: #2f55c4; }
@media (max-width: 700px) { .tg-two { grid-template-columns: 1fr; } }
.rte-help { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; color: #55575c; }
.rte-help li { margin: 0 0 7px; }
.de .rte { margin-top: 10px; }
.card:has(.rte) { overflow: visible; }                 /* панель редактора прилипает при прокрутке (sticky не работает внутри overflow:auto) */

/* 2.36.1 — теги «ячейками» (tagin.js) */
.tgi { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 42px; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; cursor: text; position: relative; }
.tgi:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tgi.full { border-color: var(--bad); }
.tgi-lang { font-size: 11px; font-weight: 800; color: #9a9ca1; letter-spacing: .04em; margin-right: 2px; }
.tgi-list { display: contents; }
.tgi-chip { display: inline-flex; align-items: center; max-width: 100%; background: #eceef0; border-radius: 7px; font-size: 13.5px;
  font-weight: 600; line-height: 1; color: var(--ink); transition: background .15s, box-shadow .15s; }
.tgi-chip:hover { background: #e2e4e7; }
.tgi-chip.armed { background: var(--bad-soft); box-shadow: inset 0 0 0 1px var(--bad); }
.tgi-chip.dup { animation: tgi-dup .7s; }
@keyframes tgi-dup { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 2px var(--accent); } }
.tgi-t { padding: 6px 4px 6px 10px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tgi-x { border: 0; background: none; color: #8a8c91; font-size: 16px; line-height: 1; padding: 4px 8px 4px 4px; cursor: pointer; border-radius: 0 7px 7px 0; }
.tgi-x:hover { color: var(--bad); }
.tgi-edit { height: 28px; padding: 0 8px !important; border: 1px solid var(--accent) !important; border-radius: 7px !important; font-size: 13.5px !important; width: auto !important; }
input.tgi-in { flex: 1 1 120px; min-width: 120px; width: auto !important; border: 0 !important; outline: none !important; box-shadow: none !important;
  padding: 4px 2px !important; background: transparent !important; font-size: 14px; }
.tg-two .tgi { min-width: 0; }
td .tgi { min-height: 38px; padding: 4px 6px; }

/* 2.37 — нейросеть Gemini */
.ai-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 10px; }
.ai-row input#aiHint { flex: 1 1 260px; min-width: 200px; width: auto; height: 34px; padding: 6px 10px; font-size: 13.5px; }
.ai-msg { border-radius: 8px; padding: 10px 12px; font-size: 13.5px; margin: 0 0 10px; background: #f4f5f6; }
.ai-msg.ok { background: var(--ok-soft); }
.ai-msg.err { background: var(--bad-soft); color: var(--bad); }
.ai-msg.busy { background: #f4f5f6; color: var(--ink); }
.ai-msg.warn-t { background: var(--accent-soft); }
.ai-src { margin-top: 6px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.ai-src a { color: inherit; }
.ai-spin { display: inline-block; width: 13px; height: 13px; border: 2px solid #c9cbcf; border-top-color: var(--accent); border-radius: 50%;
  vertical-align: -2px; animation: ai-spin .8s linear infinite; margin-right: 4px; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-card { margin-top: 16px; }
.ai-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.ai-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; }
.ai-bulk { border-left: 1px solid var(--line); padding-left: 22px; }
.ai-bar { height: 8px; border-radius: 99px; background: #eceef0; overflow: hidden; margin-bottom: 6px; }
.ai-bar span { display: block; height: 100%; background: var(--accent); transition: width .5s; }
.ai-text { font-size: 14px; }
.ai-text h3 { font-size: 15px; margin: 10px 0 4px; }
.ai-text table { font-size: 13px; }
@media (max-width: 900px) { .ai-grid { grid-template-columns: minmax(0, 1fr); } .ai-bulk { border-left: 0; padding-left: 0; } }

/* 2.37 — Google и SEO */
.seo-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.seo-checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.seo-checks .muted { font-size: 12.5px; overflow-wrap: anywhere; }
.seo-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.seo-checks li.ok .seo-dot { background: var(--ok-soft); color: var(--ok); }
.seo-checks li.no .seo-dot { background: #eceef0; color: #9a9ca1; }
.seo-links { width: 100%; font-size: 14px; }
.seo-links td { padding: 8px 6px; border-bottom: 1px solid #eef0f2; vertical-align: top; }
.seo-links td:last-child { text-align: right; }
.seo-links .muted { font-size: 12px; }
.seo-links code { font-size: 12.5px; overflow-wrap: anywhere; user-select: all; }

/* 2.38 «Прибыль» */
.pf-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 14px; margin-bottom: 16px; }
.pf-periods { display: flex; flex-wrap: wrap; gap: 4px; }
.pf-periods a { padding: 7px 12px; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 13.5px; color: var(--muted); }
.pf-periods a:hover { background: #eef0f2; color: var(--ink); }
.pf-periods a.on { background: var(--ink); color: #fff; }
.pf-custom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-custom label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.pf-custom input[type=date] { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13.5px; }
.pf-kpis .kpi { padding-bottom: 16px; cursor: default; }
.pf-kpis .kpi:hover { box-shadow: none; border-color: var(--line); }
.pf-d { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }
.pf-d.up { color: var(--ok); } .pf-d.down { color: var(--bad); }
.pf-d .ic { vertical-align: -2px; }
.attn-note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; margin-bottom: 16px; border-radius: 10px;
  background: #fff8e1; border: 1px solid #f0e2b0; color: #6b5a1e; font-size: 13.5px; line-height: 1.45; }
.attn-note .ic { margin-top: 2px; color: #b8860b; }
.pf-legend { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.pf-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-left: 8px; }
.lg-rev { background: #d9dbde; } .lg-pro { background: var(--accent); }
.pf-chart { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; height: 220px; align-items: end; padding-top: 8px; }
.pf-col { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.pf-bars { position: relative; flex: 1; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--line); }
.pf-bars span { position: absolute; bottom: 0; left: 12%; right: 12%; border-radius: 3px 3px 0 0; }
.b-rev { background: #d9dbde; }
.b-pro { background: var(--accent); left: 30% !important; right: 30% !important; }
.pf-col:hover .b-rev { background: #c3c6ca; }
.pf-lab { height: 20px; font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; overflow: visible; padding-top: 4px; }
.pf-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin: 16px 0; align-items: start; }
.pf-grid > .stack > * + * { margin-top: 16px; }
@media (max-width: 1100px) { .pf-grid { grid-template-columns: minmax(0, 1fr); } }
.pf-tbl td { vertical-align: top; }
.pf-hist tr.on td { background: var(--accent-soft); }
.pf-hbar { display: block; height: 8px; border-radius: 4px; background: var(--accent); opacity: .75; min-width: 2px; margin-top: 6px; }
.more-link { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 13.5px; }
section.card + section.card { margin-top: 16px; }
/* 2.38 «Скачать прайс» */
.pl-form { max-width: 900px; }
.pl-form .fgrid { margin-bottom: 16px; }
.pl-form .f-l { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.pl-seg label { display: inline-flex; cursor: pointer; }
.pl-seg input { position: absolute; opacity: 0; pointer-events: none; }
.pl-seg span { padding: 8px 14px; font-weight: 700; font-size: 14px; color: var(--muted); }
.pl-seg input:checked + span { background: var(--ink); color: #fff; }
.pl-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.pl-int { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.pl-int input { margin-top: 3px; }
/* 2.38: ТТН / юрлицо / счёт в заказе */
.ox { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; padding: 10px 12px; background: #f7f8f9; border: 1px solid var(--line); border-radius: 10px; }
.ord-det .ox { margin: 12px 0 0; }
.ox-kind { align-self: flex-start; }
.ox-ttn { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ox-l, .ox-co summary { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; }
.ox-ttn input[type=text] { width: 190px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-family: var(--mono); font-size: 13.5px; }
.ox-n { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.ox-track { font-size: 13px; font-weight: 700; }
.ox-co summary { cursor: pointer; list-style: none; flex-wrap: wrap; }
.ox-co summary::-webkit-details-marker { display: none; }
.ox-co summary .ox-inv, .ox-co summary .ox-noinv { margin-left: auto; }
.ox-noinv { font-size: 12.5px; font-weight: 600; }
.ox-coform { display: grid; grid-template-columns: 1.4fr .8fr 1.4fr auto; gap: 8px; margin-top: 8px; }
.ox-coform input { padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13.5px; min-width: 0; }
@media (max-width: 900px) { .ox-coform { grid-template-columns: 1fr; } }
/* 2.38 воронка */
.fn { display: flex; flex-direction: column; gap: 10px; }
.fn-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) 200px; gap: 14px; align-items: center; }
.fn-name { display: flex; flex-direction: column; } .fn-name span { font-size: 12px; }
.fn-bar { height: 26px; background: #f0f1f3; border-radius: 6px; overflow: hidden; }
.fn-bar span { display: block; height: 100%; background: var(--accent); opacity: .85; border-radius: 6px; }
.fn-n { display: flex; flex-direction: column; text-align: right; } .fn-n b { font-size: 18px; } .fn-n span { font-size: 12px; }
@media (max-width: 900px) { .fn-row { grid-template-columns: 1fr; gap: 4px; } .fn-n { text-align: left; } }
.card h2 .seg-a { font-size: 13px; }

/* 2.38 вход с кодом */
.sec-duo { align-items: start; }
.rec-codes { display: grid; grid-template-columns: repeat(4, auto); gap: 6px 12px; margin-top: 8px; justify-content: start; }
.rec-codes code { font-size: 15px; padding: 3px 8px; background: #fff; border-radius: 6px; border: 1px solid #efdfa8; }
.totp-steps { padding-left: 20px; font-size: 14px; } .totp-steps li { margin-bottom: 8px; }
.totp-key { display: inline-block; margin: 6px 0 4px; padding: 8px 12px; background: #f3f4f5; border-radius: 8px; font-size: 17px; letter-spacing: 1px; user-select: all; }
