/* Основные стили для всего документа */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a237e 0%, #4a148c 25%, #880e4f 50%, #c2185b 75%, #0097a7 100%);
    background-attachment: fixed;
    color: #333;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Верхняя темная полоса */
.top-bar {
    background-color: #1a237e;
    color: white;
    padding: 8px 30px;
    font-size: 14px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

/* Шапка сайта */
.site-header {
    background-color: #ffffff;
    border-bottom: none;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.header-left {
    flex: 0 0 auto;
}

.header-logo {
    height: 50px;
    width: auto;
}

.header-center {
    flex: 1;
    text-align: center;
}

.header-center h1 {
    margin: 0;
    color: #1a237e;
    font-size: 26px;
    font-weight: 600;
}

.header-right {
    flex: 0 0 auto;
}

/* Языковая панель */
.lang-switcher {
    display: flex;
    gap: 5px;
    background-color: #e3f2fd;
    padding: 5px;
    border-radius: 20px;
}

.lang-btn {
    display: inline-block;
    padding: 6px 14px;
    background-color: transparent;
    color: #1a237e;
    text-decoration: none;
    border-radius: 15px;
    font-weight: 600;
    font-size: 13px;
    border: none;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background-color: #bbdefb;
}

.lang-btn.active {
    background-color: #1a237e;
    color: white;
}

/* Контейнер основного содержимого */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Контейнер формы */
.form-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: space-between;
}

.form-row-single {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1a237e;
    white-space: nowrap;
    margin: 0;
}

.select-inline {
    width: auto;
    min-width: 150px;
}

/* Screen reader only (скрытый label для доступности) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Заголовки */
h2 {
    color: #ffffff;
    margin: 30px 20px 20px 20px;
    font-size: 24px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Стили для формы */
form {
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 12px;
    padding: 25px;
    margin: 0 20px 20px 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

form div {
    margin-bottom: 0;
}

.checkbox-inline {
    margin-bottom: 0;
}

input[type="text"] {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
    transition: all 0.3s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: #1a237e;
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Контейнер для кнопок */
.button-container {
    display: flex;
    gap: 10px;
}

/* Кнопка сброса */
.reset-button {
    padding: 12px 28px;
    background-color: #ffffff;
    color: #1a237e;
    border: 2px solid #1a237e;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reset-button:hover {
    background-color: #1a237e;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Кнопки submit */
button[type="submit"] {
    padding: 12px 28px;
    background-color: #66BB6A;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button[type="submit"]:hover {
    background-color: #57AB5A;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Контейнер для таблицы с горизонтальной прокруткой */
.table-wrapper {
    margin: 20px 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Стили для таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

th, td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background-color: #1a237e;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

tr:hover {
    background-color: rgba(26, 35, 126, 0.05);
}

tr:last-child td {
    border-bottom: none;
}

/* Стили для элемента select */
select,
.select-inline {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
    background-color: #ffffff;
    color: #333;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><polygon points="0,0 12,0 6,6" fill="%231a237e"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:focus,
.select-inline:focus {
    outline: none;
    border-color: #1a237e;
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

/* Убираем стандартную стрелку в IE */
select::-ms-expand {
    display: none;
}

/* Стили для пагинации */
p {
    color: #ffffff;
    font-size: 16px;
    margin: 20px 20px;
}

p a {
    color: #ffffff;
    text-decoration: none;
    padding: 6px 12px;
    margin: 0 3px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

p a:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

p b {
    padding: 6px 12px;
    margin: 0 3px;
    border-radius: 6px;
    background-color: #66BB6A;
    color: white;
}

/* ========================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ======================================== */

/* Планшеты и маленькие ноутбуки (до 1024px) */
@media (max-width: 1024px) {
    .site-header {
        padding: 12px 20px;
    }

    form {
        margin: 0 15px 15px 15px;
        padding: 20px;
    }

    table {
        width: calc(100% - 30px);
        margin: 15px 15px;
    }

    h2, p {
        margin: 20px 15px;
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    /* Шапка */
    .site-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .header-left,
    .header-center,
    .header-right {
        width: 100%;
        text-align: center;
    }

    .header-center h1 {
        font-size: 22px;
    }

    .header-logo {
        height: 40px;
    }

    /* Форма - элементы в столбик */
    .form-row-single {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .search-input {
        width: 100%;
        min-width: 100%;
    }

    .checkbox-inline {
        justify-content: flex-start;
    }

    .select-inline {
        width: 100%;
        min-width: 100%;
    }

    button[type="submit"],
    .reset-button {
        width: 100%;
        padding: 14px 20px;
    }

    /* Форма */
    form {
        margin: 0 10px 15px 10px;
        padding: 15px;
    }

    /* Таблица - горизонтальная прокрутка */
    .table-wrapper {
        margin: 10px 10px;
    }

    table {
        width: 100%;
        min-width: 600px;
        margin: 0;
        font-size: 13px;
    }

    th, td {
        padding: 10px 8px;
        font-size: 13px;
    }

    th {
        font-size: 11px;
    }

    /* Заголовки */
    h2 {
        margin: 20px 10px 15px 10px;
        font-size: 20px;
    }

    /* Пагинация */
    p {
        margin: 15px 10px;
        font-size: 14px;
    }

    p a, p b {
        padding: 5px 10px;
        font-size: 14px;
    }

    /* Языковая панель */
    .lang-switcher {
        justify-content: center;
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    .header-center h1 {
        font-size: 18px;
    }

    .header-logo {
        height: 35px;
    }

    form {
        margin: 0 5px 10px 5px;
        padding: 12px;
    }

    button[type="submit"],
    .reset-button {
        padding: 12px 16px;
        font-size: 14px;
    }

    .table-wrapper {
        margin: 5px 5px;
    }

    table {
        min-width: 500px;
        font-size: 12px;
    }

    th, td {
        padding: 8px 6px;
        font-size: 12px;
    }

    th {
        font-size: 10px;
    }

    h2 {
        font-size: 18px;
        margin: 15px 5px 12px 5px;
    }

    .lang-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
}
