﻿/* ==========================================================================
   VPBX Corporate Premium -- dark-theme.css
   Applied when <html class="dark-theme">
   All critical colors are hardcoded for reliability (no var() fallback risk)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Smooth transitions
   -------------------------------------------------------------------------- */
body, .card, .modal-content, .form-control,
.dropdown-menu, .nav-pills .nav-link,
.table, .alert, .btn {
    transition: background-color 0.25s ease, color 0.25s ease,
                border-color 0.25s ease, box-shadow 0.25s ease;
}

/* --------------------------------------------------------------------------
   Body & page
   -------------------------------------------------------------------------- */
html.dark-theme body {
    background-color: #0D1520 !important;
    color: #E8EDF5 !important;
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
html.dark-theme .navbar-corporate {
    background: linear-gradient(135deg, #0A1520 0%, #060D18 100%) !important;
    border-bottom-color: #F6A000;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
html.dark-theme .card {
    background: #1A2840 !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 16px !important;
    color: #E8EDF5 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 1px 6px rgba(0,0,0,0.3) !important;
    overflow: hidden !important;
}
html.dark-theme .card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.2) !important;
}
html.dark-theme .card-header {
    background: linear-gradient(135deg, #1E304A 0%, #162638 100%) !important;
    border-bottom-color: #243550 !important;
    color: #E8EDF5 !important;
}
html.dark-theme .card-body {
    background: #1A2840 !important;
    color: #E8EDF5 !important;
}
html.dark-theme .card-footer {
    background: #162638 !important;
    border-top-color: #243550 !important;
}
/* Текст ошибки / pre в тёмной теме */
html.dark-theme pre {
    color: #E8EDF5 !important;
    background: transparent;
}
html.dark-theme .card-title {
    color: #E8EDF5 !important;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
html.dark-theme .table {
    color: #E8EDF5 !important;
}
html.dark-theme .table th {
    color: #7A9AB8 !important;
    border-bottom-color: #2E4468 !important;
}
html.dark-theme .table td {
    border-top-color: #243550 !important;
}
html.dark-theme .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255,255,255,0.03) !important;
}
html.dark-theme .table-striped tbody tr:nth-of-type(even) {
    background-color: transparent !important;
}
html.dark-theme .table-hover tbody tr:hover {
    background-color: rgba(255,255,255,0.06) !important;
    color: #E8EDF5 !important;
}
html.dark-theme .table-danger,
html.dark-theme .table-danger > td,
html.dark-theme .table-danger > th {
    background-color: rgba(220,38,38,0.15) !important;
    color: #FCA5A5 !important;
}
html.dark-theme .text-muted {
    color: #7A9AB8 !important;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
html.dark-theme .form-control {
    background-color: #0F1E30 !important;
    border-color: #2E4468 !important;
    color: #E8EDF5 !important;
}
html.dark-theme .form-control:focus {
    background-color: #132438 !important;
    border-color: #F6A000 !important;
    color: #E8EDF5 !important;
    box-shadow: 0 0 0 3px rgba(246,160,0,0.2) !important;
}
html.dark-theme .form-control:disabled,
html.dark-theme .form-control[readonly] {
    background-color: #162638 !important;
    color: #7A9AB8 !important;
    border-color: #243550 !important;
}
html.dark-theme .form-control::placeholder {
    color: #4A6A88 !important;
}
html.dark-theme label {
    color: #7A9AB8 !important;
}
html.dark-theme .input-group-text {
    background-color: #162638 !important;
    border-color: #2E4468 !important;
    color: #7A9AB8 !important;
}
html.dark-theme .custom-select {
    background-color: #0F1E30 !important;
    border-color: #2E4468 !important;
    color: #E8EDF5 !important;
}

/* --------------------------------------------------------------------------
   Sidebar nav
   -------------------------------------------------------------------------- */
html.dark-theme .nav-pills .nav-link {
    color: #7A9AB8 !important;
}
html.dark-theme .nav-pills .nav-link:hover {
    background: rgba(255,255,255,0.06) !important;
    color: #E8EDF5 !important;
}
html.dark-theme .nav-pills .nav-link.active {
    background: linear-gradient(135deg, #1B3A5C 0%, #2E5080 100%) !important;
    color: #FFFFFF !important;
    border-left-color: #F6A000 !important;
}

/* --------------------------------------------------------------------------
   Modals
   -------------------------------------------------------------------------- */
html.dark-theme .modal-content {
    background-color: #1A2840 !important;
    border-color: #243550 !important;
    color: #E8EDF5 !important;
}
html.dark-theme .modal-header {
    background: linear-gradient(135deg, #0A1520 0%, #060D18 100%) !important;
    border-bottom-color: #243550 !important;
}
html.dark-theme .modal-body {
    background: #1A2840 !important;
    color: #E8EDF5 !important;
}
html.dark-theme .modal-footer {
    background: #162638 !important;
    border-top-color: #243550 !important;
}
html.dark-theme .close {
    color: rgba(255,255,255,0.7) !important;
    text-shadow: none !important;
    opacity: 1 !important;
}
html.dark-theme .close:hover {
    color: #FFFFFF !important;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
html.dark-theme .btn-secondary {
    background-color: #1E304A !important;
    border-color: #2E4468 !important;
    color: #E8EDF5 !important;
}
html.dark-theme .btn-secondary:hover {
    background-color: #263D5C !important;
    border-color: #3A5A80 !important;
    color: #FFFFFF !important;
}
html.dark-theme .btn-link {
    color: #7AABCC !important;
}
html.dark-theme .btn-link:hover {
    color: #F6A000 !important;
}
html.dark-theme .btn-outline-secondary {
    color: #7A9AB8 !important;
    border-color: #2E4468 !important;
}
html.dark-theme .btn-outline-secondary:hover {
    background-color: #1E304A !important;
    color: #E8EDF5 !important;
}

/* --------------------------------------------------------------------------
   Dropdowns
   -------------------------------------------------------------------------- */
html.dark-theme .dropdown-menu {
    background-color: #1A2840 !important;
    border-color: #243550 !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3) !important;
}
html.dark-theme .dropdown-item {
    color: #E8EDF5 !important;
}
html.dark-theme .dropdown-item:hover {
    background: rgba(255,255,255,0.08) !important;
    color: #FFFFFF !important;
}
html.dark-theme .dropdown-divider {
    border-top-color: #243550 !important;
}
html.dark-theme .dropdown-header {
    color: #F6A000 !important;
}

/* --------------------------------------------------------------------------
   Alerts
   -------------------------------------------------------------------------- */
html.dark-theme .alert-warning {
    background: rgba(146,64,14,0.25) !important;
    color: #FCD34D !important;
    border-left-color: #F6A000 !important;
}
html.dark-theme .alert-danger {
    background: rgba(153,27,27,0.25) !important;
    color: #FCA5A5 !important;
    border-left-color: #DC2626 !important;
}
html.dark-theme .alert-success {
    background: rgba(6,95,70,0.25) !important;
    color: #6EE7B7 !important;
    border-left-color: #16A34A !important;
}
html.dark-theme .alert-info {
    background: rgba(30,58,138,0.25) !important;
    color: #93C5FD !important;
    border-left-color: #3B82F6 !important;
}
html.dark-theme .alert-light {
    background: rgba(255,255,255,0.05) !important;
    color: #7A9AB8 !important;
    border-left-color: #2E4468 !important;
}

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */
html.dark-theme .breadcrumb-item {
    color: #7A9AB8 !important;
}
html.dark-theme .breadcrumb-item a {
    color: #7AABCC !important;
}
html.dark-theme .breadcrumb-item a:hover {
    color: #F6A000 !important;
}
html.dark-theme .breadcrumb-item.active {
    color: #E8EDF5 !important;
}
html.dark-theme .breadcrumb-item + .breadcrumb-item::before {
    color: #4A6A88 !important;
}

/* --------------------------------------------------------------------------
   Progress
   -------------------------------------------------------------------------- */
html.dark-theme .progress {
    background: rgba(255,255,255,0.1) !important;
}

/* --------------------------------------------------------------------------
   HR
   -------------------------------------------------------------------------- */
html.dark-theme hr {
    border-top-color: #243550 !important;
}

/* --------------------------------------------------------------------------
   Links
   -------------------------------------------------------------------------- */
html.dark-theme a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item):not(.breadcrumb-item) {
    color: #7AABCC;
}
html.dark-theme a:not(.btn):not(.nav-link):not(.navbar-brand):not(.dropdown-item):not(.breadcrumb-item):hover {
    color: #F6A000;
}

/* --------------------------------------------------------------------------
   Text
   -------------------------------------------------------------------------- */
html.dark-theme small {
    color: #7A9AB8 !important;
}
html.dark-theme h1, html.dark-theme h2, html.dark-theme h3,
html.dark-theme h4, html.dark-theme h5, html.dark-theme h6 {
    color: #E8EDF5;
}
html.dark-theme .collapse-service {
    color: #C8D8F0 !important;
}

/* --------------------------------------------------------------------------
   Vue-select
   -------------------------------------------------------------------------- */
html.dark-theme .vs__dropdown-toggle {
    background-color: #0F1E30 !important;
    border-color: #2E4468 !important;
}
html.dark-theme .vs__dropdown-toggle:focus-within {
    border-color: #F6A000 !important;
    box-shadow: 0 0 0 3px rgba(246,160,0,0.2) !important;
}
html.dark-theme .vs__search,
html.dark-theme .vs__search:focus {
    background-color: transparent !important;
    color: #E8EDF5 !important;
}
html.dark-theme .vs__selected {
    background-color: rgba(255,255,255,0.08) !important;
    border-color: #2E4468 !important;
    color: #E8EDF5 !important;
}
html.dark-theme .vs__dropdown-menu {
    background-color: #1A2840 !important;
    border-color: #243550 !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5) !important;
}
html.dark-theme .vs__dropdown-option {
    color: #E8EDF5 !important;
}
html.dark-theme .vs__dropdown-option--highlight {
    background-color: rgba(255,255,255,0.08) !important;
    color: #FFFFFF !important;
}
html.dark-theme .vs__clear,
html.dark-theme .vs__open-indicator {
    fill: #7A9AB8 !important;
}
html.dark-theme .vs__selected-options input {
    color: #E8EDF5 !important;
}

/* --------------------------------------------------------------------------
   Corner title (tariff badge)
   -------------------------------------------------------------------------- */
html.dark-theme .corner-title {
    box-shadow: 0 2px 12px rgba(246,160,0,0.2) !important;
}

/* --------------------------------------------------------------------------
   Theme toggle button
   -------------------------------------------------------------------------- */
html.dark-theme #btnThemeToggle {
    background: rgba(255,255,255,0.07) !important;
    border-color: rgba(255,255,255,0.12) !important;
}
html.dark-theme #btnThemeToggle:hover {
    background: rgba(255,255,255,0.14) !important;
}

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
html.dark-theme .badge-secondary {
    background: rgba(255,255,255,0.12) !important;
    color: #7A9AB8 !important;
}

/* --------------------------------------------------------------------------
   Icons in table actions
   -------------------------------------------------------------------------- */
html.dark-theme td.icons a {
    color: #F6A000 !important;
}
html.dark-theme td.icons a:hover {
    color: #F6A000 !important;
}
/* Free number rows in dark theme — keep dark style, no pink */
html.dark-theme .table tbody tr.text-muted td {
    color: #8DA8C4 !important;
    background-color: rgba(255,255,255,0.04) !important;
}
html.dark-theme .table tbody tr.text-muted td a {
    color: #8DA8C4 !important;
}
html.dark-theme .table tbody tr.text-muted:hover td {
    background-color: rgba(255,255,255,0.08) !important;
    color: #A8C4DC !important;
}
/* Override accent-colored free rows back to dark style */
html.dark-theme body .table tbody tr.text-muted,
html.dark-theme body .table tbody tr.text-muted td,
html.dark-theme body .table tbody tr.text-muted a {
    color: #8DA8C4 !important;
}
html.dark-theme body .table-striped tbody tr.text-muted:nth-of-type(odd),
html.dark-theme body .table-striped tbody tr.text-muted:nth-of-type(even) {
    background-color: rgba(255,255,255,0.04) !important;
}
html.dark-theme body .table tbody tr.text-muted:hover td {
    background-color: rgba(255,255,255,0.08) !important;
}
/* === Rounded corners for ALL block elements in dark theme === */
html.dark-theme .card,
html.dark-theme .modal-content,
html.dark-theme .alert,
html.dark-theme .dropdown-menu,
html.dark-theme .list-group,
html.dark-theme .progress,
html.dark-theme .input-group-text,
html.dark-theme .custom-select,
html.dark-theme .form-control,
html.dark-theme .btn:not(.btn-link) {
    border-radius: 12px !important;
}
html.dark-theme .modal-header {
    border-radius: 12px 12px 0 0 !important;
}
html.dark-theme .modal-footer {
    border-radius: 0 0 12px 12px !important;
}
html.dark-theme .card-header {
    border-radius: 12px 12px 0 0 !important;
}
html.dark-theme .card-footer {
    border-radius: 0 0 12px 12px !important;
}
/* Текст ошибки / pre в тёмной теме */
html.dark-theme pre {
    color: #E8EDF5 !important;
    background: transparent;
}
html.dark-theme .nav-pills .nav-link {
    border-radius: 99px !important;
}
html.dark-theme .nav-pills .nav-link.active {
    border-radius: 99px !important;
}
html.dark-theme .badge,
html.dark-theme .corner-title {
    border-radius: 12px !important;
}
html.dark-theme .input-group > .form-control:first-child,
html.dark-theme .input-group > .custom-select:first-child {
    border-radius: 12px 0 0 12px !important;
}
html.dark-theme .input-group > .input-group-append > .btn,
html.dark-theme .input-group > .input-group-append > .input-group-text {
    border-radius: 0 12px 12px 0 !important;
}
html.dark-theme .breadcrumb {
    border-radius: 12px !important;
}
/* === Dark theme: ensure rounded corners with overflow clip === */
html.dark-theme .modal-content {
    overflow: hidden !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
}
html.dark-theme .card:hover {
    box-shadow: 0 6px 28px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.4) !important;
    border-color: rgba(255,255,255,0.18) !important;
}
/* Navbar dropdowns: restore dark style in dark theme */
html.dark-theme .navbar-corporate .dropdown-menu {
    background: #162438 !important;
    border-color: rgba(255,255,255,0.1) !important;
}
html.dark-theme .navbar-corporate .dropdown-item {
    color: rgba(255,255,255,0.85) !important;
}
html.dark-theme .navbar-corporate .dropdown-item:hover {
    background: rgba(255,255,255,0.08) !important;
    color: #FFFFFF !important;
}
html.dark-theme .navbar-corporate .dropdown-divider {
    border-top-color: rgba(255,255,255,0.1) !important;
}
/* Custom checkboxes for dark theme */
html.dark-theme input[type="checkbox"],
html.dark-theme input[type="radio"] {
    border-color: #4A6080;
    background: #1A2840;
}
html.dark-theme input[type="checkbox"]:checked,
html.dark-theme input[type="radio"]:checked {
    background: #F6A000;
    border-color: #F6A000;
}

/* ===== SCROLL TO TOP — dark theme ===== */
html.dark-theme #scrollTopBtn {
    background: #F6A000;
    box-shadow: 0 4px 16px rgba(246,160,0,0.35);
}
html.dark-theme #scrollTopBtn:hover {
    background: #e09400;
    box-shadow: 0 6px 22px rgba(246,160,0,0.55);
}

