/* =========================================
   1. AMBIENTE GENERAL Y ANIMACIONES
   ========================================= */

body {
    /* Un fondo sutil para dar profundidad a las tarjetas blancas */
    background-color: #f3f4f6 !important;
    /* Scrollbar personalizado fino */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}


/* Animación suave para la carga de elementos */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#dashboardContainer>div {
    animation: fadeIn 0.4s ease-out forwards;
}


/* =========================================
   2. BARRAS FIJAS (GLASSMORPHISM)
   ========================================= */


/* Efecto vidrio para la barra de control y headers de área */

.control-bar,
.area-header-sticky,
.fixed-bottom {
    background-color: var(--glass-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--glass-border);
    transition: all 0.3s ease;
}

.area-header-sticky {
    /* Sombra suave solo al bajar */
    box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 900;
    border-radius: 5px 25px 5px 2px!important;
}


/* =========================================
   3. TARJETAS DE PROYECTO (INTERACTIVIDAD)
   ========================================= */

.project-card {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* Para que la barra de progreso no se salga */
}

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

.project-card .card-header {
    background: transparent;
    padding: 0.1rem;
}


/* Barra de progreso más estética */

.progress {
    border-radius: 10px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    /* Un pequeño degradado sutil para darle volumen */
    background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}


/* =========================================
   4. TAREAS (ESTADOS INTUITIVOS)
   ========================================= */

.task-item {
    border: none;
    border-bottom: 1px solid #8f8f90c8;
    padding: 0.25rem 0.25rem!important;
    transition: background-color 0.2s;
}

.task-item:last-child {
    border-bottom: none;
}

.task-item:hover {
    background-color: #f8fafc;
    cursor: pointer;
}


/* Tareas completadas: Se desvanecen visualmente */

.task-item.bg-light {
    opacity: 0.7;
    filter: grayscale(0.9) blur(1px);
    transition: all 0.3s ease;
    text-decoration: line-through!important;
}

.task-item.bg-light:hover {
    opacity: 1;
    /* Al pasar el mouse recuperan visibilidad */
    filter: grayscale(0.5) blur(0px);
}


/* =========================================
   5. METADATOS (FECHAS Y HORAS)
   ========================================= */


/* Estilo Badge para las horas */

.hours-block {
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.25em 0.6em;
}


/* Estilo moderno para la fecha */

.task-date {
    display: inline-flex;
    align-items: center;
    background-color: transparent;
    color: #6c757d;
    font-family: monospace;
    font-size: 0.75rem !important;
    margin-top: 4px;
}


/* =========================================
   6. CONTROLES Y INPUTS
   ========================================= */


/* Inputs más amigables */

.form-control,
.input-group-text {
    border-radius: 8px;
    border-color: #dee2e6;
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    border-color: #86b7fe;
}


/* Switches más bonitos */

.form-switch .form-check-input {
    height: 1.2em;
    width: 2.2em;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    color: #495057;
}


/* =========================================
   7. LOADER PANTALLA COMPLETA
   ========================================= */

#fullScreenLoader {
    /* Fondo con blur potente para enfoque total */
    backdrop-filter: blur(8px) !important;
    background-color: rgba(255, 255, 255, 0.7) !important;
}

.animate-pulse {
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}


/* Ajuste del Spinner para que tenga emoji */

.spinner-border {
    position: relative;
    /* Quitamos el borde giratorio estándar si queremos usar solo el emoji, 
       o lo dejamos para efecto doble. Dejémoslo y pongamos el emoji dentro */
}


/* =========================================
   8. ANIMACIÓN DE PROYECTOS ACTIVOS
   ========================================= */


/* Definición de la animación: mueve el fondo infinitamente */

@keyframes progress-stripes {
    from {
        background-position: 1rem 0;
    }
    to {
        background-position: 0 0;
    }
}


/* Clase para barras activas (ni 0% ni 100%) */

.progress-active {
    /* Crea las rayas diagonales sutiles */
    background-image: linear-gradient( 45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
    /* Tamaño del patrón */
    animation: progress-stripes 1s linear infinite;
    /* Velocidad de la animación */
}


/* Opcional: Un efecto de brillo extra al pasar el mouse sobre la tarjeta */

.project-card:hover .progress-active {
    filter: brightness(1.1);
    animation-duration: 0.5s;
    /* Se acelera al hacer hover (feedback visual) */
}


/*FONDOS por area*/

.header-CONTA * {
    color: rgba(0, 0, 0, 0.65)!important
}

.header-CONTA {
    background-color: #366294a1!Important;
}


/* =========================================
   10. GALERÍA Y PREVIEW
   ========================================= */


/* Item de la galería (miniatura) */

.gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: transform 0.2s ease;
    height: 80px;
    /* Altura fija para uniformidad */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Recorta la imagen para llenar el cuadro */
    transition: filter 0.2s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    z-index: 5;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover img {
    filter: brightness(1.1);
}


/* Icono de "ojo" al pasar el mouse (opcional) */

.gallery-item::after {
    content: '👁️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    font-size: 1.2rem;
    pointer-events: none;
    transition: opacity 0.2s;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.gallery-item:hover::after {
    opacity: 1;
}


/* Botón de borrar flotante para Galería */

.btn-delete-img {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    /* Rojo semitransparente */
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-size: 14px;
    z-index: 10;
    /* Encima de la imagen */
    opacity: 0;
    /* Oculto por defecto */
    transition: opacity 0.2s;
}

.gallery-item:hover .btn-delete-img {
    opacity: 1;
    /* Aparece al pasar el mouse */
}

.btn-delete-img:hover {
    background: rgb(220, 53, 69);
    transform: scale(1.1);
}


/* =========================================
   11. PRIORIDADES DE TAREAS
   ========================================= */


/* Base: Transición suave */

.task-item {
    border-left: 4px solid transparent;
    /* Espacio reservado */
    transition: all 0.2s ease;
}


/* Nivel 3: CRÍTICA (Rojo) */

.priority-critical {
    border-left-color: #dc3545 !important;
    /* Rojo Bootstrap */
    background-color: #fff5f5 !important;
    /* Fondo rojizo muy tenue */
}

.priority-critical:hover {
    background-color: #ffe0e0 !important;
}


/* Nivel 2: ALTA (Naranja) */

.priority-high {
    border-left-color: #fd7e14 !important;
    /* Naranja */
}


/* Nivel 1: MEDIA (Azul) */

.priority-medium {
    border-left-color: #0d6efd !important;
    /* Azul */
}


/* Nivel 0: BAJA/NORMAL (Transparente o Gris) */

.priority-normal {
    border-left-color: transparent;
}