* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
/*    color: #000000;*/
    line-height: 1.6;
    padding: 10px;
    width: 2500px;
    margin: 0 auto;
}

.container {
    width: 100%;
    margin: 0 auto;
    max-width: 2500px;
}

/* ЗАГОЛОВОЧНАЯ ОБЛАСТЬ ============================================================================ */

header {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 20px;
}

h1 {
    color: black;
    margin-bottom: 8px;
    font-size: 28px;
}

.header-with-count {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.center-title {
    margin: 0;
}

.employee-count-badge {
    background-color: #3498db;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.employee-count-icon {
    font-size: 14px;
}

.header-info {
    width: 100%;
    margin-top: 8px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.header-info h6 {
    font-size: 14px;
    margin: 3px 0;
}

/* СЕКЦИЯ ЗАГРУЗКИ ФАЙЛА ============================================================================ */

.upload-section {
/*    padding: 0;*/
    margin-bottom: 15px;
    text-align: center;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    height: 50px;
    border-bottom: 1px solid #808080;
    flex-wrap: nowrap;
}

.file-input-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 350px;
    min-width: 300px;
    margin-right: 15px;
}

.file-input {
    width: 0;
    height: 0;
}

.file-input-label {
    padding: 8px 12px;
    margin-right: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.file-input-label:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.file-input-label:active {
    transform: translateY(0);
}

.file-name {
    display: block;
    font-size: 11px;
    color: #666;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-info {
    background-color: #e8f4fd;
    padding: 8px 12px;
    border-radius: 5px;
    text-align: center;
    margin-left: 10px;
    min-width: 250px;
}

.file-details {
    margin: 0px 15px;
    font-size: 11px;
    white-space: nowrap;
}

.btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    margin-left: 15px;
    white-space: nowrap;
}

.btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* ОСНОВНАЯ СЕКЦИЯ ОТЧЕТА - МАКЕТ ============================================================================ */

.report-section {
    margin-top: 20px;
    width: 100%;
    min-height: 500px;
}

.upper-section {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
    width: 100%;
    min-height: 440px;
}

.workload {
    width: 950px;

}

/* СЕКЦИЯ УВЕДОМЛЕНИЙ ============================================================================ */

.notification-section {
    /*margin-bottom: 20px;*/
    width: 100%;
}

.notification-block {
    border: 1px solid #eaeaea;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notification-block h3 {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eaeaea;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-icon {
    font-size: 16px;
}

.notification-content {
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-line;
    word-wrap: break-word;
}

/* ВЕРХНЯЯ ЧАСТЬ: ПРОЕКТЫ + (ТАБЕЛЬ И ЗАГРУЗКА) ============================================================================ */

/* Общие стили для всех блоков */
.block,
.block2-employees {
    background-color: white;
    padding: 12px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    height: auto;
    border-radius: 8px;
}

.block h3,
.block2-employees h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaeaea;
    font-size: 18px;
}

.absences-block {
    padding: 12px 0px;
}

/* БЛОК "ПРОЕКТЫ" (ЛЕВАЯ КОЛОНКА) */
.block-projects {
    width: 1050px;
    min-width: 600px;
    /*    max-width: 1000px;*/
    min-height: 440px;
}

/* ПРАВЫЕ БЛОКИ (ТАБЕЛЬ И ЗАГРУЗКА) */
.report_card {
    display: flex;
    flex-direction: column;
    width: 425px;
    gap: 20px;
}

.blocks-container {
    width: 100%;
}

/* НИЖНЯЯ ЧАСТЬ: БЛОК "УПРАВЛЕНИЯ" */
.lower-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 20px;
}

/* ЛЕГЕНДА ИНДИКАТОРОВ ============================================================================ */

.indicators-legend {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 12px 15px;
    margin-bottom: 15px;
    font-size: 12px;
}

.legend-header-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.legend-main-title {
    font-size: 18px;
    font-weight: bold;
    margin: 5px 0px;
}

.legend-subtitle {
    font-size: 10px;
    color: black;
    font-style: italic;
    margin: 0;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
    border: 1px solid #ddd;
}

.legend-text {
    color: #495057;
    font-size: 11px;
}

/* СТИЛИ ДЛЯ РАЗВОРАЧИВАЕМЫХ СПИСКОВ И ТАБЛИЦ ============================================================================ */

.data-item {
    overflow: hidden;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    margin-bottom: 5px;
}

.data-item:last-child {
    border-bottom: none;
}

.data-item.total {
    border-radius: 5px;
    font-weight: bold;
    margin-top: 12px;
}

.data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0px 10px;
    transition: background-color 0.2s;
}

/* Лейблы для данных */
.data-label {
    width: 150px;
}

.data-label_Total {
    width: 180px;
}

/* Значения данных */
.data-value {
    font-weight: 600;
    font-size: 17px;
    color: #2980b9;
    margin: 0 10px;
    /*    width: 50px;*/
    text-align: end;
}

