body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #F5F7FA 0%, #E8EDE8 100%);
    color: #333333;
    line-height: 1.5; 
    font-size: 14px;
}

/* Применяем шрифт ко всем элементам внутри body */
body *, 
body *::before, 
body *::after {
    box-sizing: border-box;   /* Чтобы отступы не ломали ширину */
}

input,
textarea,
select,
button,
label {
    font-family: inherit;     /* Наследуют шрифт от body */
    font-size: inherit;
}

/* СТИЛИ ДЛЯ БОКОВОГО МЕНЮ */
/* Кнопка открытия/закрытия бокового меню */
.menu-btn {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 1001;
    font-size: 20px;
    padding: 8px 12px;
    cursor: pointer;
    background: #fff;                    /* Белый фон для кнопки */
    color: #2C2C2C;                      /* Темно-серый текст */
    border: 1px solid #e0e0e0;           /* Легкая рамка */
    border-radius: 4px;                   /* Скругление */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Легкая тень */
}

/* Основной контейнер бокового меню */
.sidebar {
    position: fixed;
    top: 0;
    right: -280px;                        /* Скрыто за правым краем */
    width: 280px;
    height: 100%;
    background-color: #FFFFFF;             /* Белый фон */
    color: #2C2C2C;                        /* Темно-серый текст */
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    z-index: 1000;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1); /* Тень справа для отделения */
}

/* Активное состояние сайдбара (открыт) */
.sidebar.active {
    right: 0;
}

/* Заголовок сайдбара */
.sidebar-header {
    padding: 15px 20px;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 1px solid #e0e0e0;
    color: #2C2C2C;
    min-height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo-img {
    display: block;
    max-width: 100%;
    max-height: 45px;
    object-fit: contain;
}

/* Контейнер с пунктами меню */
.sidebar-menu {
    flex: 1;
    padding: 20px 0;                       /* Убираем боковые отступы */
}

/* Ссылки в меню */
.sidebar-menu a {
    display: block;
    color: #2C2C2C;                        /* Темно-серый текст */
    text-decoration: none;
    margin-bottom: 0;                       /* Убираем отступ между пунктами */
    padding: 12px 20px;                     /* Внутренние отступы для области клика */
    border-left: 4px solid transparent;      /* Прозрачная левая граница (запас для активного пункта) */
    transition: all 0.2s ease;              /* Плавные переходы */
}

/* Эффект при наведении на ссылки меню */
.sidebar-menu a:hover {
    background-color: #F5F5F5;              /* Светло-серый фон при наведении */
    border-left-color: #CCCCCC;              /* Светло-серая левая граница при наведении */
}

/* Активный пункт меню */
.sidebar-menu a.active {
    background-color: #F0F5E8;               /* Очень светлый зеленый фон */
    color: #6B8E4B;                          /* Зеленый текст */
    border-left: 4px solid #6B8E4B;           /* Зеленая левая граница */
    font-weight: 500;                         /* Немного жирнее обычного */
}


/* Подвал сайдбара (для кнопки выхода) */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;           /* Светло-серая разделительная линия */
}




/* ОСНОВНОЙ КОНТЕНТ */

/* Контейнер основного содержимого */
.content {
    padding: 40px;
    position: relative;
    z-index: 1;
}



/* СТИЛИ ДЛЯ ТАБЛИЦ */



/* Базовая таблица */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    table-layout: fixed;
    margin-bottom: 24px;
    font-family: inherit;
    font-size: 14px;
}

/* Ячейки таблицы (заголовки и обычные) */
th, td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
    width: 20%;
    font-family: inherit;
}
    
    
/* Заголовки таблицы */
th {
    background-color: #f5f5f5;
    font-weight: 600;
    font-family: inherit;
}

/* Строки таблицы - важный костыль для выпадающих меню */
tr {
    overflow: visible !important;
}

/* Ячейки таблицы - тоже для корректного отображения выпадающих меню */
td {
    overflow: visible !important;
}