/* ===== Modal nav-tabs: inactive tabs orange in dark theme ===== */
html.dark-theme .modal .nav-tabs .nav-link,
html.dark-theme .modal .nav-pills .nav-link {
    color: #F6A000 !important;
}
html.dark-theme .modal .nav-tabs .nav-link:hover,
html.dark-theme .modal .nav-pills .nav-link:hover {
    color: #ffc040 !important;
    background: rgba(246,160,0,0.1) !important;
}
html.dark-theme .modal .nav-tabs .nav-link.active,
html.dark-theme .modal .nav-pills .nav-link.active {
    color: #FFFFFF !important;
    background: #F6A000 !important;
    border-color: #F6A000 !important;
}
html.dark-theme .modal .nav-tabs {
    border-bottom-color: rgba(246,160,0,0.3) !important;
}

/* ===== ECharts chart dark theme support ===== */
html.dark-theme .echarts,
html.dark-theme [_echarts_instance_] {
    background: transparent !important;
}
/* Reset zoom on chart wrapper so toolbox clicks register correctly */
html.dark-theme canvas,
canvas {
    pointer-events: auto !important;
}
/* ===== DateRangePicker: dark theme ===== */
html.dark-theme .daterangepicker {
    background-color: #1B2B45 !important;
    border-color: rgba(255,255,255,0.12) !important;
    color: #E0E8F5 !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5) !important;
    border-radius: 12px !important;
}
html.dark-theme .daterangepicker:before {
    border-bottom-color: rgba(255,255,255,0.15) !important;
}
html.dark-theme .daterangepicker:after {
    border-bottom-color: #1B2B45 !important;
}
html.dark-theme .daterangepicker.drop-up:before {
    border-top-color: rgba(255,255,255,0.15) !important;
}
html.dark-theme .daterangepicker.drop-up:after {
    border-top-color: #1B2B45 !important;
}
html.dark-theme .daterangepicker .calendar-table {
    background-color: #1B2B45 !important;
    border-color: rgba(255,255,255,0.08) !important;
}
html.dark-theme .daterangepicker .calendar-table th,
html.dark-theme .daterangepicker .calendar-table td {
    color: #C8D8EC !important;
}
html.dark-theme .daterangepicker .calendar-table .next span,
html.dark-theme .daterangepicker .calendar-table .prev span {
    border-color: #C8D8EC !important;
}
html.dark-theme .daterangepicker td.available:hover,
html.dark-theme .daterangepicker th.available:hover {
    background-color: rgba(255,255,255,0.1) !important;
    color: #FFFFFF !important;
}
html.dark-theme .daterangepicker td.week,
html.dark-theme .daterangepicker th.week {
    color: rgba(200,216,236,0.4) !important;
}
html.dark-theme .daterangepicker td.off,
html.dark-theme .daterangepicker td.off.in-range,
html.dark-theme .daterangepicker td.off.start-date,
html.dark-theme .daterangepicker td.off.end-date {
    background-color: transparent !important;
    color: rgba(200,216,236,0.3) !important;
}
html.dark-theme .daterangepicker td.in-range {
    background-color: rgba(246,160,0,0.15) !important;
    color: #E0E8F5 !important;
}
html.dark-theme .daterangepicker td.active,
html.dark-theme .daterangepicker td.active:hover {
    background-color: #F6A000 !important;
    color: #1A1A1A !important;
    border-color: transparent !important;
}
html.dark-theme .daterangepicker td.today.active,
html.dark-theme .daterangepicker td.today {
    font-weight: bold;
}
html.dark-theme .daterangepicker td.disabled,
html.dark-theme .daterangepicker option.disabled {
    color: rgba(200,216,236,0.3) !important;
}
html.dark-theme .daterangepicker th.month {
    color: #E0E8F5 !important;
    font-weight: 600;
}
html.dark-theme .daterangepicker select.monthselect,
html.dark-theme .daterangepicker select.yearselect {
    background-color: #152236 !important;
    border-color: rgba(255,255,255,0.15) !important;
    color: #E0E8F5 !important;
}
html.dark-theme .daterangepicker select.hourselect,
html.dark-theme .daterangepicker select.minuteselect,
html.dark-theme .daterangepicker select.secondselect,
html.dark-theme .daterangepicker select.ampmselect {
    background-color: #152236 !important;
    border-color: rgba(255,255,255,0.15) !important;
    color: #E0E8F5 !important;
}
html.dark-theme .daterangepicker .drp-buttons {
    border-top-color: rgba(255,255,255,0.1) !important;
}
html.dark-theme .daterangepicker .drp-buttons .btn-default,
html.dark-theme .daterangepicker .drp-buttons .cancelBtn {
    background-color: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.15) !important;
    color: #E0E8F5 !important;
}
html.dark-theme .daterangepicker .drp-buttons .applyBtn {
    background-color: #F6A000 !important;
    border-color: #F6A000 !important;
    color: #1A1A1A !important;
}
html.dark-theme .daterangepicker .drp-selected {
    color: rgba(200,216,236,0.7) !important;
}
/* ===== VueTables date-filter button: dark theme ===== */
html.dark-theme .VueTables__date-filter {
    background-color: #0F1E30 !important;
    border-color: #2E4468 !important;
    color: #E8EDF5 !important;
    border-radius: 12px !important;
}
html.dark-theme .VueTables__date-filter:hover {
    border-color: #F6A000 !important;
    background-color: #132438 !important;
}
html.dark-theme .VueTables__filter-placeholder {
    color: #E8EDF5 !important;
}

