/* ============================================================================
   ArtStudio CMS — админ-панель без внешних UI-фреймворков. Навигация и
   рабочая область используют знакомые паттерны зрелых CMS, сохраняя фирменные
   настройки ArtStudio CMS.
   ============================================================================ */

:root {
    --admin-topbar-bg: #1d2327;
    --admin-topbar-text: #f0f0f1;
    --admin-sidebar-bg: #f6f7f7;
    --admin-sidebar-text: #2c3338;
    --admin-sidebar-muted: #646970;
    --admin-sidebar-hover: #e8f2fa;
    --admin-sidebar-active: #dcecf7;
    --admin-bg: #f0f0f1;
    --admin-surface: #ffffff;
    --admin-accent: #2271b1;
    --admin-accent-hover: #135e96;
    --admin-accent-soft: #eaf3fa;
    --admin-text: #1d2327;
    --admin-muted: #646970;
    --admin-border: #dcdcde;
    --admin-border-strong: #8c8f94;
    --admin-danger: #b32d2e;
    --admin-danger-soft: #fdecee;
    --admin-danger-border: #f1b6c1;
    --admin-success: #008a20;
    --admin-surface-hover: #f6f7f7;  /* фон ховера кнопок/строк */
    --admin-surface-soft: #fafbfc;   /* подложки групп/тулбаров */
    --admin-radius-sm: 6px;
    --admin-radius: 8px;
    --admin-radius-lg: 12px;
    --admin-shadow: 0 1px 1px rgba(0, 0, 0, .04);
    --admin-shadow-md: 0 2px 8px rgba(0, 0, 0, .07);
    --admin-shadow-lg: 0 16px 40px rgba(0, 0, 0, .18);
    --admin-topbar-h: 46px;
    --admin-sidebar-w: 240px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    background: var(--admin-bg);
    color: var(--admin-text);
    -webkit-font-smoothing: antialiased;
}

/* --- Базовая типографика (замена того, что давал Pico) --- */
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 700; line-height: 1.25; color: var(--admin-text); }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }
p { margin: 0 0 1em; }
a { color: var(--admin-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
small { font-size: 12px; }
code, kbd, pre { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; }
code { background: #f1f2f4; padding: 1px 5px; border-radius: 4px; font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--admin-border); margin: 20px 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
img { max-width: 100%; }

/* --- Базовые поля форм (нужны там, где нет .form-field) --- */
input, select, textarea {
    font-family: inherit;
    font-size: 14px;
    color: var(--admin-text);
    background: #fff;
    border: 1px solid var(--admin-border-strong);
    border-radius: var(--admin-radius);
    padding: 8px 10px;
    width: 100%;
    max-width: 100%;
}
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--admin-accent); }
/* Нативный выбор файла под общий стиль кнопок */
input[type="file"] { padding: 7px 12px; font-size: 13px; color: var(--admin-muted); cursor: pointer; }
input[type="file"]::file-selector-button {
    margin-right: 12px; padding: 7px 14px; border-radius: 7px;
    border: 1px solid var(--admin-border-strong); background: #fff; color: var(--admin-text);
    font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: #f6f7f9; }
/* Выбор цвета: без явной высоты общий input делает из него тонкую полоску.
   Задаём аккуратную «плашку»-образец (в .colorfield ниже — во всю ширину). */
input[type="color"] { width: 60px; min-width: 60px; height: 40px; padding: 3px; cursor: pointer; vertical-align: middle; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--admin-accent) 15%, transparent);
}
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
label { font-weight: 600; font-size: 13px; }
fieldset { border: 1px solid var(--admin-border); border-radius: var(--admin-radius); padding: 16px; margin: 0 0 16px; }
legend { padding: 0 8px; font-weight: 700; }
table { border-collapse: collapse; width: 100%; }

button { font-family: inherit; }

