* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Шапка */
.header {
    background: white;
    padding: 24px 32px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.header h1 {
    font-size: 28px;
    color: #1f2937;
}

.view-select {
    padding: 10px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    background: white;
    transition: all 0.2s;
}

.view-select:hover {
    border-color: #667eea;
}

/* Статистика */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Индикатор загрузки */
.load-indicator {
    position: relative;
}

.load-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    margin-top: 12px;
    overflow: hidden;
}

.load-fill {
    height: 100%;
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 4px;
}

.load-status {
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
}

.load-indicator.load-normal .stat-value {
    color: #10b981;
}

.load-indicator.load-normal .load-status {
    color: #10b981;
}

.load-indicator.load-warning .stat-value {
    color: #f59e0b;
}

.load-indicator.load-warning .load-status {
    color: #f59e0b;
}

.load-indicator.load-danger .stat-value {
    color: #ef4444;
}

.load-indicator.load-danger .load-status {
    color: #ef4444;
}

/* Фильтры */
.filters {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-select {
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    flex: 1;
    min-width: 150px;
    transition: all 0.2s;
}

.filter-select:hover {
    border-color: #667eea;
}

.btn-reset {
    padding: 10px 20px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-reset:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 8px;
    transition: all 0.2s;
}

.filter-checkbox:hover {
    background: #f3f4f6;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.filter-checkbox span {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

/* Основной контент */
.main-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 24px;
    min-height: 400px;
}

/* Сетка карточек */
.tasks-grid,
#cardsView {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
}

.task-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
    transition: all 0.2s;
    cursor: pointer;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.task-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    line-height: 1.3;
}

