/* css/style.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --drag-active: #dbeafe;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Header y Navegación */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Componentes comunes */
.card {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--text-secondary);
}

.btn-danger {
    background: var(--danger-color);
}

.btn-success {
    background: var(--success-color);
}

/* DASHBOARD */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.projects-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.projects-table th,
.projects-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.projects-table th {
    background: var(--background);
    font-weight: 600;
    color: var(--text-primary);
}

.project-name {
    font-weight: 600;
    color: var(--primary-color);
}

.collaborator-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.collaborator-tag {
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
}

/* PROYECTOS - Sistema drag & drop */
.projects-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    height: calc(100vh - 200px);
}

.collaborators-sidebar {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow-y: auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    overflow-y: auto;
}

.project-card {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    min-height: 300px;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.project-card.drag-over {
    background: var(--drag-active);
    border-color: var(--accent-color);
}

.project-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.project-collaborators {
    min-height: 150px;
}

.mini-collaborator {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
}

.mini-collaborator:hover {
    background: var(--surface);
    box-shadow: var(--shadow);
}

.mini-collaborator:active {
    cursor: grabbing;
}

.mini-collaborator.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.mini-collaborator-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.mini-collaborator-role {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assigned-collaborator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--accent-color);
    color: white;
    padding: 0.5rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.remove-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
}

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.drop-zone.drag-over {
    border-color: var(--accent-color);
    background: var(--drag-active);
}

/* COLABORADORES */
.admin-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--surface);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.file-input {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-input input[type=file] {
    position: absolute;
    left: -9999px;
}

.file-input-label {
    display: block;
    padding: 0.75rem 1rem;
    border: 2px dashed var(--border);
    border-radius: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--background);
}

.file-input-label:hover {
    border-color: var(--accent-color);
    background: rgba(59, 130, 246, 0.05);
}

.colaboradores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.colaborador-card {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
}

.colaborador-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.delete-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--danger-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* FASES - Nueva estructura con cronograma arriba */
.cronograma-preview-top {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.cronograma-preview-top .gantt-container {
    max-height: 300px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.fases-container-bottom {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    height: calc(100vh - 450px);
}

.proyectos-sidebar {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow-y: auto;
}

.fases-panel {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow-y: auto;
}

.form-container {
    background: var(--background);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-input, .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: var(--surface);
    transition: border-color 0.3s ease;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent-color);
}

#phasesContainer {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.phase-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--border);
}

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

.phase-card-header input {
    flex-grow: 1;
    font-weight: 700;
    font-size: 1.1em;
    border: none;
    padding: 5px 0;
}

.phase-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr 150px;
    gap: 15px;
}

/* BACKLOG - Estructura jerárquica */
.backlog-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    height: calc(100vh - 200px);
}

.phases-sidebar {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow-y: auto;
}

.project-group {
    margin-bottom: 1.5rem;
}

.project-group-header {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-group-header:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.project-group-header.collapsed {
    margin-bottom: 0;
}

.project-toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.project-group-header.collapsed .project-toggle-icon {
    transform: rotate(-90deg);
}

.project-phases {
    margin-left: 1rem;
    transition: all 0.3s ease;
}

.project-phases.collapsed {
    display: none;
}

.phase-item {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-left: 4px solid var(--accent-color);
}

.phase-item:hover {
    background: var(--surface);
    box-shadow: var(--shadow);
    transform: translateX(5px);
}

.phase-item.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.phase-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.phase-meta {
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.phase-item.active .phase-meta {
    color: rgba(255, 255, 255, 0.8);
}

.phase-activities-count {
    background: var(--warning-color);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 0.75rem;
    font-size: 0.6rem;
    font-weight: 600;
}

.phase-item.active .phase-activities-count {
    background: rgba(255, 255, 255, 0.3);
}

.activities-panel {
    background: var(--surface);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow-y: auto;
}

.activity-item {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.activity-name {
    font-weight: 600;
    color: var(--primary-color);
}

.activity-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.activity-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.priority {
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    color: white;
    font-weight: 600;
    font-size: 0.7rem;
}

.priority-high { background: var(--danger-color); }
.priority-medium { background: var(--warning-color); }
.priority-low { background: var(--success-color); }


/* SCRUM */
.sprint-info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    border: 2px solid var(--accent-color);
}

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

.sprint-title {
    font-size: clamp(18px, 3vw, 24px);
    color: var(--text-primary);
    font-weight: bold;
}

.sprint-dates {
    color: var(--text-secondary);
    font-size: clamp(12px, 2vw, 14px);
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, var(--success-color), #00a085);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 65%;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.metric-card {
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.metric-value {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: bold;
    display: block;
}

.metric-label {
    font-size: clamp(10px, 1.5vw, 12px);
    opacity: 0.9;
}

.panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(116, 185, 255, 0.3);
    transition: all 0.3s ease;
}

.panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.panel-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
}

.panel-icon {
    font-size: 24px;
    margin-right: 12px;
}

.panel-title {
    font-size: clamp(16px, 2.5vw, 20px);
    color: var(--text-primary);
    font-weight: bold;
}
.scrum-main-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-bottom: 2rem;
}