/* Кнопка разворачивания */
.toggle-btn {
    background: white;
    border: none;
    border-radius: 4px;
    color: #2980b9;
    padding: 6px 12px;
    cursor: pointer;
    font-weight: bold;
    font-size: 11px;
    transition: background-color 0.3s;
    min-width: 30px;
}

.toggle-btn:hover {
    background: #f0f0f0;
}

/* Раскрываемые списки */
.employees-list {
    max-height: 0;
    overflow: hidden;
    background: white;
    padding: 0 12px;
    width: 100%;
    border-radius: 3px;
    font-size: 12px;
}

.employees-list.show {
    max-height: 3000px;
    padding: 10px;
    background: #fafafa;
}

.employee-item {
    padding: 3px 0;
    font-size: 12px;
    border-bottom: 1px dotted #eee;
}

.employee-item:last-child {
    border-bottom: none;
}

/* СТИЛИ ДЛЯ БЛОКА УПРАВЛЕНИЙ С ШКАЛАМИ ЗАГРУЗКИ ============================================================================ */

.data-itemEm {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    margin-bottom: 5px;
}

.data-itemEmList {
    overflow: hidden;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    margin-bottom: 5px;
}

.management-gauge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-grow: 1;
}

.management-gauge-percentage {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    min-width: 45px;
    text-align: right;
    margin-left: 10px;
}

.management-gauge-container {
    width: 100%;
    margin-top: 5px;
    /*display: flex;
align-items: center;*/
}

.management-gauge-track {
    width: 100%;
    height: 12px;
    background-color: #ecf0f1;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.management-gauge-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease, background-color 0.5s ease;
}

/* Адаптация существующих стилей для нового дизайна */
.data-item .management-gauge-header
{
    color: #2c3e50;
    font-size: 14px;
}

.data-item .management-gauge-header .data-value {
    color: #2c3e50;
    font-size: 14px;
    min-width: 30px;
    text-align: right;
}

/* Таблица проектов */
.table-container {
    overflow-x: auto;
    margin-top: 10px;
    max-width: 100%;
}

.projects-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: auto;
}

.projects-table th,
.projects-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #ddd;
    border-top: 1px solid #ddd;
    vertical-align: middle;
}

.row-header_count,
.table_header {
    text-align: center;
}

.projects-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    font-size: 12px;
    min-width: 80px;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
    padding: 10px 8px;
}

.projects-table .row-header {
    background-color: #f0f0f0;
    font-weight: bold;
    text-align: left;
    font-size: 12px;
    min-width: 150px;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
    padding: 10px 8px;
}

.projects-table td {
    /*    white-space: nowrap;*/
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 60px;
}

/* СТИЛИ ДЛЯ ПРОЕКТОВ ============================================================================ */

.expandable-project {
    cursor: pointer;
    background-color: #f8f9fa;
    transition: background-color 0.3s ease;
    font-size: 12px;
}

.expandable-project .toggle-icon {
    margin-left: 8px;
    font-size: 10px;
    color: #3498db;
    transition: transform 0.3s ease;
}

.expandable-project.expanded .toggle-icon {
    transform: rotate(180deg);
}

.project-details-row {
    display: none;
}

.project-details-row.show {
    display: table-row;
}

.project-details-cell {
    padding: 0 !important;
    border: none !important;
}

.project-details {
    padding: 15px;
    font-size: 12px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.management-projects {
    margin-bottom: 15px;
    width: 100%;
}

.management-title {
    font-weight: bold;
    color: black;
    margin: 15px 0px 8px;
    padding-bottom: 5px;
    border-bottom: 2px solid #3498db;
    font-size: 14px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    text-align: start;
}

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px dotted #ddd;
    width: 100%;
    flex-wrap: nowrap;
}

.project-item:last-child {
    border-bottom: none;
}

.project-id {
    color: black;
    flex-shrink: 0;
    flex: 1;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    font-size: 12px;
    text-align: center;
}

.project-name td {
    color: black;
    flex-grow: 1;
    margin-left: 15px;
    font-size: 12px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    max-width: none;
    line-height: 1.4;
    text-align: left;
}

.project-indicator-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    min-width: 80px;
}

.project-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
}

.project-percentage {
    font-size: 12px;
    color: #333;
    font-weight: bold;
    min-width: 40px;
    text-align: right;
}

.management-projects {
    margin-top: 10px;
}

.section-title {
    font-size: 14px;
    font-weight: bold;
    text-align: right;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.project-percentage {
    font-weight: bold;
    font-size: 14px;
    min-width: 45px;
    text-align: right;
    color: #2c3e50;
}

/* ДИАГРАММА ЗАГРУЗКИ ============================================================================ */

.chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.chart-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 15px;
}