.task-priority {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.priority-high {
    background: #fee2e2;
    color: #dc2626;
}

.priority-medium {
    background: #fef3c7;
    color: #d97706;
}

.priority-low {
    background: #dbeafe;
    color: #2563eb;
}

.task-description {
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.task-meta-item {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: #4b5563;
}

.task-meta-label {
    font-weight: 600;
    margin-right: 6px;
    min-width: 80px;
}

.project-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    color: white;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    color: white;
}

.task-progress {
    margin-top: 8px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

.progress-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    text-align: right;
}

/* Канбан */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.kanban-column {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
}

.kanban-header {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-count {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
}

.kanban-tasks {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kanban-task {
    background: white;
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    cursor: grab;
}

.kanban-task:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.kanban-task:active {
    cursor: grabbing;
}

.kanban-tasks.drag-over {
    background: #e0e7ff;
    border: 2px dashed #667eea;
    border-radius: 8px;
}

/* Список */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-task {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 100px 80px;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.list-task:hover {
    background: #f9fafb;
    border-color: #667eea;
}

.list-task-name {
    font-weight: 600;
    color: #1f2937;
}

.list-task-info {
    font-size: 14px;
    color: #6b7280;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 18px;
    font-weight: 500;
}

/* Кнопка "Показать ещё" */
.show-more-container {
    text-align: center;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.btn-show-more {
    padding: 10px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-show-more:hover {
    opacity: 0.9;
}

.show-more-info {
    color: #9ca3af;
    font-size: 13px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 16px;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .filters {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }

    .tasks-grid {
        grid-template-columns: 1fr;
    }

    .kanban-board {
        grid-template-columns: 1fr;
    }

    .list-task {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 24px;
    color: #1f2937;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.modal-body {
    padding: 24px 32px;
}

.modal-field {
    margin-bottom: 20px;
}

.modal-field-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.modal-field-value {
    font-size: 16px;
    color: #1f2937;
    line-height: 1.5;
}

.modal-field-value.empty {
    color: #9ca3af;
    font-style: italic;
}

.modal-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.modal-priority {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.modal-priority.high {
    background: #fee2e2;
    color: #991b1b;
}

.modal-priority.medium {
    background: #fef3c7;
    color: #92400e;
}

.modal-priority.low {
    background: #dbeafe;
    color: #1e40af;
}

/* Блок "Фокус дня" */
.focus-block {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
    margin-bottom: 24px;
}

.focus-header {
    margin-bottom: 20px;
}

.focus-header h2 {
    color: white;
    font-size: 24px;
    margin-bottom: 4px;
}

.focus-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.focus-tasks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.focus-task {
    background: white;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid #667eea;
}

.focus-task:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.focus-task.overdue {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.focus-task.today {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.focus-task.tomorrow {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.focus-task-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.focus-task-score {
    background: #667eea;
    color: white;
    font-weight: 700;
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 6px;
    min-width: 32px;
    text-align: center;
}

.focus-task.overdue .focus-task-score {
    background: #ef4444;
}

.focus-task.today .focus-task-score {
    background: #f59e0b;
}

.focus-task-name {
    flex: 1;
    font-weight: 600;
    font-size: 15px;
    color: #1f2937;
}

.focus-task-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.urgency-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.urgency-badge.overdue {
    background: #fee2e2;
    color: #991b1b;
}

.urgency-badge.today {
    background: #fef3c7;
    color: #92400e;
}

.urgency-badge.tomorrow {
    background: #d1fae5;
    color: #065f46;
}

.priority-badge-high {
    background: #fee2e2;
    color: #991b1b;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.focus-empty {
    text-align: center;
    color: white;
    font-size: 18px;
    padding: 32px;
    opacity: 0.9;
}

/* Быстрые режимы */
.quick-modes {
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-mode-btn {
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: white;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quick-mode-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
}

.quick-mode-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* Новые визуальные статусы */
.status-badge-new {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.priority-score-badge {
    background: #667eea;
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
    display: inline-block;
}

/* Адаптивная сетка карточек */
@media (max-width: 1200px) {
    .tasks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Таймлайн задач */
.timeline-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.timeline-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1f2937;
    margin-bottom: 16px;
}

.timeline-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.timeline-day {
    background: #f9fafb;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    transition: all 0.2s;
    cursor: pointer;
}

.timeline-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.timeline-day-today {
    border-color: #667eea;
    background: #eef2ff;
}

.timeline-day-header {
    text-align: center;
    margin-bottom: 8px;
}

.timeline-day-name {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
}

.timeline-day-date {
    font-size: 14px;
    color: #1f2937;
    font-weight: 700;
    margin-top: 2px;
}

.timeline-day-count {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin: 8px 0;
}

.timeline-day-normal .timeline-day-count {
    color: #10b981;
}

.timeline-day-high .timeline-day-count {
    color: #f59e0b;
}

.timeline-day-overload .timeline-day-count {
    color: #ef4444;
}

.timeline-day-empty .timeline-day-count {
    color: #d1d5db;
}

.timeline-day-bar {
    height: 60px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    margin: 8px 0;
    display: flex;
    align-items: flex-end;
}

.timeline-day-fill {
    width: 100%;
    transition: height 0.3s ease;
    border-radius: 6px 6px 0 0;
}

.timeline-day-normal .timeline-day-fill {
    background: linear-gradient(to top, #10b981, #34d399);
}

.timeline-day-high .timeline-day-fill {
    background: linear-gradient(to top, #f59e0b, #fbbf24);
}

.timeline-day-overload .timeline-day-fill {
    background: linear-gradient(to top, #ef4444, #f87171);
}

.timeline-day-tasks {
    font-size: 11px;
    color: #6b7280;
    margin-top: 8px;
}

.timeline-task-mini {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-task-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.timeline-more {
    text-align: center;
    color: #9ca3af;
    font-weight: 600;
    margin-top: 4px;
    font-size: 10px;
}

.timeline-day-empty-text {
    text-align: center;
    color: #d1d5db;
    font-size: 12px;
    margin-top: 8px;
}

/* Адаптив для таймлайна */
@media (max-width: 1200px) {
    .timeline-days {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .timeline-days {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Группировка задач */
.task-group-header {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 24px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-group-count {
    font-size: 14px;
    color: #6b7280;
    font-weight: 600;
}

/* дубликат убран — основной стиль .tasks-grid выше */

/* ===== НОВЫЕ СТИЛИ ===== */

/* Кнопка в шапке */
.btn-generate-plan {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 12px;
}

.btn-generate-plan:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Кнопка отчетов */
.btn-reports {
    padding: 10px 16px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-right: 12px;
}

.btn-reports:hover {
    background: #e5e7eb;
}

/* Новые стат-карты */
.stat-completion {
    color: #10b981;
}

.stat-avgtime {
    color: #8b5cf6;
    font-size: 24px;
}

/* Сложность задач */
.complexity-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    transition: all 0.2s;
}

.complexity-badge:hover {
    transform: scale(1.05);
}

.complexity-5min { background: #d1fae5; color: #065f46; }
.complexity-30min { background: #dbeafe; color: #1e40af; }
.complexity-1hour { background: #fef3c7; color: #92400e; }
.complexity-3hours { background: #fee2e2; color: #991b1b; }
.complexity-large { background: #ede9fe; color: #5b21b6; }
.complexity-none { background: #f3f4f6; color: #9ca3af; }

.complexity-select {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.complexity-select:hover {
    border-color: #667eea;
}

.complexity-popup {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 12px;
    min-width: 200px;
}

.complexity-option {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    margin-bottom: 4px;
}

.complexity-option:hover {
    background: #f3f4f6;
}

.complexity-option.selected {
    background: #eef2ff;
}

/* Кнопки работы */
.task-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.btn-start-work {
    padding: 8px 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-start-work:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-stop-work {
    padding: 8px 16px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.btn-complete-task {
    padding: 6px 12px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-complete-task:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.work-time-total {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.work-active-indicator {
    color: #ef4444;
    font-weight: 600;
    margin-right: 12px;
}

/* Блокировка задач */
.task-blocked {
    opacity: 0.7;
}

.blocked-badge {
    background: #fee2e2;
    color: #991b1b;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.blocked-warning {
    background: #fef3c7;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 12px;
}

/* Зависимости */
.dependency-list {
    margin-bottom: 12px;
}

.dependency-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.dep-status {
    font-size: 16px;
}

.dep-name {
    flex: 1;
    font-size: 14px;
}

.dep-remove {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.dep-remove:hover {
    color: #ef4444;
    background: #fee2e2;
}

.dependency-add {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.btn-add-dep {
    padding: 8px 14px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-dep:hover {
    background: #5a6fd6;
}

/* История изменений */
.history-timeline {
    margin-top: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.history-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.history-entry:last-child {
    border-bottom: none;
}

.history-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.history-content {
    flex: 1;
}

.history-text {
    font-size: 14px;
    color: #1f2937;
}

.history-time {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

.history-empty {
    color: #9ca3af;
    font-style: italic;
    padding: 12px 0;
}

.modal-history summary {
    user-select: none;
}

/* Напоминания */
.notification-prompt {
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.notification-prompt button {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.notification-prompt button:hover {
    opacity: 0.9;
}

/* ===== ПЛАН ДНЯ ===== */

.day-plan-container {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.day-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.day-plan-header h2 {
    font-size: 22px;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.day-plan-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
}

.overload-warning {
    background: #fee2e2;
    color: #991b1b;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.day-plan-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-regenerate-plan {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-regenerate-plan:hover {
    background: #5a6fd6;
}

.btn-clear-plan {
    padding: 8px 16px;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-clear-plan:hover {
    background: #4b5563;
}

.btn-close-plan {
    background: none;
    border: 2px solid #e5e7eb;
    font-size: 20px;
    cursor: pointer;
    color: #9ca3af;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-close-plan:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.day-plan-timeline {
    position: relative;
}

.day-plan-track {
    position: relative;
    border-left: 3px solid #e5e7eb;
    margin-left: 60px;
    padding-left: 20px;
}

.time-mark {
    position: absolute;
    left: -80px;
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    width: 55px;
    text-align: right;
}

.time-mark::after {
    content: '';
    position: absolute;
    right: -25px;
    top: 50%;
    width: 10px;
    height: 2px;
    background: #e5e7eb;
}

.plan-slot {
    position: absolute;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e5e7eb;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
}

.plan-slot:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(2px);
}

.plan-slot.buffer {
    background: repeating-linear-gradient(
        45deg,
        #f9fafb,
        #f9fafb 5px,
        #f3f4f6 5px,
        #f3f4f6 10px
    );
    border-color: #e5e7eb;
    border-left-color: #d1d5db;
    cursor: default;
}

.plan-slot.locked {
    border-color: #3b82f6;
    background: #eff6ff;
}

.plan-slot.plan-slot-high {
    border-left-color: #ef4444;
}

.plan-slot.dragging {
    opacity: 0.5;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.plan-slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.plan-slot-time {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
}

.plan-slot-lock {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 1;
}

.plan-slot-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plan-slot-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.plan-slot-duration {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

.plan-slot-label {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
}

/* План дня — списочный вид */
.day-plan-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plan-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-left: 5px solid #667eea;
    border-radius: 10px;
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.plan-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateX(2px);
}

.plan-item-high {
    border-left-color: #ef4444;
}

.plan-item-locked {
    border-color: #3b82f6;
    background: #eff6ff;
}

.plan-item-time {
    flex-shrink: 0;
    width: 100px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    padding-top: 2px;
}

.plan-item-body {
    flex: 1;
    min-width: 0;
}

.plan-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
    word-break: break-word;
}

.plan-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.plan-item-duration {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.plan-item-buffer {
    border-left-color: #d1d5db;
    cursor: default;
}

.plan-item-buffer:hover {
    box-shadow: none;
    transform: none;
}

.plan-item-buffer-body {
    font-size: 13px;
    color: #9ca3af;
    font-style: italic;
}

.plan-item-calendar {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    cursor: default;
}

.plan-item-calendar:hover {
    box-shadow: none;
    transform: none;
}

.plan-item-calendar .plan-item-name {
    color: #1e40af;
    font-weight: 500;
}

.plan-item-calendar .plan-item-duration {
    color: #60a5fa;
}

/* Кнопки перемещения задач */
.plan-item-reorder {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
    align-self: center;
}

.plan-reorder-btn {
    width: 26px;
    height: 22px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #f9fafb;
    color: #6b7280;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
    line-height: 1;
}

.plan-reorder-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.plan-reorder-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Overflow-задачи */
.day-plan-overflow {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px dashed #e5e7eb;
}

.day-plan-overflow h4 {
    color: #ef4444;
    font-size: 14px;
    margin: 0 0 12px 0;
}

.overflow-task {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.overflow-task:hover {
    background: #fee2e2;
}

.overflow-task-name {
    font-size: 14px;
    color: #991b1b;
    font-weight: 500;
}

.overflow-task-duration {
    font-size: 12px;
    color: #b91c1c;
    font-weight: 600;
}
