/* ===========================================================================
   DASHBOARD & EMPTY PLACEHOLDERS
   =========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-metric-card {
    background: rgba(30, 30, 45, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease,
                background 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-metric-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(30, 30, 45, 0.55);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.dashboard-metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
}

.dashboard-metric-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dashboard-metric-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
}

.dashboard-metric-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.dashboard-layout-panels {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 24px;
    min-height: 0;
    flex-grow: 1;
}

.dashboard-panel {
    background: rgba(30, 30, 45, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 450px;
    height: 100%;
    overflow: hidden;
}

.dashboard-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.dashboard-panel-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-panel-content {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 4px;
}

/* LISTA DE TAREAS DEL DASHBOARD */
.dashboard-task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Wrapper para las notas colapsables */
.dashboard-task-item-wrapper {
    display: flex;
    flex-direction: column;
    background: var(--surface-1);
    border: 1px solid var(--surface-2);
    border-radius: 12px;
    overflow: hidden;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.dashboard-task-item-wrapper:hover {
    background: var(--surface-2);
    border-color: var(--border-color);
    transform: translateX(2px);
}

/* La fila de tarea dentro del wrapper: 2 columnas (left + meta)
   La priority badge está DENTRO de .dashboard-task-left */
.dashboard-task-item {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    border: none;
    background: transparent;
    border-radius: 0;
}

.dashboard-task-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.dashboard-task-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
    background: transparent;
}

.dashboard-task-checkbox.checked {
    background: var(--success);
    border-color: var(--success);
    color: white;
    font-size: 11px;
}

.dashboard-task-checkbox:hover {
    border-color: var(--accent-primary);
}

.dashboard-task-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-task-title.completed {
    text-decoration: line-through;
    color: var(--text-secondary);
    opacity: 0.7;
}

.dashboard-task-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.dashboard-task-project {
    font-size: 11px;
    padding: 4px 8px;
    background: var(--accent-glow-sm);
    color: var(--accent-light);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.dashboard-task-project:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-primary);
    text-decoration: underline;
}

.dashboard-task-date {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.dashboard-task-date:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-secondary);
    text-decoration: underline;
}

.dashboard-task-date.urgent {
    color: #f87171;
    font-weight: 600;
}

.dashboard-task-date.overdue {
    color: #ef4444;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 2px 6px;
    border-radius: 6px;
}

/* PANEL DE NOTAS COLAPSABLE
   Requiere que .dashboard-task-notes-inner tenga min-height:0 */
.dashboard-task-notes-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease,
                visibility 0.3s;
}

.dashboard-task-notes-panel.expanded {
    max-height: 250px;
    opacity: 1;
    visibility: visible;
}

.dashboard-task-notes-inner {
    min-height: 0;
    padding: 14px 16px 14px 46px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    background: rgba(0, 0, 0, 0.08);
}

.dashboard-task-toggle-notes {
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    box-sizing: border-box;
}

.dashboard-task-toggle-notes:hover {
    background: var(--surface-2);
    color: var(--accent-primary);
}

.dashboard-task-toggle-notes.active {
    color: var(--accent-secondary);
    transform: rotate(180deg);
}

/* BADGES DE PRIORIDAD */
.dashboard-priority-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 9999px;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.priority-badge-alta {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.priority-badge-media {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.priority-badge-baja {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

select.dashboard-priority-badge {
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
    outline: none;
    transition: filter 0.2s ease, box-shadow 0.2s ease;
}

select.dashboard-priority-badge:hover {
    filter: brightness(1.25);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.08);
}

select.dashboard-priority-badge:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

select.dashboard-priority-badge option {
    background-color: #1e1e2d;
    color: var(--text-main);
    padding: 4px;
}

/* ACCESOS RÁPIDOS SOPs */
.dashboard-sops-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.dashboard-sop-card {
    background: var(--surface-1);
    border: 1px solid var(--surface-2);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.dashboard-sop-card:hover {
    background: var(--surface-2);
    border-color: var(--border-color);
    transform: translateY(-2px);
}

.dashboard-sop-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--accent-primary);
}

.dashboard-sop-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.dashboard-sop-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-sop-desc {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* PLACEHOLDER DE CANAL VACÍO */
.empty-channel-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: rgba(30, 30, 45, 0.25);
    border: 2px dashed rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    margin: 40px auto;
    max-width: 600px;
    color: var(--text-secondary);
}

.empty-channel-icon {
    font-size: 48px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse-glow 2s infinite alternate;
}

@keyframes pulse-glow {
    from { opacity: 0.6; transform: scale(0.98); }
    to   { opacity: 1; transform: scale(1.02); }
}

.empty-channel-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.empty-channel-desc {
    font-size: 13px;
    line-height: 1.5;
    max-width: 400px;
}

/* MINI CALENDARIO */
.mini-calendar-nav .mini-cal-btn {
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.mini-calendar-nav .mini-cal-btn:hover {
    background: var(--surface-3);
    color: var(--accent-primary);
}

.mini-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.mini-cal-day-header {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 6px 0;
    text-transform: uppercase;
}

.mini-cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-main);
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
}

