/* Добавьте эти стили в ваш основной CSS файл */

/* Трекер */
.tracker-container {
    padding: 16px;
    max-width: 100%;
    overflow-x: hidden; /* Предотвращаем горизонтальный скролл */
}

/* Заголовок трекера */
.tracker-header {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tracker-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.tracker-title i {
    color: #667eea;
    margin-right: 8px;
}

.tracker-subtitle {
    font-size: 14px;
    color: #666;
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card.overdue .stat-value {
    color: #f44336;
}

.stat-card.today .stat-value {
    color: #ff9800;
}

/* Фильтры */
.filters-section {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.filter-tab {
    padding: 8px 16px;
    border-radius: 20px;
    background: #f0f0f0;
    color: #666;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
    white-space: nowrap; /* Не переносим текст в табах */
}

.filter-tab:hover {
    background: #e0e0e0;
}

.filter-tab.active {
    background: #667eea;
    color: white;
}

.filter-tab.overdue.active {
    background: #f44336;
}

.filter-tab.today.active {
    background: #ff9800;
}

.filter-tab.completed.active {
    background: #4caf50;
}

.filter-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.filter-select {
    flex: 1;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    background: white;
    max-width: 100%; /* Ограничиваем ширину */
}

.filter-select:focus {
    border-color: #667eea;
}

.search-box {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    max-width: 100%;
}

.search-box:focus {
    border-color: #667eea;
}

/* Карточки задач */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-card {
    background: white;
    border-radius: 16px;
    margin-bottom: 0; /* Убираем margin, используем gap в .tasks-list */
    padding: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid transparent;
    cursor: pointer;
    overflow: hidden; /* Предотвращаем вылезание содержимого */
    max-width: 100%;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.task-card.overdue {
    border-left-color: #f44336;
    background: linear-gradient(to right, #fff, #fff5f5);
}

.task-card.today {
    border-left-color: #ff9800;
    background: linear-gradient(to right, #fff, #fff3e0);
}

.task-card.completed {
    border-left-color: #4caf50;
    background: linear-gradient(to right, #fff, #f1f8e9);
    opacity: 0.9;
}

.task-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 8px; /* Добавляем gap для лучшего разделения */
}

.task-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    flex: 1;
    margin-right: 0; /* Убираем margin-right */
    line-height: 1.4;
    word-break: break-word; /* Переносим длинные слова */
    hyphens: auto; /* Автоматическая расстановка переносов */
    overflow-wrap: break-word; /* Альтернатива word-wrap */
    max-height: 4.2em; /* Ограничиваем высоту (3 строки) */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Ограничиваем 3 строками */
    -webkit-box-orient: vertical;
}

.task-department {
    font-size: 12px;
    background: #e0e0e0;
    padding: 4px 8px;
    border-radius: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px; /* Ограничиваем ширину департамента */
    flex-shrink: 0; /* Не сжимаем */
}

.task-meta {
    display: flex;
    flex-direction: column; /* По умолчанию column для лучшей читаемости на мобильных */
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

@media (min-width: 480px) {
    /* Для шире экранов — row с wrap */
    .task-meta {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 12px;
    }
}

.assignee {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #555;
    /* Убираем flex:1, добавляем max-width для предотвращения переполнения */
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; /* Позволяем перенос на новую строку */
}

.assignee i {
    color: #667eea;
    font-size: 12px;
    flex-shrink: 0;
}

.deadline {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.deadline.overdue {
    color: #f44336;
}

.deadline.today {
    color: #ff9800;
}

/* Статусы */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-new {
    background: #e3f2fd;
    color: #1976d2;
}

.status-work {
    background: #fff3e0;
    color: #f57c00;
}

.status-pause {
    background: #ffebee;
    color: #c62828;
}

.status-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.department-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    background: #e3f2fd;
    color: #1976d2;
}

.department-badge.big {
    font-size: 15px;
    padding: 8px 12px;
}


.priority-низкий {
    background: #e8eaf6;
    color: #3f51b5;
}

.priority-средний {
    background: #fff3e0;
    color: #ff9800;
}

.priority-высокий {
    background: #ffebee;
    color: #f44336;
}

.priority-критический {
    background: #f44336;
    color: white;
}

/* Подзадачи */
.task-description {
    margin-top: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    word-break: break-word;
    max-height: 100px; /* Ограничиваем высоту описания */
    overflow-y: auto; /* Скролл, если слишком длинное */
}

.subtasks {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.subtask {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    gap: 8px;
}

.subtask-title {
    color: #666;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; /* Не переносим название подзадачи */
}

.subtask-deadline {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}

.subtask-deadline.overdue {
    color: #f44336;
}

/* Модальные окна */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow-y: auto; /* Скролл для модалки, если содержимое большое */
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #555;
    margin-bottom: 12px;
}

.modal-field {
    margin-bottom: 16px;
}

.modal-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.modal-value {
    font-size: 16px;
    color: #333;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal-btn {
    flex: content;
    padding: 12px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.modal-btn.primary {
    background: #667eea;
    color: white;
}

.modal-btn.secondary {
    background: #f0f0f0;
    color: #666;
}

.modal-btn.danger {
    background: #f44336;
    color: white;
}

.modal-btn:hover {
    opacity: 0.9;
}

/* Чипсы ответственных */
.assignee-chip {
    display: inline-block;
    padding: 4px 12px;
    margin: 2px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 16px;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assignee-chip.current-user {
    background: #c8e6c9;
    color: #2e7d32;
    font-weight: 500;
}

/* История */
.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.history-item:last-child {
    border-bottom: none;
}

.history-date {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.history-description {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    word-break: break-word;
}

.history-author {
    font-size: 12px;
    color: #667eea;
}

/* Опции статусов в модалке */
.status-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.status-option {
    padding: 12px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.status-option:hover {
    background: #f0f0f0;
}

.status-option.active {
    border-color: #667eea;
    background: #e8eaf6;
}

.create-task-section {
    margin-bottom: 20px;
    padding: 0 16px;
}

.create-task-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.create-task-btn i {
    font-size: 18px;
}

.create-task-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd6 0%, #6a3f9c 100%);
}

.create-task-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding: 16px;
    background: white;
    border-radius: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    border: none;
    background: #f0f0f0;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-info {
    font-size: 14px;
    color: #666;
}

/* Дополнительные улучшения для читаемости */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    color: #333;
    background: #f4f6f9; /* Светлый фон для лучшей читаемости */
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.empty-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 16px;
    color: #666;
}

/* Для форм в модалках (например, создание задачи) */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: #666;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.form-group select[multiple] {
    height: auto;
}

/* Skeleton loading */
.skeleton {
    background: #f0f0f0;
    animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-text {
    height: 16px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-text.short {
    width: 60px;
}

.skeleton-text.medium {
    width: 120px;
}

.skeleton-text.long {
    width: 80%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.modal-badges {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.status-badge.big {
    font-size: 13px;
    padding: 6px 12px;
}

.department-card {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 2px solid transparent;
}

.department-card-icon {
    font-size: 42px;
    flex-shrink: 0;
}

.department-card-main {
    flex: 1;
}

.department-card-header {
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

.deadline-card {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 2px solid transparent;
}

.deadline-card.overdue {
    border-color: #f44336;
    background: #fff5f5;
}

.deadline-card.today {
    border-color: #ff9800;
    background: #fff3e0;
}

.deadline-icon {
    font-size: 42px;
    flex-shrink: 0;
}

.deadline-main {
    flex: 1;
}

.deadline-date {
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

.deadline-days {
    font-size: 15px;
    font-weight: 600;
    margin-top: 4px;
}

.deadline-changed {
    font-size: 13px;
    color: #999;
    margin-top: 6px;
}

.assignee-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.comments-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 8px;
}

.comment-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-color, #e9ecef);
    margin-bottom: 8px;
}

.comment-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.comment-item.system-comment {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    border-radius: 4px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 12px;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary, #2c3e50);
}

.comment-date {
    color: var(--text-secondary, #7f8c8d);
}

.comment-text {
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.no-comments {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary, #7f8c8d);
    font-style: italic;
}

.description, .steps {
    white-space: pre-wrap;
    line-height: 1.5;
}

.modal-link {
    display: block;
    color: #667eea;
    text-decoration: underline;
    word-break: break-all;
}

.subtasks-modal {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subtask-modal {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-timeline {
    position: relative;
    padding-left: 24px;
}

.history-item {
    position: relative;
    margin-bottom: 20px;
}

.history-dot {
    position: absolute;
    left: -8px;
    top: 6px;
    width: 16px;
    height: 16px;
    background: #667eea;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.history-content {
    background: #f8f9fa;
    padding: 14px;
    border-radius: 12px;
}

/* Анимация появления модалки */
.modal-overlay {
    animation: fadeInModal 0.2s ease forwards;
}

.modal-content {
    animation: slideUpModal 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* === НОВОЕ МОДАЛЬНОЕ ОКНО СОЗДАНИЯ === */
.create-modal .modal-content {
    max-width: 92%;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
}

.form-input:focus, .form-textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.collapsible-item {
    margin-bottom: 12px;
}

.expand-btn {
    width: 100%;
    padding: 14px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    text-align: left;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.expand-btn:hover {
    background: #f0f0f0;
}

.collapsible-content {
    margin-top: 8px;
    padding-left: 8px;
    display: none;
}

.search-panel {
    margin-top: 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: none;
}

.search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 10px;
}

.user-list {
    max-height: 240px;
    overflow-y: auto;
}

.user-item {
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.user-item:hover {
    background: #f0f0f0;
}

.user-login {
    color: #888;
    font-size: 13px;
}

.small {
    padding: 10px 16px;
    font-size: 14px;
}

/* Стили для режима редактирования */
.task-edit-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.modal-title-container {
    flex: 1;
}

.modal-title-text {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    display: block;
}

.modal-title-input {
    width: 100%;
    padding: 8px 12px;
    font-size: 18px;
    border: 2px solid #667eea;
    border-radius: 8px;
    outline: none;
}

.modal-edit-btn {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    border: none;
    background: #f0f0f0;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
}

.modal-edit-btn:hover {
    background: #667eea;
    color: white;
}

.modal-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-edit-btn {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    border: none;
    background: #f0f0f0;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-edit-btn:hover {
    background: #667eea;
    color: white;
}

/* Стили для select в режиме редактирования */
.status-select, .priority-select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #667eea;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    background: white;
    cursor: pointer;
}

/* Стили для input даты */
.deadline-input {
    padding: 8px 12px;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    width: 100%;
}

/* Стили для textarea в режиме редактирования */
.edit-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #667eea;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Стили для редактирования ответственных */
.assignee-search-container {
    margin-bottom: 12px;
}

.assignee-search-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.assignee-search-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 8px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-search-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.user-search-item:last-child {
    border-bottom: none;
}

.user-search-item:hover {
    background: #f0f0f0;
}

.no-results {
    padding: 12px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.selected-assignees {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    min-height: 40px;
}

.assignee-chip.selected {
    background: #e3f2fd;
    color: #1976d2;
    padding-right: 8px;
}

.remove-chip {
    margin-left: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.remove-chip:hover {
    opacity: 1;
}

/* Анимации */
.modal-content {
    transition: all 0.3s ease;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.delete-confirmation-modal .modal-content {
    max-width: 400px;
    text-align: center;
}

.delete-confirmation-content {
    padding: 20px 0;
}

.delete-icon {
    font-size: 48px;
    color: #f44336;
    margin-bottom: 16px;
}

.delete-icon i {
    animation: pulse 2s infinite;
}

.delete-message {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
}

.modal-header-actions {
    display: flex;
    gap: 8px;
}

.modal-edit-btn#delete-task-btn {
    background: #ffebee;
    color: #f44336;
}

.modal-edit-btn#delete-task-btn:hover {
    background: #f44336;
    color: white;
}

.task-title-highlight {
    font-weight: 600;
    color: #f44336;
    margin: 12px 0;
    padding: 8px;
    background: #fff5f5;
    border-radius: 8px;
    word-break: break-word;
}

.delete-warning {
    font-size: 14px;
    color: #666;
    background: #fff3e0;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.delete-warning i {
    color: #ff9800;
    font-size: 18px;
    flex-shrink: 0;
}

/* Типы задач */
.task-type-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    display: inline-block;
    vertical-align: middle;
}

.task-type-badge.milestone {
    background: #9b59b6;
    color: white;
}

.task-type-badge.subtask {
    background: #3498db;
    color: white;
}

.task-type-badge.task {
    background: #7f8c8d;
    color: white;
}

/* Ссылка на веху */
.milestone-link {
    font-size: 11px;
    color: #3498db;
    margin-top: 6px;
    padding: 4px 8px;
    background: #f0f7ff;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.milestone-link i {
    font-size: 12px;
}

.milestone-badge {
    background: #9b59b6;
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin-bottom: 12px;
}

.milestone-relation {
    background: #3498db20;
    color: #3498db;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 12px;
    border-left: 3px solid #3498db;
}

.links-list {
    margin-top: 8px;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 8px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.link-item:hover {
    background: var(--bg-hover, #e8e8e8);
}

.link-direction {
    font-size: 16px;
    min-width: 24px;
    text-align: center;
}

.link-type {
    font-size: 12px;
    color: var(--text-secondary, #666);
    min-width: 80px;
}

.link-task {
    font-size: 13px;
    font-weight: 500;
}

.sprint-badge {
    font-size: 11px;
    color: #e67e22;
    margin-top: 6px;
    padding: 4px 8px;
    background: #fef5e7;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sprint-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fef5e7;
    border-radius: 12px;
    margin-bottom: 16px;
}

.sprint-icon {
    font-size: 24px;
    color: #e67e22;
}

.sprint-header {
    font-size: 15px;
    font-weight: 500;
    color: #e67e22;
}

/* Поиск вех */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.search-result-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.search-result-item:hover {
    background: #f5f5f5;
}

.result-key {
    font-weight: 600;
    color: #3498db;
    margin-right: 8px;
}

.result-title {
    color: #333;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.field-description {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    line-height: 1.4;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    z-index: 10000;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    background: #27ae60;
}

.toast-error {
    background: #e74c3c;
}

.toast-info {
    background: #3498db;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInModal {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.tasks-list.loading .task-card {
    pointer-events: none;
    opacity: 0.7;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}