/* static/css/styles.css */

/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f6f8;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Навигационная панель */
nav {
    width: 100%;
    background-color: #41807c;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    font-weight: bold;
    font-size: 16px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ecf0f1;
}

/* Основной контент */
main {
    max-width: 1200px;
    width: 90%;
    margin: 20px auto;
    padding: 30px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

h1, h2 {
    color: #41807c; /* Основной цвет для заголовков */
    font-size: 2rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

form label {
    font-weight: bold;
    color: #41807c;
}

form input[type="text"],
form textarea,
form select {
    width: 100%;
    padding: 10px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

form input[type="text"]:focus,
form textarea:focus,
form select:focus {
    border-color: #41807c;
    outline: none;
}

form button {
    padding: 12px;
    background-color: #41807c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: #3a7370;
}

label {
    font-weight: bold;
    font-size: 1rem;
    color: #41807c; /* Основной цвет для меток */
    text-align: left;
    width: 100%;
}

input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    border-color: #41807c; /* Основной цвет для фокуса */
    outline: none;
}

button {
    padding: 12px 20px;
    background-color: #2c3e50; /* Акцентный цвет для кнопок */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #34495e; /* Темный акцент при наведении */
}

.btn-view.disabled {
    pointer-events: none; /* Отключаем клик */
    color: #aaa; /* Серый цвет текста */
    text-decoration: none; /* Убираем подчеркивание */
    cursor: not-allowed; /* Меняем курсор */
}

/* Стили для полей редактирования протоколов */

#sample-protocols-form {
    margin-top: 20px;
}

#sample-protocols-form input[type="text"] {
    border: 2px solid #ff7f50; /* Оранжевая рамка */
    padding: 5px;
    border-radius: 5px;
}

/* Плитки для выбора объектов */
.radio-group, .checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    width: 100%;
}

.radio-tile, .checkbox-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: #ecf0f1;
    border: 2px solid #bdc3c7;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 1rem;
}

/* Подсветка при наведении */
.radio-tile:hover, .checkbox-tile:hover {
    background-color: #dfe6e9;
    border-color: #41807c;
}

/* Подсветка выбранного элемента */
.radio-tile.selected, .checkbox-tile.selected {
    background-color: #41807c;
    color: white;
    border-color: #41807c;
}

/* Адаптивность */
@media (max-width: 768px) {
    h1, h2 {
        font-size: 1.5rem;
    }

    button {
        width: 100%;
    }
}

/* Стартовая страница */
body.login-page {
    background-color: #f4f6f8;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Arial', sans-serif;
}

.login-container {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-container h1 {
    color: #41807c;
    font-size: 2rem;
    margin-bottom: 10px;
}

.login-container h1 span {
    color: #2c3e50; /* Контрастный цвет для первых букв */
    font-weight: bold;
}

.login-container p {
    color: #41807c;
    font-size: 1rem;
    margin-bottom: 20px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: #41807c;
    outline: none;
}

.login-form button {
    padding: 12px;
    background-color: #41807c;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-form button:hover {
    background-color: #3a7370;
}

.intro-text {
    margin-bottom: 30px; /* Добавляем отступ между текстом и формой */
    text-align: center;
}

.intro-text h1 {
    color: #41807c;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.intro-text h1 span {
    color: #2c3e50; /* Контрастный цвет для первых букв */
    font-weight: bold;
}

.intro-text p {
    color: #555;
    font-size: 1rem;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Страница со списком актов */
/* Страница со списком актов */
.list-page {
    background-color: #f4f6f8;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    font-family: 'Arial', sans-serif;
}

.container {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    width: 100%;
}

h1 {
    color: #41807c;
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

/* static/css/styles.css */

.container {
    max-width: 1600px; /* Увеличиваем максимальную ширину контейнера */
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.act-table {
    width: 100%;
    table-layout: fixed; /* Фиксированная ширина столбцов */
    margin-bottom: 20px;
}

.act-table th, .act-table td {
    padding: 12px;
    text-align: left;
    border-right: 1px solid #ddd; /* Границы между столбцами */
    word-wrap: break-word; /* Перенос длинных слов */
}

.act-table th:last-child,
.act-table td:last-child {
    border-right: none; /* Убираем границу для последнего столбца */
}

.act-table th {
    background-color: #41807c;
    color: white;
    font-weight: bold;
    min-width: 200px; /* Увеличиваем минимальную ширину столбцов */
}

.act-table th:first-child {
    min-width: 300px; /* Увеличенная ширина для первого столбца */
}

@media (max-width: 1200px) {
    main {
        max-width: 100%; /* Полная ширина на маленьких экранах */
        padding: 20px; /* Уменьшаем отступы */
    }

    .act-table th, .act-table td {
        font-size: 0.9rem; /* Уменьшаем размер шрифта */
        padding: 8px; /* Уменьшаем отступы */
    }
}

@media (max-width: 768px) {
    .act-table th, .act-table td {
        font-size: 0.8rem; /* Еще больше уменьшаем размер шрифта */
        padding: 6px; /* Еще меньше отступов */
    }
}

.header-title {
    font-weight: bold;
    font-size: 1rem; /* Убедимся, что размер шрифта одинаковый */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.act-table tr:hover {
    background-color: #f9f9f9;
}

.search-form, .filter-form {
    display: flex;
    gap: 10px;
}

.search-form input, .filter-form select {
    padding: 8px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 1rem;
}

.search-form button {
    padding: 8px 12px;
    background-color: #41807c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

.search-form button:hover {
    background-color: #3a7370;
}

.btn-edit, .btn-view {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-right: 10px;
}

.btn-edit {
    background-color: #2c3e50;
    color: white;
}

.btn-edit:hover {
    background-color: #34495e;
}

.btn-view {
    background-color: #41807c;
    color: white;
}

.btn-view:hover {
    background-color: #3a7370;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 1rem;
}

.pagination a {
    color: #41807c;
    text-decoration: none;
    font-weight: bold;
}

.pagination a:hover {
    text-decoration: underline;
}

.header-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 10px 0; /* Увеличиваем внутренние отступы */
}

.header-title {
    font-weight: bold;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-controls {
    display: flex;
    gap: 5px;
    align-items: center;
    width: 100%;
}

.filter-input, .filter-select, .filter-input[type="date"] {
    height: 40px; /* Фиксированная высота */
    padding: 8px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.sort-button {
    background-color: #41807c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 3px 6px;
    cursor: pointer;
    font-size: 0.8rem;
}

.sort-button:hover {
    background-color: #3a7370;
}

/* Стили для горизонтального тумблера */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #41807c;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

