:root {
    --primary-orange: #FF6B35;
    --primary-orange-light: #FF8C42;
    --primary-orange-dark: #E55A2B;
    --white: #FFFFFF;
    --gray-50: #F8F9FA;
    --gray-100: #F1F3F4;
    --gray-200: #E8EAED;
    --gray-300: #DADCE0;
    --gray-400: #BDC1C6;
    --gray-500: #9AA0A6;
    --gray-600: #80868B;
    --gray-700: #5F6368;
    --gray-800: #3C4043;
    --gray-900: #202124;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 5px 10px rgba(0,0,0,0.05);

    --border-radius: 8px;
    --border-radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-orange);
}

.logo i {
    font-size: 1.75rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--gray-700);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--primary-orange);
    color: var(--white);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-orange);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-orange-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-orange);
    color: var(--primary-orange);
}

.btn-outline:hover {
    background-color: var(--primary-orange);
    color: var(--white);
}

.btn-large {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* Auth Section */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--gray-800);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Pages */
.section {
    display: none;
}

.section.active {
    display: block;
}

.page {
    display: none;
    padding: 2rem 0;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: var(--gray-800);
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

/* Tasks List */
.tasks-list {
    display: grid;
    gap: 1rem;
}

.task-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-orange);
    transition: all 0.3s ease;
}

.task-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.task-id {
    font-weight: bold;
    color: var(--primary-orange);
    font-size: 1.1rem;
}

.task-priority {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.priority-urgent {
    background-color: #FEE2E2;
    color: #DC2626;
}

.priority-high {
    background-color: #FEF3C7;
    color: #D97706;
}

.priority-normal {
    background-color: #D1FAE5;
    color: #059669;
}

.priority-low {
    background-color: #E0E7FF;
    color: #4F46E5;
}

.task-summary {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.task-description {
    color: var(--gray-600);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.task-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--gray-500);
}

.task-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
}

