* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #2c3e50;
    font-size: 2.5em;
    font-weight: 300;
}

#saveBtn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

#saveBtn:hover {
    background: #219a52;
    transform: translateY(-2px);
}

#saveBtn.saving {
    background: #f39c12;
}

#saveBtn.saved {
    background: #27ae60;
}

#saveBtn.error {
    background: #e74c3c;
}

.columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    height: calc(100vh - 150px);
}

.column {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.column-header h2 {
    color: #34495e;
    font-size: 1.5em;
    font-weight: 500;
}

.add-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.add-btn:hover {
    background: #2980b9;
}

.add-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

.drag-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    border: 2px dashed #bdc3c7;
    border-radius: 10px;
    min-height: 400px;
}

.drag-item {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: move;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.drag-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.drag-item.sortable-ghost {
    opacity: 0.4;
    background: #f8f9fa;
}

.drag-item.sortable-chosen {
    transform: rotate(2deg);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.item-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
}

.item-actions {
    display: flex;
    gap: 5px;
}

.edit-btn {
    background: #f39c12;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.edit-btn:hover {
    background: #e67e22;
    transform: scale(1.1);
}

.delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.item-content {
    color: #7f8c8d;
    font-size: 0.9em;
}

.item-meta {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.stage-completed {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.stage-completed .item-title {
    text-decoration: line-through;
    color: #28a745;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.status-not_started {
    background: #f8f9fa;
    color: #6c757d;
}

.status-in_progress {
    background: #fff3cd;
    color: #856404;
}

.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.empty-state {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.modal-close {
    color: #6c757d;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

/* Формы */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-select {
    background: white;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.form-checkbox {
    width: 16px;
    height: 16px;
}

/* Кнопки */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

/* Чекбокс выполнения этапа */
.completion-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.completion-toggle:hover {
    background: #f8f9fa;
}

.completion-icon {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.completion-icon.checked {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.completion-icon.checked::after {
    content: '✓';
    font-size: 12px;
    font-weight: bold;
}

.completion-icon:hover {
    border-color: #28a745;
    transform: scale(1.1);
}

.toggle-label {
    font-size: 0.8em;
    color: #6c757d;
    font-weight: 500;
}

/* Утилиты */
.hidden {
    display: none;
}

.selected {
    border-left: 4px solid #3498db !important;
    background: #f8f9fa !important;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .columns {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .column {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    body{padding:0px;}
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .item-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Стили для скроллбара */
.drag-container::-webkit-scrollbar {
    width: 6px;
}

.drag-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.drag-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.drag-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Критически важные стили для выбора элементов */
.project-item {
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
}

.project-item:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15) !important;
}

.project-item.selected {
    border-left: 4px solid #3498db !important;
    background: #f8f9fa !important;
    transform: translateY(-1px) !important;
}

.node-item {
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
}

.node-item:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15) !important;
}

.node-item.selected {
    border-left: 4px solid #e74c3c !important;
    background: #f8f9fa !important;
    transform: translateY(-1px) !important;
}

/* Отключаем перетаскивание для элементов управления */
.item-actions {
    cursor: default !important;
}

.item-actions * {
    cursor: pointer !important;
}

/* Состояние перетаскивания */
.drag-item.dragging {
    opacity: 0.8 !important;
    transform: rotate(3deg) !important;
}

/* Существующие стили остаются без изменений */

/* Мобильная версия */
.mobile-version {
    display: none;
}

/* Адаптивность - переключение между версиями */
@media (max-width: 768px) {
    .desktop-version {
        display: none !important;
    }
    
    .mobile-version {
        display: block !important;
        height: 100vh;
        background: #f5f5f5;
    }
}

@media (min-width: 769px) {
    .desktop-version {
        display: block !important;
    }
    
    .mobile-version {
        display: none !important;
    }
}

/* Мобильные страницы */
.mobile-page {
    display: none;
    height: 100vh;
    flex-direction: column;
    background: white;
}

.mobile-page.active {
    display: flex;
}

/* Мобильный заголовок */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #3498db;
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-header h1 {
    font-size: 1.2em;
    font-weight: 500;
    margin: 0;
    text-align: center;
    flex: 1;
}

.mobile-menu-btn,
.mobile-back-btn,
.mobile-add-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
    min-width: 40px;
}

.mobile-back-btn {
    font-size: 1.8em;
}

.mobile-add-btn {
    font-size: 1.8em;
    font-weight: bold;
}

/* Мобильное содержимое */
.mobile-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #f5f5f5;
}

/* Мобильный список */
.mobile-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #3498db;
}

.mobile-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.mobile-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.mobile-item-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
    flex: 1;
}

.mobile-item-actions {
    display: flex;
    gap: 5px;
}

.mobile-edit-btn,
.mobile-delete-btn {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.mobile-edit-btn {
    background: #f39c12;
    color: white;
}

.mobile-edit-btn:hover {
    background: #e67e22;
    transform: scale(1.1);
}

.mobile-delete-btn {
    background: #e74c3c;
    color: white;
}

.mobile-delete-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.mobile-item-content {
    color: #7f8c8d;
    font-size: 0.9em;
}

.mobile-item-meta {
    margin-top: 8px;
    font-size: 0.8em;
    color: #95a5a6;
}

/* Мобильный футер (навигация) */
.mobile-footer {
    display: flex;
    background: white;
    border-top: 1px solid #ecf0f1;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.mobile-nav-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #7f8c8d;
}

.mobile-nav-btn.active {
    color: #3498db;
}

.mobile-nav-icon {
    font-size: 1.5em;
}

.mobile-nav-text {
    font-size: 0.7em;
    font-weight: 500;
}

.mobile-nav-btn:hover {
    background: #f8f9fa;
}

.mobile-nav-btn.active {
    background: #e3f2fd;
}

/* Мобильные состояния */
.mobile-empty-state {
    text-align: center;
    color: #95a5a6;
    font-style: italic;
    padding: 40px 20px;
    background: white;
    border-radius: 12px;
    margin: 20px;
}

.mobile-item.selected {
    background: #e3f2fd;
    border-left: 4px solid #e74c3c;
}

/* Мобильные этапы */
.mobile-stage-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #27ae60;
}

.mobile-stage-item.stage-completed {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.mobile-stage-item.stage-completed .mobile-item-title {
    text-decoration: line-through;
    color: #28a745;
}

.mobile-status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 500;
    margin-right: 8px;
}

.mobile-status-not_started {
    background: #f8f9fa;
    color: #6c757d;
}

.mobile-status-in_progress {
    background: #fff3cd;
    color: #856404;
}

.mobile-status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.mobile-completion-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin-top: 8px;
    background: #f8f9fa;
}

