/* ===================================
   Gantt Chart Styles
   Piyon Planner - Responsive Gantt View
   =================================== */

/* ============ WRAPPER ============ */
.gantt-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    background: #121212;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============ CONTROLS ============ */
.gantt-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 12px;
}

.gantt-controls-left,
.gantt-controls-center,
.gantt-controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gantt-nav-btn,
.gantt-today-btn,
.gantt-zoom-btn,
.gantt-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
}

.gantt-nav-btn:hover,
.gantt-today-btn:hover,
.gantt-zoom-btn:hover,
.gantt-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.gantt-nav-btn {
    padding: 8px 10px;
}

.gantt-today-btn {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-color: rgba(99, 102, 241, 0.3);
}

.gantt-today-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(99, 102, 241, 0.2) 100%);
}

.gantt-date-display {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    font-size: 13px;
    color: #b0b0b0;
    margin-left: 8px;
}

/* View Selector */
.gantt-view-selector {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.gantt-view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.gantt-view-btn:hover {
    color: #e0e0e0;
    background: rgba(255, 255, 255, 0.05);
}

.gantt-view-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.gantt-view-btn i {
    font-size: 12px;
}

/* Zoom Controls */
.gantt-zoom-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 4px;
}

.gantt-zoom-level {
    font-size: 11px;
    color: #888;
    min-width: 40px;
    text-align: center;
}

.gantt-zoom-btn {
    padding: 6px 8px;
}

/* ============ CONTENT AREA ============ */
.gantt-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ============ TASK LIST PANEL ============ */
.gantt-task-list {
    width: 350px;
    min-width: 250px;
    max-width: 500px;
    background: #161616;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gantt-task-list-header {
    display: flex;
    background: linear-gradient(135deg, #1e1e1e 0%, #1a1a1a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
    height: 74px;
}

.gantt-task-list-header-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.gantt-task-name-header {
    flex: 1;
    min-width: 120px;
}

.gantt-task-date-header {
    width: 70px;
    justify-content: center;
}

.gantt-task-duration-header {
    width: 50px;
    justify-content: center;
}

.gantt-task-progress-header {
    width: 80px;
    justify-content: center;
}

.gantt-sort-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 2px 4px;
    transition: color 0.2s;
}

.gantt-sort-btn:hover {
    color: #6366f1;
}

.gantt-task-list-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Task Row */
.gantt-task-row {
    display: flex;
    align-items: center;
    height: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}

.gantt-task-row:hover {
    background: rgba(99, 102, 241, 0.08);
}

/* Subtask Row Styling */
.gantt-task-row.is-subtask {
    background: rgba(255, 255, 255, 0.02);
    font-size: 11px;
}

.gantt-task-row.is-subtask::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(99, 102, 241, 0.3);
}

.gantt-task-row.is-subtask .gantt-task-name-col {
    opacity: 0.95;
}

/* Collapse Button in Gantt */
.gantt-collapse-btn {
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    color: #b0b0b0;
    font-size: 9px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    transition: all 0.2s ease;
}

.gantt-collapse-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
    color: #6366f1;
    transform: scale(1.1);
}

.gantt-task-cell {
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 12px;
    color: #d0d0d0;
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    height: 100%;
}

.gantt-task-name {
    flex: 1;
    min-width: 120px;
    gap: 8px;
    overflow: hidden;
}

.gantt-task-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.gantt-status-todo .gantt-task-indicator,
.gantt-task-indicator.gantt-status-todo {
    background: #6366f1;
}

.gantt-status-in-progress .gantt-task-indicator,
.gantt-task-indicator.gantt-status-in-progress {
    background: #f59e0b;
}

.gantt-status-completed .gantt-task-indicator,
.gantt-task-indicator.gantt-status-completed {
    background: #10b981;
}

.gantt-status-overdue .gantt-task-indicator,
.gantt-task-indicator.gantt-status-overdue {
    background: #ef4444;
}

.gantt-task-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-task-date {
    width: 70px;
    justify-content: center;
    font-size: 11px;
    color: #999;
}

.gantt-task-duration {
    width: 50px;
    justify-content: center;
    font-size: 11px;
    color: #888;
}