/* Эффект при наведении на строку таблицы */
tr:hover {
    background-color: #E8EDE8;
}


th:first-child, 
td:first-child {
    width: 10px;          /* Фиксированная ширина */
    min-width: 10px;
    max-width: 10px;
    text-align: center;   /* Центрируем номер */
}

th:not(:first-child),
td:not(:first-child) {
    width: calc((100% - 50px) / 4); /* Если всего 5 колонок */
}

.table-header {
    background: linear-gradient(135deg, #F0F5E8 0%, #E8EDE0 100%);
    /* или просто: background: #F5F7FA; */
    border-bottom: 2px solid #E0E5D8;
}

.table-header th {
    color: #556B2F;  /* Темно-зеленый из логотипа */
    font-weight: 600;
    padding: 14px 16px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* Строки таблицы */
.table-row {
    background: #FFFFFF;
    border-bottom: 1px solid #F0F0F0;
    transition: all 0.2s ease;
}

.table-row:hover {
    background: #FAFBF9;  /* Очень светлый зеленый */
    box-shadow: inset 3px 0 0 #6B8E4B;  /* Зеленый индикатор слева */
}

.table-row td {
    padding: 16px;
    color: #2C2C2C;
}



/* СТИЛИ ДЛЯ РАЗДЕЛОВ (ЗАГОЛОВКИ И БЕЙДЖИ) */
.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #2C2C2C;
    margin: 32px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 3px solid #6B8E4B;
    display: flex;
    align-items: center;
    gap: 12px;
}


/* Бейдж с количеством */
.section-badge {
    background: #6B8E4B;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}









/* СТИЛИ ДЛЯ ВЫПАДАЮЩИХ МЕНЮ В ТАБЛИЦЕ */

/* Ячейка с действиями (содержит кнопку и выпадающее меню) */
.actions-cell {
    position: relative;
}

/* Кнопка открытия меню действий */
.action-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
}

/* Выпадающее меню с действиями */
.action-menu {
    display: none;
    position: absolute;
    top: 100%;  /* Появляется прямо под кнопкой */
    left: 0;
    background-color: white;
    min-width: 250px;  /* Достаточно широкая для длинных названий */
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border-radius: 6px;
    z-index: 9999;  /* Очень высокий z-index, чтобы быть поверх всего */
    border: 1px solid #e0e0e0;
}

/* Ссылки внутри выпадающего меню */
.action-menu a {
     display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;  /* Текст в одну строку */
}

/* Убираем рамку у последнего пункта меню */
.action-menu a:last-child {
    border-bottom: none;
}

/* Показываем меню при добавлении класса show */
.action-menu.show {
    display: block;
}

/* Эффект при наведении на пункт меню */
.action-menu a:hover {
    background: #f5f5f5;
}




/* Кнопка добавления (зеленая) */
.add-btn {
    background: #6B8E4B;
    color: white;
    border: none;
    padding: 3px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(107, 142, 75, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;  /* Для ссылок */
    position: relative;
    top: -4px; 
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 142, 75, 0.4);
    background: linear-gradient(135deg, #7BA05B 0%, #6B8E4B 100%);
}

.add-btn:active {
    transform: translateY(0);
}

/* Иконка плюсика */
.add-btn::before {
    content: "+";
    font-size: 18px;
    font-weight: 700;
}

.add-btn-outline {
    background: white;
    color: #6B8E4B;
    border: 2px solid #6B8E4B;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.add-btn-outline:hover {
    background: #6B8E4B;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 142, 75, 0.3);
}

/* Стили для кнопок входа */
.in-btn {
    background: #6B8E4B;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(107, 142, 75, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;  /* Для ссылок */
    position: relative;
    top: -4px; 
}

.in-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 142, 75, 0.4);
    background: linear-gradient(135deg, #7BA05B 0%, #6B8E4B 100%);
}

.in-btn:active {
    transform: translateY(0);
}



.in-btn-outline {
    background: white;
    color: #6B8E4B;
    border: 2px solid #6B8E4B;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.in-btn-outline:hover {
    background: #6B8E4B;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 142, 75, 0.3);
}







/* Ссылка на документ */
.doc-link {
    text-decoration: none;
    color: #2c7be5;
    font-weight: 500;
}

/* Эффект при наведении на ссылку документа */
.doc-link:hover {
    text-decoration: underline;
}

/* Кликабельная строка таблицы */
.clickable-row:hover {
    background-color: #f2f2f2;
}

/* СТИЛИ ДЛЯ ПРОФИЛЯ */

/* Карточка профиля */

.profile-card {
    width: 300px;  /* Фиксированная ширина */
    max-width: 800px; /* Но не больше 800px */
    padding: 50px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    flex-direction: column;      /* Элементы друг под другом */
    align-items: center;         /* Центрирование по горизонтали */
    justify-content: center;     /* Центрирование по вертикали */
    text-align: center;          /* Центрирование текста */
    display: flex;

}

/* Аватар (изображение) */
.avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
}