.mobile-completion-toggle:hover {
    background: #e9ecef;
}

.mobile-completion-icon {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-completion-icon.checked {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.mobile-completion-icon.checked::after {
    content: '✓';
    font-size: 14px;
    font-weight: bold;
}

.mobile-toggle-label {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 500;
}

/* Анимации для мобильной навигации */
.mobile-page {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Мобильный скроллбар */
.mobile-content::-webkit-scrollbar {
    width: 4px;
}

.mobile-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mobile-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.mobile-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Улучшения для мобильного отображения */
@media (max-width: 480px) {
    .mobile-header {
        padding: 12px;
    }
    
    .mobile-header h1 {
        font-size: 1.1em;
    }
    
    .mobile-item {
        padding: 12px;
    }
    
    .mobile-nav-text {
        font-size: 0.65em;
    }
    
    .mobile-nav-icon {
        font-size: 1.3em;
    }
}

/* Темная тема для мобильных устройств */
/* Исправления для темной темы */

@media (prefers-color-scheme: dark) {
    .mobile-version {
        background: #121212 !important;
        color: #e0e0e0 !important;
    }
    
    .mobile-page {
        background: #121212 !important;
        color: #e0e0e0 !important;
    }
    
    .mobile-content {
        background: #121212 !important;
        color: #e0e0e0 !important;
    }
    
    /* Контейнер списка */
    .mobile-list {
        background: #121212 !important;
    }
    
    .mobile-item {
        background: #1e1e1e !important;
        color: #e0e0e0 !important;
        border-left: 4px solid #bb86fc !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    }
    
    .mobile-item:hover {
        background: #2d2d2d !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.4) !important;
    }
    
    .mobile-item-title {
        color: #ffffff !important;
    }
    
    .mobile-item-content {
        color: #b0b0b0 !important;
    }
    
    .mobile-item-content p {
        color: #b0b0b0 !important;
    }
    
    .mobile-item-meta {
        color: #888888 !important;
    }
    
    .mobile-item-meta small {
        color: #888888 !important;
    }
    
    .mobile-footer {
        background: #1e1e1e !important;
        border-top: 1px solid #333333 !important;
    }
    
    .mobile-empty-state {
        background: #1e1e1e !important;
        color: #888888 !important;
        border: 1px solid #333333 !important;
    }
    
    .mobile-nav-btn {
        color: #888888 !important;
        background: #1e1e1e !important;
    }
    
    .mobile-nav-btn.active {
        color: #bb86fc !important;
        background: #2d2d2d !important;
    }
    
    .mobile-nav-btn:hover {
        background: #2d2d2d !important;
    }
    
    .mobile-header {
        background: #1e1e1e !important;
        color: #ffffff !important;
        border-bottom: 1px solid #333333 !important;
    }
    
    .mobile-menu-btn,
    .mobile-back-btn,
    .mobile-add-btn {
        color: #bb86fc !important;
        background: #1e1e1e !important;
    }
    
    .mobile-menu-btn:hover,
    .mobile-back-btn:hover,
    .mobile-add-btn:hover {
        background: #2d2d2d !important;
    }
    
    /* Стили для этапов в темной теме - ИСПРАВЛЕНЫ */
    .mobile-stage-item {
        background: #1e1e1e !important;
        color: #e0e0e0 !important;
        border-left: 4px solid #03dac6 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    }
    
    .mobile-stage-item.stage-completed {
        background: #1b4332 !important;
        border-left: 4px solid #4caf50 !important;
    }
    
    .mobile-stage-item.stage-completed .mobile-item-title {
        color: #4caf50 !important;
    }
    
    .mobile-stage-item .mobile-item-content {
        color: #b0b0b0 !important;
    }
    
    .mobile-stage-item .mobile-item-content p {
        color: #b0b0b0 !important;
    }
    
    /* Статусные бейджи в темной теме */
    .mobile-status-badge {
        color: #ffffff !important;
        background: #424242 !important;
        padding: 4px 8px !important;
        border-radius: 12px !important;
        font-size: 0.7em !important;
        font-weight: 500 !important;
    }
    
    .mobile-status-not_started {
        background: #424242 !important;
        color: #b0b0b0 !important;
    }
    
    .mobile-status-in_progress {
        background: #5d4037 !important;
        color: #ffb74d !important;
    }
    
    .mobile-status-completed {
        background: #1b4332 !important;
        color: #4caf50 !important;
    }
    
    /* Переключатель выполнения в темной теме */
    .mobile-completion-toggle {
        background: #2d2d2d !important;
        color: #e0e0e0 !important;
        padding: 8px !important;
        border-radius: 6px !important;
        margin-top: 8px !important;
    }
    
    .mobile-completion-toggle:hover {
        background: #3d3d3d !important;
    }
    
    .mobile-completion-icon {
        border-color: #666666 !important;
        background: #2d2d2d !important;
    }
    
    .mobile-completion-icon.checked {
        background: #4caf50 !important;
        border-color: #4caf50 !important;
    }
    
    .mobile-completion-icon:hover {
        border-color: #bb86fc !important;
    }
    
    .mobile-toggle-label {
        color: #b0b0b0 !important;
    }
    
    /* Кнопки действий в темной теме */
    .mobile-edit-btn {
        background: #ff9800 !important;
        color: #121212 !important;
    }
    
    .mobile-edit-btn:hover {
        background: #f57c00 !important;
    }
    
    .mobile-delete-btn {
        background: #f44336 !important;
        color: #ffffff !important;
    }
    
    .mobile-delete-btn:hover {
        background: #d32f2f !important;
    }
    
    /* Выделенные элементы в темной теме */
    .mobile-item.selected {
        background: #2d2d2d !important;
        border-left: 4px solid #ff9800 !important;
    }
    
    /* Скроллбар в темной теме */
    .mobile-content::-webkit-scrollbar-track {
        background: #1e1e1e !important;
    }
    
    .mobile-content::-webkit-scrollbar-thumb {
        background: #424242 !important;
    }
    
    .mobile-content::-webkit-scrollbar-thumb:hover {
        background: #555555 !important;
    }
    
    /* Контейнеры внутри этапов */
    .mobile-stage-item .mobile-item-meta {
        background: transparent !important;
        padding: 0 !important;
        margin-top: 8px !important;
    }
    
    /* Мета-информация в этапах */
    .mobile-stage-item .mobile-item-meta span,
    .mobile-stage-item .mobile-item-meta div {
        background: transparent !important;
    }
}

/* Принудительная темная тема через класс - ИСПРАВЛЕНА */
.mobile-version.dark-theme {
    background: #121212 !important;
    color: #e0e0e0 !important;
}

.mobile-version.dark-theme .mobile-page {
    background: #121212 !important;
    color: #e0e0e0 !important;
}

.mobile-version.dark-theme .mobile-content {
    background: #121212 !important;
    color: #e0e0e0 !important;
}

.mobile-version.dark-theme .mobile-list {
    background: #121212 !important;
}

.mobile-version.dark-theme .mobile-item {
    background: #1e1e1e !important;
    color: #e0e0e0 !important;
    border-left: 4px solid #bb86fc !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

.mobile-version.dark-theme .mobile-item:hover {
    background: #2d2d2d !important;
}

.mobile-version.dark-theme .mobile-item-title {
    color: #ffffff !important;
}

.mobile-version.dark-theme .mobile-item-content {
    color: #b0b0b0 !important;
}

.mobile-version.dark-theme .mobile-item-content p {
    color: #b0b0b0 !important;
}

.mobile-version.dark-theme .mobile-footer {
    background: #1e1e1e !important;
    border-top: 1px solid #333333 !important;
}

.mobile-version.dark-theme .mobile-empty-state {
    background: #1e1e1e !important;
    color: #888888 !important;
    border: 1px solid #333333 !important;
}

.mobile-version.dark-theme .mobile-stage-item {
    background: #1e1e1e !important;
    color: #e0e0e0 !important;
    border-left: 4px solid #03dac6 !important;
}

.mobile-version.dark-theme .mobile-stage-item.stage-completed {
    background: #1b4332 !important;
    border-left: 4px solid #4caf50 !important;
}

.mobile-version.dark-theme .mobile-stage-item .mobile-item-content {
    color: #b0b0b0 !important;
}

.mobile-version.dark-theme .mobile-stage-item .mobile-item-content p {
    color: #b0b0b0 !important;
}

.mobile-version.dark-theme .mobile-completion-toggle {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
}

.mobile-version.dark-theme .mobile-status-badge {
    color: #ffffff !important;
}

/* Убедимся, что все текстовые элементы наследуют цвет */
.mobile-content * {
    color: inherit !important;
}

.mobile-item * {
    color: inherit !important;
}

.mobile-stage-item * {
    color: inherit !important;
}

/* Специфичные исправления для текста внутри элементов */
.mobile-item-content p,
.mobile-item-meta small,
.mobile-toggle-label,
.mobile-status-badge {
    color: inherit !important;
}

/* Исправления для контейнера контента */
.mobile-content {
    background: inherit !important;
}

.mobile-list {
    background: inherit !important;
}

/* Улучшения для этапов */
.mobile-stage-item .mobile-item-meta {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 10px !important;
}

.mobile-stage-item .mobile-item-meta > * {
    background: transparent !important;
}

/* Переключатель темы для мобильной версии */
.mobile-theme-toggle {
    position: absolute;
    right: 50px;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2em;
    cursor: pointer;
    z-index: 1000;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (prefers-color-scheme: dark) {
    .mobile-theme-toggle {
        background: rgba(255,255,255,0.1) !important;
    }
    
    .mobile-theme-toggle:hover {
        background: rgba(255,255,255,0.2) !important;
    }
}

.mobile-version.dark-theme .mobile-theme-toggle {
    background: rgba(255,255,255,0.1) !important;
}

.mobile-version.dark-theme .mobile-theme-toggle:hover {
    background: rgba(255,255,255,0.2) !important;
}

/* Исправление позиционирования кнопок в хедере */
.mobile-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
}

.mobile-header h1 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
}

.mobile-header .mobile-menu-btn,
.mobile-header .mobile-back-btn {
    order: 1;
}

.mobile-header .mobile-theme-toggle {
    order: 2;
    position: static;
    margin-left: auto;
    margin-right: 10px;
}

.mobile-header .mobile-add-btn {
    order: 3;
}