.gantt-task-progress {
    width: 80px;
    justify-content: center;
    gap: 6px;
}

.gantt-progress-mini {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.gantt-progress-mini-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.gantt-progress-text {
    font-size: 10px;
    color: #888;
    min-width: 28px;
    text-align: right;
}

/* Empty State */
.gantt-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #666;
    text-align: center;
}

.gantt-empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.gantt-empty-state p {
    margin-bottom: 20px;
}

.gantt-add-task-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gantt-add-task-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* ============ RESIZER ============ */
.gantt-resizer {
    width: 4px;
    background: transparent;
    cursor: col-resize;
    position: relative;
    transition: background 0.2s;
}

.gantt-resizer:hover,
.gantt-resizer:active {
    background: rgba(99, 102, 241, 0.5);
}

.gantt-resizer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1px;
}

/* ============ TIMELINE PANEL ============ */
.gantt-timeline {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
    background: #0f0f0f;
}

.gantt-timeline-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #1a1a1a;
    height: 74px;
}

.gantt-timeline-header-row {
    display: flex;
}

.gantt-timeline-header-primary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gantt-timeline-header-secondary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.gantt-header-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    font-size: 11px;
    font-weight: 500;
    color: #888;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
}

.gantt-month-cell,
.gantt-week-cell {
    background: linear-gradient(135deg, #1e1e1e 0%, #181818 100%);
    font-weight: 600;
}

.gantt-header-day-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 2px;
    font-size: 10px;
}

.gantt-header-day-cell.gantt-weekend {
    background: rgba(255, 255, 255, 0.02);
    color: #666;
}

.gantt-header-day-cell.gantt-today {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

.gantt-day-name {
    font-size: 9px;
    color: #666;
    text-transform: uppercase;
}

.gantt-day-number {
    font-weight: 600;
    font-size: 12px;
}

.gantt-day-abbr {
    font-size: 9px;
    color: #555;
}

/* ============ TIMELINE BODY ============ */
.gantt-timeline-body {
    position: relative;
    min-height: 200px;
}

/* Grid */
.gantt-grid {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
}

.gantt-grid-cell {
    position: absolute;
    top: 0;
    height: 100%;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    box-sizing: border-box;
}

.gantt-weekend-cell {
    background: rgba(255, 255, 255, 0.015);
}

.gantt-today-cell {
    background: rgba(99, 102, 241, 0.08);
}

/* Today Marker */
.gantt-today-marker {
    position: absolute;
    top: 0;
    z-index: 12;
    pointer-events: none;
}

.gantt-today-marker-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    background: linear-gradient(180deg, 
        rgba(239, 68, 68, 1) 0%, 
        rgba(239, 68, 68, 0.8) 20%,
        rgba(239, 68, 68, 0.5) 50%,
        rgba(239, 68, 68, 0.2) 80%,
        rgba(239, 68, 68, 0) 100%
    );
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
    border-radius: 2px;
}

.gantt-today-marker-label {
    position: absolute;
    top: 4px;
    left: 6px;
    padding: 3px 8px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* ============ TASK BARS ============ */
.gantt-bars-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    pointer-events: all;
}

.gantt-bar {
    position: absolute;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    pointer-events: all;
}

.gantt-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 11;
}

.gantt-bar-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px 0 0 6px;
    pointer-events: none;
}

.gantt-bar-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 10px;
    z-index: 1;
}

.gantt-bar-title {
    font-size: 11px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    /* Color set dynamically inline for contrast */
}

.gantt-priority-badge {
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

/* Bar Resize Handles */
.gantt-bar-resize {
    position: absolute;
    top: 0;
    width: 8px;
    height: 100%;
    cursor: ew-resize;
    opacity: 0;
    transition: opacity 0.2s;
}

.gantt-bar:hover .gantt-bar-resize {
    opacity: 1;
}

.gantt-bar-resize-start {
    left: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), transparent);
}

.gantt-bar-resize-end {
    right: 0;
    background: linear-gradient(-90deg, rgba(255, 255, 255, 0.3), transparent);
}

