/* ===== МОДАЛЬНЫЕ ОКНА И ИНТЕРФЕЙС ===== */

/* Основные модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #ffffff;
    margin: 2% auto;
    border-radius: 12px;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    position: relative;
}

.modal-content.fullscreen {
    width: 98%;
    max-width: none;
    height: 95vh;
    max-height: 95vh;
    margin: 1% auto;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close {
    color: rgba(255, 255, 255, 0.8);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close:hover {
    color: white;
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-stats {
    background: #f3f4f6;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #4b5563;
    border-left: 4px solid #3b82f6;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-style: italic;
}

/* Элементы интерфейса - поручения и задания */
.overdue-assignments-list {
    max-height: 70vh;
    overflow-y: auto;
}

.assignment-item {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    background: #f9fafb;
    font-size: 0.9rem;
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.assignment-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.assignment-title strong {
    color: #111827;
    font-weight: 600;
    flex: 1;
}

.assignment-content {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #ef4444;
}

.assignment-task {
    margin-bottom: 1rem;
}

.assignment-task h4 {
    color: #374151;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.assignment-task p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.assignment-text {
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    background: #ffffff;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.assignment-details {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}

.detail-row {
    display: flex;
    margin-bottom: 0.5rem;
    align-items: flex-start;
}

.detail-row:last-child {
    margin-bottom: 0;
}

/* Дополнительные элементы интерфейса */
.function-scores {
    display: flex;
    align-items: center;
    gap: 12px;
}

.function-score {
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: white;
}

.april-score {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: #6b7280;
}

.score-label {
    font-weight: 500;
}

.score-value {
    font-weight: 600;
    color: #374151;
}

.score-change {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    min-width: 60px;
    text-align: center;
}

/* Состояния изменений */
.change-positive {
    background: #dcfce7;
    color: #16a34a;
}

.change-negative {
    background: #fecaca;
    color: #dc2626;
}

.change-neutral {
    background: #f3f4f6;
    color: #6b7280;
}

/* Переключатели и контролы */
.april-toggle {
    margin-left: 20px;
    border-left: 1px solid #e5e7eb;
    padding-left: 20px;
}

.nps-toggles {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

/* Графики и визуализация */
.chart-placeholder {
    background: #f3f4f6;
    border-radius: 8px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 0.875rem;
    margin: 1rem 0;
}

.chart-canvas {
    border-radius: 8px;
    max-height: 400px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-wrapper {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.small-chart {
    height: 300px;
}

.medium-chart {
    height: 350px;
}

.large-chart {
    height: 400px;
}