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

:root {
    /* Светлая тема */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f7fa;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.1);
    --primary-color: #3498db;
    --secondary-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #9b59b6;
    
    /* Цвета локаций */
    --location-aircraft: #2196F3;
    --location-warehouse: #FF9800;
    --location-pdo: #4CAF50;
    --location-office: #9C27B0;
}

[data-theme="dark"] {
    /* Темная тема */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #f0f0f0;
    --text-secondary: #b0b0b0;
    --border-color: #404040;
    --shadow: rgba(0, 0, 0, 0.3);
    --primary-color: #3498db;
    --secondary-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #9b59b6;
    
    /* Цвета локаций остаются теми же */
    --location-aircraft: #2196F3;
    --location-warehouse: #FF9800;
    --location-pdo: #4CAF50;
    --location-office: #9C27B0;
}

/* Цветовые классы для локаций */
.location-aircraft {
    --location-color: var(--location-aircraft);
    --location-bg: rgba(33, 150, 243, 0.1);
    --location-border: var(--location-aircraft);
    --location-icon: '✈️';
}

.location-warehouse {
    --location-color: var(--location-warehouse);
    --location-bg: rgba(255, 152, 0, 0.1);
    --location-border: var(--location-warehouse);
    --location-icon: '📦';
}

.location-pdo {
    --location-color: var(--location-pdo);
    --location-bg: rgba(76, 175, 80, 0.1);
    --location-border: var(--location-pdo);
    --location-icon: '📋';
}

.location-office {
    --location-color: var(--location-office);
    --location-bg: rgba(156, 39, 176, 0.1);
    --location-border: var(--location-office);
    --location-icon: '🏢';
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    padding: 20px;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow);
    padding: 30px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

