/* ============================================================
   БРИЗ — тема-скин для SmartGroup CRM.
   Включается пилюлей (briz-theme.js, ключ 'crm-skin'); работает поверх
   штатной тёмной/светлой темы:
     • body.theme-briz:not(.light-theme)  → тёмный Бриз
     • body.theme-briz.light-theme        → светлый Бриз
   Тёмная/светлая выбирается штатным переключателем в Настройках.
   Откат: убрать <link> этого файла и <script> briz-theme.js из index.html.
   app.js не изменяется.
   ============================================================ */

/* ===== Палитры =====
   ТЁМНАЯ : bg #08161a/#0c2026 · акцент(мята) #2dd4bf · небо #46c6f5
            текст #eaf6f3 · приглуш. #9bbab4 · border rgba(124,210,198,.14)
   СВЕТЛАЯ: bg #eef7f4/#f3faf8 · акцент #0fb3a0 · небо #0ea5e9
            текст #0f2c2c · приглуш. #52706c · border rgba(18,86,78,.10)
   Бренд-градиент (оба режима): #1ec9b4 → #1aa9c9                       */

/* ============================================================
   1) ОБЩЕЕ (любой режим Бриза): шрифт + акценты/бренд-цвет
   ============================================================ */
body.theme-briz { font-family: 'Nunito', system-ui, -apple-system, sans-serif; }
body.theme-briz .font-sans { font-family: 'Nunito', system-ui, sans-serif; }

/* Скруглённость стеклянных карточек — в обоих режимах */
body.theme-briz .glass-card,
body.theme-briz .stat-card,
body.theme-briz .login-card { border-radius: 22px; }

