/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Фон в виде тетрадки в клеточку */
.notebook-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -1;
}

/* Основные стили */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    overflow: hidden;
}

/* Навигационная панель */
.navbar {
    border-bottom: 2px solid #e9ecef;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

/* Статистика в навбаре */
.navbar-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    margin-right: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
}

.stat-label {
    color: #6c757d;
    font-weight: 500;
}

.stat-value {
    font-weight: 700;
    font-size: 1.1em;
}

/* Переключатель темы */
.navbar-theme-toggle {
    margin-right: 15px;
}

/* Область поиска в навигации */
.navbar-search {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 20px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(248, 249, 250, 0.8);
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 8px 16px;
    min-width: 300px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-container:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

.search-container:focus-within {
    background: white;
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
    transform: translateY(-2px);
}

.search-icon {
    color: #6c757d;
    font-size: 0.9em;
    margin-right: 8px;
    transition: color 0.3s ease;
}

.search-container:hover .search-icon {
    color: #007bff;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: #333;
    font-size: 0.9em;
    cursor: pointer;
}

.search-input::placeholder {
    color: #6c757d;
    font-weight: 400;
}

.search-shortcut {
    display: flex;
    gap: 2px;
    margin-left: 8px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.search-container:hover .search-shortcut {
    opacity: 1;
}

.search-shortcut kbd {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    padding: 2px 4px;
    font-size: 0.7em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #6c757d;
    font-weight: 500;
}

.nav-link {
    font-weight: 500;
    color: #6c757d !important;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 5px;
    padding: 8px 16px !important;
    position: relative;
}

.nav-link:hover {
    color: #007bff !important;
    background-color: #f8f9fa;
}

.nav-link.active {
    color: #007bff !important;
    background-color: #e3f2fd;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background-color: #007bff;
    border-radius: 2px 2px 0 0;
}

body.dark-theme .nav-link {
    color: #e0e0e0 !important;
}

body.dark-theme .nav-link:hover {
    color: #007bff !important;
    background-color: #353535;
}

body.dark-theme .nav-link.active {
    color: #007bff !important;
    background-color: #1a237e;
}

/* Основной контейнер */
.main-wrapper {
    display: flex;
    height: calc(100vh - 80px);
    margin-top: 80px;
    padding-top: 20px;
}

/* Боковая панель */
.sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid #dee2e6;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
}

/* Скрытый сайдбар */
.sidebar.hidden {
    width: 0;
    min-width: 0;
    overflow: hidden;
    border-right: none;
    box-shadow: none;
}

.sidebar.collapsed {
    width: 50px;
}

.sidebar.collapsed .sidebar-content {
    display: none;
}

.sidebar.collapsed .sidebar-header h6 {
    display: none;
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.sidebar-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-toggle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #dee2e6;
    background: white;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.sidebar-toggle i {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.sidebar-content {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.tag-item {
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: all 0.2s ease;
    margin-bottom: 10px;
    position: relative;
}

.tag-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tag-item input[type="checkbox"] {
    margin-right: 8px;
}

/* Перетаскиваемые теги */
.tag-item.draggable {
    cursor: grab;
    user-select: none;
    transition: all 0.3s ease;
}

.tag-item.draggable:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.tag-item.draggable:active {
    cursor: grabbing;
    transform: scale(0.98);
}

.tag-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg) scale(1.1);
    z-index: 1000;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.tag-item.dragging .badge {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #007bff !important;
}

/* Активные фильтры */
.tag-item.active {
    background-color: #e3f2fd;
    border: 2px solid #2196f3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.tag-item.active .badge {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tag-item.active input[type="checkbox"] {
    accent-color: #2196f3;
}

/* Зоны сброса на карточках */
.task-card.drop-target {
    border: 2px dashed #007bff !important;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1) 0%, #ffffff 100%) !important;
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3) !important;
    position: relative;
}

.task-card.drop-target::before {
    content: '🎯 Перетащите тег сюда';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    z-index: 10;
    pointer-events: none;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* ==================== ПЕРЕТАСКИВАНИЕ КАРТОЧЕК ==================== */

/* Перетаскиваемая карточка */
.task-card {
    cursor: grab;
    transition: all 0.3s ease;
}

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

/* Карточка в процессе перетаскивания */
.task-card.card-dragging {
    opacity: 0.5;
    transform: rotate(5deg) scale(1.05);
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    cursor: grabbing;
}

/* Зона вставки для карточек */
.task-card.card-drop-zone {
    border: 2px dashed #6c757d;
    background: rgba(108, 117, 125, 0.1);
    transition: all 0.3s ease;
}

/* Целевая карточка для вставки */
.task-card.card-drop-target {
    border: 2px solid #007bff !important;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1) 0%, #ffffff 100%) !important;
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3) !important;
}

/* Индикатор вставки сверху */
.task-card.drop-above::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745);
    border-radius: 2px;
    z-index: 10;
    animation: dropIndicator 0.5s ease-in-out;
}