/* Status Variants */
.gantt-bar.gantt-status-completed {
    opacity: 0.7;
}

.gantt-bar.gantt-status-overdue {
    animation: gantt-pulse 2s ease-in-out infinite;
}

@keyframes gantt-pulse {
    0%, 100% { box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 2px 12px rgba(239, 68, 68, 0.6); }
}

/* ============ FOOTER ============ */
.gantt-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(135deg, #1a1a1a 0%, #141414 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gantt-legend {
    display: flex;
    gap: 16px;
}

.gantt-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #888;
}

.gantt-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.gantt-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #888;
}

.gantt-stat-divider {
    color: rgba(255, 255, 255, 0.2);
}

/* ============ SCROLLBAR ============ */
.gantt-timeline::-webkit-scrollbar,
.gantt-task-list-body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.gantt-timeline::-webkit-scrollbar-track,
.gantt-task-list-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.gantt-timeline::-webkit-scrollbar-thumb,
.gantt-task-list-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.gantt-timeline::-webkit-scrollbar-thumb:hover,
.gantt-task-list-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .gantt-task-list {
        width: 280px;
        min-width: 200px;
    }
    
    .gantt-task-date-header,
    .gantt-task-date {
        display: none;
    }
    
    .gantt-controls {
        flex-wrap: wrap;
        padding: 10px 12px;
    }
    
    .gantt-view-btn span {
        display: none;
    }
}

@media (max-width: 768px) {
    .gantt-wrapper {
        height: calc(100vh - 180px);
    }
    
    .gantt-task-list {
        width: 180px;
        min-width: 150px;
    }
    
    .gantt-task-duration-header,
    .gantt-task-duration,
    .gantt-task-progress-header,
    .gantt-task-progress {
        display: none;
    }
    
    .gantt-controls-center {
        order: -1;
        flex-basis: 100%;
        justify-content: center;
    }
    
    .gantt-date-display {
        display: none;
    }
    
    .gantt-legend {
        display: none;
    }
    
    .gantt-bar-title {
        font-size: 10px;
    }
    
    .gantt-footer {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .gantt-content {
        flex-direction: column;
    }
    
    .gantt-task-list {
        width: 100% !important;
        max-width: none;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .gantt-resizer {
        display: none;
    }
    
    .gantt-timeline {
        height: calc(100% - 200px);
    }
    
    .gantt-controls-left,
    .gantt-controls-right {
        gap: 4px;
    }
    
    .gantt-nav-btn,
    .gantt-today-btn,
    .gantt-zoom-btn,
    .gantt-action-btn {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .gantt-today-btn span {
        display: none;
    }
    
    .gantt-zoom-controls {
        display: none;
    }
}

/* ============ DARK MODE ENHANCEMENTS ============ */
@media (prefers-color-scheme: dark) {
    .gantt-wrapper {
        background: #0a0a0a;
    }
}

/* ============ PRINT STYLES ============ */
@media print {
    .gantt-wrapper {
        height: auto;
        border: 1px solid #ccc;
    }
    
    .gantt-controls,
    .gantt-footer {
        display: none;
    }
    
    .gantt-task-list,
    .gantt-timeline {
        overflow: visible;
    }
    
    .gantt-bar {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* ============ DRAG & DROP STYLES ============ */

/* Drag tooltip */
.gantt-drag-tooltip {
    position: fixed;
    z-index: 10000;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.5);
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    backdrop-filter: blur(8px);
}

.gantt-tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #e0e0e0;
}

.gantt-tooltip-content strong {
    color: #a5b4fc;
}

/* Bar resize handles - enhanced */
.gantt-bar-resize-handle {
    position: absolute;
    top: 0;
    width: 10px;
    height: 100%;
    cursor: ew-resize;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    z-index: 5;
}

.gantt-bar:hover .gantt-bar-resize-handle {
    opacity: 1;
}

.gantt-bar-resize-handle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gantt-bar-resize-handle.gantt-bar-resize-start {
    left: 0;
    border-radius: 6px 0 0 6px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent);
}

.gantt-bar-resize-handle.gantt-bar-resize-end {
    right: 0;
    border-radius: 0 6px 6px 0;
    background: linear-gradient(-90deg, rgba(255, 255, 255, 0.2), transparent);
}

/* Dragging state */
.gantt-bar-dragging {
    opacity: 0.9;
    z-index: 100 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
    transform: scale(1.02);
}

.gantt-bar-dragging .gantt-bar-resize-handle {
    opacity: 1;
}

/* Task row columns */
.gantt-task-name-col {
    flex: 1;
    min-width: 100px;
    gap: 8px;
    overflow: hidden;
}

.gantt-task-start-col,
.gantt-task-end-col {
    width: 100px;
    justify-content: center;
}

.gantt-task-duration-col {
    width: 50px;
    justify-content: center;
}

/* Date input in task list */
.gantt-date-input {
    width: 90px;
    padding: 4px 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #d0d0d0;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.gantt-date-input:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.gantt-date-input:focus {
    outline: none;
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.5);
}

/* Duration badge */
.gantt-duration-badge {
    padding: 2px 6px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 4px;
    font-size: 10px;
    color: #a5b4fc;
    font-weight: 500;
}

/* Assignee badges on bar */
.gantt-bar-assignees {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.gantt-assignee-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.gantt-assignee-more {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.7);
    padding-left: 2px;
}

/* Row backgrounds in timeline */
.gantt-rows-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
}

