/* FORMS MODERN — стили UI-компонентов.
   HyperVendorAsset + GuestSiteAsset. */

/* === Базовые input/textarea/select — высота 38px === */
input.form-control,
select.form-control,
textarea.form-control,
.form-group .form-control,
form .form-control {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 14px;
    height: 38px;
    line-height: 1.5;
    color: #334155;
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
input.form-control:hover,
select.form-control:hover,
textarea.form-control:hover,
.form-group .form-control:hover,
form .form-control:hover {
    border-color: #94a3b8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus,
.form-group .form-control:focus,
form .form-control:focus {
    border-color: #1976d2;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(25,118,210,0.15), 0 2px 6px rgba(25,118,210,0.10);
    outline: none;
}

/* Textarea — высота auto + min-height */
.form-group textarea.form-control,
form textarea.form-control {
    height: auto;
    min-height: 60px;
    line-height: 1.5;
    resize: vertical;
}

/* === SELECT2 SINGLE — высота 38px === */
.select2-container--default .select2-selection--single {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    height: 38px;
    padding: 0 10px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 0;
    color: #334155;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}
.select2-container--default .select2-selection--single:hover {
    border-color: #94a3b8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25,118,210,0.15), 0 2px 6px rgba(25,118,210,0.10);
}

/* === SELECT2 MULTIPLE === */
.select2-container--default .select2-selection--multiple {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    min-height: 38px;
    padding: 0;
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    width: 100%;
    box-sizing: border-box;
}
.select2-container--default .select2-selection--multiple:hover {
    border-color: #94a3b8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25,118,210,0.15), 0 2px 6px rgba(25,118,210,0.10);
    outline: none;
}

/* Chips — компактные таблетки */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 12px;
    padding: 1px 8px 1px 6px;
    margin: 2px 4px 2px 0;
    color: #0d47a1;
    font-size: 12px;
    font-weight: 500;
    line-height: 22px;
    display: inline-flex;
    align-items: center;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #1976d2;
    font-weight: 700;
    margin-right: 5px;
    font-size: 14px;
    border: none;
    background: transparent;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #dc2626;
}
.select2-container--default .select2-search--inline .select2-search__field {
    margin-top: 4px;
    font-size: 14px;
    color: #334155;
    line-height: 22px;
}

/* Dropdown panel */
.select2-dropdown {
    border: 1px solid #1976d2;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted {
    background-color: #1976d2;
    color: #ffffff;
}
.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #e7f3ff;
    color: #0d47a1;
}

/* Multi-select container width fix */
.select2-container {
    width: 100%;
    max-width: 100%;
}

/* Кнопки «Выбрать все» / «Снять все» в multi-select */
.rel-dropdown-buttons {
    padding: 8px 10px;
    border-top: 1px solid #e2e8f0;
    background-color: #f8fafc;
    display: flex;
    gap: 8px;
}
.rel-dropdown-buttons button,
.rel-dropdown-buttons .btn {
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: #334155;
    transition: all 0.15s ease;
}
.rel-dropdown-buttons button:hover,
.rel-dropdown-buttons .btn:hover {
    background-color: #1976d2;
    color: #ffffff;
    border-color: #1976d2;
}

/* === ЛЕЙБЛЫ === */
.form-group label,
.form-group .control-label,
form .control-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}
.form-group.required label::after,
.form-group .required label::after {
    content: " *";
    color: #dc2626;
    font-weight: 700;
}

/* === WRAPPER form-group === */
.form-group {
    margin-bottom: 14px;
    padding: 6px;
    border-radius: 10px;
    transition: background-color 0.2s ease;
}
.form-group:focus-within {
    background-color: rgba(25,118,210,0.04);
}

/* === МОДАЛКИ === */

.modal-content {
    border: none;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(15,23,42,0.20), 0 6px 16px rgba(15,23,42,0.10);
    overflow: hidden;
}

