/* Estilos específicos para el módulo de tareas */

/* Prioridades */
.tarea-prioridad {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    min-width: 50px;
    text-align: center;
}

.tarea-prioridad.alta {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border: 1px solid #e57373;
    box-shadow: 0 1px 3px rgba(198, 40, 40, 0.2);
}

.tarea-prioridad.media {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #ef6c00;
    border: 1px solid #ffb74d;
    box-shadow: 0 1px 3px rgba(239, 108, 0, 0.2);
}

.tarea-prioridad.baja {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    border: 1px solid #81c784;
    box-shadow: 0 1px 3px rgba(46, 125, 50, 0.2);
}

/* Estados */
.tarea-estado {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-align: center;
    min-width: 100px;
    display: inline-block;
    transition: all 0.3s ease;
}

/* Estilos para filtros de personas activos */
.sgt-person-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sgt-filter-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
    margin-right: 0.5rem;
}

.sgt-filter-btn.person-filter-active {
    background: #2196F3 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3) !important;
    border-color: #1976D2 !important;
}

.sgt-filter-btn.person-filter-active:hover {
    background: #1976D2 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4) !important;
}

.sgt-filter-btn.person-filter-active .sgt-count {
    background: white !important;
    color: #2196F3 !important;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .sgt-filter-label {
        display: none;
    }
    
    .sgt-person-filters {
        flex-wrap: wrap;
    }
}

.tarea-estado.pendiente {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    color: #f57f17;
    border: 1px solid #ffcc02;
    box-shadow: 0 2px 4px rgba(245, 127, 23, 0.15);
}

.tarea-estado.en_progreso {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    border: 1px solid #42a5f5;
    box-shadow: 0 2px 4px rgba(21, 101, 192, 0.15);
}

.tarea-estado.completada {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    border: 1px solid #66bb6a;
    box-shadow: 0 2px 4px rgba(46, 125, 50, 0.15);
}

.tarea-estado.cancelada {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    color: #c2185b;
    border: 1px solid #f06292;
    box-shadow: 0 2px 4px rgba(194, 24, 91, 0.15);
}

/* Tipos de tarea */
.tarea-tipo {
    font-size: 0.85em;
    color: #666;
    font-style: italic;
    padding: 2px 8px;
    background-color: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* Asignado */
.tarea-asignado {
    font-weight: 700;
    color: #1976d2;
    text-transform: capitalize;
    padding: 2px 8px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 8px;
    border: 1px solid #90caf9;
}

/* Fechas */
.tarea-fecha-vencimiento {
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 6px;
}

.tarea-fecha-vencimiento.vencida {
    background-color: #ffebee;
    color: #d32f2f;
    font-weight: bold;
    border: 1px solid #ffcdd2;
    animation: pulse-red 2s infinite;
}

.tarea-fecha-vencimiento.proxima {
    background-color: #fff3e0;
    color: #f57c00;
    font-weight: bold;
    border: 1px solid #ffcc02;
    animation: pulse-orange 2s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(211, 47, 47, 0); }
    100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); }
}

