
.futuristic-body {
    background-color: #000000; /* ИСПРАВЛЕНО: Теперь фон чёрный */
}

/* Холст для анимации частиц на фоне */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}/* ======================================================= */
/* СТИЛИ ДЛЯ КНОПОК ЭКСПОРТА (EXCEL/PDF)          */
/* ======================================================= */

.export-btn-group .btn {
    border: none;
    border-radius: 8px !important;
    padding: 8px 16px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.export-btn-group .btn:first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.export-btn-group .btn:last-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

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

.export-btn-group .btn.btn-success {
    background-color: #1D6F42;
}
.export-btn-group .btn.btn-success:hover {
    background-color: #185a36;
}

.export-btn-group .btn.btn-danger {
    background-color: #D93025;
}
.export-btn-group .btn.btn-danger:hover {
    background-color: #b9271e;
}


/* ======================================================= */
/* ПЛАВАЮЩАЯ ПАНЕЛЬ ДЛЯ МАССОВЫХ ДЕЙСТВИЙ            */
/* ======================================================= */

.floating-actions-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    padding-bottom: 20px;
}

#mass-actions-panel {
    background-color: #ffffff;
    padding: 12px 24px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    white-space: nowrap;
}

#mass-actions-panel:not(.d-none) {
    animation: slideUp 0.35s ease-out forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ======================================================= */
/* ГЛАВНЫЕ СТИЛИ ДЛЯ ТАБЛИЦЫ УЧИТЕЛЕЙ (УЛУЧШЕННЫЕ)    */
/* ======================================================= */

/* Главная обертка, отвечает за ВЕРТИКАЛЬНЫЙ скролл */
.table-wrapper {
    max-height: 75vh;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: .375rem;
}

/* Внутренняя обертка, отвечает за ГОРИЗОНТАЛЬНЫЙ скролл */
.table-wrapper .table-responsive {
    overflow-x: auto;
    position: relative;
    border: none;
}

/* "Прилипающий" заголовок таблицы */
#teachersPageTable thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #f8f9fa;
    box-shadow: inset 0 -2px 0 #dee2e6;
}

/* Курсор для кликабельных строк */
#teachers-table-body tr {
    cursor: pointer;
}

/* --- Индикаторы горизонтальной прокрутки --- */
.table-wrapper .table-responsive::before,
.table-wrapper .table-responsive::after {
    content: "";
    position: sticky;
    z-index: 1;
    width: 50px;
    top: 0;
    bottom: 9px; /* Отступ снизу, чтобы не перекрывать скроллбар */
    pointer-events: none;
    transition: opacity 0.2s;
}

.table-wrapper .table-responsive::before {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.08), transparent);
    opacity: 0;
}

.table-wrapper .table-responsive::after {
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.08), transparent);
    opacity: 0;
}

.table-wrapper .table-responsive.is-scrolled-left::before,
.table-wrapper .table-responsive.is-scrolled-right::after {
    opacity: 1;
}

/* --- Стили для изменения размера колонок --- */
.resizable-table th {
    position: relative;
}
.resizer {
    position: absolute;
    top: 0;
    right: -2px;
    width: 5px;
    cursor: col-resize;
    user-select: none;
    height: 100%;
    z-index: 1;
}
.resizing {
    border-right: 2px solid #0d6efd;
}

/* --- Улучшенный скроллбар --- */
.table-wrapper::-webkit-scrollbar,
.table-wrapper .table-responsive::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
.table-wrapper::-webkit-scrollbar-track,
.table-wrapper .table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.table-wrapper::-webkit-scrollbar-thumb,
.table-wrapper .table-responsive::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 10px;
    border: 2px solid #f1f1f1;
}
.table-wrapper::-webkit-scrollbar-thumb:hover,
.table-wrapper .table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

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

.qr-modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.qr-image {
    border-radius: 8px;
    border: 1px solid #eee;
}

.qr-send-status {
    min-height: 24px;
    margin-top: 10px;
}

.qr-modal-footer {
    background-color: #f7f9fc;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    padding: 1rem;
    justify-content: center;
}

/* Стили для ссылок отправки (WhatsApp || Telegram || Email) */
.send-qr-option-wrapper {
    display: inline-block;
}

.send-qr-separator {
    margin: 0 12px;
    color: #ced4da;
    font-weight: 300;
}