.modal-header {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 22px;
    border-radius: 14px 14px 0 0;
}
.modal-header .modal-title,
.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.2px;
}

.modal-body {
    padding: 22px;
    color: #334155;
}

.modal-footer {
    background-color: #fafbfc;
    border-top: 1px solid #e2e8f0;
    padding: 14px 22px;
    border-radius: 0 0 14px 14px;
}

/* Кнопка-крестик закрытия модалки — круглая с hover */
.modal-header .close,
.modal .close,
button.close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    color: #64748b;
    opacity: 0.7;
    background: transparent;
    border: none;
    transition: all 0.15s ease;
    margin: -4px -8px -4px auto;
    text-shadow: none;
    padding: 0;
}
/* Flex применяем только когда кнопка видима (без inline display:none) */
.modal-header .close:not([style*="display: none"]):not([style*="display:none"]),
.modal .close:not([style*="display: none"]):not([style*="display:none"]),
button.close:not([style*="display: none"]):not([style*="display:none"]) {
    display: inline-flex;
}
.modal-header .close:hover,
.modal .close:hover,
button.close:hover {
    background-color: #fee2e2;
    color: #dc2626;
    opacity: 1;
}

/* Backdrop — мягче */
.modal-backdrop.show {
    opacity: 0.5;
    background-color: #0f172a;
}

/* === АЛЁРТЫ === */

.alert {
    border-radius: 10px;
    border: 1px solid;
    border-left-width: 4px;
    padding: 14px 18px 14px 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    /* Остаёмся в inline-потоке: display: flex разбивал внутренние
       <code>/<strong>/текстовые узлы на отдельные flex-элементы,
       отображая их вертикальными «столбиками». */
}

/* Цветные варианты — мягкий фон + насыщенная левая полоска */
.alert-primary {
    background-color: #e7f3ff;
    border-color: #b3d9ff;
    border-left-color: #1976d2;
    color: #0d47a1;
}
.alert-success {
    background-color: #e8f5e9;
    border-color: #a5d6a7;
    border-left-color: #2e7d32;
    color: #1b5e20;
}
.alert-danger {
    background-color: #ffebee;
    border-color: #ef9a9a;
    border-left-color: #c62828;
    color: #b71c1c;
}
.alert-warning {
    background-color: #fff8e1;
    border-color: #ffe082;
    border-left-color: #f57c00;
    color: #e65100;
}
.alert-info {
    background-color: #e0f7fa;
    border-color: #80deea;
    border-left-color: #0097a7;
    color: #006064;
}
.alert-secondary {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    border-left-color: #64748b;
    color: #334155;
}
.alert-light {
    background-color: #fafbfc;
    border-color: #e2e8f0;
    border-left-color: #94a3b8;
    color: #475569;
}
.alert-dark {
    background-color: #334155;
    border-color: #1e293b;
    border-left-color: #0f172a;
    color: #ffffff;
}

/* Иконка в начале (если есть <i>/svg) — выравниваем через inline-поток. */
.alert > i:first-child,
.alert > svg:first-child {
    font-size: 18px;
    margin-right: 10px;
    vertical-align: baseline;
}

