/* Основные стили для Obrid */

:root {
    --card-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    --sidebar-width: 250px;
    --sidebar-nav-item-height: 42px;
    --app-topbar-height: 60px;
    --verification-strip-height: 52px;
    /* Отступы между блоками */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.25rem;
    --spacing-xl: 1.5rem;
    --spacing-section: 1.5rem;
}

/* Стили для таблицы физлиц */
.person-row {
    transition: all 0.3s ease;
    border-bottom: 1px solid #dee2e6;
}

.person-row:hover {
    background-color: #f8f9fa !important;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 10;
    position: relative;
}

.person-row:nth-child(even) {
    background-color: #f8f9fa;
}

.person-row:nth-child(odd) {
    background-color: #ffffff;
}

.person-row:hover:nth-child(even),
.person-row:hover:nth-child(odd) {
    background-color: #e3f2fd !important;
}

/* Стили для кнопок в таблице */
.person-row .btn-group {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.person-row:hover .btn-group {
    opacity: 1;
}

/* Анимация для иконок */
.person-row i {
    transition: color 0.3s ease;
}

.person-row:hover i {
    color: #0069d9 !important;
}

/* Стили для таблицы */
.table-hover tbody tr:hover {
    background-color: transparent;
}

.table-responsive {
    border-radius: 0.375rem;
    overflow: hidden;
}

/* Стили для заголовка таблицы */
.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Фиксированный сайдбар */
body.sidebar-collapsed {
    --sidebar-width: 72px;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: #000000;/*var(--bs-dark);*/
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: width 0.28s ease, box-shadow 0.28s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

html.sidebar-no-transition .sidebar,
html.sidebar-no-transition .main-content,
html.sidebar-no-transition .app-topbar,
html.sidebar-no-transition .verification-status-block {
    transition: none !important;
}

.sidebar .nav-link {
    color: var(--bs-gray-400);
    min-height: var(--sidebar-nav-item-height);
    height: var(--sidebar-nav-item-height);
    padding: 0 20px;
    box-sizing: border-box;
    border-radius: 8px;
    margin: 2px 8px;
    transition: background-color 0.25s ease, color 0.25s ease, padding 0.25s ease, transform 0.25s ease;
    position: relative;
    display: flex;
    align-items: center;
    line-height: 1.2;
}

.sidebar .nav-link:hover {
    color: var(--bs-white);
    background-color: var(--bs-gray-700);
    padding-left: 24px;
    transform: translateX(4px);
}

.sidebar .nav-link.active {
    color: var(--bs-white);
    background-color: var(--bs-primary);
    border-left: 4px solid var(--bs-primary);
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.3);
    transform: translateX(4px);
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

/* SVG-иконки разделов (mask → цвет как у .nav-link) */
.sidebar .nav-link .sidebar-nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: block;
    transition: all 0.3s ease;
    background-color: currentColor;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
}

.sidebar .nav-link .sidebar-nav-icon--organization {
    -webkit-mask-image: url('../icons/organization.svg');
    mask-image: url('../icons/organization.svg');
}
.sidebar .nav-link .sidebar-nav-icon--programs {
    -webkit-mask-image: url('../icons/programs.svg');
    mask-image: url('../icons/programs.svg');
}
.sidebar .nav-link .sidebar-nav-icon--streams {
    -webkit-mask-image: url('../icons/streams.svg');
    mask-image: url('../icons/streams.svg');
}
.sidebar .nav-link .sidebar-nav-icon--students {
    -webkit-mask-image: url('../icons/students.svg');
    mask-image: url('../icons/students.svg');
}
.sidebar .nav-link .sidebar-nav-icon--teachers {
    -webkit-mask-image: url('../icons/teachers.svg');
    mask-image: url('../icons/teachers.svg');
}
.sidebar .nav-link .sidebar-nav-icon--legal-entities {
    -webkit-mask-image: url('../icons/legal-entities.svg');
    mask-image: url('../icons/legal-entities.svg');
}
.sidebar .nav-link .sidebar-nav-icon--persons {
    -webkit-mask-image: url('../icons/persons.svg');
    mask-image: url('../icons/persons.svg');
}
.sidebar .nav-link .sidebar-nav-icon--documents {
    -webkit-mask-image: url('../icons/documents.svg');
    mask-image: url('../icons/documents.svg');
}
.sidebar .nav-link .sidebar-nav-icon--settings {
    -webkit-mask-image: url('../icons/settings.svg');
    mask-image: url('../icons/settings.svg');
}

.sidebar .nav-link:hover i,
.sidebar .nav-link:hover .sidebar-nav-icon {
    transform: scale(1.1);
}

.sidebar .nav-link.active i,
.sidebar .nav-link.active .sidebar-nav-icon {
    transform: scale(1.1);
}

/* Кнопка сворачивания сайдбара */
.sidebar-collapse-btn {
    border: 0 !important;
    line-height: 1;
    flex-shrink: 0;
    text-decoration: none !important;
}
.sidebar-collapse-btn:hover,
.sidebar-collapse-btn:focus {
    color: #fff !important;
}

/* Свернутый сайдбар: только иконки */
body.sidebar-collapsed .sidebar-brand-text {
    display: none;
}
body.sidebar-collapsed .sidebar-brand-row {
    justify-content: center !important;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
}
body.sidebar-collapsed .sidebar .sidebar-nav-label {
    display: none !important;
}
body.sidebar-collapsed .sidebar .nav-link {
    justify-content: center;
    min-height: var(--sidebar-nav-item-height);
    height: var(--sidebar-nav-item-height);
    padding: 0 8px;
    margin: 2px 6px;
    box-sizing: border-box;
}
body.sidebar-collapsed .sidebar .nav-link i,
body.sidebar-collapsed .sidebar .nav-link .sidebar-nav-icon {
    margin-right: 0 !important;
    margin-left: 0 !important;
}
body.sidebar-collapsed .sidebar .nav-link:hover {
    padding-left: 8px;
    transform: none;
}
body.sidebar-collapsed .sidebar .nav-link.active {
    transform: none;
}
body.sidebar-collapsed .sidebar hr {
    margin: 12px 8px;
}

/* Заголовок сайдбара */
.sidebar h4 {
    color: var(--bs-white);
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Разделитель в сайдбаре */
.sidebar hr {
    border-color: var(--bs-gray-600);
    margin: 20px 16px;
    opacity: 0.5;
}

/* Информация о пользователе */
.sidebar .nav-link.text-muted {
    color: var(--bs-gray-500) !important;
    font-size: 0.9rem;
    min-height: var(--sidebar-nav-item-height);
    height: var(--sidebar-nav-item-height);
    padding: 0 20px;
    margin: 2px 8px;
    box-sizing: border-box;
}

/* Кнопка выхода */
.sidebar .nav-link[href*="logout"] {
    color: var(--bs-danger);
    transition: all 0.3s ease;
}

.sidebar .nav-link[href*="logout"]:hover {
    color: var(--bs-white);
    background-color: var(--bs-danger);
    transform: translateX(4px);
}

/* Верхний закреплённый бар (хлебные крошки + действия) */
.app-topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--app-topbar-height);
    z-index: 991;
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    transition: left 0.28s ease, top 0.2s ease;
}

