/* styles.css - ПОЛНАЯ ВЕРСИЯ С МОБИЛЬНОЙ АДАПТАЦИЕЙ (СОХРАНЕН ПК ДИЗАЙН) */

/* Подключение локального шрифта Open Sans (TTF) */
@font-face {
    font-family: 'Open Sans';
    src: url('fonts/opensans/OpenSans-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans'; 
    src: url('fonts/opensans/OpenSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    src: url('fonts/opensans/OpenSans-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    src: url('fonts/opensans/OpenSans-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    src: url('fonts/opensans/OpenSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-blue: #3a7bd5;
    --primary-blue2: #205db2;
    --light-blue: #a0c1e8;
    --dark-blue: #1e3c72;
    --pastel-green: #a8e6cf;
    --light-green: #dcedc1;
    --dark-green: #7ac142;
    --pastel-yellow: #fdffb6;
    --light-gray: #f5f7fa;
    --medium-gray: #e0e5ec;
    --dark-gray: #2c3e50;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --border-radius-sm: 8px;
}

/* Основные стили для страниц регистрации и авторизации */
body.auth-page {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #4a90e2 0%, #2c5a9e 50%, #1e3c72 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

/* Исправление для login.php и register.php - поля ввода уже */
.login-container {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.98);
    padding: 45px 40px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    margin: 20px;
    z-index: 10;
}

.login-container h1 {
    color: #2a5298;
    margin: 0 auto 35px;
    font-weight: 700;
    position: relative;
    text-align: center;
    font-size: 30px;
    width: fit-content;
}

.login-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container h1::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background: linear-gradient(to right, #2a5298, #4a90e2, #6ba5ff);
    margin: 18px auto 0;
    border-radius: 2px;
}

.form-group {
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8edf5;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
    font-family: 'Open Sans', sans-serif;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.15);
    background: #fff;
}

.login-container .btn {
    width: 100%;
    padding: 16px;
    margin-top: 20px;
    background: linear-gradient(135deg, #2c5a9e, #4a90e2);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(44, 90, 158, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.login-container .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4a90e2, #6ba5ff);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.login-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(44, 90, 158, 0.4);
}

.login-container .btn:hover::before {
    opacity: 1;
}

.login-container .btn:active {
    transform: translateY(1px);
}

.login-container p {
    margin-top: 28px;
    color: #6c7a8a;
    text-align: center;
    font-size: 14px;
}

.login-container a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.login-container a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #2c5a9e, #4a90e2);
    transition: width 0.3s ease;
}

.login-container a:hover {
    color: #2c5a9e;
}

.login-container a:hover::after {
    width: 100%;
}

.alert {
    padding: 14px 18px;
    margin-bottom: 25px;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: var(--shadow);
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
}

.alert-danger {
    background-color: #fee9e6;
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid var(--dark-green);
}

.alert-info {
    background-color: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid var(--primary-blue);
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность для форм */
@media (max-width: 576px) {
    .login-container {
        padding: 35px 25px;
        margin: 0 15px;
        max-width: calc(100% - 30px);
    }
    
    .login-container h1 {
        font-size: 26px;
        margin-bottom: 30px;
    }
    
    .form-group input {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .login-container .btn {
        padding: 14px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
    }
    
    .login-container h1 {
        font-size: 24px;
    }
    
    .form-group {
        margin-bottom: 22px;
    }
    
    .alert {
        padding: 12px 15px;
        font-size: 13px;
    }
}

/* Остальные стили (сохраняются без изменений) */
body:not(.auth-page) {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

/* Шапка - оригинальный дизайн для ПК */
header {
    background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
    color: var(--white);
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    position: relative;
    display: block;
    padding: 0 20px;
}

header h1 {
    margin: 0;
    font-size: 1.8em;
    font-weight: 600;
    padding: 10px 0;
}

/* Бургер-кнопка - только для мобильных, по умолчанию скрыта */
.burger-menu {
    display: none;
}

/* Навигация - оригинальный дизайн для ПК */
nav {
    display: block;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 15px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

nav ul li {
    margin: 0;
    position: relative;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 10px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    white-space: nowrap;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Выпадающее меню - оригинальный дизайн для ПК */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 8px 0;
    margin-top: 5px;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    display: block;
    width: 100%;
}

.dropdown-menu li a {
    color: var(--dark-gray);
    padding: 12px 20px;
    border-radius: 0;
    white-space: nowrap;
    font-size: 15px;
}

.dropdown-menu li a:hover {
    background-color: var(--light-gray);
    color: var(--primary-blue);
    transform: none;
}

.dropdown-menu li:first-child a {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.dropdown-menu li:last-child a {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.logout {
    margin-left: auto;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 0 !important;
}

.logout a {
    padding: 10px 20px !important;
}

.logout:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

/* ========== МОБИЛЬНАЯ АДАПТАЦИЯ НАВИГАЦИИ ========== */
@media (max-width: 992px) {
    /* Показываем бургер-кнопку */
    .burger-menu {
        display: block;
        position: absolute;
        top: 15px;
        right: 20px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 1001;
    }
    
    .burger-menu span {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px 0;
        background-color: var(--white);
        border-radius: 3px;
        transition: all 0.3s ease;
    }
    
    /* Анимация бургера при открытии */
    .burger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }
    
    .burger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Мобильное меню - выезжающее справа */
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        padding: 70px 20px 20px;
        margin: 0;
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
        margin: 0;
    }
    
    nav ul li {
        width: 100%;
    }
    
    nav ul li a {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 20px;
        border-radius: 10px;
        white-space: normal;
    }
    
    /* Выпадающее меню в мобильной версии - переключаемое */
    .dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.1);
        padding-left: 20px;
        margin-top: 0;
        display: none;
        transition: none;
    }
    
    .dropdown .dropdown-menu.show {
        display: block;
    }
    
    .dropdown .dropdown-menu li a {
        color: var(--white);
        padding: 10px 20px;
        white-space: normal;
    }
    
    .dropdown .dropdown-menu li a:hover {
        background: rgba(255, 255, 255, 0.2);
        color: var(--white);
    }
    
    /* Стрелка для выпадающего меню */
    .dropdown > a {
        position: relative;
        justify-content: space-between;
    }
    
    .dropdown > a .dropdown-arrow {
        transition: transform 0.3s ease;
        margin-left: auto;
    }
    
    .dropdown > a .dropdown-arrow.rotated {
        transform: rotate(180deg);
    }
    
    .logout {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        text-align: center;
    }
    
    /* Оверлей при открытом меню */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    /* Заголовок шапки на мобильных */
    header h1 {
        font-size: 1.2em;
        padding-right: 60px;
    }
}

/* Формы (общие стили) */
.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-gray);
    font-size: 15px;
}

.form-group input:not([type="file"]):not([type="checkbox"]),
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
    background-color: var(--light-gray);
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.2);
    background-color: var(--white);
}

