/* Variables CSS para temas y colores */
:root {
    --primary-color: #4a6fa5;
    --secondary-color: #6d7b8c;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Tema oscuro */
.dark-theme {
    --primary-color: #5a8bdc;
    --secondary-color: #7a8c9d;
    --light-color: #2d3748;
    --dark-color: #f8f9fa;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body.dark-theme {
    background-color: #1a202c;
    color: #e2e8f0;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.app-header {
    background: linear-gradient(135deg, var(--primary-color), #3a5a8a);
    color: white;
    padding: 1.5rem 2rem;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.header-content h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subtitle {
    opacity: 0.9;
    font-size: 1rem;
}

.header-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    min-width: 100px;
    backdrop-filter: blur(10px);
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Controles */
.controls-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 2rem;
    margin-bottom: 2rem;
    align-items: center;
}

.btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background-color: #3a5a8a;
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: #5a6b7c;
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    background-color: #d32f2f;
    transform: translateY(-2px);
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    transform: scale(1.1);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: var(--transition);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition);
}

input:checked + .toggle-slider {
    background-color: var(--success-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Tablero Kanban */
.kanban-board {
    display: flex;
    gap: 1.5rem;
    padding: 0 2rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    min-height: 500px;
}

.column {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 300px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

body.dark-theme .column {
    background-color: #2d3748;
}

.column-header {
    padding: 1.2rem;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-title {
    font-weight: 600;
    font-size: 1.2rem;
}

.column-task-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.column-body {
    padding: 1rem;
    flex-grow: 1;
    min-height: 400px;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-item {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    cursor: move;
    transition: var(--transition);
    border-left: 4px solid var(--secondary-color);
}

body.dark-theme .task-item {
    background-color: #4a5568;
    color: #e2e8f0;
}

.task-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

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

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

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

.task-title {
    font-weight: 600;
    font-size: 1.1rem;
    flex-grow: 1;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
}

.task-action-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.task-action-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.task-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.8rem;
}

body.dark-theme .task-description {
    color: #cbd5e0;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #777;
}

body.dark-theme .task-footer {
    color: #a0aec0;
}

.task-due-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.task-due-date.overdue {
    color: var(--danger-color);
    font-weight: bold;
}

.task-reminder {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Sección de progreso */
.progress-section {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin: 0 2rem 2rem;
}

body.dark-theme .progress-section {
    background-color: #2d3748;
}

.progress-section h3 {
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
}

.progress-container {
    margin-bottom: 1.5rem;
}

.progress-bar {
    height: 20px;
    background-color: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

body.dark-theme .progress-bar {
    background-color: #4a5568;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #3a5a8a);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
}

.progress-details {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
}

.detail-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: rgba(74, 111, 165, 0.1);
    border-radius: var(--border-radius);
    min-width: 180px;
}

.detail-card i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.detail-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
}

body.dark-theme .detail-label {
    color: #a0aec0;
}

.detail-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Modales */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: var(--transition);
}

body.dark-theme .modal-content {
    background-color: #2d3748;
    color: #e2e8f0;
}

.modal.active .modal-content {
    transform: translateY(0);
}

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

body.dark-theme .modal-header {
    border-bottom-color: #4a5568;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #777;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 1.5rem;
}

/* Formularios */
.form-group {
    margin-bottom: 1.2rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

body.dark-theme .form-group input,
body.dark-theme .form-group select,
body.dark-theme .form-group textarea {
    background-color: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Notificaciones */
.notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-width: 350px;
}

.notification {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    transform: translateX(100%);
    opacity: 0;
    animation: slideIn 0.3s forwards;
}

body.dark-theme .notification {
    background-color: #2d3748;
    color: #e2e8f0;
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

.notification.info {
    border-left: 4px solid var(--primary-color);
}

.notification.error {
    border-left: 4px solid var(--danger-color);
}

.notification-content {
    flex-grow: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.notification-message {
    font-size: 0.9rem;
    color: #666;
}

body.dark-theme .notification-message {
    color: #a0aec0;
}

.close-notification {
    background: none;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 1.2rem;
}

@keyframes slideIn {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #e2e8f0;
}

body.dark-theme .app-footer {
    color: #a0aec0;
    border-top-color: #4a5568;
}

.footer-note {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    color: #888;
}

/* Responsividad */
@media (max-width: 768px) {
    .app-header {
        padding: 1rem;
    }
    
    .header-stats {
        justify-content: center;
    }
    
    .controls-panel {
        padding: 0 1rem;
        justify-content: center;
    }
    
    .kanban-board {
        padding: 0 1rem;
    }
    
    .progress-section {
        margin: 0 1rem 1.5rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}