header h1 {
    color: var(--text-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 1.1rem;
}

    .controls {
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .search-section {
        width: 100%;
    }
    
    .search-section input {
        width: 100%;
        padding: 12px;
        border: 2px solid var(--border-color);
        border-radius: 8px;
        font-size: 1rem;
        background-color: var(--bg-primary);
        color: var(--text-primary);
        transition: border-color 0.3s;
    }
    
    .search-section input:focus {
        outline: none;
        border-color: var(--primary-color);
    }
    
    .filter-section {
        width: 100%;
    }
    
    .filter-section label {
        display: block;
        margin-bottom: 10px;
        font-weight: 600;
        color: var(--text-primary);
    }
    
    .location-filters {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .location-filter {
        padding: 8px 16px;
        border: 2px solid var(--border-color);
        border-radius: 20px;
        background: var(--bg-primary);
        color: var(--text-primary);
        cursor: pointer;
        transition: all 0.3s;
        font-size: 0.9rem;
    }
    
    .location-filter:hover {
        border-color: var(--primary-color);
    }
    
    .location-filter.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }
    
    .action-section {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .new-task-btn, .export-btn, .import-btn {
        padding: 10px 20px;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1rem;
        transition: background-color 0.3s;
        color: white;
    }
    
    .new-task-btn {
        background-color: var(--secondary-color);
    }
    
    .new-task-btn:hover {
        background-color: #219653;
    }
    
    .export-btn {
        background-color: var(--info-color);
    }
    
    .export-btn:hover {
        background-color: #8e44ad;
    }
    
    .import-btn {
        background-color: var(--warning-color);
    }
    
    .import-btn:hover {
        background-color: #e67e22;
    }

    .header-controls {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .header-actions {
        display: flex;
        align-items: center;
        gap: 15px;
    }
    
    .language-select {
        padding: 8px 12px;
        border: 2px solid var(--border-color);
        border-radius: 6px;
        background: var(--bg-primary);
        color: var(--text-primary);
        font-size: 0.9rem;
    }
    
    .user-menu {
        background: none;
        border: 2px solid var(--border-color);
        border-radius: 6px;
        padding: 8px 12px;
        cursor: pointer;
        color: var(--text-primary);
        transition: border-color 0.3s;
    }
    
    .user-menu:hover {
        border-color: var(--primary-color);
    }

    .theme-toggle {
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 8px;
        border-radius: 50%;
        transition: background-color 0.3s;
    }

    .theme-toggle:hover {
        background-color: var(--border-color);
    }

    .theme-section {
        flex: 0 0 auto;
    }

    .theme-toggle {
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 8px;
        border-radius: 50%;
        transition: background-color 0.3s;
        color: var(--text-color);
    }

    .theme-toggle:hover {
        background-color: var(--border-color);
    }

.filter-section {
        flex: 1;
        min-width: 300px;
    }

    .search-section {
        flex: 1;
        min-width: 300px;
    }

    .search-section input {
        width: 100%;
        padding: 12px;
        border: 2px solid var(--border-color);
        border-radius: 8px;
        font-size: 1rem;
        background-color: var(--card-bg);
        color: var(--text-color);
        transition: border-color 0.3s;
    }

    .search-section input:focus {
        outline: none;
        border-color: var(--primary-color);
    }

.filter-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.filter-section select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: border-color 0.3s;
}

.filter-section select:focus {
        outline: none;
        border-color: var(--primary-color);
    }

#showAllTasks {
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

#showAllTasks:hover {
    background-color: #2980b9;
}

.add-task-section {
    flex: 2;
    min-width: 400px;
}

.add-task-section h2 {
        color: var(--text-color);
        margin-bottom: 20px;
        font-size: 1.8rem;
    }

    .form-group select {
        width: 100%;
        padding: 12px;
        border: 2px solid var(--border-color);
        border-radius: 8px;
        font-size: 1rem;
        background-color: var(--card-bg);
        color: var(--text-color);
        transition: border-color 0.3s;
    }

    .form-group select:focus {
        outline: none;
        border-color: var(--primary-color);
    }

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
        width: 100%;
        padding: 12px;
        border: 2px solid var(--border-color);
        border-radius: 8px;
        font-size: 1rem;
        background-color: var(--card-bg);
        color: var(--text-color);
        transition: border-color 0.3s;
    }

    .form-group input:focus,
    .form-group textarea:focus {
        outline: none;
        border-color: var(--primary-color);
    }

    .form-group select {
        width: 100%;
        padding: 12px;
        border: 2px solid var(--border-color);
        border-radius: 8px;
        font-size: 1rem;
        background-color: var(--card-bg);
        color: var(--text-color);
        transition: border-color 0.3s;
    }

    .form-group select:focus {
        outline: none;
        border-color: var(--primary-color);
    }

.add-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-btn:hover {
    background-color: #219653;
}

.task-list {
        margin-top: 30px;
    }

    .task-list .aircraft-section {
        margin-bottom: 30px;
    }

    .task-list .task {
        margin-bottom: 20px;
        cursor: move;
        transition: border-color 0.2s;
    }

    .task-list .task:last-child {
        margin-bottom: 0;
    }

    .task-list .task:first-child {
        margin-top: 0;
    }

    .task-list .task .task-header {
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .task-list .task .task-header {
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .task-list .task .task-header {
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    /* Task History Styles */
    .task-history-section {
        margin-top: 40px;
        padding-top: 30px;
        border-top: 2px solid var(--border-color);
    }

    .task-history-section h2 {
        color: var(--text-color);
        margin-bottom: 20px;
        font-size: 1.8rem;
    }

    .task-history-controls {
        display: flex;
        gap: 15px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }

    .task-history-controls button {
        padding: 10px 20px;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1rem;
        transition: background-color 0.3s;
        color: white;
    }

    .task-history-controls .export-btn {
        background-color: var(--secondary-color);
    }

    .task-history-controls .export-btn:hover {
        background-color: #219653;
    }

    .task-history-controls .clear-btn {
        background-color: var(--danger-color);
    }

    .task-history-controls .clear-btn:hover {
        background-color: #c0392b;
    }

    .task-history {
        background: var(--card-bg);
        border: 2px solid var(--border-color);
        border-radius: 10px;
        padding: 20px;
        max-height: 400px;
        overflow-y: auto;
    }

    .history-date-section {
        margin-bottom: 20px;
    }

    .history-date-section h4 {
        color: var(--text-color);
        margin-bottom: 10px;
        padding-bottom: 5px;
        border-bottom: 1px solid var(--border-color);
    }

    .history-item {
        color: var(--text-color);
        padding: 8px 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 0.95rem;
    }

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

    /* Drag and Drop Styles */
    .task.dragging {
        opacity: 0.5;
    }

    .task.drag-over {
        border: 2px dashed var(--primary-color);
        background-color: rgba(52, 152, 219, 0.1);
    }

.aircraft-section {
    margin-bottom: 30px;
}

.aircraft-section h3 {
        color: var(--text-color);
        font-size: 1.5rem;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--border-color);
    }

    .aircraft-section h3::before {
        content: '✈ ';
        margin-right: 8px;
    }

    .aircraft-section .aircraft-header {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .aircraft-section .aircraft-header h3 {
        margin: 0;
    }

    .aircraft-section .aircraft-header h3 {
        margin: 0;
    }

    .aircraft-section .aircraft-header h3 {
        margin: 0;
    }

.task {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

    .task:hover .task-header {
        border-color: var(--primary-color);
    }

    .task:hover .task-footer {
        border-color: var(--primary-color);
    }

    .task:hover .task-header .task-title {
        color: var(--primary-color);
    }

    .task:hover .task-header .task-title h4 {
        color: var(--primary-color);
    }

    .task:hover .task-header .task-title h4 {
        color: var(--primary-color);
    }

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

    .priority-badge {
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.8rem;
        font-weight: 600;
    }

    .priority-high {
        background-color: var(--danger-color);
        color: white;
    }

    .priority-medium {
        background-color: var(--warning-color);
        color: white;
    }

    .priority-low {
        background-color: var(--secondary-color);
        color: white;
    }

    .priority-badge::before {
        margin-right: 4px;
    }

    .priority-high::before {
        content: '🔴';
    }

    .priority-medium::before {
        content: '🟡';
    }

    .priority-low::before {
        content: '🟢';
    }

    .priority-badge.priority-high {
        border: 2px solid var(--danger-color);
    }

    .priority-badge.priority-medium {
        border: 2px solid var(--warning-color);
    }

    .priority-badge.priority-low {
        border: 2px solid var(--secondary-color);
    }

    .priority-badge {
        margin-right: 10px;
    }

    .priority-badge {
        margin-right: 10px;
    }

    .priority-badge {
        margin-right: 10px;
    }

    .priority-medium::before {
        content: '🟡';
    }

    .priority-badge.priority-high {
        border: 2px solid var(--danger-color);
    }

    .priority-badge.priority-medium {
        border: 2px solid var(--warning-color);
    }

    .priority-badge.priority-low {
        border: 2px solid var(--secondary-color);
    }

    .priority-badge {
        margin-right: 10px;
    }

    .priority-badge {
        margin-right: 10px;
    }

    .due-date {
        margin-top: 10px;
        padding: 8px;
        background-color: var(--info-color);
        border-radius: 6px;
        font-size: 0.9rem;
        color: white;
    }

    .due-date.overdue {
        background-color: var(--danger-color);
    }

    .due-date::before {
        content: '📅 ';
        margin-right: 4px;
    }

    .due-date.overdue::before {
        content: '⚠️ ';
    }

    .due-date {
        margin-right: 10px;
    }

    .due-date {
        margin-right: 10px;
    }

    .due-date {
        margin-right: 10px;
    }

    .due-date::before {
        content: '📅 ';
        margin-right: 4px;
    }

    .due-date.overdue::before {
        content: '⚠️ ';
    }

.task-header h4 {
        color: var(--text-color);
        font-size: 1.2rem;
        margin: 0;
    }

    .task-header .priority-badge {
        margin-left: 10px;
    }

    .task-header .task-actions {
        margin-left: auto;
    }

    .task-header .task-title {
        flex: 1;
    }

    .task-header .task-title h4 {
        margin: 0;
    }

    .task-header .task-title h4 {
        margin: 0;
    }

    .task-header .task-title h4 {
        margin: 0;
    }

.task-actions {
    display: flex;
    gap: 10px;
}

.task-actions button {
        padding: 8px 16px;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-size: 0.9rem;
        transition: background-color 0.3s;
        color: white;
    }

    .task-actions .edit-btn {
        background-color: var(--primary-color);
    }

    .task-actions .edit-btn:hover {
        background-color: #2980b9;
    }

    .task-actions .delete-btn {
        background-color: var(--danger-color);
    }

    .task-actions .delete-btn:hover {
        background-color: #c0392b;
    }

.edit-btn {
    background-color: var(--primary-color);
    color: white;
}

.edit-btn:hover {
    background-color: #2980b9;
}

.delete-btn {
    background-color: var(--danger-color);
    color: white;
}

.delete-btn:hover {
    background-color: #c0392b;
}

.subtasks {
    margin-top: 15px;
}

.subtasks .subtask-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.subtask-item input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.subtask-item input[type="checkbox"]:checked + span,
.subtask-item input[type="checkbox"]:checked + .subtask-display-text {
    text-decoration: line-through;
    opacity: 0.5;
}

.subtask-display-text {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.subtasks .subtask-item:last-child {
    margin-bottom: 0;
}


.task-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 15px;
        padding-top: 10px;
        border-top: 1px solid var(--border-color);
    }

    .task-footer .status-badge {
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 0.9rem;
        font-weight: 600;
    }

    .task-footer .timestamp {
        color: var(--text-color);
        opacity: 0.7;
        font-size: 0.9rem;
    }

    .task-footer .status-badge {
        margin-right: 10px;
    }

    .task-footer .timestamp {
        margin-left: 10px;
    }

    .task-footer .status-badge {
        margin-right: 10px;
    }

    .task-footer .timestamp {
        margin-left: 10px;
    }

    .task-footer .status-badge {
        margin-right: 10px;
    }

    .task-footer .timestamp {
        margin-left: 10px;
    }

    .task-footer .status-badge {
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 0.9rem;
        font-weight: 600;
    }

    .task-footer .timestamp {
        color: var(--text-color);
        opacity: 0.7;
        font-size: 0.9rem;
    }

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-badge.open {
        background-color: var(--warning-color);
        color: #856404;
    }

    .status-badge.done {
        background-color: var(--secondary-color);
        color: #155724;
    }

    .status-badge.open::before {
        content: '⏳ ';
    }

    .status-badge.done::before {
        content: '✅ ';
    }

    .status-badge {
        margin-right: 10px;
    }

    .status-badge {
        margin-right: 10px;
    }

    .status-badge {
        margin-right: 10px;
    }

    .status-badge {
        margin-right: 10px;
    }

    .status-badge.open::before {
        content: '⏳ ';
    }

    .status-badge.done::before {
        content: '✅ ';
    }

.timestamp {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
}

.no-tasks {
        text-align: center;
        color: var(--text-color);
        opacity: 0.7;
        padding: 40px;
        font-size: 1.1rem;
    }

    .no-tasks::before {
        content: '📋';
        display: block;
        font-size: 3rem;
        margin-bottom: 20px;
        opacity: 0.5;
    }

    .no-tasks::after {
        content: 'No tasks found. Create a new task to get started!';
        display: block;
        margin-top: 20px;
        font-size: 1rem;
        opacity: 0.6;
    }

    .no-tasks .no-tasks-icon {
        font-size: 3rem;
        margin-bottom: 20px;
        opacity: 0.5;
    }

    .no-tasks .no-tasks-message {
        font-size: 1.1rem;
    }

    .no-tasks .no-tasks-icon {
        font-size: 3rem;
        margin-bottom: 20px;
        opacity: 0.5;
    }

    .no-tasks .no-tasks-message {
        font-size: 1.1rem;
    }

    .no-tasks .no-tasks-icon {
        font-size: 3rem;
        margin-bottom: 20px;
        opacity: 0.5;
    }

    .no-tasks .no-tasks-message {
        font-size: 1.1rem;
    }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 1);
    z-index: 1000;
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px var(--shadow);
    color: var(--text-primary);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.close-btn:hover {
    background-color: var(--border-color);
}

.modal-content .form-group {
    margin: 20px 30px;
}

.modal-content .form-group label {
    color: var(--text-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.modal-content .form-group input,
.modal-content .form-group textarea,
.modal-content .form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.modal-content .form-group input:focus,
.modal-content .form-group textarea:focus,
.modal-content .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
}

.modal-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    color: white;
}

.modal-actions .cancel-btn {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.modal-actions .cancel-btn:hover {
    background-color: #7f8c8d;
}

.modal-actions .save-btn {
    background-color: var(--secondary-color);
}

.modal-actions .save-btn:hover {
    background-color: #219653;
}

.modal-content {
        background-color: var(--card-bg);
        margin: 10% auto;
        padding: 30px;
        border-radius: 12px;
        width: 90%;
        max-width: 600px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
        color: var(--text-color);
    }

    .modal-content .form-group label {
        color: var(--text-color);
        font-weight: 600;
    }

    .modal-content .form-group input,
    .modal-content .form-group textarea,
    .modal-content .form-group select {
        background-color: var(--card-bg);
        color: var(--text-color);
    }

    .modal-content .form-group {
        margin-bottom: 20px;
    }

    .modal-content .form-group {
        margin-bottom: 20px;
    }

    .modal-content .form-group {
        margin-bottom: 20px;
    }

.modal-content h2 {
        color: var(--text-color);
        margin-bottom: 20px;
    }

    .modal-content .form-group label {
        color: var(--text-color);
    }

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions button {
        padding: 10px 20px;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-size: 1rem;
        transition: background-color 0.3s;
        color: white;
    }

    .modal-actions .cancel-btn {
        background-color: var(--border-color);
        color: var(--text-color);
    }

    .modal-actions .cancel-btn:hover {
        background-color: #7f8c8d;
    }

    .modal-actions .save-btn {
        background-color: var(--secondary-color);
    }

    .modal-actions .save-btn:hover {
        background-color: #219653;
    }

    .modal-actions {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        margin-top: 20px;
    }

    .modal-actions .save-btn {
        margin-right: auto;
    }

    .modal-actions .save-btn {
        margin-right: auto;
    }

    .modal-actions .save-btn {
        margin-right: auto;
    }

.save-btn {
    background-color: var(--secondary-color);
    color: white;
}

.save-btn:hover {
    background-color: #219653;
}

.cancel-btn {
    background-color: var(--border-color);
    color: var(--text-color);
}

.cancel-btn:hover {
    background-color: #7f8c8d;
}

/* Location Selector */
.location-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-type-select {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.location-input-group {
    display: flex;
    gap: 10px;
}

.location-identifier-select,
.location-identifier-input {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Location Sections */
.location-section {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 10px;
    background: var(--bg-secondary);
}

.location-section h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.location-section.location-aircraft {
    border-left: 4px solid var(--location-aircraft);
}

.location-section.location-warehouse {
    border-left: 4px solid var(--location-warehouse);
}

.location-section.location-pdo {
    border-left: 4px solid var(--location-pdo);
}

.location-section.location-office {
    border-left: 4px solid var(--location-office);
}

/* Location Info */
.location-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 600;
}

/* Task Description */
.task-description {
    color: var(--text-secondary);
    margin: 10px 0;
    line-height: 1.5;
}

/* Assignee Info */
.assignee-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 10px 0;
}

/* Subtasks - Unified Styles */
.subtasks-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
    background: var(--bg-secondary);
}

.subtask-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 8px;
    padding: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.subtask-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtask-item:last-child {
    margin-bottom: 0;
}

/* Checkbox - unified for both list and modal */
.subtask-item input[type="checkbox"],
.subtask-checkbox {
    width: 16px !important;
    height: 16px !important;
    accent-color: var(--primary-color);
    flex-shrink: 0 !important;
    margin: 0 !important;
}

/* Text input/display - unified */
.subtask-text,
.subtask-display-text {
    flex: 1 !important;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 0;
}

.subtask-text:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.subtask-text::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.remove-subtask-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8rem;
}

.add-subtask-btn {
    background: none;
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s;
    width: 100%;
    text-align: center;
    font-size: 0.95rem;
}

.add-subtask-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(52, 152, 219, 0.05);
}

/* Attachments */
.attachments-section {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.attachment-btn {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.3s;
}

.attachment-btn:hover {
    border-color: var(--primary-color);
}

.attachments-list {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
}

.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin-bottom: 5px;
    background: var(--bg-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.attachment-item:hover {
    background: var(--border-color);
}

.attachment-item:last-child {
    margin-bottom: 0;
}

.attachment-size {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.remove-attachment-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* User Modal */
.user-modal {
    max-width: 400px;
}

.user-info {
    padding: 20px 30px;
}

.user-role {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.user-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.stat {
    text-align: center;
}

.stat span:first-child {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat span:last-child {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.user-actions {
    padding: 0 30px 20px;
}

.dashboard-btn, .logout-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    color: white;
}

.dashboard-btn {
    background-color: var(--info-color);
}

.dashboard-btn:hover {
    background-color: #8e44ad;
}

.logout-btn {
    background-color: var(--danger-color);
}

.logout-btn:hover {
    background-color: #c0392b;
}

/* Import/Export Modal */
.import-export-content {
    padding: 20px 30px;
}

.export-section, .import-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.export-section h3, .import-section h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.export-section p, .import-section p {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    z-index: 2000;
    animation: slideIn 0.3s ease-out;
}

.notification-success {
    background-color: var(--secondary-color);
}

.notification-error {
    background-color: var(--danger-color);
}

.notification-info {
    background-color: var(--info-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
        .container {
            padding: 20px;
        }

        header h1 {
            font-size: 2rem;
        }

        .controls {
            flex-direction: column;
        }

        .add-task-section {
            min-width: 100%;
        }

        .task-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 10px;
        }

        .task-actions {
            width: 100%;
            justify-content: flex-end;
        }

        .header-controls {
            flex-direction: column;
            align-items: flex-start;
            gap: 10px;
        }

        .theme-section {
            width: 100%;
            text-align: right;
        }

        .task-footer {
            flex-direction: column;
            align-items: flex-start;
            gap: 10px;
        }

        .task-footer .status-badge,
        .task-footer .timestamp {
            width: 100%;
            text-align: left;
        }

        .task-header .task-actions {
            margin-left: 0;
            width: 100%;
            justify-content: flex-end;
        }

        .subtasks .subtask-item {
            flex-direction: column;
            align-items: flex-start;
            gap: 5px;
        }

        .subtask-item input[type="checkbox"] {
            margin-right: 0;
            margin-bottom: 5px;
        }

        .task-header .task-title {
            width: 100%;
        }

        .task-header .priority-badge {
            margin-left: 0;
            margin-top: 5px;
        }

        .task-header .task-title h4 {
            margin: 0;
        }

        .task-list .task .task-header {
            border-bottom: none;
            padding-bottom: 0;
            margin-bottom: 0;
        }

        .task-list .task .task-header {
            border-bottom: none;
            padding-bottom: 0;
            margin-bottom: 0;
        }

        .task-list .task .task-header {
            border-bottom: none;
            padding-bottom: 0;
            margin-bottom: 0;
        }
    }
