
        .homework-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 28px;
            flex-wrap: wrap;
            gap: 16px;
        }

        .filter-tabs {
            display: flex;
            background: white;
            border-radius: 50px;
            padding: 6px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.05);
            gap: 4px;
        }

        .filter-tab {
            padding: 10px 24px;
            border-radius: 50px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s;
        }

        .filter-tab.active {
            background: var(--primary);
            color: white;
        }

        /* Кастомный селект — под размер фильтров */
        .custom-select {
            position: relative;
            width: 225px;
        }

        .select-header {
            padding: 10px 16px;
            background: white;
            border: 1px solid var(--border);
            border-radius: 50px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-weight: 500;
            font-size: 0.95rem;
            height: 46px;
        }

        .select-header:hover {
            border-color: var(--primary);
        }

        .select-options {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border-radius: 20px;
            box-shadow: 0 15px 35px rgba(0,0,0,0.1);
            margin-top: 8px;
            overflow: hidden;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 0.3s ease;
            z-index: 100;
        }

        .select-options.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .option {
            padding: 12px 20px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .option:hover {
            background: #f8f4ff;
            color: var(--primary);
        }

        .chip {
            padding: 10px 18px;
            background: white;
            border: 1px solid var(--border);
            border-radius: 50px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s;
            white-space: nowrap;
            height: 46px;
            display: flex;
            align-items: center;
        }

        .chip.active {
            background: #fee2e2;
            border-color: #ef4444;
            color: #b91c1c;
        }

        /* Старая широкая полоса стриков */
        .stats-bar {
            display: flex;
            gap: 32px;
            background: var(--card-bg);
            padding: 20px 28px;
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.06);
            margin-bottom: 32px;
        }

        .homework-card {
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 26px;
            margin-bottom: 20px;
            transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
            overflow: hidden;
            opacity: 1;
            max-height: 800px;           /* достаточно большое значение */
            transform: translateY(0);
        }

        .homework-card.hidden {
            opacity: 0;
            transform: translateY(30px) scale(0.96);
            margin-bottom: 0;
            padding-top: 0;
            padding-bottom: 0;
            max-height: 0;
            border: 0;
        }

        /* Плавное появление при загрузке страницы */
.homework-card {
    animation: fadeInUp 0.6s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

        
        .progress-container {
            margin: 18px 0;
        }

        .progress-bar {
            height: 6px;
            background: #e5e5e5;
            border-radius: 10px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary), #8A7E6E);
            border-radius: 10px;
            transition: width 1s ease;
        }

        .reward-badge {
            position: absolute;
            top: 20px;
            right: 24px;
            background: #fef3c7;
            color: #d97706;
            padding: 6px 14px;
            border-radius: 30px;
            font-size: 0.83rem;
            font-weight: 600;
        }

        .tag {
            padding: 5px 14px;
            border-radius: 30px;
            font-size: 0.85rem;
            font-weight: 500;
        }

        .stats-bar {
    display: flex;
    align-items: center;
    background: transparent;           /* убрали фон */
    /* background: linear-gradient(135deg, #ffffff, #f8f4ff); */ /* если захочешь вернуть */
    border: none;                      /* убрали рамку */
    border-radius: 24px;
    padding: 20px 28px;
    margin-bottom: 32px;
    gap: 32px;
    flex-wrap: wrap;
    box-shadow: none;                  /* можно оставить лёгкую тень или убрать */
    /* box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05); */ /* если хочешь лёгкую тень */
}

.stat-streak {
    display: flex;
    align-items: center;
    gap: 16px;
}

.streak-icon {
    font-size: 2.9rem;
    line-height: 1;
    animation: flame 2.8s infinite alternate ease-in-out;
}

.streak-info {
    line-height: 1.25;
}

.streak-days {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
}

.xp-today {
    font-size: 0.97rem;
    font-weight: 500;
    color: #10b981;
}