/* Кнопки */
.btn {
    display: inline-block;
    background: var(--primary-blue);
    color: var(--white);
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    text-align: center;
    min-width: 120px;
    font-family: 'Open Sans', sans-serif;
}

.btn:hover {
    background: var(--dark-blue);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--dark-green);
}

.btn-primary:hover {
    background: #5a9e2d;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    min-width: auto;
    border-radius: 20px;
}

/* Кнопки + и - (круглые) - фиксированный размер */
.table-controls {
    margin: 20px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-add, .btn-remove {
    width: 50px;
    height: 50px;
    min-width: 50px;
    max-width: 50px;
    font-size: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-add {
    background-color: var(--dark-green);
    color: white;
}

.btn-add:hover {
    background-color: #5a9e2d;
    transform: scale(1.1);
}

.btn-remove {
    background-color: #e74c3c;
    color: white;
}

.btn-remove:hover {
    background-color: #c0392b;
    transform: scale(1.1);
}

/* Адаптация для мобильных кнопок */
@media (max-width: 768px) {
    .btn {
        width: 100%;
        max-width: 100%;
        min-width: auto;
        padding: 14px 20px;
        box-sizing: border-box;
    }
    
    .btn-sm {
        width: auto;
        min-width: 100px;
    }
    
    .table-controls {
        justify-content: center;
    }
    
    .btn-add, .btn-remove {
        width: 55px;
        height: 55px;
        min-width: 55px;
        max-width: 55px;
        font-size: 28px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .btn-add, .btn-remove {
        width: 50px;
        height: 50px;
        min-width: 50px;
        max-width: 50px;
        font-size: 24px;
    }
}

/* Таблицы - с горизонтальной прокруткой для мобильных */
.table-container {
    overflow-x: auto;
    margin: 25px 0;
    background: var(--white);
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .table-container {
        padding: 10px;
        margin: 15px 0;
    }
}

table {
    width: 100%;
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 20px;
    font-family: 'Open Sans', sans-serif;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

@media (max-width: 768px) {
    table {
        min-width: 500px;
        font-size: 13px;
    }
    
    th, td {
        padding: 10px 8px;
    }
}

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--medium-gray);
    font-family: 'Open Sans', sans-serif;
}

/* ШАПКИ ТАБЛИЦ - УВЕЛИЧЕН РАЗМЕР ТЕКСТА */
#achievements-table th,
#attendance-table th,
#lessons-table th,
#events-table th,
#students-table th,
#safety-table th,
#annual-report-table th,
.students-table th,
.table th {
    background-color: #3a7bd5 !important;
    background-image: none !important;
    color: var(--white);
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 16px;
    padding: 16px 12px;
}

th:last-child {
    border-right: none;
}

tr:nth-child(even) {
    background-color: rgba(160, 193, 232, 0.1);
}

tr:hover {
    background-color: rgba(160, 193, 232, 0.2);
}

/* Ячейки таблицы - УВЕЛИЧЕН РАЗМЕР ТЕКСТА */
td {
    font-size: 15px;
}

/* Конкретные таблицы - одинаковый стиль */
#achievements-table,
#attendance-table,
#lessons-table,
#events-table,
#students-table,
#safety-table,
#annual-report-table,
.students-table {
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

#achievements-table td,
#attendance-table td,
#lessons-table td,
#events-table td,
#students-table td,
#safety-table td,
#annual-report-table td,
.students-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e5ec;
}

#achievements-table tr:nth-child(even),
#attendance-table tr:nth-child(even),
#lessons-table tr:nth-child(even),
#events-table tr:nth-child(even),
#students-table tr:nth-child(even),
#safety-table tr:nth-child(even),
#annual-report-table tr:nth-child(even),
.students-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

#achievements-table tr:hover,
#attendance-table tr:hover,
#lessons-table tr:hover,
#events-table tr:hover,
#students-table tr:hover,
#safety-table tr:hover,
#annual-report-table tr:hover,
.students-table tr:hover {
    background-color: #e9f7fe;
}

/* Размеры полей ввода в таблицах */
.small-input {
    width: 80px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    font-family: 'Open Sans', sans-serif;
    box-sizing: border-box;
}

.medium-input {
    width: 200px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    font-family: 'Open Sans', sans-serif;
    box-sizing: border-box;
}

.large-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    min-height: 80px;
    resize: vertical;
    font-family: 'Open Sans', sans-serif;
    box-sizing: border-box;
}

/* Адаптация полей ввода в таблицах для мобильных */
@media (max-width: 768px) {
    .small-input {
        width: 70px;
        padding: 8px;
        font-size: 13px;
    }
    
    .medium-input {
        width: 150px;
        padding: 8px;
        font-size: 13px;
    }
    
    .large-input {
        padding: 8px;
        font-size: 13px;
        min-height: 60px;
    }
    
    th, td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    th {
        font-size: 13px;
        padding: 10px 8px;
    }
}

/* СТИЛИ ДЛЯ ТАБЛИЦЫ ПОСЕЩАЕМОСТИ - ФИКСАЦИЯ ПЕРВЫХ СТОЛБЦОВ */
#attendance-table th:first-child,
#attendance-table th:nth-child(2),
#attendance-table td:first-child,
#attendance-table td:nth-child(2) {
    position: sticky;
    background-color: white;
    z-index: 10;
}

