@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&display=swap');

/* Применяем Montserrat ко всем элементам */
* {
    font-family: 'Montserrat', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    color: #02637C;
}

.background {
    width: 100%;
    height: 100vh;
    background: url('../pic/back.png') no-repeat center center fixed;
    background-size: cover;
    position: relative;
}

.main-container {
    display: flex;
    min-height: 100vh;
    padding: 10px;
    box-sizing: border-box;
    gap: 20px;
}

/* Левая панель */
.side-panel {
    width: 200px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-logo {
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
}

.page-title {
    color: #02637C;
    font-size: 40px;
    margin: 20px 0;
}

.side-navigation {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-button {
    width: 80%;
    text-align: left;
    padding: 15px 20px;
}

/* Основная область */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.content-frame {
    background-color: rgba(179, 212, 255, 0.8);
    border-radius: 30px;
    padding: 20px;
    margin: 0px 0px 0px 0px;
    min-height: calc(100vh - 200px - 0%);
    position: relative;
}

.content-area {
    height: 100%;
    overflow-y: auto;
}

/* Верхняя панель */
.top-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.top-navigation {
    display: flex;
    gap: 20px;
}

/* Нижняя панель */
.bottom-panel {
    padding: 20px;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Общие стили для кнопок */
.custom-button {
    padding: 8px 16px;
    color: #02627c;
    background: transparent;
    border: 2px solid #02627c;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.custom-button:hover {
    background: #02627c;
    color: #ffffff;
}

/* Стили для иконок в обычных кнопках .custom-button */
.custom-button i {
    /* Обеспечиваем одинаковый размер для всех иконок */
    width: 16px !important;
    height: 16px !important;
    font-size: 16px !important;
    /* Центрируем иконку */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* Убираем лишние отступы */
    margin: 0 !important;
    padding: 0 !important;
    /* Обеспечиваем симметричность */
    line-height: 1 !important;
    text-align: center !important;
    /* Принудительное выравнивание по центру */
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
}

.delete-button {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.delete-button:hover {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.cancel-button {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.cancel-button:hover {
    background-color: rgba(108, 117, 125, 0.2);
    color: #6c757d;
}

/* Стили для кнопок в нижней панели */
.bottom-actions {
    position: fixed;
    bottom: 0;
    right: 0;
    width: calc(100% - 300px);
    padding: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    z-index: 1000;
    background: transparent;
}

.bottom-actions .custom-button {
    min-width: 120px;
    text-align: center;
}

/* Стили для кнопок в таблице */

.action-button {
    padding: 7px 7px;
    color: #02627c;
    background: transparent;
    border: 2px solid #02627c;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-button:hover {
    background: #02627c;
    color: #ffffff;
}

/* Стили для иконок в кнопках .action-button */
.action-button i {
    /* Обеспечиваем одинаковый размер для всех иконок */
    width: 15px !important;
    height: 15px !important;
    font-size: 15px !important;
    /* Центрируем иконку */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* Убираем лишние отступы */
    margin: 0 !important;
    padding: 0 !important;
    /* Обеспечиваем симметричность */
    line-height: 1 !important;
    text-align: center !important;
    /* Принудительное выравнивание по центру */
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
}

td.action-buttons,
td .action-buttons {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    padding: 1px 6px !important;
}

td.action-buttons .custom-button,
td .action-buttons .custom-button {
    min-width: auto;
    width: 24px;
    height: 24px;
    padding: 3px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

td.action-buttons .custom-button i,
td .action-buttons .custom-button i {
    min-width: auto;
    width: 24px;
    height: 24px;
    padding: 3px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    /* Принудительное выравнивание иконок по центру */
    text-align: center;
    line-height: 1;
    /* Обеспечиваем одинаковый размер для всех иконок */
    font-size: 12px !important;
    width: 12px !important;
    height: 12px !important;
    /* Центрируем иконку в кнопке */
    position: relative;
    top: 0;
    left: 0;
    transform: none;
}

/* Специальные стили для исправления асимметрии иконок */
td.action-buttons .custom-button .fa-trash,
td.action-buttons .custom-button .fa-trash-alt,
td.action-buttons .custom-button .fa-trash-can,
td .action-buttons .custom-button .fa-trash,
td .action-buttons .custom-button .fa-trash-alt,
td .action-buttons .custom-button .fa-trash-can {
    /* Принудительно устанавливаем одинаковые размеры для иконки корзины */
    width: 12px !important;
    height: 12px !important;
    font-size: 12px !important;
    /* Центрируем иконку */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* Убираем лишние отступы */
    margin: 0 !important;
    padding: 0 !important;
    /* Обеспечиваем симметричность */
    line-height: 1 !important;
    text-align: center !important;
}

/* Общие стили для всех иконок FontAwesome в кнопках действий */
td.action-buttons .custom-button .fas,
td.action-buttons .custom-button .fa,
td .action-buttons .custom-button .fas,
td .action-buttons .custom-button .fa {
    /* Обеспечиваем одинаковый размер для всех иконок */
    width: 12px !important;
    height: 12px !important;
    font-size: 12px !important;
    /* Центрируем иконку */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* Убираем лишние отступы */
    margin: 0 !important;
    padding: 0 !important;
    /* Обеспечиваем симметричность */
    line-height: 1 !important;
    text-align: center !important;
    /* Принудительное выравнивание по центру */
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
}

/* Глобальные стили для исправления асимметрии иконки корзины во всех кнопках */
.fa-trash,
.fa-trash-alt,
.fa-trash-can {
    /* Принудительно устанавливаем одинаковые размеры для иконки корзины */
    width: 1em !important;
    height: 1em !important;
    font-size: inherit !important;
    /* Центрируем иконку */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* Убираем лишние отступы */
    margin: 0 !important;
    padding: 0 !important;
    /* Обеспечиваем симметричность */
    line-height: 1 !important;
    text-align: center !important;
    /* Принудительное выравнивание по центру */
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
}



/* Стили для таблиц */
.data-table {
    font-family: 'Montserrat', sans-serif;
    width: 100%;
    border-collapse: collapse;
    margin: 0px 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    overflow: hidden;
    font-weight: 500;
}

.data-table th,
.data-table td {
    padding: 1px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(2, 98, 124, 0.1);
    font-size: 14px;
}

.data-table th {
    background-color: rgba(2, 98, 124, 0.1);
    font-weight: 600;
    text-align: left;
    border-right: 1px solid rgba(2, 98, 124, 0.2);
    padding: 4px 12px;
    font-size: 14px;
}

.data-table th:last-child {
    border-right: none;
}

.data-table tr:hover td {
    background: rgba(2, 98, 124, 0.02);
}

/* Уменьшаем ширину столбца с действиями */
.data-table th:last-child,
.data-table td:last-child {
    width: 1%;
    white-space: nowrap;
    text-align: left;
}

/* Минимальная ширина для столбца ID */
.data-table th:first-child,
.data-table td:first-child {
    width: 1%;
    min-width: 20px;
    max-width: 60px;
    white-space: nowrap;
    text-align: center;
}

/* Специальные стили для колонки ФИО в таблице управления пользователями */
.data-table th:nth-child(1):not(:has(+ th + th + th + th)),
.data-table td:nth-child(1):not(:has(+ td + td + td + td)) {
    width: auto;
    min-width: 200px;
    max-width: none;
    white-space: normal;
    text-align: left;
}

/* Альтернативный способ для таблицы с 4 колонками (ФИО, Логин, Роль, Действия) */
.data-table:has(th:nth-child(4):last-child) th:nth-child(1),
.data-table:has(th:nth-child(4):last-child) td:nth-child(1) {
    width: auto;
    min-width: 200px;
    max-width: none;
    white-space: normal;
    text-align: left;
}

/* Специальные стили для таблицы управления пользователями */
.users-table .fio-column {
    width: auto !important;
    min-width: 200px !important;
    max-width: none !important;
    white-space: normal !important;
    text-align: left !important;
}

/* Стили для сортируемых заголовков таблиц */
.data-table .sortable-header {
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: background-color 0.2s ease;
}

.data-table .sortable-header:hover {
    background-color: rgba(2, 98, 124, 0.1);
}

.data-table .sortable-header::before {
    content: '↕';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #999;
    transition: color 0.2s ease;
}

.data-table .sortable-header.sort-asc::before {
    content: '↑';
    color: #02627c;
}

.data-table .sortable-header.sort-desc::before {
    content: '↓';
    color: #02627c;
}

.data-table .sortable-header .column-filter {
    position: relative;
    z-index: 1;
}

/* Стиль для заголовков с фильтрами - используем JavaScript для добавления класса */
.data-table .sortable-header.has-filter::before {
    right: 120px;
}

/* Стили для форм */
.form-container {
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    max-width: 1900px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: 'Montserrat', sans-serif;
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(2, 98, 124, 0.3);
    border-radius: 4px;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #02627c;
    outline: none;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 4px;
}

.help-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 4px;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    background: transparent;
    color: #02637C;
    text-decoration: none;
    border-radius: 50px;
    border: 2px solid #02637C;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button:hover {
    background: rgb(255, 255, 255);
    color: rgba(2, 98, 124, 1);
}

/* Стили для просмотра данных */
.field-value {
    padding: 8px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 20px;
}

h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #02627c;
    padding-bottom: 5px;
}

.button-group {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.content-container {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.table-container {
    margin: 0px 0;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    margin-bottom: 0px;
}

.export-section {
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
}

.export-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #02627c;
    border-bottom: 2px solid rgba(2, 98, 124, 0.3);
    padding-bottom: 5px;
}

.export-form {
    display: flex;
    align-items: flex-end;
    gap: 20px;
}

.export-form .form-group {
    flex: 1;
}

.export-form button {
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .export-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .export-form .form-group {
        margin-bottom: 15px;
    }
}

.welcome-content {
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.welcome-content .main-logo {
    height: 120px;
    width: auto;
    margin-bottom: 20px;
}

.welcome-content .page-title {
    color: #02627c;
    font-size: 32px;
    margin: 0;
    text-align: center;
}

.welcome-content .side-navigation {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 300px;
}

.welcome-content .menu-button {
    width: 100%;
    text-align: center;
    padding: 15px 30px;
    font-size: 18px;
}

.welcome-content .back-button {
    margin-top: 20px;
    background-color: #dc3545;
    border-color: #dc3545;
}

.welcome-content .back-button:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Стили для печати */
@media print {
    .side-panel,
    .top-navigation-panel,
    .bottom-actions {
        display: none !important;
    }

    .main-container {
        padding: 0;
        margin: 0;
    }

    .content-frame {
        margin: 0;
        padding: 20px;
        background: none;
        min-height: auto;
    }

    .detail-grid {
        background: none;
        page-break-inside: avoid;
    }

    .detail-section {
        page-break-inside: avoid;
    }

    body {
        background: none;
        color: #000;
    }

    .background {
        background: none;
    }

    .detail-label,
    .detail-value {
        color: #000;
    }

    .detail-section h2 {
        color: #000;
        font-size: 18px;
        margin: 15px 0;
    }
}

/* Стили для страницы просмотра деталей */
.detail-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 10px;
    margin: 10px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
}

.detail-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: #02627c;
    text-align: right;
}

.detail-value {
    font-family: 'Montserrat', sans-serif;
    color: #333;
}

.detail-section {
    margin: 0px 0;
}

.detail-section h2 {
    color: #02627c;
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 600;
}

/* Стили для верхней панели навигации */
.top-navigation-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 10px;
    border-radius: 10px;
    margin-bottom: 0px;
}

.navigation-left {
    display: flex;
    align-items: center;
}

.navigation-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-buttons .custom-button {
    padding: 8px 15px;
    background-color: rgba(2, 98, 124, 0.1);
    color: #02627c;
    border: none;
    border-radius: 6px;
    font-size: 14px;
}

.filter-buttons .custom-button:hover {
    background-color: rgba(2, 98, 124, 0.2);
}

.filter-buttons .custom-button.active {
    background-color: rgba(2, 98, 124, 0.3);
    color: #02627c;
}

/* Стили для фильтра типов обучения */
.training-type-filter {
    display: flex;
    gap: 10px;
    margin-right: 20px;
}

.filter-button {
    padding: 8px 15px;
    background-color: rgba(2, 98, 124, 0.1);
    color: #02627c;
    border: 1px solid rgba(2, 98, 124, 0.2);
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-button:hover {
    background-color: rgba(2, 98, 124, 0.2);
}

.filter-button.active {
    background-color: #02627c;
    color: white;
}

.menu-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: rgba(2, 98, 124, 0.1);
    color: #02627c;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.menu-button:hover {
    background-color: rgba(2, 98, 124, 0.2);
}

.menu-button i {
    font-size: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.form-grid label {
    text-align: right;
    padding-right: 10px;
    font-weight: 600;
    color: #02637C;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 16px;
}

.form-grid input[type="text"],
.form-grid input[type="date"],
.form-grid input[type="file"],
.form-grid select,
.form-grid textarea {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: 2px solid rgba(2, 98, 124, 0.2);
    border-radius: 8px;
    font-size: 16px;
    color: #02637C;
    background-color: rgba(255, 255, 255, 0.9);
}

.form-grid input[type="text"]:focus,
.form-grid input[type="date"]:focus,
.form-grid input[type="file"]:focus,
.form-grid select:focus,
.form-grid textarea:focus {
    outline: none;
    border-color: rgba(2, 98, 124, 0.5);
    box-shadow: 0 0 5px rgba(2, 98, 124, 0.2);
}

/* Обновляем стили для заголовков */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.certificate-form {
    width: 100%;
    padding: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.form-grid .form-group {
    margin: 0;
}

.certificate-form input[type="text"],
.certificate-form input[type="date"],
.certificate-form select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.certificate-form table input[type="text"],
.certificate-form table input[type="date"] {
    width: 90%;
    padding: 4px;
    margin: 0;
}

.certificate-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.certificate-form .data-table {
    margin-top: 20px;
    margin-bottom: 30px;
    font-weight: 500;
}

/* Стили для сервисных кнопок */
.service-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 0px;
    flex-wrap: wrap;
}

.service-button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.service-button.primary {
    color: white;
}

.service-button.primary:hover {
    background-color: #0056b3;
}

.service-button.secondary {
    background-color: #6c757d;
    color: white;
}

.service-button.secondary:hover {
    background-color: #545b62;
}

.service-button.warning {
    background-color: #ffc107;
    color: #212529;
}

.service-button.warning:hover {
    background-color: #e0a800;
}

.service-button.info {
    background-color: #17a2b8;
    color: white;
}

.service-button.info:hover {
    background-color: #138496;
}

/* ========================================
   СТИЛИ ДЛЯ ФИЛЬТРОВ ТАБЛИЦЫ
   ======================================== */

/* Стили для поля фильтра в заголовке таблицы */
.column-filter {
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
    transition: border-color 0.2s, background-color 0.2s, width 0.3s ease;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 200px !important;
    box-sizing: border-box;
    float: right;
    margin-left: 10px;
    padding: 2px 5px;
    font-size: 12px;
}

.column-filter:focus {
    outline: none;
    border-color: #02627c;
    background-color: white;
    box-shadow: 0 0 0 2px rgba(2, 98, 124, 0.2);
    width: 120px !important;
}

.column-filter::placeholder {
    color: #999;
    font-style: italic;
}

/* Автоматическое расширение при наличии текста */
.column-filter.has-content {
    width: auto !important;
    min-width: 120px !important;
}

/* Стили для скрытых строк при фильтрации */
.data-table tbody tr.hidden-by-filter {
    display: none;
}

/* ========================================
   ОБЩИЕ СТИЛИ ДЛЯ ТАБЛИЦ
   ======================================== */

/* Центрирование текста в ячейках */
.data-table td[style*="text-align: center"] {
    text-align: center;
}

/* Стили для пустых строк */
.data-table tbody tr:empty {
    display: none;
}

/* Стили для ячеек с сообщением об отсутствии данных */
.data-table .no-data {
    text-align: center;
    font-style: italic;
    color: #666;
    padding: 20px;
}

/* ========================================
   СТИЛИ ДЛЯ ФОРМ И АВТОДОПОЛНЕНИЯ
   ======================================== */

/* Стили для сетки формы */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;  /* Два столбца: метки и поля ввода */
    gap: 15px;
    margin-bottom: 20px;
}

/* Стили для меток полей */
.form-grid label {
    text-align: right;
    padding-right: 10px;
    font-weight: 500;
    color: #02627c;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 16px;
}

/* Стили для полей ввода в форме */
.form-grid input[type="text"],
.form-grid input[type="date"],
.form-grid select,
.form-grid textarea {
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
    border: 2px solid rgba(2, 98, 124, 0.2);
    border-radius: 8px;
    font-size: 16px;
    font-family: Arial, sans-serif;
    color: #02627c;
    background-color: rgba(255, 255, 255, 0.9);
}

/* Стили для группы полей формы */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

/* Стили для группы полей формы с дополнительным отступом */
.form-group-spaced {
    margin-top: 20px;
}

/* Стили для полей с ошибками */
.form-group.has-error input {
    border-color: #dc3545;
}

.form-group.has-error .error-message {
    display: block;
}

/* Стили для кнопки добавления */
.add-button {
    display: none;
    padding: 8px 16px;
    background-color: #02627c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.add-button:hover {
    background-color: #014d61;
}

/* Стили для контейнера автодополнения */
.workplace-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Стили для выпадающего списка подсказок */
.suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid rgba(2, 98, 124, 0.2);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Стили для элементов подсказок */
.suggestion-item {
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.suggestion-item:hover {
    background-color: rgba(2, 98, 124, 0.1);
}

/* Стили для полей с ошибками */
.error-field {
    border-color: #dc3545 !important;
}

/* Стили для скрытых элементов */
.hidden {
    display: none !important;
}

/* ========================================
   СТИЛИ ДЛЯ ПАКЕТОВ ДОКУМЕНТОВ
   ======================================== */

/* Стили для элемента пакета */
.package-item {
    border: 1px solid #ddd;
    margin: 10px 0;
    padding: 15px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

/* Стили для заголовка пакета */
.package-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.package-header h4 {
    margin: 0;
}

.package-actions {
    display: flex;
    gap: 5px;
}

.package-actions .custom-button {
    padding: 5px 10px;
    font-size: 12px;
}

/* Стили для описания пакета */
.package-description {
    color: #666;
    font-size: 14px;
}

/* Стили для пустого состояния пакетов */
.packages-empty {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* ========================================
   СТИЛИ ДЛЯ МОДАЛЬНЫХ ОКОН
   ======================================== */

/* Стили для действий в модальном окне */
.modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Стили для ошибок в модальных окнах */
.modal-error {
    color: red;
    margin-top: 10px;
    text-align: center;
}

/* Стили для чекбоксов документов */
.document-checkbox {
    width: 18px !important;
    height: 18px !important;
    margin-left: 15px !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

/* Стили для полей ввода в модальных окнах */
.modal-input {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
}

/* Стили для селектов в модальных окнах */
.modal-select {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
}

/* Стили для пустого состояния в модальных окнах */
.modal-empty {
    padding: 10px;
    text-align: center;
    color: #666;
}

/* Стили для информации о файле */
.file-info {
    margin-top: 5px;
    font-size: 0.9em;
}

/* ========================================
   СТИЛИ ДЛЯ СПИСКА ДОКУМЕНТОВ В МОДАЛЬНЫХ ОКНАХ
   ======================================== */

/* Стили для списка документов в модальном окне */
.documents-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.document-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s;
    min-height: 20px;
}

.document-item:hover {
    background-color: #f0f0f0;
}

.document-item:last-child {
    border-bottom: none;
}

.document-name {
    font-size: 14px;
    cursor: pointer;
    flex: 1;
    margin-right: 10px;
    word-wrap: break-word;
    line-height: 1.4;
}

/* Отменяем глобальные стили для чекбоксов в модальном окне создания пакета */
#createPackageModal .form-group input[type="checkbox"],
#createPackageModal .document-item input[type="checkbox"] {
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    min-width: auto !important;
}

/* ========================================
   СТИЛИ ДЛЯ КОЛОНОК ТАБЛИЦЫ
   ======================================== */

/* Стили для колонок таблицы с фиксированной шириной */
/* Специфичные стили для таблицы сформированных документов */
.generated-documents-table .data-table .col-name {
    width: 50%;
    max-width: 50%;
    min-width: 300px;
    text-align: left;
}

.generated-documents-table .data-table .col-group {
    width: 120px;
    min-width: 120px;
    white-space: nowrap;
    text-align: left;
}

.generated-documents-table .data-table .col-date {
    width: 140px;
    min-width: 140px;
    white-space: nowrap;
    text-align: left;
}

.generated-documents-table .data-table .col-creator {
    width: 120px;
    min-width: 120px;
    white-space: nowrap;
    text-align: left;
}

.generated-documents-table .data-table .col-actions {
    width: 100px;
    min-width: 100px;
    white-space: nowrap;
    text-align: center;
}

/* Стили для выравнивания текста в ячейках */
.data-table td[style*="text-align: left"] {
    text-align: left !important;
}

/* Стили для выравнивания текста */
.text-left {
    text-align: left !important;
}

/* СТИЛИ ДЛЯ ТАБЛИЦЫ СФОРМИРОВАННЫХ ДОКУМЕНТОВ */
.data-table tbody tr.hidden-by-filter {
    display: none;
}

.data-table td {
    text-align: left;
}

.data-table td:last-child {
    white-space: nowrap;
    text-align: center;
    width: auto;
    min-width: 60px;
}

.data-table th:last-child,
.data-table td:last-child {
    text-align: left !important;
}

.data-table td:last-child .action-buttons {
    display: flex;
    gap: 5px;
    justify-content: flex-start;
}

.data-table td:nth-child(1),
.data-table td:nth-child(2),
.data-table td:nth-child(3),
.data-table td:nth-child(4) {
    text-align: left !important;
}

/* ========================================
   СТИЛИ ДЛЯ ДОМАШНЕЙ СТРАНИЦЫ
   ======================================== */

/* Стили для метки пользователя */
.user-label {
    font-size: 1.1em;
    margin-bottom: 6px;
}

/* Стили для значения времени */
.time-value {
    font-size: 1.5em;
}

/* ========================================
   СТИЛИ ДЛЯ ПОИСКА И ВЫБОРА СТУДЕНТОВ
   ======================================== */

/* Стили для строки поиска */
.search-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

/* Стили для контейнера поиска */
.search-container {
    position: relative;
    margin-left: auto;
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
    display: inline-block;
}

/* Стили для поля поиска */
.search-input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    width: 300px;
    font-size: 14px;
    background-color: white;
    transition: all 0.3s ease;
    padding-right: 35px; /* Добавляем место для крестика */
    height: 36px;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: #02627c;
    box-shadow: 0 0 0 2px rgba(2, 98, 124, 0.2);
}

.clear-search-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    transition: color 0.2s;
}

.clear-search-button:hover {
    color: #666;
}

/* Стили для результатов поиска */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

/* Стили для элемента результата поиска */
.search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

.search-result-item:last-child {
    border-top: 1px solid #ddd;
    background-color: #f8f9fa;
    font-weight: bold;
    color: #02627c;
}

.search-error {
    color: #dc3545;
    padding: 10px 15px;
    font-size: 14px;
}

/* Стили для выбранных студентов */
.selected-students {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    background-color: #f9f9f9;
}

/* Стили для элемента выбранного студента */
.selected-student-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    margin-bottom: 5px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Стили для кнопки удаления студента */
.remove-student {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 12px;
}

.remove-student:hover {
    background: #c82333;
}

/* Стили для сообщения об отсутствии студентов */
.no-students {
    color: #6c757d;
    font-style: italic;
}

/* ========================================
   СТИЛИ ДЛЯ ЧЛЕНОВ КОМИССИИ
   ======================================== */

/* Стили для списка членов комиссии в модальном окне приказа */
.members-list {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    min-height: 60px;
    max-height: 150px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px;
    margin-bottom: 3px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.member-item:last-child {
    margin-bottom: 0;
}

.member-name {
    font-size: 13px;
    flex: 1;
}

.remove-member {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

.remove-member:hover {
    background-color: #dc3545;
    color: white;
}

.no-members {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 15px;
}

/* Стили для модального окна выбора членов */
.members-selection {
    margin: 20px 0;
}

.employees-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
}

.employee-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.employee-item:last-child {
    border-bottom: none;
}

.employee-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.employee-checkbox input[type="checkbox"] {
    margin-right: 10px;
}

.employee-name {
    font-size: 14px;
}

/* ========================================
   СТИЛИ ДЛЯ МОДАЛЬНЫХ КНОПОК
   ======================================== */

/* Стили для кнопок в модальном окне */
.modal-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.left-buttons, .right-buttons {
    display: flex;
    gap: 10px;
}

/* Стили для кнопки добавления студента */
.add-student-button {
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 5px;
}

.add-student-button:hover {
    background-color: #0056b3;
}

/* ========================================
   ПОЛНЫЕ СТИЛИ ДЛЯ МОДАЛЬНЫХ ОКОН
   ======================================== */

/* Стили для модального окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 100%;
    max-width: 700px;
    border-radius: 8px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    color: #02627c;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #02627c;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-footer .custom-button {
    padding: 8px 16px;
}

/* ========================================
   СТИЛИ ДЛЯ УПРАВЛЕНИЯ РЕЗЕРВНЫМИ КОПИЯМИ
   ======================================== */

/* Контейнер для управления резервными копиями */
.backup-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Секции резервных копий */
.backup-section {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.backup-section h2 {
    color: #02627c;
    margin-bottom: 15px;
    border-bottom: 2px solid #02627c;
    padding-bottom: 10px;
}

.backup-section p {
    margin-bottom: 15px;
    color: #666;
}

/* Список резервных копий */
.backup-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.backup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #f9f9f9;
    transition: background-color 0.2s;
}

.backup-item:hover {
    background-color: #f0f0f0;
}

.backup-info {
    flex: 1;
}

.backup-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.backup-details {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
    color: #666;
}

.backup-size {
    color: #02627c;
}

.backup-date {
    color: #666;
}

.backup-type {
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
    font-weight: bold;
}

.backup-type.zip {
    background-color: #28a745;
    color: white;
}

.backup-type.sql {
    background-color: #6c757d;
    color: white;
}

.backup-db {
    color: #02627c;
    font-weight: 500;
}

.backup-actions {
    display: flex;
    gap: 5px;
}

.backup-actions .custom-button {
    padding: 8px 12px;
    font-size: 0.9em;
}

/* Сообщение об отсутствии резервных копий */
.no-backups {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Информационный блок */
.info-box {
    background-color: #f8f9fa;
    border-left: 4px solid #02627c;
    padding: 15px;
    border-radius: 4px;
}

.info-box h3 {
    color: #02627c;
    margin-bottom: 10px;
}

.info-box ul {
    margin: 0;
    padding-left: 20px;
}

.info-box li {
    margin-bottom: 5px;
    color: #555;
}

/* Индикатор прогресса */
.progress-container {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #02627c, #014d5f);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    font-weight: 500;
    color: #02627c;
}

/* Адаптивность для резервных копий */
@media (max-width: 768px) {
    .backup-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .backup-actions {
        align-self: flex-end;
    }
    
    .backup-details {
        flex-direction: column;
        gap: 5px;
    }
}

/* ========================================
   СТИЛИ ДЛЯ INLINE ФОРМ
   ======================================== */

.inline-form {
    display: inline;
}

/* ========================================
   ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ BASE.HTML
   ======================================== */

/* Стили для html и body */
html, body {
    height: auto;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Стили для основного контейнера */
.background {
    min-height: 100vh;
    height: auto !important;
    overflow: visible !important;
}

.main-container {
    min-height: 100vh;
    height: auto !important;
    overflow: visible !important;
}

main.main-content {
    min-height: 0;
    height: auto !important;
    overflow: visible !important;
}

.content-frame {
    min-height: 0;
    height: auto !important;
    overflow: visible !important;
}

.content-area {
    min-height: 0;
    height: auto !important;
    overflow: visible !important;
}

/* Стили для заголовка страницы */
.page-header {
    display: flex;
    /* align-items: flex-end;*/
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 0 20px;
    gap: 20px;
}

.page-header-left {
    display: flex;
    align-items: center;
}

.page-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Стили для сервисных кнопок в заголовке */
.service-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-button {
    padding: 8px 16px;
    color: #02627c;
    background: transparent;
    border: 2px solid #02627c;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.service-button:hover {
    background: #02627c;
    color: #ffffff;
}

.service-button.success {
    color: #28a745;
    border-color: #28a745;
}

.service-button.success:hover {
    background: #28a745;
    color: #ffffff;
}

.service-button.danger {
    color: #dc3545;
    border-color: #dc3545;
}

.service-button.danger:hover {
    background: #dc3545;
    color: #ffffff;
}

/* Стили для заголовка страницы */
.page-title {
    margin: 0;
    color: #02627c;
    font-size: 1.8em;
}

/* Стили для модальных окон */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    padding: 40px 0;
}

.modal-content {
    background-color: #fefefe;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 750px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Стили для кнопки закрытия модального окна */
.close {
    color: #aaa;
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
}

.close:hover {
    color: #000;
}

/* Стили для заголовка модального окна */
.modal-title {
    margin: 0 0 20px 0;
    padding-right: 30px;
    color: #02627c;
    font-size: 1.5em;
}

/* Стили для кнопок в модальном окне */
.modal-buttons {
    margin-top: 20px;
    text-align: right;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.modal-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

/* Стили для кнопки сохранения */
.modal-buttons button[type="submit"] {
    background-color: #02627c;
    color: white;
}

.modal-buttons button[type="submit"]:hover {
    background-color: #014a5f;
}

/* Стили для кнопки отмены */
.modal-buttons button[type="button"] {
    background-color: #6c757d;
    color: white;
    margin-right: 10px;
}

.modal-buttons button[type="button"]:hover {
    background-color: #5a6268;
}

/* Стили для кнопки "Сохранить и добавить" */
.modal-buttons .custom-button {
    background-color: #28a745;
    color: white;
    margin-right: 10px;
}

.modal-buttons .custom-button:hover {
    background-color: #218838;
}

/* Стили для отключенной кнопки */
.modal-buttons button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Стили для формы в модальном окне */
.modal-form {
    display: grid;
    gap: 15px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Стили для групп полей формы */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Стили для меток полей */
.form-group label {
    font-weight: 500;
    color: #02627c;
}

/* Стили для полей ввода */
.form-group input,
.form-group select,
.form-group textarea {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Стили для полей ввода при фокусе */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #02627c;
    box-shadow: 0 0 0 2px rgba(2, 98, 124, 0.2);
}

/* Стили для модального окна создания студента - более высокий z-index */
.modal.create-student-modal {
    z-index: 2000;
}

.modal.create-student-modal .modal-content {
    z-index: 2001;
}

/* Стили для сортировки таблиц */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s;
}

.sortable-header:hover {
    background-color: rgba(2, 98, 124, 0.1);
}

.sortable-header::before {
    content: '↕';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 12px;
    z-index: 2;
}

.sortable-header.sort-asc::before {
    content: '↑';
    color: #02627c;
}

.sortable-header.sort-desc::before {
    content: '↓';
    color: #02627c;
}

/* Сдвигаем текст заголовка вправо, чтобы не налезал на стрелку */
.sortable-header {
    padding-left: 18px;
}

/* Для фильтров с инпутом/селектом */
.sortable-header .column-filter {
    position: relative;
    z-index: 1;
}

/* Позиционируем индикатор сортировки для заголовков с фильтрами */
.sortable-header:has(.column-filter)::before {
    right: 140px; /* Сдвигаем индикатор левее поля фильтра */
}

/* Уменьшаем ширину фильтров в таблицах */
.column-filter {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 200px !important;
    font-size: 12px;
    padding: 2px 3px;
    transition: width 0.3s ease;
    box-sizing: border-box;
}

/* Автоматическое расширение при фокусе */
.column-filter:focus {
    width: 120px !important;
}

/* Автоматическое расширение при наличии текста */
.column-filter.has-content {
    width: auto !important;
    min-width: 120px !important;
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 0 auto;
    }
}

/* ========================================
   СТИЛИ ДЛЯ ФОРМЫ СТУДЕНТА
   ======================================== */

/* Форма в одну колонку */
.form-single-column {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Группа полей формы */
.form-group {
    margin-bottom: 15px;
}

/* Строка полей */
.field-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

/* Метка поля */
.field-row label {
    flex: 0 0 200px;
    text-align: right;
    padding-top: 8px;
    font-weight: 500;
}

/* Контейнер поля */
.field-container {
    flex: 1;
}

/* Поля ввода */
.field-container input,
.field-container select,
.field-container textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Контейнер для автодополнения */
.workplace-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.workplace-container input {
    flex: 1;
}

/* Контейнер для подсказок */
.suggestions-container {
    position: absolute;
    background: white;
    border: 1px solid rgba(2, 98, 124, 0.2);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    width: calc(100% - 120px);
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    top: 100%;
    left: 0;
}

/* Элемент подсказки */
.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.suggestion-item:hover {
    background-color: rgba(2, 98, 124, 0.1);
}

/* Кнопка добавления */
.add-button {
    display: none;
    margin-left: 10px;
    padding: 8px 15px;
    background-color: rgba(2, 98, 124, 0.8);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    flex: 0 0 auto;
}

.add-button:hover {
    background-color: #02627c;
}

/* Кнопки формы */
.form-buttons {
    margin-top: 30px;
    text-align: center;
    padding-left: 200px;
}

.form-buttons .custom-button {
    margin: 0 10px;
}

/* Сообщение об ошибке */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 4px;
}

/* Текст помощи */
.help-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 4px;
}

/* ========================================
   СТИЛИ ДЛЯ ДАШБОРДА (HOME.HTML)
   ======================================== */

/* Контейнер дашборда */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
}

/* Карточка дашборда */
.dashboard-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-card h3 {
    color: #02627c;
    margin: 0 0 15px 0;
    font-size: 1.2em;
}

.dashboard-card .value {
    font-size: 2em;
    font-weight: bold;
    color: #02627c;
    margin: 10px 0;
}

.dashboard-card .label {
    color: #666;
    font-size: 0.9em;
}

/* Специальные стили для плитки пользователя */
.user-card .value {
    line-height: 1.2;
    word-wrap: break-word;
    hyphens: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Имя пользователя в лейбле - тот же размер, что и фамилия */
.user-card .user-name-label {
    font-weight: inherit;
    color: inherit;
}

/* Иконка */
.icon {
    font-size: 2em;
    color: #02627c;
    margin-bottom: 10px;
}

/* ========================================
   СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА УДАЛЕНИЯ
   ======================================== */

/* Предупреждение об удалении */
.delete-warning {
    color: #dc3545;
    font-weight: bold;
    margin-top: 10px;
}

/* Параграфы в теле модального окна */
.modal-body p {
    margin-bottom: 10px;
}

/* Кнопка удаления */
.danger-button {
    background-color: #dc3545 !important;
    color: white;
}

.danger-button:hover {
    background-color: #c82333 !important;
}

/* Вторичная кнопка */
.secondary-button {
    background-color: #6c757d;
    color: white;
    margin-right: 10px;
}

.secondary-button:hover {
    background-color: #5a6268;
}

/* ========================================
   СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА НОВОГО НАБОРА
   ======================================== */

/* Кнопка добавления студента */
.add-student-button {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    margin-top: 10px;
}

.add-student-button:hover {
    background: #218838;
}

/* Стили для кнопок в модальном окне "Новый набор" */
.modal-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.left-buttons {
    display: flex;
    align-items: center;
}

.right-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.create-student-button {
    color: white !important;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.create-student-button:hover {
    background-color: #0056b3 !important;
}

.save-button {
    background-color: #28a745 !important;
    color: white !important;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.save-button:hover {
    background-color: #218838 !important;
}

/* ========================================
   СТИЛИ ДЛЯ ВЫДАЧИ УДОСТОВЕРЕНИЙ
   ======================================== */

/* Контейнер формы для выдачи удостоверений */
.certificate-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Строка формы для выдачи удостоверений */
.certificate-form-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.certificate-form-row label {
    min-width: 200px;
    text-align: right;
}

.certificate-form-row input[type="text"],
.certificate-form-row input[type="date"],
.certificate-form-row select {
    flex: 1;
    max-width: 300px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Стили для таблицы в форме удостоверений */
.certificate-form .data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: fixed;
}

.certificate-form .data-table th,
.certificate-form .data-table td {
    padding: 8px;
    text-align: left;
    border: 1px solid #ddd;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.certificate-form .data-table input[type="text"],
.certificate-form .data-table input[type="date"] {
    width: 95%;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

/* Секция предварительного просмотра */
.certificate-preview-section {
    display: none;
    margin-top: 20px;
    width: 90%;
    margin: 20px auto;
    overflow-x: auto;
}

/* Строка кнопок для удостоверений */
.certificate-buttons-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Поле ввода номера для удостоверений */
.certificate-number-input {
    width: 120px !important;
}

/* Фиксированные ширины для колонок таблицы удостоверений */
.certificate-form .data-table th:nth-child(1),
.certificate-form .data-table td:nth-child(1) { width: 20%; }
.certificate-form .data-table th:nth-child(2),
.certificate-form .data-table td:nth-child(2) { width: 15%; }
.certificate-form .data-table th:nth-child(3),
.certificate-form .data-table td:nth-child(3) { width: 15%; }
.certificate-form .data-table th:nth-child(4),
.certificate-form .data-table td:nth-child(4) { width: 15%; }
.certificate-form .data-table th:nth-child(5),
.certificate-form .data-table td:nth-child(5) { width: 10%; }
.certificate-form .data-table th:nth-child(6),
.certificate-form .data-table td:nth-child(6) { width: 10%; }
.certificate-form .data-table th:nth-child(7),
.certificate-form .data-table td:nth-child(7) { width: 15%; }

/* Область контента для удостоверений */
.certificate-content-area {
    overflow-x: hidden;
    max-width: 100%;
}

/* Стили для полей в таблице удостоверений */
.certificate-form .series,
.certificate-form .number,
.certificate-form .registration-number,
.certificate-form .protocol-number {
    width: 95%;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

/* Стили для страницы логина */
.login-page-html, 
.login-page-body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
}

.login-page-body {
    background-image: url('/static/pic/back_login.png');
    background-size: 100% auto;
    background-position: top center;
    background-repeat: no-repeat;
    background-color: #f5f5f5;
    position: relative;
    overflow-x: hidden;
}

.login-page-content {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.login-logo-section {
    position: fixed;
    top: 5vw;
    left: 5vw;
    width: 25vw;
    min-width: 100px;
    max-width: 500px;
    z-index: 1000;
}

.login-logo {
    width: 130%;
    height: auto;
    object-fit: contain;
}

.login-start-button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background-color: transparent;
    border: 2px solid #006B7D;
    color: #006B7D;
    border-radius: 25px;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
}

.login-start-button:hover {
    background-color: #006B7D;
    color: white;
}

.login-description-section {
    position: absolute;
    bottom: 100px;
    right: 100px;
    max-width: 400px;
    background: #E6F0FF;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-description-text {
    color: #006B7D;
    font-size: 18px;
    line-height: 1.5;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
}

.login-description-text p {
    margin: 0 0 10px 0;
}

.login-description-text p:last-child {
    margin-bottom: 0;
}

.login-clip-icon {
    position: absolute;
    top: -16px;
    right: 10px;
    width: 40px;
    height: 40px;
    color: #006B7D;
    transform: rotate(170deg);
}

.login-container {
    font-family: 'Montserrat', sans-serif;
    position: fixed;
    top: 25vw;
    left: 20vw;
    width: 15vw;
    min-width: 200px;
    max-width: 500px;
    z-index: 1000;
}

.login-form {
    display: block;
    padding: 20px 0;
    background: transparent;
    position: relative;
}

.login-form-group {
    margin-bottom: 15px;
}

.login-form-group label {
    display: block;
    margin-bottom: 5px;
    color: #006B7D;
    font-size: 16px;
    font-weight: 700;
}

.login-form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #006B7D;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    box-sizing: border-box;
    background: white;
    color: #006B7D;
}

.login-form-group input:focus {
    outline: none;
    border-color: #005666;
}

.login-submit-button {
    width: 50%;
    padding: 12px 30px;
    background-color: transparent;
    border: 3px solid #006B7D;
    color: #006B7D;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    float: right;
}

.login-submit-button:hover {
    background-color: #006B7D;
    color: white;
}

/* Стили для сообщения об ошибке входа */
.login-error-message {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Медиа-запросы для адаптивности страницы логина */
@media screen and (max-width: 768px) {
    .login-logo-section {
        width: 25vw;
    }
    
    .login-container {
        width: 35vw;
    }
}

@media screen and (max-width: 480px) {
    .login-logo-section {
        width: 35vw;
    }
    
    .login-container {
        width: 80vw;
    }
}

/* Стили для кнопок действий на странице логина */
.login-action-button {
    display: inline-block;
    padding: 8px 20px;
    background-color: transparent;
    border: 2px solid #006B7D;
    color: #006B7D;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.login-action-button:hover {
    background-color: #006B7D;
    color: white;
}

/* Варианты кнопок действий на странице логина */
.login-action-button.edit {
    border-color: #006B7D;
    color: #006B7D;
}

.login-action-button.edit:hover {
    background-color: #006B7D;
    color: white;
}

.login-action-button.delete {
    border-color: #dc3545;
    color: #dc3545;
}

.login-action-button.delete:hover {
    background-color: #dc3545;
    color: white;
}

.login-action-button.view {
    border-color: #28a745;
    color: #28a745;
}

.login-action-button.view:hover {
    background-color: #28a745;
    color: white;
}

/* Стили для страницы nomenclature */
.nomenclature-styled-form {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nomenclature-styled-form fieldset {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.nomenclature-styled-form legend {
    font-size: 1.2em;
    font-weight: bold;
    color: #02627c;
    padding: 0 10px;
    width: auto;
    border-bottom: none;
}

.nomenclature-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.nomenclature-form-group-half {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
}

.nomenclature-form-group-full {
    flex: 1;
    min-width: 100%;
    display: flex;
    flex-direction: column;
}

.nomenclature-form-group-half label,
.nomenclature-form-group-full label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.nomenclature-form-group-half input[type="text"],
.nomenclature-form-group-half input[type="date"],
.nomenclature-form-group-half select,
.nomenclature-form-group-full select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.nomenclature-form-group-half .form-text {
    font-size: 0.85em;
    color: #6c757d;
}

.nomenclature-form-actions {
    text-align: right;
    margin-top: 20px;
}

.nomenclature-form-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

/* Стили для раздела комиссии */
.nomenclature-commission-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.nomenclature-commission-column {
    flex: 1;
}

.nomenclature-commission-column .form-group {
    display: flex;
    flex-direction: column;
}

.nomenclature-commission-column .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.nomenclature-commission-column .form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Стили для списка членов комиссии */
.nomenclature-members-list {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.nomenclature-member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin-bottom: 5px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.nomenclature-member-item:last-child {
    margin-bottom: 0;
}

.nomenclature-member-name {
    font-size: 14px;
    flex: 1;
}

.nomenclature-remove-member {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.nomenclature-remove-member:hover {
    background-color: #dc3545;
    color: white;
}

.nomenclature-no-members {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Скрываем стандартное поле members */
#id_members {
    display: none;
}

/* Стили для модального окна выбора членов */
.nomenclature-members-selection {
    margin: 20px 0;
}

.nomenclature-search-container {
    margin-bottom: 15px;
}

.nomenclature-search-container input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.nomenclature-employees-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
}

.nomenclature-employee-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.nomenclature-employee-item:last-child {
    border-bottom: none;
}

.nomenclature-employee-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.nomenclature-employee-checkbox input[type="checkbox"] {
    margin-right: 10px;
}

.nomenclature-employee-name {
    font-size: 14px;
}

.nomenclature-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Стили для колонок логина и роли в таблице управления пользователями */
.users-table th:nth-child(2),
.users-table td:nth-child(2),
.users-table th:nth-child(3),
.users-table td:nth-child(3) {
    width: auto;
    min-width: 120px;
    white-space: normal;
}

/* Стили для колонки действий в таблице управления пользователями */
.users-table th:last-child,
.users-table td:last-child {
    width: 1% !important;
    min-width: 120px !important;
    white-space: nowrap !important;
    text-align: left !important;
}

/* Стили для сортируемых заголовков таблиц */

/* Стили для подсказок в формах */
.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* Скрытие элементов */
.hidden {
    display: none;
}

/* Стили для секции предпросмотра */
.preview-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.preview-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #02627c;
    border-bottom: 2px solid #02627c;
    padding-bottom: 10px;
}

/* Стили для действий формы */
.form-actions {
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.form-actions .custom-button {
    margin: 0;
}

/* Стили для сетки формы */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #02627c;
    border-bottom: 2px solid #02627c;
    padding-bottom: 10px;
}

/* Стили для кнопки выдачи удостоверений */
#issueButton {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#issueButton.hidden {
    display: none !important;
}

#issueButton:not(.hidden) {
    display: inline-block !important;
}

/* Класс для показа кнопки */
.show-issue-button {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Принудительное отображение кнопки выдачи удостоверений */
#issueButton.show-issue-button {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Стили для полей формы */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #02627c;
    box-shadow: 0 0 0 2px rgba(2, 98, 124, 0.1);
}

.form-control:read-only {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Стили для секции горячих клавиш */
.hotkeys-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.hotkeys-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
}

.hotkeys-label {
    font-weight: 500;
    color: #333;
    cursor: pointer;
    margin: 0;
}

.hotkeys-help {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    margin-top: 15px;
}

.hotkeys-help h4 {
    margin: 0 0 15px 0;
    color: #02627c;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hotkeys-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
}

.hotkey-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.hotkey-item:hover {
    background-color: #f8f9fa;
}

.hotkey {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.hotkey kbd {
    background-color: #e9ecef;
    border: 1px solid #adb5bd;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 0.85em;
    font-family: 'Courier New', monospace;
    color: #495057;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.hotkey-description {
    color: #6c757d;
    font-size: 0.9em;
}