/* ProjectFlow Custom Styles */

/* Status Colors */
.status-draft { background-color: #f1f5f9; color: #64748b; border-color: #cbd5e1; }
.status-todo { background-color: #f0f9ff; color: #0369a1; border-color: #bae6fd; }
.status-in_progress { background-color: #fffbeb; color: #b45309; border-color: #fde68a; }
.status-review { background-color: #faf5ff; color: #7c3aed; border-color: #ddd6fe; }
.status-cancel { background-color: #fff1f2; color: #e11d48; border-color: #fecdd3; }
.status-done { background-color: #f0fdf4; color: #15803d; border-color: #bbf7d0; }

.status-dot-draft { background-color: #94a3b8; }
.status-dot-todo { background-color: #0ea5e9; }
.status-dot-in_progress { background-color: #f59e0b; }
.status-dot-review { background-color: #8b5cf6; }
.status-dot-cancel { background-color: #f43f5e; }
.status-dot-done { background-color: #22c55e; }

/* Kanban */
.kanban-column {
    min-height: 200px;
    transition: background-color 0.2s;
}
.kanban-column.drag-over {
    background-color: rgba(91, 173, 143, 0.08);
}
.task-card {
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: grab;
}
.task-card:active { cursor: grabbing; }
.task-card.sortable-ghost {
    opacity: 0.4;
    transform: rotate(2deg);
}
.task-card.sortable-chosen {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: scale(1.02);
}
.task-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Calendar */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}
.calendar-day {
    min-height: 80px;
    padding: 4px;
    background: white;
    transition: background-color 0.15s;
}
.calendar-day:hover { background-color: #f9fafb; }
.calendar-day.today { background-color: #f0fdf4; }
.calendar-day.other-month { opacity: 0.4; }
.calendar-task-dot {
    width: 100%;
    padding: 1px 4px;
    font-size: 10px;
    border-radius: 3px;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}
.calendar-task-dot:hover { opacity: 0.8; }

/* Timeline / Gantt */
.timeline-container {
    overflow-x: auto;
    position: relative;
}
.timeline-row {
    display: flex;
    align-items: center;
    min-height: 36px;
    border-bottom: 1px solid #f1f5f9;
}
.timeline-row:hover { background-color: #f9fafb; }
.timeline-label {
    min-width: 200px;
    max-width: 200px;
    padding: 4px 8px;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}
.timeline-bar-area {
    flex: 1;
    position: relative;
    min-height: 36px;
}
.timeline-bar {
    position: absolute;
    height: 24px;
    top: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 11px;
    color: white;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 20px;
}
.timeline-bar:hover {
    opacity: 0.9;
    transform: scaleY(1.1);
}
.timeline-today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #ef4444;
    z-index: 10;
}
.timeline-header-cell {
    text-align: center;
    font-size: 11px;
    color: #6b7280;
    border-right: 1px solid #f1f5f9;
    padding: 4px 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Budget bar */
.budget-bar {
    height: 8px;
    border-radius: 4px;
    background-color: #e5e7eb;
    overflow: hidden;
}
.budget-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

/* Modal backdrop */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

/* Toast */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease-out;
    max-width: 360px;
}
.toast-success { background-color: #22c55e; }
.toast-error { background-color: #ef4444; }
.toast-info { background-color: #3b82f6; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .kanban-columns {
        flex-direction: column;
    }
    .kanban-column {
        min-height: auto;
    }
    .calendar-day {
        min-height: 50px;
        padding: 2px;
    }
    .calendar-task-dot {
        font-size: 8px;
        padding: 0 2px;
    }
    .timeline-label {
        min-width: 120px;
        max-width: 120px;
        font-size: 11px;
    }
}

/* Print styles */
@media print {
    .no-print { display: none !important; }
    body { background: white; }
    .task-card { break-inside: avoid; }
    .kanban-column { break-inside: avoid; }
}

/* Subtask indent */
.subtask-item {
    border-left: 3px solid #5BAD8F;
    margin-left: 12px;
    padding-left: 12px;
}

/* Priority badges */
.priority-low { background-color: #f1f5f9; color: #64748b; }
.priority-medium { background-color: #fef3c7; color: #92400e; }
.priority-high { background-color: #fee2e2; color: #991b1b; }