/* Индикатор вставки снизу */
.task-card.drop-below::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745);
    border-radius: 2px;
    z-index: 10;
    animation: dropIndicator 0.5s ease-in-out;
}

@keyframes dropIndicator {
    0% { 
        opacity: 0; 
        transform: scaleX(0); 
    }
    50% { 
        opacity: 1; 
        transform: scaleX(1.1); 
    }
    100% { 
        opacity: 1; 
        transform: scaleX(1); 
    }
}

/* Иконка перетаскивания на карточке */
.task-card::after {
    content: '⋮⋮';
    position: absolute;
    top: 10px;
    right: 10px;
    color: #6c757d;
    font-size: 12px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.task-card:hover::after {
    opacity: 0.7;
}

.task-card.card-dragging::after {
    opacity: 1;
    color: #007bff;
    transform: scale(1.2);
}

/* ==================== SORTABLEJS СТИЛИ ==================== */

/* Стили для SortableJS */
.sortable-ghost {
    opacity: 0.4;
    background: #f8f9fa;
    border: 2px dashed #007bff;
}

.sortable-chosen {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

.sortable-drag {
    opacity: 0.8;
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

/* Анимация для SortableJS */
.sortable-ghost,
.sortable-chosen,
.sortable-drag {
    transition: all 0.3s ease;
}

/* Основная область контента */
.main-content {
    flex: 1;
    overflow-y: auto;
    background-color: transparent;
    transition: all 0.3s ease;
    padding: 20px;
}

/* Основной контент когда сайдбар скрыт */
.main-content.sidebar-hidden {
    margin-left: 0;
    width: 100%;
}

/* Стилизация карточек в стиле карточных игр */
.task-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    min-height: 200px;
    user-select: none;
}

/* Drag & Drop стили */
.task-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg) scale(1.05);
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.task-card.drag-over {
    border-color: #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
    transform: translateY(-5px);
}

/* Зоны перетаскивания для вкладок */
.nav-link.drop-zone {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link.drop-zone.drag-over {
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%) !important;
    color: #007bff !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.nav-link.drop-zone.drag-over::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px dashed #007bff;
    border-radius: 8px;
    pointer-events: none;
}

/* Индикатор преобразования */
.conversion-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: 600;
    z-index: 10000;
    display: none;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.conversion-indicator.show {
    display: block;
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Сквозной поиск в стиле Spotlight */
.spotlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.spotlight-overlay.show {
    display: flex;
    animation: spotlightFadeIn 0.3s ease-out;
}

@keyframes spotlightFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

.spotlight-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
    overflow: hidden;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.spotlight-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8);
}

.spotlight-icon {
    color: #6c757d;
    font-size: 1.2em;
    margin-right: 12px;
}

.spotlight-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1em;
    background: transparent;
    color: #333;
    font-weight: 500;
}

.spotlight-input::placeholder {
    color: #6c757d;
    font-weight: 400;
}

.spotlight-close {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.2em;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.spotlight-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.spotlight-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 0;
}

.spotlight-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.spotlight-empty i {
    font-size: 2em;
    margin-bottom: 12px;
    opacity: 0.5;
}

.spotlight-empty p {
    margin: 0;
    font-size: 1.1em;
}

.spotlight-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.spotlight-item:hover {
    background: rgba(0, 123, 255, 0.1);
    border-left-color: #007bff;
}

.spotlight-item.selected {
    background: rgba(0, 123, 255, 0.15);
    border-left-color: #007bff;
}