a.send-qr-single-btn {
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    font-size: 1rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

a.send-qr-single-btn i {
    margin-right: 6px;
    color: #6c757d;
    transition: color 0.2s ease-in-out;
}

a.send-qr-single-btn:hover {
    background-color: #e9ecef;
    color: #212529;
}

a.send-qr-single-btn:hover i {
    color: #0d6efd; /* Яркий цвет иконки при наведении */
}

/* ======================================================= */
/* СТИЛИ ДЛЯ СТРАНИЦЫ АВТОРИЗАЦИИ (ЛОГИН)     */
/* ======================================================= */

.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
    padding: 20px;
}

.auth-container {
    max-width: 450px;
    width: 100%;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e7eaf0;
}

.auth-container .logo {
    max-width: 150px;
    margin: 0 auto 30px auto;
    display: block;
}

.auth-container h2 {
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 25px;
}

/* Стили для полей формы */
.form-floating > .form-control {
    height: calc(3.5rem + 2px);
    line-height: 1.25;
}

.form-floating > label {
    padding: 1rem .75rem;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Стили для кнопки */
.btn-primary {
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    width: 100%;
}

/* Стили для flash-сообщений (уведомлений об ошибках) */
.flash-messages {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.flash-messages li {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.flash-messages .danger {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.flash-messages .success {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}
/* ======================================================= */
/* СТИЛИ ДЛЯ СТРАНИЦЫ АВТОРИЗАЦИИ (АДАПТИРОВАННЫЕ) */
/* ======================================================= */

/* Этот класс у вас уже есть в login.html, мы просто стилизуем его */
.checkin-page-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
    padding: 20px;
    background-color: #f0f2f5; /* Приятный фон для всей страницы */
}

/* Этот класс тоже уже есть, мы делаем его красивой карточкой */
.checkin-card {
    max-width: 480px;
    width: 100%;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #e7eaf0;
    text-align: center;
}

.checkin-card .logo {
    max-width: 120px; /* Немного уменьшим логотип для баланса */
    margin: 0 auto 15px auto;
    display: block;
}

.checkin-card .title {
    font-size: 1.75rem; /* Размер заголовка "Вход в систему" */
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

/* Стили для полей формы */
.checkin-card .form-label {
    font-weight: 500;
    color: #495057;
}

.checkin-card .form-control {
    padding: 12px 15px;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: all 0.2s ease-in-out;
}

.checkin-card .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.2);
}

/* Стили для кнопки "Войти" */
.checkin-card .btn-primary {
    padding: 12px 20px;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 8px;
    width: 100%;
    transition: all 0.2s ease-in-out;
}

.checkin-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

/* Стили для flash-сообщений (уведомлений об ошибках) */
.flash-messages {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.flash-messages li {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    border: 1px solid transparent;
}

.flash-messages .danger {
    background-color: #f8d7da;
    color: #842029;
    border-color: #f5c2c7;
}

.flash-messages .success {
    background-color: #d1e7dd;
    color: #0f5132;
    border-color: #badbcc;
}
/* ======================================================= */
/* СТИЛИ ДЛЯ ГЛАВНОЙ СТРАНИЦЫ (ДИЗАЙН ПОЛЬЗОВАТЕЛЯ) */
/* ======================================================= */

/* Основная обертка, центрирующая все по вертикали и горизонтали */
.index-page-original-design {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 95vh;
    padding: 2rem 1rem;
    background-color: #f4f7f9;
}

/* Стили для карточки. Они будут похожи на стили .checkin-card
  для создания единого дизайна в приложении.
*/
.index-page-original-design .card {
    max-width: 600px;
    width: 100%;
    background-color: #ffffff;
    padding: 2rem 2.5rem;
    border-radius: 16px;
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.1);
    border: none;
    text-align: center;
}

.index-page-original-design .logo {
    max-width: 100px;
    margin: 0 auto 1rem auto;
    display: block;
}

.index-page-original-design .title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.index-page-original-design .datetime {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.index-page-original-design .status-box {
    font-size: 0.85rem;
    background-color: #e9f5ff;
    color: #0056b3;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: inline-block;
}

/* Стили для поля ввода с иконкой QR-камеры */
.input-wrapper {
    position: relative;
}

.input-wrapper .form-control {
    height: 50px;
    padding-left: 1rem;
    padding-right: 3rem; /* Место для иконки */
}

.input-wrapper .qr-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease-in-out;
}

.input-wrapper .qr-icon:hover {
    opacity: 1;
}

/* Стили для блока с таблицей отсутствующих */
#tableBlock {
    flex-grow: 1;
    overflow-y: auto;
    min-height: 200px;

    /* ✨ ИЗМЕНИТЕ ЭТУ СТРОКУ, ЧТОБЫ НАСТРОИТЬ ВЫСОТУ */
    flex-basis: 60%; /* Попробуйте 60%. Если мало, поставьте 70% или 80% */
}

#tableBlock.show {
    display: block;
}
/* Стили для контейнера кнопок на главной странице */
.btn-container {
    display: grid;
    grid-template-columns: 1fr; /* Всегда одна колонка, чтобы кнопки были друг под другом */
    gap: 0.75rem; /* Расстояние между кнопками */
    margin-top: 1rem;
}