#attendance-table th:first-child {
    left: 0;
    z-index: 20;
    background-color: #3a7bd5 !important;
}

#attendance-table th:nth-child(2) {
    left: 50px;
    z-index: 20;
    background-color: #3a7bd5 !important;
}

#attendance-table td:first-child {
    left: 0;
    background-color: white;
}

#attendance-table td:nth-child(2) {
    left: 50px;
    background-color: white;
}

/* ИСПРАВЛЕНИЕ: Ячейки посещаемости - восстановлено правильное расположение */
.attendance-cell {
    position: relative;
    padding: 0 !important;
    text-align: center;
    min-width: 40px;
    height: 45px;
}

.attendance-cell input[type="checkbox"] {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    opacity: 0.7;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.attendance-mark {
    width: 17px;
    height: 17px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: bold;
    color: #e74c3c;
    position: absolute;
    top: 27%;
    left: 56%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
    font-size: 14px;
}

.attendance-cell:hover .attendance-mark {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* Кнопки действий */
.action-buttons {
    margin-top: 30px;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Стили для поиска (белый фон) */
.search-section {
    margin: 30px 0;
    padding: 25px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.search-form {
    display: flex;
    justify-content: center;
}

.search-input-group {
    display: flex;
    width: 100%;
    max-width: 600px;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    background: var(--white);
    font-family: 'Open Sans', sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.search-button {
    padding: 14px 28px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    border-radius: var(--border-radius-sm);
    min-width: 120px;
    font-family: 'Open Sans', sans-serif;
}

.search-button:hover {
    background-color: var(--dark-blue);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Адаптация поиска для мобильных */
@media (max-width: 768px) {
    .search-section {
        padding: 20px;
    }
    
    .search-input-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .search-input {
        width: 100%;
        padding: 12px 16px;
        font-size: 15px;
        box-sizing: border-box;
    }
    
    .search-button {
        width: 100%;
        padding: 12px 20px;
        font-size: 15px;
        min-width: auto;
    }
}

/* Кнопки переключения страниц - уменьшенные на мобильных */
@media (max-width: 768px) {
    div[style*="margin: 20px 0; display: flex"],
    div[style*="display: flex; justify-content: space-between"] {
        gap: 8px !important;
    }
    
    div[style*="margin: 20px 0; display: flex"] a,
    .page-link {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
    
    .btn-sm {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
}

.search-help {
    text-align: center;
    margin-top: 15px;
}

.search-help-content {
    margin: 15px auto 0;
    text-align: left;
    max-width: 500px;
}

/* Стили для подсказки по поиску */
.search-help-toggle {
    background: none;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
    padding: 5px;
    font-size: 15px;
    margin-top: 10px;
    display: inline-block;
    font-family: 'Open Sans', sans-serif;
}

.search-help-toggle:hover {
    text-decoration: underline;
}

.search-help-content {
    margin-top: 15px;
    padding: 15px;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--medium-gray);
    box-shadow: var(--shadow);
    font-size: 15px;
}

.search-help-content ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.text-center {
    text-align: center;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.table-container, .search-container {
    animation: fadeIn 0.4s ease-out;
}

/* Кастомный скроллбар */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-blue);
}

/* Стили для главной страницы */
.container > h2 {
    margin-top: 30px;
    color: var(--dark-gray);
    font-size: 2rem;
    text-align: center;
}

@media (max-width: 768px) {
    .container > h2 {
        font-size: 1.5rem;
        margin-top: 20px;
    }
    
    .container > p {
        font-size: 1rem;
        text-align: center;
    }
}

.container > p {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark-gray);
    font-size: 1.2rem;
}

.admin-info, .student-info {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 30px auto;
    max-width: 800px;
    animation: fadeIn 0.4s ease-out;
}

@media (max-width: 768px) {
    .admin-info, .student-info {
        padding: 20px;
        margin: 20px auto;
    }
    
    .admin-info h3, .student-info h3 {
        font-size: 1.3rem;
    }
    
    .admin-info ul, .student-info ul {
        padding-left: 20px;
        font-size: 14px;
    }
}

.admin-info h3, .student-info h3 {
    color: var(--primary-blue);
    margin-top: 0;
    border-bottom: 2px solid var(--medium-gray);
    padding-bottom: 15px;
    font-size: 1.6rem;
}

.admin-info ul, .student-info ul {
    padding-left: 20px;
    margin-bottom: 0;
    font-size: 16px;
}

.admin-info li, .student-info li {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Стили для личного кабинета */
.profile-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 1024px) {
    .profile-container {
        gap: 20px;
    }
}

.profile-sidebar {
    flex: none;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

.profile-content {
    flex: 1;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.card-header {
    padding: 20px 25px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 15px 20px;
    }
    
    .card-header h3, .card-header h4 {
        font-size: 1.2rem;
    }
}

.card-header h3, .card-header h4 {
    margin: 0;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
}

/* Аватар */
.avatar-container {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--primary-blue);
    box-shadow: 0 8px 15px rgba(58, 123, 213, 0.3);
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .avatar-container {
        width: 120px;
        height: 120px;
    }
}

.avatar-container:hover {
    transform: scale(1.05);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 48px;
}

/* Сетка для личной информации */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 25px;
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 18px;
    background: #f8f9fa;
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--primary-blue);
    transition: all 0.3s ease;
    min-height: 85px;
}

.info-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.info-item label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-item span {
    color: var(--dark-gray);
    font-size: 16px;
    padding-left: 26px;
}

/* Стили для кнопки "Выбрать файл" */
.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .file-upload-wrapper {
        max-width: 100%;
    }
}

.file-upload-btn {
    background: var(--primary-blue);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.file-upload-btn:hover {
    background: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.avatar-input {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-name {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Компактная форма */
.compact-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 25px;
}

@media (max-width: 768px) {
    .compact-form {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }
}

.compact-form .form-group {
    margin-bottom: 0;
}

.compact-input {
    padding: 12px 16px;
    font-size: 14px;
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--medium-gray);
    width: 100%;
    box-sizing: border-box;
}

.compact-input:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.2);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    padding: 20px 25px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
        gap: 10px;
        padding: 15px 20px;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

.btn-edit {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-edit:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Стили для выбора объединений */
.unions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    padding: 25px;
}

@media (max-width: 768px) {
    .unions-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px;
    }
}

.union-checkbox {
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--border-radius-sm);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.union-checkbox:hover {
    background: #e9ecef;
    border-color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.union-label {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.union-name {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 8px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.union-description {
    color: #6c757d;
    font-size: 13px;
    line-height: 1.4;
    padding-left: 26px;
}

.selected-unions {
    padding: 25px;
}

@media (max-width: 768px) {
    .selected-unions {
        padding: 20px;
    }
}

.unions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.union-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    margin-bottom: 8px;
    border-radius: var(--border-radius-sm);
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
}

.union-item:hover {
    transform: translateX(5px);
}

/* Портфолио */
.portfolio-section {
    padding: 25px;
}

@media (max-width: 768px) {
    .portfolio-section {
        padding: 20px;
    }
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.portfolio-item {
    border: 1px solid #e0e5ec;
    border-radius: var(--border-radius);
    padding: 20px;
    transition: all 0.3s ease;
    background: white;
    display: flex;
    flex-direction: column;
}

.portfolio-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.portfolio-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

@media (max-width: 768px) {
    .portfolio-item-header {
        flex-direction: column;
        gap: 10px;
    }
}

.portfolio-item-header h4 {
    margin: 0;
    color: var(--dark-gray);
    font-size: 16px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.portfolio-date {
    font-size: 12px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 15px;
    white-space: nowrap;
}

.portfolio-preview {
    width: 100%;
    height: 200px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.portfolio-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.portfolio-image:hover {
    transform: scale(1.05);
}

/* Админ-панель */
.admin-panel-container {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 40px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 768px) {
    .admin-panel-container {
        padding: 20px;
        margin-bottom: 25px;
    }
}

.admin-panel-container:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.admin-panel-container h2, 
.admin-panel-container h3 {
    color: var(--dark-blue);
    margin-top: 0;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

@media (max-width: 768px) {
    .admin-panel-container h2 {
        font-size: 1.5rem;
    }
    
    .admin-panel-container h3 {
        font-size: 1.3rem;
    }
}

.admin-panel-container h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.admin-panel-container h3 {
    font-size: 1.6rem;
    margin-bottom: 25px;
}

.admin-panel-container h2::after,
.admin-panel-container h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-blue), var(--light-blue));
    border-radius: 2px;
}

/* Форма добавления пользователя */
.add-user-form {
    background: rgba(160, 193, 232, 0.1);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 1px dashed rgba(58, 123, 213, 0.3);
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .add-user-form {
        padding: 20px;
    }
}

.add-user-form .form-group {
    max-width: 500px;
    margin-left: 0;
    margin-right: auto;
    margin-bottom: 20px;
}

.add-user-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-gray);
    font-size: 15px;
}

.add-user-form input,
.add-user-form select {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.8);
    font-family: 'Open Sans', sans-serif;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .add-user-form input,
    .add-user-form select {
        max-width: 100%;
    }
}

.add-user-form input:focus,
.add-user-form select:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.2);
    background-color: white;
}