@keyframes pulse-orange {
    0% { box-shadow: 0 0 0 0 rgba(245, 124, 0, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(245, 124, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 124, 0, 0); }
}

/* Acciones */
.tarea-actions {
    white-space: nowrap;
    display: flex;
    gap: 4px;
    align-items: center;
}

.tarea-actions .sgt-icon {
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    position: relative;
}

.tarea-actions .sgt-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tarea-actions .view-tarea {
    color: #2196f3;
    background-color: rgba(33, 150, 243, 0.1);
    border-color: rgba(33, 150, 243, 0.2);
}

.tarea-actions .view-tarea:hover {
    background-color: #2196f3;
    color: white;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.tarea-actions .edit-tarea {
    color: #ff9800;
    background-color: rgba(255, 152, 0, 0.1);
    border-color: rgba(255, 152, 0, 0.2);
}

.tarea-actions .edit-tarea:hover {
    background-color: #ff9800;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.tarea-actions .delete-tarea {
    color: #f44336;
    background-color: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.2);
}

.tarea-actions .delete-tarea:hover {
    background-color: #f44336;
    color: white;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.tarea-actions .complete-tarea {
    color: #4caf50;
    background-color: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.2);
}

.tarea-actions .complete-tarea:hover {
    background-color: #4caf50;
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* Botones del modal */
.sgt-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.sgt-modal .btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    position: relative;
    overflow: hidden;
}

.sgt-modal .btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.sgt-modal .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Botón Guardar (Primario) */
.sgt-modal .btn-primary {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #28a745;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.sgt-modal .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838 0%, #1ea47c 100%);
    border-color: #1e7e34;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
    transform: translateY(-1px);
}

.sgt-modal .btn-primary:active:not(:disabled) {
    background: linear-gradient(135deg, #1e7e34 0%, #1b8f6b 100%);
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

/* Botón Cancelar (Secundario) */
.sgt-modal .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border-color: #6c757d;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.sgt-modal .btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    border-color: #545b62;
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
    transform: translateY(-1px);
}

.sgt-modal .btn-secondary:active:not(:disabled) {
    background: linear-gradient(135deg, #495057 0%, #3d4043 100%);
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

/* Botón de cerrar modal (X) */
.sgt-modal .sgt-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sgt-modal .sgt-modal-close:hover {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
    transform: scale(1.1);
}

/* Animación de carga para el botón Guardar */
.sgt-modal .btn-primary:disabled::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive para botones */
@media (max-width: 576px) {
    .sgt-modal .modal-footer {
        flex-direction: column-reverse;
        gap: 8px;
    }
    
    .sgt-modal .btn {
        width: 100%;
        min-width: auto;
    }
}

/* Detalles de tarea */
.tarea-details {
    max-width: 700px;
    padding: 20px;
}

.tarea-details .detail-row {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
}

.tarea-details .detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.tarea-details .detail-label {
    font-weight: 700;
    color: #333;
    min-width: 140px;
    margin-right: 15px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tarea-details .detail-value {
    color: #666;
    flex: 1;
    line-height: 1.5;
}

/* Título en la tabla */
.sgt-titulo strong {
    color: #1976d2;
    font-size: 1.05em;
}

.sgt-titulo small {
    display: block;
    margin-top: 5px;
    line-height: 1.4;
    color: #777;
}

/* Formulario de tareas */
#tarea-modal .sgt-form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

#tarea-modal .sgt-form-group input,
#tarea-modal .sgt-form-group select,
#tarea-modal .sgt-form-group textarea {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#tarea-modal .sgt-form-group input:focus,
#tarea-modal .sgt-form-group select:focus,
#tarea-modal .sgt-form-group textarea:focus {
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    outline: none;
}

/* Indicadores de estado en las filas */
.sgt-table tr[data-prioridad="alta"] {
    border-left: 4px solid #f44336;
}

.sgt-table tr[data-prioridad="media"] {
    border-left: 4px solid #ff9800;
}

.sgt-table tr[data-prioridad="baja"] {
    border-left: 4px solid #4caf50;
}

.sgt-table tr[data-estado="completada"] {
    background-color: #f9f9f9;
    opacity: 0.8;
}

.sgt-table tr[data-estado="completada"] .sgt-titulo {
    text-decoration: line-through;
}

/* Responsive */
@media (max-width: 768px) {
    .tarea-prioridad,
    .tarea-estado {
        font-size: 0.7em;
        padding: 2px 6px;
        min-width: auto;
    }
    
    .tarea-asignado {
        font-size: 0.8em;
        padding: 1px 4px;
    }
    
    .tarea-actions .sgt-icon {
        margin: 0 2px;
        padding: 4px;
        font-size: 12px;
    }
    
    .tarea-details .detail-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tarea-details .detail-label {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 5px;
    }
}

/* Animaciones adicionales */
.sgt-table tr {
    transition: background-color 0.2s ease;
}

.sgt-table tr:hover {
    background-color: #f8f9fa;
}

/* Botón nueva tarea */
#sgt-new-tarea {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: 2px solid #dc3545;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(220, 53, 69, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

#sgt-new-tarea::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#sgt-new-tarea:hover::before {
    left: 100%;
}

#sgt-new-tarea:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    border-color: #a71e2a;
    box-shadow: 0 5px 12px rgba(220, 53, 69, 0.4);
    transform: translateY(-2px);
}

#sgt-new-tarea:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

#sgt-new-tarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25), 0 3px 6px rgba(220, 53, 69, 0.25);
}

#sgt-new-tarea i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

#sgt-new-tarea:hover i {
    transform: scale(1.1);
}

/* Estados especiales */
.tarea-urgente {
    animation: urgente-blink 1.5s infinite;
}

@keyframes urgente-blink {
    0%, 50% { background-color: #ffebee; }
    25%, 75% { background-color: #ffcdd2; }
}

/* Separadores para filtros */
.sgt-filter-separator {
    width: 1px;
    height: 30px;
    background-color: #ddd;
    margin: 0 15px;
    align-self: center;
}

.sgt-filter-dropdown-separator {
    height: 1px;
    background-color: #eee;
    margin: 5px 0;
}

/* Estilo específico para filtros de usuarios */
.sgt-filter-btn[data-filter="leo"],
.sgt-filter-btn[data-filter="ana"],
.sgt-filter-btn[data-filter="adri"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.sgt-filter-btn[data-filter="leo"]:hover,
.sgt-filter-btn[data-filter="ana"]:hover,
.sgt-filter-btn[data-filter="adri"]:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.sgt-filter-btn[data-filter="leo"].active,
.sgt-filter-btn[data-filter="ana"].active,
.sgt-filter-btn[data-filter="adri"].active {
    background: linear-gradient(135deg, #4c63d2 0%, #5a3d7e 100%);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

/* Responsive: ocultar separadores en móvil */
@media (max-width: 768px) {
    .sgt-filter-separator {
        display: none;
    }
} 