/* ==========================================================================
   CRM-коннектор: тёмная тема
   ========================================================================== */

/* Блоки с ключами подключения (Company ID, API Key, Base64) */
html.dark-theme .crm-key-block {
    background: #0F1E30 !important;
    border: 1px solid #2E4468 !important;
    border-radius: 10px !important;
    color: #E8EDF5 !important;
}
html.dark-theme .crm-key-block .key-value {
    color: #E8EDF5 !important;
}
html.dark-theme .crm-key-block small.text-muted {
    color: #7A9AB8 !important;
}

/* Строки переключателей настроек */
html.dark-theme .toggle-row {
    border-bottom-color: #243550 !important;
}
html.dark-theme .toggle-row label {
    color: #C8D8EC !important;
}
html.dark-theme .toggle-row small.text-muted {
    color: #5A7A98 !important;
}

/* Кнопка копирования */
html.dark-theme .copy-btn {
    color: #5A7A98 !important;
}
html.dark-theme .copy-btn:hover {
    color: #E8EDF5 !important;
}

/* Статус подключения */
html.dark-theme .text-secondary {
    color: #7A9AB8 !important;
}

/* Разделительная полоса под переключателем включения интеграции */
html.dark-theme .toggle-row[style*="border-bottom: 2px solid #ffc107"] {
    border-bottom-color: #D98C00 !important;
}