.mini-cal-day:hover:not(.empty) {
    background: var(--surface-3);
    border-color: var(--border-color);
}

.mini-cal-day.empty {
    cursor: default;
}

.mini-cal-day.today {
    background: var(--accent-glow-sm);
    border-color: rgba(139, 92, 246, 0.4);
    color: #a78bfa;
    font-weight: 700;
}

.mini-cal-day.selected {
    background: var(--accent-primary);
    color: #000;
    font-weight: 700;
    border-color: transparent;
}

.mini-cal-day.selected .mini-cal-dot {
    background: #000;
}

.mini-cal-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-primary);
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
}

/* LISTA DE TAREAS BAJO EL CALENDARIO */
.mini-calendar-tasks-list {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0;
}

.mini-cal-tasks-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.mini-cal-tasks-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 4px;
}

.mini-cal-task-card {
    background: var(--surface-1);
    border: 1px solid var(--surface-2);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    font-size: 12px;
}

.mini-cal-task-card:hover {
    background: var(--surface-3);
    border-color: var(--border-color);
    transform: translateX(2px);
}

.mini-cal-task-priority-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mini-cal-task-title {
    color: var(--text-main);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.mini-cal-task-channel {
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--surface-2);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    white-space: nowrap;
}

.mini-cal-no-tasks {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 0;
    color: var(--text-secondary);
    font-size: 11px;
}

/* METRIC CARDS CLICKABLES */
.dashboard-metric-card.clickable {
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease,
                border-color 0.25s ease, box-shadow 0.25s ease;
}

.dashboard-metric-card.clickable:hover {
    transform: translateY(-2px);
    background: var(--surface-2);
    border-color: rgba(255, 255, 255, 0.12);
}

.dashboard-metric-card.clickable.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.18);
    background: var(--accent-glow-sm);
}