/* Заглушка для аватара (если нет фото) */
.avatar-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: #222;
    color: #fff;
    font-size: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

/* Маленький аватар в таблице */
.avatar-small {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    vertical-align: middle;
}

table img.avatar-small {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    display: inline-block;
}

.avatar-small-placeholder {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: #6B8E4B;
    color: #fff;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    vertical-align: middle;
}

/* Ссылки в подвале */
.footer-link {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #2C2C2C;                          /* Темно-серый текст */
    border-radius: 4px;
    transition: background-color 0.3s;
    width: 100%;
    box-sizing: border-box;
    border-left: 4px solid transparent;       /* Прозрачная левая граница */
}

/* Эффект при наведении на ссылки в подвале */
.footer-link:hover {
    background-color: #F5F5F5;                /* Светло-серый фон */
}

/* Активная ссылка в подвале (если нужна) */
.footer-link.active {
    background-color: #F0F5E8;                 /* Светло-зеленый фон */
    color: #6B8E4B;                            /* Зеленый текст */
    border-left: 4px solid #6B8E4B;             /* Зеленая левая граница */
}


/* Стили для кнопки выхода */
/* Форма выхода (обертка для кнопки) */
.logout-form {
    display: block;
    width: 100%;
}


/* Кнопка выхода (стилизована под ссылку) */
.logout-btn {
    border: none;
    background: none;
    font-size: inherit;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    width: 100%;
    padding: 10px 15px;                        /* Внутренние отступы */
    color: #2C2C2C;                             /* Темно-серый текст */
    border-radius: 4px;
    transition: background-color 0.3s;
    border-left: 4px solid transparent;         /* Прозрачная левая граница */
}

/* Эффект при наведении на кнопку выхода */
.logout-btn:hover {
    background-color: #F5F5F5;                  /* Светло-серый фон */
}

/* Цвет текста для выхода (зеленый только для иконки или специальной версии) */
.logout-btn.logout-green {
    color: #6B8E4B;                             /* Зеленый текст для варианта выхода */
}

/* Ссылка на профиль (зеленая) */
.profile-link {
    color: #6B8E4B;
}

/* Кнопка выхода (зеленый текст) */
.logout-btn {
    color: #6B8E4B;
}



/* СТИЛИ ДЛЯ СТРАНИЦЫ ВХОДА */

/* Контейнер страницы логина */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Карточка логина */
.login-card {
    width: 350px;
    padding: 35px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    text-align: center;
}

/* Заголовок в карточке логина */
.login-card h2 {
    margin-bottom: 25px;
}

/* Группа полей формы */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}


/* Поля ввода */
.form-group input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* Текст ошибки */
.error-text {
    color: #c0392b;
    font-size: 14px;
    margin-bottom: 15px;
}