/* ==========================================================================
   Нативные элементы управления (select, input): тёмная цветовая схема
   Устраняет белый прямоугольник вокруг стрелки <select> при наведении
   ========================================================================== */
html.dark-theme .form-control,
html.dark-theme .custom-select,
html.dark-theme select,
html.dark-theme input,
html.dark-theme textarea {
    color-scheme: dark;
}


/* ==========================================================================
   Select в тёмной теме: убираем нативную кнопку со стрелкой (белый прямоугольник),
   заменяем кастомной SVG-стрелкой
   ========================================================================== */
html.dark-theme select.form-control,
html.dark-theme select.form-control-sm {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237A9AB8' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 10px 7px !important;
    padding-right: 24px !important;
    min-width: 90px !important;
}


/* ================================================
   Swagger UI — Dark Theme Overrides
   ================================================ */

/* Основной фон и текст */
html.dark-theme .swagger-ui,
html.dark-theme .swagger-ui .wrapper,
html.dark-theme .swagger-ui .opblock-tag-section {
    background: #1A2840 !important;
    color: #c5cee0 !important;
}

/* Scheme container (Servers / Authorize полоса) */
html.dark-theme .swagger-ui .scheme-container {
    background: #1E304A !important;
    box-shadow: none !important;
}

/* Заголовки секций */
html.dark-theme .swagger-ui .opblock-tag {
    border-bottom: 1px solid #2C4060 !important;
    color: #c5cee0 !important;
}
html.dark-theme .swagger-ui .opblock-tag:hover {
    background: #263D5C !important;
}