body.has-verification-block .app-topbar {
    top: var(--verification-strip-height);
}

.app-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    min-height: var(--app-topbar-height);
    padding: 0 1rem 0 1.25rem;
    gap: 1rem;
    min-width: 0;
}

.app-topbar-left {
    min-width: 0;
    flex: 0 1 auto;
    max-width: 42%;
    display: flex;
    align-items: center;
}

.app-topbar-banner {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
}

.app-test-mode-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
}

.app-topbar-tools {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 1200px) {
    .app-topbar-left {
        max-width: 36%;
    }

    .app-test-mode-banner {
        font-size: 0.72rem;
        padding: 0.3rem 0.55rem;
    }
}

@media (max-width: 992px) {
    .app-topbar-banner {
        display: none;
    }
}

.app-topbar-icon-btn {
    width: 36px;
    height: 36px;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
}

.app-topbar-ai-wrap {
    position: relative;
}

.app-ai-gradient-ring {
    display: inline-flex;
    align-items: stretch;
    padding: 2px;
    border-radius: 10px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #d946ef, #06b6d4, #22c55e, #6366f1);
    background-size: 400% 100%;
    animation: app-ai-gradient-flow 5s linear infinite;
    height: 36px;
    box-sizing: border-box;
}

@keyframes app-ai-gradient-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.app-ai-methodist-btn {
    height: 100%;
    min-height: 0;
    padding: 0 12px !important;
    line-height: 1.2;
    border: 0 !important;
    border-radius: 8px !important;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.app-ai-tip {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(300px, calc(100vw - 24px));
    padding: 14px 16px;
    background: linear-gradient(180deg, #fafbff 0%, #fff 40%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    z-index: 1200;
    font-size: 0.84rem;
    line-height: 1.5;
    color: #334155;
}

.app-ai-tip::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 18px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
    transform: rotate(45deg);
}

.app-ai-tip-title {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6366f1;
    margin-bottom: 6px;
}

@media (max-width: 768px) {
    .app-topbar {
        left: 0;
    }
}

/* Основной контент */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 20px;
    padding-top: calc(var(--app-topbar-height) + 20px);
    min-height: 100vh;
    background-color: #f8f9fa;
    transition: margin-left 0.28s ease, padding-top 0.2s ease;
}