/* Выделение текста — в тон акценту панели. */
::selection { background: color-mix(in srgb, var(--admin-accent) 85%, #000); color: #fff; }

/* Видимый фокус (a11y). */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid var(--admin-accent);
    outline-offset: 2px;
    border-radius: var(--admin-radius-sm);
}

/* ============================================================================
   Страницы аутентификации / установки
   ============================================================================ */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(1200px 600px at 20% -10%, #2a2650, #16161d 60%);
    padding: 20px;
}
.auth-card {
    background: #fff; padding: 40px; border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35); width: 100%; max-width: 380px;
}
.auth-card--wide { max-width: 460px; }
.auth-card h1 { font-size: 20px; margin: 0 0 16px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 22px; }
.auth-brand__logo {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 9px; font-size: 17px; font-weight: 800;
    background: linear-gradient(135deg, var(--admin-accent-2, #6d63f0), var(--admin-accent)); color: #fff;
}
.auth-brand__logoimg { height: 36px; max-width: 200px; object-fit: contain; }
.auth-brand__name { font-size: 17px; font-weight: 700; color: var(--admin-text); }
.auth-hint { font-size: 14px; color: var(--admin-muted); margin-bottom: 20px; line-height: 1.5; }
.auth-card form { display: flex; flex-direction: column; gap: 6px; }
.auth-card label { font-size: 13px; font-weight: 600; margin-top: 10px; }
.auth-card input { padding: 10px 12px; font-size: 15px; }
.auth-card button {
    margin-top: 20px; padding: 12px; border: none; border-radius: 10px;
    background: var(--admin-accent); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
}
.auth-card button:hover { background: var(--admin-accent-hover); }

.totp-secret { background: var(--admin-bg); border: 1px dashed var(--admin-border-strong); border-radius: 8px; padding: 12px; margin-bottom: 10px; text-align: center; word-break: break-all; }
.totp-secret code { font-size: 16px; letter-spacing: 1px; background: none; }
.totp-qr { display: flex; justify-content: center; margin-bottom: 16px; }
.totp-qr svg { width: 220px; height: 220px; border: 1px solid var(--admin-border); border-radius: 8px; }

/* ============================================================================
   Алерты
   ============================================================================ */
.alert { padding: 10px 12px; border-radius: var(--admin-radius); font-size: 14px; margin-bottom: 16px; background: #fff; border: 1px solid var(--admin-border); border-left-width: 4px; box-shadow: var(--admin-shadow); }
.alert--error { color: #8a2424; border-left-color: var(--admin-danger); }
.alert--success { color: #006b1b; border-left-color: var(--admin-success); }
.alert--info { color: #135e96; border-left-color: var(--admin-accent); }

/* ============================================================================
   Верхняя панель (тёмная)
   ============================================================================ */
.admin-topbar {
    position: sticky; top: 0; z-index: 100;
    height: var(--admin-topbar-h);
    background: var(--admin-topbar-bg); color: var(--admin-topbar-text);
    display: flex; align-items: center; gap: 10px; padding: 0 12px;
    box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.admin-topbar__toggle { display: none; background: none; border: 0; color: inherit; cursor: pointer; padding: 6px; border-radius: 6px; }
.admin-topbar__toggle:hover { background: rgba(255,255,255,.1); }
.admin-topbar__brand { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 700; text-decoration: none; }
.admin-topbar__brand:hover { text-decoration: none; }
.admin-topbar__logo {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 3px; font-size: 14px; font-weight: 800;
    background: linear-gradient(135deg, var(--admin-accent-2, #6d63f0), var(--admin-accent)); color: #fff;
}
.admin-topbar__logoimg { height: 26px; max-width: 150px; object-fit: contain; border-radius: 3px; }
.admin-topbar__name { font-size: 15px; }
.admin-topbar__crumb { color: #a7a9b4; font-size: 14px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.14); }
.admin-topbar__spacer { flex: 1; }

/* Инструменты в топбаре: быстрые действия, сброс кэша, открыть сайт */
.admin-tools { display: flex; align-items: center; gap: 8px; }
.admin-tools__form { margin: 0; }
.admin-tbtn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 10px; border-radius: 3px;
    background: transparent; border: 1px solid rgba(255,255,255,.18);
    color: var(--admin-topbar-text); font-size: 13px; font-weight: 600;
    cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1;
    list-style: none;
}
.admin-tbtn:hover { background: rgba(255,255,255,.16); text-decoration: none; color: #fff; }
.admin-tbtn::-webkit-details-marker { display: none; }
.admin-tbtn--primary { background: var(--admin-accent); border-color: var(--admin-accent); color: #fff; }
.admin-tbtn--primary:hover { background: var(--admin-accent-hover); color: #fff; }
.admin-tbtn svg { flex: none; }

/* Универсальный выпадающий список в топбаре (native <details>) */
.admin-menu { position: relative; }
.admin-menu__list {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px;
    background: #fff; color: var(--admin-text); border: 1px solid var(--admin-border);
    border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.18); padding: 6px; z-index: 120;
}
.admin-menu__label { padding: 6px 10px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--admin-muted); }

.admin-user { position: relative; }
.admin-user__btn { list-style: none; cursor: pointer; display: inline-flex; }
.admin-user__btn::-webkit-details-marker { display: none; }
.admin-user__avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 3px; font-weight: 700; font-size: 13px;
    background: #2c3338; color: #fff;
}
.admin-user__menu {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px;
    background: #fff; color: var(--admin-text); border: 1px solid var(--admin-border);
    border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.18); padding: 6px; z-index: 120;
}
.admin-user__name { padding: 8px 10px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--admin-border); margin-bottom: 4px; }
.admin-user__link { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 7px; background: none; border: 0; color: var(--admin-text); font-size: 14px; cursor: pointer; text-decoration: none; }
.admin-user__link:hover { background: var(--admin-bg); text-decoration: none; }
.admin-user__logout { color: var(--admin-danger); }
.admin-user__menu form { margin: 0; }

/* ============================================================================
   Оболочка: светлая боковая навигация + основная рабочая область
   ============================================================================ */
.admin-shell { display: flex; min-height: calc(100vh - var(--admin-topbar-h)); }

.admin-sidebar {
    width: var(--admin-sidebar-w); flex-shrink: 0;
    background: var(--admin-sidebar-bg); border-right: 1px solid var(--admin-border);
    padding: 10px 0 0; display: flex; flex-direction: column; gap: 0;
    position: sticky; top: var(--admin-topbar-h); align-self: flex-start;
    height: calc(100vh - var(--admin-topbar-h)); overflow-y: auto;
    transition: width .18s ease, transform .2s ease;
    scrollbar-color: #a7aaad var(--admin-sidebar-bg);
    scrollbar-width: thin;
}
.admin-sidebar__label {
    font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--admin-sidebar-muted); padding: 16px 14px 6px;
}
/* Заголовок группы как кнопка-переключатель (сворачивание раздела). */
.admin-sidebar__label--toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; background: none; border: 0; text-align: left; cursor: pointer;
    font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.admin-sidebar__label--toggle:hover { color: var(--admin-accent-hover); }
.admin-sidebar__chevron { flex: none; opacity: .7; transition: transform .18s ease; }
.admin-nav-group.is-collapsed .admin-sidebar__chevron { transform: rotate(-90deg); }
.admin-nav-group.is-collapsed .admin-nav-group__items { display: none; }
.admin-nav-item {
    display: flex; align-items: center; gap: 10px;
    min-height: 40px; padding: 9px 14px; border-radius: 0; color: var(--admin-sidebar-text); text-decoration: none;
    font-size: 15px; font-weight: 500; border-left: 4px solid transparent;
}
.admin-nav-item:hover { background: var(--admin-sidebar-hover); color: var(--admin-accent-hover); text-decoration: none; }
.admin-nav-item.is-active { background: var(--admin-sidebar-active); color: var(--admin-accent-hover); border-left-color: var(--admin-accent); font-weight: 600; }
.admin-nav-item__icon { flex-shrink: 0; color: currentColor; opacity: .85; }
.admin-nav-item.is-active .admin-nav-item__icon { opacity: 1; }
.admin-sidebar__collapse {
    position: sticky; bottom: 0; margin-top: auto; width: 100%; min-height: 44px;
    display: flex; align-items: center; gap: 10px; padding: 9px 14px;
    color: var(--admin-sidebar-muted); background: var(--admin-sidebar-bg); border: 0; border-top: 1px solid var(--admin-border);
    cursor: pointer; font-size: 13px; text-align: left;
}
.admin-sidebar__collapse:hover { color: var(--admin-accent-hover); background: var(--admin-sidebar-hover); }
.admin-sidebar__collapse svg { flex: none; transition: transform .18s ease; }
.admin-sidebar-backdrop { display: none; }

/* Единая ширина контента во всех разделах: не на всю ширину экрана и не узкие
   760px — максимум 1400px. На широких мониторах контент центрируется в области
   справа от сайдбара (margin:auto), на узких — заполняет всё доступное. */
.admin-main { flex: 1; min-width: 0; max-width: 1400px; margin-inline: auto; padding: 24px 28px 40px; }
.admin-main__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-main__header h1 { margin: 0; font-size: 23px; font-weight: 500; }
.admin-main__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.admin-skip-link {
    position: fixed; left: 8px; top: -100px; z-index: 1000; padding: 10px 14px;
    background: #fff; color: var(--admin-accent); border: 2px solid var(--admin-accent);
}
.admin-skip-link:focus { top: 8px; }

/* Тулбар действий страницы (устаревшая обёртка — действия теперь в шапке страницы) */
.page-toolbar { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }

/* ============================================================================
   Быстрый поиск (в топбаре)
   ============================================================================ */
.admin-search { position: relative; display: flex; align-items: center; min-width: 260px; }
.admin-search__icon { position: absolute; left: 11px; color: #9aa0ac; pointer-events: none; }
.admin-search__input {
    width: 100%; padding: 8px 12px 8px 34px; border-radius: 9px;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff; font-size: 13px;
}
.admin-search__input::placeholder { color: #9aa0ac; }
.admin-search__input:focus { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); box-shadow: none; }
.admin-search__kbd {
    position: absolute; right: 8px; font-size: 10px; color: #b9bcc7;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); border-radius: 5px; padding: 2px 6px;
}
.admin-search__results {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 130;
    background: #fff; color: var(--admin-text); border: 1px solid var(--admin-border); border-radius: 10px;
    box-shadow: var(--admin-shadow-lg); max-height: 380px; overflow-y: auto; min-width: 320px;
}
.admin-search__item { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; text-decoration: none; color: var(--admin-text); border-bottom: 1px solid #f0f1f4; }
.admin-search__item:hover { background: var(--admin-bg); text-decoration: none; }
.admin-search__type { font-size: 11px; text-transform: uppercase; color: #9aa0ac; flex-shrink: 0; min-width: 64px; }
.admin-search__title { font-weight: 600; }
.admin-search__empty { padding: 14px; color: #9aa0ac; font-size: 14px; }

/* ============================================================================
   Кнопки
   ============================================================================ */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: var(--admin-radius-sm); border: 1px solid var(--admin-border-strong);
    background: #fff; color: var(--admin-text); text-decoration: none;
    font-size: 14px; font-weight: 600; cursor: pointer; line-height: 1.2; white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .08s ease;
}
.btn:hover { background: var(--admin-surface-hover); border-color: var(--admin-accent); color: var(--admin-accent-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--admin-accent); border-color: var(--admin-accent); color: #fff; box-shadow: 0 1px 2px color-mix(in srgb, var(--admin-accent) 30%, transparent); }
.btn--primary:hover { background: var(--admin-accent-hover); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--admin-accent) 40%, transparent); }
.btn--danger { background: #fff; border-color: var(--admin-danger-border); color: var(--admin-danger); }
.btn--danger:hover { background: var(--admin-danger-soft); }
.btn--small { padding: 5px 9px; font-size: 13px; border-radius: var(--admin-radius-sm); }
.btn__icon { flex-shrink: 0; opacity: .85; }
.btn--primary .btn__icon, .btn--danger .btn__icon { opacity: 1; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
/* Кнопка публикации в соцсети — выделена своим (Telegram-синим) цветом. */
.btn--social { background: #2ca5e0; border-color: #2ca5e0; color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.btn--social:hover { filter: brightness(0.94); color: #fff; }
.btn--social svg { flex: 0 0 auto; }
/* Цвет кнопки — по бренду соцсети. */
.btn--social-telegram { background: #2ca5e0; border-color: #2ca5e0; }
.btn--social-facebook { background: #1877f2; border-color: #1877f2; }
.btn--social-linkedin { background: #0a66c2; border-color: #0a66c2; }
.btn--social-instagram { background: linear-gradient(45deg, #f09433, #e6683c 30%, #dc2743 55%, #cc2366 75%, #bc1888); border-color: #cc2366; }

/* Колонка «Соцсети» в списке новостей. */
/* Гибкая колонка заголовка забирает лишнюю ширину таблицы (width:100%), поэтому
   колонки языков/статуса/даты/соцсетей/действий держатся по контенту и между
   ними не появляется провал в браузерах, размазывающих свободное место. */
.data-table__flex { width: 100%; }
.news-social { white-space: nowrap; }
.news-social__btns { display: flex; flex-wrap: wrap; gap: 5px; }
.news-social__btns form { margin: 0; }
.news-social__state { display: flex; flex-direction: column; gap: 3px; margin-bottom: 6px; }
.news-social__meta { font-size: 12px; color: var(--admin-muted); }

/* ============================================================================
   Карточки статистики (дашборд)
   ============================================================================ */
.admin-welcome {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    margin-bottom: 18px; padding: 18px 20px; background: #fff;
    border: 1px solid var(--admin-border); border-left: 4px solid var(--admin-accent);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
}
.admin-welcome h2 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.admin-welcome p { margin: 0; color: var(--admin-muted); }
.admin-welcome__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 10px; }
.stat-card {
    background: #fff; display: flex; flex-direction: column; gap: 4px;
    border: 1px solid var(--admin-border); border-radius: var(--admin-radius); padding: 16px 18px;
    box-shadow: var(--admin-shadow);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.stat-card:hover { border-color: var(--admin-accent); box-shadow: var(--admin-shadow-md); transform: translateY(-1px); text-decoration: none; }
.stat-card--highlight { border-color: var(--admin-danger-border); }
.stat-card__label { font-size: 13px; color: var(--admin-muted); }

/* ============================================================================
   Таблицы списков
   ============================================================================ */
.data-table {
    width: 100%; border-collapse: separate; border-spacing: 0; background: var(--admin-surface);
    border: 1px solid var(--admin-border); border-radius: var(--admin-radius); overflow: hidden; box-shadow: var(--admin-shadow);
}
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--admin-border); font-size: 14px; vertical-align: middle; }
.data-table th { background: #fff; font-weight: 600; color: #2c3338; font-size: 13px; }
.data-table tbody tr:nth-child(even) { background: #f9f9f9; }
.data-table tbody tr:hover { background: #f0f6fc; }
.data-table tr:last-child td { border-bottom: none; }
.data-table__action-cell { width: 1%; text-align: right !important; }
.data-table__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.data-table__actions form { margin: 0; }
/* Старые списки используют класс прямо на td. Сохраняем ячейку частью
   таблицы: display:flex на td ломает расчёт колонок и границы строк. */
.data-table td.data-table__actions { display: table-cell; width: 1%; text-align: right; white-space: normal; }
.data-table td.data-table__actions > form { display: inline-flex; margin: 2px 0 2px 8px; vertical-align: middle; }
.data-table td.data-table__actions > .btn { margin: 2px 0 2px 8px; vertical-align: middle; }
.data-table__empty { padding: 32px; text-align: center; color: var(--admin-muted); }
.data-table__empty .btn { margin-top: 12px; }

.file-cell { display: flex; align-items: center; gap: 12px; }
.file-thumbnail { width: 44px; height: 44px; border-radius: 6px; background: #f1f2f4; border: 1px solid var(--admin-border); overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.file-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-thumbnail--icon { color: var(--admin-muted); }
.file-name { font-weight: 500; color: #2c3338; word-break: break-all; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge--published, .badge--success { background: #e8f6ee; color: #12854a; }
.badge--draft { background: #f1f2f4; color: #6b7280; }
.badge--danger { background: #fde8e8; color: #9b1c1c; }
.badge--accent { background: var(--admin-accent-soft); color: var(--admin-accent-hover); }
.badge--home { margin-left: 8px; vertical-align: middle; }
.badge svg { flex-shrink: 0; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c7ccd4; margin-right: 8px; vertical-align: middle; }
.status-dot--published { background: var(--admin-success); }

/* ============================================================================
   Карточки-формы и поля
   ============================================================================ */
.form-card { background: var(--admin-surface); border: 1px solid var(--admin-border); border-radius: var(--admin-radius-lg); padding: 24px; box-shadow: 0 4px 12px rgba(0, 0, 0, .05), var(--admin-shadow); }
/* Карточка формы больше не режется до 760 (тянется до ширины контента, 1400),
   но одиночные поля ввода держим читаемой ширины — иначе на широкой карточке
   поле под «Название сайта» растянулось бы на весь экран. Редактор (wysiwyg)
   и служебные поля (color/checkbox/radio/range) не трогаем. */
.form-grid input[type="text"],
.form-grid input[type="url"],
.form-grid input[type="email"],
.form-grid input[type="tel"],
.form-grid input[type="password"],
.form-grid input[type="number"],
.form-grid input[type="search"],
.form-grid input[type="date"],
.form-grid input[type="datetime-local"],
.form-grid input:not([type]),
.form-grid select,
.form-grid textarea:not([data-wysiwyg]) { max-width: 640px; }
.admin-builder-workspace { width: 100%; }
.admin-builder-workspace > .form-grid { gap: 0; }
.form-grid { display: flex; flex-direction: column; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 13px; font-weight: 600; }
.form-field input, .form-field select, .form-field textarea { width: 100%; }
.form-field--checkbox { flex-direction: row; align-items: center; gap: 10px; }
.form-field--checkbox input { width: auto; }
.form-hint { font-size: 12px; color: var(--admin-muted); }
.form-actions { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.form-actions--sticky {
    position: fixed; left: calc(var(--admin-sidebar-w) + 28px); right: 28px; bottom: 0; z-index: 75;
    align-items: center; margin: 0; padding: 12px 16px;
    background: color-mix(in srgb, var(--admin-surface) 94%, transparent);
    border: 1px solid var(--admin-border); border-bottom: 0;
    box-shadow: 0 -8px 24px rgba(29, 35, 39, .12);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}
.form-actions--sticky.is-context-hidden { opacity: 0; visibility: hidden; transform: translateY(100%); pointer-events: none; }
body:has(.form-actions--sticky) .admin-main,
body.has-sticky-actions .admin-main { padding-bottom: 108px; }
.form-actions--sticky .btn--primary { min-width: 132px; justify-content: center; }

/* Сворачиваемая секция формы (details): второстепенные поля не шумят,
   пока не понадобятся. Значения внутри закрытой секции отправляются как обычно. */
.form-section { border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: var(--admin-surface-soft); }
.form-section > summary {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px;
    cursor: pointer; font-weight: 600; font-size: 13px; list-style: none; user-select: none;
}
.form-section > summary::-webkit-details-marker { display: none; }
.form-section > summary::before {
    content: ''; flex-shrink: 0; width: 7px; height: 7px; margin-top: -3px;
    border-right: 2px solid var(--admin-muted); border-bottom: 2px solid var(--admin-muted);
    transform: rotate(-45deg); transition: transform .15s ease;
}
.form-section[open] > summary::before { transform: rotate(45deg); margin-top: -5px; }
.form-section > summary:hover { color: var(--admin-accent); }
.form-section__hint { font-weight: 400; font-size: 12px; color: var(--admin-muted); }
.form-section__body { display: flex; flex-direction: column; gap: 18px; padding: 6px 16px 16px; }

.settings-group { border: 1px solid var(--admin-border); border-radius: var(--admin-radius-lg); padding: 22px; margin: 20px 0; background: var(--admin-surface-soft); }
.settings-group > legend { padding: 0 10px; font-size: 14px; font-weight: 700; color: var(--admin-text); }

/* ============================================================================
   Фильтры и массовые действия
   ============================================================================ */
.list-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.list-filters--panel { display: flex; flex-wrap: wrap; align-items: end; width: 100%; max-width: 100%; padding: 16px; background: #fff; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); box-shadow: 0 2px 8px rgba(0,0,0,.04), var(--admin-shadow); }
.list-filter { display: flex; flex: 1 1 150px; min-width: min(140px, 100%); flex-direction: column; gap: 4px; }
.list-filter label { font-size: 12px; color: var(--admin-muted); }
.list-filter--search { flex: 2 1 280px; min-width: min(220px, 100%); }
.list-filter--compact { flex: 0 1 130px; min-width: 100px; max-width: 130px; }
.list-filters__actions { display: flex; flex: 0 0 auto; min-width: 0; max-width: 100%; gap: 7px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-left: auto; }
.list-filters__actions .btn { flex: 1 1 auto; justify-content: center; white-space: nowrap; }
.list-results { margin: -4px 0 12px; color: var(--admin-muted); font-size: 13px; }
.bulk-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 14px; background: var(--admin-surface); border: 1px solid var(--admin-border); border-radius: var(--admin-radius); box-shadow: var(--admin-shadow); }
.bulk-bar select { width: auto; }
.bulk-bar__count { color: var(--admin-muted); font-size: 13px; margin-left: auto; }
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.data-table__primary { color: var(--admin-accent); font-weight: 600; }
.admin-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin-top: 16px; flex-wrap: wrap; }
.admin-pagination__summary { margin-right: 8px; color: var(--admin-muted); font-size: 13px; }
.admin-pagination__gap { padding: 0 4px; color: var(--admin-muted); }

/* ============================================================================
   Автономный WYSIWYG
   ============================================================================ */
.art-editor { border: 1px solid var(--admin-border-strong); border-radius: 10px; overflow: hidden; background: #fff; }
.art-editor__toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--admin-border); background: var(--admin-surface-soft); }
.art-editor__btn { min-width: 30px; height: 30px; border: 1px solid transparent; border-radius: 6px; background: transparent; cursor: pointer; font-size: 14px; }
.art-editor__btn:hover { background: #eef0f4; border-color: var(--admin-border); }
.art-editor__area { min-height: 200px; padding: 12px 14px; outline: none; line-height: 1.6; }
.art-editor__area:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--admin-accent) 15%, transparent); }
.art-editor__area h2 { font-size: 22px; margin: 12px 0 6px; }
.art-editor__area h3 { font-size: 18px; margin: 10px 0 6px; }

/* ============================================================================
   Модальная медиабиблиотека
   ============================================================================ */
.media-modal { position: fixed; inset: 0; background: rgba(15,17,24,.55); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.media-modal[hidden] { display: none; }
.media-modal__dialog { background: #fff; border-radius: 14px; width: min(860px, 100%); max-height: 82vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.media-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--admin-border); }
.media-modal__close { border: none; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--admin-muted); }
.media-modal__upload { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: end; gap: 8px 12px; padding: 14px 18px; background: var(--admin-bg, #f7f8fa); border-bottom: 1px solid var(--admin-border); }
.media-modal__upload-field { display: grid; gap: 6px; min-width: 0; font-size: 13px; font-weight: 600; }
.media-modal__upload-field input { width: 100%; min-width: 0; font-weight: 400; }
.media-modal__upload-hint { align-self: center; color: var(--admin-muted); white-space: nowrap; }
.media-modal__upload-status { grid-column: 1 / -1; min-height: 18px; color: var(--admin-muted); font-size: 12px; }
.media-modal__upload-status.is-error { color: #b42318; }
.media-modal__upload-status.is-success { color: #067647; }
.media-modal__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; padding: 16px; overflow-y: auto; }
.media-modal__item { border: 1px solid var(--admin-border); border-radius: 8px; padding: 0; cursor: pointer; overflow: hidden; background: #fff; aspect-ratio: 1; }
.media-modal__item:hover { border-color: var(--admin-accent); box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.media-modal__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-modal__item--file { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px; text-align: center; }
.media-modal__fileicon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--admin-accent-soft, #eef0fe); color: var(--admin-accent, #5b52e5); font-size: 15px; }
.media-modal__filename { font-size: 12px; color: var(--admin-text, #1f2b3d); word-break: break-word; line-height: 1.3; }
.media-modal__empty { grid-column: 1 / -1; padding: 30px; text-align: center; color: var(--admin-muted); }
@media (max-width: 640px) {
    .media-modal { padding: 8px; }
    .media-modal__dialog { max-height: 94vh; }
    .media-modal__upload { grid-template-columns: 1fr auto; }
    .media-modal__upload-hint { display: none; }
}

/* ============================================================================
   Репитеры, список блоков, дерево меню, колонки, вкладки, шапка, виджеты
   ============================================================================ */
.repeater-row { border: 1px solid var(--admin-border); border-radius: 10px; padding: 16px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 12px; position: relative; background: #fff; }
.repeater-row__remove { align-self: flex-end; }
.repeater-actions { margin-bottom: 20px; }

.block-list-item { display: flex; align-items: center; justify-content: space-between; background: var(--admin-surface); border: 1px solid var(--admin-border); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; box-shadow: var(--admin-shadow); }
.block-list-item__handle { cursor: grab; color: #b0b5bf; font-size: 18px; user-select: none; padding: 0 4px; }
.block-list-item.is-dragging { opacity: .5; outline: 2px dashed var(--admin-accent); }
.block-list-item__meta { display: flex; flex-direction: column; gap: 2px; }
.block-list-item__type { font-size: 12px; color: var(--admin-muted); text-transform: uppercase; letter-spacing: .04em; }
.block-list-item__actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.snippet-tools { display: flex; flex-direction: column; gap: 10px; }
.snippet-tools__row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.snippet-tools__row input[type="text"], .snippet-tools__row select { width: auto; }

.admin-hint { color: var(--admin-muted); font-size: 14px; margin: 0 0 14px; }
.menu-workspace { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
.menu-add-panel { max-width: none; position: sticky; top: calc(var(--admin-topbar-h) + 20px); }
.menu-add-panel h2, .menu-structure__head h2 { margin: 0; font-size: 18px; }
.menu-structure { min-width: 0; background: #fff; border: 1px solid var(--admin-border); box-shadow: var(--admin-shadow); }
.menu-structure__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--admin-border); }
.menu-structure__head .form-hint { margin: 3px 0 0; }
.menu-lang-tabs { display: flex; gap: 0; overflow-x: auto; padding: 0 12px; border-bottom: 1px solid var(--admin-border); background: var(--admin-surface-hover); }
.menu-lang-tab { flex: none; padding: 11px 13px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--admin-muted); font-weight: 600; cursor: pointer; }
.menu-lang-tab:hover { color: var(--admin-accent); }
.menu-lang-tab.is-active { color: var(--admin-accent); border-bottom-color: var(--admin-accent); background: #fff; }
.menu-lang-panel { padding: 12px; }
.menu-tree, .menu-node__children { list-style: none; margin: 0; padding: 0; }
.menu-tree__empty { color: var(--admin-muted); padding: 24px 12px; text-align: center; border: 1px dashed var(--admin-border); }
.menu-node { border: 1px solid var(--admin-border); border-radius: 3px; margin: 7px 0; background: var(--admin-surface); box-shadow: var(--admin-shadow); }
.menu-node.is-dragging { opacity: .5; outline: 2px dashed var(--admin-accent); }
.menu-node__row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 10px; }
.menu-node__handle { flex: none; cursor: grab; color: var(--admin-border-strong); user-select: none; padding: 7px 4px; font-size: 18px; line-height: 1; }
.menu-node__handle:active { cursor: grabbing; }
.menu-node__content { display: flex; flex: 1 1 180px; min-width: 120px; flex-direction: column; }
.menu-node__title { font-weight: 600; }
.menu-node__meta { color: var(--admin-muted); font-size: 12px; overflow-wrap: anywhere; }
.menu-node__actions { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.menu-node__actions form { margin: 0; }
.menu-node__move { min-width: 32px; justify-content: center; padding-left: 7px; padding-right: 7px; }
.menu-node__children { margin: 0 8px 8px 32px; border-left: 3px solid #c3c4c7; min-height: 12px; padding: 0 0 0 10px; }
.menu-node__children:empty { min-height: 20px; border-left-style: dashed; }
.menu-node--child { margin: 5px 0; box-shadow: none; }
.menu-node--child > .menu-node__row { background: var(--admin-surface-hover); }
.menu-node--language-error { border-color: var(--admin-danger); }
.menu-node__edit { padding: 16px; border-top: 1px solid var(--admin-border); background: var(--admin-surface-hover); }
.menu-node__edit[hidden] { display: none; }
.menu-node__edit .form-grid { max-width: 760px; }
.menu-form-fields { display: flex; flex-direction: column; gap: 14px; }
.menu-form-fields [hidden] { display: none; }
.menu-node--divider > .menu-node__row { background: var(--admin-surface-hover); }

@media (max-width: 1000px) {
    .menu-workspace { grid-template-columns: 1fr; }
    .menu-add-panel { position: static; }
}
@media (max-width: 640px) {
    .menu-node__row { align-items: flex-start; flex-wrap: wrap; }
    .menu-node__content { padding-top: 5px; }
    .menu-node__actions { width: 100%; padding-left: 27px; flex-wrap: wrap; }
    .menu-node__actions [data-menu-edit-toggle] { flex: 1; justify-content: center; }
    .menu-node__children { margin-left: 16px; }
    .menu-node__edit { padding: 14px 10px; }
}

.columns-editor__grid { display: grid; gap: 12px; }
.columns-editor__grid--2 { grid-template-columns: repeat(2, 1fr); }
.columns-editor__grid--3 { grid-template-columns: repeat(3, 1fr); }
.columns-editor__grid--4 { grid-template-columns: repeat(4, 1fr); }
.columns-editor__col { border: 1px dashed var(--admin-border-strong); border-radius: 10px; padding: 10px; }
.columns-editor__col-title { font-size: 12px; font-weight: 700; color: var(--admin-muted); margin-bottom: 8px; text-transform: uppercase; }
.columns-editor__child { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; margin-bottom: 6px; background: var(--admin-bg); border-radius: 6px; font-size: 14px; }
.columns-editor__child-actions { display: flex; gap: 4px; }
.columns-editor__child-actions form { margin: 0; }
.columns-editor__add { display: flex; gap: 6px; margin-top: 6px; }
.columns-editor__add select { flex: 1; min-width: 0; }

/* Языковые вкладки редактора контента */
.lang-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--admin-border); margin-bottom: 20px; flex-wrap: wrap; }
.lang-tab-btn { padding: 9px 16px; border: none; background: transparent; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--admin-muted); }
.lang-tab-btn.is-active { color: var(--admin-accent); border-bottom-color: var(--admin-accent); }
.lang-tab-btn__badge { font-size: 11px; color: #aaa; font-weight: 400; }
.lang-tab-panel { display: none; }
.lang-tab-panel.is-active { display: block; }

/* Header mini-app конструктор */
.header-builder__group { border: 1px solid var(--admin-border); border-radius: 12px; padding: 18px; margin-bottom: 16px; background: var(--admin-surface); }
.header-builder__group h3 { margin: 0 0 12px; font-size: 15px; }
.header-preview { background: var(--admin-surface); border: 1px dashed var(--admin-border-strong); border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; display: flex; align-items: center; gap: 16px; }

/* Виджеты */
.sidebar-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sidebar-column h2 { font-size: 16px; }

/* ============================================================================
   Адаптив
   ============================================================================ */
@media (min-width: 961px) {
    .admin-nav-collapsed { --admin-sidebar-w: 56px; }
    .admin-nav-collapsed .admin-sidebar__label,
    .admin-nav-collapsed .admin-nav-item span,
    .admin-nav-collapsed .admin-sidebar__collapse span { display: none; }
    /* В иконочном режиме заголовки-переключатели скрыты, а пункты видны всегда. */
    .admin-nav-collapsed .admin-nav-group.is-collapsed .admin-nav-group__items { display: block; }
    .admin-nav-collapsed .admin-nav-item,
    .admin-nav-collapsed .admin-sidebar__collapse { justify-content: center; padding-left: 8px; padding-right: 8px; }
    .admin-nav-collapsed .admin-nav-item { border-left-width: 3px; }
    .admin-nav-collapsed .admin-sidebar__collapse svg { transform: rotate(180deg); }
}
@media (max-width: 960px) {
    .admin-topbar__toggle { display: inline-flex; }
    .admin-topbar__name, .admin-topbar__crumb { display: none; }
    .admin-sidebar {
        position: fixed; top: var(--admin-topbar-h); left: 0; bottom: 0; z-index: 90;
        width: min(var(--admin-sidebar-w), 86vw); transform: translateX(-100%);
        transition: transform .2s ease; box-shadow: 0 10px 40px rgba(0,0,0,.28);
    }
    body.sidebar-open .admin-sidebar { transform: translateX(0); }
    .admin-sidebar__collapse { display: none; }
    .admin-sidebar-backdrop {
        position: fixed; inset: var(--admin-topbar-h) 0 0; z-index: 80; display: block;
        padding: 0; border: 0; background: rgba(0,0,0,.46); opacity: 0;
        visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility .2s ease;
    }
    body.sidebar-open { overflow: hidden; }
    body.sidebar-open .admin-sidebar-backdrop { opacity: 1; visibility: visible; pointer-events: auto; }
    .admin-main { padding: 20px 16px; }
    .admin-search { min-width: 0; flex: 1; }
    .admin-search__kbd { display: none; }
    /* Компактные кнопки-инструменты: только иконки */
    .admin-tbtn__label { display: none; }
    .admin-tbtn { padding: 8px; }
    .admin-tools { gap: 6px; }
    .form-actions--sticky { left: 0; right: 0; padding: 12px 16px; border-left: 0; border-right: 0; }
}
@media (max-width: 560px) {
    /* На самых узких прячем поиск, оставляя быстрые действия и открыть сайт */
    .admin-search { display: none; }
    .admin-topbar { gap: 8px; padding: 0 8px; }
    .admin-tools__quick { display: none; }
    .admin-user__avatar { width: 28px; height: 28px; }
}
@media (max-width: 720px) {
    .sidebar-columns { grid-template-columns: 1fr; }
    .columns-editor__grid--2, .columns-editor__grid--3, .columns-editor__grid--4 { grid-template-columns: 1fr; }
    .form-card { padding: 20px; }
    .admin-welcome { align-items: flex-start; flex-direction: column; }
    .admin-welcome__actions { width: 100%; }
}
@media (max-width: 640px) {
    .data-table { display: block; overflow-x: auto; white-space: nowrap; }
    .admin-main__header { align-items: flex-start; }
    .admin-main__actions { width: 100%; }
    .admin-main__actions .btn { flex: 1; justify-content: center; }
    .list-filters--panel { align-items: stretch; flex-direction: column; }
    .list-filter--search, .list-filter--compact { min-width: 0; max-width: none; }
    .list-filters__actions { width: 100%; margin-left: 0; }
    .list-filters__actions .btn { flex: 1; justify-content: center; }
    .bulk-bar select { width: 100%; }
    .bulk-bar .btn { flex: 1; justify-content: center; }
    .bulk-bar__count { width: 100%; margin-left: 0; text-align: center; }
    .admin-pagination { justify-content: center; }
    .admin-pagination__summary { width: 100%; margin: 0 0 4px; text-align: center; }
    .form-actions--sticky .btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .admin-sidebar, .admin-sidebar-backdrop, .admin-sidebar__collapse svg, .form-actions--sticky, .btn, .stat-card, .form-section > summary::before { transition: none; }
    .stat-card:hover { transform: none; }
}

/* ============================================================================
   Поле изображения с превью (медиабиблиотека)
   ============================================================================ */
.image-field__row { display: flex; gap: 14px; align-items: flex-start; }
.image-field__preview {
    flex-shrink: 0; width: 96px; height: 96px; border-radius: 10px;
    border: 1px solid var(--admin-border); background: var(--admin-surface-soft);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.image-field__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-field__placeholder { color: #b8bdc7; }
.image-field__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.image-field__controls { display: flex; gap: 8px; align-items: center; }
.image-field__controls input[type="text"] { flex: 1; min-width: 0; }
.image-field__upload { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 560px) {
    .image-field__row { flex-direction: column; }
    .image-field__preview { width: 100%; height: 160px; }
}

/* ============================================================================
   Двухколоночная раскладка редактора (в духе Statamic)
   ============================================================================ */
.entry-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.entry-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.entry-main .form-card { max-width: none; }
.entry-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(var(--admin-topbar-h) + 20px); }
.entry-side .form-card { max-width: none; }
.news-detail-sidebar h2 { margin: 0; }
.news-detail-sidebar__pick { align-self: flex-start; }
.news-detail-sidebar__docs > h3 { margin: 0 0 12px; font-size: 14px; }
.news-detail-sidebar .repeater-row { padding: 12px; }
.news-detail-sidebar .repeater-actions { margin: 4px 0 0; }
.page-settings-sidebar h2 { margin: 0; }
.page-settings-sidebar__options { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; border-top: 1px solid var(--admin-border); }
.page-settings-sidebar__options .form-field--checkbox { align-items: flex-start; }
.page-settings-sidebar__options .form-field--checkbox input { margin-top: 3px; }
.page-settings-sidebar__options .form-hint { margin: -2px 0 0 28px; }
/* Поля внутри языковых панелей получают вертикальный ритм. */
.lang-tab-panel.is-active { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 900px) {
    .entry-grid { grid-template-columns: 1fr; }
    .entry-side { position: static; }
}

/* Отключённый (скрытый на сайте) блок в конструкторе страниц */
.block-list-item--off { opacity: .6; background: repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(0,0,0,.03) 8px, rgba(0,0,0,.03) 16px); }
.block-list-item__badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: #eef0f3; color: #66707c; font-size: 11px; font-weight: 600; vertical-align: middle; }

/* ===== Тема-билдер: управление дизайном ===== */
/* Липкая панель навигации по разделам дизайна: якоря + «развернуть всё». */
.design-nav {
    position: sticky; top: var(--admin-topbar-h); z-index: 60;
    display: flex; align-items: center; gap: 12px;
    margin: 0 0 20px; padding: 10px 2px;
    background: color-mix(in srgb, var(--admin-bg) 92%, transparent);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.design-nav > .btn { flex-shrink: 0; }
.design-anchors {
    display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin;
    flex: 1 1 auto; min-width: 0; margin: 0; padding: 2px;
}
.design-anchors a {
    flex-shrink: 0; padding: 6px 12px; border: 1px solid var(--admin-border);
    border-radius: 999px; background: var(--admin-surface);
    color: var(--admin-text); font-size: 13px; font-weight: 600; text-decoration: none;
    transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.design-anchors a:hover { border-color: var(--admin-accent); color: var(--admin-accent-hover); text-decoration: none; }

.design-section { margin-bottom: 34px; scroll-margin-top: calc(var(--admin-topbar-h) + 56px); }
.design-section__title { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: #66707c; margin: 0 0 16px; font-weight: 700; }

/* Сворачиваемые секции точной настройки: каждая — аккуратная карточка-строка. */
.design-section--collapsible {
    margin-bottom: 12px; padding: 0 20px;
    border: 1px solid var(--admin-border); border-radius: var(--admin-radius);
    background: var(--admin-surface); box-shadow: var(--admin-shadow);
}
.design-section--collapsible > summary {
    display: flex; align-items: center; gap: 10px;
    margin: 0; padding: 16px 0; cursor: pointer; list-style: none;
    user-select: none;
}
.design-section--collapsible > summary::-webkit-details-marker { display: none; }
.design-section--collapsible > summary::before {
    content: ''; flex-shrink: 0; width: 8px; height: 8px;
    border-right: 2px solid var(--admin-muted); border-bottom: 2px solid var(--admin-muted);
    transform: rotate(-45deg); transition: transform .15s ease; margin-right: 2px;
}
.design-section--collapsible[open] > summary::before { transform: rotate(45deg); }
.design-section--collapsible > summary:hover { color: var(--admin-accent); }
.design-section--collapsible[open] > summary { border-bottom: 1px solid var(--admin-border); margin-bottom: 4px; }
.design-section--collapsible > .design-opt:last-of-type,
.design-section--collapsible > .design-manual:last-child { margin-bottom: 18px; }

.design-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.design-preset { border: 2px solid var(--admin-border, #e6e8ec); border-radius: 12px; padding: 18px; background: #fff; margin: 0; transition: border-color .15s, box-shadow .15s; }
.design-preset:hover { box-shadow: 0 6px 20px rgba(20,33,51,.08); }
.design-preset.is-active { border-color: var(--admin-accent, #5b52e5); background: var(--admin-accent-soft, #eef0fe); }
.design-preset__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.design-preset__head strong { font-size: 16px; }
.design-preset__badge { font-size: 11px; font-weight: 700; color: var(--admin-accent, #5b52e5); background: #fff; border: 1px solid var(--admin-accent, #5b52e5); border-radius: 999px; padding: 1px 8px; }
.design-preset__desc { color: #66707c; font-size: 13px; margin: 0 0 14px; line-height: 1.5; }

.design-opt { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--admin-border, #e6e8ec); }
.design-opt:last-child { border-bottom: 0; }
.design-opt__label span { display: block; font-weight: 600; }
.design-opt__label small { display: block; color: #8a929c; font-size: 12px; margin-top: 4px; line-height: 1.45; }
.design-opt__choices { display: flex; flex-wrap: wrap; gap: 12px; }

.design-manual { margin-top: 18px; padding: 18px; border: 1px solid var(--admin-border); border-radius: 10px; background: #f8f9fa; }
.design-manual__head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 16px; }
.design-manual__head span { color: var(--admin-muted); font-size: 13px; }
.design-manual__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.design-manual__grid .form-field { margin: 0; }
.design-manual__grid input[type="color"] { width: 72px; min-height: 42px; padding: 4px; cursor: pointer; }
.design-manual__wide { grid-column: 1 / -1; }
.design-manual__wide > select { width: min(100%, 520px); }
.design-manual__custom-font {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
    padding: 16px; border: 1px dashed var(--admin-border-strong); background: #fff;
}
.design-manual__custom-font[hidden] { display: none; }
.settings-design-link { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--admin-border); border-left: 4px solid var(--admin-accent); border-radius: var(--admin-radius); background: var(--admin-accent-soft); }
.settings-design-link span { color: var(--admin-muted); }
.settings-design-link .btn { margin-left: auto; }

.design-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1 1 108px; min-width: 96px; max-width: 168px; padding: 14px 12px; border: 2px solid var(--admin-border, #e6e8ec); border-radius: 12px; cursor: pointer; background: #fbfbfd; transition: border-color .15s, box-shadow .15s, background .15s; }
.design-card:hover { border-color: #c7cbe8; }
.design-card input { position: absolute; opacity: 0; pointer-events: none; }
.design-card:has(input:checked) { border-color: var(--admin-accent, #5b52e5); background: var(--admin-accent-soft, #eef0fe); box-shadow: 0 0 0 3px color-mix(in srgb, var(--admin-accent) 12%, transparent); }
.design-card__label { font-size: 13px; font-weight: 600; color: #1c2531; }
.design-card__preview { width: 100%; height: 52px; border-radius: 8px; background: #fff; border: 1px solid #e6e8ec; position: relative; overflow: hidden; }
.design-card__preview::before { content: ''; position: absolute; inset: 10px; background: linear-gradient(#eceff3 0 0) no-repeat, linear-gradient(#eceff3 0 0) no-repeat, linear-gradient(#eceff3 0 0) no-repeat; background-size: 60% 8px, 90% 6px, 40% 6px; background-position: 0 0, 0 16px, 0 28px; }

/* Мини-превью для наглядности (приближённо к макетам) */
.design-card__preview--radius-none { border-radius: 0; }
.design-card__preview--radius-large { border-radius: 16px; }
.design-card__preview--catalog_layout-cards_lg::after,
.design-card__preview--catalog_layout-cards_sm::after { content:''; position:absolute; inset:8px; background: repeating-linear-gradient(90deg,#dfe3ea 0 30%,transparent 30% 34%); }
.design-card__preview--catalog_layout-list::after { content:''; position:absolute; inset:8px; background: repeating-linear-gradient(#dfe3ea 0 30%,transparent 30% 50%); }
.design-card__preview--header_style-dark { background:#16161d; }
.design-card__preview--header_style-accent { background: var(--admin-accent, #5b52e5); }
.design-card__preview--button-pill::after { content:''; position:absolute; left:16px; top:18px; width:52px; height:16px; border-radius:999px; background: var(--admin-accent,#5b52e5); }
.design-card__preview--button-rounded::after { content:''; position:absolute; left:16px; top:18px; width:52px; height:16px; border-radius:6px; background: var(--admin-accent,#5b52e5); }
.design-card__preview--button-square::after { content:''; position:absolute; left:16px; top:18px; width:52px; height:16px; border-radius:0; background: var(--admin-accent,#5b52e5); }

.design-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--admin-bg, #f6f7f9) 40%); padding: 16px 0; z-index: 5; }
.design-fine { padding-bottom: 8px; }

/* --- Мобильная версия панели дизайна --- */
@media (max-width: 720px) {
    .design-opt { grid-template-columns: 1fr; gap: 10px; }
    .design-presets { grid-template-columns: 1fr; }
    .design-section__title { font-size: 13px; }
    /* Кнопка сохранения — сплошная нижняя панель во всю ширину. */
    .design-actions {
        position: sticky; bottom: 0; margin: 0 -16px; padding: 12px 16px;
        background: var(--admin-sidebar-bg, #fff); border-top: 1px solid var(--admin-border, #e6e8ec);
        box-shadow: 0 -4px 16px rgba(20,33,51,.06);
    }
    .design-actions .btn { width: 100%; justify-content: center; }
    .design-manual__grid { grid-template-columns: 1fr; }
    .design-manual__wide { grid-column: auto; }
    .design-manual__custom-font { grid-template-columns: 1fr; }
    .settings-design-link { align-items: stretch; flex-direction: column; }
    .settings-design-link .btn { margin-left: 0; justify-content: center; }
}
@media (max-width: 420px) {
    .design-card { flex-basis: calc(50% - 6px); max-width: none; padding: 10px 8px; }
    .design-card__preview { height: 44px; }
}

/* ArtEditor: расширенный тулбар, HTML-режим, полноэкранный режим */
.art-editor__sep { width: 1px; align-self: stretch; margin: 2px 4px; background: var(--admin-border, #e6e8ec); }
.art-editor__btn:disabled { opacity: .35; cursor: default; }
.art-editor__btn.is-active { background: var(--admin-accent-soft, #eef0fe); border-color: var(--admin-accent, #5b52e5); color: var(--admin-accent, #5b52e5); }
.art-editor__source { display: block; width: 100%; min-height: 240px; border: 0; padding: 12px 14px; font-family: ui-monospace, monospace; font-size: 13px; line-height: 1.5; resize: vertical; outline: none; }
.art-editor--full { position: fixed; inset: 12px; z-index: 300; display: flex; flex-direction: column; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.art-editor--full .art-editor__area, .art-editor--full .art-editor__source { flex: 1; overflow: auto; }
.art-editor__area blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--admin-accent, #5b52e5); background: #f8f9fb; color: #444; }
.art-editor__area pre { background: #16161d; color: #e8e8ef; padding: 12px 14px; border-radius: 8px; overflow-x: auto; font-size: 13px; }
.art-editor__area table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.art-editor__area th, .art-editor__area td { border: 1px solid var(--admin-border-strong, #d5d9e0); padding: 6px 10px; min-width: 40px; }
.art-editor__area th { background: #f2f4f8; }
.art-editor__area img { max-width: 100%; height: auto; }

/* Превью палитр: две цветовые плашки (основной + акцент) */
.design-card__preview--palette-gov_blue::before,
.design-card__preview--palette-classic_red::before,
.design-card__preview--palette-emerald::before,
.design-card__preview--palette-graphite::before,
.design-card__preview--palette-violet::before,
.design-card__preview--palette-custom::before { background: none; }
.design-card__preview--palette-gov_blue { background: linear-gradient(90deg, #1f4b8e 60%, #0f766e 60%); }
.design-card__preview--palette-classic_red { background: linear-gradient(90deg, #1a1a1a 60%, #e63946 60%); }
.design-card__preview--palette-emerald { background: linear-gradient(90deg, #14532d 60%, #059669 60%); }
.design-card__preview--palette-graphite { background: linear-gradient(90deg, #111827 60%, #374151 60%); }
.design-card__preview--palette-violet { background: linear-gradient(90deg, #312e81 60%, #6d28d9 60%); }
.design-card__preview--palette-custom { background: repeating-conic-gradient(#e8eaf0 0 25%, #f7f8fa 0 50%) 0 0 / 16px 16px; }

/* Превью шаблонов */
.design-card__preview--site_template-gov { background: linear-gradient(135deg, #173a63 0%, #173a63 50%, #ffffff 50%, #ffffff 100%); }
.design-card__preview--site_template-modern_gov { background: linear-gradient(135deg, #2563eb 0%, #2563eb 50%, #f8fafc 50%, #f8fafc 100%); }
.design-card__preview--site_template-gov::before,
.design-card__preview--site_template-modern_gov::before { background: none; }

/* Превью шрифтов: образец «Аа» нужным стеком */
.design-card__preview--font_style-inter::before,
.design-card__preview--font_style-system::before,
.design-card__preview--font_style-serif::before,
.design-card__preview--font_style-custom::before { background: none; }
.design-card__preview--font_style-inter::after,
.design-card__preview--font_style-system::after,
.design-card__preview--font_style-serif::after,
.design-card__preview--font_style-custom::after {
    content: 'Аа'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 700; color: #1c2531;
}
.design-card__preview--font_style-inter::after { font-family: 'Inter', system-ui, sans-serif; }
.design-card__preview--font_style-system::after { font-family: system-ui, Arial, sans-serif; }
.design-card__preview--font_style-serif::after { font-family: Georgia, 'Times New Roman', serif; }
.design-card__preview--font_style-custom::after { content: 'Аа?'; font-family: inherit; color: #66707c; }

/* Мои конфигурации: форма сохранения */
.design-save-preset { display: flex; gap: 10px; max-width: 560px; }
.design-save-preset input { flex: 1; }
@media (max-width: 560px) { .design-save-preset { flex-direction: column; } .design-save-preset .btn { width: 100%; } }
.design-preset--user { background: #fff; }

/* Живое превью в панели «Дизайн» */
.design-preview { border: 1px solid var(--admin-border, #e6e8ec); border-radius: 12px; overflow: hidden; background: #fff; }
.design-preview__bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--admin-border, #e6e8ec); background: var(--admin-surface-soft); flex-wrap: wrap; }
.design-preview__bar .btn.is-active { background: var(--admin-accent, #5b52e5); color: #fff; border-color: var(--admin-accent, #5b52e5); }
.design-preview__stage { background: #eceef2; padding: 14px; display: flex; justify-content: center; }
.design-preview__frame { width: 100%; max-width: 100%; height: 540px; border: 0; border-radius: 8px; background: #fff; box-shadow: 0 6px 24px rgba(16,24,40,.12); transition: width .25s ease; }

/* Пикер макета шапки: карточки с мини-превью раскладки. */
.header-layout-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.header-layout-picker__option {
    position: relative; display: flex; flex-direction: column; gap: 6px;
    border: 2px solid var(--admin-border); border-radius: 12px; padding: 12px; cursor: pointer;
    background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.header-layout-picker__option:hover { border-color: color-mix(in srgb, var(--admin-accent, #5b52e5) 50%, var(--admin-border)); }
.header-layout-picker__option.is-selected { border-color: var(--admin-accent, #5b52e5); box-shadow: 0 4px 14px color-mix(in srgb, var(--admin-accent) 15%, transparent); }
.header-layout-picker__option input { position: absolute; opacity: 0; pointer-events: none; }
.header-layout-picker__label { font-weight: 600; font-size: 14px; }
.header-layout-picker__desc { font-size: 12px; color: var(--admin-muted, #667); line-height: 1.4; }
/* Мини-превью раскладки шапки. */
.header-layout-picker__preview {
    display: block; height: 46px; border-radius: 8px; border: 1px solid var(--admin-border);
    background: #f4f5f8; padding: 7px; position: relative;
}
.header-layout-picker__preview .hlp-logo,
.header-layout-picker__preview .hlp-nav { display: block; background: color-mix(in srgb, var(--admin-accent, #5b52e5) 55%, #bcc); border-radius: 3px; }
.header-layout-picker__preview .hlp-logo { width: 34%; height: 8px; margin-bottom: 6px; }
.header-layout-picker__preview .hlp-nav { width: 100%; height: 8px; background: #ccd2df; }
/* stacked: логотип сверху, полоса меню снизу (уже базовый вид). */
.header-layout-picker__preview--inline .hlp-logo { position: absolute; left: 7px; top: 50%; transform: translateY(-50%); margin: 0; width: 26%; }
.header-layout-picker__preview--inline .hlp-nav { margin-left: 32%; width: 66%; height: 8px; margin-top: 0; position: absolute; top: 50%; transform: translateY(-50%); right: 7px; }
.header-layout-picker__preview--centered .hlp-logo { margin: 0 auto 6px; width: 40%; }
.header-layout-picker__preview--centered .hlp-nav { width: 70%; margin: 0 auto; }
.header-layout-picker__preview--drawer .hlp-logo { position: absolute; left: 7px; top: 50%; transform: translateY(-50%); margin: 0; width: 30%; }
.header-layout-picker__preview--drawer .hlp-nav { width: 14px; height: 12px; background: #ccd2df; position: absolute; right: 7px; top: 50%; transform: translateY(-50%); }
.header-layout-picker + .hb-inline-fields { margin-top: 20px; }
.hb-divider-field { max-width: 360px; margin-top: 20px; }
.hb-behavior { display: flex; flex-direction: column; gap: 16px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--admin-border); }
.hb-behavior__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hb-behavior-card { display: block; min-width: 0; padding: 15px 16px; border: 1px solid var(--admin-border); border-radius: 10px; background: #f8f9fa; cursor: pointer; }
.hb-behavior-card:hover { border-color: color-mix(in srgb, var(--admin-accent) 45%, var(--admin-border)); background: #fff; }
.hb-behavior-card .hb-switch { width: 100%; font-weight: 700; }
.hb-behavior-card__title { min-width: 0; }
.hb-behavior-card__hint { display: block; margin: 9px 0 0 42px; color: var(--admin-muted); font-size: 12px; font-weight: 400; line-height: 1.5; }
.hb-behavior__note { margin: 0; padding: 12px 14px; border-left: 3px solid var(--admin-accent); background: var(--admin-accent-soft); color: var(--admin-muted); font-size: 13px; line-height: 1.55; }
.hb-behavior__media { padding: 16px; border: 1px solid var(--admin-border); border-radius: 10px; background: #fff; }
.hb-behavior__media .image-field__controls { flex-wrap: wrap; }
.hb-behavior__media .image-field__controls input[type="text"] { flex: 1 1 280px; }

/* Меню в админке: превью иконки пункта и вид разделителя. */
.menu-node__icon { display: inline-flex; align-items: center; }
.menu-node__icon svg { width: 16px; height: 16px; }
.menu-node--divider .menu-node__title { color: var(--admin-muted, #889); font-style: italic; }

/* Конструктор шапки: палитра, зоны и чипы микро-виджетов. */
.hdr-builder { display: grid; grid-template-columns: 220px 1fr; gap: 16px; margin-top: 8px; }
@media (max-width: 720px) { .hdr-builder { grid-template-columns: 1fr; } }
/* В новом конструкторе (.hb-section) шапка секции и зоны идут в столбик на всю ширину —
   легаси-грид .hdr-builder не должен зажимать зоны в узкую правую колонку. */
.hb-section.hdr-builder { display: block; gap: 0; margin-top: 0; }
.hdr-builder__palette-label,
.hdr-builder__zone-label { font-size: 12px; font-weight: 600; color: var(--admin-muted, #667); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.hdr-builder__dropzone {
    display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start;
    min-height: 56px; padding: 10px; border: 2px dashed var(--admin-border); border-radius: 10px;
    background: var(--admin-surface); transition: border-color .15s ease, background .15s ease;
}
.hdr-builder__dropzone.is-over { border-color: var(--admin-accent, #5b52e5); background: color-mix(in srgb, var(--admin-accent, #5b52e5) 8%, var(--admin-surface)); }
.hdr-builder__dropzone--palette { min-height: 120px; }
.hdr-builder__zones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 720px) { .hdr-builder__zones { grid-template-columns: 1fr; } }
.hdr-chip {
    display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 8px 4px 6px;
    background: #fff; border: 1px solid var(--admin-border); border-radius: 8px;
    font-size: 13px; font-weight: 500; cursor: grab; user-select: none;
    max-width: 100%; min-width: 0;
    box-shadow: 0 1px 2px rgba(16,24,40,.06);
}
.hdr-chip:active { cursor: grabbing; }
.hdr-chip.is-dragging { opacity: .4; }
.hdr-chip__grip { color: var(--admin-muted, #99a); font-size: 12px; line-height: 1; }
.hdr-chip__remove { border: 0; background: transparent; color: var(--admin-muted, #99a); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.hdr-chip__remove:hover { color: #d33; }

/* Вкладки конструктора шапки (Десктоп / Мобильный). */
.hdr-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--admin-surface); border: 1px solid var(--admin-border); border-radius: 10px; margin-bottom: 14px; }
.hdr-tabs__tab { border: 0; background: transparent; padding: 7px 16px; border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--admin-muted, #667); }
.hdr-tabs__tab.is-active { background: #fff; color: var(--admin-accent, #5b52e5); box-shadow: 0 1px 3px rgba(16,24,40,.1); }
.hdr-tabs__panel { display: none; }
.hdr-tabs__panel.is-active { display: block; }

/* ==========================================================================
   Конструктор шапки Pro Max: секции Top/Middle/Bottom, палитра, чипы-элементы.
   ========================================================================== */
.hb-palette { background: linear-gradient(180deg, #f7f9fc, #eef2f8); border: 1px solid var(--admin-border, #e1e3e8); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; }
.hb-palette__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #6b7789; margin-bottom: 10px; }
.hb-palette__items { display: flex; flex-wrap: wrap; gap: 8px; min-height: 46px; }
.hb-palette .hb-el__remove { display: none; }
.hb-palette .hb-el { cursor: grab; }

.hb-section { border: 1px solid var(--admin-border, #e1e3e8); border-radius: 12px; margin-bottom: 14px; overflow: hidden; background: #fff; }
.hb-section__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: #f7f9fc; border-bottom: 1px solid var(--admin-border, #e1e3e8); }
.hb-section__badge { padding: 3px 10px; border-radius: 999px; background: #173a63; color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.hb-section__badge--middle { background: #17999b; }
.hb-section__badge--bottom { background: #4a5a74; }
.hb-section__title { font-weight: 700; color: #1f2b3d; }
.hb-section__controls { margin-left: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hb-note { color: #6b7789; font-size: 12.5px; }
.hb-select { padding: 6px 10px; border: 1px solid var(--admin-border, #e1e3e8); border-radius: 8px; font-size: 13px; }

.hb-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #1f2b3d; cursor: pointer; user-select: none; }
.hb-switch input { position: absolute; opacity: 0; pointer-events: none; }
.hb-switch__track { width: 34px; height: 20px; border-radius: 999px; background: #cfd6e0; position: relative; transition: background .15s ease; flex: 0 0 auto; }
.hb-switch__track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s ease; }
.hb-switch input:checked + .hb-switch__track { background: #17999b; }
.hb-switch input:checked + .hb-switch__track::after { left: 16px; }
.hb-switch input:focus-visible + .hb-switch__track { outline: 3px solid #17999b; outline-offset: 2px; }

@media (max-width: 720px) {
    .hb-behavior__options { grid-template-columns: 1fr; }
    .hb-behavior__media { padding: 14px; }
}

.hb-zones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 14px 16px; }
@media (max-width: 900px) { .hb-zones { grid-template-columns: 1fr; } }
.hb-zone__label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #8a94a6; margin-bottom: 7px; }
.hb-zone__drop { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; min-height: 56px; padding: 9px; border: 2px dashed #d6dce6; border-radius: 10px; background: #fbfcfe; transition: border-color .15s ease, background .15s ease; }
.hb-zone__drop.is-over { border-color: #17999b; background: #f0fafa; }

.hb-el { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; background: #fff; border: 1px solid #dde3ec; border-radius: 9px; box-shadow: 0 1px 2px rgba(19,42,92,.07); font-size: 13px; font-weight: 600; color: #1f2b3d; cursor: grab; transition: box-shadow .15s ease, border-color .15s ease, transform .12s ease; max-width: 100%; min-width: 0; }
.hb-el__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* В узких зонах (Слева/Центр/Справа) чипы стоят в столбик во всю ширину; подпись — в одну строку. */
.hb-zone__drop .hdr-chip { width: 100%; }
.hb-palette__items .hdr-chip { width: auto; }
.hb-el:hover { border-color: #17999b; box-shadow: 0 4px 12px rgba(19,42,92,.12); }
.hb-el:active { cursor: grabbing; }
.hb-el.is-dragging { opacity: .45; transform: scale(.97); }
.hb-el__grip { color: #b6bfcd; display: inline-flex; }
.hb-el__icon { display: inline-flex; color: #17999b; }
.hb-el__icon svg { width: 16px; height: 16px; }
.hb-el__remove { border: 0; background: transparent; color: #98a3b5; font-size: 15px; line-height: 1; cursor: pointer; padding: 2px 3px; border-radius: 5px; }
.hb-el__remove:hover { color: #d33; background: #fdeaea; }

.hb-tabs { display: inline-flex; background: #eef2f8; border-radius: 9px; padding: 3px; gap: 2px; }
.hb-tabs .hdr-tabs__tab { border: 0; background: transparent; padding: 6px 14px; border-radius: 7px; font-size: 13px; font-weight: 700; color: #6b7789; cursor: pointer; }
.hb-tabs .hdr-tabs__tab.is-active { background: #fff; color: #173a63; box-shadow: 0 1px 3px rgba(19,42,92,.12); }

/* Колонки не растягиваем до 1fr (иначе на широком экране поля раздуваются
   на пол-экрана) — фиксируем разумную ширину и пакуем влево. */
.hb-inline-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 300px)); gap: 14px 20px; justify-content: start; }
/* Строка базовых настроек: поля уже, числовые «px» — совсем компактные. */
.hb-inline-fields--settings { grid-template-columns: repeat(auto-fit, minmax(180px, 230px)); }
.hb-inline-fields--settings input[type="number"] { max-width: 130px; }
/* Поля логотипов (превью + URL + кнопки) требуют места — широкие колонки,
   контролы переносятся, чтобы «Файл не выбран» не обрезался до «Ф...н». */
.hb-inline-fields--logos { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.hb-inline-fields--logos .image-field__controls { flex-wrap: wrap; }
.hb-inline-fields--logos .image-field__controls input[type="text"] { flex: 1 1 170px; }
.hb-inline-fields--logos .image-field__upload { min-width: 0; }

/* Конструктор футера Pro Max: колонки-карточки с перестановкой. */
.fb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.fb-grid > .repeater-row, .fb-card { border: 1px solid var(--admin-border, #e1e3e8); border-radius: 12px; background: #fff; padding: 14px 16px; box-shadow: 0 1px 3px rgba(19,42,92,.06); }
.fb-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.fb-card__badge { padding: 3px 10px; border-radius: 999px; background: #4a5a74; color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.fb-card__tools { display: inline-flex; gap: 4px; }
.fb-move { width: 30px; height: 30px; border: 1px solid var(--admin-border, #e1e3e8); border-radius: 8px; background: #f7f9fc; color: #173a63; cursor: pointer; font-size: 14px; line-height: 1; }
.fb-move:hover { background: #173a63; color: #fff; border-color: #173a63; }

/* --- Панель явного сохранения порядка (перетаскивание блоков/меню) --- */
/* Копит несохранённые изменения перетаскивания и применяет их по кнопке —
   вместо прежнего мгновенного автосохранения на каждый drop. */
.reorder-bar {
    position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
    z-index: 400; display: flex; align-items: center; gap: 12px;
    padding: 10px 12px 10px 18px; background: #fff;
    border: 1px solid var(--admin-border, #e1e3e8); border-radius: 12px;
    box-shadow: 0 12px 34px rgba(19, 42, 92, .22);
    max-width: calc(100vw - 32px);
}
.reorder-bar[hidden] { display: none; }
.reorder-bar__text { font-size: 14px; font-weight: 600; color: var(--admin-text, #1f2b3d); }

/* Панель под полем SVG-иконки: выбрать файл из медиа / очистить. */
.icon-field__tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* Ряд полей выбора цвета (фон/текст/кнопка) в конструкторе блоков. */
.colorfield-row { display: flex; flex-wrap: wrap; gap: 16px; margin: 6px 0 14px; }
.colorfield { min-width: 150px; }
.colorfield input[type="color"] { width: 100%; height: 38px; padding: 2px; cursor: pointer; }
.colorfield__off { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 400; font-size: 12px; color: var(--admin-muted); }
.colorfield__off input { width: auto; }

/* ============================================================================
   Dark Mode Support (Автоматический темный режим под тему ОС)
   ============================================================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --admin-topbar-bg: #0f172a;
        --admin-topbar-text: #f8fafc;
        --admin-sidebar-bg: #1e293b;
        --admin-sidebar-text: #cbd5e1;
        --admin-sidebar-muted: #64748b;
        --admin-sidebar-hover: #334155;
        --admin-sidebar-active: #475569;
        --admin-bg: #0f172a;
        --admin-surface: #1e293b;
        --admin-text: #f1f5f9;
        --admin-muted: #94a3b8;
        --admin-border: #334155;
        --admin-border-strong: #475569;
        --admin-accent-soft: rgba(59, 130, 246, 0.12);
    }
    body {
        background-color: var(--admin-bg) !important;
        color: var(--admin-text) !important;
    }
    input, select, textarea {
        background-color: #1e293b !important;
        color: var(--admin-text) !important;
        border-color: var(--admin-border-strong) !important;
    }
    input[type="file"]::file-selector-button {
        background: #0f172a !important;
        color: var(--admin-text) !important;
        border-color: var(--admin-border-strong) !important;
    }
    input[type="file"]::file-selector-button:hover {
        background: #1e293b !important;
    }
    input::placeholder, textarea::placeholder {
        color: #64748b !important;
    }
    code {
        background: #334155 !important;
        color: #f8fafc !important;
    }
    .btn {
        background: #1e293b !important;
        color: var(--admin-text) !important;
        border-color: var(--admin-border-strong) !important;
    }
    .btn:hover {
        background: #334155 !important;
        border-color: var(--admin-accent) !important;
        color: #fff !important;
        text-decoration: none !important;
    }
    .btn--primary {
        background: var(--admin-accent) !important;
        color: #fff !important;
        border-color: var(--admin-accent) !important;
    }
    .btn--primary:hover {
        background: var(--admin-accent-hover) !important;
    }
    .admin-search__results {
        background: #1e293b !important;
        border-color: var(--admin-border) !important;
        box-shadow: 0 16px 40px rgba(0,0,0,.5) !important;
    }
    .admin-search__item {
        color: var(--admin-text) !important;
        border-bottom-color: var(--admin-border) !important;
    }
    .admin-search__item:hover {
        background: var(--admin-sidebar-hover) !important;
    }
    /* Lists, tables, cards */
    .admin-table th {
        background-color: #1e293b !important;
        border-bottom-color: var(--admin-border) !important;
        color: var(--admin-text) !important;
    }
    .admin-table td {
        border-bottom-color: var(--admin-border) !important;
    }
    .admin-table tr:hover td {
        background-color: var(--admin-sidebar-hover) !important;
    }
    /* Stat cards */
    .stat-grid a.stat-card {
        background-color: #1e293b !important;
        border: 1px solid var(--admin-border) !important;
        color: var(--admin-text) !important;
    }
    .stat-grid a.stat-card:hover {
        background-color: var(--admin-sidebar-hover) !important;
        border-color: var(--admin-accent) !important;
        text-decoration: none !important;
    }
    .stat-card__value {
        color: var(--admin-accent) !important;
    }
    /* Forms, cards, blocks editor */
    .form-card, .design-preset, .revision-item, .audit-item, .block-list-item, .menu-node__inner {
        background-color: #1e293b !important;
        border-color: var(--admin-border) !important;
        color: var(--admin-text) !important;
    }
    .design-preset:hover, .block-list-item:hover, .menu-node__inner:hover {
        border-color: var(--admin-border-strong) !important;
    }
    .design-preset.is-active, .menu-node.is-active > .menu-node__inner {
        border-color: var(--admin-accent) !important;
        background-color: var(--admin-accent-soft) !important;
    }
    /* Block editor fields */
    .block-list-item__body {
        border-top-color: var(--admin-border) !important;
    }
    .art-editor__area {
        background-color: #1e293b !important;
        border-color: var(--admin-border) !important;
    }
    .hb-switch__track {
        background: #334155 !important;
    }
    .hb-switch {
        color: var(--admin-text) !important;
    }
    /* WYSIWYG editor */
    trix-editor, .trix-content, .editor-statusbar {
        background-color: #1e293b !important;
        color: var(--admin-text) !important;
        border-color: var(--admin-border) !important;
    }
    trix-toolbar {
        background-color: #0f172a !important;
        border-color: var(--admin-border) !important;
    }
    trix-toolbar button {
        background-color: #1e293b !important;
        border-color: var(--admin-border-strong) !important;
        color: var(--admin-text) !important;
    }
    /* Modals, alerts, flash messages */
    .flash-message {
        background-color: #1e293b !important;
        border-color: var(--admin-border) !important;
        color: var(--admin-text) !important;
    }
    .flash-message--success {
        border-left-color: var(--admin-success) !important;
    }
    .flash-message--error {
        border-left-color: var(--admin-danger) !important;
    }
    .fb-move {
        background: #1e293b !important;
        color: #fff !important;
        border-color: var(--admin-border) !important;
    }
    .fb-move:hover {
        background: var(--admin-accent) !important;
        border-color: var(--admin-accent) !important;
    }
    .reorder-bar {
        background: #1e293b !important;
        border-color: var(--admin-border) !important;
        box-shadow: 0 12px 34px rgba(0,0,0,.4) !important;
    }
    .reorder-bar__text {
        color: var(--admin-text) !important;
    }
    .badge--published, .badge--success { background: rgba(16, 185, 129, 0.12) !important; color: #10b981 !important; }
    .badge--draft { background: rgba(148, 163, 184, 0.12) !important; color: #94a3b8 !important; }
    .badge--danger { background: rgba(239, 68, 68, 0.12) !important; color: #ef4444 !important; }
    .badge { background: rgba(148, 163, 184, 0.12) !important; color: #94a3b8 !important; }
    .badge--accent { background: rgba(96, 165, 250, 0.15) !important; color: #60a5fa !important; }
}

/* --- Сетка дашборда и лог действий --- */
.dashboard-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; margin-top: 24px; }
@media (max-width: 960px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* «Продолжить работу»: последние редактированные материалы. */
.continue-card { max-width: none; margin-top: 24px; }
.continue-list { display: flex; flex-direction: column; margin-top: 12px; }
.continue-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 0 -12px;
    border-radius: var(--admin-radius-sm); color: var(--admin-text); text-decoration: none;
}
.continue-item:hover { background: var(--admin-accent-soft); text-decoration: none; }
.continue-item + .continue-item { border-top: 1px solid var(--admin-border); }
.continue-item__kind { flex-shrink: 0; min-width: 76px; font-size: 12px; color: var(--admin-muted); }
.continue-item__title { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.continue-item:hover .continue-item__title { color: var(--admin-accent-hover); }
.continue-item__time { flex-shrink: 0; font-size: 12px; color: var(--admin-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
    .continue-item { flex-wrap: wrap; gap: 6px 10px; }
    .continue-item__title { flex-basis: 100%; white-space: normal; }
}

.activity-feed { display: flex; flex-direction: column; gap: 14px; }
.activity-item { padding: 10px 0; }
.activity-item:not(:last-child) { border-bottom: 1px solid var(--admin-border); }
.activity-item__meta { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
.activity-item__time { color: var(--admin-muted); font-size: 12px; }
.activity-item__desc { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.activity-item__badge {
    display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em; color: #fff; line-height: 1.2;
}
.activity-item__badge--post { background: var(--admin-success, #008a20); }
.activity-item__badge--put, .activity-item__badge--patch { background: var(--admin-accent, #2271b1); }
.activity-item__badge--delete { background: var(--admin-danger, #b32d2e); }
.activity-item__badge--auth { background: #64748b; }

/* Бейджи статусов для списков и таблиц */
.status-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
    line-height: 1.2; width: max-content;
}
.status-badge--success { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.status-badge--warning { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.status-badge--danger { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.status-badge--info { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.status-badge--neutral { background: rgba(148, 163, 184, 0.12); color: #94a3b8; }

/* Drag and Drop Uploader */
.dropzone {
    border: 2px dashed var(--admin-border-strong);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    background: var(--admin-surface);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    margin-top: 6px;
}
.dropzone:hover, .dropzone.is-dragover {
    border-color: var(--admin-accent);
    background: var(--admin-accent-soft);
}
.dropzone input[type="file"] {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; cursor: pointer;
}
.dropzone__text {
    font-size: 14px;
    color: var(--admin-muted);
}
.dropzone__text strong {
    color: var(--admin-accent);
}

/* --- Модальное подтверждение (замена нативного window.confirm) --- */
.admin-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: color-mix(in srgb, #1d2327 55%, transparent);
    opacity: 0;
    transition: opacity .15s ease;
}
.admin-modal-overlay.is-open { opacity: 1; }
.admin-modal {
    width: 100%;
    max-width: 440px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    box-shadow: var(--admin-shadow-lg);
    transform: translateY(10px) scale(.98);
    transition: transform .15s ease;
    overflow: hidden;
}
.admin-modal-overlay.is-open .admin-modal { transform: none; }
.admin-modal__body { display: flex; gap: 14px; padding: 24px 24px 4px; }
.admin-modal__icon {
    flex: 0 0 auto;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700;
    background: var(--admin-accent-soft);
    color: var(--admin-accent);
}
.admin-modal__msg {
    margin: 7px 0 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--admin-text);
}
.admin-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 24px 20px;
}
@media (prefers-reduced-motion: reduce) {
    .admin-modal-overlay, .admin-modal { transition: none; }
}



/* --- Готовые сборки страниц --- */
.preset-picker > summary { cursor: pointer; list-style: none; }
.preset-picker > summary::-webkit-details-marker { display: none; }
.preset-picker > summary::before { content: '▸'; display: inline-block; margin-right: 8px; color: var(--admin-muted); transition: transform .15s ease; }
.preset-picker[open] > summary::before { transform: rotate(90deg); }
.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.preset-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.preset-card:hover { border-color: var(--admin-accent); box-shadow: 0 2px 10px rgba(16,24,40,.06); }
.preset-card__title { margin: 0; font-size: .98rem; }
.preset-card__desc { margin: 0; font-size: .84rem; color: var(--admin-muted); line-height: 1.45; }
/* Состав сборки — служебный список, поэтому мельче и приглушённее описания. */
.preset-card__outline { margin: 0; padding-left: 18px; font-size: .8rem; color: var(--admin-muted); line-height: 1.7; }
.preset-card__foot { display: flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 6px; }
.preset-card__foot select { flex: 1; min-width: 0; }

/* --- Типографика: шкала и предпросмотр --- */
.typo-scale { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.typo-scale__opt {
    display: grid;
    grid-template-columns: auto auto;
    align-items: baseline;
    gap: 2px 8px;
    padding: 12px 14px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.typo-scale__opt:hover { border-color: var(--admin-accent); }
.typo-scale__opt:has(input:checked) { border-color: var(--admin-accent); background: var(--admin-accent-soft); }
.typo-scale__opt input { grid-row: 1; margin: 0; }
.typo-scale__name { font-weight: 600; }
.typo-scale__ratio { color: var(--admin-muted); font-variant-numeric: tabular-nums; }
/* Пояснение занимает всю ширину карточки под названием. */
.typo-scale__hint { grid-column: 1 / -1; font-size: .82rem; color: var(--admin-muted); line-height: 1.4; }

.typo-preview { margin: 4px 0 8px; padding: 14px 16px; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); background: #fff; }
.typo-preview__head { font-size: .82rem; color: var(--admin-muted); margin-bottom: 10px; }
.typo-preview__row { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.typo-preview__item { display: flex; flex-direction: column; gap: 2px; }
.typo-preview__sample { font-weight: 700; color: var(--admin-accent); }
.typo-preview__size { font-size: .75rem; color: var(--admin-muted); font-variant-numeric: tabular-nums; }

details.design-manual > summary { cursor: pointer; list-style: none; }
details.design-manual > summary::-webkit-details-marker { display: none; }
details.design-manual > summary::before { content: '▸'; display: inline-block; margin-right: 8px; color: var(--admin-muted); transition: transform .15s ease; }
details.design-manual[open] > summary::before { transform: rotate(90deg); }

/* Поле картинки в строке повторителя: input + кнопка медиабиблиотеки. */
.repeater-media { display: flex; gap: 8px; align-items: center; }
.repeater-media input[type="text"] { flex: 1; min-width: 0; }
.repeater-media .btn { white-space: nowrap; }

/* --- Интерактивный Spotlight-блик при наведении (Админ-панель) --- */
.stat-card, .design-card, .hb-behavior-card, .fb-card, .preset-card, .form-card, 
.design-preset, .revision-item, .audit-item, .block-list-item, .menu-node__inner, .btn {
    position: relative;
    overflow: hidden;
}
.stat-card::before, .design-card::before, .hb-behavior-card::before, .fb-card::before, .preset-card::before, .form-card::before, 
.design-preset::before, .revision-item::before, .audit-item::before, .block-list-item::before, .menu-node__inner::before, .btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(220px circle at var(--mouse-x, 0) var(--mouse-y, 0), color-mix(in srgb, var(--admin-accent, #5b52e5) 7%, transparent), transparent 80%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}
.stat-card:hover::before, .design-card:hover::before, .hb-behavior-card:hover::before, .fb-card:hover::before, .preset-card:hover::before, .form-card:hover::before, 
.design-preset:hover::before, .revision-item:hover::before, .audit-item:hover::before, .block-list-item:hover::before, .menu-node__inner:hover::before, .btn:hover::before {
    opacity: 1;
}

/* --- Интерактивный Spotlight-блик для полей ввода в админке --- */
.admin-main input[type="text"], .admin-main input[type="email"], .admin-main input[type="password"], .admin-main input[type="search"], .admin-main textarea, .admin-main select {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-image 0.3s ease;
}
.admin-main input[type="text"]:hover, .admin-main input[type="email"]:hover, .admin-main input[type="password"]:hover, .admin-main input[type="search"]:hover, .admin-main textarea:hover, .admin-main select:hover,
.admin-main input[type="text"]:focus, .admin-main input[type="email"]:focus, .admin-main input[type="password"]:focus, .admin-main input[type="search"]:focus, .admin-main textarea:focus, .admin-main select:focus {
    background-image: radial-gradient(180px circle at var(--mouse-x, 0) var(--mouse-y, 0), color-mix(in srgb, var(--admin-accent, #5b52e5) 6%, transparent), transparent 100%) !important;
}