/* Блоки методов (GET / POST / PUT и т.д.) */
html.dark-theme .swagger-ui .opblock {
    background: #1E304A !important;
    border-color: #2C4060 !important;
}
html.dark-theme .swagger-ui .opblock .opblock-summary {
    border-color: #2C4060 !important;
}
html.dark-theme .swagger-ui .opblock .opblock-summary-description {
    color: #c5cee0 !important;
}
html.dark-theme .swagger-ui .opblock-body {
    background: #1A2840 !important;
}

/* Описания параметров */
html.dark-theme .swagger-ui table thead tr th,
html.dark-theme .swagger-ui table thead tr td,
html.dark-theme .swagger-ui .parameters-col_description,
html.dark-theme .swagger-ui .parameter__name,
html.dark-theme .swagger-ui .parameter__type,
html.dark-theme .swagger-ui .parameter__in {
    color: #c5cee0 !important;
}

/* Тело запроса / ответа */
html.dark-theme .swagger-ui .opblock-description-wrapper p,
html.dark-theme .swagger-ui .opblock-external-docs-wrapper p,
html.dark-theme .swagger-ui .opblock-title_normal p,
html.dark-theme .swagger-ui .responses-inner h4,
html.dark-theme .swagger-ui .responses-inner h5,
html.dark-theme .swagger-ui .response-col_status,
html.dark-theme .swagger-ui .response-col_description {
    color: #c5cee0 !important;
}

/* Инпуты и textarea в swagger */
html.dark-theme .swagger-ui input[type=text],
html.dark-theme .swagger-ui input[type=email],
html.dark-theme .swagger-ui input[type=password],
html.dark-theme .swagger-ui textarea,
html.dark-theme .swagger-ui select {
    background: #162638 !important;
    color: #c5cee0 !important;
    border: 1px solid #2C4060 !important;
}

/* Модель / схема */
html.dark-theme .swagger-ui .model-box,
html.dark-theme .swagger-ui section.models {
    background: #1E304A !important;
    border-color: #2C4060 !important;
}
html.dark-theme .swagger-ui .model {
    color: #c5cee0 !important;
}

/* Markdown */
html.dark-theme .swagger-ui .markdown p,
html.dark-theme .swagger-ui .markdown li {
    color: #c5cee0 !important;
}

/* Authorize кнопка */
html.dark-theme .swagger-ui .btn.authorize {
    color: #1A1A1A !important;
    background: #F6A000 !important;
    border-color: #F6A000 !important;
    font-weight: 600 !important;
    opacity: 1 !important;
}

/* Dropdown Servers */
html.dark-theme .swagger-ui .servers > label select {
    background: #162638 !important;
    color: #c5cee0 !important;
    border-color: #2C4060 !important;
}
html.dark-theme .swagger-ui .servers > label {
    color: #c5cee0 !important;
}

/* ==========================================================================
   Toast notifications — dark theme override
   ========================================================================== */