.add-user-form .btn {
    background: linear-gradient(to right, var(--primary-blue), var(--primary-blue2));
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(58, 123, 213, 0.3);
    width: auto;
    display: inline-block;
    max-width: 200px;
}

@media (max-width: 768px) {
    .add-user-form .btn {
        max-width: 100%;
        width: 100%;
    }
}

.add-user-form .btn:hover {
    background: linear-gradient(to right, var(--primary-blue2), var(--dark-blue));
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(58, 123, 213, 0.4);
}

.users-table-container {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .users-table-container {
        padding: 20px;
        overflow-x: auto;
    }
}

.table-responsive {
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.table {
    width: 100%;
    margin-bottom: 0;
    color: var(--dark-gray);
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
}

.table th {
    background-color: #3a7bd5 !important;
    background-image: none !important;
    color: white;
    font-weight: 500;
    padding: 16px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border: none;
}

.table td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(160, 193, 232, 0.05);
}

/* ИСПРАВЛЕНИЕ: edit_user.php - добавляем фон */
.edit-user-card {
    background: var(--white);
    padding: 35px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 768px) {
    .edit-user-card {
        padding: 25px;
        margin: 20px;
    }
}

.edit-user-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.edit-user-card h2 {
    color: var(--dark-blue);
    margin-top: 0;
    margin-bottom: 30px;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
    font-size: 2rem;
}

