/* Основные стили */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #fafafa; /* Светлый нейтральный фон как на примере */
    color: #333;
    line-height: 1.6;
    /* overflow-x: hidden; убрано для dropdown */
}

/* Предотвращаем горизонтальный скролл на уровне всего контейнера */
.container,
.container-fluid {
    /* overflow-x: hidden; убрано для dropdown */
    max-width: 100%;
}

/* Стили для навигации */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
    background-color: #1f2633 !important; /* Темно-синий фон как на примере */
    /* overflow: visible !important; убрано для dropdown */
}

/* Исправление для dropdown меню */
.dropdown-menu {
    display: none !important;
    position: absolute !important;
    right: 0 !important;
    left: auto !important;
    top: 100% !important;
    z-index: 9999 !important;
    min-width: 220px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    padding: 8px 0 !important;
    background-color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.dropdown-menu.show {
    display: block !important;
}

.dropdown-item {
    padding: 8px 16px !important;
    font-size: 0.95rem !important;
    color: #333 !important;
    white-space: nowrap !important;
}

/* МОБИЛЬНЫЕ СТИЛИ - УЛЬТРАКОМПАКТНАЯ ТАБЛИЦА БЕЗ ГОРИЗОНТАЛЬНОЙ ПРОКРУТКИ */
@media (max-width: 576px) {
    /* Убираем горизонтальную прокрутку полностью */
    .table-responsive {
        overflow-x: visible !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: auto;
        border-radius: 8px;
    }
    
    /* Ультракомпактная таблица */
    .table {
        font-size: 0.4rem !important;
        table-layout: fixed !important;
        width: 100% !important;
        min-width: auto !important;
        line-height: 0.9 !important;
        border-collapse: collapse !important;
    }
    
    .table th,
    .table td {
        padding: 0px 1px !important;
        white-space: nowrap;
        vertical-align: middle;
        border-right: 1px solid #f1f3f4;
        font-size: 0.4rem !important;
        line-height: 0.9 !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Адаптивные ширины колонок - все помещается на экране */
    .table th:first-child, .table td:first-child { width: 3% !important; }
    .col-number { width: 3% !important; }
    .col-name { width: 20% !important; }
    .col-direction { width: 7% !important; }
    .col-group { width: 5% !important; }
    .col-institution { width: 9% !important; }
    .col-email { width: 11% !important; }
    .col-phone { width: 7% !important; }
    .col-avgmark { width: 5% !important; }
    .col-reports { width: 4% !important; }
    .col-status { width: 7% !important; }
    .col-start { width: 5% !important; }
    .col-end { width: 5% !important; }
    .col-actions { width: 9% !important; }
    
    /* Ультракомпактные элементы */
    .table .badge {
        font-size: 0.3rem !important;
        padding: 0px 1px !important;
        line-height: 0.9 !important;
        border-radius: 1px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .table .btn {
        font-size: 0.3rem !important;
        padding: 0px 1px !important;
        margin: 0;
        line-height: 0.9 !important;
        min-height: 10px !important;
        border-radius: 1px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .table input[type="checkbox"] {
        transform: scale(0.5) !important;
        margin: 0 !important;
    }
    
    .table .action-links a {
        margin-right: 0px;
        font-size: 0.3rem !important;
        padding: 0px 1px !important;
        line-height: 0.9 !important;
        border-radius: 1px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .table .fas, .table .fa {
        font-size: 0.3rem !important;
        margin-right: 0px !important;
    }
    
    /* Компактные элементы управления */
    .btn {
        font-size: 0.5rem !important;
        padding: 2px 4px !important;
    }
    
    .form-control, .form-select {
        font-size: 0.5rem !important;
        padding: 2px 4px !important;
        height: auto !important;
    }
    
    /* Заголовки */
    h1 {
        font-size: 1.1rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    .card-body {
        padding: 0.3rem !important;
    }
    
    .container, .container-fluid {
        padding-left: 1px !important;
        padding-right: 1px !important;
    }
}

/* Для очень маленьких экранов - еще более компактно */
@media (max-width: 400px) {
    .table {
        font-size: 0.35rem !important;
    }
    
    .table th,
    .table td {
        padding: 0px 0px !important;
        font-size: 0.35rem !important;
        line-height: 0.8 !important;
    }
    
    /* Еще более компактные ширины */
    .table th:first-child, .table td:first-child { width: 2% !important; }
    .col-number { width: 2% !important; }
    .col-name { width: 25% !important; }
    .col-direction { width: 8% !important; }
    .col-group { width: 5% !important; }
    .col-institution { width: 10% !important; }
    .col-email { width: 12% !important; }
    .col-phone { width: 8% !important; }
    .col-avgmark { width: 5% !important; }
    .col-reports { width: 4% !important; }
    .col-status { width: 8% !important; }
    .col-start { width: 5% !important; }
    .col-end { width: 5% !important; }
    .col-actions { width: 11% !important; }
    
    .table .badge {
        font-size: 0.25rem !important;
        padding: 0px 1px !important;
        line-height: 0.8 !important;
    }
    
    .table .btn {
        font-size: 0.25rem !important;
        padding: 0px 1px !important;
        min-height: 8px !important;
        line-height: 0.8 !important;
    }
    
    .table .action-links a {
        font-size: 0.25rem !important;
        padding: 0px 1px !important;
        line-height: 0.8 !important;
    }
    
    .table .fas, .table .fa {
        font-size: 0.25rem !important;
    }
    
    .table input[type="checkbox"] {
        transform: scale(0.4) !important;
    }
}

.dropdown-item:hover {
    background-color: #f8f9fa !important;
    color: #333 !important;
}

.dropdown-divider {
    margin: 4px 0 !important;
    border-top: 1px solid #e9ecef !important;
}

/* Принудительно переопределяем навигационную панель и синие элементы */
nav, .navbar-dark, .bg-primary, .nav-item, .navbar-nav, .navbar-dark.bg-primary, nav.navbar.navbar-dark.bg-primary {
    background-color: #1f2633 !important; /* Темно-синий фон как на примере */
    border-color: #1f2633 !important;
}

/* Принудительное переопределение карточек статистики */
.card-header.bg-primary, .card-header.bg-success, .card-header.bg-info, 
.bg-primary, .bg-success, .bg-info {
    background-color: #ff9800 !important; /* Единый оранжевый цвет для заголовков */
    color: #333333 !important; /* Темный цвет для лучшей читаемости */
    text-shadow: none; /* Убираем тень для лучшей читаемости */
}

.navbar-brand {
    font-weight: 600;
    color: #fff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Стили для карточек */
.card {
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border: none;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-header {
    background-color: #ffffff !important; /* Более светлый оранжевый для заголовков */
    border-bottom: none;
    color: #333333 !important; /* Темный цвет для заголовков карточек */
    text-shadow: none; /* Убираем тень для лучшей читаемости */
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 0.8rem 1.2rem;
}

/* Стили для карточек: названия */
.card-title {
    font-weight: 600;
    color: #000000; /* Насыщенный цвет для заголовков внутри карточек */
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.card-body {
    padding: 1.2rem;
}

/* Стили для таблиц */
.table {
    margin-bottom: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,.03);
    width: 100%;
    table-layout: fixed !important; /* Фиксированная ширина колонок */
    font-size: 0.95rem; /* Увеличиваем размер шрифта для лучшей читаемости */
    border-spacing: 0; /* Убираем расстояние между ячейками */
    border-collapse: collapse; /* Склеиваем границы ячеек */
}

.table th {
    font-weight: 600;
    background-color: #f5f5f5; /* Светло-серый для заголовков таблиц */
    color: #333;
    padding: 8px 6px; /* Увеличиваем отступы для лучшей читаемости */
    border-bottom: none;
    border-right: 1px solid #e9ecef; /* Тонкая граница между колонками */
    white-space: nowrap; /* Предотвращаем перенос текста */
    overflow: hidden;
    text-overflow: ellipsis; /* Добавляем многоточие для длинного текста */
    font-size: 0.95rem; /* Увеличиваем размер шрифта */
}

.table td {
    padding: 8px 6px; /* Увеличиваем отступы для лучшей читаемости */
    vertical-align: middle;
    border-right: 1px solid #f1f3f4; /* Тонкая граница между колонками */
    white-space: nowrap; /* Предотвращаем перенос текста */
    overflow: hidden;
    text-overflow: ellipsis; /* Добавляем многоточие для длинного текста */
    font-size: 0.95rem; /* Увеличиваем размер шрифта */
}
  
  /* Убираем правую границу у последней колонки */
  .table th:last-child,
  .table td:last-child {
      border-right: none;
  }

.table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.table tr:hover {
    background-color: #f2f2f2; /* Светло-серый при наведении */
}

/* Адаптивная таблица без горизонтального скролла */
.table-responsive {
    overflow-x: visible !important; /* Убираем горизонтальный скролл */
}

/* Принудительное скрытие колонок (имеет приоритет над медиа-запросами) */
.force-hidden {
    display: none !important;
}

/* Специальные стили для колонок - только для десктопа */
@media (min-width: 577px) {
    .table th:first-child, .table td:first-child { 
        min-width: 25px; 
        width: 2% !important; 
        max-width: 25px;
    } /* Чекбокс */
    
    .col-number { 
        min-width: 25px; 
        width: 2.5% !important; 
        max-width: 25px;
    }
    
    .col-name { 
        min-width: 130px; 
        width: 13% !important; 
        max-width: 130px;
    }
    
    .col-direction { 
        min-width: 65px; 
        width: 6.5% !important; 
        max-width: 65px;
    }
    
    .col-group { 
        min-width: 45px; 
        width: 4.5% !important; 
        max-width: 45px;
    }
    
    .col-institution { 
        min-width: 85px; 
        width: 8.5% !important; 
        max-width: 85px;
    }
    
    .col-email { 
        min-width: 105px; 
        width: 10.5% !important; 
        max-width: 105px;
    }
    
    .col-phone { 
        min-width: 65px; 
        width: 6.5% !important; 
        max-width: 65px;
    }
    
    .col-avgmark { 
        min-width: 45px; 
        width: 4.5% !important; 
        max-width: 45px;
    }
    
    .col-reports { 
        min-width: 40px; 
        width: 4% !important; 
        max-width: 40px;
    }
    
    .col-status { 
        min-width: 65px; 
        width: 6.5% !important; 
        max-width: 65px;
    }
    
    .col-start { 
        min-width: 50px; 
        width: 5% !important; 
        max-width: 50px;
    }
    
    .col-end { 
        min-width: 50px; 
        width: 5% !important; 
        max-width: 50px;
    }
    
    .col-actions { 
        min-width: 65px; 
        width: 6.5% !important; 
        max-width: 65px;
    }
}

/* Стили для кнопок */
.btn {
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: none;
    border-radius: 6px;
    padding: 8px 16px;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn-group .btn {
    margin-right: 0.25rem;
}

.btn-primary {
    background-color: #ff9800 !important; /* Единый оранжевый цвет */
    border-color: #ff9800 !important;
}

.btn-primary:hover {
    background-color: #ff9800 !important; /* Единый оранжевый цвет при наведении */
    border-color: #ff9800!important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: #ff9800 !important; /* Более бледный светло-оранжевый */
    border-color: #ff9800 !important;
    color: #333 !important; /* Темный текст для лучшей читаемости */
}

.btn-secondary:hover {
    background-color: #ff9800 !important; /* Единый оранжевый цвет при наведении */
    border-color: #ff9800 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Стили для форм */
.form-label {
    font-weight: 500;
    color: #ff9800; /* Единый оранжевый цвет */
    margin-bottom: 0.5rem;
}

.form-control {
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 0.5rem 0.8rem;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: #ff9800;
    box-shadow: 0 0 0 0.2rem rgba(255, 152, 0, 0.15);
}

/* Улучшение форм */
.form-group {
    margin-bottom: 1.25rem;
}

.form-select {
    border-radius: 6px;
    border: 1px solid #eee;
}

.form-select:focus {
    border-color: #ff9800;
    box-shadow: 0 0 0 0.2rem rgba(255, 152, 0, 0.15);
}

/* Стили для статистики */
.stats-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.stats-card .card-header {
    border-bottom: none;
    font-weight: 500;
}

.stats-card .display-3,
.stats-card .display-2 {
    color: #222;
    font-weight: bold;
}

/* Стили для модальных окон */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,.125);
    background-color: #ff9800 !important; /* Более насыщенный */
    color: white !important;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
    border-radius: 10px 10px 0 0;
}

.modal-footer {
    border-top: 1px solid rgba(0,0,0,.125);
    background-color: #fff8e1; /* Очень бледный оранжевый */
    border-radius: 0 0 10px 10px;
}

/* Стили для футера */
.footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    background-color: #fff8e1 !important; /* Более светлый фон */
    border-top: 1px solid #ff9800;
    color: #ff9800;
    font-weight: 500;
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .card.text-white .display-4 {
        font-size: 2rem;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    /* Горизонтальная прокрутка для таблицы на планшетах */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }
    
    .table {
        min-width: 1200px; /* Минимальная ширина для всех колонок */
        font-size: 0.85rem;
        margin-bottom: 0;
    }
    
    .table th,
    .table td {
        padding: 6px 4px;
        min-width: 80px; /* Минимальная ширина ячеек */
        white-space: nowrap;
    }
    
    /* Специальные ширины для ключевых колонок */
    .col-number { min-width: 40px; }
    .col-name { min-width: 150px; }
    .col-direction { min-width: 90px; }
    .col-group { min-width: 70px; }
    .col-institution { min-width: 120px; }
    .col-email { min-width: 160px; }
    .col-phone { min-width: 100px; }
    .col-avgmark { min-width: 70px; }
    .col-reports { min-width: 60px; }
    .col-status { min-width: 100px; }
    .col-start { min-width: 80px; }
    .col-end { min-width: 80px; }
    .col-actions { min-width: 100px; }
}

/* Удаляем дублирующиеся стили - используем только ультракомпактную версию из начала файла */

/* Специальные стили для очень маленьких телефонов - ультракомпактная версия */
@media (max-width: 400px) {
    /* Еще более компактная версия для маленьких экранов - БЕЗ прокрутки */
    .table {
        font-size: 0.45rem !important;
        min-width: auto !important; /* Убираем минимальную ширину */
        table-layout: fixed !important;
        width: 100% !important;
    }
    
    .table th,
    .table td {
        padding: 0px 1px !important;
        font-size: 0.45rem !important;
        line-height: 1 !important;
        vertical-align: middle;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* Адаптивные ширины в процентах для очень маленьких экранов */
    .table th:first-child, .table td:first-child { 
        width: 3% !important; 
    } /* Чекбокс */
    
    .col-number { 
        width: 3% !important; 
    } /* Номер */
    
    .col-name { 
        width: 25% !important; 
    } /* ФИО - самая важная колонка */
    
    .col-direction { 
        width: 10% !important; 
    } /* Направление */
    
    .col-group { 
        width: 7% !important; 
    } /* Группа */
    
    .col-institution { 
        width: 12% !important; 
    } /* Учебное заведение */
    
    .col-email { 
        width: 15% !important; 
    } /* Email */
    
    .col-phone { 
        width: 10% !important; 
    } /* Телефон */
    
    .col-avgmark { 
        width: 5% !important; 
    } /* Средний балл */
    
    .col-reports { 
        width: 4% !important; 
    } /* Отчеты */
    
    .col-status { 
        width: 8% !important; 
    } /* Статус */
    
    .col-start { 
        width: 5% !important; 
    } /* Начало */
    
    .col-end { 
        width: 5% !important; 
    } /* Конец */
    
    .col-actions { 
        width: 8% !important; 
    } /* Действия */
    
    /* Ультракомпактные элементы */
    .table .badge {
        font-size: 0.35rem !important;
        padding: 0px 1px !important;
        display: inline-block;
        line-height: 1 !important;
        border-radius: 1px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .table .btn {
        font-size: 0.35rem !important;
        padding: 0px 1px !important;
        margin: 0;
        line-height: 1 !important;
        min-height: 10px !important;
        border-radius: 1px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .table input[type="checkbox"] {
        transform: scale(0.5) !important;
        margin: 0 !important;
    }
    
    .table .action-links a {
        margin-right: 0px;
        font-size: 0.35rem !important;
        padding: 0px 1px !important;
        line-height: 1 !important;
        border-radius: 1px !important;
        display: inline-block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .table .fas, .table .fa {
        font-size: 0.35rem !important;
    }
    
    /* Компактные элементы управления */
    .btn {
        font-size: 0.5rem !important;
        padding: 1px 3px !important;
    }
    
    .form-control, .form-select {
        font-size: 0.5rem !important;
        padding: 1px 3px !important;
        height: auto !important;
    }
    
    /* Заголовки */
    h1 {
        font-size: 1.1rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    .card-body {
        padding: 0.3rem !important;
    }
    
    .container, .container-fluid {
        padding-left: 1px !important;
        padding-right: 1px !important;
    }
    
    /* Убираем подсказку о зуме */
    .table-responsive::before {
        display: none !important;
    }
}

/* Специальные стили для улучшения отображения иконок на мобильных */
@media (max-width: 576px) {
    /* Улучшаем отображение иконок в таблице */
    .table .fas, .table .fa {
        font-size: 0.4rem !important;
        margin-right: 1px !important;
        vertical-align: middle;
    }
    
    /* Специальные стили для кнопок действий с иконками */
    .table .action-links .btn .fas,
    .table .action-links .btn .fa {
        font-size: 0.35rem !important;
        margin-right: 0 !important;
    }
    
    /* Улучшаем видимость иконок в бейджах */
    .table .badge .fas,
    .table .badge .fa {
        font-size: 0.35rem !important;
        margin-right: 1px !important;
    }
    
    /* Обеспечиваем правильное отображение иконок в заголовках таблицы */
    .table th .fas,
    .table th .fa {
        font-size: 0.4rem !important;
        margin-right: 1px !important;
    }
}

@media (max-width: 400px) {
    /* Еще более компактные иконки для очень маленьких экранов */
    .table .fas, .table .fa {
        font-size: 0.3rem !important;
        margin-right: 0px !important;
    }
    
    .table .action-links .btn .fas,
    .table .action-links .btn .fa {
        font-size: 0.25rem !important;
        margin-right: 0 !important;
    }
    
    .table .badge .fas,
    .table .badge .fa {
        font-size: 0.25rem !important;
        margin-right: 0px !important;
    }
    
    .table th .fas,
    .table th .fa {
        font-size: 0.3rem !important;
        margin-right: 0px !important;
    }
}

/* Стили для заголовков */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #333;
    margin-bottom: 1.25rem;
}

h1 {
    font-size: 2rem;
    color: #ff9800;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}



/* Оранжевый акцент */
.bg-primary, .btn-primary {
    background-color: #ff9800 !important;
    border-color: #ff9800 !important;
}

.navbar, .navbar-dark.bg-primary {
    background-color: #ff9800 !important; /* Более насыщенный для хедера */
}

.bg-info {
    background-color: #ff9800 !important; /* Более бледный светло-оранжевый */
    color: #fff !important;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

.bg-success {
    background-color: #ff9800 !important; /* Более насыщенный */
    color: #fff !important;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

.bg-danger {
    background-color: #ff9800 !important; /* Темно-оранжевый */
    color: #fff !important;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

.bg-warning {
    background-color: #ff9800 !important; /* Бледный оранжево-желтый */
    color: #333 !important; /* Темный текст */
}

.bg-secondary {
    background-color: #ff9800 !important; /* Более бледный светло-оранжевый */
    color: #333 !important;
}

/* Улучшение стилей для бейджей */
.badge {
    font-weight: 500;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
}

.progress {
    border-radius: 8px;
    height: 8px;
    margin: 1rem 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.progress-bar.bg-success, .progress-bar.bg-info, .progress-bar.bg-warning, .progress-bar.bg-danger {
    background-color: #ff9800 !important;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

/* Для выделения активных элементов */
.active, .list-group-item.active {
    background-color: #ff9800 !important;
    border-color: #ff9800 !important;
}

/* Для ссылок в навбаре */
.navbar-nav .nav-link.active, .navbar-nav .nav-link:focus, .navbar-nav .nav-link:hover {
    color: #fff !important;
    background-color: rgba(0, 0, 0, 0.15) !important;
    border-radius: 4px;
}

/* Дополнительные акценты */
a {
    color: #ff9800; /* Единый оранжевый цвет */
    transition: color 0.2s;
    text-decoration: none;
}

a:hover {
    color: #ff9800; /* Единый оранжевый цвет при наведении */
    text-decoration: none;
}

.text-primary {
    color: #ff9800 !important;
}

.border-primary {
    border-color: #ff9800 !important;
}

/* Улучшение стилей для предупреждений */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 1rem 1.25rem;
}

.alert-info {
    background-color: #fff8e1 !important; /* Очень бледный оранжевый */
    color: #ff9800 !important; /* Единый оранжевый цвет */
    border-left: 4px solid #ff9800;
}

.alert-success {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.alert-warning {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
}

.alert-danger {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
}

/* Стили для пагинации */
.pagination .page-item.active .page-link {
    background-color: #ff9800 !important;
    border-color: #ff9800 !important;
    color: white;
}

.pagination .page-link {
    color: #ff9800;
    border-radius: 4px;
    margin: 0 2px;
}

.pagination .page-link:hover {
    background-color: #fff3e0;
}

/* Стили для списков */
.list-group-item {
    border: none;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.list-group-item:hover {
    border-left-color: #ff9800;
    background-color: #fff8e1;
}

/* Улучшения для форм поиска и фильтра */
.search-form {
    margin-bottom: 1.5rem;
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.filter-form {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

.filter-form .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
}

.filter-form .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.filter-form .form-control,
.filter-form .form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.filter-form .form-control:focus,
.filter-form .form-select:focus {
    border-color: #ff9800;
    box-shadow: 0 0 0 0.2rem rgba(245, 124, 0, 0.25);
}

/* Стили для расширенных фильтров */
#advancedFilters {
    padding-top: 1rem;
}

#advancedFilters hr {
    border-top: 1px solid #ff9800;
    opacity: 0.5;
}

/* Стили для активных фильтров */
.active-filters {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

/* Улучшение стилей для бейджей в таблице */
.table .badge {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Цветовая схема для среднего балла */
.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-warning {
    background-color: #ff9800 !important;
    color: #212529 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

/* Стили для статуса практики */
.practice-status-active {
    background-color: #28a745 !important;
}

.practice-status-finished {
    background-color: #007bff !important;
}

.practice-status-unknown {
    background-color: #6c757d !important;
}

/* Стили для иконок */
.fa, .fas, .far, .fab {
    margin-right: 0.25rem;
}

/* Улучшение юзабилити для ссылок действий */
.action-links a {
    margin-right: 10px;
    display: inline-block;
}

.action-links a:last-child {
    margin-right: 0;
} 

/* Специальные стили для страницы входа */
/* Белая кнопка с черным текстом для формы входа */
.container[style*="max-width: 400px"] .btn.btn-primary.w-100,
.btn.btn-primary.w-100[type="submit"] {
    background-color: #ffffff !important;
    background-image: none !important;
    border-color: #cccccc !important;
    color: #000000 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    text-shadow: none !important;
}

.container[style*="max-width: 400px"] .btn.btn-primary.w-100:hover,
.btn.btn-primary.w-100[type="submit"]:hover {
    background-color: #f8f9fa !important;
    background-image: none !important;
    border-color: #999999 !important;
    color: #000000 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
    text-shadow: none !important;
}

.container[style*="max-width: 400px"] .btn.btn-primary.w-100:focus,
.btn.btn-primary.w-100[type="submit"]:focus {
    background-color: #ffffff !important;
    border-color: #cccccc !important;
    color: #000000 !important;
    box-shadow: 0 0 0 0.2rem rgba(0,0,0,0.1) !important;
}

/* Дополнительный специфичный стиль для кнопки входа */
button#login-button,
#login-button.btn.btn-primary.w-100 {
    background-color: #ffffff !important;
    background-image: none !important;
    border: 2px solid #999999 !important;
    color: #000000 !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    transition: all 0.2s ease !important;
}

button#login-button:hover,
#login-button.btn.btn-primary.w-100:hover {
    background-color: #f8f9fa !important;
    background-image: none !important;
    border: 2px solid #666666 !important;
    color: #000000 !important;
    text-shadow: none !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
    transform: translateY(-1px) !important;
}

button#login-button:active,
button#login-button:focus,
#login-button.btn.btn-primary.w-100:active,
#login-button.btn.btn-primary.w-100:focus {
    background-color: #ffffff !important;
    border: 2px solid #333333 !important;
    color: #000000 !important;
    box-shadow: 0 0 0 0.2rem rgba(0,0,0,0.1) !important;
    outline: none !important;
}

/* Specialized styles for table elements - только для десктопа */
@media (min-width: 577px) {
    .table .badge {
        font-size: 0.85rem !important;
        padding: 4px 8px !important;
    }

    .table .btn {
        font-size: 0.85rem !important;
        padding: 4px 8px !important;
    }

    .table input[type="checkbox"] {
        transform: scale(1.0);
    }

    .table .action-links a {
        margin-right: 4px !important;
    }

    .table .fas, .table .fa {
        font-size: 0.85rem !important;
    }
}

/* ПРИНУДИТЕЛЬНЫЕ МОБИЛЬНЫЕ СТИЛИ - МАКСИМАЛЬНЫЙ ПРИОРИТЕТ */
@media (max-width: 576px) {
    /* Принудительно переопределяем все стили таблицы для мобильных */
    body .table {
        font-size: 0.4rem !important;
        table-layout: fixed !important;
        width: 100% !important;
        min-width: auto !important;
        line-height: 0.9 !important;
        border-collapse: collapse !important;
    }
    
    body .table th,
    body .table td {
        padding: 0px 1px !important;
        white-space: nowrap !important;
        vertical-align: middle !important;
        border-right: 1px solid #f1f3f4 !important;
        font-size: 0.4rem !important;
        line-height: 0.9 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* Принудительные ширины колонок */
    body .table th:first-child, body .table td:first-child { width: 3% !important; }
    body .col-number { width: 3% !important; }
    body .col-name { width: 20% !important; }
    body .col-direction { width: 7% !important; }
    body .col-group { width: 5% !important; }
    body .col-institution { width: 9% !important; }
    body .col-email { width: 11% !important; }
    body .col-phone { width: 7% !important; }
    body .col-avgmark { width: 5% !important; }
    body .col-reports { width: 4% !important; }
    body .col-status { width: 7% !important; }
    body .col-start { width: 5% !important; }
    body .col-end { width: 5% !important; }
    body .col-actions { width: 9% !important; }
    
    /* Принудительные стили для элементов */
    body .table .badge {
        font-size: 0.3rem !important;
        padding: 0px 1px !important;
        line-height: 0.9 !important;
        border-radius: 1px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
    }
    
    body .table .btn {
        font-size: 0.3rem !important;
        padding: 0px 1px !important;
        margin: 0 !important;
        line-height: 0.9 !important;
        min-height: 10px !important;
        border-radius: 1px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
    }
    
    body .table input[type="checkbox"] {
        transform: scale(0.5) !important;
        margin: 0 !important;
    }
    
    body .table .action-links a {
        margin-right: 0px !important;
        font-size: 0.3rem !important;
        padding: 0px 1px !important;
        line-height: 0.9 !important;
        border-radius: 1px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    body .table .fas, body .table .fa {
        font-size: 0.3rem !important;
        margin-right: 0px !important;
    }
}

@media (max-width: 400px) {
    /* Еще более компактные стили для очень маленьких экранов */
    body .table {
        font-size: 0.35rem !important;
    }
    
    body .table th,
    body .table td {
        padding: 0px 0px !important;
        font-size: 0.35rem !important;
        line-height: 0.8 !important;
    }
    
    /* Еще более компактные ширины */
    body .table th:first-child, body .table td:first-child { width: 2% !important; }
    body .col-number { width: 2% !important; }
    body .col-name { width: 25% !important; }
    body .col-direction { width: 8% !important; }
    body .col-group { width: 5% !important; }
    body .col-institution { width: 10% !important; }
    body .col-email { width: 12% !important; }
    body .col-phone { width: 8% !important; }
    body .col-avgmark { width: 5% !important; }
    body .col-reports { width: 4% !important; }
    body .col-status { width: 8% !important; }
    body .col-start { width: 5% !important; }
    body .col-end { width: 5% !important; }
    body .col-actions { width: 11% !important; }
    
    body .table .badge {
        font-size: 0.25rem !important;
        padding: 0px 1px !important;
        line-height: 0.8 !important;
    }
    
    body .table .btn {
        font-size: 0.25rem !important;
        padding: 0px 1px !important;
        min-height: 8px !important;
        line-height: 0.8 !important;
    }
    
    body .table .action-links a {
        font-size: 0.25rem !important;
        padding: 0px 1px !important;
        line-height: 0.8 !important;
    }
    
    body .table .fas, body .table .fa {
        font-size: 0.25rem !important;
    }
    
    body .table input[type="checkbox"] {
        transform: scale(0.4) !important;
    }
}

/* Специальные стили для страниц профилей студентов */
.student-profile .table {
    font-size: 0.95rem; /* Читабельный размер для профилей */
    table-layout: auto !important; /* Автоматическая ширина колонок */
}

.student-profile .table th,
.student-profile .table td {
    padding: 10px 12px; /* Нормальные отступы для профилей */
    border-right: none; /* Убираем правые границы в профилях */
    white-space: nowrap; /* Не переносим текст в одну строку */
    overflow: hidden; /* Скрываем переполнение */
    text-overflow: ellipsis; /* Добавляем многоточие */
    max-width: 250px; /* Ограничиваем максимальную ширину */
}

.student-profile .table .badge {
    font-size: 0.85rem !important;
    padding: 4px 8px !important;
}

/* Для таблиц с информацией о студенте - компактно и читабельно */
.student-info-table.table {
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif !important; /* Принудительно применяем правильный шрифт */
}

.student-info-table.table th,
.student-info-table.table td {
    padding: 8px 10px;
    border: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    font-family: 'Montserrat', sans-serif !important; /* Принудительно применяем правильный шрифт */
}

/* Force cache update - 10.7.2025 18:20 - исправлен шрифт в таблицах студента */