html.dark-theme #toast-container > .toast {
    background-color: #1e2a3a !important;
    color: #e2e8f0 !important;
    box-shadow: 0 8px 28px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.25) !important;
}
html.dark-theme .toast-message {
    color: #e2e8f0 !important;
}
html.dark-theme .toast-close-button {
    color: #6b7a92 !important;
}
html.dark-theme .toast-close-button:hover {
    color: #e2e8f0 !important;
}

/* === ApiTokens - label "Документация:" dark theme === */
html.dark-theme .api-doc-label {
    font-size: 12px;
    color: #c5cee0 !important;
    opacity: 0.85;
}

/* === Swagger - белые полосы Parameters / Responses === */
html.dark-theme .swagger-ui .opblock-section-header {
    background: #1E304A !important;
    box-shadow: none !important;
}
html.dark-theme .swagger-ui .opblock-section-header h4,
html.dark-theme .swagger-ui .opblock-section-header label {
    color: #c5cee0 !important;
}
html.dark-theme .swagger-ui .table-container {
    background: #162638 !important;
}
html.dark-theme .swagger-ui .response-col_links,
html.dark-theme .swagger-ui .responses-table thead tr td,
html.dark-theme .swagger-ui .responses-table thead tr th {
    background: #1E304A !important;
    color: #c5cee0 !important;
}
html.dark-theme .swagger-ui table.responses-table tbody tr td {
    background: #162638 !important;
    color: #c5cee0 !important;
}
html.dark-theme .swagger-ui .opblock-body pre.microlight,
html.dark-theme .swagger-ui .highlight-code > .microlight {
    background: #0f1a2a !important;
    color: #c5cee0 !important;
}
/* === Swagger - Try it out / Execute / Cancel buttons === */
html.dark-theme .swagger-ui .try-out__btn {
    color: #c5cee0 !important;
    border-color: #c5cee0 !important;
    background: transparent !important;
}
html.dark-theme .swagger-ui .try-out__btn.cancel {
    color: #f93e3e !important;
    border-color: #f93e3e !important;
}
html.dark-theme .swagger-ui .btn.execute {
    background: #4990e2 !important;
    color: #fff !important;
    border-color: #4990e2 !important;
}
html.dark-theme .swagger-ui .btn.cancel {
    color: #f93e3e !important;
    border-color: #f93e3e !important;
    background: transparent !important;
}

/* === Swagger - opblock body general text === */
html.dark-theme .swagger-ui .opblock-body {
    color: #c5cee0 !important;
}
html.dark-theme .swagger-ui .opblock-description-wrapper {
    color: #c5cee0 !important;
}

/* === Swagger - markdown tables (Свойство / Поведение внутри описания) === */
html.dark-theme .swagger-ui .markdown table {
    background: transparent !important;
}
html.dark-theme .swagger-ui .markdown table th,
html.dark-theme .swagger-ui .markdown table td {
    color: #c5cee0 !important;
    border-color: #2C4060 !important;
    background: transparent !important;
}
html.dark-theme .swagger-ui .markdown table tr:nth-child(even) td {
    background: rgba(44, 64, 96, 0.25) !important;
}
html.dark-theme .swagger-ui .markdown table tr:nth-child(odd) td {
    background: rgba(26, 40, 64, 0.5) !important;
}

/* === Swagger - Tab buttons (Example Value / Schema) === */
html.dark-theme .swagger-ui .tab li,
html.dark-theme .swagger-ui .tab li button,
html.dark-theme .swagger-ui .tab li button.tablinks {
    color: #c5cee0 !important;
    background: transparent !important;
}
html.dark-theme .swagger-ui .tab li button.tablinks:focus {
    outline: none !important;
}

/* === Swagger - Parameters table body === */
html.dark-theme .swagger-ui .parameters-container,
html.dark-theme .swagger-ui .parameters-container .parameters tbody tr td {
    background: #162638 !important;
    color: #c5cee0 !important;
}

/* === Swagger - Responses inner === */
html.dark-theme .swagger-ui .responses-inner {
    background: #1A2840 !important;
    color: #c5cee0 !important;
}
html.dark-theme .swagger-ui .response-control-media-type__title,
html.dark-theme .swagger-ui .content-type {
    color: #c5cee0 !important;
}

/* === Swagger - Example / Schema вкладки === */
html.dark-theme .swagger-ui .model-example {
    background: #162638 !important;
}
html.dark-theme .swagger-ui section.models .model-container {
    background: #1E304A !important;
}

/* === Swagger - общие span/label внутри Swagger UI === */
html.dark-theme .swagger-ui label {
    color: #c5cee0 !important;
}
html.dark-theme .swagger-ui .opblock-section-header .btn {
    color: #c5cee0 !important;
    border-color: #c5cee0 !important;
    background: transparent !important;
}
/* === Swagger - markdown headings (h1-h6) === */
html.dark-theme .swagger-ui .markdown h1,
html.dark-theme .swagger-ui .markdown h2,
html.dark-theme .swagger-ui .markdown h3,
html.dark-theme .swagger-ui .markdown h4,
html.dark-theme .swagger-ui .markdown h5,
html.dark-theme .swagger-ui .markdown h6,
html.dark-theme .swagger-ui .renderedMarkdown h1,
html.dark-theme .swagger-ui .renderedMarkdown h2,
html.dark-theme .swagger-ui .renderedMarkdown h3,
html.dark-theme .swagger-ui .renderedMarkdown h4,
html.dark-theme .swagger-ui .renderedMarkdown h5,
html.dark-theme .swagger-ui .renderedMarkdown h6 {
    color: #c5cee0 !important;
    border-color: #2C4060 !important;
}