.chart-canvas,
#day-chart,
#week-chart,
#month-chart,
#next-month-chart {
    width: 100% !important;
    height: 100% !important;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: filter 0.3s ease;
}

.chart-canvas {
    width: 100%;
    height: 100%;
}

.chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.chart-percentage {
    font-size: 22px;
    font-weight: bold;
    color: black;
}

.chart-label {
    font-size: 13px;
    color: black;
    margin-top: 5px;
}

.chart-legend {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    font-size: 12px;
}

.management-load-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 8px;
}

.management-gauge-section {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 5px;
}

.management-hours-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 12px;
    color: #7f8c8d;
    padding-right: 5px;
    margin-top: 2px;
}

.management-hours-label {
    margin-right: 5px;
    font-weight: 500;
}

.management-hours-value {
    font-weight: 600;
    color: #2c3e50;
    /*    background: #f8f9fa;*/
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

/* Для административного управления скрываем часы */
.data-itemEm.administrative .management-hours-section {
    display: none;
}

/* СТАТУСНЫЕ СООБЩЕНИЯ ============================================================================ */

.status-message {
    padding: 5px 12px;
    border-radius: 0;
    margin: 12px 0;
    text-align: center;
    font-size: 12px;
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 15px;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 15px;
}

.loading {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    border-radius: 15px;
}

/* НОВЫЕ ДИАГРАММЫ ============================================================================ */

.charts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.chart-card {
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #ecf0f1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-title {
    font-size: 14px;
    margin: 0 0 10px 0;
    text-align: center;
    font-weight: 600;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chart-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.chart-hours {
    margin-top: 15px;
    font-size: 14px;
    color: #7f8c8d;
    text-align: center;
    font-weight: 500;
}

/* ТАБЛИЦА ПРОЕКТОВ ============================================================================ */

.projects-detailed-list {
    margin-top: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.projects-detailed-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.projects-detailed-table th {
    background: #f8f9fa;
    padding: 10px 8px;
    /*    text-align: left;*/
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    font-size: 12px;
}

.projects-detailed-table {
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    text-align: left;
}

.projects-detailed-table tr:hover {
    background-color: #f8f9fa;
}

.project-date {
    font-size: 12px;
    white-space: nowrap;
    text-align: center;
}

.project-indicator-cell {
    text-align: center;
    white-space: nowrap;
}

.project-indicator-text {
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

/* Стили для индикатора по часам */
.project-hours-indicator-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-direction: row;
    justify-content: flex-end;
}

.project-hours-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.project-hours-value {
    font-size: 12px;
    /*    color: #2c3e50;*/
    font-weight: 500;
}


/* АДАПТИВНЫЕ СТИЛИ ============================================================================ */

@media (max-width: 768px) {
    .management-hours-section {
        font-size: 11px;
    }

    .management-hours-value {
        font-size: 10px;
        padding: 2px 6px;
    }
}

@media (max-width: 1200px) {
    .projects-detailed-table {
        font-size: 12px;
    }

    .projects-detailed-table th,
    .projects-detailed-table td {
        padding: 6px 4px;
    }
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1400px) {
    body {
        min-width: 1200px;
    }

    .block-projects {
        width: calc(55% - 10px);
        min-width: 550px;
    }

    .report_card {
        width: calc(45% - 10px);
        min-width: 350px;
    }
}

@media (max-width: 1200px) {
    body {
        min-width: 1000px;
    }

    .upper-section {
        flex-direction: column;
    }

    .block-projects,
    .report_card {
        width: 100%;
        max-width: 100%;
        min-width: auto;
    }

    .report_card {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 20px;
    }

    .project-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-name {
        margin-left: 0;
        margin-top: 3px;
    }
}

@media (max-width: 768px) {
    body {
        min-width: auto;
        padding: 5px;
    }

    .upper-section {
        flex-direction: column;
    }

    .block-projects,
    .block-employees {
        width: 100%;
        padding: 10px;
        margin: 10px 0;
    }

    .report_card {
        flex-direction: column;
    }

    .project-details {
        padding: 10px;
        font-size: 11px;
    }

    .project-item {
        font-size: 11px;
    }

    .projects-table {
        font-size: 11px;
    }

    .projects-table th,
    .projects-table td {
        padding: 6px 8px;
        font-size: 11px;
    }

    .projects-table .row-header {
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 22px;
    }

    .employee-count-badge {
        font-size: 14px;
        padding: 6px 12px;
    }

    .block h3 {
        font-size: 16px;
    }

    .project-name {
        max-width: 100%;
    }

    .projects-table {
        font-size: 10px;
    }

    .projects-table th,
    .projects-table td {
        padding: 4px 6px;
        font-size: 10px;
    }

    .project-details {
        padding: 8px;
        font-size: 10px;
    }

    .management-title {
        font-size: 12px;
    }

    .project-id {
        font-size: 11px;
        min-width: 40px;
    }
}