/* Текст ссылки при наведении на активный пункт */
.sidebar-menu a.active:hover {
    background-color: #E8F0DE;                    /* Чуть более насыщенный зеленый при наведении */
    color: #5A7A3A;                               /* Чуть более темный зеленый текст */
    border-left-color: #5A7A3A;                    /* Более темная зеленая граница */
}


.btn {
    padding: 10px 20px;           /* Удобный размер для нажатия */
    font-size: 14px;              /* Читаемый текст */

    border-radius: 8px;           /* Мягкое скругление */
    border: none;                 /* Убираем стандартные границы */
    cursor: pointer;              /* Рука при наведении */
    transition: all 0.3s ease;    /* Плавная анимация */
    display: inline-flex;         /* Чтобы иконки вставали ровно */
    align-items: center;
    justify-content: center;
    gap: 8px;                     /* Отступ между иконкой и текстом */
    text-decoration: none;        /* Если вдруг это будет ссылка */
}

.edit-btn {
    background-color: #6B8E4B;    /* корпоративный зеленый */
    color: white;
    box-shadow: 0 4px 12px rgba(107, 142, 75, 0.2); /* Легкая тень */
}

.apply-btn {
    background-color: #6B8E4B;    /* корпоративный зеленый */
    color: white;
    box-shadow: 0 4px 12px rgba(107, 142, 75, 0.2); /* Легкая тень */
    font-size: 14px;              /* Читаемый текст */

    border-radius: 5px;           /* Мягкое скругление */
    border: none;                 /* Убираем стандартные границы */
    cursor: pointer;              /* Рука при наведении */
    transition: all 0.3s ease;    /* Плавная анимация */
    display: inline-flex;         /* Чтобы иконки вставали ровно */
    align-items: center;
    justify-content: center;
    gap: 8px;                     /* Отступ между иконкой и текстом */
    text-decoration: none;        /* Если вдруг это будет ссылка */
    padding: 10px 14px;

}



/* === ФОРМА ПОИСКА — ЗАКРУГЛЕНИЕ === */

/* Контейнер формы */
form[method="get"] {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* Выпадающий список (select) */
form[method="get"] select {
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 5px;           /*  Закругление */
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 150px;
}

form[method="get"] select:focus {
    outline: none;
    border-color: #6B8E4B;
    box-shadow: 0 0 3px rgba(107, 142, 75, 0.3);
}

/* Текстовое поле (input) */
form[method="get"] input[type="text"] {
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 5px;           /*  Закругление */
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: all 0.2s ease;
    min-width: 400px;
}

form[method="get"] input[type="text"]:focus {
    outline: none;
    border-color: #6B8E4B;
    box-shadow: 0 0 3px rgba(107, 142, 75, 0.3);
}



.hidden-row {
    display: none;
}

.status-block.show-all .hidden-row {
     display: table-row; }

     
.toggle-btn {
    margin-left: 10px;
    padding: 4px 10px;
    font-size: 14px;
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    color: #333;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}



.toggle-btn:hover {
        background-color: #e0e0e0; 
}


.parent-container {
    display: flex;
    flex-direction: column;
}

.profile-container {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.profile-card {
    height: auto;
    min-height: 500px;
}

.stats-card {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    flex-direction: column;
    min-height: 500px;
}

.stats-card h3 {
    margin-top: 0;
    color: #333;
}

.stats-card h4 {
    margin-bottom: 10px;
    color: #555;
}

.stats-card table {
    width: 100%;
    font-size: 14px;
}

.year-selector {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.year-btn {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

.year-btn:hover {
    background: #f5f5f5;
}

.year-btn.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.charts-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.chart-wrapper {
    flex: 1;
    min-width: 280px;
}

.chart-wrapper:first-child {
    flex: 1.3;
}

.chart-wrapper canvas {
    max-height: 250px;
}

.chart-wrapper h4 {
    text-align: center;
    margin-bottom: 10px;
}

.employee-detail {
    padding: 20px;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
}