/* Первичная кнопка */
body.theme-briz .btn-gradient {
    background: linear-gradient(135deg, #1ec9b4 0%, #1aa9c9 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(45, 212, 191, 0.35);
}
body.theme-briz .btn-gradient:hover {
    background: linear-gradient(135deg, #28d6c0 0%, #25b8d8 100%) !important;
    box-shadow: 0 6px 24px rgba(45, 212, 191, 0.45);
}
body.theme-briz .btn-gradient:active { box-shadow: 0 2px 12px rgba(45, 212, 191, 0.35); }

/* Бренд-градиенты Tailwind (аватары, лого, чипы) */
body.theme-briz [class*="from-blue-500"][class*="to-purple-500"],
body.theme-briz [class*="from-blue-500"][class*="to-purple-600"],
body.theme-briz [class*="from-blue-600"][class*="to-purple-600"] {
    background-image: linear-gradient(135deg, #1ec9b4 0%, #1aa9c9 100%) !important;
}

/* Фокус-обводки и «сегодня» → бирюза (перебивает золото светлой темы) */
body.theme-briz .vision-input:focus,
body.theme-briz .search-input-wrapper input:focus {
    border-color: #2dd4bf !important;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18) !important;
}
body.theme-briz .calendar-day.today,
body.theme-briz .file-upload-zone:hover,
body.theme-briz input[type="checkbox"]:hover { border-color: #2dd4bf !important; }

/* Акцентные заливки */
body.theme-briz .stat-card::before,
body.theme-briz .login-card::before {
    background: linear-gradient(90deg, #2dd4bf, #46c6f5, #38e0a8);
}
body.theme-briz .calendar-event,
body.theme-briz input[type="checkbox"]:checked,
body.theme-briz .timeline-dot,
body.theme-briz .theme-toggle.active {
    background: linear-gradient(135deg, #2dd4bf, #46c6f5) !important;
}
body.theme-briz .login-glow {
    background: radial-gradient(circle, rgba(45,212,191,0.25) 0%, transparent 70%);
}
body.theme-briz .progress-bar-fill,
body.theme-briz .progress-step-dot.active {
    background: linear-gradient(135deg, #2dd4bf, #46c6f5);
}
body.theme-briz .progress-step-dot.current { box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.3); }

/* Контентные синие акценты → тил (links/info-чипы), оба режима */
body.theme-briz [class*="text-blue-400"],
body.theme-briz [class*="text-blue-500"] { color: #0fb3a0 !important; }
body.theme-briz [class*="bg-blue-500/30"] { background: rgba(45,212,191,0.30) !important; }
body.theme-briz [class*="bg-blue-500/20"] { background: rgba(45,212,191,0.20) !important; }
body.theme-briz [class*="bg-blue-500/10"] { background: rgba(45,212,191,0.12) !important; }

/* Бейджи бренд-синий/фиолетовый (смысловые не трогаем) */
body.theme-briz .badge-blue {
    background: rgba(70, 198, 245, 0.16);
    color: #2aa5cf;
    border-color: rgba(70, 198, 245, 0.30);
}
body.theme-briz .badge-purple {
    background: rgba(15, 179, 160, 0.16);
    color: #0f9d8c;
    border-color: rgba(15, 179, 160, 0.30);
}

/* ============================================================
   2) ТОЛЬКО ТЁМНЫЙ БРИЗ
   ============================================================ */
body.theme-briz:not(.light-theme) .bg-gradient-animated {
    background:
        radial-gradient(ellipse at 20% 18%, rgba(45,212,191,0.10) 0%, transparent 52%),
        radial-gradient(ellipse at 82% 82%, rgba(70,198,245,0.08) 0%, transparent 52%),
        radial-gradient(ellipse at 50% 50%, rgba(56,224,168,0.04) 0%, transparent 55%),
        linear-gradient(180deg, #08161a 0%, #0c2026 100%);
}
body.theme-briz:not(.light-theme) .glass-card,
body.theme-briz:not(.light-theme) .stat-card,
body.theme-briz:not(.light-theme) .login-card {
    background: rgba(124, 210, 198, 0.045);
    border-color: rgba(124, 210, 198, 0.14);
}
body.theme-briz:not(.light-theme) select,
body.theme-briz:not(.light-theme) select option { background-color: #0e2730 !important; color: #eaf6f3 !important; }
body.theme-briz:not(.light-theme) main > header {
    background: rgba(12, 32, 38, 0.80) !important;
    border-bottom-color: rgba(124, 210, 198, 0.12) !important;
}
body.theme-briz:not(.light-theme) .sidebar {
    background: rgba(12, 32, 38, 0.85);
    border-right-color: rgba(124, 210, 198, 0.14);
}
body.theme-briz:not(.light-theme) .sidebar-item { color: #9bbab4; border-radius: 14px; }
body.theme-briz:not(.light-theme) .sidebar-item:hover { background: rgba(124, 210, 198, 0.08); color: #eaf6f3; }
body.theme-briz:not(.light-theme) .sidebar-item.active {
    background: linear-gradient(135deg, rgba(45,212,191,0.22) 0%, rgba(70,198,245,0.16) 100%);
    color: #eaf6f3;
    border: 1px solid rgba(45, 212, 191, 0.35);
    box-shadow: 0 2px 14px rgba(45, 212, 191, 0.18);
}
body.theme-briz:not(.light-theme) .section-header { color: #9bbab4; }
body.theme-briz:not(.light-theme) .section-header:hover { color: #eaf6f3; }

/* ============================================================
   3) ТОЛЬКО СВЕТЛЫЙ БРИЗ  (перебивает штатный body.light-theme)
   ============================================================ */
body.theme-briz.light-theme .bg-gradient-animated {
    background:
        radial-gradient(ellipse at 20% 18%, rgba(45,212,191,0.12) 0%, transparent 55%),
        radial-gradient(ellipse at 82% 82%, rgba(70,198,245,0.10) 0%, transparent 55%),
        linear-gradient(180deg, #eef7f4 0%, #f3faf8 100%) !important;
}

/* Поверхности → мягкий мятно-белый + тил-обводка */
body.theme-briz.light-theme .glass-card,
body.theme-briz.light-theme .sidebar,
body.theme-briz.light-theme .kanban-column,
body.theme-briz.light-theme .stat-card,
body.theme-briz.light-theme .header-dropdown,
body.theme-briz.light-theme .search-results,
body.theme-briz.light-theme .filter-panel,
body.theme-briz.light-theme .view-toggle,
body.theme-briz.light-theme .glass-card:hover,
body.theme-briz.light-theme .kanban-card {
    background: #f6fbf9 !important;
    border-color: rgba(18, 86, 78, 0.12) !important;
    box-shadow: 0 2px 14px rgba(15, 70, 62, 0.08) !important;
}

/* Текст → тил-чарколь / приглушённый тил */
body.theme-briz.light-theme .text-white,
body.theme-briz.light-theme h1,
body.theme-briz.light-theme h2,
body.theme-briz.light-theme h3,
body.theme-briz.light-theme .text-xl,
body.theme-briz.light-theme .text-2xl,
body.theme-briz.light-theme .text-3xl { color: #0f2c2c !important; }
body.theme-briz.light-theme [class*="text-white/90"],
body.theme-briz.light-theme [class*="text-white/80"] { color: rgba(15, 44, 44, 0.82) !important; }
body.theme-briz.light-theme [class*="text-white/70"],
body.theme-briz.light-theme [class*="text-white/60"] { color: #52706c !important; }
body.theme-briz.light-theme [class*="text-white/50"],
body.theme-briz.light-theme [class*="text-white/40"],
body.theme-briz.light-theme [class*="text-white/30"] { color: #88a4a0 !important; }

/* Шапка */
body.theme-briz.light-theme header {
    background: #f6fbf9 !important;
    border-bottom: 1px solid rgba(18, 86, 78, 0.10) !important;
}
body.theme-briz.light-theme header button { background: rgba(18, 86, 78, 0.05); color: #52706c; }
body.theme-briz.light-theme header button:hover { background: rgba(45, 212, 191, 0.14); color: #0f2c2c; }

/* Сайдбар */
body.theme-briz.light-theme .sidebar { background: #f3faf8 !important; border-right: 1px solid rgba(18, 86, 78, 0.10) !important; }
body.theme-briz.light-theme .sidebar-item { color: #52706c; border-radius: 14px; }
body.theme-briz.light-theme .sidebar-item:hover { background: rgba(45, 212, 191, 0.12); color: #0f2c2c; }
body.theme-briz.light-theme .sidebar-item.active {
    background: rgba(45, 212, 191, 0.18) !important;
    color: #0f2c2c !important;
    border: 1px solid rgba(15, 179, 160, 0.30) !important;
    font-weight: 700;
}
body.theme-briz.light-theme .section-header { color: #52706c; }

/* Инпуты/селекты */
body.theme-briz.light-theme .vision-input,
body.theme-briz.light-theme select.vision-input,
body.theme-briz.light-theme select {
    background: #ffffff !important;
    border-color: rgba(18, 86, 78, 0.14) !important;
    color: #0f2c2c !important;
}

/* ============================================================
   4) ДОП. ПОКРЫТИЕ остаточных синих/фиолетовых литералов Tailwind
      (то, что не ловили штатные темы). Смысловые цвета не трогаем.
   ============================================================ */
/* Полупрозрачные заливки → бирюза */
body.theme-briz [class*="bg-blue-500/5"],
body.theme-briz [class*="bg-purple-500/5"]  { background-color: rgba(45,212,191,0.07) !important; }
body.theme-briz [class*="bg-blue-500/10"],
body.theme-briz [class*="bg-purple-500/10"] { background-color: rgba(45,212,191,0.12) !important; }
body.theme-briz [class*="bg-blue-500/20"],
body.theme-briz [class*="bg-purple-500/20"] { background-color: rgba(45,212,191,0.20) !important; }
body.theme-briz [class*="bg-blue-500/30"]   { background-color: rgba(45,212,191,0.30) !important; }
/* Сплошные заливки */
body.theme-briz [class~="bg-blue-500"],
body.theme-briz [class~="bg-blue-600"],
body.theme-briz [class~="bg-purple-500"]    { background-color: #14b8a6 !important; }
/* Бордеры */
body.theme-briz [class*="border-blue-500/20"],
body.theme-briz [class*="border-purple-500/20"] { border-color: rgba(45,212,191,0.22) !important; }
body.theme-briz [class*="border-blue-500/30"]   { border-color: rgba(45,212,191,0.32) !important; }
body.theme-briz [class*="border-blue-500/50"]   { border-color: rgba(45,212,191,0.50) !important; }
body.theme-briz [class~="border-blue-500"],
body.theme-briz [class~="border-blue-400"],
body.theme-briz [class~="border-purple-400"] { border-color: rgba(45,212,191,0.45) !important; }
/* Кольца фокуса */
body.theme-briz [class*="ring-blue-500"],
body.theme-briz [class*="ring-blue-400"] { --tw-ring-color: rgba(45,212,191,0.6) !important; }
/* Любой градиент, стартующий с синего → мята→небо */
body.theme-briz [class*="from-blue-500"],
body.theme-briz [class*="from-blue-600"] { background-image: linear-gradient(135deg, #1ec9b4 0%, #1aa9c9 100%) !important; }
/* Инлайновые #6366f1 / #8b5cf6 как фон */
body.theme-briz [style*="background:#6366f1"],   body.theme-briz [style*="background: #6366f1"],
body.theme-briz [style*="background-color:#6366f1"], body.theme-briz [style*="background-color: #6366f1"],
body.theme-briz [style*="background:#8b5cf6"],   body.theme-briz [style*="background: #8b5cf6"],
body.theme-briz [style*="background-color:#8b5cf6"], body.theme-briz [style*="background-color: #8b5cf6"] {
    background: linear-gradient(135deg, #2dd4bf, #46c6f5) !important;
}
/* Текстовые акценты синий/фиолетовый → тил, разный оттенок под контраст */
body.theme-briz:not(.light-theme) [class*="text-blue-300"],
body.theme-briz:not(.light-theme) [class*="text-blue-400"],
body.theme-briz:not(.light-theme) [class*="text-blue-500"],
body.theme-briz:not(.light-theme) [class*="text-purple-100"],
body.theme-briz:not(.light-theme) [class*="text-purple-200"],
body.theme-briz:not(.light-theme) [class*="text-purple-300"],
body.theme-briz:not(.light-theme) [class*="text-purple-400"],
body.theme-briz:not(.light-theme) [class*="text-indigo-400"] { color: #2dd4bf !important; }
body.theme-briz.light-theme [class*="text-blue-300"],
body.theme-briz.light-theme [class*="text-blue-400"],
body.theme-briz.light-theme [class*="text-blue-500"],
body.theme-briz.light-theme [class*="text-purple-100"],
body.theme-briz.light-theme [class*="text-purple-200"],
body.theme-briz.light-theme [class*="text-purple-300"],
body.theme-briz.light-theme [class*="text-purple-400"],
body.theme-briz.light-theme [class*="text-indigo-400"] { color: #0f9d8c !important; }

/* ============================================================
   5) Тёмные панели-литералы Tailwind (bg-[#1a1f3a] и т.п.) и таб-пилюли
   ============================================================ */
body.theme-briz:not(.light-theme) [class*="bg-[#1a1f3a]"],
body.theme-briz:not(.light-theme) [class*="bg-[#1e2340]"],
body.theme-briz:not(.light-theme) [class*="bg-[#1B254B]"],
body.theme-briz:not(.light-theme) [class*="bg-[#1b254b]"],
body.theme-briz:not(.light-theme) [class*="bg-[#0B1437]"],
body.theme-briz:not(.light-theme) [class*="bg-[#0a0e27]"] { background-color: rgba(20, 44, 50, 0.6) !important; }

body.theme-briz.light-theme [class*="bg-[#1a1f3a]"],
body.theme-briz.light-theme [class*="bg-[#1e2340]"],
body.theme-briz.light-theme [class*="bg-[#1B254B]"],
body.theme-briz.light-theme [class*="bg-[#1b254b]"],
body.theme-briz.light-theme [class*="bg-[#0B1437]"],
body.theme-briz.light-theme [class*="bg-[#0a0e27]"] { background-color: #eef7f4 !important; }

/* Активная пилюля дашборд-вкладок (Обзор/Сделки/...) — была белой */
body.theme-briz [class*="bg-[#1a1f3a]"][class*="rounded-full"] button[class~="bg-white"] {
    background: linear-gradient(135deg, #2dd4bf, #46c6f5) !important;
    color: #04241f !important;
    box-shadow: 0 2px 12px rgba(45, 212, 191, 0.30) !important;
}

/* Градиентные карточки дашбордов (from-[#1e2340] to-[#252b4a]) — сине-фиолет → бриз.
   Это background-IMAGE (а не color), поэтому перекрываем именно image. */
body.theme-briz:not(.light-theme) [class*="from-[#1e2340]"] {
    background-image: linear-gradient(155deg, rgba(22, 50, 56, 0.55), rgba(11, 30, 37, 0.40)) !important;
    border-color: rgba(124, 210, 198, 0.16) !important;
    border-radius: 22px !important;
    backdrop-filter: blur(20px) saturate(120%); -webkit-backdrop-filter: blur(20px) saturate(120%);
    box-shadow: 0 24px 60px -30px rgba(0,0,0,0.70), inset 0 1px 0 rgba(255,255,255,0.06) !important;
}
body.theme-briz.light-theme [class*="from-[#1e2340]"] {
    background-image: linear-gradient(155deg, rgba(255,255,255,0.74), rgba(236,248,245,0.56)) !important;
    border-color: rgba(18, 86, 78, 0.14) !important;
    border-radius: 22px !important;
    backdrop-filter: blur(18px) saturate(115%); -webkit-backdrop-filter: blur(18px) saturate(115%);
    box-shadow: 0 22px 50px -28px rgba(20,80,72,0.28), inset 0 1px 0 rgba(255,255,255,0.60) !important;
}
/* лёгкий подъём карточки на наведение */
body.theme-briz [class*="from-[#1e2340]"] { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
body.theme-briz [class*="from-[#1e2340]"]:hover { transform: translateY(-2px); border-color: rgba(45,212,191,0.34) !important; }
/* В светлом Бризе текст внутри этих карточек был белым — делаем читаемым */
body.theme-briz.light-theme [class*="from-[#1e2340]"] [class~="text-white"] { color: #0f2c2c !important; }
body.theme-briz.light-theme [class*="from-[#1e2340]"] [class*="text-white/"] { color: #52706c !important; }

/* ============================================================
   6) Нативные контролы, выделение текста, остаточные утилиты
   ============================================================ */
/* accent-color: чекбоксы, радио, нативный date-picker (поля дд.мм.гггг) → мята */
body.theme-briz:not(.light-theme) { accent-color: #2dd4bf; }
body.theme-briz.light-theme { accent-color: #0fb3a0; }

/* выделение текста */
body.theme-briz:not(.light-theme) ::selection { background: rgba(45, 212, 191, 0.30); color: #eaf6f3; }
body.theme-briz.light-theme ::selection { background: rgba(15, 179, 160, 0.22); color: #0f2c2c; }

/* остаточные бренд-утилиты (немного, но для чистоты) */
body.theme-briz [class~="bg-blue-400"],
body.theme-briz [class*="bg-blue-500/50"] { background-color: rgba(45, 212, 191, 0.50) !important; }
body.theme-briz [class*="border-purple-500/30"] { border-color: rgba(45, 212, 191, 0.32) !important; }
body.theme-briz [class*="to-purple-500/20"] { --tw-gradient-to: rgba(45, 212, 191, 0.20) !important; }
body.theme-briz [class*="to-purple-500/30"] { --tw-gradient-to: rgba(45, 212, 191, 0.30) !important; }

/* Плавающие панели на навти-градиенте #131d42→#1a254f / навти-rgba:
   .modal-content   — модалки (Профиль/Настройки/Календарь),
   .header-dropdown  — панель уведомлений и др. дропдауны хедера,
   .search-results   — выпадашка глобального поиска,
   .notification     — всплывающий тост.
   В тёмной теме базовый стиль их не перекрывал → оставались синими. */
body.theme-briz:not(.light-theme) .modal-content,
body.theme-briz:not(.light-theme) .header-dropdown,
body.theme-briz:not(.light-theme) .search-results {
    background: linear-gradient(135deg, #0c2026 0%, #0e2730 100%) !important;
    border-color: rgba(124, 210, 198, 0.14) !important;
}
body.theme-briz:not(.light-theme) .notification {
    background: rgba(12, 32, 38, 0.96) !important;
    border-color: rgba(124, 210, 198, 0.14) !important;
}
/* .header-dropdown и .search-results в светлой теме уже мятно-белые (см. выше).
   Здесь добавляем светлый вид только модалок и тоста. */
body.theme-briz.light-theme .modal-content,
body.theme-briz.light-theme .notification {
    background: linear-gradient(135deg, #f3faf8 0%, #ecf6f4 100%) !important;
    border-color: rgba(18, 86, 78, 0.10) !important;
}

/* ============================================================
   Переключатель скина (плавающая пилюля снизу слева).
   Видна в любой теме, чтобы можно было включить/выключить Бриз.
   ============================================================ */
.briz-switch {
    position: fixed; left: 16px; bottom: 88px; z-index: 9999;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px; border-radius: 999px;
    font-family: 'Nunito', system-ui, sans-serif; font-size: 13px; font-weight: 700;
    color: #eaf6f3; background: rgba(12, 32, 38, 0.85);
    border: 1px solid rgba(124, 210, 198, 0.28);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 28px -12px rgba(0, 0, 0, 0.6);
    cursor: pointer; user-select: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.briz-switch:hover { transform: translateY(-1px); border-color: rgba(45, 212, 191, 0.5); }
.briz-switch .briz-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: linear-gradient(135deg, #2dd4bf, #46c6f5);
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.7);
}
.briz-switch.off .briz-dot { background: #6f928c; box-shadow: none; }
/* В светлой теме пилюлю делаем светлой */
body.light-theme .briz-switch { color: #0f2c2c; background: rgba(246, 251, 249, 0.92); border-color: rgba(18, 86, 78, 0.20); }

/* ═══════════════════════════════════════════════════════════
   Сворачивание сайдбара (десктоп ≥1024px).
   .sidebar — флекс-сосед, main (flex:1) сам занимает место.
   Состояние: body.briz-sidebar-collapsed (ставит briz-theme.js) — РАБОТАЕТ В ОБЕИХ ТЕМАХ.
   Кнопка #briz-sb-toggle — слева снизу, над пилюлей «Бриз», видна в обеих темах.
   На мобиле не активно — там штатный toggleMobileSidebar. app.js не трогаем.
   ═══════════════════════════════════════════════════════════ */
#briz-sb-toggle { display: none; }
@media (min-width: 1024px) {
    /* плавная анимация ширины — в обеих темах */
    .sidebar {
        transition: width .25s ease, flex-basis .25s ease, opacity .2s ease,
                    padding .25s ease, margin .25s ease;
    }
    /* Иконочный рейл: меню не прячем, сужаем до иконок. РАБОТАЕТ В ОБЕИХ ТЕМАХ. */
    body.briz-sidebar-collapsed .sidebar {
        width: 74px !important; min-width: 74px !important; flex: 0 0 74px !important;
        overflow: visible !important;
    }
    /* убираем скроллбар в узком рейле — иначе он сдвигает иконки от центра */
    body.briz-sidebar-collapsed .sidebar > nav {
        padding-left: 0 !important; padding-right: 0 !important;
        scrollbar-width: none !important;
    }
    body.briz-sidebar-collapsed .sidebar > nav::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none !important; }

    /* шапка-бренд: только логотип по центру */
    body.briz-sidebar-collapsed .sidebar > .border-b { padding-left: 0 !important; padding-right: 0 !important; }
    body.briz-sidebar-collapsed #companyBrandingBlock { justify-content: center !important; gap: 0 !important; }
    body.briz-sidebar-collapsed #companyBrandingBlock > .flex-1,
    body.briz-sidebar-collapsed #companyEditBtn { display: none !important; }

    /* заголовок секции: одна иконка по центру — крупнее, монохром, без текста и шеврона.
       display:block + text-align:center центрируют глиф ЛЮБОЙ ширины на одной оси.
       .sidebar в селекторе цвета поднимает специфичность до (0,3,3) — перебивает
       перекраску text-blue/purple→бирюза (строки 244-259, специфичность 0,3,1). */
    body.briz-sidebar-collapsed .sidebar > nav { overflow-x: hidden !important; padding-left: 0 !important; padding-right: 0 !important; scrollbar-width: none !important; }
    body.briz-sidebar-collapsed .sidebar > nav::-webkit-scrollbar { width: 0 !important; display: none !important; }
    body.briz-sidebar-collapsed .section-header { position: relative !important; display: block !important; height: 46px !important; padding: 0 !important; }
    body.briz-sidebar-collapsed .section-header > span { display: block !important; font-size: 0 !important; }
    body.briz-sidebar-collapsed .sidebar .section-header > span > i { position: absolute !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%) !important; display: flex !important; align-items: center !important; justify-content: center !important; width: 36px !important; height: 24px !important; font-size: 20px !important; margin: 0 !important; color: #a7bcc0 !important; }
    body.briz-sidebar-collapsed .section-header > i.fa-chevron-down { display: none !important; }

    /* под-пункты: одна иконка по центру — монохром */
    body.briz-sidebar-collapsed #expertise-menu,
    body.briz-sidebar-collapsed #design-menu,
    body.briz-sidebar-collapsed #construction-menu,
    body.briz-sidebar-collapsed #general-menu { padding-left: 0 !important; }
    body.briz-sidebar-collapsed .sidebar-item { display: block !important; text-align: center !important; gap: 0 !important; padding-left: 0 !important; padding-right: 0 !important; font-size: 0 !important; }
    body.briz-sidebar-collapsed .sidebar .sidebar-item > i { display: inline-block !important; width: 36px !important; text-align: center !important; vertical-align: middle !important; font-size: 18px !important; margin: 0 !important; color: #a7bcc0 !important; }
    /* подсветка активного/наведённого — монохром, ярче (без радуги) */
    body.briz-sidebar-collapsed .sidebar .sidebar-item:hover > i,
    body.briz-sidebar-collapsed .sidebar .sidebar-item.active > i,
    body.briz-sidebar-collapsed .sidebar .section-header:hover > span > i { color: #eef6f4 !important; }

    /* блок пользователя: только иконка выхода по центру */
    body.briz-sidebar-collapsed .sidebar > .border-t { padding-left: 0 !important; padding-right: 0 !important; }
    body.briz-sidebar-collapsed .sidebar > .border-t .flex-1 { display: none !important; }
    body.briz-sidebar-collapsed .sidebar > .border-t > .flex { justify-content: center !important; gap: 0 !important; }

    /* кнопка сворачивания — видна в ОБЕИХ темах */
    #briz-sb-toggle {
        position: fixed; left: 16px; bottom: 140px; z-index: 9998;
        display: inline-flex; align-items: center; justify-content: center; gap: 0;
        width: 44px; height: 44px; padding: 0; border-radius: 14px; cursor: pointer; user-select: none;
        font-family: 'Nunito', system-ui, sans-serif;
        color: #2dd4bf; background: rgba(12, 32, 38, 0.85);
        border: 1px solid rgba(124, 210, 198, 0.22);
        backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
        box-shadow: 0 10px 28px -12px rgba(0, 0, 0, 0.6);
        transition: transform .15s ease, background .15s ease, border-color .15s ease;
    }
    #briz-sb-toggle:hover {
        transform: translateY(-1px); background: rgba(20, 44, 50, 0.95);
        border-color: rgba(45, 212, 191, 0.5);
    }
    #briz-sb-toggle .briz-sb-ico { font-size: 18px; line-height: 1; }
    body.theme-briz.light-theme #briz-sb-toggle {
        color: #0fb3a0; background: rgba(246, 251, 249, 0.92);
        border-color: rgba(18, 86, 78, 0.18); box-shadow: 0 8px 20px -10px rgba(15, 70, 62, 0.35);
    }
}

/* ═══════════════════════════════════════════════════════════
   Фон Бриза: пресеты глубоких градиентов (.bg-gradient-animated).
   Состояние: body.theme-briz.briz-bg-<id> (ставит briz-theme.js).
   id: deep | aurora | night ; 'off'/«Стандарт» = базовый фон Бриза.
   ═══════════════════════════════════════════════════════════ */
body.theme-briz.briz-bg-deep:not(.light-theme) .bg-gradient-animated {
    background:
        radial-gradient(ellipse 80% 55% at 12% 0%, rgba(30,201,180,0.30) 0%, transparent 60%),
        radial-gradient(ellipse 70% 60% at 100% 100%, rgba(70,198,245,0.22) 0%, transparent 55%),
        radial-gradient(ellipse 90% 70% at 50% 120%, rgba(56,224,168,0.18) 0%, transparent 60%),
        linear-gradient(160deg, #06141a 0%, #0a2430 55%, #07181e 100%) !important;
}
body.theme-briz.briz-bg-aurora:not(.light-theme) .bg-gradient-animated {
    background:
        radial-gradient(circle at 18% 12%, rgba(45,212,191,0.32) 0%, transparent 45%),
        radial-gradient(circle at 85% 18%, rgba(70,198,245,0.26) 0%, transparent 45%),
        radial-gradient(circle at 62% 96%, rgba(56,224,168,0.26) 0%, transparent 50%),
        radial-gradient(circle at 5% 88%, rgba(26,169,201,0.22) 0%, transparent 45%),
        linear-gradient(135deg, #06151b 0%, #0b2733 60%, #071c24 100%) !important;
}
body.theme-briz.briz-bg-night:not(.light-theme) .bg-gradient-animated {
    background:
        radial-gradient(ellipse 120% 80% at 50% -10%, rgba(24,116,104,0.34) 0%, transparent 60%),
        radial-gradient(ellipse 100% 60% at 50% 110%, rgba(18,86,78,0.26) 0%, transparent 55%),
        radial-gradient(circle at 85% 30%, rgba(45,212,191,0.12) 0%, transparent 40%),
        linear-gradient(180deg, #05100f 0%, #061417 100%) !important;
}
/* Живой — анимированный «дрейфующий» mesh */
body.theme-briz.briz-bg-live:not(.light-theme) .bg-gradient-animated {
    background:
        radial-gradient(circle at 20% 30%, rgba(45,212,191,0.30) 0%, transparent 45%),
        radial-gradient(circle at 80% 60%, rgba(70,198,245,0.26) 0%, transparent 45%),
        radial-gradient(circle at 55% 92%, rgba(56,224,168,0.26) 0%, transparent 48%),
        linear-gradient(120deg, #06141a 0%, #0b2733 50%, #07181e 100%) !important;
    background-size: 200% 200%, 220% 220%, 200% 200%, 320% 320% !important;
    animation: brizFlow 26s ease-in-out infinite !important;
}
@keyframes brizFlow {
    0%   { background-position: 0% 50%, 100% 40%, 50% 100%, 0% 50%; }
    50%  { background-position: 100% 50%, 0% 60%, 60% 0%, 100% 50%; }
    100% { background-position: 0% 50%, 100% 40%, 50% 100%, 0% 50%; }
}
body.theme-briz.briz-bg-deep.light-theme .bg-gradient-animated {
    background:
        radial-gradient(ellipse 80% 55% at 12% 0%, rgba(15,179,160,0.16) 0%, transparent 60%),
        radial-gradient(ellipse 70% 60% at 100% 100%, rgba(14,165,233,0.13) 0%, transparent 55%),
        linear-gradient(160deg, #eaf6f3 0%, #f1faf8 55%, #ecf6f4 100%) !important;
}
body.theme-briz.briz-bg-aurora.light-theme .bg-gradient-animated {
    background:
        radial-gradient(circle at 18% 12%, rgba(15,179,160,0.18) 0%, transparent 45%),
        radial-gradient(circle at 85% 18%, rgba(14,165,233,0.16) 0%, transparent 45%),
        radial-gradient(circle at 62% 96%, rgba(56,200,168,0.15) 0%, transparent 50%),
        linear-gradient(135deg, #eef8f5 0%, #f4fbf9 60%, #eaf6f3 100%) !important;
}
body.theme-briz.briz-bg-night.light-theme .bg-gradient-animated {
    background:
        radial-gradient(ellipse 120% 80% at 50% -10%, rgba(15,179,160,0.13) 0%, transparent 60%),
        linear-gradient(180deg, #eef7f4 0%, #f3faf8 100%) !important;
}
body.theme-briz.briz-bg-live.light-theme .bg-gradient-animated {
    background:
        radial-gradient(circle at 20% 30%, rgba(15,179,160,0.16) 0%, transparent 45%),
        radial-gradient(circle at 80% 60%, rgba(14,165,233,0.14) 0%, transparent 45%),
        radial-gradient(circle at 55% 92%, rgba(56,200,168,0.14) 0%, transparent 48%),
        linear-gradient(120deg, #eef8f5 0%, #f4fbf9 50%, #eaf6f3 100%) !important;
    background-size: 200% 200%, 220% 220%, 200% 200%, 320% 320% !important;
    animation: brizFlow 30s ease-in-out infinite !important;
}
/* — шестерёнка в пилюле «Бриз» + поповер выбора фона — */
.briz-switch .briz-gear { margin-left: 4px; font-size: 13px; opacity: .75; cursor: pointer; transition: opacity .15s ease, transform .2s ease; }
.briz-switch .briz-gear:hover { opacity: 1; transform: rotate(45deg); }
body:not(.theme-briz) .briz-switch .briz-gear,
body:not(.theme-briz) #briz-bg-pop { display: none !important; }
#briz-bg-pop {
    display: none; position: fixed; left: 16px; bottom: 196px; z-index: 9999;
    width: 210px; padding: 12px; border-radius: 16px;
    background: rgba(12,32,38,0.92); border: 1px solid rgba(124,210,198,0.22);
    box-shadow: 0 18px 44px -16px rgba(0,0,0,0.7);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    font-family: 'Nunito', system-ui, sans-serif;
}
#briz-bg-pop.open { display: block; }
#briz-bg-pop .briz-bg-title { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #9bbab4; margin: 0 2px 8px; }
#briz-bg-pop .briz-bg-sw {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; margin-bottom: 4px;
    border: 1px solid transparent; border-radius: 10px; background: transparent; cursor: pointer;
    color: #eaf6f3; font-size: 13px; font-weight: 600; font-family: inherit; text-align: left;
    transition: background .12s ease, border-color .12s ease;
}
#briz-bg-pop .briz-bg-sw:hover { background: rgba(124,210,198,0.10); }
#briz-bg-pop .briz-bg-sw.active { border-color: rgba(45,212,191,0.55); background: rgba(45,212,191,0.12); }
#briz-bg-pop .briz-bg-prev { width: 36px; height: 24px; border-radius: 7px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,0.12); }
body.theme-briz.light-theme #briz-bg-pop { background: rgba(246,251,249,0.95); border-color: rgba(18,86,78,0.18); }
body.theme-briz.light-theme #briz-bg-pop .briz-bg-title { color: #52706c; }
body.theme-briz.light-theme #briz-bg-pop .briz-bg-sw { color: #0f2c2c; }
body.theme-briz.light-theme #briz-bg-pop .briz-bg-sw:hover { background: rgba(15,179,160,0.10); }
body.theme-briz.light-theme #briz-bg-pop .briz-bg-sw.active { background: rgba(15,179,160,0.14); border-color: rgba(15,179,160,0.5); }

/* ----- Экран входа: плавающие кнопки не нужны (сайдбара ещё нет) -----
   #loginScreen виден (без .hidden) только до авторизации; :has() сам
   скрывает/показывает кнопки при входе и выходе, без перезагрузки. */
body:has(#loginScreen:not(.hidden)) .briz-switch,
body:has(#loginScreen:not(.hidden)) #briz-sb-toggle,
body:has(#loginScreen:not(.hidden)) #briz-bg-pop { display: none !important; }

/* ============================================================
   Бриз: поля поиска по колонкам — Реестр осмотров (Экспертиза → Осмотр)
   Аддитивно. Удаление этого блока = откат.
   ============================================================ */
.briz-filter-row th { padding: 6px 8px !important; background: transparent !important; }
.briz-col-filter {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(124, 210, 198, 0.20);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.2;
    color: #eaf6f3;
    outline: none;
    font-family: inherit;
    font-weight: 400;
}
.briz-col-filter::placeholder { color: #9bbab4; opacity: 0.75; }
.briz-col-filter:focus { border-color: #2dd4bf; background: rgba(45, 212, 191, 0.10); }
body.light-theme .briz-col-filter { background: rgba(0, 0, 0, 0.04); color: #0f2c2c; border-color: rgba(15, 179, 160, 0.28); }
body.light-theme .briz-col-filter::placeholder { color: #52706c; }

/* Бриз: кликабельные заголовки сортировки (Реестр осмотров) */
.briz-sort-th { cursor: pointer; user-select: none; white-space: nowrap; transition: color .15s ease; }
.briz-sort-th:hover { color: #2dd4bf !important; }
.briz-sort-caret { font-size: 11px; margin-left: 2px; }

/* ============================================================
   Бриз-фикс (v4): непрозрачные модалки.
   Симптом: Строительство → График работ → «Редактировать этап» —
   окно просвечивало (виден Гантт сквозь форму). Причина: панель
   .modal-content и стеклянные подложки внутри неё были полупрозрачны.
   Глушим прозрачность ТОЛЬКО внутри .modal-overlay → стекло дашборда
   не затрагивается (на дашборде нет .modal-overlay). Откат = удалить блок.
   ============================================================ */
body.theme-briz:not(.light-theme) .modal-overlay .modal-content {
    background-color: #0c2026 !important;
    background-image: linear-gradient(135deg, #0c2026 0%, #0e2730 100%) !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
body.theme-briz:not(.light-theme) .modal-overlay [class*="from-[#1e2340]"],
body.theme-briz:not(.light-theme) .modal-overlay [class*="bg-[#1e2340]"],
body.theme-briz:not(.light-theme) .modal-overlay [class*="bg-[#252b4a]"],
body.theme-briz:not(.light-theme) .modal-overlay [class*="bg-[#1a1f3a]"],
body.theme-briz:not(.light-theme) .modal-overlay [class*="bg-[#131d42]"],
body.theme-briz:not(.light-theme) .modal-overlay [class*="bg-[#0a0e27]"] {
    background-color: #102a30 !important;
    background-image: none !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
body.theme-briz.light-theme .modal-overlay .modal-content {
    background-color: #f3faf8 !important;
    background-image: linear-gradient(135deg, #f3faf8 0%, #ecf6f4 100%) !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
body.theme-briz.light-theme .modal-overlay [class*="from-[#1e2340]"],
body.theme-briz.light-theme .modal-overlay [class*="bg-[#1e2340]"],
body.theme-briz.light-theme .modal-overlay [class*="bg-[#252b4a]"],
body.theme-briz.light-theme .modal-overlay [class*="bg-[#1a1f3a]"],
body.theme-briz.light-theme .modal-overlay [class*="bg-[#131d42]"],
body.theme-briz.light-theme .modal-overlay [class*="bg-[#0a0e27]"] {
    background-color: #eef7f4 !important;
    background-image: none !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}

/* ============================================================
   Бриз-фикс (v5): непрозрачные ПЛАВАЮЩИЕ панели (выпадашки/автокомплиты).
   Корень: правило стекла выше делает тёмные литералы bg-[#1B254B] и др.
   полупрозрачными (0.6). Это нормально для карточек на странице, но
   выпадашки (ganttContractorDropdown, purchaseContractorDropdown,
   addressSuggestions, общие ${dropdownId}) — это absolute z-50 панели
   с тем же bg-[#1B254B], и сквозь них просвечивает контент.
   Здесь: если тёмный литерал-фон у ПОЗИЦИОНИРОВАННОГО (absolute/fixed)
   элемента — это плавающая панель → делаем непрозрачной. Карточки
   дашборда (static) не затронуты. Фоны-затемнения bg-black/* не трогаем.
   Откат = удалить блок.
   ============================================================ */
body.theme-briz:not(.light-theme) [class*="absolute"][class*="bg-[#1B254B]"],
body.theme-briz:not(.light-theme) [class*="absolute"][class*="bg-[#1b254b]"],
body.theme-briz:not(.light-theme) [class*="absolute"][class*="bg-[#1a1f3a]"],
body.theme-briz:not(.light-theme) [class*="absolute"][class*="bg-[#1e2340]"],
body.theme-briz:not(.light-theme) [class*="absolute"][class*="bg-[#0B1437]"],
body.theme-briz:not(.light-theme) [class*="absolute"][class*="bg-[#0a0e27]"],
body.theme-briz:not(.light-theme) [class*="fixed"][class*="bg-[#1B254B]"],
body.theme-briz:not(.light-theme) [class*="fixed"][class*="bg-[#1b254b]"],
body.theme-briz:not(.light-theme) [id*="Dropdown"],
body.theme-briz:not(.light-theme) [id*="dropdown"],
body.theme-briz:not(.light-theme) [id$="Suggestions"],
body.theme-briz:not(.light-theme) [id$="suggestions"] {
    background-color: #0e2730 !important;
    background-image: none !important;
    border-color: rgba(124, 210, 198, 0.16) !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    box-shadow: 0 18px 48px -20px rgba(0, 0, 0, 0.75) !important;
}
body.theme-briz.light-theme [class*="absolute"][class*="bg-[#1B254B]"],
body.theme-briz.light-theme [class*="absolute"][class*="bg-[#1b254b]"],
body.theme-briz.light-theme [class*="absolute"][class*="bg-[#1a1f3a]"],
body.theme-briz.light-theme [class*="absolute"][class*="bg-[#1e2340]"],
body.theme-briz.light-theme [class*="absolute"][class*="bg-[#0B1437]"],
body.theme-briz.light-theme [class*="absolute"][class*="bg-[#0a0e27]"],
body.theme-briz.light-theme [class*="fixed"][class*="bg-[#1B254B]"],
body.theme-briz.light-theme [class*="fixed"][class*="bg-[#1b254b]"],
body.theme-briz.light-theme [id*="Dropdown"],
body.theme-briz.light-theme [id*="dropdown"],
body.theme-briz.light-theme [id$="Suggestions"],
body.theme-briz.light-theme [id$="suggestions"] {
    background-color: #ffffff !important;
    background-image: none !important;
    border-color: rgba(18, 86, 78, 0.16) !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    box-shadow: 0 18px 48px -22px rgba(20, 80, 72, 0.28) !important;
}


/* === Свод: период/сортировка/фильтры — база нейтральная под Vision UI === */
.briz-period-bar{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:10px 14px; }
.briz-period-bar .briz-period-label{ font-weight:600; display:flex; align-items:center; gap:6px; color:rgb(232,234,246); }
.briz-period-bar label{ display:flex; align-items:center; gap:6px; font-size:13px; color:rgba(255,255,255,0.55); }
.briz-period-bar input[type="date"]{ background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.12); color:#e8eaf6; border-radius:8px; padding:5px 8px; font-size:13px; }
.briz-period-bar .briz-period-reset{ background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.12); color:rgb(232,234,246); border-radius:8px; padding:5px 12px; font-size:13px; cursor:pointer; transition:background .15s ease; }
.briz-period-bar .briz-period-reset:hover{ background:rgba(255,255,255,0.12); }
.briz-period-bar .briz-period-info{ color:rgba(255,255,255,0.5); font-size:12px; margin-left:auto; }
.briz-sort-caret{ font-size:11px; margin-left:2px; }
.briz-filter-ico{ margin-left:6px; font-size:11px; opacity:0.4; cursor:pointer; transition:opacity .15s ease, color .15s ease; }
.briz-filter-ico:hover{ opacity:0.9; }
.briz-filter-ico.active{ opacity:1; color:#3b82f6; }
.briz-filter-pop{ position:absolute; z-index:9999; display:flex; gap:6px; align-items:center; background:#1a2142; border:1px solid rgba(255,255,255,0.14); border-radius:10px; padding:8px; box-shadow:0 12px 34px rgba(0,0,0,0.5); }
.briz-filter-pop input{ background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.14); color:#e8eaf6; border-radius:8px; padding:6px 9px; font-size:13px; width:170px; }
.briz-filter-pop button{ background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.14); color:rgb(232,234,246); border-radius:8px; padding:6px 10px; font-size:12px; cursor:pointer; white-space:nowrap; }
.briz-filter-pop button:hover{ background:rgba(255,255,255,0.16); }

/* Бриз: бирюзовый оверрайд */
body.theme-briz .briz-period-bar .briz-period-label{ color:#bfe6df; }
body.theme-briz .briz-period-bar label{ color:#9bbab4; }
body.theme-briz .briz-period-bar input[type="date"]{ background:#0e2730; border-color:rgba(124,210,198,0.22); color:#e6f3f0; }
body.theme-briz .briz-period-bar .briz-period-reset{ background:rgba(124,210,198,0.14); border-color:rgba(124,210,198,0.22); color:#bfe6df; }
body.theme-briz .briz-period-bar .briz-period-reset:hover{ background:rgba(124,210,198,0.26); }
body.theme-briz .briz-period-bar .briz-period-info{ color:#7fb4ab; }
body.theme-briz .briz-filter-ico.active{ color:#34d6c0; }
body.theme-briz .briz-filter-pop{ background:#0e2730; border-color:rgba(124,210,198,0.25); box-shadow:0 12px 34px rgba(0,0,0,0.45); }
body.theme-briz .briz-filter-pop input{ background:#0c2026; border-color:rgba(124,210,198,0.22); color:#e6f3f0; }
body.theme-briz .briz-filter-pop button{ background:rgba(124,210,198,0.14); border-color:rgba(124,210,198,0.22); color:#bfe6df; }
body.theme-briz .briz-filter-pop button:hover{ background:rgba(124,210,198,0.26); }
body.theme-briz tr.briz-svod-filter th{ background:rgba(12,32,38,0.6); }

/* Бриз light */
body.theme-briz.light-theme .briz-period-bar input[type="date"]{ background:#fff; border-color:rgba(18,86,78,0.18); color:#13403a; }
body.theme-briz.light-theme .briz-filter-pop{ background:#fff; border-color:rgba(18,86,78,0.2); box-shadow:0 12px 34px rgba(0,0,0,0.18); }
body.theme-briz.light-theme .briz-filter-pop input{ background:#f3faf8; border-color:rgba(18,86,78,0.18); color:#13403a; }
body.theme-briz.light-theme .briz-filter-pop button{ color:#13403a; }
body.theme-briz.light-theme tr.briz-svod-filter th{ background:#e9f5f1; }

/* === Окно импорта контрагентов: база нейтральная + Бриз оверрайд === */
.briz-imp-overlay{ position:fixed; inset:0; z-index:10000; background:rgba(6,10,24,0.62); display:flex; align-items:center; justify-content:center; padding:20px; }
.briz-imp-card{ width:480px; max-width:96vw; background:#1a2142 !important; border:1px solid rgba(255,255,255,0.12); border-radius:16px; padding:22px; box-shadow:0 24px 60px rgba(0,0,0,0.55); }
.briz-imp-head{ font-size:18px; font-weight:600; color:#e8eaf6; margin-bottom:10px; }
.briz-imp-note{ font-size:13px; line-height:1.5; color:rgba(255,255,255,0.6); margin-bottom:14px; }
.briz-imp-sep{ height:1px; background:rgba(255,255,255,0.12); margin:16px 0; }
.briz-imp-lbl{ display:block; font-size:12px; color:rgba(255,255,255,0.65); margin-bottom:6px; }
.briz-imp-file{ width:100%; color:#e8eaf6; font-size:13px; margin-bottom:14px; }
.briz-imp-modes{ display:flex; gap:18px; margin-bottom:18px; font-size:13px; color:rgba(255,255,255,0.8); }
.briz-imp-modes label{ display:flex; align-items:center; gap:6px; cursor:pointer; }
.briz-imp-actions{ display:flex; justify-content:flex-end; gap:10px; }
.briz-imp-tpl{ width:100%; justify-content:center; }
body.theme-briz .briz-imp-overlay{ background:rgba(4,18,22,0.6); }
body.theme-briz .briz-imp-card{ background:#0e2730 !important; border-color:rgba(124,210,198,0.25); }
body.theme-briz .briz-imp-head{ color:#e6f3f0; }
body.theme-briz .briz-imp-note{ color:rgba(230,243,240,0.65); }
body.theme-briz .briz-imp-sep{ background:rgba(124,210,198,0.18); }
body.theme-briz .briz-imp-lbl{ color:rgba(230,243,240,0.7); }
body.theme-briz .briz-imp-file{ color:#e6f3f0; }
body.theme-briz .briz-imp-modes{ color:#cfe9e3; }
body.theme-briz.light-theme .briz-imp-card{ background:#ffffff !important; border-color:rgba(18,86,78,0.18); }
body.theme-briz.light-theme .briz-imp-head{ color:#13403a; }
body.theme-briz.light-theme .briz-imp-note{ color:#3a5a54; }
body.theme-briz.light-theme .briz-imp-lbl{ color:#3a5a54; }
body.theme-briz.light-theme .briz-imp-file{ color:#13403a; }
body.theme-briz.light-theme .briz-imp-modes{ color:#234b45; }

/* ============================================================
   Бриз-фикс (v23): прозрачный верх формы осмотра.
   Симптом: Экспертиза → Осмотр → «Начать осмотр» — верхняя часть
   модалки просвечивала (виден контент страницы сквозь панель).
   Причина: панель формы — bg-[#1a1f3a], которую общее «стеклянное»
   правило делает полупрозрачной (rgba .6). Существующий ре-опейк
   привязан к .modal-overlay, а это окно — #inspectionFormModal
   (fixed inset-0 bg-black/70), под него не попадало. Делаем панель
   осмотра непрозрачной тем же цветом, что и прочие модалки Бриз.
   Откат = удалить блок. app.js не затронут.
   ============================================================ */
body.theme-briz:not(.light-theme) #inspectionFormModal [class*="bg-[#1a1f3a]"] {
    background-color: #102a30 !important;
    background-image: none !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
body.theme-briz.light-theme #inspectionFormModal [class*="bg-[#1a1f3a]"] {
    background-color: #eef7f4 !important;
    background-image: none !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}

/* ============================================================
   Бриз-фикс (v26): фильтры-селекты выглядели «очень тёмными».
   Симптом: на странице Задач (и любых страницах с фильтрами)
   списки Статус/Ответственный/Привязка/Сортировка — плоский
   непрозрачный тёмный (#0e2730), заметно темнее поля Поиск,
   которое полупрозрачное (rgba(255,255,255,.05)).
   Причина: глобальное правило Бриз красит ВСЕ <select> в
   непрозрачный #0e2730 (нужно, чтобы РАСКРЫТЫЙ список опций был
   читаемым). Побочный эффект — ЗАКРЫТЫЙ контрол тоже тёмный и не
   совпадает со стеклянными полями ввода рядом → диссонанс по всей CRM.
   Фикс: закрытый <select.vision-input> делаем таким же стеклянным,
   как поля ввода; РАСКРЫТЫЙ список опций оставляем непрозрачным.
   Откат = удалить блок. app.js не затронут.
   ============================================================ */
body.theme-briz:not(.light-theme) select.vision-input {
    background-color: rgba(255, 255, 255, 0.05) !important;
}
body.theme-briz:not(.light-theme) select.vision-input option {
    background-color: #0e2730 !important;
    color: #eaf6f3 !important;
}

/* ============================================================
   Бриз-фикс (v27): остались тёмные фильтры — обобщаем v26.
   Причина: в тёмной Бриз глобальное правило красит ВСЕ <select>
   в непрозрачный #0e2730. v26 осветлил только select.vision-input,
   а многие фильтры — это <select class="bg-white/5"> БЕЗ vision-input
   (напр. «Все роли»/«Все статусы» в Администрировании) → остались тёмными.
   Плюс поля дат периода на Своде (.briz-period-bar input[type=date])
   были принудительно непрозрачными #0e2730 (строка ~703).
   Фикс: ЛЮБОЙ закрытый <select> и поля дат периода делаем стеклянными,
   как текстовые поля (rgba(255,255,255,.05)); раскрытый список опций
   оставляем непрозрачным (читаемость).
   Проверено вживую: Администрирование (оба фильтра совпали с поиском).
   Откат = удалить блок. app.js не затронут.
   ============================================================ */
body.theme-briz:not(.light-theme) select {
    background-color: rgba(255, 255, 255, 0.05) !important;
}
body.theme-briz:not(.light-theme) select option {
    background-color: #0e2730 !important;
    color: #eaf6f3 !important;
}
body.theme-briz:not(.light-theme) .briz-period-bar input[type="date"] {
    background-color: rgba(255, 255, 255, 0.05) !important;
}


/* ------------------------------------------------------------
   v27.1 — анти-мерцание фильтров при открытии раздела.
   У <select> (и полей периода) убираем CSS-transition, чтобы при
   рендере раздела фон ставился сразу, без анимированной вспышки
   (светлый дефолт -> тёмная тема). Косметика, откат = удалить строки.
   ------------------------------------------------------------ */
body.theme-briz:not(.light-theme) select,
body.theme-briz:not(.light-theme) .briz-period-bar input[type="date"] {
    transition: none !important;
}


/* ============================================================
   Бриз-фикс (v28): УБИРАЕМ МЕРЦАНИЕ фильтров «Все статусы»/«Все роли».
   Причина (подтверждено вживую через DOM/CSS/Observer): это нативные
   <select>. Полупрозрачный фон (rgba(255,255,255,.05), заданный в v26/v27
   для совпадения с полем Поиск) на НАТИВНОМ <select> в Windows Chrome даёт
   мерцание контрола при наведении/открытии/перерисовке — артефакт
   композитинга нативного контрола, невидимый в DOM (transition/animation
   нет, перерендера нет). Поле Поиск — <input>, у него нет нативного
   OS-рендера, поэтому оно НЕ мерцает.
   Фикс: фон <select> делаем НЕПРОЗРАЧНЫМ. #1c343c визуально совпадает со
   стеклом поверх тёмного фона Бриза (≈ rgba .06 над #0e2730) — вид тот же,
   что у поля Поиск, но без мерцания. Раскрытый список опций — #0e2730.
   Откат = удалить блок. app.js не затронут.
   ============================================================ */
body.theme-briz:not(.light-theme) select,
body.theme-briz:not(.light-theme) select.vision-input {
    background-color: #1c343c !important;
}
body.theme-briz:not(.light-theme) select:hover,
body.theme-briz:not(.light-theme) select:focus,
body.theme-briz:not(.light-theme) select.vision-input:hover,
body.theme-briz:not(.light-theme) select.vision-input:focus {
    background-color: #213c45 !important;
}
body.theme-briz:not(.light-theme) select option {
    background-color: #0e2730 !important;
    color: #eaf6f3 !important;
}

/* Address/INN suggest box (#ddSuggestBox) — привести к теме Бриз (id не подпадал под [id$="Suggestions"]) */
body.theme-briz:not(.light-theme) #ddSuggestBox { background-color:#0e2730 !important; border-color:rgba(124,210,198,.18) !important; color:#e8f5f2 !important; }
body.theme-briz.light-theme #ddSuggestBox { background-color:#ffffff !important; border-color:rgba(18,86,78,.16) !important; color:#0e2730 !important; box-shadow:0 18px 48px -22px rgba(20,80,72,.28) !important; }
