/* bot_app/web_app/css/pages/tasks.css */

.tasks-container {
    padding: 20px 16px;
}

.tasks-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0;
}

.tasks-header h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    color: var(--text-color);
    font-weight: 600;
    letter-spacing: -0.5px;
}

.tasks-header p {
    margin: 0;
    color: #999;
    font-size: 15px;
}

/* Умный дашборд */
.smart-dashboard {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.dashboard-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
}

.section-header {
    margin-bottom: 16px;
    padding: 0;
    text-align: center;
}

.section-header h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: var(--text-color);
    font-weight: 600;
    letter-spacing: -0.3px;
}

.section-header p {
    margin: 0;
    color: #999;
    font-size: 14px;
}

/* Специальные стили для разных секций */
.ready-section .section-header h3 {
    color: var(--success-color);
}

.completed-section {
    opacity: 0.5;
}

.completed-section .section-header h3 {
    color: #888;
}

.tasks-category {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    transition: none;
}

.tasks-category.clickable-category {
    cursor: pointer;
    position: relative;
}

.tasks-category.clickable-category:hover {
    background: transparent;
    border-color: transparent;
    transform: none;
    box-shadow: none;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0;
}

.category-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-color);
    font-weight: 600;
    letter-spacing: -0.3px;
}

.category-progress {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #999;
}

.category-progress svg {
    opacity: 0.6;
    transition: none;
}

.clickable-category:hover .category-progress svg {
    opacity: 0.6;
}

.tasks-preview {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    opacity: 1;
}

.task-preview-item.completed {
    opacity: 0.5;
    background: rgba(40, 167, 69, 0.05);
    border-color: rgba(40, 167, 69, 0.2);
}

.task-preview-item.ready {
    background: rgba(40, 167, 69, 0.08);
    border-color: rgba(40, 167, 69, 0.3);
}

.task-preview-icon {
    font-size: 16px;
    display: none;
}

.task-preview-title {
    flex-grow: 1;
    color: var(--text-color);
}

.task-preview-status {
    font-size: 9px;
    padding: 3px 6px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-preview-status.ready {
    background: rgba(40, 167, 69, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.task-preview-status.completed {
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.task-preview-status.tracking {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.task-item {
    background: transparent;
    border-radius: 0;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
}

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

.task-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.task-item.completed {
    opacity: 0.5;
    background: rgba(40, 167, 69, 0.03);
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.task-item.ready-to-claim {
    background: rgba(40, 167, 69, 0.05);
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.task-item.completed:last-child,
.task-item.ready-to-claim:last-child {
    border-bottom: none;
}

.task-item.completed .task-info {
    opacity: 1;
}

.task-info {
    flex-grow: 1;
    margin-right: 15px;
}

.task-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    margin: 0 0 6px 0;
    letter-spacing: -0.2px;
}

.task-description {
    font-size: 13px;
    color: #999;
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.task-reward {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 500;
    color: #aaa;
}

.task-reward svg {
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

.task-action {
    flex-shrink: 0;
}

.task-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 80px;
}

.task-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.task-btn.ready {
    background: rgba(40, 167, 69, 0.15);
    border-color: rgba(40, 167, 69, 0.4);
    color: var(--success-color);
}

.task-btn.ready:hover {
    background: rgba(40, 167, 69, 0.2);
    border-color: rgba(40, 167, 69, 0.5);
}

.task-btn.action {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #3b82f6;
}

.task-btn.action:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

.task-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.task-btn.completed {
    background: rgba(40, 167, 69, 0.08);
    border-color: rgba(40, 167, 69, 0.3);
    color: var(--success-color);
    cursor: default;
}

.task-btn.completed:hover {
    background: rgba(40, 167, 69, 0.08);
}

.task-btn.waiting {
    border-color: rgba(255, 255, 255, 0.15);
    color: #888;
    cursor: not-allowed;
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.02);
}

.task-btn.waiting:hover {
    background: rgba(255, 255, 255, 0.02);
}

.task-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.progress-bar {
    flex-grow: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    font-weight: 500;
}

.empty-tasks {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 14px;
}

.task-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    opacity: 0.7;
    display: none;
}

.task-item.completed .task-icon {
    opacity: 0.5;
}

.task-item.completed:hover {
    background: rgba(255, 255, 255, 0.02);
    transform: none;
    cursor: default;
}

/* Анимация для клика */
.task-item:active {
    transform: none;
    transition: none;
}

.task-item.completed:active {
    transform: none;
}

/* Стили для разных типов заданий */
.task-item[data-task-type="daily"],
.task-item[data-task-type="main"],
.task-item[data-task-type="special"] {
    border-left: none;
}

/* Улучшенный стиль для иконок */
.task-icon {
    font-size: 20px;
    margin-right: 12px;
    display: inline-block;
    min-width: 24px;
    text-align: center;
}

/* Статус задания */
.task-status {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.task-status.available {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.task-status.ready {
    background: rgba(40, 167, 69, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.task-status.completed {
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.task-status.tracking {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Адаптивность */
@media (max-width: 480px) {
    .tasks-container {
        padding: 15px 16px;
    }

    .tasks-category {
        padding: 0;
    }

    .task-item {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .task-info {
        margin-right: 0;
        width: 100%;
    }

    .task-action {
        width: 100%;
    }

    .task-btn {
        width: 100%;
        padding: 10px 16px;
    }

    .tasks-header h2 {
        font-size: 24px;
    }

    .task-title {
        font-size: 15px;
    }

    .task-description {
        font-size: 13px;
    }

    .task-status {
        position: static;
        margin-bottom: 8px;
        align-self: flex-start;
    }
}

/* Стили для детальной страницы категории */
.task-category-detail-container {
    padding: 20px 16px;
}

.category-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.tasks-list.detailed {
    gap: 0;
}

.tasks-list.detailed .task-item {
    padding: 16px;
    border-radius: 0;
}

.tasks-list.detailed .task-item:hover {
    transform: none;
    box-shadow: none;
}

/* Адаптивность для статистики */
@media (max-width: 480px) {
    .category-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-number {
        font-size: 24px;
    }

    .category-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .task-preview-item {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
    }
}

/* Стили для фильтра заданий */
.tasks-filter {
    margin-bottom: 40px;
}

.filter-tabs {
    display: flex;
    gap: 0;
    background: transparent;
    border-radius: 0;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    padding: 12px 16px;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: -1px;
}

.filter-tab.active {
    background: transparent;
    color: var(--text-color);
    border-bottom-color: var(--text-color);
}

.filter-tab:not(.active):hover {
    background: transparent;
    color: var(--text-color);
}

.tab-count {
    background: transparent;
    border-radius: 0;
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    margin-left: 0;
    opacity: 0.5;
}

.filter-tab.active .tab-count {
    background: transparent;
    opacity: 0.7;
}

/* Стили для сводки "Что осталось" */
.incomplete-summary {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 40px;
    border: none;
}

.summary-header {
    margin-bottom: 20px;
    padding: 0;
    text-align: center;
}

.summary-header h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: var(--text-color);
    font-weight: 600;
    letter-spacing: -0.3px;
}

.summary-header p {
    margin: 0;
    color: #999;
    font-size: 14px;
}

.incomplete-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 40px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-stat {
    text-align: left;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.summary-stat .stat-number {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.summary-stat .stat-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Адаптивность для фильтра */
@media (max-width: 480px) {
    .filter-tabs {
        flex-direction: row;
        gap: 0;
    }

    .filter-tab {
        justify-content: center;
        gap: 6px;
        font-size: 12px;
        padding: 12px 8px;
    }

    .summary-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .summary-stat {
        padding: 16px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
    }
}