/* Заголовок внутри алёрта */
.alert .alert-heading {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

/* Кнопка закрытия в alert-dismissible — круглая, в цвет варианта */
.alert-dismissible .close {
    padding: 0;
    width: 26px;
    height: 26px;
    font-size: 18px;
    margin: -4px 0 0 auto;
    color: inherit;
    opacity: 0.6;
}
.alert-dismissible .close:hover {
    opacity: 1;
    background-color: rgba(0,0,0,0.05);
}

/* Ссылки внутри алёрта — подчёркивание + цвет полоски */
.alert a:not(.btn) {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    color: inherit;
}

/* === ASPANSGRID FILTER BUTTONS ROW === */
.bottom-filter-btns-row th {
    white-space: nowrap;
}
.bottom-filter-btns-row .btn {
    display: inline-block;
}

/* Оверрайды CMS theme.min.css — возвращаем Hyper-стили кнопок фильтра */
.bottom-filter-btns-row .btn,
.top-filter-btns-row .btn {
    font-family: "Nunito", sans-serif !important;
    font-size: 0.75rem !important;
    line-height: 1.5 !important;
    padding: 0.25rem 0.5rem !important;
}
/* btn-info — Hyper-овский cyan */
.bottom-filter-btns-row .btn-info,
.top-filter-btns-row .btn-info {
    background-color: #35b8e0 !important;
    border-color: #35b8e0 !important;
    color: #ffffff !important;
}
.bottom-filter-btns-row .btn-info:hover,
.top-filter-btns-row .btn-info:hover {
    background-color: #1aa6d1 !important;
    border-color: #189ec7 !important;
}
/* btn-light — Hyper-овский светло-серый */
.bottom-filter-btns-row .btn-light,
.top-filter-btns-row .btn-light {
    background-color: #eef2f7 !important;
    border-color: #eef2f7 !important;
    color: #313a46 !important;
}
.bottom-filter-btns-row .btn-light:hover,
.top-filter-btns-row .btn-light:hover {
    background-color: #d6dde7 !important;
    border-color: #ced5e0 !important;
}

/* === DATATABLES стандартный (EtlController, etc) — фиксы === */
/* "Show X entries" select — не растягиваем до 38px */
.dataTables_length select,
.dataTables_length select.form-control,
select.form-control-sm {
    height: auto !important;
    padding: 4px 28px 4px 8px !important;
}

/* Sortable column headers — стрелки после текста */
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc,
table.dataTable thead th.sorting_asc_disabled,
table.dataTable thead th.sorting_desc_disabled {
    padding-right: 14px;
    position: relative;
    vertical-align: middle;
}

/* ::before скрыт — обе стрелки через ::after */
table.dataTable thead .sorting::before,
table.dataTable thead .sorting_asc::before,
table.dataTable thead .sorting_desc::before,
table.dataTable thead .sorting_asc_disabled::before,
table.dataTable thead .sorting_desc_disabled::before {
    content: none;
    display: none;
}

/* ▲▼ столбиком через \A + white-space:pre */
table.dataTable thead .sorting::after,
table.dataTable thead .sorting_asc::after,
table.dataTable thead .sorting_desc::after,
table.dataTable thead .sorting_asc_disabled::after,
table.dataTable thead .sorting_desc_disabled::after {
    content: "\25B2\A\25BC";
    display: inline-block;
    position: static;
    white-space: pre;
    vertical-align: middle;
    margin-left: 6px;
    font-family: inherit;
    font-size: 7px;
    line-height: 8px;
    color: #94a3b8;
    opacity: 0.7;
    text-align: center;
    pointer-events: none;
}

/* Подсветка активного направления */
table.dataTable thead .sorting_asc::after {
    content: "\25B2\A\25BC";
    color: #1976d2;
    opacity: 1;
    background: linear-gradient(to bottom, #1976d2 50%, #94a3b8 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

table.dataTable thead .sorting_desc::after {
    content: "\25B2\A\25BC";
    opacity: 1;
    background: linear-gradient(to bottom, #94a3b8 50%, #1976d2 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Прячем стрелки дублирующей шапки в scrollBody */
.dataTables_scrollBody > table > thead .sorting::before,
.dataTables_scrollBody > table > thead .sorting::after,
.dataTables_scrollBody > table > thead .sorting_asc::before,
.dataTables_scrollBody > table > thead .sorting_asc::after,
.dataTables_scrollBody > table > thead .sorting_desc::before,
.dataTables_scrollBody > table > thead .sorting_desc::after,
.dataTables_scrollBody > table > thead .sorting_asc_disabled::before,
.dataTables_scrollBody > table > thead .sorting_asc_disabled::after,
.dataTables_scrollBody > table > thead .sorting_desc_disabled::before,
.dataTables_scrollBody > table > thead .sorting_desc_disabled::after {
    content: none;
    display: none;
}

/* === DATATABLE / TABLES === */

/* Карточка грида */
.datatable-block {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(15,23,42,0.06), 0 1px 3px rgba(15,23,42,0.04);
    margin-bottom: 16px;
}
.datatable-block .datatable-card,
.datatable-block .card-wrapper,
.datatable-block .card-body,
.datatable-block .changableBackground,
#publish-container .datatable-block .changableShadow.shadow {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* Базовая таблица — мягкие границы */
.table {
    border-collapse: separate !important;
    border-spacing: 0;
}

/* Основная строка заголовков (не filter/buttons row) */
.table > thead > tr:last-child > th,
table.dataTable > thead > tr:last-child > th,
.dataTables_wrapper .dataTable > thead > tr:last-child > th,
.datatable-card .table > thead > tr:last-child > th,
body .table > thead > tr:last-child > th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 2px solid #e2e8f0;
    border-top: none;
    padding: 8px 12px;
    white-space: nowrap;
}
/* Filter/buttons rows — прозрачный фон, без UPPERCASE */
.table > thead > tr:not(:last-child) > th,
table.dataTable > thead > tr:not(:last-child) > th {
    background-color: transparent;
    text-transform: none;
    font-weight: normal;
    letter-spacing: normal;
    font-size: 13px;
    color: #475569;
    padding: 5px 12px;
    border-bottom: none;
}
/* Цвет span/a внутри заголовка */
.table thead th,
.table thead th *,
.datatable-card .table thead th,
.datatable-card .table thead th * {
    color: #475569;
}

.table td {
    border-top: 1px solid #f1f5f9;
    border-left: none;
    border-right: 1px solid #f1f5f9;
    padding: 10px 12px !important;
    vertical-align: middle;
    color: #334155;
    background-color: transparent;
}
/* Последняя ячейка — без правой границы */
.table tbody td:last-child {
    border-right: none;
}
/* Хедер — без вертикальных разделителей */
.table th,
.table thead th {
    border-left: none;
    border-right: none;
}

/* Hover строки */
.table tbody tr {
    transition: background-color 0.18s ease;
    position: relative;
}
.table-hover tbody tr:hover,
.table tbody tr:hover {
    background-color: #eff6ff;
    cursor: pointer;
}
/* Hover — цвет ячеек */
.table-hover tbody tr:hover td,
.table tbody tr:hover td {
    background-color: #eff6ff;
    color: #0d47a1;
}
/* Hover — левая полоска-акцент */
.table-hover tbody tr:hover td:first-child,
.table tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 #1976d2;
}

/* Первая ячейка — выделенная */
.table tbody td:first-child {
    font-weight: 600;
    color: #1e293b;
}

/* Action-иконки */
.table td a.action-icon,
.table td .table-action > a,
.table td .table-action > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    color: #64748b;
    transition: all 0.15s ease;
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
    margin: 0 2px;
    padding: 0;
    box-sizing: border-box;
    flex: 0 0 auto;
}
/* Иконки внутри (mdi/fa) */
.table td a.action-icon i,
.table td .table-action > a i,
.table td .table-action > button i {
    font-size: 18px;
    line-height: 1;
}
.table td a.action-icon:hover,
.table td .table-action > a:hover,
.table td .table-action > button:hover {
    background-color: #e0f2fe;
    color: #1976d2;
}
/* Контейнер action-icons */
.table td .table-action {
    display: inline-flex;
    align-items: center;
    background: transparent;
}

/* Selected row */
.table tbody tr.row-selected,
.table tbody tr.selected {
    background-color: #e7f3ff;
    box-shadow: inset 3px 0 0 #0d47a1;
}
.table tbody tr.row-selected td,
.table tbody tr.selected td {
    color: #0d47a1;
}

/* Sortable headers — cursor pointer + hover */
.table thead th.sorting,
.table thead th.sorting_asc,
.table thead th.sorting_desc,
table.dataTable thead .sorting {
    cursor: pointer;
    user-select: none;
}
.table thead th.sorting:hover,
.table thead th.sorting_asc:hover,
.table thead th.sorting_desc:hover {
    background-color: #f1f5f9;
    color: #1976d2;
}

/* === LOADER (card-portlets-loader) === */
.card-disabled {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 14px;
}
.card-disabled .card-portlets-loader,
.card-portlets-loader {
    background-color: transparent;
    background: transparent;
    width: 40px;
    height: 40px;
    margin-left: -20px;
    margin-top: -20px;
    border: 3px solid #e7f3ff;
    border-top-color: #1976d2;
    border-radius: 50%;
    -webkit-animation: forms-modern-spin 0.8s linear infinite;
    animation: forms-modern-spin 0.8s linear infinite;
}

/* === LOADER (DataTables processing) === */
.dataTables_processing,
div.dataTables_processing,
.dataTables_wrapper .dataTables_processing,
table.dataTable .dataTables_processing {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    min-width: 140px;
    margin: 0;
    padding: 14px 24px 14px 50px;
    background-color: #ffffff;
    background-image: none;
    color: #1976d2;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #b3d9ff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15,23,42,0.12), 0 2px 6px rgba(15,23,42,0.06);
    z-index: 999;
    text-align: center;
}
/* CSS-spinner перед текстом */
.dataTables_processing::before,
div.dataTables_processing::before,
.dataTables_wrapper .dataTables_processing::before,
table.dataTable .dataTables_processing::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    border: 2.5px solid #e7f3ff;
    border-top-color: #1976d2;
    border-radius: 50%;
    animation: forms-modern-spin 0.7s linear infinite;
}
@keyframes forms-modern-spin {
    to { transform: rotate(360deg); }
}

/* Empty state — приятнее */
.dataTables_empty,
.table tbody tr td.dataTables_empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 14px;
    font-style: italic;
}

