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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}


.header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}


.header-left .logo-link {
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.header-left .logo-link:hover {
    opacity: 0.8;
}

.header-left .logo {
    color: #6366f1;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0;
}


.search-container {
    position: relative;
    width: 400px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 16px;
}

.search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}


.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.new-task-btn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.new-task-btn:hover {
    background: #c7c7ff;
    transform: translateY(-1px);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.user-menu:hover {
    background: #f1f5f9;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #6366f1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.dropdown-icon {
    font-size: 12px;
    color: #64748b;
}


.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    color: #1e293b;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border-radius: 6px;
    margin: 4px;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover {
    background-color: #f1f5f9;
}

.dropdown-item.logout:hover {
    color: #dc2626;
}

.dropdown-icon-item {
    font-size: 16px;
}

.dropdown-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 8px 0;
}


.main-content {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}


.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-icon {
    font-size: 24px;
}

.page-title h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
}

.view-controls {
    display: flex;
    gap: 8px;
}




.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 400px);
    gap: 32px;
    justify-content: center;
    min-height: 70vh;
}



.kanban-column {
    margin-top: 50px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 400px;
}


.column-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}

.column-header.por-hacer {
    background: #fef3c7;
    color: #92400e;
}

.column-header.en-progreso {
    background: #dbeafe;
    color: #1e40af;
}

.column-header.completado {
    background: #d1fae5;
    color: #065f46;
}

.column-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.column-content.drag-over {
    background-color: rgba(99, 102, 241, 0.1);
    border: 2px dashed #6366f1;
    border-radius: 8px;
    transform: scale(1.02);
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* Estilos para el elemento column-content cuando está siendo arrastrado */
#todoColumn.drag-over,
#inProgressColumn.drag-over,
#completedColumn.drag-over {
    background-color: rgba(99, 102, 241, 0.1);
    border: 2px dashed #6366f1;
    border-radius: 8px;
    transform: scale(1.02);
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* Estilos para la tarea que se está arrastrando */
.task-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
    transition: all 0.2s ease;
}

/* Estilos para el área de drop cuando se está arrastrando */
.kanban-column.drag-over .column-header {
    background-color: rgba(99, 102, 241, 0.1);
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
}

.kanban-column.drag-over .column-title {
    color: #6366f1;
    font-weight: 600;
    transition: all 0.2s ease;
}

/* Efecto de pulso para la columna de destino */
.column-content.drag-over::before,
#todoColumn.drag-over::before,
#inProgressColumn.drag-over::before,
#completedColumn.drag-over::before {
    content: "Suelta aquí";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(99, 102, 241, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10;
    pointer-events: none;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
}


.task-count {
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.column-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 400px;
    position: relative;
}


.task-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

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

.task-card.completed {
    opacity: 0.8;
}

.task-card.completed .task-title {
    text-decoration: line-through;
    color: #64748b;
}

.task-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.4;
}

.task-description {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 12px;
    line-height: 1.5;
}

.task-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.task-time {
    font-size: 13px;
    color: #64748b;
}

.task-priority {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.task-priority.alta {
    background: #fecaca;
    color: #991b1b;
}

.task-priority.media {
    background: #fed7aa;
    color: #9a3412;
}

.task-priority.baja {
    background: #bbf7d0;
    color: #166534;
}

.task-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.task-card:hover .task-actions {
    opacity: 1;
}

.action-btn {
    background: none;
    border: none;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.action-btn:hover {
    background: #f1f5f9;
}


@media (max-width: 1200px) {
    .kanban-board {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        justify-content: center;
    }

    .kanban-column {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 16px;
    }

    .header {
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
    }

    .header-center {
        order: 3;
        width: 100%;
    }

    .search-container {
        width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .view-controls {
        width: 100%;
        justify-content: center;
    }
}

.column-content {
    min-height: 200px;
    border: 2px dashed transparent;
    transition: border-color 0.2s ease;
}

.column-content.dragover {
    border-color: #6366f1;
    background-color: #f9fafb;
}

.task-card {
    cursor: grab;
}

.task-card:active {
    cursor: grabbing;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 41, 59, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-box {
    background: white;
    padding: 24px;
    border-radius: 12px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease;
}

.modal-box p {
    font-size: 16px;
    margin-bottom: 16px;
}

.modal-box.success p {
    color: #065f46;
}

.modal-box.error p {
    color: #000000;
}

.modal-box.success button {
    background: #6366f1;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.modal-box.error button {
    background: #c20000;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.modal-box.success button:hover {
    background: #5856eb;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-box.error button:hover {
    background: #940000;
}

/* Estilos para modales de tipo warning con botones diferenciados */
.modal-box.warning .modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-box.warning button:first-child {
    background: #ef4444; /* Rojo para acción destructiva */
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.modal-box.warning button:last-child {
    background: white; /* Blanco para cancelar */
    color: #374151;
    border: 1px solid #d1d5db; /* Borde gris */
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.modal-box.warning button:first-child:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.modal-box.warning button:last-child:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
}