.stat-icon.total { background-color: var(--primary-orange); }
.stat-icon.urgent { background-color: #DC2626; }
.stat-icon.high { background-color: #D97706; }
.stat-icon.normal { background-color: #059669; }

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.chart-card h3 {
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.chart {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-50);
    border-radius: var(--border-radius);
}

/* Attachments */
.attachments-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.attachment-preview {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.attachment-preview img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.attachment-preview .file-icon {
    text-align: center;
    font-size: 2rem;
    color: #666;
    margin-bottom: 8px;
}

.attachment-preview .file-info {
    text-align: center;
}

.attachment-preview .file-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-preview .file-size {
    display: block;
    font-size: 0.7rem;
    color: #888;
}

.remove-attachment {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-attachment:hover {
    background: rgba(255, 0, 0, 1);
}

.upload-progress {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #007bff;
}

.upload-progress .progress-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 5px;
}

.upload-progress .progress {
    height: 100%;
    background: #007bff;
    transition: width 0.3s ease;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--gray-600);
}

.loading i {
    margin-right: 0.5rem;
}

/* Стили для статусов */
.task-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.task-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
}

.status-blue { background-color: #3B82F6; }
.status-orange { background-color: #F59E0B; }
.status-yellow { background-color: #EAB308; }
.status-purple { background-color: #8B5CF6; }
.status-green { background-color: #10B981; }
.status-gray { background-color: #6B7280; }

.task-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn-danger {
    background-color: #DC2626;
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #B91C1C;
    transform: translateY(-1px);
}

/* Стили для сообщения об успехе */
.success-message {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.user-role {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #ddd;
}

.user-role.editors {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1976d2;
}

.user-role.managers {
    background: #f3e5f5;
    border-color: #9c27b0;
    color: #7b1fa2;
}

.user-role.products {
    background: #e8f5e8;
    border-color: #4caf50;
    color: #388e3c;
}

.user-role.support {
    background: #fff3e0;
    border-color: #ff9800;
    color: #f57c00;
}

.user-role.accountants {
    background: #fce4ec;
    border-color: #e91e63;
    color: #c2185b;
}

.user-role.user {
    background: #f5f5f5;
    border-color: #9e9e9e;
    color: #616161;
}

/* Kanban Board - ГОРИЗОНТАЛЬНЫЕ колонки (рядом друг с другом) */
.kanban-board {
    display: flex;
    flex-direction: row; /* Важно: колонки горизонтально! */
    gap: 20px;
    padding: 20px;
    overflow-x: auto;
    height: calc(100vh - 200px);
    align-items: flex-start;
    width: 100%;
    background: var(--gray-50);
    border-radius: var(--border-radius);
}

.kanban-column {
    flex: 0 0 320px; /* Фиксированная ширина колонок */
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    max-height: 100%;
    min-height: 400px;
}

.kanban-column-header {
    padding: 15px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--white);
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
    border-top: 4px solid; /* Цветная полоска сверху */
}

.kanban-column-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.kanban-count {
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.kanban-tasks {
    flex: 1;
    padding: 15px;
    overflow-y: auto; /* Вертикальная прокрутка внутри колонки */
    min-height: 100px;
    display: flex;
    flex-direction: column; /* Карточки вертикально внутри колонки */
    gap: 12px;
}

/* Цветные заголовки статусов */
.kanban-column[data-status="Новый"] .kanban-column-header {
    border-top-color: #3B82F6;
    background: rgba(59, 130, 246, 0.05);
}

.kanban-column[data-status="Открыта"] .kanban-column-header {
    border-top-color: #F59E0B;
    background: rgba(245, 158, 11, 0.05);
}

.kanban-column[data-status="Ожидает ответа"] .kanban-column-header {
    border-top-color: #EAB308;
    background: rgba(234, 179, 8, 0.05);
}

.kanban-column[data-status="Требует уточнения"] .kanban-column-header {
    border-top-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.05);
}

.kanban-column[data-status="Решен"] .kanban-column-header {
    border-top-color: #10B981;
    background: rgba(16, 185, 129, 0.05);
}

.kanban-column[data-status="Дубликат"] .kanban-column-header {
    border-top-color: #6B7280;
    background: rgba(107, 114, 128, 0.05);
}

/* ГОРИЗОНТАЛЬНЫЙ ВИД внутри колонки (активируется при переключении) */
.kanban-board.compact-view .kanban-tasks {
    flex-direction: row; /* Горизонтальная прокрутка внутри колонки */
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 15px;
    gap: 15px;
    scrollbar-width: thin;
}

.kanban-board.compact-view .kanban-tasks .kanban-task-card {
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
}

/* Scrollbar для горизонтальной доски */
.kanban-board::-webkit-scrollbar {
    height: 8px;
}

.kanban-board::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

.kanban-board::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

.kanban-board::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Scrollbar для задач внутри колонки */
.kanban-tasks::-webkit-scrollbar {
    width: 6px;
}

.kanban-tasks::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.kanban-tasks::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.kanban-tasks::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Для пустых колонок */
.no-tasks {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--gray-400);
    font-size: 0.9rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 2px dashed var(--gray-300);
    margin: 10px;
    text-align: center;
    flex-grow: 1;
}

.no-tasks i {
    font-size: 24px;
    margin-bottom: 10px;
    opacity: 0.6;
}

/* Сворачивание колонок */
.kanban-column.collapsed .kanban-tasks {
    display: none;
}

.kanban-column.collapsed .kanban-column-header::after {
    content: '▶';
    margin-left: 10px;
    font-size: 0.8rem;
    opacity: 0.6;
}

.kanban-column:not(.collapsed) .kanban-column-header::after {
    content: '▼';
    margin-left: 10px;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Drag & Drop */
.kanban-task-card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.kanban-column.drop-over {
    background-color: rgba(255, 107, 53, 0.05);
    border: 2px dashed var(--primary-orange);
}

/* Стили карточки задачи */
.kanban-task-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    user-select: none;
}

.kanban-task-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-orange);
}

.kanban-task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.kanban-task-id {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-orange);
    background: rgba(255, 107, 53, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.kanban-task-priority {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.kanban-task-summary {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 10px;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.kanban-task-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: var(--gray-600);
}

.kanban-task-user, .kanban-task-type {
    display: flex;
    align-items: center;
    gap: 4px;
}

.kanban-task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--gray-500);
    border-top: 1px solid var(--gray-100);
    padding-top: 8px;
}

.kanban-task-date, .kanban-task-attachments {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Приоритеты */
.priority-urgent {
    background-color: #FEE2E2;
    color: #DC2626;
    border: 1px solid #FEE2E2;
}
.priority-high {
    background-color: #FEF3C7;
    color: #D97706;
    border: 1px solid #FEF3C7;
}
.priority-normal {
    background-color: #DCFCE7;
    color: #059669;
    border: 1px solid #DCFCE7;
}
.priority-low {
    background-color: #E0E7FF;
    color: #4F46E5;
    border: 1px solid #E0E7FF;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .kanban-column {
        flex: 0 0 280px;
    }

    .kanban-board.compact-view .kanban-tasks .kanban-task-card {
        min-width: 250px;
    }
}

/* Контролы канбана */
.kanban-controls {
    display: flex;
    gap: 15px;
    padding: 15px 20px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.kanban-search {
    flex: 1;
    max-width: 300px;
    position: relative;
}

.kanban-search input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.kanban-search i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
}

.kanban-filters {
    display: flex;
    gap: 10px;
}

.kanban-filters select {
    padding: 10px 15px;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    background: var(--white);
    font-size: 14px;
    min-width: 150px;
}

.kanban-view-controls {
    display: flex;
    gap: 10px;
}

.kanban-header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-success {
    background-color: #10B981;
    color: white;
    border: none;
}

.btn-success:hover {
    background-color: #059669;
}

/* Индикатор загрузки при перетаскивании */
.task-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--gray-600);
    text-align: center;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 2px dashed var(--gray-300);
}

.task-loading i {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary-orange);
    animation: spin 1s linear infinite;
}

.task-loading span {
    font-size: 0.9rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Улучшенные стили для перетаскивания */
.kanban-task-card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 2px dashed var(--primary-orange);
}

.kanban-column.drop-over {
    background-color: rgba(255, 107, 53, 0.05);
    border: 2px dashed var(--primary-orange);
}

.kanban-column.drop-over .kanban-column-header {
    background-color: rgba(255, 107, 53, 0.1);
}

/* Стиль для ссылки-кнопки */
.btn-success {
    background-color: #10B981;
    color: white;
    border: none;
    text-decoration: none; /* Убираем подчеркивание у ссылок */
    display: inline-flex; /* Для правильного выравнивания иконки и текста */
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-success:hover {
    background-color: #059669;
    color: white;
    text-decoration: none;
}

/* Если используете ссылку <a> */
a.btn-success {
    text-decoration: none;
}

a.btn-success:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-50);
    border-top-left-radius: var(--border-radius-lg);
    border-top-right-radius: var(--border-radius-lg);
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    margin: 0;
    color: var(--gray-800);
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-600);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.modal-body {
    padding: 30px;
}

/* Стили для детальной информации о задаче */
.task-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.task-details-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.task-details-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.task-details-section {
    background: var(--gray-50);
    border-radius: var(--border-radius);
    padding: 20px;
}

.task-details-section h3 {
    margin: 0 0 20px 0;
    color: var(--gray-800);
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-orange-light);
}

.task-details-field {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.task-details-field:last-child {
    margin-bottom: 0;
}

.task-details-field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-details-field .value {
    font-size: 1rem;
    color: var(--gray-800);
    padding: 8px 12px;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
}

.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

/* Стили для вложений */
.task-attachments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-attachment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--gray-700);
    transition: all 0.2s ease;
}

.task-attachment:hover {
    background: var(--gray-50);
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.task-attachment i.fa-file {
    font-size: 1.2rem;
    color: var(--primary-orange);
    margin-right: 12px;
}

.task-attachment-info {
    flex: 1;
}

.task-attachment-name {
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--gray-800);
}

.task-attachment-size {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.task-attachment i.fa-download {
    color: var(--primary-orange);
    font-size: 1rem;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .task-details {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-height: 95vh;
    }
}