body.has-verification-block .main-content {
    padding-top: calc(var(--app-topbar-height) + var(--verification-strip-height) + 20px);
}

/* Заголовки страниц */
.page-title-box {
    background: var(--bs-white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    border: 1px solid var(--bs-gray-200);
}

.page-title {
    margin: 0;
    color: var(--bs-dark);
    font-weight: 600;
    font-size: 1.75rem;
}

/* Карточки — отступ снизу только у колонки (mb-4), у карточки не дублируем */
.card {
    border: 1px solid var(--bs-gray-200);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 0;
    background: var(--bs-white);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-header {
    background-color: var(--bs-gray-50);
    border-bottom: 1px solid var(--bs-gray-200);
    border-radius: 12px 12px 0 0 !important;
    padding: 18px 24px;
    font-weight: 600;
}

.card-title {
    color: var(--bs-dark);
    font-weight: 600;
    margin: 0;
}

/* Кнопки */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    box-shadow: none;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
        border-color 0.15s ease-in-out;
}

/* Тень и лёгкий подъём — только у заливных кнопок, не у outline */
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-dark {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-success:hover,
.btn-danger:hover,
.btn-warning:hover,
.btn-info:hover,
.btn-dark:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.btn-primary {
    background-color: #0069d9;
    border-color: #0069d9;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* .btn-secondary не переопределяем — цвета и фон задаёт тема Zephyr (Bootswatch) */

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-dark,
.btn-outline-light {
    box-shadow: none;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-success:hover,
.btn-outline-danger:hover,
.btn-outline-warning:hover,
.btn-outline-info:hover,
.btn-outline-dark:hover,
.btn-outline-light:hover {
    transform: none;
    box-shadow: none;
}

.btn-outline-primary {
    color: #0069d9;
    border-color: #0069d9;
}

.btn-outline-primary:hover {
    background-color: #0069d9;
    border-color: #0069d9;
    color: #fff;
}

/* Инпуты и селекты — стили задаёт Bootstrap (Zephyr). Ниже только кастомный dropdown для селектов. */

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
}

/* Кастомный селект (глобально) — нативный скрыт, видим кнопку и стилизованный выпадающий список */
.custom-select-wrap {
    position: relative;
    min-width: 120px;
}

/* Кастомный селект внутри flex-контейнеров: разрешаем ужиматься, иначе может "вылазить" за границы колонок */
.duration-unit-wrap {
    min-width: 0;
}
.duration-unit-wrap .custom-select-wrap {
    min-width: 0;
    width: 100%;
    flex: 1 1 0;
}
.duration-unit-wrap .custom-select-trigger {
    width: 100%;
    min-width: 0;
}

.custom-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Триггер как Bootstrap .form-select по размеру (Zephyr) */
.custom-select-trigger {
    width: 100%;
    min-height: calc(1.5em + 0.75rem + 2px);
    /* Раньше был большой padding-right как у нативного .form-select под встроенную стрелку.
       В кастомном селекте стрелка — это отдельный элемент, поэтому делаем нормальный правый отступ. */
    padding: 0.375rem 0.75rem 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    color: #212529;
}

.custom-select-trigger:hover {
    border-color: #adb5bd;
}

.custom-select-trigger:focus {
    outline: none;
    border-color: var(--bs-primary, #0d6efd);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb, 13, 110, 253), 0.25);
}

/* Заблокированный кастомный селект (режим просмотра, например организация) */
.custom-select-wrap.is-disabled .custom-select-trigger {
    background-color: #f8f9fa !important;
    border-color: #e9ecef !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    opacity: 0.7;
    pointer-events: none;
}

.custom-select-value {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-arrow {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: #495057;
    margin-left: 0.5rem;
    transition: transform 0.2s;
}

.custom-select-wrap.is-open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-height: 280px;
    overflow-y: auto;
}

.custom-select-search {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    padding: 8px;
    border-bottom: 1px solid #e9ecef;
}

.custom-select-options {
    padding: 4px 0;
}

.custom-select-dropdown.has-no-results::after {
    content: 'Ничего не найдено';
    display: block;
    padding: 10px 12px;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Dropdown открывается вверх если места снизу мало */
.custom-select-wrap.dropdown-up .custom-select-dropdown {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 4px;
}

/* Для таблиц - делаем overflow visible только по Y */
.table-responsive {
    overflow-x: auto;
    overflow-y: visible;
}

/* Для ячеек таблицы с селектами */
td .custom-select-wrap {
    position: relative;
    z-index: 1;
}

td .custom-select-wrap.is-open {
    z-index: 10000;
}

/* Портал для выпадающих списков внутри overflow:hidden (таблицы, карточки) */
#obrid-select-portal {
    position: fixed;
    inset: 0;
    z-index: 1080;
    pointer-events: none;
    overflow: visible;
}
#obrid-select-portal .custom-select-dropdown {
    pointer-events: auto;
    position: fixed !important;
    top: auto;
    left: auto;
    right: auto !important;
    bottom: auto;
    width: auto;
    margin: 0 !important;
    z-index: 1081 !important;
    display: block;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
#obrid-select-portal .custom-select-dropdown[hidden] {
    display: none !important;
    pointer-events: none !important;
}

.custom-select-dropdown[hidden] {
    display: none !important;
}

.custom-select-option {
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    color: #212529;
    cursor: pointer;
    transition: background-color 0.15s;
}

.custom-select-option:hover {
    background-color: #f8f9fa;
}

.custom-select-option:first-child {
    border-radius: 0.25rem 0.25rem 0 0;
}

.custom-select-option:last-child {
    border-radius: 0 0 0.25rem 0.25rem;
}

/* Таблицы */
.table {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Информационные блоки (не Bootstrap .alert) */
.app-notice {
    border: none;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 0.75rem 1rem;
}

.app-notice-success {
    background-color: #d4edda;
    color: #155724;
}

.app-notice-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #721c24;
    font-weight: 500;
}

.app-notice-warning {
    background-color: #fff3cd;
    color: #856404;
}

.app-notice-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.app-notice-muted {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6 !important;
    color: #495057;
}

.app-notice-title {
    margin-bottom: 0.35rem;
    font-weight: 600;
}

/* Пагинация */
.pagination .page-link {
    color: #0069d9;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background-color: #0069d9;
    border-color: #0069d9;
}

/* Бейджи */
.badge {
    font-size: 0.75em;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 10px;
        padding-top: calc(var(--app-topbar-height) + 10px);
    }

    body.has-verification-block .main-content {
        padding-top: calc(var(--app-topbar-height) + var(--verification-strip-height) + 10px);
    }
    
    .page-title-box {
        padding: 15px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Стили для неподтвержденных аккаунтов */
.account-not-verified {
    position: relative;
}

.account-not-verified .main-content {
    filter: grayscale(0.7) brightness(0.6);
    pointer-events: none;
    user-select: none;
}

/* Сайдбар остается активным */
.account-not-verified .sidebar {
    filter: none;
    pointer-events: auto;
    user-select: auto;
}

/* Страница организации полностью доступна - блокировка не применяется */

/* Анимация пульсации для кнопки редактирования */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0.1);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
        transform: scale(1);
    }
}

/* Класс для пульсирующей кнопки */
.btn-pulse {
    animation: pulse-glow 2s infinite;
    background: linear-gradient(45deg, #0d6efd, #0b5ed7);
    border: none;
    color: white;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn-pulse::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-pulse:hover::before {
    left: 100%;
}

.btn-pulse:hover {
    background: linear-gradient(45deg, #0b5ed7, #0a58ca);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Информационные блоки для статуса подтверждения */
.verification-status-block {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: 9998;
    padding: 15px 20px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: left 0.28s ease;
}

.verification-status-block.warning {
    background-color: rgba(255, 193, 7, 0.9);
    color: #856404;
    border-bottom: 3px solid #ffc107;
}

.verification-status-block.danger {
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
    border-bottom: 3px solid #dc3545;
}

.verification-status-block .btn {
    margin-left: 15px;
    font-size: 0.9rem;
    padding: 8px 20px;
}

/* Сайдбар остается на своем месте */
body.has-verification-block .sidebar {
    top: 0;
    height: 100vh;
}

/* Фиксированное уведомление о необходимости заполнить данные организации */
.verification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.verification-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 500px;
    margin: 20px;
    animation: pulse 2s infinite;
}

.verification-notice h2 {
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: 700;
}

.verification-notice p {
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.verification-notice .btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.verification-notice .btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }
}

/* Адаптивность для уведомления */
@media (max-width: 768px) {
    .verification-status-block {
        left: 0;
        right: 0;
    }
    
    .verification-notice {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .verification-notice h2 {
        font-size: 1.5rem;
    }
    
    .verification-notice p {
        font-size: 1rem;
    }
}

/* Утилиты */
.text-primary { color: #0069d9 !important; }
.text-secondary { color: #6c757d !important; }
.text-success { color: #28a745 !important; }
.text-danger { color: #dc3545 !important; }
.text-warning { color: #ffc107 !important; }
.text-info { color: #17a2b8 !important; }
.text-muted { color: #6c757d !important; }

.bg-primary { background-color: #0069d9 !important; }
.bg-secondary { background-color: #6c757d !important; }
.bg-success { background-color: #28a745 !important; }
.bg-danger { background-color: #dc3545 !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-info { background-color: #17a2b8 !important; }

/* Глобальные стили для полей ввода - идентичные стилям организации */
.form-control-disabled:not([type="checkbox"]):not([type="radio"]) {
    background-color: #f8f9fa !important;
    border-color: #e9ecef !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    opacity: 0.7;
}

.form-control:disabled:not([type="checkbox"]):not([type="radio"]),
textarea.form-control:disabled,
.form-select:disabled {
    background-color: #f8f9fa !important;
    border-color: #e9ecef !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    opacity: 0.7;
}

.form-control-disabled:not([type="checkbox"]):not([type="radio"]):focus {
    border-color: #e9ecef !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.form-control-enabled:not([type="checkbox"]):not([type="radio"]) {
    background-color: #f8f9fa !important;
    border-color: #ced4da !important;
    color: #212529 !important;
    cursor: text !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    opacity: 1;
}

.form-control-enabled:not([type="checkbox"]):not([type="radio"]):focus {
    border-color: #0069d9 !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

.form-control-activating {
    animation: fieldActivation 0.6s ease-in-out;
}

@keyframes fieldActivation {
    0% {
        transform: scale(1);
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 0.2rem rgba(0, 123, 255, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    }
}

/* Стили для хлебных крошек */
.breadcrumb {
    background-color: #ffffff;
    border-radius: 6px;
    padding: 0.3rem 0.7rem;
    margin-bottom: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    min-height: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumb-item {
    font-size: 0.875rem;
    line-height: 1.5;
    display: inline-flex;
    align-items: center;
    padding: 0;
}

.breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: #0069d9;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #212529;
    font-weight: 700;
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: #6c757d;
    padding: 0 0.5rem;
    font-weight: 400;
    display: inline-block;
}

/* Крошки в топ-баре: без второго «слоя» (общий .breadcrumb выше задаёт плашку для страниц в контенте) */
.app-topbar-left .breadcrumb {
    margin-bottom: 0;
    max-width: 100%;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

.errorlist li {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    border-left: 3px solid #dc3545;
}

/* Стили для тумблеров (switch) */
.form-check-switch .form-check-input:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

.form-check-switch .form-check-input:checked::after {
    background-color: #ffffff;
}

/* Переопределяем стандартный bootstrap-овый svg-трек и рисуем свой белый кружок */
.form-check-switch .form-check-input {
    background-image: none !important;
    position: relative;
    -webkit-appearance: none;
    appearance: none;
}

.form-check-switch .form-check-input::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 2px;
    transform: translateY(-50%);
    width: calc(1rem - 4px);
    height: calc(1rem - 4px);
    background-color: #6c757d;
    border-radius: 50%;
    transition: background-color 0.15s ease-in-out, transform 0.15s ease-in-out;
}

.form-switch .form-check-input {
    width: 2.25rem; /* немного шире стандартного переключателя */
    height: 1.25rem;
}

.form-check-switch .form-check-input:checked::after {
    transform: translate(1rem, -50%);
    background-color: #ffffff;
}

/* Отступ для label в тумблере */
.form-switch .form-check-label {
    margin-left: 8px;
    padding-top: 0.25rem;
}