/* TABS DEL DASHBOARD */
.dashboard-tabs {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.dashboard-tab-btn {
    background: transparent;
    border: none;
    outline: none;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dashboard-tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.dashboard-tab-btn.active {
    color: #fff;
    background: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* TARJETAS DE VIDEOS PIPELINE */
.video-pipeline-card {
    background: var(--surface-1);
    border: 1px solid var(--surface-2);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: visible;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-pipeline-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--surface-2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.video-pipeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.video-pipeline-title-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.video-pipeline-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-pipeline-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.video-pipeline-channel-tag {
    font-size: 11px;
    color: var(--accent-secondary);
    background: var(--accent-glow-sm);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.video-pipeline-deadline-tag {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.video-pipeline-responsible {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

/* RIEL Y BURBUJA DEL PIPELINE */
.video-pipeline-track-container {
    position: relative;
    padding: 10px 0 20px 0;
    margin-top: 4px;
}

.video-pipeline-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-pipeline-step {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    position: relative;
    z-index: 1;
}

.video-pipeline-step-label {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    pointer-events: none;
}

/* LA BURBUJA / GOTA FLOTANTE */
.video-pipeline-bubble {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: left 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* COLORES REACTIVOS DE LA BURBUJA (GLOW NEÓN) */
.video-pipeline-bubble.overdue {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border: 1px solid #fca5a5;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.45);
}

.video-pipeline-bubble.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: 1px solid #fde047;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
}

.video-pipeline-bubble.on-track {
    background: linear-gradient(135deg, #10b981, #047857);
    border: 1px solid #a7f3d0;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.45);
}

.video-pipeline-bubble.in-review {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: 1px solid #93c5fd;
    box-shadow: 0 0 14px rgba(59, 130, 246, 0.45);
}

/* MODAL EXPANDIDO HORIZONTAL (1200PX) */
.modal-expanded-horizontal {
    width: 1200px !important;
    max-width: 96vw !important;
    height: 88vh !important;
    max-height: 820px !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    background: var(--surface-1) !important;
    overflow: hidden !important;
    border-radius: 18px !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6) !important;
}

/* 1. HEADER FIJO DEL MODAL */
.modal-header-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-2);
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-hdr-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.modal-hdr-title-input {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    background: transparent;
    border: none;
    outline: none;
    width: 320px;
    border-bottom: 1.5px dashed transparent;
    transition: border-bottom 0.2s ease, width 0.25s ease;
    padding: 2px 0;
}

.modal-hdr-title-input:focus {
    width: 440px;
    border-bottom: 1.5px dashed var(--accent-primary);
}

.modal-hdr-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.modal-hdr-project-tag {
    background: var(--accent-glow-sm);
    color: var(--accent-light);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 10px;
}

.modal-hdr-time, .modal-hdr-completed-time {
    font-size: 10px;
}

.modal-hdr-completed-time {
    color: var(--success);
    font-weight: 500;
}

.unsaved-indicator {
    color: var(--accent-primary);
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: pulse 2s infinite;
}

.modal-hdr-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-hdr-inputs-row {
    display: flex;
    gap: 12px;
}

.hdr-input-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hdr-input-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hdr-select, .hdr-input-date {
    background: #1e1e28;
    color: #fff;
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    outline: none;
    transition: border-color 0.2s ease;
}

.hdr-select:focus, .hdr-input-date:focus {
    border-color: var(--accent-primary);
}

.modal-hdr-buttons-row {
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 1px solid var(--border-color);
    padding-left: 16px;
}

.modal-hdr-btn {
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.modal-hdr-btn.save {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #000;
}

.modal-hdr-btn.save:hover {
    opacity: 0.9;
    box-shadow: 0 0 10px var(--accent-glow-md);
}

.modal-hdr-btn.delete {
    background: #ef4444;
    color: #fff;
}

.modal-hdr-btn.delete:hover {
    background: #dc2626;
}

.close-modal-hdr {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.close-modal-hdr:hover {
    color: #fff;
}

/* 2. CUERPO CENTRAL EN DOS COLUMNAS */
.modal-body-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.modal-body-left {
    flex: 1.6;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-body-right {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* SUBTAREAS DE LA FASE */
.modal-subtasks-section {
    flex: 1.3;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.subtasks-title-badge {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.subtasks-progress-text {
    font-size: 11px;
    color: var(--text-secondary);
}

.subtasks-list-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
    padding-right: 4px;
}

.subtask-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, 0.02);
    padding: 8px 12px;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.subtask-item:hover {
    border-color: rgba(255, 255, 255, 0.08);
}

.subtask-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.subtask-checkbox {
    width: 15px;
    height: 15px;
    border: 1.5px solid var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #000;
    transition: all 0.2s ease;
}

.subtask-checkbox.checked {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.subtask-title-text {
    font-size: 11.5px;
    color: #fff;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.subtask-title-text.completed {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.subtask-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.subtask-assignee-badge {
    font-size: 9.5px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    padding: 1px 5px;
    border-radius: 4px;
}

.delete-subtask-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 10px;
    padding: 4px;
    transition: color 0.2s ease;
}

.delete-subtask-btn:hover {
    color: #ef4444;
}

.add-subtask-row {
    display: flex;
    gap: 8px;
}

.add-subtask-row input {
    flex: 1;
    background: #1e1e28;
    color: #fff;
    border: 1px solid var(--border-color);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    outline: none;
    transition: border-color 0.2s ease;
}

.add-subtask-row input:focus {
    border-color: var(--accent-primary);
}

.add-subtask-btn {
    background: var(--accent-glow-sm);
    color: var(--accent-light);
    border: none;
    padding: 0 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.add-subtask-btn:hover {
    background: var(--accent-primary);
    color: #000;
}

/* PANEL DE COMENTARIOS COMPACTO */
.modal-comments-section {
    flex: 1;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-comments-header {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-comments-section .comments-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 8px;
    padding-right: 4px;
}

.modal-comments-section .comment-input-row {
    margin-top: auto;
}

/* RECURSOS Y ENLACES (COLUMNA DERECHA) */
.modal-resources-header {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-resources-fields-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 3. FOOTER FIJO (BARRA DEL PIPELINE) */
.modal-footer-pipeline {
    padding: 12px 24px 18px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--surface-2);
    display: flex;
    justify-content: center;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.modal-pipeline-nav {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    max-width: 800px;
}

.pipeline-nav-btn {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    outline: none;
    flex: 1;
    position: relative;
}

.pipeline-nav-btn i {
    font-size: 13px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface-1);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.pipeline-nav-btn span {
    font-size: 10px;
    font-weight: 600;
}

.pipeline-nav-btn:hover {
    color: #fff;
}

.pipeline-nav-btn.completed i {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
    background: var(--accent-glow-sm);
}

.pipeline-nav-btn.active i {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--accent-glow-md);
    box-shadow: 0 0 10px var(--accent-glow-md);
}

.pipeline-nav-btn.active span {
    color: var(--accent-primary);
}

.pipeline-connector {
    height: 2px;
    background: var(--border-color);
    flex: 1.2;
    margin-bottom: 16px;
    transition: background 0.3s ease;
}

.pipeline-connector.active {
    background: var(--accent-primary);
    box-shadow: 0 0 5px var(--accent-glow-md);
}