.gantt-row-bg {
    position: absolute;
    left: 0;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.gantt-row-bg:nth-child(odd) {
    background: rgba(255, 255, 255, 0.01);
}

/* Task row height adjustment */
.gantt-task-row {
    height: 44px;
}

/* Error state */
.gantt-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #ef4444;
    text-align: center;
}

.gantt-error-state i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.7;
}

.gantt-error-state button {
    margin-top: 16px;
    padding: 8px 16px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s;
}

.gantt-error-state button:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Loading state */
.gantt-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #888;
    gap: 12px;
}

.gantt-loading i {
    font-size: 24px;
    color: #6366f1;
}

/* ============ DEPENDENCY STYLES ============ */

/* Dependency SVG layer */
.gantt-dependencies-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 15;
}

.gantt-dependency-line {
    pointer-events: stroke;
    cursor: pointer;
    stroke-linejoin: round;
    stroke-linecap: round;
    transition: all 0.2s ease;
}

.gantt-dependency-line:hover {
    stroke: #ef4444 !important;
    stroke-width: 4 !important;
    filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.6));
}

/* Dependency remove button on hover */
.gantt-dependency-remove {
    display: none;
    position: absolute;
    width: 28px;
    height: 28px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #ffffff;
    cursor: pointer;
    pointer-events: all;
    z-index: 20;
    transition: all 0.2s ease;
    box-shadow: 0 2px 12px rgba(239, 68, 68, 0.6), 0 0 0 2px rgba(239, 68, 68, 0.2);
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.gantt-dependency-remove:hover {
    transform: scale(1.3);
    background: #dc2626;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.8), 0 0 0 3px rgba(239, 68, 68, 0.3);
}

.gantt-dependency-remove:active {
    transform: scale(1.1);
}

.gantt-dependency-remove i {
    pointer-events: none;
    font-size: 12px;
}

/* Dependency handle on bars */
.gantt-dependency-handle {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: crosshair;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.gantt-dependency-handle i {
    font-size: 8px;
    color: white;
}

.gantt-bar:hover .gantt-dependency-handle {
    opacity: 1;
}

.gantt-dependency-handle:hover {
    transform: translateY(-50%) scale(1.2);
}

/* Target highlighting during drag */
.gantt-bar.gantt-dependency-target {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    transform: scale(1.02);
}

/* Has dependencies indicator */
.gantt-bar.has-dependencies::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #6366f1;
    border-radius: 50%;
    border: 2px solid #1a1a1a;
}

/* Filter button */
.gantt-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.gantt-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.gantt-filter-btn.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.gantt-filter-label {
    font-size: 11px;
    font-weight: 500;
}

/* Legend dependency item */
.gantt-legend-dependency {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gantt-legend-dependency svg {
    opacity: 0.8;
}