.stats-divider {
    width: 1px;
    height: 54px;
    background: linear-gradient(to bottom, transparent, #e5e7eb, transparent);
}

.stat-item {
    text-align: center;
    min-width: 95px;
}

.stat-number {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-number.percent {
    color: #10b981;
}

.stat-label {
    font-size: 0.86rem;
    color: #6b7280;
    font-weight: 500;
}

@keyframes flame {
    from { transform: scale(1) rotate(-8deg); }
    to   { transform: scale(1.12) rotate(8deg); }
}

.homework-card {
    background: white;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.homework-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* === Новый мотивационный хедер === */
.motivation-hero {
    margin-bottom: 32px;
}

.hero-content h1 {
    font-size: 2.4rem;
    margin: 0 0 8px 0;
}

.motivation-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    margin: 0;
}

/* === Сетка статистики === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.streak-card {
    background: linear-gradient(135deg, #f8f4ff, #F5F1EC);
    border: 1px solid #e0cfff;
}

.stat-icon {
    font-size: 2.6rem;
}

.stat-value {
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1;
}

.stat-value.accent { color: #524438; }
.stat-value.success { color: #10b981; }

.stat-label {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 500;
}

.xp-badge {
    margin-left: auto;
    background: #10b981;
    color: white;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 30px;
    font-weight: 600;
}

/* === Панель инструментов === */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 28px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==================== СЕГОДНЯ В ПРИОРИТЕТЕ ==================== */
.priority-section {
    margin-bottom: 40px;
}

/* === ИСПРАВЛЕННЫЙ ЗАГОЛОВОК ПРИОРИТЕТА === */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;                    /* расстояние между элементами */
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.section-header h3 {
    margin: 0;
    font-size: 1.32rem;
    font-weight: 600;
    color: #1f2937;
}

/* Счётчик теперь сразу после заголовка */
.priority-count {
    background: #fee2e2;
    color: #ef4444;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
    white-space: nowrap;
    margin-left: 4px;             /* маленькое расстояние от текста */
}

/* Иконка сворачивания — в самый конец */
.toggle-icon {
    margin-left: auto;            /* отодвигает иконку вправо */
    transition: transform 0.4s ease;
    font-size: 1.1rem;
    color: #64748b;
}

/* Дополнительно: красивое выравнивание при маленьких экранах */
@media (max-width: 640px) {
    .section-header {
        gap: 8px;
    }
    
    .priority-count {
        font-size: 0.9rem;
        padding: 5px 12px;
    }
}

.priority-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 18px;
}

/* Карточка приоритета */
.priority-card {
    background: white;
    border: 2px solid #f43f5e;
    border-radius: 20px;
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.priority-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(244, 63, 94, 0.15);
}

.priority-card::before {
    content: '⚡';
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 2.2rem;
    opacity: 0.12;
    pointer-events: none;
}

/* Стили внутри приоритетной карточки */
.priority-card .tag {
    font-size: 0.85rem;
}

.priority-card h3 {
    margin: 12px 0 10px 0;
    font-size: 1.15rem;
    line-height: 1.35;
}

.priority-card .deadline {
    color: #ef4444;
    font-weight: 600;
}

.priority-card .progress-container {
    margin: 16px 0;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 28px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Переключатель вида с красивой анимацией */
.view-switcher {
    display: flex;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.view-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #6b7280;
    position: relative;
    z-index: 2;
}

.view-btn:hover {
    color: var(--primary);
    transform: scale(1.05);
}

/* Активная кнопка */
.view-btn.active {
    color: white;
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(82, 68, 56, 0.35);
}

/* Плавный фон-подложка (самая красивая анимация) */
.view-switcher::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 42px;
    height: 42px;
    background: var(--primary);
    border-radius: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 1;
    box-shadow: 0 4px 12px rgba(82, 68, 56, 0.35);
}

/* Сдвиг фона при выборе Grid */
.view-switcher .view-btn[data-view="grid"].active ~ .view-btn,
.view-switcher:has(.view-btn[data-view="grid"].active)::after {
    transform: translateX(46px);
}

/* Поиск */
.search-box {
    position: relative;
    width: 320px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    font-size: 0.98rem;
    outline: none;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(82, 68, 56, 0.1);
}

/* Улучшенные карточки */
.homework-card {
    background: white;
    border: none;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.homework-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

.homework-card h3 {
    font-size: 1.2rem;
    margin: 14px 0 10px 0;
    line-height: 1.35;
}

.tag {
    display: inline-block;
    margin-bottom: 12px;
}

/* Улучшение reward badge */
.reward-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #fef3c7, #fde68c);
    color: #b45309;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.2);
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    display: none;
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    margin-top: 20px;
}

.empty-icon {
    font-size: 4.5rem;
    margin-bottom: 20px;
    opacity: 0.7;
    animation: float 3s ease-in-out infinite;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: #374151;
}

.empty-state p {
    color: #6b7280;
    max-width: 380px;
    margin: 0 auto 28px;
    line-height: 1.5;
}

.reset-btn {
    padding: 14px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.reset-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(82, 68, 56, 0.3);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ==================== УЛУЧШЕННАЯ HEATMAP ==================== */
.heatmap-section {
    background: white;
    border-radius: 20px;
    padding: 20px 24px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    margin-bottom: 36px;
}

.section-header h3 {
    margin: 0 0 16px 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.heatmap {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    padding: 4px 0;
    max-width: 380px;
    margin: 0 auto;
}

.heatmap-day {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.heatmap-day:hover {
    transform: scale(1.25);
    border-radius: 7px;
    box-shadow: 0 0 0 2px rgba(82, 68, 56, 0.3);
}

/* Цвета */
.heatmap-day.level-0 { background: #f1f5f9; }
.heatmap-day.level-1 { background: #EDE8E0; }
.heatmap-day.level-2 { background: #c4a8ff; }
.heatmap-day.level-3 { background: #a370ff; }
.heatmap-day.level-4 { background: #524438; }

.heatmap-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
    font-size: 0.82rem;
    color: #64748b;
}

.heatmap-label {
    font-weight: 500;
}

.heatmap-scale {
    display: flex;
    gap: 3px;
}

.heatmap-scale div {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}
.heatmap-legend {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

/* ==================== СВОРАЧИВАЕМЫЕ БЛОКИ ==================== */
.collapsible-section {
    background: white;
    border-radius: 20px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    margin-bottom: 36px;
    overflow: hidden;
}

.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    cursor: pointer;
    user-select: none;
}

.collapsible-header h3 {
    margin: 0;
    font-size: 1.32rem;
    font-weight: 600;
}

.toggle-icon {
    transition: transform 0.4s ease;
    font-size: 1.1rem;
    color: #64748b;
}

.collapsible-section.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.collapsible-content {
    max-height: 1000px;
    overflow: hidden;
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 24px 24px;
}

.collapsible-section.collapsed .collapsible-content {
    max-height: 0;
    padding-bottom: 0;
}
/* === Прогресс по предметам с Font Awesome === */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.subject-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    gap: 18px;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(82, 68, 56, 0.12);
}

.subject-icon {
    font-size: 2.1rem;
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: #f8fafc;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    color: #4f46e5;
}

.subject-card:hover .subject-icon {
    transform: scale(1.08);
    background: #f0f4ff;
    color: #524438;
}

.subject-info {
    flex: 1;
    min-width: 0;
}

.subject-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #1e2937;
}

.progress-bar-container {
    height: 9px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.progress-percentage {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e2937;
    min-width: 52px;
    text-align: right;
}

/* === ИСПРАВЛЕНИЕ ГЛАВНОЙ ПРОБЛЕМЫ === */
.dashboard-content {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    margin-top: 20px;
    transition: grid-template-columns 0.4s ease;
}

/* Когда панель свёрнута — основная колонка занимает всё пространство */
.dashboard-content.sidebar-collapsed {
    grid-template-columns: 1fr 48px;
    gap: 16px;
}

/* Сама правая колонка */
.sidebar-column {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Свёрнутое состояние */
.sidebar-column.collapsed {
    width: 48px;
    min-width: 48px;
}

/* Плавное исчезновение содержимого */
.sidebar-content {
    transition: all 0.35s ease;
}

/* Когда свёрнуто — немного уменьшаем gap */
@media (max-width: 1150px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    .dashboard-content.sidebar-collapsed {
        grid-template-columns: 1fr;
    }
}

/* Скрываем содержимое, когда свёрнуто */
.sidebar-column.collapsed .sidebar-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

/* Заголовок сворачиваемой панели */
.sidebar-toggle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 16px 12px;
    margin-bottom: 12px;
    background: transparent;
    border: none;
}

.sidebar-toggle-header h3 {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 600;
    color: #374151;
}

/* Кнопка с подсказкой */
.toggle-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.toggle-btn:hover {
    background: #f1f5f9;
    color: #4f46e5;
    transform: scale(1.1);
}

/* Tooltip */
.toggle-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 110%;
    right: 0;
    background: #1f2937;
    color: white;
    font-size: 0.82rem;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.toggle-btn:hover::after {
    opacity: 1;
    visibility: visible;
    top: 100%;
}

/* Когда панель свёрнута */
.sidebar-column.collapsed .sidebar-toggle-header {
    padding: 12px 0;
    justify-content: center;
}

.sidebar-column.collapsed .sidebar-toggle-header h3 {
    display: none;
}

/* Адаптив */
@media (max-width: 1150px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    .sidebar-column {
        order: -1;   /* боковая колонка поднимается вверх на мобильных */
    }
}



@media (max-width: 1150px) {
    .dashboard-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .sidebar-column {
        order: -1; /* боковая колонка сверху на мобильных */
    }
}

/* Приоритетные карточки — адаптив */
.priority-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* было 400px */
    gap: 16px;
}

@media (max-width: 600px) {
    .priority-cards {
        grid-template-columns: 1fr; /* на очень маленьких экранах — одна колонка */
    }
}

/* Компактный вид для приоритетной карточки на мобильных */
@media (max-width: 768px) {
    .priority-card {
        padding: 16px;
    }
    
    .sidebar-column .collapsible-header {
        padding: 16px 20px;
    }
    
    .sidebar-column .priority-count {
        font-size: 0.9rem;
        padding: 5px 11px;
    }
}

/* Сворачиваемая боковая панель */
.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: all 0.4s ease;
    position: relative;
}

.sidebar-toggle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 12px 8px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 8px;
}

.sidebar-toggle-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #374151;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #64748b;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.3s;
}

.toggle-btn:hover {
    background: #f1f5f9;
    color: #374151;
}

/* Анимация сворачивания */
.sidebar-content {
    transition: all 0.4s ease;
    overflow: hidden;
}

.sidebar-column.collapsed .sidebar-content {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
}

/* Когда свёрнуто — делаем колонку уже */
.sidebar-column.collapsed {
    width: 48px;
    min-width: 48px;
}

@media (max-width: 1150px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }
}

.recommendations-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
}

.recommendation-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.rec-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.rec-title {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 1.02rem;
}

.rec-desc {
    font-size: 0.93rem;
    color: #64748b;
    line-height: 1.4;
}

.rec-action {
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rec-action:hover {
    text-decoration: underline;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    gap: 12px;
}

.achievement {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 4px;
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.achievement.locked {
    opacity: 0.45;
    filter: grayscale(1);
}

.achievement-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    background: #f1f5f9;
    border-radius: 50%;
    transition: all 0.3s;
}

.achievement.unlocked .achievement-icon {
    background: linear-gradient(135deg, #fef3c7, #fde68c);
    box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.2);
    transform: scale(1.08);
}

.achievement-label {
    font-size: 0.72rem;
    text-align: center;
    line-height: 1.2;
    font-weight: 500;
    color: #64748b;
    max-width: 65px;
}

.achievement.unlocked .achievement-label {
    color: #1e2937;
}

/* Прогресс достижений */
.achievements-progress {
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    margin: 12px 0;
    overflow: hidden;
}

.achievements-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #524438, #8A7E6E);
    width: 35%;
    border-radius: 10px;
}
/* === Приоритетные карточки — компактный вид === */
.priority-card {
    padding: 20px;
}

.priority-card .reward-badge {
    top: 14px;
    right: 16px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 700;
}

.priority-card h3 {
    font-size: 1.08rem;
    margin: 10px 0 8px 0;
    line-height: 1.3;
}

.priority-card p {
    font-size: 0.92rem;
    margin-bottom: 14px;
}

.priority-card .progress-container {
    margin: 12px 0;
}

/* Кнопка в маленькой карточке — компактная */
.priority-card button {
    background: linear-gradient(90deg, var(--primary), #8A7E6E);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 9px 24px;
    font-weight: 600;
    font-size: 0.93rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(82, 68, 56, 0.3);
    white-space: nowrap;
    margin-top: 6px;
}

.priority-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(82, 68, 56, 0.4);
}

/* Если есть прогрессбар — делаем чуть меньше */
.priority-card .progress-bar {
    height: 5px;
}

/* Убираем лишнее пространство */
.priority-card .deadline {
    font-size: 0.9rem;
}

/* === Кнопки "Продолжить" в основных карточках === */
.homework-card button {
    background: linear-gradient(90deg, var(--primary), #8A7E6E);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 32px;
    font-weight: 600;
    font-size: 0.98rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(82, 68, 56, 0.25);
    white-space: nowrap;
}

.homework-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(82, 68, 56, 0.35);
}

.homework-card button:active {
    transform: translateY(0);
}

/* === Кнопки в приоритетных карточках (маленькое окно) === */
.priority-card button {
    background: linear-gradient(90deg, var(--primary), #8A7E6E);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 11px 28px;
    font-weight: 600;
    font-size: 0.96rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(82, 68, 56, 0.3);
    white-space: nowrap;
    margin-top: 4px;
}

.priority-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(82, 68, 56, 0.4);
}

.priority-card button:active {
    transform: translateY(0);
}

/* Серый вариант для "В процессе" */
.homework-card button.secondary,
.priority-card button.secondary {
    background: #64748b;
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

.homework-card button.secondary:hover,
.priority-card button.secondary:hover {
    background: #475569;
}

/* === Компактные приоритетные карточки — финальная доводка === */
.priority-card {
    padding: 20px;
}

.priority-card .reward-badge {
    top: 14px;
    right: 16px;
    padding: 5px 11px;
    font-size: 0.8rem;
}

.priority-card h3 {
    font-size: 1.07rem;
    margin: 8px 0 6px 0;
    line-height: 1.35;
}

.priority-card p {
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Блок с дедлайном и XP */
.priority-card .bottom-info {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.priority-card .deadline {
    font-size: 0.89rem;
    color: #ef4444;
}

.priority-card .xp-gain {
    font-size: 0.82rem;
    color: #10b981;
    font-weight: 500;
}

/* Кнопка */
.priority-card button {
    background: linear-gradient(90deg, var(--primary), #8A7E6E);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 9px 26px;
    font-weight: 600;
    font-size: 0.94rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(82, 68, 56, 0.3);
    margin-bottom: 8px;
}

.priority-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(82, 68, 56, 0.4);
}

/* ====================== МИНИ-ИГРА ====================== */

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f1f1;
}

.score {
    font-weight: 600;
    color: #524438;
    font-size: 1.05rem;
}

.emoji-question {
    font-size: 5.5rem;
    text-align: center;
    min-height: 120px;
    margin: 25px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.answer-input {
    width: 100%;
    padding: 16px 18px;
    font-size: 1.1rem;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 18px;
    transition: all 0.3s;
}

.answer-input:focus {
    border-color: #8A7E6E;
    box-shadow: 0 0 0 4px rgba(82, 68, 56, 0.15);
    outline: none;
}

/* Кнопки */
.game-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-check, .btn-skip, .btn-end {
    padding: 14px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-check {
    flex: 1;
    background: linear-gradient(90deg, #10b981, #34d399);
    color: white;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn-check:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.45);
}

.btn-skip {
    flex: 1;
    background: #64748b;
    color: white;
}

.btn-skip:hover {
    background: #475569;
}

.btn-end {
    width: 100%;
    background: transparent;
    color: #64748b;
    border: 2px solid #e2e8f0;
    padding: 12px;
}

.btn-end:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

/* Обратная связь */
.feedback {
    min-height: 40px;
    text-align: center;
    font-weight: 600;
    margin: 12px 0;
    font-size: 1.05rem;
}

/* ====================== МИНИ-ИГРА — ПОД СТИЛЬ САЙТА ====================== */

.minigame-card {
    background: linear-gradient(135deg, #f8f4ff, #F5F1EC);
    border: 2px solid #EDE8E0;
    border-radius: 20px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

.minigame-icon {
    font-size: 3.6rem;
    margin-bottom: 16px;
}

.minigame-card h4 {
    margin: 0 0 10px 0;
    font-size: 1.28rem;
    color: #4c1d95;
    font-weight: 600;
}

.minigame-card p {
    color: #6b21a8;
    margin-bottom: 22px;
    line-height: 1.5;
}

/* Кнопка "Начать игру" */
.minigame-btn {
    background: linear-gradient(90deg, var(--primary), #8A7E6E);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(82, 68, 56, 0.35);
    transition: all 0.3s ease;
}

.minigame-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(82, 68, 56, 0.45);
}

/* ====================== САМА ИГРА ====================== */

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f1f1;
}

.score {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

.emoji-question {
    font-size: 5.2rem;
    text-align: center;
    min-height: 130px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.answer-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1rem;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 18px;
    transition: all 0.3s;
}

.answer-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(82, 68, 56, 0.15);
    outline: none;
}

/* Кнопки */
.game-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.btn-check, .btn-skip, .btn-end {
    padding: 14px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-check {
    flex: 1;
    background: linear-gradient(90deg, #10b981, #34d399);
    color: white;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-check:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
}

.btn-skip {
    flex: 1;
    background: #64748b;
    color: white;
}

.btn-skip:hover {
    background: #475569;
}

.btn-end {
    width: 100%;
    background: transparent;
    color: #64748b;
    border: 2px solid #e2e8f0;
    padding: 13px;
    font-weight: 500;
}

.btn-end:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

/* Feedback */
.feedback {
    min-height: 44px;
    text-align: center;
    font-weight: 600;
    margin: 12px 0;
    font-size: 1.05rem;
}

/* ====================== КНОПКИ МИНИ-ИГРЫ ====================== */

.game-actions {
    display: flex;
    gap: 12px;
    margin: 18px 0;
}

.btn-check,
.btn-skip,
.btn-end {
    padding: 14px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

/* Кнопка "Проверить" — зелёная */
.btn-check {
    flex: 1;
    background: linear-gradient(90deg, #10b981, #34d399);
    color: white;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn-check:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.45);
}

/* Кнопка "Пропустить" — серая */
.btn-skip {
    flex: 1;
    background: #64748b;
    color: white;
    box-shadow: 0 6px 20px rgba(100, 116, 139, 0.3);
}

.btn-skip:hover {
    background: #475569;
    box-shadow: 0 8px 22px rgba(71, 85, 105, 0.4);
}

/* Кнопка "Закончить игру" — прозрачная */
.btn-end {
    width: 100%;
    background: transparent;
    color: #64748b;
    border: 2px solid #e2e8f0;
    padding: 13px 20px;
    font-weight: 500;
    margin-top: 8px;
}

.btn-end:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

/* Дополнительно — активное состояние */
.btn-check:active,
.btn-skip:active,
.btn-end:active {
    transform: scale(0.96);
}