.spotlight-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 1.1em;
}

.spotlight-item-icon.task {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.spotlight-item-icon.note {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.spotlight-item-icon.project {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
}

.spotlight-item-content {
    flex: 1;
}

.spotlight-item-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.spotlight-item-description {
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 4px;
}

.spotlight-item-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.spotlight-item-tags .badge {
    font-size: 0.7em;
    padding: 2px 6px;
}

.spotlight-footer {
    padding: 12px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(248, 249, 250, 0.8);
}

.spotlight-shortcuts {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.shortcut {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    font-size: 0.9em;
}

.shortcut kbd {
    background: #e9ecef;
    border: 1px solid #adb5bd;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.8em;
    font-family: monospace;
}

/* Область тегов как зона перетаскивания */
.tag-filters {
    transition: all 0.3s ease;
    padding: 15px;
    border-radius: 12px;
    background: rgba(248, 249, 250, 0.5);
    border: 2px solid transparent;
}

.tag-filters.drag-over {
    background: rgba(0, 123, 255, 0.1);
    border-color: #007bff;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.2);
    padding: 25px;
}

.tag-filters.drag-over::before {
    content: 'Перетащите карточку сюда для фильтрации';
    display: block;
    text-align: center;
    color: #007bff;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.1em;
}

/* Кнопки управления карточкой */
.task-card .card-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

/* Иконка перетаскивания */
.task-card .drag-handle {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(108, 117, 125, 0.8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: grab;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.task-card:hover .drag-handle {
    opacity: 1;
}

.task-card .drag-handle:hover {
    background: rgba(108, 117, 125, 1);
    transform: scale(1.1);
}

.task-card .drag-handle:active {
    cursor: grabbing;
}

.task-card:hover .card-controls {
    opacity: 1;
}

.task-card .close-btn,
.task-card .expand-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.task-card .close-btn {
    background: rgba(220, 53, 69, 0.9);
}

.task-card .close-btn:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.task-card .expand-btn {
    background: rgba(0, 123, 255, 0.9);
}

.task-card .expand-btn:hover {
    background: #007bff;
    transform: scale(1.1);
}

.task-card .favorite-btn {
    background: rgba(255, 193, 7, 0.9);
}

.task-card .favorite-btn:hover {
    background: #ffc107;
    transform: scale(1.1);
}

.task-card .favorite-btn.favorited {
    background: #ffc107;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

.task-card .favorite-btn.favorited:hover {
    background: #e0a800;
    transform: scale(1.1);
}

/* Стили для карточек заметок и проектов */
.note-card {
    border-left: 4px solid #28a745;
}

.note-card .card-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.project-card {
    border-left: 4px solid #6f42c1;
}

.project-card .card-header {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    color: white;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    border-color: #007bff;
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
}

/* Заголовок карточки */
.card-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
    font-weight: 600;
    font-size: 1.1em;
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #0056b3;
}

/* Тело карточки */
.card-body {
    padding: 25px 20px 20px 20px;
    background: white;
    border-radius: 0 0 10px 10px;
    position: relative;
}

.card-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.3;
}

.card-text {
    color: #666;
    line-height: 1.5;
    font-size: 0.95em;
}

/* Теги в карточках */
.card-tags {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.card-tags .badge {
    font-size: 0.75em;
    padding: 4px 8px;
    border-radius: 12px;
}

/* Плавающие кнопки добавления */
.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    z-index: 1000;
    border: none;
    font-size: 1.2em;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}


/* Кнопка показа скрытого меню */
.sidebar-show-btn {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    border: 2px solid #6c757d;
    background: white;
    color: #6c757d;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.sidebar-show-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}


/* Модальное окно */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.tag-option {
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.tag-option:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

.tag-option.selected {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
}

.task-card {
    animation: fadeInUp 0.5s ease-out;
}

.task-card.closing {
    animation: fadeOutDown 0.3s ease-in forwards;
}

/* Стили для пустого состояния */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.empty-state i {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h4 {
    margin-bottom: 10px;
    color: #495057;
}

.empty-state p {
    font-size: 1.1em;
}

/* Скрытие карточек при фильтрации */
.task-card.hidden {
    display: none !important;
}

/* Полноэкранный режим */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.fullscreen-overlay.show {
    opacity: 1;
    visibility: visible;
}

.fullscreen-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90%;
    width: 800px;
    transform: scale(0.8);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fullscreen-overlay.show .fullscreen-card {
    transform: scale(1);
}

.fullscreen-card .card-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
    font-weight: 600;
    font-size: 1.3em;
    position: relative;
}

.fullscreen-card .card-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.fullscreen-card .card-title {
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.fullscreen-card .card-text {
    color: #666;
    line-height: 1.6;
    font-size: 1.1em;
    margin-bottom: 20px;
}

.fullscreen-card .card-tags {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fullscreen-card .card-tags .badge {
    font-size: 0.9em;
    padding: 6px 12px;
    border-radius: 15px;
}

.fullscreen-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Адаптивность */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .task-card {
        margin-bottom: 15px;
    }
    
    .floating-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .floating-btn-ai {
        bottom: 20px;
        right: 80px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .navbar-search {
        margin-right: 10px;
    }
    
    .search-container {
        min-width: 200px;
    }
    
    .search-shortcut {
        display: none;
    }
}

@media (max-width: 576px) {
    .navbar-search {
        display: none;
    }
    
    .sidebar {
        position: fixed;
        left: -250px;
        top: 80px;
        z-index: 1000;
        transition: left 0.3s ease;
        height: calc(100vh - 80px);
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* ==================== ПОИСК ==================== */

/* Spotlight Overlay */
.spotlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.spotlight-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
    overflow: hidden;
    animation: spotlightSlideIn 0.2s ease-out;
}

@keyframes spotlightSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.spotlight-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.spotlight-icon {
    color: #6c757d;
    margin-right: 12px;
    font-size: 18px;
}

.spotlight-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 18px;
    background: transparent;
    color: #212529;
}

.spotlight-input::placeholder {
    color: #6c757d;
}

.spotlight-close {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.spotlight-close:hover {
    background: #e9ecef;
    color: #495057;
}

.spotlight-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px 0;
}

.spotlight-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.spotlight-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.spotlight-empty p {
    font-size: 16px;
    margin-bottom: 8px;
}

.spotlight-empty small {
    font-size: 14px;
    opacity: 0.7;
}

/* Результаты поиска */
.search-result-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.search-result-item:hover {
    background: #f8f9fa;
    border-left-color: #007bff;
}

.search-result-item.active {
    background: #e3f2fd;
    border-left-color: #2196f3;
}

.result-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    margin-right: 12px;
    color: #6c757d;
    font-size: 16px;
}

.search-result-item.active .result-icon {
    background: #2196f3;
    color: white;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-title {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
    line-height: 1.4;
}

.result-description {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.result-meta .badge {
    font-size: 11px;
    padding: 4px 8px;
}

/* Подсветка совпадений */
mark {
    background: #fff3cd;
    color: #856404;
    padding: 1px 2px;
    border-radius: 2px;
}

.search-result-item.active mark {
    background: #ffeb3b;
    color: #f57c00;
}

/* Футер поиска */
.spotlight-footer {
    padding: 12px 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.spotlight-shortcuts {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.shortcut {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6c757d;
}

.shortcut kbd {
    background: #e9ecef;
    border: 1px solid #adb5bd;
    border-radius: 3px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
    color: #495057;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 4px;
    font-family: monospace;
}

/* Анимация пульса для найденных элементов */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Стили для ИИ функций */
.ai-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 8px;
    border: 1px solid #e1f5fe;
}

.ai-preview h6 {
    color: #1976d2;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ai-preview .alert {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #bbdefb;
}

/* Анимация для ИИ кнопок */
.btn[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Стили для быстрого добавления */
.floating-btn-ai {
    position: fixed;
    bottom: 30px;
    right: 100px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border: none;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-btn-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.6);
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
}

.floating-btn-ai:active {
    transform: translateY(0);
}

/* Стили для анализа ИИ */
#aiAnalysis {
    font-size: 0.9rem;
}

#aiAnalysis strong {
    color: #1976d2;
    font-weight: 600;
}

#aiAnalysis em {
    color: #424242;
    font-style: italic;
}

/* Улучшенные стили для модального окна быстрого добавления */
#quickAddModal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

#quickAddModal .modal-header {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-bottom: 1px solid #e1f5fe;
    border-radius: 12px 12px 0 0;
}

#quickAddModal .modal-title {
    color: #1976d2;
    font-weight: 600;
}

#quickAddModal .form-control:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}

/* Стили для тегов в анализе */
#aiAnalysis .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
}

/* Стили для кнопки в процессе обработки */
.btn.processing {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* Стили для ИИ иконки */
.ai-icon {
    color: #4caf50;
    font-size: 0.9rem;
    margin-right: 0.25rem;
    animation: aiGlow 2s ease-in-out infinite alternate;
}

/* Стили для иконки заметки */
.note-icon {
    color: #ff9800;
    font-size: 0.9rem;
    margin-right: 0.25rem;
    animation: noteGlow 2s ease-in-out infinite alternate;
}

@keyframes noteGlow {
    0% { 
        color: #ff9800;
        text-shadow: 0 0 5px rgba(255, 152, 0, 0.3);
    }
    100% { 
        color: #ffb74d;
        text-shadow: 0 0 8px rgba(255, 152, 0, 0.6);
    }
}

/* Индикатор типа контента */
.content-type-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
    font-size: 0.7rem;
}

@keyframes aiGlow {
    0% { 
        color: #4caf50;
        text-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
    }
    100% { 
        color: #66bb6a;
        text-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
    }
}

/* Стили для карточек с ИИ */
.task-card[data-ai="true"] {
    border-left: 3px solid #4caf50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.02) 0%, rgba(255, 255, 255, 1) 100%);
}

.task-card[data-ai="true"] .card-title {
    color: #2e7d32;
    font-weight: 600;
}

/* Стили для верхней панели действий */
.card-actions {
    position: absolute;
    top: 0;
    right: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.task-card:hover .card-actions {
    opacity: 1;
}

.action-buttons {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 8px 0 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.action-btn:hover {
    transform: scale(1.1);
}

.edit-btn {
    background: #e3f2fd;
    color: #1976d2;
}

.edit-btn:hover {
    background: #bbdefb;
    color: #0d47a1;
}

.favorite-btn {
    background: #fff3e0;
    color: #f57c00;
}

.favorite-btn:hover {
    background: #ffe0b2;
    color: #e65100;
}

.delete-btn {
    background: #ffebee;
    color: #d32f2f;
}

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

/* Индикатор приоритета */
.priority-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.priority-high {
    color: #f44336;
}

.priority-medium {
    color: #ff9800;
}

.priority-low {
    color: #4caf50;
}

/* Кастомный чекбокс для статуса */
.status-toggle {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.status-toggle input {
    opacity: 0;
    position: absolute;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: #e0e0e0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.status-toggle input:checked + .checkmark {
    background: #4caf50;
    color: white;
}

.checkmark::after {
    content: '✓';
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.status-toggle input:checked + .checkmark::after {
    opacity: 1;
}

/* Улучшенные стили для карточек */
.task-card {
    position: relative;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* Градиенты для ИИ карточек */
.gradient-ai {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 50%, #e3f2fd 100%);
    border-left: 4px solid #4caf50;
}

/* Градиенты для заметок */
.gradient-note {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 50%, #ffcc80 100%);
    border-left: 4px solid #ff9800;
}

/* Градиенты по умолчанию */
.gradient-default {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Градиенты для одного тега */
.gradient-single-urgent {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left: 4px solid #f44336;
}

.gradient-single-work {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
}

.gradient-single-personal {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-left: 4px solid #9c27b0;
}

.gradient-single-important {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc80 100%);
    border-left: 4px solid #ff9800;
}

.gradient-single-meeting {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border-left: 4px solid #4caf50;
}

.gradient-single-shopping {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-left: 4px solid #ffc107;
}

.gradient-single-health {
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
    border-left: 4px solid #009688;
}

.gradient-single-entertainment {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    border-left: 4px solid #e91e63;
}

/* Комбинированные градиенты для двух тегов */
.gradient-combo-urgent-work {
    background: linear-gradient(135deg, #ffebee 0%, #e3f2fd 100%);
    border-left: 4px solid #f44336;
}

.gradient-combo-urgent-personal {
    background: linear-gradient(135deg, #ffebee 0%, #f3e5f5 100%);
    border-left: 4px solid #f44336;
}

.gradient-combo-work-personal {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-left: 4px solid #2196f3;
}

.gradient-combo-work-important {
    background: linear-gradient(135deg, #e3f2fd 0%, #fff3e0 100%);
    border-left: 4px solid #2196f3;
}

.gradient-combo-personal-entertainment {
    background: linear-gradient(135deg, #f3e5f5 0%, #fce4ec 100%);
    border-left: 4px solid #9c27b0;
}

.gradient-combo-shopping-health {
    background: linear-gradient(135deg, #fff8e1 0%, #e0f2f1 100%);
    border-left: 4px solid #ffc107;
}

.gradient-combo-meeting-important {
    background: linear-gradient(135deg, #e8f5e8 0%, #fff3e0 100%);
    border-left: 4px solid #4caf50;
}

.gradient-combo-health-entertainment {
    background: linear-gradient(135deg, #e0f2f1 0%, #fce4ec 100%);
    border-left: 4px solid #009688;
}

/* Дополнительные комбинации */
.gradient-combo-urgent-important {
    background: linear-gradient(135deg, #ffebee 0%, #fff3e0 100%);
    border-left: 4px solid #f44336;
}

.gradient-combo-work-meeting {
    background: linear-gradient(135deg, #e3f2fd 0%, #e8f5e8 100%);
    border-left: 4px solid #2196f3;
}

.gradient-combo-shopping-entertainment {
    background: linear-gradient(135deg, #fff8e1 0%, #fce4ec 100%);
    border-left: 4px solid #ffc107;
}

/* Универсальный fallback для неизвестных комбинаций */
.task-card[class*="gradient-combo-"]:not([class*="gradient-combo-urgent-work"]):not([class*="gradient-combo-urgent-personal"]):not([class*="gradient-combo-work-personal"]):not([class*="gradient-combo-work-important"]):not([class*="gradient-combo-personal-entertainment"]):not([class*="gradient-combo-shopping-health"]):not([class*="gradient-combo-meeting-important"]):not([class*="gradient-combo-health-entertainment"]):not([class*="gradient-combo-urgent-important"]):not([class*="gradient-combo-work-meeting"]):not([class*="gradient-combo-shopping-entertainment"]) {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    border-left: 4px solid #6c757d;
}

/* Специальные стили для расширенных карточек с градиентами */
.task-card.expanded {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    backdrop-filter: blur(10px);
}

.gradient-ai.expanded {
    background: linear-gradient(135deg, rgba(232, 245, 232, 0.95) 0%, rgba(240, 248, 240, 0.95) 50%, rgba(227, 242, 253, 0.95) 100%);
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.task-card.completed {
    opacity: 0.7;
    background: #f5f5f5;
}

.task-card.completed .card-title {
    text-decoration: line-through;
    color: #9e9e9e;
}

/* Стили для заголовка карточки */
.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0;
    line-height: 1.4;
}

/* Стили для описания */
.card-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #666;
    margin-bottom: 12px;
}

/* Стили для тегов */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tags .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

/* Стили для даты */
.text-muted {
    font-size: 0.8rem;
    color: #999;
    display: flex;
    align-items: center;
}

/* Стили для расширенных карточек */
.task-card.expanded {
    transform: scale(1.02);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 10;
    position: relative;
}

.task-card.expanded .card-actions {
    opacity: 1;
}

/* Расширенный контент */
.expanded-content {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    padding: 16px;
    margin-top: 8px;
}

/* Информационные элементы */
.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.info-item i {
    width: 16px;
    text-align: center;
}

/* Прогресс бар */
.progress-section {
    background: rgba(0, 0, 0, 0.02);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.progress {
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Дополнительные действия */
.expanded-actions {
    background: rgba(0, 0, 0, 0.02);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.expanded-actions .btn {
    font-size: 0.8rem;
    padding: 6px 12px;
}

/* ИИ анализ */
.ai-analysis .alert {
    border: none;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-left: 4px solid #4caf50;
}

/* Временная шкала */
.timeline-section {
    background: rgba(0, 0, 0, 0.02);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    margin-bottom: 12px;
}

.timeline-marker {
    position: absolute;
    left: -16px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #dee2e6;
}

.timeline-content {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

/* Анимации для расширения */
.task-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-card.expanded {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Индикатор расширения */
.task-card::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 6px solid #6c757d;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.task-card:hover::after {
    opacity: 1;
}

.task-card.expanded::after {
    border-bottom: none;
    border-top: 6px solid #6c757d;
    opacity: 1;
}

/* Адаптивность для расширенных карточек */
@media (max-width: 768px) {
    .task-card.expanded {
        transform: none;
        margin: 0 -15px;
        border-radius: 0;
    }
    
    .expanded-content {
        padding: 12px;
    }
    
    .expanded-actions .col-4 {
        margin-bottom: 8px;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .spotlight-container {
        width: 95%;
        margin: 0 10px;
    }
    
    .spotlight-header {
        padding: 16px;
    }
    
    .spotlight-input {
        font-size: 16px;
    }
    
    .search-result-item {
        padding: 10px 16px;
    }
    
    .result-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .result-title {
        font-size: 15px;
    }
    
    .result-description {
        font-size: 13px;
    }
}

/* ==================== ТЕМНАЯ ТЕМА ==================== */

body.dark-theme {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-theme .notebook-background {
    background-color: #1a1a1a;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

body.dark-theme .navbar {
    background-color: #2d2d2d !important;
    border-bottom-color: #404040;
    color: #e0e0e0;
}

body.dark-theme .navbar-brand,
body.dark-theme .nav-link {
    color: #e0e0e0 !important;
}

body.dark-theme .nav-link:hover,
body.dark-theme .nav-link.active {
    color: #007bff !important;
}

body.dark-theme .task-card {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #e0e0e0;
}

body.dark-theme .task-card:hover {
    background-color: #353535;
    border-color: #505050;
}

body.dark-theme .modal-content {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark-theme .modal-header,
body.dark-theme .modal-footer {
    border-color: #404040;
}

body.dark-theme .form-control,
body.dark-theme .form-select {
    background-color: #1a1a1a;
    border-color: #404040;
    color: #e0e0e0;
}

body.dark-theme .form-control:focus,
body.dark-theme .form-select:focus {
    background-color: #1a1a1a;
    border-color: #007bff;
    color: #e0e0e0;
}

body.dark-theme .sidebar {
    background-color: #252525;
    border-right-color: #404040;
}

body.dark-theme .search-container {
    background: rgba(45, 45, 45, 0.8);
    border-color: #404040;
}

body.dark-theme .search-container:hover,
body.dark-theme .search-container:focus-within {
    background: #2d2d2d;
    border-color: #007bff;
}

body.dark-theme .stat-label {
    color: #a0a0a0;
}

body.dark-theme .spotlight-container {
    background-color: #2d2d2d;
    border-color: #404040;
}

body.dark-theme .spotlight-input {
    background-color: #1a1a1a;
    color: #e0e0e0;
    border-color: #404040;
}

body.dark-theme .spotlight-result:hover {
    background-color: #353535;
}

body.dark-theme .empty-state {
    color: #a0a0a0;
}

/* ==================== ФИЛЬТРЫ ПРИОРИТЕТА ==================== */

.priority-filters {
    padding: 10px;
}

.priority-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.priority-item:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

body.dark-theme .priority-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* ==================== ИИ МОДАЛЬНОЕ ОКНО ==================== */

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ai-step {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-processing {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-analysis-result {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
}

body.dark-theme .ai-analysis-result {
    background: #2d2d2d;
}

.tag-badge {
    cursor: pointer;
    transition: transform 0.2s;
    font-size: 0.9em;
    padding: 6px 12px;
}

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

.tag-badge .btn-close {
    opacity: 0.7;
}

.tag-badge .btn-close:hover {
    opacity: 1;
}

#aiNewTag {
    margin-top: 10px;
}

#aiPriorityGroup .btn-group {
    display: flex;
    gap: 0;
}

#aiPriorityGroup .btn {
    flex: 1;
    border-radius: 0;
}

#aiPriorityGroup .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

#aiPriorityGroup .btn:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.modal-lg {
    max-width: 800px;
}