/* === Swagger - все текстовые ноды внутри opblock-body === */
html.dark-theme .swagger-ui .opblock-body p,
html.dark-theme .swagger-ui .opblock-body span:not(.token):not([class*="hljs"]):not([class*="keyword"]):not([class*="string"]),
html.dark-theme .swagger-ui .opblock-body td,
html.dark-theme .swagger-ui .opblock-body th,
html.dark-theme .swagger-ui .opblock-body li,
html.dark-theme .swagger-ui .opblock-body strong,
html.dark-theme .swagger-ui .opblock-body em {
    color: #c5cee0 !important;
}

/* === Swagger - renderedMarkdown (контейнер описания) === */
html.dark-theme .swagger-ui .renderedMarkdown,
html.dark-theme .swagger-ui .renderedMarkdown p,
html.dark-theme .swagger-ui .renderedMarkdown li,
html.dark-theme .swagger-ui .renderedMarkdown td,
html.dark-theme .swagger-ui .renderedMarkdown th,
html.dark-theme .swagger-ui .renderedMarkdown strong,
html.dark-theme .swagger-ui .renderedMarkdown em {
    color: #c5cee0 !important;
}

/* === Swagger - горизонтальные разделители в markdown === */
html.dark-theme .swagger-ui .markdown hr,
html.dark-theme .swagger-ui .renderedMarkdown hr {
    border-color: #2C4060 !important;
}

/* === Swagger - code внутри markdown === */
html.dark-theme .swagger-ui .markdown code,
html.dark-theme .swagger-ui .renderedMarkdown code {
    background: #0f1a2a !important;
    color: #79d2a6 !important;
    border-radius: 3px;
    padding: 1px 4px;
}

/* === Swagger - опциональные/required бейджи === */
html.dark-theme .swagger-ui .parameter__name.required span,
html.dark-theme .swagger-ui span.required {
    color: #f93e3e !important;
}

/* === Swagger - col описания параметров === */
html.dark-theme .swagger-ui .parameter__deprecated,
html.dark-theme .swagger-ui .parameter__in,
html.dark-theme .swagger-ui .parameter__name,
html.dark-theme .swagger-ui .parameter__type,
html.dark-theme .swagger-ui .parameters-col_description p,
html.dark-theme .swagger-ui .parameters-col_description label,
html.dark-theme .swagger-ui .parameters-col_description span {
    color: #c5cee0 !important;
}

/* === Swagger - response статусы === */
html.dark-theme .swagger-ui .response-col_status {
    color: #c5cee0 !important;
}
html.dark-theme .swagger-ui .response-col_description p,
html.dark-theme .swagger-ui .response-col_description span {
    color: #c5cee0 !important;
}

/* === Swagger - info блок вверху === */
html.dark-theme .swagger-ui .info .title,
html.dark-theme .swagger-ui .info p,
html.dark-theme .swagger-ui .info li,
html.dark-theme .swagger-ui .info a {
    color: #c5cee0 !important;
}
/* === Swagger - модальное окно Authorize === */
html.dark-theme .swagger-ui .dialog-ux .backdrop-ux {
    background: rgba(0, 0, 0, 0.6) !important;
}
html.dark-theme .swagger-ui .dialog-ux .modal-ux {
    background: #1A2840 !important;
    border: 1px solid #2C4060 !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5) !important;
}
html.dark-theme .swagger-ui .dialog-ux .modal-ux-header {
    background: #1E304A !important;
    border-bottom: 1px solid #2C4060 !important;
}
html.dark-theme .swagger-ui .dialog-ux .modal-ux-header h3 {
    color: #c5cee0 !important;
}
html.dark-theme .swagger-ui .dialog-ux .modal-ux-header .close-modal {
    background: transparent !important;
    color: #c5cee0 !important;
}
html.dark-theme .swagger-ui .dialog-ux .modal-ux-content {
    background: #1A2840 !important;
    color: #c5cee0 !important;
}
html.dark-theme .swagger-ui .dialog-ux .modal-ux-content p,
html.dark-theme .swagger-ui .dialog-ux .modal-ux-content h4,
html.dark-theme .swagger-ui .dialog-ux .modal-ux-content h5,
html.dark-theme .swagger-ui .dialog-ux .modal-ux-content label,
html.dark-theme .swagger-ui .dialog-ux .modal-ux-content span {
    color: #c5cee0 !important;
}
html.dark-theme .swagger-ui .dialog-ux .modal-ux-content hr {
    background: #2C4060 !important;
    border: none;
    height: 1px;
}
html.dark-theme .swagger-ui .auth-container {
    border-color: #2C4060 !important;
}
html.dark-theme .swagger-ui .auth-container h4,
html.dark-theme .swagger-ui .auth-container p,
html.dark-theme .swagger-ui .auth-container label,
html.dark-theme .swagger-ui .auth-container span {
    color: #c5cee0 !important;
}
html.dark-theme .swagger-ui .auth-container input[type=text],
html.dark-theme .swagger-ui .auth-container input[type=password] {
    background: #162638 !important;
    color: #c5cee0 !important;
    border: 1px solid #2C4060 !important;
}
html.dark-theme .swagger-ui .auth-btn-wrapper .btn.authorize {
    color: #F6A000 !important;
    border-color: #F6A000 !important;
    background: transparent !important;
}
html.dark-theme .swagger-ui .auth-btn-wrapper .btn.modal-btn-done {
    color: #c5cee0 !important;
    border-color: #c5cee0 !important;
    background: transparent !important;
}
/* === Swagger - все кнопки внутри модального окна === */
html.dark-theme .swagger-ui .dialog-ux .modal-ux-content .btn,
html.dark-theme .swagger-ui .dialog-ux .modal-ux-content button,
html.dark-theme .swagger-ui .auth-btn-wrapper .btn,
html.dark-theme .swagger-ui .auth-btn-wrapper button,
html.dark-theme .swagger-ui .btn-done,
html.dark-theme .swagger-ui .modal-btn-done,
html.dark-theme .swagger-ui .btn.modal-btn-done,
html.dark-theme .swagger-ui .btn-clear {
    color: #c5cee0 !important;
    border-color: #c5cee0 !important;
    background: transparent !important;
}
html.dark-theme .swagger-ui .dialog-ux .modal-ux-content .btn.authorize,
html.dark-theme .swagger-ui .auth-btn-wrapper .btn.authorize {
    color: #F6A000 !important;
    border-color: #F6A000 !important;
}
/* === Swagger - замок (lock icon) оранжевый в тёмной теме === */
html.dark-theme .swagger-ui .authorization__btn {
    border: none !important;
    background: transparent !important;
    opacity: 1 !important;
}
html.dark-theme .swagger-ui .authorization__btn svg,
html.dark-theme .swagger-ui .authorization__btn svg *,
html.dark-theme .swagger-ui .opblock-summary .authorization__btn svg,
html.dark-theme .swagger-ui .opblock-summary .authorization__btn svg *,
html.dark-theme .swagger-ui .unlocked svg,
html.dark-theme .swagger-ui .unlocked svg *,
html.dark-theme .swagger-ui .locked svg,
html.dark-theme .swagger-ui .locked svg * {
    fill: #F6A000 !important;
    stroke: none !important;
    opacity: 1 !important;
}
/* Authorize button lock icon */
html.dark-theme .swagger-ui .scheme-container .authorize svg,
html.dark-theme .swagger-ui .scheme-container .authorize svg * {
    fill: #F6A000 !important;
    opacity: 1 !important;
}
/* === Swagger - Authorize hover === */
html.dark-theme .swagger-ui .btn.authorize:hover {
    background: #D98C00 !important;
    border-color: #D98C00 !important;
    color: #1A1A1A !important;
}

