/**
 * Task Module Enhancements - CSS
 * Features: Subtasks, Checklists, Mentions, Dependencies, Dashboards
 */

/* ============================================
   FEATURE 2: CHECKLISTS
   ============================================ */

.checklist-section {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.checklist-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.checklist-progress {
    margin-bottom: 15px;
}

.checklist-progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.checklist-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.checklist-progress-text {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.checklist-items {
    margin-bottom: 15px;
}

.checklist-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin-bottom: 5px;
    background: white;
    border-radius: 6px;
    transition: all 0.2s;
}

.checklist-item:hover {
    background: #f5f5f5;
}

.checklist-checkbox {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.checklist-text {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.checklist-text.checked {
    text-decoration: line-through;
    color: #999;
}

.checklist-add {
    display: flex;
    gap: 10px;
}

.checklist-add input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.checklist-add input:focus {
    outline: none;
    border-color: #667eea;
}

.checklist-add button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.checklist-add button:hover {
    background: #5568d3;
}

.btn-icon-sm {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 12px;
    transition: color 0.2s;
}

.btn-icon-sm:hover {
    color: #e74c3c;
}

/* ============================================
   FEATURE 3: MENTION AUTOCOMPLETE
   ============================================ */

.mention-menu {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
    min-width: 250px;
}

.mention-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    color: #333;
}

.mention-item:hover,
.mention-item.selected {
    background: #f0f0f0;
}

.mention-item i {
    margin-right: 8px;
    color: #667eea;
}

.comment-mention {
    color: #667eea;
    font-weight: 600;
    background: #f0f4ff;
    padding: 2px 4px;
    border-radius: 3px;
}

/* ============================================
   FEATURE 4: DEPENDENCY WARNINGS
   ============================================ */

.dependency-warnings {
    margin: 15px 0;
}

.dependency-warning {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.dependency-warning i {
    font-size: 16px;
}

.warning-danger {
    background: #fff5f5;
    color: #c53030;
    border-left: 4px solid #e53e3e;
}

.warning-info {
    background: #f0f9ff;
    color: #2c5282;
    border-left: 4px solid #3182ce;
}

.dependency-icon {
    display: inline-block;
    margin-left: 5px;
    opacity: 0.7;
}

/* ============================================
   FEATURE 1: SUBTASKS
   ============================================ */

.subtasks-section {
    margin: 20px 0;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
}

.subtasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.subtasks-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.subtask-progress {
    font-size: 13px;
    color: #666;
}

.subtask-item {
    padding: 12px;
    margin-bottom: 8px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #667eea;
    cursor: pointer;
    transition: all 0.2s;
}

.subtask-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.subtask-title {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.subtask-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #666;
}

.subtask-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ============================================
   FEATURE 5: DASHBOARD
   ============================================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dashboard-card h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.overdue-alert {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.overdue-alert h3 {
    margin: 0 0 5px 0;
    font-size: 20px;
}

.overdue-alert p {
    margin: 0;
    opacity: 0.9;
}

.overdue-alert .btn {
    background: white;
    color: #ff6b6b;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.overdue-alert .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.my-day-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.my-day-section h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.my-day-tasks {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.my-day-task {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    cursor: pointer;
    transition: all 0.2s;
}

.my-day-task:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.my-day-task.overdue {
    border-left-color: #e74c3c;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 15px;
}

.team-workload-list {
    margin-top: 15px;
}

.team-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #f9f9f9;
    border-radius: 6px;
}

.team-member-name {
    font-weight: 500;
    color: #333;
}

.team-member-tasks {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.task-count-badge {
    padding: 4px 8px;
    background: #667eea;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ============================================
   CARD VIEW SUBTASKS
   ============================================ */

.task-card-wrapper {
    margin-bottom: 15px;
}

.task-card.has-subtasks {
    position: relative;
}

/* Task Card Meta Badges */
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

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

.due-date-badge,
.assignee-badge,
.estimate-badge,
.tag-badge,
.created-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.due-date-badge {
    background: #e8f5e9;
    color: #2e7d32;
}

.due-date-badge.text-danger {
    background: #ffebee;
    color: #c62828;
}

.assignee-badge {
    background: #f3e5f5;
    color: #6a1b9a;
}

.estimate-badge {
    background: #fff3e0;
    color: #e65100;
}

.tag-badge {
    background: #e3f2fd;
    color: #1565c0;
}

.created-badge {
    background: #f5f5f5;
    color: #757575;
    font-size: 11px;
}

.priority-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.project-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.subtask-toggle {
    position: absolute;
    left: 10px;
    top: 15px;
    cursor: pointer;
    color: #667eea;
    padding: 5px;
    z-index: 10;
    transition: all 0.2s;
}

.subtask-toggle:hover {
    color: #5568d3;
    transform: scale(1.1);
}

.subtask-toggle i {
    font-size: 14px;
}

.task-card.has-subtasks .card-main {
    padding-left: 35px;
}

.subtask-progress-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #e8f0fe;
    color: #1967d2;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.subtask-progress-badge i {
    font-size: 11px;
}

.subtask-list {
    padding: 0 15px 10px 35px;
    background: #fafafa;
    border-radius: 0 0 8px 8px;
    margin-top: -5px;
}

.subtask-card {
    margin-bottom: 8px;
    margin-left: 0;
    padding: 10px 12px;
    background: white;
    border-left: 3px solid #667eea;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.subtask-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateX(3px);
}

.subtask-card .card-main {
    padding: 0;
}

.subtask-card h4 {
    font-size: 14px;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.subtask-card h4 i {
    color: #667eea;
    font-size: 12px;
}

.subtask-card p {
    font-size: 13px;
    margin: 0 0 8px 0;
}

.subtask-card .card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
}

.subtask-card .status-badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-todo {
    background: #f0f0f0;
    color: #666;
}

.status-badge.status-in_progress {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-in_review {
    background: #cfe2ff;
    color: #084298;
}

.status-badge.status-completed {
    background: #d1e7dd;
    color: #0f5132;
}

.status-badge.status-cancelled {
    background: #f8d7da;
    color: #842029;
}

.assignee-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #666;
}

.assignee-badge i {
    font-size: 10px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .checklist-add {
        flex-direction: column;
    }

    .overdue-alert {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .subtask-list {
        padding: 0 10px 10px 20px;
    }

    .subtask-card {
        margin-left: 0;
    }
}