/* Общий стиль для всех кнопок в контейнере */
.btn-container .btn {
    padding: 0.75rem 1rem; /* Увеличим отступы для "массивности" */
    font-size: 1rem;
    font-weight: 500;
}
/* НОВЫЙ КЛАСС ДЛЯ АВАТАРА В НАВИГАЦИИ */
.navbar-avatar {
    object-fit: cover; /* Гарантирует, что логотип заполнит круг, не искажаясь */
    background-color: #ffffff; /* Белый фон, если у логотипа есть прозрачность */
}

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

.futuristic-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh; /* <-- ИЗМЕНЕНИЕ ЗДЕСЬ */
  position: static;
  overflow-y: auto;  /* <-- И ИЗМЕНЕНИЕ ЗДЕСЬ (для безопасной прокрутки) */
  padding: 2rem 0;   /* Добавим небольшой отступ на случай очень большого контента */
}

/* Холст для анимации частиц */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    background-color: #000000; /* <-- Вот это изменение */
}

/* Контент, который будет НАД анимацией */
.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInGlow 3s ease-in-out;
}

/* Анимация появления контента */
@keyframes fadeInGlow {
    from {
        opacity: 0;
        transform: scale(0.9);
        text-shadow: 0 0 10px rgba(0, 170, 255, 0);
    }
    to {
        opacity: 1;
        transform: scale(1);
        text-shadow: 0 0 20px rgba(0, 170, 255, 0.5);
    }
}

.hero-logo {
    max-width: 120px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(0, 170, 255, 0.7));
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    text-transform: uppercase;
    color: #fff;
    text-shadow:
        0 0 7px #fff,
        0 0 10px #fff,
        0 0 21px #fff,
        0 0 42px #0af,
        0 0 82px #0af,
        0 0 92px #0af,
        0 0 102px #0af,
        0 0 151px #0af;
}

.hero-subtitle {
    font-size: 1.25rem;
    letter-spacing: 0.2rem;
    color: #cceeff;
    text-transform: uppercase;
    margin-top: -10px;
    opacity: 0.8;
}

.hero-buttons {
    margin-top: 2.5rem;
}

/* Ультра-дизайнерские стеклянные кнопки */
.btn-glass {
    display: inline-block;
    padding: 12px 28px;
    margin: 0 10px;
    color: #fff;
    border: 1px solid rgba(0, 170, 255, 0.5);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0, 170, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.btn-glass span {
    position: relative;
    z-index: 1;
}

.btn-glass:hover {
    color: #000;
    border-color: rgba(0, 170, 255, 1);
    box-shadow: 0 0 25px rgba(0, 170, 255, 0.8);
}

/* Анимация заполнения при наведении */
.btn-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(0, 170, 255, 0.8), transparent);
    transition: all 0.5s;
}

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

.btn-glass.primary:hover {
    background: #00aaff;
}

.btn-glass.secondary:hover {
    background: #ffffff;
    color: #000;
    border-color: #fff;
}

/* ======================================================= */
/* СТИЛИ ДЛЯ ПЛАВНОГО ПЕРЕХОДА МЕЖДУ СТРАНИЦАМИ      */
/* ======================================================= */

body {
    /* Плавность для всех изменений */
    transition: opacity 0.4s ease-in-out;
}