/* === Swagger - замки: убираем opacity от Swagger === */
html.dark-theme .swagger-ui .authorization__btn,
html.dark-theme .swagger-ui .opblock-summary .authorization__btn {
    opacity: 1 !important;
    filter: none !important;
}
html.dark-theme .swagger-ui .authorization__btn:disabled,
html.dark-theme .swagger-ui .authorization__btn[disabled] {
    opacity: 1 !important;
}
/* === Swagger - замок ВНУТРИ кнопки Authorize — тёмный (на оранжевом фоне) === */
html.dark-theme .swagger-ui .btn.authorize svg,
html.dark-theme .swagger-ui .btn.authorize svg *,
html.dark-theme .swagger-ui .btn.authorize .authorization__btn svg,
html.dark-theme .swagger-ui .btn.authorize .authorization__btn svg * {
    fill: #1A1A1A !important;
    opacity: 1 !important;
}
/* === Swagger - Schemas section === */
html.dark-theme .swagger-ui section.models {
    background: #1A2840 !important;
    border: 1px solid #2C4060 !important;
}
html.dark-theme .swagger-ui section.models h4 {
    color: #c5cee0 !important;
}
html.dark-theme .swagger-ui section.models .model-container {
    background: #1E304A !important;
    border-color: #2C4060 !important;
    margin: 0 12px 8px !important;
}
html.dark-theme .swagger-ui section.models .model-container:hover {
    background: #263D5C !important;
}
/* Название схемы */
html.dark-theme .swagger-ui .model-title,
html.dark-theme .swagger-ui .model-title__text,
html.dark-theme .swagger-ui .model-title span {
    color: #c5cee0 !important;
}
/* Стрелка раскрытия схемы */
html.dark-theme .swagger-ui section.models span,
html.dark-theme .swagger-ui section.models button {
    color: #c5cee0 !important;
    background: transparent !important;
    border: none !important;
}
/* Содержимое раскрытой схемы */
html.dark-theme .swagger-ui .model,
html.dark-theme .swagger-ui .model * {
    color: #c5cee0 !important;
}
/* Имена полей */
html.dark-theme .swagger-ui .model .property,
html.dark-theme .swagger-ui .model .property-name {
    color: #c5cee0 !important;
}
/* Тип данных (string, integer) */
html.dark-theme .swagger-ui .model .property-type,
html.dark-theme .swagger-ui .model .prop-type {
    color: #79d2a6 !important;
}
/* Example значения */
html.dark-theme .swagger-ui .model .prop-format,
html.dark-theme .swagger-ui .model .model-example {
    color: #a0b4cc !important;
}
/* description: поле */
html.dark-theme .swagger-ui .model .renderedMarkdown p {
    color: #c5cee0 !important;
}
/* Скобки { } */
html.dark-theme .swagger-ui .model .brace-open,
html.dark-theme .swagger-ui .model .brace-close {
    color: #a0b4cc !important;
}