.scrum-kanban-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(116, 185, 255, 0.3);
}

.scrum-phases-sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(116, 185, 255, 0.3);
    overflow-y: auto;
    max-height: 600px;
}

.kanban-drop-zone {
    min-height: 400px;
    padding: 10px;
}

.kanban-drop-zone.drag-over {
    background: rgba(59, 130, 246, 0.1);
    border: 2px dashed var(--accent-color);
    border-radius: 8px;
}

.scrum-phase-group {
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
}

.scrum-phase-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scrum-phase-header:hover {
    background: var(--secondary-color);
}

.scrum-phase-header.collapsed {
    border-bottom: none;
}

.scrum-phase-activities {
    padding: 1rem;
    background: var(--background);
    transition: all 0.3s ease;
}

.scrum-phase-activities.collapsed {
    display: none;
}

.scrum-activity-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: grab;
    transition: all 0.3s ease;
    user-select: none;
    border-left: 4px solid var(--accent-color);
}

.scrum-activity-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.scrum-activity-item:active {
    cursor: grabbing;
}

.scrum-activity-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg) scale(1.05);
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.scrum-activity-item.priority-high {
    border-left-color: var(--danger-color);
}

.scrum-activity-item.priority-medium {
    border-left-color: var(--warning-color);
}

.scrum-activity-item.priority-low {
    border-left-color: var(--success-color);
}

.scrum-activity-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.scrum-activity-description {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.scrum-activity-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
}

.ceremonies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.kanban-activity-card {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: grab;
    transition: all 0.3s ease;
    border-left: 4px solid var(--accent-color);
    user-select: none;
}

.kanban-activity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.kanban-activity-card:active {
    cursor: grabbing;
}

.kanban-activity-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    z-index: 1000;
}

.kanban-activity-card.priority-high {
    border-left-color: var(--danger-color);
}

.kanban-activity-card.priority-medium {
    border-left-color: var(--warning-color);
}

.kanban-activity-card.priority-low {
    border-left-color: var(--success-color);
}

.kanban-activity-title {
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 13px;
}

.kanban-activity-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-secondary);
}

.kanban-activity-hours {
    background: var(--accent-color);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-weight: bold;
    font-size: 10px;
}

/* Kanban */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.kanban-column {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    min-height: 300px;
    border: 2px solid #dee2e6;
}

.column-header {
    font-weight: bold;
    color: #495057;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
    text-align: center;
}

.to-do { border-color: #fd79a8; }
.in-progress { border-color: #fdcb6e; }
.done { border-color: #00b894; }

/* GANTT */
.gantt-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--background);
    border-radius: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.gantt-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--surface);
}

.gantt-header {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-width: 1800px;
}

.gantt-header-cell {
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    background: var(--background);
    border-bottom: 2px solid var(--border);
}

.gantt-header-cell.project-header {
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 10;
    border-right: 1px solid var(--border);
}

.gantt-months-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
}

.gantt-month-label {
    border-right: 1px solid var(--border);
}

.gantt-body {
    min-width: 1800px;
}

.gantt-project-row {
    display: grid;
    grid-template-columns: 250px 1fr;
    border-bottom: 1px solid var(--border);
}

.gantt-project-info {
    padding: 1rem;
    border-right: 1px solid var(--border);
    background: var(--surface);
    position: sticky;
    left: 0;
    z-index: 5;
}

.gantt-project-name {
    font-weight: 700;
}

.gantt-project-client {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.gantt-timeline-container {
    position: relative;
    display: grid;
    grid-template-columns: repeat(365, 1fr);
    background-image: linear-gradient(to right, #f0f0f0 1px, transparent 1px);
    background-size: calc(100% / 12) 100%;
    min-height: 60px;
}

.gantt-phase-bar {
    position: absolute;
    height: 22px;
    margin-top: 5px;
    border-radius: 4px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0 8px;
    line-height: 22px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: filter 0.2s ease;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, var(--success-color), #00a085);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 10000;
    font-weight: bold;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.warning {
    background: linear-gradient(45deg, var(--warning-color), #e17055);
}

.notification.show {
    transform: translateX(0);
}

/* Vista común */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* Responsivo */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .projects-container, .backlog-container, .fases-container-bottom, .scrum-main-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .scrum-phases-sidebar {
        max-height: 300px;
    }

    .admin-controls {
        grid-template-columns: 1fr !important;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
}