/* ===================== ШРИФТЫ ===================== */
@font-face {
    font-family: 'Stem';
    src: url('../assets/fonts/Stem-SemiLight.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Stem';
    src: url('../assets/fonts/Stem-Medium.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Stem';
    src: url('../assets/fonts/Stem-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Stem';
    src: url('../assets/fonts/Stem-Light.ttf') format('truetype');
    font-weight: 300;
    font-display: swap;
}

/* ===================== ПЕРЕМЕННЫЕ ===================== */
:root {
    --primary-blue: #040D2E;
    --secondary-blue: #011C73;
    --light-blue: #051246;
    --accent-blue: #052091;
    --bright-red: #AB052B;
    --light-grey: #EDEBEC;
    --medium-grey: #9C9C9A;
    --dark-grey: #C6C4C5;
    --brand-red: #EB002D;
    --brand-blue: #001B72;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --background-light: #f8fafc;
    --border-light: #e9ecef;
    --radius: 16px;
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Атрибут hidden должен прятать ВСЕГДА — иначе .btn{display:inline-flex}
   перебивает браузерное [hidden]{display:none} (напр. кнопка «Профиль» в ховере) */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: 'Stem', Arial, sans-serif;
    background: var(--background-light);
    background-image: url('../img/Graphika_RGB_grey.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* clip, а не hidden: overflow-x:hidden на body делает его скролл-контейнером
       и ЛОМАЕТ position:sticky у шапки (шапка «уезжала» при прокрутке) */
    overflow-x: clip;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(248, 250, 252, 0.93);
    z-index: -1;
    pointer-events: none;
}

.page-wrapper { flex: 1 0 auto; display: flex; flex-direction: column; width: 100%; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; width: 100%; }
.container-narrow { max-width: 860px; margin: 0 auto; padding: 0 20px; width: 100%; }

img, video { max-width: 100%; height: auto; }
a { color: var(--brand-blue); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(4, 13, 46, 0.18); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(4, 13, 46, 0.32); background-clip: content-box; }
* { scrollbar-width: thin; scrollbar-color: rgba(4,13,46,0.22) transparent; }

/* ===================== ЛОГОТИП ===================== */
.brand-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo img { height: 44px; width: auto; }
.brand-logo .brand-text { display: flex; flex-direction: column; line-height: 1.02; }
.brand-logo .brand-text .b1,
.brand-logo .brand-text .b2 {
    font-family: 'Stem', sans-serif;
    font-weight: 500;
    font-size: 20px;
    color: var(--brand-blue);
    letter-spacing: 0;
}

/* ===================== ШАПКА ===================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    -webkit-backdrop-filter: blur(10px);
    height: 66px;
    display: flex;
    align-items: center;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}
/* При прокрутке (класс вешает forms.js) шапка теряет прозрачность и отделяется тенью */
.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 2px 14px rgba(4, 13, 46, 0.08);
}
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

/* Кнопка-аватар */
/* Триггер пользователя в шапке */
.user-trigger {
    display: inline-flex; align-items: center; gap: 10px; border: none; cursor: pointer;
    background: transparent; padding: 4px 16px 4px 4px; border-radius: 30px;
    font-family: 'Stem', sans-serif; transition: background 0.2s ease;
}
.user-trigger:hover { background: rgba(0, 27, 114, 0.06); }
.avatar-btn, .user-trigger .avatar-btn-inner {
    width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer; flex-shrink: 0;
    background: var(--brand-blue); color: #fff; font-family: 'Stem', sans-serif; font-weight: 600;
    font-size: 17px; display: flex; align-items: center; justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.2s ease; box-shadow: 0 2px 8px rgba(0, 27, 114, 0.25);
}
.avatar-btn:hover { transform: scale(1.06); box-shadow: 0 4px 14px rgba(0, 27, 114, 0.35); }
.user-trigger .avatar-name { font-weight: 500; font-size: 15px; color: var(--text-dark); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-trigger .caret { font-size: 12px; color: var(--text-light); transition: transform 0.2s ease; }
.user-menu.open .user-trigger .caret { transform: rotate(180deg); }

/* Меню пользователя — выпадающий блок, закреплённый под аватаром (внутри центрированной шапки) */
.user-menu { position: relative; }
.app-menu {
    position: absolute; top: calc(100% + 10px); right: 0; width: 290px; max-width: calc(100vw - 32px);
    background: #fff; border: 1px solid var(--border-light); border-radius: 16px;
    box-shadow: 0 16px 50px rgba(4, 13, 46, 0.22); overflow: hidden; z-index: 2000;
    display: flex; flex-direction: column;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.user-menu.open .app-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.app-menu-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border-light); }
.avatar.lg { width: 42px; height: 42px; border-radius: 50%; background: var(--brand-blue); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 18px; flex-shrink: 0; }
.am-name { font-weight: 600; color: var(--text-dark); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-mail { font-size: 12.5px; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-menu-nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.app-menu-nav a {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
    text-decoration: none; color: var(--text-dark); font-weight: 500; font-size: 14.5px; transition: background 0.15s ease;
}
.app-menu-nav a:hover { background: var(--background-light); }
.app-menu-nav a.active { background: rgba(0,27,114,0.07); color: var(--brand-blue); }
.app-menu-nav a i { width: 18px; text-align: center; color: var(--brand-blue); font-size: 15px; }
.app-menu-foot { padding: 10px 12px 14px; }
.am-logout {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 10px;
    border: 1.5px solid var(--brand-red); background: transparent; color: var(--brand-red); border-radius: 10px;
    font-family: 'Stem', sans-serif; font-weight: 500; font-size: 14px; cursor: pointer; transition: all 0.2s ease;
}
.am-logout:hover { background: var(--brand-red); color: #fff; }
@media (max-width: 760px) {
    .user-trigger .avatar-name, .user-trigger .caret { display: none; }
}

/* ===================== КНОПКИ ===================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: 26px; font-family: 'Stem', sans-serif;
    font-weight: 500; font-size: 15px; text-decoration: none; cursor: pointer;
    border: 2px solid transparent; transition: all 0.25s ease; line-height: 1;
}
.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.btn-lg { padding: 13px 28px; font-size: 16.5px; }
.btn-block { width: 100%; }
.btn-red { background: var(--brand-red); color: var(--white); border-color: var(--brand-red); }
.btn-red:hover { background: var(--bright-red); border-color: var(--bright-red); }
.btn-blue { background: var(--brand-blue); color: var(--white); border-color: var(--brand-blue); }
.btn-blue:hover { background: var(--secondary-blue); border-color: var(--secondary-blue); }
.btn-outline { background: transparent; color: var(--brand-blue); border-color: var(--brand-blue); }
.btn-outline:hover { background: var(--brand-blue); color: var(--white); }
.btn-outline-red { background: transparent; color: var(--brand-red); border-color: var(--brand-red); }
.btn-outline-red:hover { background: var(--brand-red); color: var(--white); }
.btn-ghost { background: transparent; color: var(--brand-blue); border-color: var(--brand-blue); }
.btn-ghost:hover { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); box-shadow: 0 4px 14px rgba(0, 27, 114, 0.30); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===================== HERO ===================== */
.hero {
    background: linear-gradient(135deg, var(--primary-blue), var(--brand-blue));
    color: var(--white);
    border-radius: 0 0 32px 32px;
    padding: 64px 0 72px;
    position: relative;
    overflow: hidden;
}
.hero h1 {
    font-family: 'Stem', sans-serif;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.1;
}
.hero p { font-size: clamp(16px, 2.2vw, 20px); max-width: 720px; opacity: 0.92; margin-bottom: 28px; }
.hero .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.14);
    padding: 7px 16px; border-radius: 20px; font-size: 14px; margin-bottom: 22px;
}

/* ===================== СЕКЦИИ ===================== */
.section { padding: 48px 0; }
.section-title {
    font-family: 'Stem', sans-serif; font-weight: 700;
    font-size: 30px; color: var(--brand-blue); margin-bottom: 8px;
}
.section-sub { color: var(--text-light); margin-bottom: 28px; font-size: 16px; }
/* ===================== БЕЙДЖИ ===================== */
.badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 14px;
    font-size: 12.5px; font-weight: 500; white-space: nowrap;
}
.badge-blue { background: rgba(0, 27, 114, 0.10); color: var(--brand-blue); }
.badge-red { background: rgba(235, 0, 45, 0.10); color: var(--brand-red); }
.badge-green { background: #16a34a; color: #fff; }
.badge-grey { background: var(--light-grey); color: var(--text-light); }
.badge-amber { background: rgba(217, 119, 6, 0.12); color: #b45309; }
.badge-cyan { background: rgba(8, 145, 178, 0.12); color: #0e7490; }
.badge-purple { background: rgba(124, 58, 237, 0.12); color: #6d28d9; }
.badge-live { background: var(--brand-red); color: #fff; }
/* Статус-бейдж поверх обложки карточки — читаемый на любом фоне */
.cab-status .badge { box-shadow: 0 2px 8px rgba(0,0,0,0.18); }
.cab-status .badge-grey { background: rgba(255,255,255,0.95); color: var(--text-dark); }
.badge-live .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ===================== КАРТОЧКА / ПАНЕЛЬ ===================== */
.panel {
    background: var(--white); 
    border-radius: var(--radius); padding: 28px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); margin-bottom: 22px;
}
.panel-title { font-size: 22px; font-weight: 700; color: var(--brand-blue); margin-bottom: 6px; font-family: 'Stem', sans-serif; }

/* ===================== ФОРМЫ ===================== */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 500; margin-bottom: 7px; color: var(--text-dark); font-size: 15px; }
.form-label .req { color: var(--brand-red); }
.form-hint { font-size: 13px; color: var(--text-light); margin-top: 5px; }
.form-control, .form-select, textarea.form-control {
    width: 100%; padding: 12px 14px; border: 1.5px solid var(--border-light); border-radius: 12px;
    font-family: 'Stem', sans-serif; font-size: 15px; color: var(--text-dark); background: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus, .form-select:focus, textarea.form-control:focus {
    outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(0, 27, 114, 0.10);
}
textarea.form-control { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.input-error { border-color: var(--brand-red) !important; }
.error-text { color: var(--brand-red); font-size: 13px; margin-top: 6px; }

.checkbox-line { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.checkbox-line input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand-red); flex-shrink: 0; }
.switch-card {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px 16px; border: 1.5px solid var(--border-light); border-radius: 12px; margin-bottom: 12px;
}
.switch-card .sc-label { font-weight: 500; }
.switch-card .sc-desc { font-size: 13px; color: var(--text-light); margin-top: 2px; }

/* Тумблер */
.toggle { position: relative; width: 50px; height: 28px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
    position: absolute; inset: 0; background: var(--dark-grey); border-radius: 28px; cursor: pointer; transition: 0.25s;
}
.toggle .slider::before {
    content: ''; position: absolute; height: 22px; width: 22px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%; transition: 0.25s;
}
.toggle input:checked + .slider { background: var(--brand-red); }
.toggle input:checked + .slider::before { transform: translateX(22px); }

/* ===================== ОПРОС (прохождение) =====================
   Карточную обёртку даёт .form-sheet — здесь только типографика вопроса */
.survey-question { background: var(--white); }
.survey-question .q-num { font-size: 13px; color: var(--brand-red); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.survey-question h3 {
    font-family: 'Stem', sans-serif; font-size: 18px; font-weight: 600; line-height: 1.4;
    margin: 0 0 10px; color: var(--brand-blue); letter-spacing: -0.1px;
}
.survey-question .q-desc { color: var(--text-light); font-size: 14.5px; line-height: 1.55; margin-bottom: 16px; }
.survey-question .q-desc:last-child, .survey-question h3:last-child { margin-bottom: 0; }
/* красная подсветка невалидного вопроса — лёгкий фон слева, без «прыжка» рамки */
.survey-question.q-invalid { box-shadow: inset 3px 0 0 var(--brand-red); background: rgba(235,0,45,0.02); }
.q-req-star { color: var(--brand-red); font-weight: 700; margin-left: 2px; }
.q-media { max-width: 100%; max-height: 360px; border-radius: 12px; margin: 4px 0 14px; display: block; border: 1px solid var(--border-light); }
.file-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--background-light); border: 1px solid var(--border-light); border-radius: 10px; padding: 9px 14px; margin: 4px 0 14px; text-decoration: none; color: var(--brand-blue); font-size: 14.5px; }
.file-chip:hover { border-color: var(--brand-blue); }
.file-chip a { color: var(--brand-blue); text-decoration: none; }
.option-row {
    display: flex; align-items: center; gap: 14px; padding: 15px 18px; border: 1.5px solid var(--border-light);
    border-radius: 14px; margin-bottom: 10px; cursor: pointer; transition: all 0.18s ease;
    font-size: 15.5px; position: relative; background: #fff;
}
.option-row:hover { border-color: var(--brand-blue); background: rgba(0,27,114,0.03); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(4,13,46,0.06); }
.option-row input { width: 20px; height: 20px; accent-color: var(--brand-red); flex-shrink: 0; }
.option-row.checked { border-color: var(--brand-red); background: rgba(235,0,45,0.05); font-weight: 500; }

/* Рейтинг — звёзды */
.rating-stars { display: flex; gap: 8px; font-size: 32px; }
.rating-stars label { cursor: pointer; color: var(--light-grey); transition: color 0.15s, transform 0.15s; }
.rating-stars label:hover { transform: scale(1.12); }
.rating-stars input { display: none; }
.rating-stars label.on { color: #f5b301; }

/* Шкала — кнопки-плитки, заполняют ширину */
.scale-row { display: flex; gap: 8px; flex-wrap: wrap; }
.scale-row label {
    flex: 1 1 46px; min-width: 46px; max-width: 68px; height: 48px; border: 1.5px solid var(--border-light);
    border-radius: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer;
    font-weight: 600; font-size: 15px; color: var(--text-dark); background: #fff; transition: all 0.16s;
}
.scale-row label:hover { border-color: var(--brand-blue); background: rgba(0,27,114,0.04); }
.scale-row input { display: none; }
.scale-row label.on { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue);
    box-shadow: 0 4px 12px rgba(0,27,114,0.25); }

/* Согласие на обработку ПД — заметная плашка внизу формы */
.qf-consent { margin: 16px 0; padding: 16px 18px; border-radius: 14px;
    /* background: var(--background-light); */
    /* border: 1.5px solid var(--border-light); */ }
.qf-consent-label { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; font-size: 14px; color: var(--text-dark); line-height: 1.5; }
.qf-consent-check { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--brand-red); flex-shrink: 0; cursor: pointer; }
.qf-consent a { color: var(--brand-blue); text-decoration: underline; }
/* Звёздочка «обязательно» — всегда фирменный красный, не перекрашивается акцентом формы */
.qf-req { color: #EB002D; }

/* ===================== РЕЗУЛЬТАТЫ ===================== */
.result-block { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); margin-bottom: 18px; }
.result-block h3 { font-size: 18px; margin-bottom: 4px; }
.result-block .rb-meta { font-size: 13px; color: var(--text-light); margin-bottom: 16px; }
.bar-row { margin-bottom: 14px; }
.bar-head { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 14.5px; }
.bar-head .bl { font-weight: 500; }
.bar-head .bv { color: var(--text-light); white-space: nowrap; }
.bar-track { height: 14px; background: var(--light-grey); border-radius: 8px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--brand-blue), var(--accent-blue)); border-radius: 8px; width: 0; transition: width 0.6s ease; }
.bar-fill.red { background: linear-gradient(90deg, var(--brand-red), var(--bright-red)); }
.voters { margin-top: 6px; }
.voters summary { cursor: pointer; font-size: 13px; color: var(--brand-blue); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.voters summary::-webkit-details-marker { display: none; }
.voters-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.text-answers { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.text-answer { background: var(--light-grey); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.big-avg { font-size: 40px; font-weight: 700; color: var(--brand-blue); font-family: 'Stem', sans-serif; }

/* ===================== СТАТЫ ===================== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); }
.stat-card .sv { font-size: 34px; font-weight: 700; color: var(--brand-blue); font-family: 'Stem', sans-serif; }
.stat-card .sl { color: var(--text-light); font-size: 14px; }
.stat-card .si { font-size: 22px; color: var(--brand-red); float: right; }

/* ===================== ТАБЛИЦА ===================== */
.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.data-table th, .data-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border-light); font-size: 14.5px; }
.data-table th:first-child, .data-table td:first-child { width: 42%; }
.data-table th { background: var(--light-grey); font-weight: 600; color: var(--text-dark); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(0,27,114,0.02); }

/* Адаптив: широкая таблица превращается в карточки на узких экранах */
@media (max-width: 600px) {
    .table-panel { padding: 0 !important; overflow: visible !important; background: transparent; border: none; box-shadow: none; }
    .data-table.cards-sm,
    .data-table.cards-sm tbody,
    .data-table.cards-sm tr,
    .data-table.cards-sm td { display: block; width: 100% !important; }
    .data-table.cards-sm thead { display: none; }
    .data-table.cards-sm tr { border: 1px solid var(--border-light); border-radius: 14px; background: #fff; margin-bottom: 12px; padding: 6px 2px; box-shadow: var(--shadow-sm); }
    .data-table.cards-sm tr:hover td { background: transparent; }
    .data-table.cards-sm td { border: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 16px; text-align: right; font-size: 14px; }
    .data-table.cards-sm td::before { content: attr(data-label); font-weight: 600; color: var(--text-light); font-size: 12.5px; text-transform: uppercase; letter-spacing: .02em; text-align: left; flex: none; }
    .data-table.cards-sm td:first-child { flex-direction: column; align-items: flex-start; text-align: left; gap: 6px; border-bottom: 1px solid var(--border-light); padding-bottom: 12px; }
    .data-table.cards-sm td:first-child::before { display: none; }
}

/* ===================== БИЛДЕР ВОПРОСОВ ===================== */
.builder-question { background: var(--background-light); border: 1.5px solid var(--border-light); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; position: relative; }
.builder-question .bq-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.builder-question .bq-handle { cursor: grab; color: var(--dark-grey); font-size: 18px; }
.builder-question .bq-handle:active { cursor: grabbing; }
.builder-question.dragging { opacity: 0.5; border-color: var(--brand-blue); box-shadow: 0 8px 24px rgba(0,27,114,0.18); }
.builder-question .bq-move { margin-left: auto; display: inline-flex; gap: 2px; }
.builder-question .bq-move button { background: var(--background-light); border: 1px solid var(--border-light); color: var(--text-light); width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 12px; transition: all 0.15s ease; }
.builder-question .bq-move button:hover { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); }
.builder-question .bq-remove { background: none; border: none; color: var(--brand-red); cursor: pointer; font-size: 16px; margin-left: 10px; }
.builder-question .bq-num { font-weight: 700; color: var(--brand-red); }
/* Раздел (разрыв страницы) в конструкторе */
.builder-section { background: rgba(0,27,114,0.04); border-color: rgba(0,27,114,0.25); border-left: 4px solid var(--brand-blue); }
.builder-section .bq-num-section { font-weight: 700; color: var(--brand-blue); }
.builder-section .bs-title { font-weight: 600; }
.builder-option { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.builder-option .bo-icon { color: var(--dark-grey); }
.builder-option .bo-remove { background: none; border: none; color: var(--brand-red); cursor: pointer; font-size: 15px; }
.q-type-badge { font-size: 12px; }

/* ===================== ПОДВАЛ ===================== */
.site-footer {
    background: linear-gradient(135deg, var(--primary-blue), var(--brand-blue));
    color: var(--white); padding: 36px 0 18px; margin-top: 48px; flex-shrink: 0;
}
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { height: 54px; background: #fff; border-radius: 12px; padding: 6px; }
.footer-brand .ft { font-family: 'Stem', sans-serif; font-weight: 700; font-size: 22px; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { color: var(--white); text-decoration: none; opacity: 0.85; display: inline-flex; align-items: center; gap: 7px; transition: opacity 0.2s; }
.footer-links a:hover { opacity: 1; }
.footer-links i { color: var(--brand-red); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.18); padding-top: 16px; font-size: 13.5px; opacity: 0.8; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* Иконки модалок (сами модалки — единый блок «КРАСИВЫЕ МОДАЛКИ» ниже) */
.modal-icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 26px; }
.modal-icon-danger { background: rgba(235,0,45,0.1); color: var(--brand-red); }
.modal-icon-info { background: rgba(0,27,114,0.08); color: var(--brand-blue); }

/* ===================== ФЛЕШ ===================== */
.flash { padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.flash-success { background: rgba(22,163,74,0.12); color: #15803d; }
.flash-error { background: rgba(235,0,45,0.10); color: var(--brand-red); }
.flash i { font-size: 18px; }
.alert-box { background: rgba(235,0,45,0.07); border: 1px solid rgba(235,0,45,0.2); border-radius: 12px; padding: 14px 18px; margin-bottom: 18px; color: var(--bright-red); }

/* ===================== АВТОРИЗАЦИЯ ===================== */
.auth-wrap { display: flex; align-items: center; justify-content: center; padding: 60px 20px; flex: 1; }
.auth-card { background: var(--white); border-radius: 22px; padding: 20px; box-shadow: var(--shadow-md); width: 100%; max-width: 440px; }
.auth-card h1 { font-family: 'Stem', sans-serif; font-size: 28px; color: var(--brand-blue); margin-bottom: 24px; }

/* ===================== УТИЛИТЫ ===================== */
.page-head { padding: 30px 0 10px; }
.page-head h1 { font-family: 'Stem', sans-serif; font-size: 32px; color: var(--brand-blue); }
.breadcrumbs { display: none !important; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 30px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 20px; }
.flex { display: flex; } .flex-between { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.gap-2 { gap: 10px; } .text-center { text-align: center; }
.muted { color: var(--text-light); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }
.empty-state i { font-size: 52px; color: var(--dark-grey); margin-bottom: 16px; }
.empty-state h3 { color: var(--text-dark); margin-bottom: 8px; }

/* select2 подгонка под стиль */
.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single {
    border: 1.5px solid var(--border-light) !important; border-radius: 10px !important; min-height: 40px; padding: 4px;
}
/* Одиночный select — фиксированная высота и центрированный текст */
.select2-container--default .select2-selection--single { height: 40px; padding: 0; }
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px; font-size: 14.5px; color: var(--text-dark); padding-left: 14px; padding-right: 30px;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--text-light); }
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px;
    right: 10px;
}
.select2-container--default.select2-container--focus .select2-selection--multiple { border-color: var(--brand-blue) !important; }
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: var(--brand-blue) !important; color: #fff !important; border: none !important; border-radius: 8px !important; padding: 3px 8px;
}
.select2-container--default .select2-selection__choice__remove { color: #fff !important; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--brand-blue) !important; }

/* ===================== АДАПТИВ ===================== */
@media (max-width: 760px) {
    /* Единый боковой отступ всего контента (край страницы) */
    .container, .container-narrow, .flex-between { padding-left: 16px; padding-right: 16px; }
    /* Блоки ВНЕ панелей (заголовок, фильтр-бар, пустые состояния) выравниваем
       по внутреннему контенту карточек (16 + 18), чтобы они не примыкали к краям */
    .page-head, .dash-filterbar, #noRows, #loadMore { padding-left: 18px; padding-right: 18px; }
    .form-row { grid-template-columns: 1fr; }
    .brand-logo img { height: 45px; }
    .brand-logo .brand-text .b1, .brand-logo .brand-text .b2 { font-size: 20px; }
    .site-header { height: 60px; }
    .section { padding: 22px 0; }
    .page-head h1 { font-size: 25px; line-height: 1.2; }
    .section-title { font-size: 21px; }
    .panel { padding: 20px 18px; }
    /* кнопки сохранения — на всю ширину, столбиком */
    .editor-savebar { flex-direction: column-reverse; align-items: stretch; }
    .editor-savebar .btn { width: 100%; min-width: 0; }
}

/* ===================== ПУБЛИЧНАЯ ФОРМА (без хедера, лого в футере) ===================== */
.form-body { display: flex; flex-direction: column; min-height: 100vh; }
.form-main { flex: 1 0 auto; padding: 40px 0 50px; }
.form-main .container-narrow { max-width: 760px; }
/* верхняя цветная полоса формы */
.form-main .panel:first-of-type { border-top: 6px solid var(--accent, var(--brand-red)); }
.form-footer {
    flex-shrink: 0; text-align: center; padding: 30px 20px 36px; margin-top: 10px;
}
.form-footer .ff-logo { height: 54px; width: auto; margin-bottom: 10px; }
.form-footer .ff-title { font-family: 'Stem', sans-serif; font-weight: 500; font-size: 20px; color: var(--brand-blue); line-height: 1; }
.form-footer .ff-sub { color: var(--text-light); font-size: 14px; margin-top: 4px; }
.form-footer .ff-links { margin-top: 12px; font-size: 14px; display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.form-footer .ff-links a { color: var(--brand-blue); text-decoration: none; }
.form-footer .ff-links a:hover { text-decoration: underline; }
.form-footer .ff-links span { color: var(--dark-grey); }
.form-footer .ff-copy { color: var(--medium-grey); font-size: 12.5px; margin-top: 12px; }

/* ===================== Кнопка-логотип в футере ===================== */
.ff-logo-btn { background: none; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 11px; padding: 6px 10px; border-radius: 14px; transition: background 0.2s ease; }
.ff-logo-btn:hover { background: rgba(0,27,114,0.06); }
.ff-logo-btn .ff-logo { height: 45px; margin: 0; }
.ff-logo-text { display: flex; flex-direction: column; line-height: 1.02; text-align: left; }
.ff-logo-text .b1, .ff-logo-text .b2 { font-family: 'Stem', sans-serif; font-weight: 500; font-size: 19px; color: var(--brand-blue); }

/* ===================== КРАСИВЫЕ МОДАЛКИ ===================== */
.modal { position: fixed; inset: 0; z-index: 3000; display: none; }
.modal.open { display: block; }
.modal-overlay { position: absolute; inset: 0; background: rgba(4, 13, 46, 0.55); backdrop-filter: blur(3px); animation: modalFade 0.2s ease; }
/* Центрирование и прокрутка — у .modal.open (flex, forms.css); карточка без своих смещений */
.modal-card {
    position: relative; z-index: 1; width: calc(100% - 40px); max-width: 460px;
    background: #fff; border-radius: 22px; padding: 36px 24px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.4); animation: modalPop 0.24s ease;
}
/* Крестик — как .md-close в bots-laravel: плоский, без круга и поворота.
   Позиционирование остаётся угловым: у центрированных окон форм (выгрузка,
   подтверждения) нет строки-шапки .md-head, которая держала бы кнопку.
   Padding — чтобы у плоского крестика осталась удобная область нажатия. */
.modal-close { position: absolute; top: 14px; right: 14px; padding: 6px; line-height: 1; border: none; background: transparent; color: var(--text-light); font-size: 18px; cursor: pointer; transition: color 0.2s ease; }
.modal-close:hover { color: var(--brand-red); }
.modal-title { font-family: 'Stem', sans-serif; font-weight: 700; font-size: 24px; color: var(--brand-blue); text-align: center; margin-bottom: 8px; }
.modal-text { color: var(--text-light); font-size: 15.5px; margin-bottom: 24px; line-height: 1.5; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; }
.modal-actions .btn, .modal-actions form { flex: 1; }
.modal-actions form .btn { width: 100%; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
/* Без translateY: карточку центрирует flex-контейнер, транслейт из кейфрейма давал прыжок при открытии */
@keyframes modalPop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

/* ===================== ОКНО С ФОРМОЙ (как в bots-laravel) =====================
   .modal-card — прежние центрированные окошки (иконка + текст + кнопки).
   .modal-dialog + .form-dialog — окно с формой: шапка/тело/подвал.
   Своей прокрутки у окна нет: скроллится весь слой .modal.open, поэтому
   шапка .md-head держится на виду через position: sticky.

   Ширину задаёт --modal-w: классом (.is-narrow/.is-wide/.is-xwide)
   или прямо в разметке — style="--modal-w: 700px".
   ============================================================================= */
.modal-dialog {
    --modal-w: 560px;
    position: relative; z-index: 1;
    width: min(var(--modal-w), calc(100% - 24px));
    background: #fff; border-radius: 22px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.4);
    animation: modalPop 0.24s ease;
    padding: 30px 28px; text-align: center;
}
.modal-dialog.is-narrow { --modal-w: 440px; }
.modal-dialog.is-wide   { --modal-w: 760px; }
.modal-dialog.is-xwide  { --modal-w: 980px; }

.modal .modal-dialog.form-dialog { text-align: left; padding: 0; overflow: visible; }
.form-dialog .md-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 22px; border-bottom: 1px solid var(--border-light);
    position: sticky; top: 0; z-index: 2;
    background: inherit; border-radius: 22px 22px 0 0;
}
.form-dialog .md-head h3 { font-family: 'Stem', sans-serif; font-size: 19px; color: var(--text-dark); }
.form-dialog .md-close { background: transparent; border: none; color: var(--text-light); font-size: 18px; cursor: pointer; flex-shrink: 0; }
.form-dialog .md-close:hover { color: var(--brand-red); }
.form-dialog .md-body { padding: 20px 22px; }
.form-dialog .md-foot { padding: 14px 22px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }

/* Узкий экран: кнопки подвала — друг под другом на всю ширину */
@media (max-width: 600px) {
    .modal-dialog { padding: 24px 18px; border-radius: 16px; }
    .form-dialog .md-head { padding: 14px 16px; border-radius: 16px 16px 0 0; }
    .form-dialog .md-body { padding: 16px; }
    .form-dialog .md-foot { padding: 12px 16px; flex-direction: column; align-items: stretch; }
    .form-dialog .md-foot .btn { width: 100%; justify-content: center; }
}

/* ===================== ЛЕНДИНГ (гость) ===================== */
.landing-hero { padding: 50px 16px 40px; }
.landing-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.landing-hero .hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(0,27,114,0.08); color: var(--brand-blue); padding: 7px 16px; border-radius: 20px; font-size: 14px; margin-bottom: 18px; }
.landing-hero h1 { font-family: 'Stem', sans-serif; font-weight: 700; font-size: clamp(30px, 4.5vw, 46px); color: var(--brand-blue); line-height: 1.12; margin-bottom: 16px; }
.landing-hero p { font-size: 17px; color: var(--text-dark); max-width: 560px; margin-bottom: 24px; }
.landing-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.landing-note { font-size: 14px; color: var(--text-light); }
.landing-note i { color: var(--brand-red); }
.landing-logo { text-align: center; }
.landing-logo img { max-width: 260px; width: 100%; filter: drop-shadow(0 16px 40px rgba(4,13,46,0.18)); }
.landing-logo i { font-size: 230px; color: var(--brand-blue); filter: drop-shadow(0 16px 40px rgba(4,13,46,0.18)); }
.landing-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.lf-card { background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.lf-card i { font-size: 26px; color: var(--brand-red); margin-bottom: 12px; }
.lf-card h3 { font-size: 18px; color: var(--brand-blue); margin-bottom: 6px; }
.lf-card p { font-size: 14.5px; color: var(--text-light); }
@media (max-width: 820px) { .landing-grid { grid-template-columns: 1fr; } .landing-logo { display: none; } }

/* ===================== РЕДАКТОР (Google-Forms-стиль) ===================== */
.editor.section { padding-top: 22px; }
.editor .container-narrow { max-width: 800px; }
.editor-tabsbar {
    display: flex; gap: 10px; justify-content: center; margin: 4px 0 22px;
    overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; padding: 12px 0;
}
.editor-tabsbar::-webkit-scrollbar { display: none; }
.ed-tab, .ed-tab-link {
    border: none; background: var(--white); cursor: pointer; font-family: 'Stem', sans-serif; font-size: 16px;
    font-weight: 600; color: var(--text-dark); padding: 12px 28px; border-radius: 30px; white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08); border-bottom: 3px solid transparent; transition: all 0.3s ease;
    display: inline-flex; align-items: center; gap: 9px; text-decoration: none; position: relative;
}
.ed-tab:hover, .ed-tab-link:hover {
    transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-bottom-color: var(--brand-red); border-bottom-width: 4px; color: var(--text-dark);
}
.ed-tab.active {
    background: linear-gradient(135deg, var(--brand-blue), var(--secondary-blue)); color: #fff;
    transform: translateY(-3px); border-bottom-color: var(--brand-red); border-bottom-width: 4px;
}
.ed-tab.active i { color: #fff; }
/* на узких экранах прокрутка вкладок без обрезки */
@media (max-width: 760px) {
    .editor-tabsbar { justify-content: flex-start; padding: 12px 16px; }
}
.editor-col { display: block; }
/* верхняя цветная полоса у первой карточки */
.editor-col .panel:first-child { border-top: 6px solid var(--brand-red); }
.editor-savebar {
    position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 14px 0; margin-top: 8px;
    /* блюр сходит на нет кверху — без чёткой границы */
    -webkit-mask-image: linear-gradient(to top, #000 65%, transparent 100%);
    mask-image: linear-gradient(to top, #000 65%, transparent 100%);
}
.editor-savebar .btn { min-width: 120px; }

/* ===================== КНОПКА «СОЗДАТЬ» В ХЕДЕРЕ ===================== */
.header-actions { display: flex; align-items: center; gap: 12px; }
.hdr-create { position: relative; }
.hdr-create-btn .hc-caret { font-size: 11px; opacity: 0.85; }
.hdr-create-menu {
    position: absolute; top: calc(100% + 10px); right: 0; width: 320px; background: #fff;
    border: 1px solid var(--border-light); border-radius: 16px; box-shadow: 0 16px 50px rgba(4, 13, 46, 0.22);
    padding: 8px; z-index: 1100; opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.hdr-create.open .hdr-create-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.hcm-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-light); padding: 8px 12px 6px; }
.hdr-create-menu a { display: flex; align-items: center; gap: 13px; padding: 11px 12px; border-radius: 12px; text-decoration: none; color: var(--text-dark); transition: background 0.15s ease; }
.hdr-create-menu a:hover { background: var(--background-light); }
.hcm-ic { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; font-size: 16px; }
.hcm-ic.blue { background: var(--brand-blue); }
.hcm-ic.red { background: var(--brand-red); }
.hcm-ic.purple { background: #7c3aed; }
.hcm-txt b { display: block; font-weight: 600; font-size: 14.5px; color: var(--text-dark); }
.hcm-txt small { color: var(--text-light); font-size: 12.5px; }

/* Мобилка: полноэкранная нижняя шторка */
@media (max-width: 760px) {
    body.create-open::after { content: ''; position: fixed; inset: 0; background: rgba(4,13,46,0.45); backdrop-filter: blur(2px); z-index: 1095; }
    .hdr-create-menu {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: 100%; max-height: 82vh; overflow-y: auto;
        border-radius: 22px 22px 0 0; border: none; box-shadow: 0 -10px 40px rgba(0,0,0,0.25); padding: 10px 12px calc(env(safe-area-inset-bottom) + 18px);
        transform: translateY(100%); z-index: 1100;
    }
    .hdr-create.open .hdr-create-menu { transform: translateY(0); }
    .hdr-create-menu::before { content: ''; display: block; width: 44px; height: 4px; border-radius: 4px; background: var(--dark-grey); margin: 6px auto 12px; }
    .hcm-title { font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--text-dark); padding: 4px 12px 8px; }
    .hdr-create-menu a { padding: 15px 14px; }
}

/* Навигация в меню аккаунта — это основное меню (сайдбара на большинстве страниц нет) */
/* ===================== ТОСТЫ ===================== */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 4000; display: flex; flex-direction: column; gap: 10px; }
.toast {
    display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border-light);
    border-left: 4px solid var(--brand-blue); border-radius: 12px; padding: 13px 18px; box-shadow: 0 10px 30px rgba(4,13,46,0.18);
    font-size: 14.5px; color: var(--text-dark); opacity: 0; transform: translateY(12px); transition: opacity .25s ease, transform .25s ease; max-width: 360px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.toast-ok { border-left-color: #15803d; }
.toast.toast-ok i { color: #15803d; }
.toast.toast-error { border-left-color: var(--brand-red); }
.toast.toast-error i { color: var(--brand-red); }
@media (max-width: 760px) { .toast-wrap { left: 12px; right: 12px; bottom: 12px; } .toast { max-width: none; } }

/* Панель фильтров над таблицей дашборда */
.dash-filterbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.dash-filterbar .dash-search { flex: 1; min-width: 220px; background: white;}
@media (max-width: 760px) {
    .dash-filterbar { flex-direction: column; align-items: stretch; }
    .dash-filterbar .dash-search { max-width: none; min-width: 0; width: 100%; }
    .dash-filterbar .select2-container { width: 100% !important; min-width: 0; }
    .dash-filterbar .hdr-create, .dash-filterbar .hdr-create .btn { width: 100%; }
    .dash-filterbar .hdr-create .btn { justify-content: center; }
}

/* honeypot — скрытое поле для отсева ботов */
.hp-field { position: absolute !important; left: -9999px !important; top: -9999px !important; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

/* ===================== Меню действий строки (kebab) ===================== */
.row-menu { position: relative; display: inline-block; }
.row-kebab {
    width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--border-light);
    background: #fff; color: var(--text-dark); cursor: pointer; font-size: 16px; transition: all 0.18s ease;
}
.row-kebab:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.row-menu.open .row-kebab { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); }
.row-menu-list {
    display: none; position: fixed; width: 240px; background: #fff; border: 1px solid var(--border-light);
    border-radius: 12px; box-shadow: 0 14px 44px rgba(4, 13, 46, 0.22); padding: 6px; z-index: 1500;
}
.row-menu.open .row-menu-list { display: block; }
.row-menu-list a,
.row-menu-list button {
    display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border-radius: 9px;
    text-decoration: none; color: var(--text-dark); background: none; border: none; cursor: pointer;
    font-family: 'Stem', sans-serif; font-size: 14px; text-align: left; transition: background 0.15s ease;
}
.row-menu-list a:hover, .row-menu-list button:hover { background: var(--background-light); }
.row-menu-list i { width: 16px; text-align: center; color: var(--brand-blue); }
.row-menu-list form { margin: 0; }
.row-menu-list .rm-sep { height: 1px; background: var(--border-light); margin: 5px 8px; }
.row-menu-list .rm-danger { color: var(--brand-red); }
.row-menu-list .rm-danger:hover { background: rgba(235,0,45,0.07); }
.row-menu-list .rm-danger i { color: var(--brand-red); }

/* Поиск в фильтр-баре — единый стиль с select2.
   Высота задаётся ТОЛЬКО здесь (одна строка height), без !important и дублей. */
.dash-search {
    display: flex; align-items: center; gap: 8px; background: rgb(232, 240, 254); border: 1.5px solid var(--border-light);
    border-radius: 10px; padding: 0 14px; height: 40px; box-sizing: border-box;
}
.dash-search:focus-within { border-color: var(--brand-blue); }
.dash-search i { color: var(--text-light); font-size: 14px; flex-shrink: 0; }
.dash-search input { border: none; outline: none; background: transparent; font-family: 'Stem', sans-serif; font-size: 14.5px; color: var(--text-dark); width: 100%; height: 100%; padding: 0; margin: 0; }
.dash-filterbar .select2-container { min-width: 190px; }
.dash-filterbar .hdr-create { flex-shrink: 0; }
@media (max-width: 760px) {
    .dash-filterbar .hdr-create { margin-left: 0; }
    .dash-filterbar .hdr-create, .dash-filterbar .hdr-create .btn { width: 100%; }
}

/* Кнопка «назад» в редакторе/результатах */
.editor-back { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; color: var(--text-light); font-size: 14.5px; font-weight: 500; margin-bottom: 12px; transition: color 0.2s ease; }
.editor-back:hover { color: var(--brand-blue); }

/* ===================== АНАЛИТИКА (графики) ===================== */
.chart-wrap { position: relative; height: 300px; margin: 16px 0 4px; }
.chart-legend { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.chart-legend .cl-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.chart-legend .cl-dot { width: 12px; height: 12px; border-radius: 3px; background: var(--brand-blue); flex-shrink: 0; }
.chart-legend .cl-label { flex: 1; color: var(--text-dark); }
.chart-legend .cl-val { color: var(--text-light); white-space: nowrap; font-weight: 500; }
@media (max-width: 760px) { .chart-wrap { height: 260px; } }

/* Догрузка списка */
.load-more { text-align: center; padding: 20px; color: var(--text-light); font-size: 14.5px; }
.load-more i { color: var(--brand-blue); margin-right: 6px; }
