.v2-planner-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 5px); 
    background: #f8fafc;
    overflow: hidden;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 10px; /* Reducido 2pt (aprox) del estándar 12px */
}

/* Toolbar */
.v2-toolbar {
    height: 50px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 10px;
    flex-shrink: 0;
    z-index: 10;
}

.v2-toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
    border-right: 1px solid #e2e8f0;
    padding-right: 10px;
}

.v2-toolbar-group:last-child {
    border-right: none;
}

.v2-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

.v2-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.v2-btn.primary {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.v2-btn.primary:hover {
    background: #2563eb;
}

/* Workspace Layout */
.v2-workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar V2 */
.v2-side-nav {
    width: 60px;
    background: #1e293b;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    gap: 20px;
    flex-shrink: 0;
}

.v2-nav-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 18px;
    position: relative;
}

.v2-nav-item:hover {
    background: #334155;
    color: #fff;
}

.v2-nav-item.active {
    background: #3b82f6;
    color: #fff;
}

.v2-nav-item[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    margin-left: 10px;
    background: #0f172a;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 100;
}

/* Main Content Area */
.v2-main-content {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    min-height: 0;
}

.v2-gantt-wrapper {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
}

/* Permitir mover la linea divisoria de forma clara */
.gantt_grid_resize {
    width: 6px !important;
    background-color: #e2e8f0 !important;
    cursor: col-resize !important;
}

.gantt_grid_resize:hover {
    background-color: #3b82f6 !important;
}

/* WBS Summary Bars (Agrupación) */
.gantt_task_line.task-project {
    background-color: #64748b !important;
    border: none !important;
    height: 8px !important;
    margin-top: 12px !important;
    border-radius: 2px !important;
}

/* Corchetes para barras de resumen (Pseudo-elementos) */
.task-project::before, .task-project::after {
    content: "";
    position: absolute;
    top: 0;
    width: 2px;
    height: 12px;
    background: #475569;
}

.task-project::before { left: 0; }
.task-project::after { right: 0; }

.task-completed {
    background: #10b981 !important;
    border-color: #059669 !important;
    opacity: 0.8;
}

.task-milestone {
    background: #f59e0b !important;
    border-color: #d97706 !important;
}

/* Colores de fuente en la grilla según tipo */
.gantt_cell.task-project-cell { color: #1e293b; font-weight: 700; }
.gantt_cell.task-milestone-cell { color: #d97706; font-weight: 600; }
.gantt_cell.task-normal-cell { color: #475569; }

/* WBS Hierarchy Highlighting */
.wbs-level-0 { font-weight: 900 !important; color: #0f172a !important; font-size: 14px !important; background-color: #f1f5f9 !important; }
.wbs-level-1 { font-weight: 700 !important; color: #1e293b !important; font-size: 13px !important; background-color: #f8fafc !important; }
.wbs-level-2 { font-weight: 600 !important; color: #334155 !important; font-size: 12px !important; }

/* Destacar la fila completa de WBS */
.gantt_row.wbs-level-0 { background-color: #f1f5f9 !important; border-top: 1px solid #cbd5e1 !important; }
.gantt_row.wbs-level-1 { background-color: #f8fafc !important; }

.gantt_tree_content {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Milestones and Shapes */
.gantt_task_line.gantt_milestone {
    border-radius: 0 !important;
    transform: rotate(45deg);
    width: 14px !important;
    height: 14px !important;
    margin-top: 8px !important;
    background-color: #f59e0b !important;
    border: 2px solid #d97706 !important;
}

.gantt_milestone .gantt_task_content {
    display: none;
}

/* Printing Fixes */
@media print {
    body, html {
        background: #fff !important;
        color: #000 !important;
    }
    
    .v2-toolbar, .v2-side-nav, .app-sidebar, .topbar {
        display: none !important;
    }
    
    .v2-planner-container {
        height: auto !important;
        background: #fff !important;
    }
    
    .v2-main-content {
        background: #fff !important;
    }
    
    .gantt_container {
        background: #fff !important;
    }
    
    /* Ensure no dark backgrounds persist */
    .gantt_task_row, .gantt_task_cell, .gantt_grid_data, .gantt_row {
        background: #fff !important;
        color: #000 !important;
    }
    
    .gantt_grid_head_cell {
        background: #f1f5f9 !important;
        color: #000 !important;
        border: 1px solid #ddd !important;
    }
}

/* Critical Path & Tooltips */
.gantt_task_line.gantt_critical_task {
    background-color: #ef4444 !important;
    border-color: #dc2626 !important;
}

.gantt_critical_link .gantt_line_wrapper div {
    background-color: #ef4444 !important;
}

.today {
    background: #f59e0b !important;
    opacity: 0.4;
}

/* Modals draggable */
.v2-modal {
    position: fixed;
    top: 100px;
    left: 200px;
    width: 450px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    z-index: 2000;
    border: 1px solid #e2e8f0;
    display: none;
    flex-direction: column;
}

.v2-modal-header {
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.v2-modal-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.v2-modal-body {
    padding: 16px;
    max-height: 500px;
    overflow-y: auto;
}

.v2-form-group {
    margin-bottom: 12px;
}

.v2-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.v2-input, .v2-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    color: #1e293b;
    background: #fff;
}

.ed-radio-label {
    font-size: 12px;
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gantt_grid_head_cell {
    background: #f8fafc !important;
    color: #475569 !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
}

.v2-resource-sheet {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 50;
    padding: 20px;
    display: none;
    overflow-y: auto;
}

.v2-calendar-grid-cell {
    border: 1px solid #e2e8f0;
    padding: 10px;
    border-radius: 8px;
    background: #f8fafc;
}

.v2-day-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    background: #e2e8f0;
    color: #475569;
    margin-right: 4px;
}

.v2-day-tag.active {
    background: #3b82f6;
    color: #fff;
}