/* Класс, который мы будем добавлять перед уходом со страницы */
body.fade-out {
    opacity: 0;
}

/* Стили для новой карточки на главной странице */
.glass-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 550px;
    padding: 2.5rem;
    background: rgba(10, 25, 47, 0.55); /* Темно-синий, полупрозрачный фон */
    border: 1px solid rgba(0, 170, 255, 0.2);
    border-radius: 16px;
    backdrop-filter: blur(15px); /* Эффект матового стекла */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    text-align: center;
}

.glass-card .logo {
    max-width: 100px;
    margin: 0 auto 1rem;
}

.glass-card .title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.glass-card .datetime {
    color: #a0c8e0;
    margin-bottom: 1.5rem;
}

.glass-card .form-label {
    color: #e0e0e0;
    font-weight: 500;
}

/* ======================================================= */
/* УЛУЧШЕННЫЕ СТИЛИ ДЛЯ СТРАНИЦЫ ВХОДА (LOGIN)       */
/* ======================================================= */

/* 1. Центрирование карточки входа по вертикали и горизонтали */
.login-page-wrapper {
    display: flex;
    align-items: center; /* Вертикальное центрирование */
    justify-content: center; /* Горизонтальное центрирование */
    min-height: 100vh; /* Минимальная высота в весь экран */
    padding: 1rem;
    background-color: #f0f2f5; /* Приятный светло-серый фон */
}

/* 1. Уменьшаем ширину карточки */
.login-card {
    width: 100%;
    max-width: 420px; /* Можешь поменять это значение, если хочешь */
    background: #fff;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: none;
}

/* 3. Обертка для поля пароля, чтобы иконка была внутри */
.password-wrapper {
    position: relative;
}
/* Добавляем отступ справа внутри поля ввода, чтобы текст не заходил под иконку */
.password-wrapper .form-control {
    padding-right: 40px;
}
/* 3. Стили самой иконки "глаза" */
.password-toggle-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d; /* Серый цвет иконки */
    z-index: 100;
}
/* ======================================================= */
/* ФИНАЛЬНЫЙ МАКЕТ ДЛЯ СТРАНИЦЫ ОТМЕТКИ              */
/* ======================================================= */

/* Делаем главную карточку гибким контейнером, который управляет дочерними элементами */
.glass-card {
    display: flex;
    flex-direction: column; /* Элементы внутри будут идти друг за другом сверху вниз */

}

#tableBlock {
    flex-grow: 1; /* Этот стиль заставит блок занять всё свободное место */
    overflow-y: auto; /* Это добавит скролл, если нужно */
}
/* Стиль для счётчика отсутствующих */
.status-box {
    display: inline-block;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding: 8px 16px;
    color: #e0e0e0;
    font-size: 0.9rem;
    background-color: rgba(0, 170, 255, 0.1);
    border: 1px solid rgba(0, 170, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Убираем стандартный фон у строк таблицы */
#absent-list-container .table tbody tr {
    background-color: transparent;
    color: #e0e0e0;
}

/* Меняем цвет границ между ячейками, чтобы они соответствовали стилю */
#absent-list-container .table td,
#absent-list-container .table th {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Стиль для строки при наведении курсора */
#absent-list-container .table tbody tr:hover {
    background-color: rgba(0, 170, 255, 0.15);
    color: #fff;
    cursor: pointer;
}

/* Основной виджет чата (попап в правом нижнем углу) */
#chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    height: 450px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    z-index: 1000;
    /* Строка display: none; удалена */
    display: flex; /* <-- ИЗМЕНЕНО: Используем flex, чтобы дочерние элементы выстроились правильно */
    flex-direction: column;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Header чата */
#chat-widget-header {
    background: #0084ff; /* Синий как в FB */
    color: #fff;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.chat-action-btn {
    cursor: pointer;
    font-size: 18px;
    margin-left: 10px;
}

.chat-back-button {
    cursor: pointer;
    font-size: 20px;
}

/* Список пользователей (при выборе собеседника) */
#user-list {
    overflow-y: auto;
    height: calc(100% - 60px); /* Минус header */
    background: #f0f2f5; /* Светлый фон как в FB */
}

.list-group-item {
    cursor: pointer;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.list-group-item-action:hover {
    background: #e4e6eb;
}

.ai-item {
    font-weight: bold;
}