@media (max-width: 768px) {
    .edit-user-card h2 {
        font-size: 1.5rem;
    }
}

.edit-user-card h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-blue), var(--light-blue));
    border-radius: 2px;
}

.edit-user-card .form-group {
    margin-bottom: 25px;
}

.edit-user-card label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-gray);
    font-size: 15px;
}

.edit-user-card input,
.edit-user-card select {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.8);
    font-family: 'Open Sans', sans-serif;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .edit-user-card input,
    .edit-user-card select {
        max-width: 100%;
    }
}

.edit-user-card input:focus,
.edit-user-card select:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.2);
    background-color: white;
}

.edit-user-card .action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: flex-start;
}

@media (max-width: 768px) {
    .edit-user-card .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .edit-user-card .action-buttons .btn {
        width: 100%;
    }
}

/* Стили для student_profile.php */
.student-avatar-section {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.student-avatar-section .avatar-container {
    width: 120px;
    height: 120px;
}

.avatar-info {
    text-align: center;
}

.avatar-info h4 {
    font-size: 1.4rem;
    margin: 0 0 8px 0;
}

@media (max-width: 768px) {
    .student-avatar-section {
        padding: 20px;
    }
    
    .avatar-info h4 {
        font-size: 1.2rem;
    }
}

.personal-info, .unions-section, .add-portfolio-section, .portfolio-section {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    .personal-info, .unions-section, .add-portfolio-section, .portfolio-section {
        padding: 20px;
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

.section-header h3 {
    font-size: 1.5rem;
    margin: 0;
}

@media (max-width: 768px) {
    .section-header h3 {
        font-size: 1.3rem;
    }
}

/* Компактная форма для портфолио */
.portfolio-form.compact-form {
    display: grid;
    gap: 20px;
    padding: 25px;
    max-width: 800px;
}

@media (max-width: 768px) {
    .portfolio-form.compact-form {
        padding: 0;
    }
}

.portfolio-form .form-group {
    max-width: 600px;
    margin: 0 auto 0 0;
}

.portfolio-form input[type="text"],
.portfolio-form textarea {
    width: 100%;
    max-width: 500px;
    padding: 12px 16px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .portfolio-form input[type="text"],
    .portfolio-form textarea {
        max-width: 100%;
    }
}

.portfolio-form input[type="text"]:focus,
.portfolio-form textarea:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.2);
}

.portfolio-form input[type="file"] {
    max-width: 500px;
    padding: 15px;
    background: white;
    border: 2px dashed var(--medium-gray);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .portfolio-form input[type="file"] {
        max-width: 100%;
        padding: 12px;
    }
}

.portfolio-form input[type="file"]:hover {
    background: #f8f9ff;
    border-color: var(--primary-blue);
    border-style: solid;
}

.portfolio-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .portfolio-actions {
        flex-direction: column;
    }
    
    .portfolio-actions .btn-sm {
        width: 100%;
        min-width: auto;
        max-width: 100%;
    }
}

