:root {
    --primary-color: #0A1C36;
    --primary-hover: #0A1C36;
    --secondary-color: #f8fafc;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 8px;
    --input-bg: #f8fafc;
}

/* Скрываем все блоки по умолчанию */
.tab-content {
    display: none;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-top: 5px;
}

/* Показываем только активный блок */
.tab-content.active {
    display: block;
}

/* Стили для кнопок */

.tab-button {
    font-size: 1rem;
    font-family: 'Alegreya SC', serif;
    border: none;
    border-radius: var(--radius);
    background-color: #f1f5f9;   /* пример цвета */
    color: var(--primary-color);
    cursor: pointer;
    padding: 1px 2px;
    transition: background-color 0.3s;
}

.tab-button:hover {
    background-color: #e0e0e0;
}

.tab-button.active {
    background-color: #007bff;
    color: white;
}
.tabs {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 5px;
    }

body {
    font-family: 'Alegreya SC', serif;
    color: var(--text-color);
    background-color: #f1f5f9;
    line-height: 1.6;
}

.header {
    background-image: url(banner.jpg);
    color: white;
    padding: 10px 40px;
    margin-bottom: 20px;
    display: flex;
    position: relative;
    align-items: center; /* Выравнивает элементы по вертикали по центру */
    justify-content: space-between; /* Распределяет пространство между элементами */
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr) 70px; /* Создаёт три равные колонки + четвёртая 50px */
    gap: 20px; /* Расстояние между блоками */
    width: 75%; /* Контейнер занимает не всю доступную ширину */
    margin: 0 auto; /* Выравнивание по центру */
}

.form-group {
    display: flex;
    flex-direction: column;
    min-width: 0; /* Предотвращает переполнение */
}

.search{
    display: flex;
    flex-direction: column;
    min-width: 0; /* Предотвращает переполнение */
    font-size: 1rem;
    font-family: 'Alegreya SC', serif;
    padding: 5px 7px;
    border-radius: var(--radius);
    background-color: #f1f5f9;   /* пример цвета */
    cursor: pointer;
    margin-top: auto;
}

.login {
	display: flex;
	flex-direction: column;
	font-size: 1rem;
    font-family: 'Alegreya SC', serif;
    border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background-color: var(--input-bg);
    padding: 1px 2px;
}

.input {
    display: block;              /* можно оставить block или использовать width:100% */
    width: 100%;  
    font-size: 1rem;
    font-family: 'Alegreya SC', serif;
    border: none;
    border-radius: var(--radius);
    background-color: #f1f5f9;   /* пример цвета */
    color: var(--primary-color);
    cursor: pointer;
    padding: 1px 2px;
    transition: background-color 0.3s;
}

input:focus {
    outline: none;
}

.numero {
    font-family: 'Georgia', 'Times New Roman', serif;
}

.logo {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.institute-title {
    flex: 1; /* Занимает всё доступное пространство слева */
    max-width: 85%; /* Ограничиваем максимальную ширину */
	    position: relative;
    z-index: 2;
}

p {
    margin: 5px;
}

.log-title {
    float: right;                /* если нужно прижать форму к правому краю */
    max-width: 300px;            /* ограничиваем ширину */
    display: flex;               /* меняем на flex, чтобы управлять направлением */
    flex-direction: column;      /* располагаем элементы в колонку */
    gap: 7px;                   /* расстояние между элементами по вертикали */
    padding: 10px;               /* внутренние отступы формы */
}

.institute-title h1 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.institute-title p {
    font-size: 17px;
}

.form-container {
    background-color: #FAFAFA;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 10px;
}

.form-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
    text-align: center;
    margin: 1px;
}

.form-label {
    display: block;
    font-weight: 450;
    margin-bottom: 2px;
    color: var(--text-color);
}

.form-control {
    padding: 5px 7px;
    font-size: 1rem;
    font-family: 'Alegreya SC', serif;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background-color: var(--input-bg);
}

.btn {
    display: inline-block;
    font-family: 'Alegreya SC', serif;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

table {
    width: 65%;
    margin-left: auto;
    margin-right: auto;
}
 td, th {
    border: 1px solid #CCCCCC;
    border-radius: 8px;
    padding: 2px;
}

.tb1 th {
    text-align: left;
}

.status-select, .ochka-select{
    border-radius: 8px;
}

.date, .year-input, .status-select, .fio, .ochka-select, .code, .group, .comment-input{
    width: 100%; /* Поле занимает всю ширину ячейки */
    border: none; /* Убирает рамку полностью */
    font-size: 14px;
    font-family: inherit; /* Наследуем шрифт от родителя */
    background-color: #FAFAFA;
    cursor: pointer;
    box-sizing: border-box; /* Учитываем padding в общей ширине */
}

/* Стили для разных опций */
.status-not-option {
    background-color:  #FAFAFA;
    color: #856404;
}

.status-success-option {
    background-color: #d4edda;
    color: #155724;
}

.status-reject-option {
    background-color: #f8d7da;
    color: #721c24;
}

/* Стили для ячейки в зависимости от data-атрибута */
.status-cell[data-status="not_contacted"] {
    background-color: #FAFAFA;
}

.status-cell[data-status="successful"] {
    background-color: #d4edda;
}

.status-cell[data-status="rejected"] {
    background-color: #f8d7da;
}

@media (max-width: 768px) {
    .header {
        padding: 20px 0;
    }
    
    .institute-title h1 {
        font-size: 1.4rem;
    }
    
    .institute-title p {
        font-size: 0.9rem;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-container {
    animation: fadeIn 0.5s ease-out;
}

/* Кастомный селект */
.custom-select {
    position: relative;
    width: 100%;
}

.select-header {
    padding: 12px 15px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.select-header:hover {
    border-color: var(--primary-color);
}

.select-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius) var(--radius);
    z-index: 100;
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hidden-select {
    display: none;
}

.hidden-cell {
    display: none;
  }