/* Striped — приглушённый зебра */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(15,23,42,0.015);
}

/* Скругление углов хедера */
.table thead th:first-child {
    border-top-left-radius: 8px;
}
.table thead th:last-child {
    border-top-right-radius: 8px;
}

/* DataTables wrapper — отступы */
.dataTables_wrapper {
    padding: 6px 0;
}

/* DataTables search/length */
.dataTables_filter input,
.dataTables_length select {
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 5px 12px;
    font-size: 13px;
    transition: all 0.2s ease;
}
.dataTables_filter input:focus,
.dataTables_length select:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25,118,210,0.15);
    outline: none;
}

/* === PAGINATION — стили на page-link, обёртка page-item сброшена === */
.pagination .page-item,
.dataTables_paginate .paginate_button {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.pagination .page-link,
.dataTables_paginate .paginate_button > a,
.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.disabled {
    display: inline-block;
    border-radius: 6px !important;
    margin: 0 2px;
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    color: #475569;
    background-color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.25;
    transition: all 0.15s ease;
}
.pagination .page-link:hover,
.dataTables_paginate .paginate_button > a:hover,
.dataTables_paginate .paginate_button:hover > a {
    background-color: #1976d2;
    color: #ffffff;
    border-color: #1976d2;
}
.pagination .page-item.active .page-link,
.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current > a {
    background-color: #1976d2 !important;
    border-color: #1976d2 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(25,118,210,0.25);
}
.pagination .page-item.disabled .page-link,
.dataTables_paginate .paginate_button.disabled,
.dataTables_paginate .paginate_button.disabled > a {
    color: #cbd5e1;
    background-color: #ffffff;
    border-color: #f1f5f9;
    cursor: not-allowed;
    box-shadow: none;
}

/* Yii LinkPager: .active.disabled — active перебивает disabled */
.pagination .page-item.active.disabled .page-link,
.pagination .page-item.active.disabled span.page-link,
.pagination li.active.disabled > .page-link {
    background-color: #1976d2 !important;
    border-color: #1976d2 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(25,118,210,0.25);
    cursor: default;
    opacity: 1;
}

/* === БЕЙДЖИ (status pills) === */

.badge {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border-radius: 12px;
    border: 1px solid transparent;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Цветные варианты — мягкие фоны вместо ярких */
.badge-primary,
.bg-primary {
    background-color: #e7f3ff !important;
    color: #0d47a1;
    border-color: #b3d9ff;
}
.badge-success,
.bg-success {
    background-color: #e8f5e9 !important;
    color: #1b5e20;
    border-color: #a5d6a7;
}
.badge-danger,
.bg-danger {
    background-color: #ffebee !important;
    color: #b71c1c;
    border-color: #ef9a9a;
}
.badge-warning,
.bg-warning {
    background-color: #fff8e1 !important;
    color: #e65100;
    border-color: #ffe082;
}
.badge-info,
.bg-info {
    background-color: #e0f7fa !important;
    color: #006064;
    border-color: #80deea;
}
.badge-secondary,
.bg-secondary {
    background-color: #f1f5f9 !important;
    color: #475569;
    border-color: #cbd5e1;
}
.badge-light {
    background-color: #f8fafc !important;
    color: #64748b;
    border-color: #e2e8f0;
}
.badge-dark {
    background-color: #334155 !important;
    color: #ffffff;
    border-color: #1e293b;
}

/* Pill — полностью круглый */
.badge-pill,
.badge.rounded-pill {
    border-radius: 999px;
}

/* Бейджи-счётчики в меню — color/background из настроек CMS, здесь не задаём */
.left-side-menu .badge,
.left-side-menu .side-nav .badge,
.side-nav .badge,
.metismenu .badge {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
    padding: 3px 7px;
    min-width: 18px;
    text-align: center;
    border: none;
}

/* === BODY BG === */
body {
    background-color: #f5f7fa;
}
.wrapper,
.content-page,
.content,
.container-fluid,
.page-title-box {
    background-color: transparent;
}

/* === TOPBAR (.navbar-custom + .nav-user) === */
.nav-user {
    background-color: transparent;
    background: transparent;
}
.navbar-custom {
    background-color: #ffffff;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}

/* === КНОПКИ === */

/* Базовая полировка всех .btn — без изменения размеров */
.btn {
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Hover */
.btn:hover:not(:disabled):not(.disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
}

/* Active */
.btn:active:not(:disabled):not(.disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* Disabled */
.btn:disabled,
.btn.disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Размеры */
.btn-sm,
.btn-group-sm > .btn {
    border-radius: 6px;
}
.btn-lg,
.btn-group-lg > .btn {
    border-radius: 10px;
}

/* === FOCUS-RING для каждого варианта === */
.btn-primary:focus,
.btn-primary.focus {
    box-shadow: 0 0 0 3px rgba(13,110,253,0.25), 0 2px 4px rgba(13,110,253,0.10);
}
.btn-success:focus,
.btn-success.focus {
    box-shadow: 0 0 0 3px rgba(46,160,67,0.25), 0 2px 4px rgba(46,160,67,0.10);
}
.btn-danger:focus,
.btn-danger.focus {
    box-shadow: 0 0 0 3px rgba(220,53,69,0.25), 0 2px 4px rgba(220,53,69,0.10);
}
.btn-warning:focus,
.btn-warning.focus {
    box-shadow: 0 0 0 3px rgba(255,193,7,0.30), 0 2px 4px rgba(255,193,7,0.12);
}
.btn-info:focus,
.btn-info.focus {
    box-shadow: 0 0 0 3px rgba(13,202,240,0.25), 0 2px 4px rgba(13,202,240,0.10);
}
.btn-secondary:focus,
.btn-secondary.focus {
    box-shadow: 0 0 0 3px rgba(108,117,125,0.25), 0 2px 4px rgba(108,117,125,0.10);
}

/* Outline-варианты */
.btn-outline-primary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-secondary {
    border-width: 1.5px;
}

/* === FILE-MANAGER — список сохранённых файлов === */
.file-manager-selected-files {
    font-size: 12px;
    color: #475569;
}
.file-manager-selected-files .card {
    padding: 6px 10px;
}
.file-manager-selected-files .text-muted {
    color: #475569;
    font-size: 12px;
}
.file-manager-selected-files .btn.btn-lg {
    font-size: 15px;
    padding: 4px 6px;
}

/* === FILEPOND — height не задаём, управляет JS === */
.filepond--root {
    margin-bottom: 0;
}
.filepond--root .filepond--drop-label {
    min-height: 60px;
}
/* !important — filepond.css грузится позже */
.filepond--panel-root {
    border: 2px dashed #cbd5e1 !important;
    border-radius: 10px !important;
    background-color: #f8fafc !important;
    transition: all 0.2s ease;
}
.filepond--root:hover .filepond--panel-root {
    border-color: #1976d2 !important;
    background-color: #eff6ff !important;
}
.filepond--drop-label {
    color: #64748b !important;
    font-size: 14px !important;
}
.filepond--drop-label label {
    font-size: 13px !important;
    padding: 0.5em !important;
}
.filepond--label-action {
    color: #1976d2 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    border-bottom: 1px dashed #1976d2 !important;
}

/* === .signature-container + .tbl-form-block === */

/* Canvas подписи — только внутри .signature-container */
.signature-container canvas {
    border-radius: 10px;
    border: 2px dashed #cbd5e1;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}
.signature-container canvas:hover {
    border-color: #94a3b8;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
/* Кнопки рядом с canvas (Подтвердить/Очистить подпись) */
.signature-container .canvas-button {
    border-radius: 4px;
    padding: 6px 16px;
    font-size: 14px;
    box-shadow: none;
}


.tbl-form-block {
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 16px;
    box-sizing: border-box;
    max-width: 100%;
}
.tbl-form-block > form,
.tbl-form-block > * {
    box-sizing: border-box;
    max-width: 100%;
}

/* Дефолтный модерн-card — без !important и без border/border-radius, чтобы
   настройки CMS-формы (вкладка "Края": Линии границы / Форма круглая / Тень)
   побеждали. Border ставится только inline-style при выборе; rounded — только
   классом Bootstrap .rounded; shadow — классами .shadow-sm/.shadow/.shadow-lg
   (либо .shadow-none по умолчанию). */
.tbl-form-block .tbl-form-container {
    background-color: #ffffff;
    padding: 20px 24px;
    box-shadow: 0 4px 16px rgba(15,23,42,0.06), 0 1px 3px rgba(15,23,42,0.04);
    box-sizing: border-box;
    max-width: 100%;
    transition: box-shadow 0.3s ease;
}
.tbl-form-block .tbl-form-container:hover {
    box-shadow: 0 6px 24px rgba(15,23,42,0.08), 0 2px 6px rgba(15,23,42,0.05);
}
/* "Форма круглая" (вкладка "Края") — переопределяем Bootstrap .rounded (4px)
   до модерн-скругления 14px. !important — т.к. у Bootstrap-утилиты тоже !important. */
.tbl-form-block .tbl-form-container.rounded {
    border-radius: 14px !important;
}

/* Зачищаем только Bootstrap-карточки внутри формы (во избежание "карточки в карточке"),
   НЕ трогая .tbl-form-container/обёртки — там живут пользовательские настройки. */
.tbl-form-block .card,
.tbl-form-block .card-body {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}