.portfolio-actions .btn-sm {
    min-width: 120px;
    white-space: nowrap;
}

.portfolio-actions .btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 100px;
    max-width: 150px;
}

@media (max-width: 768px) {
    .portfolio-actions .btn-danger {
        max-width: 100%;
    }
}

.portfolio-actions .btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    cursor: pointer;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    animation: zoom 0.3s;
    border-radius: var(--border-radius-sm);
}

/* Стили для полей ввода даты */
input[type="date"] {
    padding: 10px 14px;
    border: 2px solid #e0e5ec;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
    background-color: #ffffff;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 140px;
}

@media (max-width: 768px) {
    input[type="date"] {
        min-width: 120px;
        padding: 8px 10px;
        font-size: 13px;
    }
}

input[type="date"]:hover {
    border-color: #a0c1e8;
}

input[type="date"]:focus {
    border-color: #3a7bd5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.2);
    background-color: #fff;
}

/* Стиль для календаря (выпадающего) */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    background-color: #e8f4f8;
}

/* Для Firefox */
input[type="date"]::-moz-calendar-picker-indicator {
    cursor: pointer;
}

/* Стиль для disabled состояния */
input[type="date"]:disabled {
    background-color: #f5f7fa;
    border-color: #e0e5ec;
    color: #6c757d;
    cursor: not-allowed;
}

