:root {
  --accent: #2f5bea;
  --text: #1b1f27;
  --muted: #6b7280;
  --bg: #f3f5f8;
  --line: #e2e6ec;
  --danger: #d32f2f;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif, "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol";
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--accent); }
h1 { font-size: 26px; margin: 0 0 16px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--danger); font-weight: 500; }
.nowrap { white-space: nowrap; }
.clip { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pre { white-space: pre-wrap; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.linklike { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; }

.layout { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side { background: #161a22; color: #c9ced8; padding: 12px 12px 10px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.side__brand { color: #fff; font-weight: 700; font-size: 17px; text-decoration: none; padding: 0 10px; }
.side__nav { display: grid; gap: 0; }
.side__nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #c9ced8; text-decoration: none; padding: 5px 10px; border-radius: 7px; font-size: 14px; line-height: 1.3; }
.side__nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side__nav a.on { background: var(--accent); color: #fff; }
.side__nav a small { font-size: 11px; opacity: .55; margin-left: auto; white-space: nowrap; }
.side__nav a .badge { margin-left: auto; }
.side__grp { display: block; }
.side__links { display: grid; gap: 1px; padding-bottom: 2px; }
.side__grp + .side__grp { margin-top: 3px; padding-top: 5px; border-top: 1px solid rgba(255,255,255,.07); }
.side__grp > summary { list-style: none; cursor: pointer; padding: 2px 10px 3px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #7d8594; display: flex; align-items: center; gap: 6px; }
.side__grp > summary::-webkit-details-marker { display: none; }
.side__grp > summary::after { content: '▸'; margin-left: auto; transition: transform .15s; }
.side__grp[open] > summary::after { transform: rotate(90deg); }
.side__grp > summary:hover { color: #c9ced8; }
.side__site-name { text-transform: none; letter-spacing: 0; font-weight: 600; color: #aeb5c2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.side__foot { margin-top: auto; display: grid; gap: 4px; padding: 8px 10px 0; border-top: 1px solid rgba(255,255,255,.07); font-size: 13px; }
.side__foot a { color: #c9ced8; }
.side__foot a:hover { color: #fff; }
.side__user { display: flex; align-items: center; gap: 10px; color: #7d8594; }
.side__user b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #aeb5c2; }
.side__user form { margin: 0; }
.side__user a, .side__user .linklike { color: #aeb5c2; text-decoration: none; }
.side__user a:hover, .side__user .linklike:hover { color: #fff; text-decoration: underline; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 12px; text-align: center; }
.main { padding: 28px clamp(16px, 3vw, 40px) 80px; width: 100%; min-width: 0; }

.box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin: 0 0 16px; }
fieldset.box { min-width: 0; }
legend { font-weight: 700; font-size: 17px; padding: 0 6px; }
.note { background: #fff8e1; border: 1px solid #ffe08a; border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row h1 { margin: 0; }
.spacer { flex: 1; }

.field { display: grid; gap: 4px; margin-bottom: 14px; }
.field > label { font-weight: 600; font-size: 14px; }
input[type=text], input[type=number], input[type=password], input:not([type]), textarea, select {
  width: 100%; padding: 9px 11px; border: 1px solid #cfd5de; border-radius: 8px; font: inherit; background: #fff; color: var(--text);
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(47,91,234,.3); border-color: var(--accent); }
input[type=color] { width: 70px; height: 40px; padding: 2px; border: 1px solid #cfd5de; border-radius: 8px; }
.inline { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
.preview { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.preview img { max-height: 80px; max-width: 200px; border-radius: 6px; border: 1px solid var(--line); }

.btn { display: inline-flex; align-items: center; padding: 10px 20px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent); color: #fff; font: 600 15px var(--font); cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn--small { padding: 6px 12px; font-size: 13px; }
.btn--ghost { background: #fff; color: var(--accent); }
.btn--danger { background: #fff; color: var(--danger); border-color: #f1b4b4; }
.btn--danger:hover { background: var(--danger); color: #fff; }
.sticky-save { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 40%); }

.item__grid { display: grid; grid-template-columns: 2fr 1.3fr 110px; gap: 12px; }
.item--new { border-style: dashed; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: 13px; color: var(--muted); font-weight: 600; }
.table tr[data-href] { cursor: pointer; }
.table tr[data-href]:hover td { background: #f8f9fb; }
.st { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.st--new { background: #fee2e2; color: #b91c1c; }
.st--work { background: #fef3c7; color: #92400e; }
.st--done { background: #dcfce7; color: #166534; }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #e0e7ff; color: #3730a3; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--text); font-size: 14px; }
.tabs a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* вкладки связанных разделов (один пункт в меню слева — несколько страниц): подчёркиванием, чтобы не путать с кнопками-фильтрами */
.sectabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.sectabs a { padding: 8px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.sectabs a:hover { color: var(--text); }
.sectabs a.on { color: var(--text); border-bottom-color: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { display: grid; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-decoration: none; color: var(--text); }
.stat b { font-size: 30px; }
.stat span { color: var(--muted); }
.checklist li { margin-bottom: 6px; }
.dl { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.narrow-box { max-width: 460px; }
.doc table { border-collapse: collapse; width: 100%; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px; vertical-align: top; }

.flash { position: fixed; top: 16px; right: 16px; z-index: 10; background: #166534; color: #fff; padding: 10px 18px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.15); transition: opacity .4s; }

/* Окно входа закреплено по центру видимой области: не зависит от высоты страницы, поэтому при загрузке не сдвигается */
.login-page { display: block; margin: 0; padding: 0; min-height: 0; overflow: hidden; }
.login { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(380px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto; margin: 0; display: grid; gap: 12px; }
.login h1 { font-size: 22px; margin: 0; }
.login label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .side__nav { display: block; }
  .side__links { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .item__grid { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; }
  .table { display: block; overflow-x: auto; }
}

/* ===== Новостная часть ===== */
.side__new { justify-content: center; margin: 0; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cols > * { min-width: 0; }   /* широкая таблица в блоке не распирает страницу на телефоне: она прокручивается внутри блока */
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.mt { margin-top: 14px; }
.w-auto { width: auto; flex: 1; min-width: 200px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input[type=search] { flex: 1; min-width: 200px; padding: 8px 11px; border: 1px solid #cfd5de; border-radius: 8px; font: inherit; }
.filters select { width: auto; }
.thumb { width: 72px; }
.thumb img { width: 64px; height: 36px; object-fit: cover; border-radius: 4px; }
.st--published { background: #dcfce7; color: #166534; }
.st--scheduled { background: #e0e7ff; color: #3730a3; }
.st--draft { background: #f1f5f9; color: #475569; }
.input-big { font-size: 20px !important; font-weight: 600; }

.article-form { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.article-form__side { position: sticky; top: 16px; }
.cover-preview { width: 100%; border-radius: 8px; margin-bottom: 6px; }
.danger-zone { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 8px; }

@media (max-width: 1000px) {
  .article-form, .cols { grid-template-columns: 1fr; }
  .article-form__side { position: static; }
}

/* ===== Установка ===== */
.setup { width: min(460px, 100%); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 14px; }
.checks .ok { color: #166534; }
.checks .bad { color: var(--danger); }

/* ===================== Список материалов ===================== */
.tabs a b { margin-left: 4px; font-weight: 700; opacity: .6; }
.art-list { display: grid; gap: 8px; }
.art-item { display: grid; grid-template-columns: 24px 128px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.art-item:hover { border-color: #c8cfda; }
.art-item__img { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #eef0f4; color: var(--muted); font-size: 12px; text-decoration: none; }
.art-item__img img { width: 100%; height: 100%; object-fit: cover; }
.art-item__title { font-weight: 700; font-size: 16px; color: var(--text); text-decoration: none; }
.art-item__title:hover { color: var(--accent); }
.art-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.art-item__actions { display: flex; gap: 6px; }
.empty { text-align: center; padding: 40px; }

/* ===================== Рубрики ===================== */
.cats { display: grid; gap: 6px; }
.cat-row { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 70px 52px 62px 52px auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cat-row--head { font-size: 12px; color: var(--muted); font-weight: 600; border-bottom: 0; padding-bottom: 0; }
.cat-row.is-child > input[name="title"] { margin-left: 24px; width: calc(100% - 24px); }
.cat-row__actions { display: flex; gap: 4px; }
.cat-row__desc { grid-column: 1 / -1; font-size: 13px !important; padding: 6px 10px !important; }

@media (max-width: 1100px) {
  .cat-row { grid-template-columns: 1fr 1fr; }
  .cat-row--head { display: none; }
}
@media (max-width: 700px) {
  .art-item { grid-template-columns: 24px 90px 1fr; }
  .art-item__actions { grid-column: 1 / -1; }
}

/* ===== Несколько сайтов ===== */
.side__site { display: grid; gap: 3px; margin: 0; padding: 7px 10px 8px; border-radius: 10px; background: rgba(255,255,255,.07); }
.side__site label { font-size: 12px; color: #9aa3b2; }
.side__site select { width: 100%; padding: 8px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; background: #0f1218; color: #fff; font: inherit; font-weight: 600; }
.inline-form { display: inline; margin: 0; }

/* ===== Реклама ===== */
.adwire { display: grid; gap: 6px; max-width: 420px; padding: 12px; border: 1px solid #cfd5de; border-radius: 10px; background: #fff; font-size: 12px; }
.adwire div { padding: 6px 8px; border-radius: 6px; background: #f1f3f6; color: #475569; }
.adwire .ad-z { background: #fff3d6; color: #8a5a00; font-weight: 700; }
.adwire .cols2 { display: grid; grid-template-columns: 2fr 1fr; gap: 6px; padding: 0; background: none; }
.ad-code { font: 13px/1.45 ui-monospace, Consolas, monospace; min-height: 120px; }
.ad-off { opacity: .65; }

/* ===== Статистика и копии ===== */
.chart { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 8px; font-size: 14px; }
.chart-legend i, .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tabs--inline { margin: 0; }

/* ===== Медиатека, голосования ===== */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.media-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.media-card__img { display: block; aspect-ratio: 16 / 10; background: #eef0f3; }
.media-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-card__body { display: grid; gap: 6px; padding: 12px; }
.media-card__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-card__use { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: #166534; }
.media-card__use--free { color: #b45309; font-weight: 600; }
.poll-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr) 90px; gap: 12px; align-items: center; margin-top: 8px; }
.poll-row__bar { height: 10px; border-radius: 999px; background: #eceef1; overflow: hidden; }
.poll-row__bar i { display: block; height: 100%; background: var(--accent); }

/* ===== Рубрики ===== */
.cat-help dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 24px; margin: 10px 0 0; }
.cat-help dt { font-weight: 700; }
.cat-help dd { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.cat-card { display: grid; gap: 12px; }
.cat-card.is-child { margin-left: 28px; border-left: 4px solid var(--accent); }
.cat-card__top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 14px; }
.cat-card .field { margin: 0; }
.cat-card__bottom { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; padding-top: 12px; border-top: 1px solid var(--line); }
.cat-order { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.cat-order input { width: 76px; }
.cat-count { font-size: 14px; }
.slugbox { display: flex; align-items: center; border: 1px solid #cfd5de; border-radius: 8px; background: #fff; overflow: hidden; }
.slugbox span { padding: 0 2px 0 11px; color: var(--muted); }
.slugbox input { border: 0; border-radius: 0; outline: none; padding-left: 2px; }
.sw { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14px; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw i { position: relative; flex: 0 0 40px; width: 40px; height: 22px; border-radius: 999px; background: #d1d5db; transition: background .15s; }
.sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.sw input:checked + i { background: var(--accent); }
.sw input:checked + i::after { transform: translateX(18px); }
.sw input:focus-visible + i { outline: 2px solid rgba(47, 91, 234, .5); outline-offset: 2px; }
@media (max-width: 800px) { .cat-card__top { grid-template-columns: 1fr; } .cat-card.is-child { margin-left: 10px; } }

/* ===== Статистика ===== */
.stat .delta { font-size: 13px; margin-top: 2px; }
.delta { font-weight: 700; color: var(--muted); white-space: nowrap; }
.delta--up { color: #16a34a; }
.delta--down { color: #dc2626; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 18px; }
.bars__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; }
.bars__col i { display: block; width: 100%; max-width: 44px; background: var(--accent); border-radius: 6px 6px 0 0; min-height: 2px; }
.bars__col em { font-style: normal; font-size: 12px; color: var(--muted); }
.bars__v { font-size: 11px; color: var(--muted); }
.hbars { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: minmax(80px, 1fr) 2fr auto; align-items: center; gap: 10px; font-size: 14px; }
.hbars div { height: 10px; background: #eef1f5; border-radius: 99px; overflow: hidden; }
.hbars div i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.vbar { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.vbar i { display: block; height: 8px; background: var(--accent); border-radius: 99px; flex: none; max-width: 120px; }
.col-views { width: 220px; }

/* ===== Настройки ===== */
.settings__layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings__nav { position: sticky; top: 16px; display: grid; gap: 2px; }
.settings__nav a { padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; border-left: 3px solid transparent; }
.settings__nav a:hover { background: #e9edf3; }
.settings__nav a.on { background: #fff; border-left-color: var(--accent); color: var(--accent); }
.settings__body fieldset { scroll-margin-top: 16px; }
.settings__lead { margin: 0 0 14px; }
.settings__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.settings__grid .field--wide { grid-column: 1 / -1; }
.settings__grid input[type=text], .settings__grid select { width: 100%; }
.settings__grid textarea { width: 100%; }
.colorbox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.colorbox code { background: #eef1f5; padding: 3px 8px; border-radius: 6px; }
.colorbox__demo { padding: 8px 16px; border-radius: 8px; color: #fff; font-weight: 600; background: var(--accent); }
.numbox { display: flex; align-items: center; gap: 8px; }
.numbox input { width: 110px; }
.filebox { display: grid; gap: 8px; }
.preview img { background: repeating-conic-gradient(#e5e7eb 0 25%, #fff 0 50%) 50% / 16px 16px; padding: 4px; }
.preview--favicon img { max-height: 48px; max-width: 48px; }
.count { color: var(--muted); }
.count--bad { color: var(--danger); font-weight: 600; }
.sticky-save { display: flex; align-items: center; gap: 12px; }
.dirty { color: #b45309; font-weight: 600; font-size: 14px; }
@media (max-width: 900px) {
  .settings__layout { grid-template-columns: 1fr; }
  .settings__nav { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .settings__nav a { border: 1px solid var(--line); background: #fff; }
  .settings__grid { grid-template-columns: 1fr; }
}

/* Выбор макета сайта */
.layout-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.layout-pick__item { position: relative; display: grid; gap: 4px; padding: 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; align-content: start; }
.layout-pick__item:hover { border-color: #b8c2d6; }
.layout-pick__item.is-on, .layout-pick__item:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 91, 234, .15); }
.layout-pick__item input { position: absolute; opacity: 0; pointer-events: none; }
.layout-pick__item svg { width: 100%; height: auto; color: #334155; background: #f1f5f9; border-radius: 8px; margin-bottom: 6px; }
.layout-pick__item b { font-size: 15px; }
.layout-pick__item span { font-size: 13px; color: var(--muted); line-height: 1.35; }

/* Выбор сайта с поиском */
.sitepick__btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 9px 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; background: rgba(255,255,255,.06); color: #fff; font: inherit; cursor: pointer; text-align: left; }
.sitepick__btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sitepick__panel { margin-top: 6px; padding: 8px; border-radius: 10px; background: #0f1218; border: 1px solid rgba(255,255,255,.12); }
.sitepick__panel input { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: #1b2029; color: #fff; font: inherit; }
.sitepick__panel ul { list-style: none; margin: 8px 0 0; padding: 0; max-height: 280px; overflow-y: auto; display: grid; gap: 2px; }
.sitepick__panel li[hidden] { display: none; }
.sitepick__panel li button { display: grid; width: 100%; padding: 7px 9px; border: 0; border-radius: 6px; background: none; color: #c9ced8; text-align: left; font: inherit; cursor: pointer; }
.sitepick__panel li button:hover { background: rgba(255,255,255,.08); color: #fff; }
.sitepick__panel li button.on { background: var(--accent); color: #fff; }
.sitepick__panel small { opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sitepick__empty { margin: 8px 4px 2px; font-size: 13px; color: #9aa3b2; }

/* Выбор сайта: название целиком, группы, подсказка Ctrl+K */
.sitepick__kbd { float: right; margin-left: 6px; padding: 1px 6px; border: 1px solid rgba(255,255,255,.25); border-radius: 5px; font: 11px/1.4 var(--font); color: #9aa3b2; }
.sitepick__btn { align-items: flex-start; }
.sitepick__cur { display: grid; gap: 1px; min-width: 0; }
.sitepick__cur b { white-space: normal; overflow-wrap: anywhere; font-weight: 600; line-height: 1.25; }
.sitepick__cur small { opacity: .65; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sitepick__btn i { margin-top: 2px; font-style: normal; }
.sitepick__list { max-height: 340px; overflow-y: auto; margin-top: 8px; }
.sitepick__group[hidden] { display: none; }
.sitepick__gl { margin: 8px 4px 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8b95a7; }
.sitepick__list ul { margin: 0; max-height: none; overflow: visible; }
.sitepick__panel li.is-cur button { background: rgba(255,255,255,.12); color: #fff; }
.sitepick__panel li button b { white-space: normal; overflow-wrap: anywhere; }

/* ---- Выбор сайта: панель поверх меню, темы раскрываются ---- */
.side__site { position: relative; }
.sitepick__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: #9aa3b2; }
.sitepick__top .sitepick__kbd { float: none; margin: 0; }
.sitepick__panel { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; margin-top: 0; box-shadow: 0 14px 40px rgba(0, 0, 0, .55); }
.sitepick__panel input[type=search] { width: 100%; }
.sitepick__list { max-height: min(60vh, 420px); }
.sitepick__group + .sitepick__group { margin-top: 2px; }
.sitepick__gh { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: rgba(255,255,255,.05); color: #e5e9f0; font: 700 13px var(--font); text-align: left; cursor: pointer; }
.sitepick__gh:hover { background: rgba(255,255,255,.1); }
.sitepick__gname { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sitepick__gcount { padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 11px; font-weight: 600; color: #c9ced8; }
.sitepick__gh i { font-style: normal; transition: transform .15s; color: #9aa3b2; }
.sitepick__group.is-open > .sitepick__gh i { transform: rotate(90deg); }
.sitepick__group:not(.is-open):not(.is-flat) > ul { display: none; }
.sitepick__panel.is-searching .sitepick__group > ul { display: block; }
.sitepick__group > ul { padding-left: 6px; margin-top: 2px; }
.sitepick__panel.is-searching .sitepick__gh i { display: none; }
.sitepick__group.is-flat > ul { padding-left: 0; }

/* ---- Медиатека ---- */
.mediabar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 16px; margin: 0 0 16px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.mediabar label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.mediabar select { min-width: 230px; }
.viewsw { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.viewsw a { padding: 8px 14px; font-size: 14px; text-decoration: none; color: var(--text); background: #fff; }
.viewsw a + a { border-left: 1px solid var(--line); }
.viewsw a.on { background: var(--accent); color: #fff; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #e8f0fe; color: #1d4ed8; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip--free { background: #fef3c7; color: #b45309; }
.chip--admin { background: #fde8e8; color: #b91c1c; }
.chip--me { background: #dcfce7; color: #166534; }
a.chip { text-decoration: none; margin: 2px 2px 2px 0; }
.usage-bar { display: block; height: 10px; min-width: 2px; border-radius: 5px; background: var(--accent, #2563eb); }
.logtbl .inline-form .linklike { color: var(--accent, #2563eb); }
.media-card__use { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.mediatable { padding: 6px 14px; overflow-x: auto; }
.mediatable .table td { vertical-align: middle; }
.mediatable__img img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; display: block; background: #eef0f3; }

/* ---- Пользователи ---- */
.ucards { display: grid; gap: 14px; }
.ucard { display: grid; gap: 14px; margin: 0; }
.ucard--new { border-style: dashed; margin-top: 18px; }
.ucard__head { display: flex; align-items: center; gap: 12px; }
.ucard__ava { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 18px; flex: none; }
.ucard__who { display: grid; gap: 1px; min-width: 0; margin-right: auto; }
.ucard__who b { font-size: 17px; overflow-wrap: anywhere; }
.ucard__grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 12px 16px; }
.ucard__grid .field { margin: 0; }
.ucard__grid .field--wide { grid-column: 1 / -1; }
.ucard--new .ucard__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 240px; }
.ucard--new .ucard__grid .field:nth-child(4) { grid-column: 1 / 3; }
.ucard__grid select { width: 100%; }
.ucard__foot { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 800px) {
  .ucard__grid, .ucard--new .ucard__grid { grid-template-columns: 1fr; }
  .ucard--new .ucard__grid .field:nth-child(4) { grid-column: auto; }
  .mediabar select { min-width: 0; width: 100%; }
}

/* Подпись выбора сайта и подсказка Ctrl K */
.sitepick__top span { white-space: nowrap; }
.sitepick__top .sitepick__kbd { white-space: nowrap; flex: none; }

/* Уведомления */
.nform { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.nform .field { margin: 0; }
.nform__wide { grid-column: 1 / -1; }
.nform select, .nform input { width: 100%; }
.notice-demo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.notice-demo__item { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.notice-demo__item small { color: var(--muted); }
.notice-demo__item span { display: block; height: 54px; border-radius: 8px; background: #e5e7eb; position: relative; }
.notice-demo__bar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; border-radius: 8px 8px 0 0; background: var(--accent); }
.notice-demo__corner::before { content: ""; position: absolute; right: 8px; bottom: 8px; width: 46%; height: 20px; border-radius: 6px; background: var(--accent); }
.notice-demo__center::before { content: ""; position: absolute; left: 25%; right: 25%; top: 10px; bottom: 10px; border-radius: 8px; background: var(--accent); }
@media (max-width: 800px) { .nform, .notice-demo { grid-template-columns: 1fr; } }

/* ===== Корзина, массовые действия ===== */
.st--trash { background: #fee2e2; color: #991b1b; }
.art-item__sel { display: grid; place-items: center; cursor: pointer; }
.art-item__sel input { width: 18px; height: 18px; }
.art-item__actions form { margin: 0; }
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; position: sticky; top: 0; z-index: 5; }
.bulkbar select { max-width: 240px; }
.bulkbar__all { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.bulkbar__n { font-size: 13px; }
.art-item.is-sel { border-color: var(--accent); background: #fff7f7; }

/* ===== Версии статьи ===== */
.vers { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.vers th, .vers td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.vers th { font-size: 12px; color: var(--muted); font-weight: 600; background: #f7f8fa; }
.vers td:last-child { text-align: right; white-space: nowrap; }
.vers form { display: inline; margin: 0; }
.verbody { max-height: 70vh; overflow: auto; }

/* ===== Журнал действий ===== */
.logtbl { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.logtbl th, .logtbl td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.logtbl th { font-size: 12px; color: var(--muted); font-weight: 600; background: #f7f8fa; }
.logtbl .muted { font-size: 12px; }
.logtbl tr.is-warn td:nth-child(3) { color: var(--danger); font-weight: 600; }

/* ===== Выбор сайтов у редактора ===== */
.sitesel { margin-top: 8px; }
.sitesel__list { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; display: grid; gap: 4px; background: #fff; margin-top: 6px; }
.sitesel__list label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.sitesel__list label[hidden] { display: none; }

/* ===== Выбор стиля оформления ===== */
.style-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.style-pick__item { position: relative; display: grid; gap: 4px; padding: 10px; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; align-content: start; }
.style-pick__item:hover { border-color: #b8c2d6; }
.style-pick__item.is-on, .style-pick__item:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 91, 234, .15); }
.style-pick__item input { position: absolute; opacity: 0; pointer-events: none; }
.style-pick__item b { font-size: 15px; }
.style-pick__demo { display: flex; height: 46px; border-radius: 8px; overflow: hidden; margin-bottom: 4px; border: 1px solid var(--line); }
.style-pick__demo .half { flex: 1; display: flex; gap: 4px; padding: 7px; }
.style-pick__demo i { flex: 1; border-radius: 4px; }
.style-pick__demo i:last-child { flex: .45; }

/* ===== Настройки: новая страница ===== */
.sethead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.sethead h1 { margin: 0 0 4px; }
.sethead p { margin: 0; }
.setlay { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.setnav { position: sticky; top: 16px; display: grid; gap: 4px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.setnav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.setnav a:hover { background: #f1f4f8; }
.setnav a.on { background: var(--accent); color: #fff; }
.setnav__ico { width: 22px; text-align: center; }
.setmain { display: grid; gap: 18px; }
/* Разделы по одному: виден только открытый, его шапка не сворачивается */
.settings.is-one .setcard:not(.is-open) { display: none; }
.settings.is-one .setcard__head { cursor: default; }
.settings.is-one .setcard__chev { display: none; }
.setcard { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px 8px; scroll-margin-top: 16px; }
.setcard__head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.setcard__head h2 { margin: 0; font-size: 19px; }
.setcard__head p { margin: 2px 0 0; font-size: 14px; }
.setcard__ico { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #eef2ff; font-size: 20px; }
.setcard .settings__grid { gap: 0 24px; }
.setcard small.muted { font-size: 13px; line-height: 1.4; }
.sticky-save { position: sticky; bottom: 0; margin-top: 16px; padding: 12px 16px; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 -6px 24px rgba(15, 23, 42, .06); }

@media (max-width: 900px) {
  .setlay { grid-template-columns: 1fr; }
  .setnav { position: static; display: flex; flex-wrap: wrap; }
  .setcard { padding: 18px 16px 4px; }
}

/* ===== Обзор: панель выбора, график ===== */
.ovbar { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin: 0 0 16px; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.ovbar__group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ovbar__label { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ovbar select { width: auto; min-width: 200px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips > a, .rangebox > summary { display: inline-block; padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); text-decoration: none; font-size: 14px; cursor: pointer; list-style: none; }
.chips > a:hover, .rangebox > summary:hover { border-color: #b8c2d6; }
.chips > a.on, .rangebox.on > summary { background: var(--accent); border-color: var(--accent); color: #fff; }
.rangebox { position: relative; }
.rangebox > summary::-webkit-details-marker { display: none; }
.rangebox__pop { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; display: flex; align-items: flex-end; gap: 10px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(15, 23, 42, .18); white-space: nowrap; }
.rangebox__pop label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.rangebox__pop input[type=date] { width: auto; }
.attn { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 0 0 16px; }
.attn a { padding: 6px 12px; border-radius: 999px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; text-decoration: none; font-size: 14px; }
.attn a b { font-size: 15px; }
.chartbox { position: relative; }
.chartbox .chart { display: block; width: 100%; height: auto; touch-action: pan-y; }
.charttip { position: absolute; z-index: 5; min-width: 200px; max-width: 320px; padding: 10px 12px; border-radius: 10px; background: #0f172a; color: #fff; font-size: 13px; line-height: 1.45; box-shadow: 0 10px 30px rgba(15, 23, 42, .35); pointer-events: none; }
.charttip[hidden] { display: none; }
.charttip > b { display: block; margin-bottom: 4px; font-size: 13px; }
.charttip__row { display: flex; align-items: center; gap: 8px; }
.charttip__row i { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.charttip__row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #cbd5e1; }
.charttip__total { margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(255, 255, 255, .15); }
.charttip__total span { color: #fff; font-weight: 600; }
.charttip__prev { margin-top: 4px; color: #94a3b8; font-size: 12px; }
.charttip__art { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .15); }
.charttip__art span { display: block; color: #cbd5e1; font-size: 12px; }
.legend__item { display: inline-flex; align-items: center; gap: 6px; margin: 0 14px 6px 0; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; cursor: pointer; }
.legend__item i { width: 10px; height: 10px; border-radius: 50%; }
.legend__item.is-off { opacity: .4; text-decoration: line-through; }
.launch > summary { cursor: pointer; }
.table-wrap { overflow-x: auto; }
@media (max-width: 700px) { .ovbar { padding: 10px 12px; } .rangebox__pop { flex-wrap: wrap; white-space: normal; } }

/* ===== Уведомления: карточки ===== */
.ncard { margin: 0 0 18px; padding: 18px 20px 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.ncard.is-off { background: #fafbfc; }
.ncard.is-off .npreview { opacity: .55; }
.ncard__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ncard__title { font-size: 17px; }
.ncard__foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 6px; }
.ncard__del { color: #b91c1c; }
.nsplit { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 16px; }
.npreview { --nc: #2563eb; display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--nc); color: #fff; font-size: 14px; }
.npreview.notice--success { --nc: #16a34a; }
.npreview.notice--warning { --nc: #d97706; }
.npreview.notice--promo { --nc: var(--accent); }
.npreview__text { flex: 1; min-width: 0; }
.npreview__text.is-ph { opacity: .75; }
.npreview__icon { font-size: 20px; }
.npreview__icon[hidden], .npreview__btn[hidden], .npreview__x[hidden] { display: none; }
.npreview__btn { padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .24); font-weight: 700; white-space: nowrap; }
.npreview__x { font-size: 20px; line-height: 1; opacity: .9; }
.ntypes { display: flex; flex-wrap: wrap; gap: 8px; }
.ntype { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600; background: #fff; }
.ntype input { position: absolute; opacity: 0; pointer-events: none; }
.ntype i { width: 12px; height: 12px; border-radius: 50%; background: #2563eb; }
.ntype--success i { background: #16a34a; }
.ntype--warning i { background: #d97706; }
.ntype--promo i { background: var(--accent); }
.ntype:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 91, 234, .12); }
.nplaces { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.nplace { position: relative; display: grid; gap: 6px; padding: 8px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; font-size: 13px; font-weight: 600; text-align: center; }
.nplace input { position: absolute; opacity: 0; pointer-events: none; }
.nplace svg { width: 100%; height: auto; color: #94a3b8; }
.nplace .frame { fill: #f8fafc; stroke: #cbd5e1; }
.nplace rect.on { fill: var(--accent); }
.nplace:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 91, 234, .12); }

/* ===== Сайты ===== */
.srv { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; font-size: 14px; line-height: 1.5; }
.srv code { background: #dbeafe; padding: 2px 7px; border-radius: 6px; font-size: 13px; }
.srv__ip { font-weight: 700; }
.sitebar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 0 0 14px; }
.sitebar input[type=search] { flex: 1 1 280px; max-width: 460px; }
.slist { display: grid; gap: 10px; margin-bottom: 22px; }
.srow { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.srow[hidden] { display: none; }
.srow.is-cur { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(229, 72, 77, .08); }
.srow > summary { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; }
.srow > summary::-webkit-details-marker { display: none; }
.srow__ava { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; font-weight: 800; font-size: 17px; }
.srow__main { display: grid; min-width: 0; flex: 1 1 200px; }
.srow__main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow__stats { flex: none; white-space: nowrap; }
.srow__go { flex: none; display: flex; gap: 6px; align-items: center; }
.srow__chev { flex: none; width: 8px; height: 8px; border-right: 2px solid #94a3b8; border-bottom: 2px solid #94a3b8; transform: rotate(45deg); transition: transform .15s; margin: 0 4px 3px; }
.srow[open] > summary .srow__chev { transform: rotate(-135deg); margin-bottom: -3px; }
.srow__body { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.srow__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; padding-top: 14px; }
.domstat { font-size: 13px; line-height: 1.4; color: var(--muted); }
.domstat--ok { color: #15803d; font-weight: 600; }
.domstat--warn { color: #b45309; }
.domstat--bad { color: #b91c1c; font-weight: 600; }
.nsite { display: grid; gap: 6px; }
.nsite__step { display: flex; align-items: center; gap: 10px; margin: 10px 0 8px; font-weight: 700; font-size: 15px; }
.nsite__step span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; }
.imp { margin-top: 18px; }
.imp > summary { cursor: pointer; }
@media (max-width: 760px) { .srow__stats { display: none; } .srow > summary { flex-wrap: wrap; } }

/* Заглушка сайта: строки «подпись — поле», как в настройках форума */
.mtrow { display: grid; grid-template-columns: 260px 1fr; border-bottom: 1px solid var(--line, #e5e7eb); }
.mtrow__label { padding: 18px 20px; background: rgba(127, 127, 127, .06); font-weight: 600; text-align: right; }
.mtrow__ctl { padding: 18px 20px; }
.mtrow__ctl textarea, .mtrow__ctl input[type=text], .mtrow__ctl input:not([type]) { width: 100%; box-sizing: border-box; }
.mtrow__ctl .muted { margin: 8px 0 0; }
.mtfoot { display: flex; gap: 10px; padding: 14px 20px; background: rgba(47, 91, 234, .07); }
@media (max-width: 720px) { .mtrow { grid-template-columns: 1fr; } .mtrow__label { text-align: left; padding-bottom: 6px; } }

/* Рубрики: компактный список — одна строка на рубрику, редактирование раскрывается */
.cat-quick { display: grid; grid-template-columns: 1.6fr 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; margin-bottom: 12px; }
.cat-quick input, .cat-quick select { margin: 0; }
.cat-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; flex-wrap: wrap; }
.cat-bar input { max-width: 340px; margin: 0; }
.cat-list { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.crow { border-bottom: 1px solid var(--line); }
.crow:last-of-type { border-bottom: 0; }
.crow[hidden] { display: none; }
.crow > summary { display: flex; align-items: center; gap: 12px; padding: 9px 14px; cursor: pointer; list-style: none; min-height: 24px; }
.crow > summary::-webkit-details-marker { display: none; }
.crow > summary:hover { background: rgba(127, 127, 127, .07); }
.crow[open] > summary { background: rgba(47, 91, 234, .06); }
.crow__title { flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow.is-child .crow__title { padding-left: 22px; }
.crow__arrow { color: var(--muted); margin-right: 6px; }
.crow__slug { flex: 0 1 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow__chips { flex: none; display: flex; gap: 6px; min-width: 130px; }
.crow__n { flex: none; min-width: 78px; text-align: right; white-space: nowrap; }
.crow[open] > summary .srow__chev { transform: rotate(-135deg); margin-bottom: -3px; }
.crow__body { display: grid; gap: 12px; padding: 14px 16px 16px; border-top: 1px solid var(--line); background: rgba(127, 127, 127, .04); }
.crow__body .field { margin: 0; }
.cat-extra > summary { cursor: pointer; }
.cat-help__dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 24px; margin: 12px 0 0; }
.cat-help__dl dt { font-weight: 700; }
.cat-help__dl dd { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
@media (max-width: 800px) {
  .cat-quick { grid-template-columns: 1fr; }
  .crow__slug, .crow__chips { display: none; }
  .crow.is-child .crow__title { padding-left: 12px; }
}

/* Медиатека: плитки плотнее, панель компактнее */
.media-grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; }
.media-card__body { gap: 4px; padding: 8px 10px 10px; }
.media-card__img { aspect-ratio: 4 / 3; }
.media-card .row { gap: 6px; flex-wrap: wrap; }
.media-card .btn--small { padding: 5px 9px; font-size: 12.5px; }
.mediabar { padding: 8px 12px; margin-bottom: 12px; }
.mediatable .table td, .mediatable .table th { padding-top: 6px; padding-bottom: 6px; }
.mediatable__img img { width: 64px; height: 44px; }
.flash-info { margin: 6px 0 10px; padding: 8px 12px; border-radius: 10px; background: #e8f5ec; color: #166534; }

/* Настройки сайта: плотнее, разделы сворачиваются, есть поиск */
.setbar { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; flex-wrap: wrap; }
.setbar input { flex: 1 1 260px; max-width: 460px; margin: 0; }
.setmain { gap: 10px; }
.setcard { padding: 0; border-radius: 14px; }
.setcard[hidden], .setcard .field[hidden] { display: none; }
.setcard__head { margin: 0; padding: 12px 16px; gap: 12px; cursor: pointer; user-select: none; }
.setcard__head:hover { background: rgba(127, 127, 127, .06); border-radius: 14px; }
.setcard__head h2 { font-size: 17px; }
.setcard__head p { font-size: 13px; }
.setcard__ico { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; }
.setcard__chev { margin-left: auto; }
.setcard.is-collapsed .setcard__chev { transform: rotate(-45deg); margin-bottom: 3px; }
.setcard:not(.is-collapsed) .setcard__chev { transform: rotate(45deg); }
.setcard__body { padding: 4px 16px 10px; border-top: 1px solid var(--line); }
.setcard.is-collapsed .setcard__body { display: none; }
.setcard .note { margin: 10px 0 4px; padding: 8px 12px; font-size: 13.5px; }
.setcard .settings__grid { gap: 0 20px; padding-top: 8px; }
.setcard .settings__grid .field { margin-bottom: 10px; }
.setcard .field label { font-size: 13.5px; margin-bottom: 3px; }
.setcard small.muted { font-size: 12.5px; line-height: 1.35; }
.setcard input[type=text], .setcard select, .setcard input[type=number] { padding-top: 7px; padding-bottom: 7px; }
.setnav { padding: 6px; gap: 2px; }
.setnav a { padding: 7px 10px; }
.setnav a[hidden] { display: none; }
.setlay { gap: 18px; }
.sethead { margin-bottom: 10px; }

/* Копии на сервере: отметка галочками и удаление пачкой */
.bkbar { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; flex-wrap: wrap; }
.bkbar__all { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.bktable td, .bktable th { padding-top: 7px; padding-bottom: 7px; }
.bktable input[type=checkbox], .bkbar input[type=checkbox] { width: 18px; height: 18px; }

/* Сайты: форма добавления сверху, крупный поиск */
.nsite-top { padding: 14px 16px; margin-bottom: 14px; }
.nsite-top__head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.nsite-top__row { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr auto; gap: 12px; align-items: end; }
.nsite-top__row .field { margin: 0; }
.nsite-top__row input, .nsite-top__row select { width: 100%; box-sizing: border-box; }
.nsite-top .domstat { display: block; margin-top: 6px; }
.nsite-top__more { margin-top: 8px; }
.nsite-top__more > summary { cursor: pointer; }
.srv-note { margin: 0 0 12px; }
.srv-note > summary { cursor: pointer; }
.srv-note p { margin: 8px 0 0; }
.sitebar { margin-bottom: 12px; }
.sitebar input[type=search].sitebar__search { flex: 1 1 360px; max-width: none; min-width: 260px; font-size: 16px; padding: 12px 16px; border-radius: 12px; }
@media (max-width: 860px) { .nsite-top__row { grid-template-columns: 1fr 1fr; } .nsite-top__go { grid-column: 1 / -1; } }
@media (max-width: 520px) { .nsite-top__row { grid-template-columns: 1fr; } }

.cron-cmd { display: inline-block; padding: 6px 10px; background: rgba(127,127,127,.12); border-radius: 8px; word-break: break-all; }

/* Выбор сайта: закреплённые, недавние, звёздочки */
.sitepick__panel li { position: relative; }
.sitepick__panel li button { padding-right: 34px; }
.sitepick__star { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 16px; line-height: 1; color: #6b7686; cursor: pointer; opacity: 0; transition: opacity .12s; padding: 2px 4px; }
.sitepick__panel li:hover .sitepick__star, .sitepick__star.is-on, .sitepick__panel li.is-cur .sitepick__star { opacity: 1; }
.sitepick__star.is-on { color: #f5b301; }
.sitepick__star:hover { color: #f5b301; }
.sitepick__quick { margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.sitepick__quick[hidden] { display: none; }
.sitepick__quick-sec ul { margin: 0; }
.sitepick__more { margin: 8px 4px 2px; font-size: 12.5px; color: #9aa3b2; }
.sitepick__more[hidden] { display: none; }

/* Источники (RSS) и очередь */
.feed-add { display: grid; grid-template-columns: 2fr 1fr auto; gap: 10px; align-items: center; margin: 10px 0 12px; }
.feed-add input { margin: 0; width: 100%; box-sizing: border-box; }
.feed-sources { display: grid; gap: 6px; }
.feed-source { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(127,127,127,.04); }
.feed-source__main { display: grid; flex: 1 1 260px; min-width: 0; }
.feed-source__main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-note { margin: 2px 0 6px; font-size: 13px; color: #b45309; }
.feed-write { display: grid; gap: 10px; }
.feed-write__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.feed-write__row .field { margin: 0; }
.feed-write__checks { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; }
.feed-done { border-color: #86c79a; }
.feed-checks { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; }
.feed-checks li { padding: 6px 10px 6px 30px; border-radius: 8px; position: relative; background: rgba(127,127,127,.06); }
.feed-checks li::before { position: absolute; left: 10px; top: 6px; font-weight: 800; }
.feed-checks li.is-ok::before { content: "✓"; color: #16a34a; }
.feed-checks li.is-bad::before { content: "✕"; color: #dc2626; }
.feed-checks li.is-warn::before { content: "!"; color: #d97706; }
@media (max-width: 760px) { .feed-add, .feed-write__row { grid-template-columns: 1fr; } }

/* Светофор результата */
.feed-light { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; margin: 6px 0 12px; }
.feed-light__dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.feed-light--green { background: rgba(22, 163, 74, .12); } .feed-light--green .feed-light__dot { background: #16a34a; }
.feed-light--yellow { background: rgba(217, 119, 6, .13); } .feed-light--yellow .feed-light__dot { background: #d97706; }
.feed-light--red { background: rgba(220, 38, 38, .12); } .feed-light--red .feed-light__dot { background: #dc2626; }
.feed-cover { max-width: 320px; border-radius: 10px; display: block; }

/* Авторы */
.author-ava { flex: none; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: var(--accent); display: grid; place-items: center; }
.author-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-ava i { font-style: normal; font-weight: 800; color: #fff; font-size: 15px; }
.checks { display: grid; gap: 10px; margin-top: 4px; }
.cat-alpha { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.cat-alpha__t { font-size: 14px; font-weight: 600; color: var(--muted, #666); margin-right: 4px; }
.cat-alpha__f { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.catcrumbs { margin: 2px 0 8px; font-size: 14px; }
.cat-list-admin { display: grid; gap: 8px; }
.cat-admin-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.cat-admin-row__t { font-size: 16px; }
.cat-admin-gal { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.cat-admin-gal label { display: grid; gap: 2px; font-size: 12px; }
.cat-admin-gal img { height: 60px; border-radius: 6px; }
.media-where { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #f3f6ff; font-size: 13px; line-height: 1.5; }
.media-where ul { margin: 0; padding-left: 18px; }
.media-where a { color: #1d4ed8; text-decoration: underline; }
.st--spam { background: #e5e7eb; color: #4b5563; }

/* ---------- Поля настроек: не растягиваются по высоте соседа, выпадающие списки компактные ---------- */
.field { align-content: start; }
.setcard select, .settings__grid select { width: auto; min-width: min(260px, 100%); max-width: 100%; }
.setcard .field > select, .settings__grid .field > select { justify-self: start; }

/* ---------- Строки поиска в админке ---------- */
.main input[type=search], .setbar input[type=search] {
  height: 42px; padding: 0 14px 0 40px; border: 1px solid #cfd5de; border-radius: 10px; font: inherit; color: var(--text);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238a93a3' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px 50%;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}
.main input[type=search]:focus, .setbar input[type=search]:focus { border-color: var(--accent); outline: 3px solid rgba(47, 91, 234, .15); }
.setbar { gap: 12px; }
.setbar input[type=search] { flex: 1 1 320px; max-width: 640px; }
.cat-bar input[type=search] { flex: 1 1 320px; max-width: 560px; width: auto; }
.cat-bar { gap: 14px; margin-bottom: 14px; }

/* ---------- Единый вид полей: адрес, почта, дата, время, файл; списки компактные ---------- */
input[type=url], input[type=email], input[type=tel], input[type=date], input[type=time], input[type=datetime-local] {
  width: 100%; padding: 9px 11px; border: 1px solid #cfd5de; border-radius: 8px; font: inherit; background: #fff; color: var(--text);
}
input[type=date], input[type=time], input[type=datetime-local] { width: auto; min-width: 170px; }
input[type=url]:focus, input[type=email]:focus, input[type=tel]:focus, input[type=date]:focus, input[type=time]:focus, input[type=datetime-local]:focus { outline: 2px solid rgba(47,91,234,.3); border-color: var(--accent); }
input[type=file] { width: 100%; padding: 8px; border: 1px dashed #cfd5de; border-radius: 8px; background: #fafbfc; font: inherit; color: var(--text); }
input[type=file]::file-selector-button { margin-right: 12px; padding: 7px 14px; border: 1px solid #cfd5de; border-radius: 8px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
input[type=file]::file-selector-button:hover { border-color: var(--accent); color: var(--accent); }
select { width: auto; min-width: 200px; max-width: 100%; }
.domstat:empty { display: none; }

/* Реклама: поля блока в одну строку */
.item__grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.item__grid select, .item__grid input { width: 100%; }
@media (max-width: 1100px) { .item__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .item__grid { grid-template-columns: 1fr; } }

/* Лента RSS: форма добавления */
.feed-add { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; }

/* Импорт сайта */
.imp form { display: grid; gap: 4px; }
.imp .settings__grid { margin-top: 10px; }
.imp .settings__grid .field { margin-bottom: 8px; }
.imp .btn { justify-self: start; margin-top: 6px; }

/* Пользователи: компактный список, правка раскрывается */
.ucards { gap: 8px; }
.ucard { gap: 0; padding: 12px 16px; margin-bottom: 0; }
.ucard__ava { width: 36px; height: 36px; font-size: 15px; }
.ucard__who b { font-size: 15px; }
.ucard__edit > summary { cursor: pointer; list-style: none; display: inline-block; margin-top: 8px; padding: 4px 12px; border: 1px solid #cfd5de; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.ucard__edit > summary::-webkit-details-marker { display: none; }
.ucard__edit > summary:hover { border-color: var(--accent); color: var(--accent); }
.ucard__edit[open] > summary { margin-bottom: 12px; }
.ucard__edit .ucard__grid { margin-bottom: 8px; }

/* ===== Здоровье сайтов ===== */
.hstat { border-top: 3px solid #16a34a; padding: 14px 16px; }
.hstat--1 { border-top-color: #d97706; }
.hstat--2 { border-top-color: var(--danger); }
.hstat b { font-size: 22px; line-height: 1.3; }
.hstat--2 b { color: var(--danger); }
.health-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.health-bar .tabs { margin-bottom: 0; }
.health-bar select { width: auto; min-width: 180px; }
.health th, .health td { font-size: 13px; line-height: 1.35; }
.health th { min-width: 56px; }
.health__site { min-width: 150px; overflow-wrap: anywhere; }
.health__open { margin: 3px 0 0; }
.health__queue { min-width: 100px; }
.health__state { min-width: 190px; }
.health__issue { margin-top: 5px; line-height: 1.35; overflow-wrap: anywhere; }
.health__issue--1 { color: #92400e; }
.health__issue--2 { color: #b91c1c; font-weight: 600; }

/* ===== Рубрики и меню ===== */
.rprev { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 10px 14px; margin: 0 0 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.rprev__label { color: var(--muted); font-size: 13px; }
.rprev__item { font-weight: 600; }
.rprev__item small { color: var(--muted); font-weight: 400; }
.rprev__item--extra { font-weight: 400; color: var(--muted); }
.rprev__g { display: contents; }
.rtools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.rtools input[type=search] { max-width: 280px; margin: 0; }
.rchips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.rchips button { padding: 5px 12px; border: 1px solid var(--line); background: #fff; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13px; color: var(--text); }
.rchips button b { margin-left: 4px; font-weight: 600; color: var(--muted); }
.rchips button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.rchips button.on b { color: #fff; opacity: .85; }
/* сообщения «сохранено» — всплывают внизу экрана, где бы ни шла работа (дерево вверху, документы внизу) */
.rstatus { position: fixed; right: 16px; bottom: 16px; z-index: 80; max-width: min(420px, calc(100% - 32px)); padding: 9px 16px; border-radius: 8px; background: #166534; color: #fff; font-size: 14px; box-shadow: 0 8px 24px rgba(15, 23, 42, .25); }
.rstatus:empty { display: none; }
.rstatus.is-bad { background: var(--danger); }
.rnew { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 12px 14px; margin: 0 0 10px; }
.rnew input, .rnew select { margin: 0; }
.rnew-list { margin: 0 0 10px; }
.rnew-list:not([open]) { display: none; }
.rbulk { position: sticky; top: 8px; z-index: 6; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin: 0 0 10px; background: #eef3ff; border: 1px solid #c7d4fb; border-radius: 12px; }
.rbulk__f { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.rbulk__f select { width: auto; max-width: 260px; margin: 0; }
.rnew[hidden], .rbulk[hidden], .rpanel[hidden] { display: none; }
.rgrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.rgrid:has(.rpanel[hidden]) { grid-template-columns: minmax(0, 1fr); }
.rtree { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rtree__empty { padding: 16px; margin: 0; }
.rrow { display: grid; grid-template-columns: 20px 20px 18px minmax(0, 1fr) 40px 32px 32px auto; gap: 8px; align-items: center; padding: 7px 10px; border-bottom: 1px solid var(--line); background: #fff; }
.rrow:last-child { border-bottom: 0; }
.rrow.is-child { padding-left: 34px; background: #fbfcfe; }
.rrow.is-sel { background: #eef3ff; }
.rrow.is-empty .rrow__name b { color: var(--muted); font-weight: 500; }
.rrow__grip { cursor: grab; user-select: none; touch-action: none; text-align: center; color: #94a3b8; font-weight: 900; letter-spacing: -2px; line-height: 1; padding: 6px 0; }
.rrow__grip:hover { color: var(--accent); }
.rtree.is-filtering .rrow__grip { visibility: hidden; }
.rrow__chev { width: 20px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 13px; }
.rrow__chk { margin: 0; width: 16px; height: 16px; }
.rrow__name { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 2px 0; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.rrow__name b { font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrow__name small { color: var(--muted); font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrow__name:hover b { color: var(--accent); }
.rrow__n { text-align: right; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.rrow__t { width: 30px; height: 28px; padding: 0; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; color: #b6bdc8; font-size: 15px; line-height: 1; }
.rrow__t.on { color: var(--accent); border-color: #c7d4fb; background: #eef3ff; }
.rrow__t.on.is-hidden { color: #9aa9d8; border-style: dashed; }
.rrow__mv { display: inline-flex; gap: 4px; }
.rrow__mv button { width: 26px; height: 26px; padding: 0; border: 1px solid var(--line); background: #fff; border-radius: 7px; cursor: pointer; font-size: 13px; color: var(--text); }
.rrow__mv button:disabled { opacity: .3; cursor: default; }
.rtree.is-sorting { cursor: grabbing; user-select: none; }
.rrow.is-dragging { position: relative; z-index: 5; opacity: .95; box-shadow: 0 10px 28px rgba(15, 23, 42, .22); }
.rdrop { position: absolute; left: 8px; right: 8px; height: 3px; margin-top: -2px; border-radius: 3px; background: var(--accent); pointer-events: none; }
.rdrop.is-child { left: 42px; }
.rpanel { position: sticky; top: 14px; }
.rpanel .box { margin: 0; }
.rpanel__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rpanel__head b { flex: 1; font-size: 16px; overflow-wrap: anywhere; }
.rpanel__x { border: 0; background: none; cursor: pointer; font-size: 16px; color: var(--muted); padding: 4px; }
.rpanel .sw { display: flex; margin: 8px 0; }
.rpanel__btns { margin-top: 12px; gap: 8px; }
.rfoot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 10px 0 0; }
.rfoot__f { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.xlist { display: grid; gap: 6px; margin: 10px 0 0; }
.xrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto auto auto; gap: 8px; align-items: center; }
.xrow input[type=text], .xrow select { margin: 0; width: 100%; }
.xrow select { width: auto; }
.xrow__new { font-size: 12px; color: var(--muted); white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.xrow__tools { display: inline-flex; gap: 4px; }
.xrow__tools button { width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); background: #fff; border-radius: 7px; cursor: pointer; }
.xrow__tools button:disabled { opacity: .3; cursor: default; }
.xdocs { display: grid; gap: 4px; margin-top: 6px; }
.xdocs .sw { font-weight: 500; }
@media (max-width: 1279px) {   /* на ноутбуке и телефоне панель рубрики выезжает справа поверх списка, а не сжимает его */
  .rgrid { grid-template-columns: minmax(0, 1fr); }
  .rpanel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: min(380px, 100%); box-sizing: border-box; overflow-y: auto; padding: 12px; background: var(--bg); box-shadow: -14px 0 40px rgba(15, 23, 42, .22); }
}
@media (max-width: 900px) {
  .rnew { grid-template-columns: minmax(0, 1fr); }
  .xrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .xrow__new, .xrow__tools { justify-self: start; }
}
@media (max-width: 560px) {
  .rrow { grid-template-columns: 18px 18px 16px minmax(0, 1fr) 30px 30px 30px; gap: 6px; }
  .rrow__mv { display: none; }
  .rrow.is-child { padding-left: 18px; }
  .rrow__name b { white-space: normal; overflow-wrap: anywhere; }   /* на телефоне длинное название переносится, а не обрезается */
}

/* Выбор шаблона оформления: мини-превью */
.style-pick--tpl { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.tpl-demo { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 12px 34px 20px; gap: 4px; padding: 6px; border-radius: 8px; border: 1px solid rgba(0,0,0,.15); margin-bottom: 4px; }
.tpl-demo i { display: block; border-radius: 3px; }
.tpl-demo__bar { grid-column: 1 / -1; opacity: .9; }
.tpl-demo__hero { grid-column: 1 / -1; }
.tpl-demo__card { opacity: .95; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }

/* Рабочее место сети и область применения действий. */
.admin-scope { display:flex; flex-wrap:wrap; align-items:center; gap:6px 14px; margin:0 0 20px; padding:10px 14px; border:1px solid #cad7f0; border-left:4px solid #4264b0; border-radius:9px; background:#edf3ff; color:#253e6b; overflow-wrap:anywhere; }
.admin-scope > span { font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
.admin-scope > small { color:#4d6081; }
.admin-scope--network { background:#fff8e8; border-color:#ebd9aa; border-left-color:#a77916; color:#654a10; }
.admin-scope--network > small { color:#756332; }
.action-scope { display:block; flex-basis:100%; color:#53627a; font-size:12px; margin-bottom:6px; overflow-wrap:anywhere; }
.ae-head__pub { flex-wrap:wrap; }
.ae-scope { flex-basis:100%; text-align:right; color:#53627a; font-size:11px; overflow-wrap:anywhere; }
.workspace-eyebrow { margin:0 0 5px; font-size:11px; font-weight:700; letter-spacing:.11em; text-transform:uppercase; color:#66748b; }
.workspace-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.workspace-metrics .box { display:grid; gap:9px; min-width:0; }
.workspace-metrics strong { font-size:28px; line-height:1.2; overflow-wrap:anywhere; }
.workspace-metrics a { font-size:12px; }
.workspace-server { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:14px; }
.workspace-status { display:grid; gap:6px; min-width:0; }
.workspace-status small { color:#5b6475; overflow-wrap:anywhere; }
.workspace-status--1 { border-left:4px solid #c68a22; }
.workspace-status--2 { border-left:4px solid #cc4c4c; }
.workspace-inline { display:flex; flex-wrap:wrap; align-items:end; gap:12px; margin-top:16px; }
.workspace-inline label { display:grid; gap:5px; }
.workspace-inline small { flex-basis:100%; }
.workspace-tasks { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.workspace-task { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0; min-width:0; }
.workspace-task h3 { font-size:15px; line-height:1.4; margin:8px 0 4px; overflow-wrap:anywhere; }
.workspace-task p { margin:0; font-size:12px; overflow-wrap:anywhere; }
.workspace-task form { flex-shrink:0; }
.workspace-count { display:inline-block; padding:5px 12px; background:#f1f4f8; border-radius:8px; margin:8px 8px 8px 0; }
.workspace-site-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; max-height:340px; overflow:auto; padding:10px 0; }
.workspace-site-choices label { display:flex; align-items:start; gap:8px; padding:10px; border:1px solid var(--line); border-radius:8px; cursor:pointer; }
.workspace-site-choices label[hidden] { display:none; }
.workspace-site-choices label:has(input:checked) { background:#edf3ff; border-color:#8ca9de; }
.workspace-site-choices small { display:block; color:#637087; overflow-wrap:anywhere; }
.workspace-site-choices label > span { min-width:0; overflow-wrap:anywhere; }
.workspace-bulk-columns { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:28px; }
.workspace-bulk-columns fieldset { border:0; margin:16px 0 0; padding:0; min-width:0; }
.workspace-bulk-columns fieldset:disabled { opacity:.55; }
.template-notice { background:#eff4fc; border:1px solid #ccd9ed; padding:12px 16px; border-radius:9px; color:#354c70; font-size:13px; margin:12px 0 0; }
.field--template-locked { opacity:.58; }
.field--template-locked input, .field--template-locked select { cursor:not-allowed; }
.sticky-save { flex-wrap:wrap; }
.sticky-save > small { max-width:100%; overflow-wrap:anywhere; }

/* Предпросмотр использует настоящую публичную страницу в изолированном iframe. */
.design-preview { width:min(1500px,96vw); max-width:96vw; height:94vh; max-height:94vh; padding:0; border:1px solid #bfc9d9; border-radius:16px; background:#f3f5f8; color:var(--text); box-shadow:0 24px 100px #0005; }
.design-preview::backdrop { background:#15223b99; }
.design-preview[open] { display:flex; flex-direction:column; }
.design-preview__head { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:16px 20px; border-bottom:1px solid var(--line); background:white; }
.design-preview__head h2 { margin:0 0 3px; }
.design-preview__head small { color:#627088; }
.design-preview__tools { display:flex; flex-wrap:wrap; align-items:end; gap:12px; padding:12px 20px; }
.design-preview__tools label { display:grid; gap:4px; font-size:12px; min-width:0; }
.design-preview__tools select { max-width:300px; }
.design-preview > p { font-size:12px; padding:0 20px; margin:0 0 10px; }
.design-preview__canvas { flex:1; min-height:0; overflow:auto; padding:0 10px 12px; text-align:center; }
.design-preview iframe { display:block; height:100%; min-height:450px; margin:auto; border:1px solid #bec8d9; background:#fff; }
@media (max-width:1200px) { .workspace-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .workspace-tasks { grid-template-columns:1fr; } }
@media (max-width:700px) {
  .workspace-bulk-columns, .workspace-site-choices { grid-template-columns:1fr; }
  .workspace-task { align-items:start; flex-direction:column; }
  .workspace-metrics { gap:8px; } .workspace-metrics .box { padding:14px; } .workspace-metrics strong { font-size:23px; }
  .design-preview { width:98vw; max-width:98vw; height:96vh; max-height:96vh; }
  .design-preview__head { padding:12px; gap:8px; }
  .design-preview__head h2 { font-size:17px; }
  .design-preview__tools { padding:10px 12px; gap:8px; }
  .design-preview__tools label { max-width:100%; flex:1 1 130px; }
  .design-preview__tools select { width:100%; max-width:100%; }
}
.setcard .field.is-dep-off { display: none; }
.setnav__off { margin-left: auto; font-size: 11px; font-weight: 500; opacity: .6; }

/* ===== «Требуют внимания» и «Обзор и статистика» (22.11.2026) ===== */
:root { --ok: #16a34a; --ok-bg: #ecfdf3; --ok-line: #abefc6; --warn: #f59e0b; --warn-ink: #b54708; --warn-bg: #fffaeb; --warn-line: #fedf89; --bad: #dc2626; --bad-ink: #b42318; --bad-bg: #fef3f2; --bad-line: #fecdca; --soft: #eef1f5; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin: 0 0 18px; }
.dash-head h1 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: -.01em; }
.dash-head p { margin: 4px 0 0; }
.dash-head p b { color: var(--text); }
.dash-head__acts { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-sec { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin: 28px 0 12px; }
.dash-sec h2 { margin: 0; font-size: 17px; }
.dash-sec a { text-decoration: none; font-weight: 600; }
.dash-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.dash-2 > .box { margin: 0; min-width: 0; }
.sdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--ok); box-shadow: 0 0 0 3px rgba(22, 163, 74, .15); }
.sdot--1 { background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 158, 11, .2); }
.sdot--2 { background: var(--bad); box-shadow: 0 0 0 3px rgba(220, 38, 38, .16); }

/* Итог по сети */
.nw-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px 20px; padding: 20px 22px; border: 1px solid var(--ok-line); border-radius: 16px; background: var(--ok-bg); }
.nw-hero--1 { background: var(--warn-bg); border-color: var(--warn-line); }
.nw-hero--2 { background: var(--bad-bg); border-color: var(--bad-line); }
.nw-hero__icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 26px; font-weight: 800; line-height: 1; }
.nw-hero--1 .nw-hero__icon { background: var(--warn); }
.nw-hero--2 .nw-hero__icon { background: var(--bad); }
.nw-hero h2 { margin: 0; font-size: 20px; line-height: 1.3; }
.nw-hero p { margin: 3px 0 0; color: #475467; }
.nw-hero__nums { display: flex; gap: 8px; }
.nw-hero__nums a { display: grid; min-width: 104px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 255, 255, .75); color: var(--text); text-decoration: none; text-align: center; transition: background .15s; }
.nw-hero__nums a:hover { background: #fff; }
.nw-hero__nums b { font-size: 24px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.nw-hero__nums b small { font-size: 14px; color: var(--muted); font-weight: 600; }
.nw-hero__nums span { font-size: 12px; color: #475467; line-height: 1.3; }

/* Сервер и копии */
.nw-sys { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.nw-tile { display: grid; align-content: start; gap: 3px; min-width: 0; padding: 15px 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.nw-tile--1 { box-shadow: inset 3px 0 0 var(--warn); }
.nw-tile--2 { box-shadow: inset 3px 0 0 var(--bad); border-color: var(--bad-line); }
.nw-tile__top { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.nw-tile__state { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #067647; }
.nw-tile--1 .nw-tile__state { color: var(--warn-ink); }
.nw-tile--2 .nw-tile__state { color: var(--bad-ink); }
.nw-tile strong { font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }
.nw-tile small { color: #667085; font-size: 13px; overflow-wrap: anywhere; }
.nw-tile a { justify-self: start; margin-top: 6px; font-size: 13px; font-weight: 600; text-decoration: none; }

/* Что сделать */
.nw-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.nw-tools input[type=search] { flex: 1 1 220px; min-width: 0; padding: 8px 12px; border: 1px solid #cfd5de; border-radius: 10px; font: inherit; background: #fff; }
.nw-tools select { width: auto; max-width: 220px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 11px; background: #e6eaf0; }
.seg a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 8px; color: #344054; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.seg a:hover { color: var(--text); }
.seg a.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.seg a i { padding: 0 7px; border-radius: 99px; background: rgba(16, 24, 40, .07); font-style: normal; font-size: 12px; font-variant-numeric: tabular-nums; }
.seg .sdot { width: 7px; height: 7px; box-shadow: none; }
.nw-sites { display: grid; gap: 12px; }
.nw-site { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.nw-site--2 { border-color: var(--bad-line); }
.nw-site__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 11px 18px; background: #fafbfc; border-bottom: 1px solid var(--line); }
.nw-site--2 .nw-site__head { background: #fffbfa; }
.nw-site__name { font-weight: 700; }
.nw-site__dom { color: var(--muted); font-size: 13px; }
.nw-site__grp { padding: 1px 9px; border-radius: 99px; background: var(--soft); color: #475467; font-size: 12px; font-weight: 600; }
.nw-issue { display: flex; align-items: center; gap: 12px; padding: 11px 18px; }
.nw-issue + .nw-issue { border-top: 1px solid #f0f2f5; }
.nw-issue__text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nw-issue form { flex: none; margin: 0; }
.nw-tag { flex: none; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.nw-tag--2 { background: var(--bad-bg); color: var(--bad-ink); box-shadow: inset 0 0 0 1px var(--bad-line); }
.nw-tag--1 { background: var(--warn-bg); color: var(--warn-ink); box-shadow: inset 0 0 0 1px var(--warn-line); }
.nw-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
.nw-empty { padding: 34px 20px; text-align: center; background: #fff; border: 1px dashed #cfd5de; border-radius: 14px; }
.nw-empty__icon { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-size: 22px; font-weight: 800; }
.nw-empty p { margin: 4px 0 0; }

/* Расходы на ИИ */
.nw-ai__big { margin: 4px 0 2px; font-size: 32px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.nw-ai__big small { font-size: 16px; color: var(--muted); font-weight: 600; }
.nw-ai p { margin: 4px 0 0; }
.meter { height: 8px; margin: 12px 0 4px; overflow: hidden; border-radius: 99px; background: var(--soft); }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.meter--over i { background: var(--bad); }
.nw-budget { margin-top: 14px; padding-top: 12px; border-top: 1px solid #f0f2f5; }
.nw-budget > summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 600; }
.nw-budget .workspace-inline { margin-top: 10px; }
.nw-spend { display: grid; gap: 11px; margin: 12px 0 0; padding: 0; list-style: none; }
.nw-spend li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(60px, 120px) auto; align-items: center; gap: 12px; font-size: 14px; }
.nw-spend li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-spend .bar { height: 6px; overflow: hidden; border-radius: 99px; background: var(--soft); }
.nw-spend .bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); opacity: .85; }
.nw-spend b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.nw-spend__empty { margin: 12px 0 0; }

/* Обзор */
.ov-todo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.ov-todo__label { margin-right: 2px; color: var(--muted); font-size: 13px; font-weight: 600; }
.ov-todo a { padding: 5px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text); font-size: 13px; text-decoration: none; }
.ov-todo a:hover { border-color: #b8c2d6; }
.ov-todo a b { font-variant-numeric: tabular-nums; }
.ov-todo a.ov-todo__hot { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.ov-kpis { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.ov-kpi { display: grid; align-content: start; gap: 2px; min-width: 0; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.ov-kpi--main { grid-template-columns: minmax(0, 1fr) minmax(90px, 46%); align-items: end; gap: 12px; }
.ov-kpi--main > div { display: grid; gap: 2px; min-width: 0; }
.ov-kpi__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.ov-kpi__val { font-size: 30px; font-weight: 800; line-height: 1.2; letter-spacing: -.015em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ov-kpi--main .ov-kpi__val { font-size: 36px; }
.ov-kpi__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ov-spark { width: 100%; height: 56px; overflow: visible; }
.ov-spark polygon { fill: var(--accent); opacity: .1; }
.ov-spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.delta { display: inline-block; padding: 1px 7px; border-radius: 99px; background: #f2f4f7; color: #475467; font-size: 12px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta--up { background: var(--ok-bg); color: #067647; }
.delta--down { background: var(--bad-bg); color: var(--bad-ink); }
.ov-box-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; }
.ov-box-head h2 { margin: 0; }
.ov-box-head a { text-decoration: none; font-weight: 600; }
.ov-switch { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; cursor: pointer; }
.ov-switch input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.ov-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.ov-empty { padding: 26px 10px; text-align: center; }
.ov-empty p { margin: 4px 0 0; }
.ov-chart .chart-legend { margin-bottom: 10px; }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ov-grid > .box, .ov-side > .box { min-width: 0; }
.ov-side { display: grid; gap: 0; min-width: 0; }
.ov-top { margin: 0; padding: 0; list-style: none; }
.ov-top li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #f0f2f5; }
.ov-top li:first-child { padding-top: 0; border-top: 0; }
.ov-top__n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #f2f4f7; color: #475467; font-size: 13px; font-weight: 700; }
.ov-top li:nth-child(-n+3) .ov-top__n { background: #1d2433; color: #fff; }
.ov-top__t { min-width: 0; }
.ov-top__t a { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--text); font-weight: 600; line-height: 1.35; text-decoration: none; }
.ov-top__t a:hover { color: var(--accent); }
.ov-top__t small { display: flex; align-items: center; gap: 6px; margin-top: 2px; color: var(--muted); font-size: 12px; }
.ov-top__bar { display: block; height: 4px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: var(--soft); }
.ov-top__bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); opacity: .7; }
.ov-top__v { font-size: 16px; font-variant-numeric: tabular-nums; }
.ov-dot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; }
.ov-week .bars { height: 170px; gap: 8px; }
.ov-week .bars__col i { max-width: 38px; background: var(--accent); opacity: .28; border-radius: 7px 7px 3px 3px; }
.ov-week .bars__col.is-best i { opacity: 1; }
.ov-week .bars__col.is-best em, .ov-week .bars__col.is-best .bars__v { color: var(--text); font-weight: 700; }
.ov-side .hbars li { grid-template-columns: minmax(70px, 1fr) minmax(60px, 1.4fr) auto; }
.ov-side .hbars li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-side .hbars div i { opacity: .8; }
.ov-table th.num, .ov-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ov-table td { vertical-align: middle; }
.ov-table tr.is-cur td { background: #f8fafc; }
.ov-table tbody tr:hover td { background: #f8fafc; }
.ov-site { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.ov-site > div { display: grid; min-width: 0; }
.ov-site span { color: var(--muted); font-size: 12px; }
.ov-hot { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 99px; background: var(--warn-bg); color: var(--warn-ink); text-align: center; }
.ov-open { color: var(--muted); font-size: 12px; font-weight: 600; }
.ov-recent { margin: 0; padding: 0; list-style: none; }
.ov-recent li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; border-top: 1px solid #f0f2f5; }
.ov-recent li:first-child { padding-top: 0; border-top: 0; }
.ov-recent a { min-width: 0; overflow: hidden; color: var(--text); font-weight: 600; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.ov-recent a:hover { color: var(--accent); }
.ov-recent__meta { display: flex; flex: none; align-items: center; gap: 8px; }
.ov-recent__meta small { color: var(--muted); font-size: 12px; white-space: nowrap; }

@media (max-width: 1200px) {
  .ov-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ov-kpi--main { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
  .ov-grid, .dash-2 { grid-template-columns: minmax(0, 1fr); }
  .nw-hero { grid-template-columns: auto minmax(0, 1fr); }
  .nw-hero__nums { grid-column: 1 / -1; }
  .nw-hero__nums a { flex: 1; min-width: 0; }
}
@media (max-width: 640px) {
  .dash-head h1 { font-size: 23px; }
  .nw-hero { padding: 16px; gap: 12px 14px; }
  .nw-hero__icon { width: 40px; height: 40px; font-size: 21px; }
  .nw-hero h2 { font-size: 17px; }
  .nw-hero__nums b { font-size: 20px; }
  .nw-issue { flex-wrap: wrap; gap: 8px 10px; padding: 12px 14px; }
  .nw-issue form, .nw-issue form .btn { width: 100%; }
  .nw-site__head { padding: 10px 14px; }
  .nw-sys { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .nw-tile { padding: 12px 13px; }
  .nw-tile strong { font-size: 16px; }
  .nw-tile__state { display: none; }
  .nw-tile small { font-size: 12px; }
  .nw-spend li { grid-template-columns: minmax(0, 1fr) auto; }
  .nw-spend .bar { display: none; }
  .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ov-kpi { padding: 13px 14px; }
  .ov-kpi__val { font-size: 23px; }
  .ov-kpi--main .ov-kpi__val { font-size: 28px; }
  .ov-recent li { flex-wrap: wrap; gap: 2px 10px; }
  .ov-recent a { white-space: normal; }
}

/* Проверка всех страниц 22.11.2026: окно «Свои даты» не уходит за правый край, журналы прокручиваются на телефоне внутри себя */
.rangebox__pop { left: auto; right: 0; }
@media (max-width: 800px) {
  .logtbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 700px) {
  .rangebox[open] { flex-basis: 100%; }
  .rangebox__pop { position: static; margin-top: 8px; box-shadow: none; }
}
.ap-table select { width: 100%; min-width: 170px; max-width: 200px; }
.ap-table textarea { width: 100%; min-width: 190px; }
.ap-table td:nth-child(5) { min-width: 180px; }
.ap-table input[type=time] { width: 108px !important; }
.ap-table td:last-child { min-width: 132px; }
.ap-table td.ap-num { white-space: nowrap; }
.ap-table td.ap-num label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ap-table td.ap-num input { width: 64px; }
.ap-table td.ap-num > .muted { display: block; }
@media (max-width: 800px) {
  /* автопилот на телефоне: карточка на сайт вместо широкой таблицы */
  .ap-table, .ap-table tbody, .ap-table tr, .ap-table td { display: block; width: 100%; }
  .ap-table thead { display: none; }
  .ap-table tr { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  .ap-table td { padding: 6px 0; border: 0; min-width: 0 !important; }
  .ap-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
  .ap-table td.ap-site { padding-top: 0; font-size: 16px; }
  .ap-table select, .ap-table textarea { max-width: none; min-width: 0; }
  .ap-table td.ap-num { white-space: normal; }
  .ap-table td.ap-num label { justify-content: flex-start; }
  .ap-table td.ap-num label input { margin-left: auto; }
  .ap-table td[data-label="Включён"] { display: flex; align-items: center; gap: 10px; }
  .ap-table td[data-label="Включён"]::before { margin: 0; }
}
/* Медиатека: повторы фото */
.dupes__out { margin-top: 12px; }
.dupes__list { margin: 8px 0; padding-left: 18px; max-height: 320px; overflow: auto; }
.dupes__list li { margin: 3px 0; }
.dupes__list .linklike { text-align: left; color: var(--accent); }
.dupes__auto { margin: 0 0 10px; }