@keyframes zoom {
    from {transform: scale(0.5);}
    to {transform: scale(1);}
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: #bbb;
    background: rgba(0,0,0,0.7);
}

/* Уведомления */
.alert {
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    box-shadow: var(--shadow);
    font-family: 'Open Sans', sans-serif;
    animation: slideIn 0.3s ease-out;
    font-size: 16px;
}

@media (max-width: 768px) {
    .alert {
        padding: 12px 15px;
        font-size: 14px;
        margin-bottom: 20px;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Футер - уменьшен */
.site-footer {
    background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
    color: var(--white);
    padding: 20px 0;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 15px 0;
        margin-top: 30px;
    }
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.copyright {
    font-size: 15px;
    opacity: 0.9;
    margin: 0;
}

@media (max-width: 768px) {
    .copyright {
        font-size: 13px;
    }
    
    .department {
        font-size: 12px;
    }
}

.department {
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
    font-style: italic;
}

/* Дополнительные адаптивные стили */
@media (max-width: 768px) {
    .current-union-info {
        font-size: 14px;
        padding: 8px !important;
    }
    
    .current-union-info i {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
        padding: 15px;
    }
    
    .current-union-info {
        font-size: 13px;
    }
    
    .search-help-content {
        font-size: 13px;
        padding: 12px;
    }
    
    .search-help-content ul {
        margin-left: 15px;
    }
}

/* Стили для печати */
@media print {
    header, footer, .table-controls, .action-buttons, .file-upload-section,
    .btn, .burger-menu, nav, .search-section, .search-help {
        display: none !important;
    }
    
    .table-container {
        box-shadow: none !important;
        border: 1px solid #000;
        padding: 0;
        margin: 0;
    }
    
    #achievements-table th,
    #attendance-table th,
    #lessons-table th,
    #events-table th,
    #students-table th,
    #safety-table th,
    #annual-report-table th {
        background: #f0f0f0 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Скрываем кнопки и элементы управления при печати */
    .date-header-input,
    input[type="date"], 
    input[type="text"]:not(.print-field),
    select, textarea, .student-select, .student-name-custom, 
    .attendance-mark, .btn-add, .btn-remove {
        display: none !important;
    }
    
    /* Показываем текстовое содержимое вместо полей ввода */
    .table-container table {
        border-collapse: collapse;
        width: 100%;
        page-break-inside: avoid;
    }
    
    .table-container th, .table-container td {
        border: 1px solid #000 !important;
        padding: 8px !important;
        text-align: left;
    }
    
    /* Добавляем столбец для подписи в таблице занятий при печати */
    #lessons-table th:last-child::after {
        content: "Подпись руководителя";
        display: block;
    }
    
    #lessons-table td:last-child::after {
        content: "_________________________";
        display: block;
        text-align: center;
        font-family: monospace;
    }
    
    /* Для таблицы инструктажа добавляем столбец подписи */
    #safety-table th:last-child::after {
        content: "Подпись проводившего инструктаж";
        display: block;
    }
    
    #safety-table td:last-child::after {
        content: "_________________________";
        display: block;
        text-align: center;
        font-family: monospace;
    }
    
    /* Убираем лишние границы для ячеек, которые были скрыты */
    .attendance-cell input[type="checkbox"],
    .attendance-mark {
        display: none !important;
    }
    
    /* Показываем отметки о посещаемости в виде текста */
    .attendance-cell {
        position: relative;
        min-width: 40px;
        text-align: center;
    }
    
    /* Убираем фоновые цвета для экономии тонера */
    .table-container th {
        background: #f0f0f0 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Разрывы страниц для таблиц */
    .table-container {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
}