/* ============================================
   PANEL NOTIFICACIÓN DE PROGRESO - Diseño Compacto
   Compatible con Bootstrap 2.2
   ============================================ */

/* Encabezado de Página */
.encabezado-pagina {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.encabezado-pagina h1 {
    font-size: 28px;
    color: #1a202c;
    margin-bottom: 8px;
    font-weight: 600;
}

.encabezado-pagina p {
    color: #718096;
    font-size: 15px;
    margin: 0;
}

/* Tabla de Reportes */
.tabla-reportes {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.encabezado-tabla {
    background: #f7fafc;
    padding: 20px 30px;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: #2d3748;
    display: grid;
    grid-template-columns: 1fr 180px 150px 120px;
    gap: 20px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fila-tabla {
    padding: 25px 30px;
    border-bottom: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: 1fr 180px 150px 120px;
    gap: 20px;
    align-items: center;
    transition: background 0.2s;
    cursor: pointer;
}

.fila-tabla:hover {
    background: #f7fafc;
}

.fila-tabla:last-child {
    border-bottom: none;
}

.fila-tabla.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fila-tabla.disabled:hover {
    background: white;
}

.nombre-reporte {
    display: flex;
    align-items: center;
    gap: 15px;
}

.caja-icono-reporte {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.texto-nombre-reporte h3 {
    font-size: 16px;
    color: #1a202c;
    margin-bottom: 4px;
    font-weight: 600;
}

.texto-nombre-reporte p {
    font-size: 13px;
    color: #718096;
    margin: 0;
}

.formato-reporte {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4a5568;
}

.insignia-formato {
    padding: 4px 10px;
    background: #edf2f7;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #2d3748;
}

.tiempo-reporte {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #718096;
}

/* ============================================
   PANEL NOTIFICACIÓN - Esquina inferior derecha
   ============================================ */

.panel-notificacion {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    overflow: hidden;
    transform: translateX(450px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9999;
}

.panel-notificacion.show {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Barra de Progreso Superior */
.barra-progreso {
    height: 3px;
    background: #e2e8f0;
    position: relative;
}

.relleno-progreso {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.3s ease;
    position: relative;
}

.relleno-progreso::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.4),
        transparent
    );
    animation: destellar 1.5s infinite;
}

@keyframes destellar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.contenido-notificacion {
    padding: 20px;
}

.encabezado-notificacion {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.icono-notificacion {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.icono-notificacion.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.icono-notificacion.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.icono-notificacion .girando {
    animation: girar 1s linear infinite;
}

@keyframes girar {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.texto-notificacion {
    flex: 1;
}

.titulo-notificacion {
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
}

.subtitulo-notificacion {
    font-size: 13px;
    color: #718096;
    margin: 0;
}

.cerrar-notificacion {
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    transition: color 0.2s;
}

.cerrar-notificacion:hover {
    color: #4a5568;
}

.estadisticas-notificacion {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.estadistica-item {
    flex: 1;
    background: #f7fafc;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.estadistica-valor {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 4px;
}

.estadistica-etiqueta {
    font-size: 11px;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fila-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
}

.fila-info:first-child {
    border-top: none;
}

.etiqueta-info {
    color: #718096;
    display: flex;
    align-items: center;
    gap: 8px;
}

.valor-info {
    color: #2d3748;
    font-weight: 600;
}

.acciones-notificacion {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.boton-notificacion {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.boton-cancelar {
    background: #fee;
    color: #dc2626;
}

.boton-cancelar:hover {
    background: #fecaca;
}

.boton-ocultar {
    background: #f7fafc;
    color: #4a5568;
}

.boton-ocultar:hover {
    background: #e2e8f0;
}

/* Modo Compacto */
.panel-notificacion.compact {
    width: 320px;
}

.panel-notificacion.compact .estadisticas-notificacion {
    display: none;
}

.panel-notificacion.compact .acciones-notificacion {
    flex-direction: column;
}

/* Estado Éxito */
.panel-notificacion.success .relleno-progreso {
    background: linear-gradient(90deg, #10b981, #059669);
}

.panel-notificacion.success .estadistica-valor {
    color: #10b981;
}

.panel-notificacion.success .etiqueta-info i {
    color: #10b981;
}

/* Estado Error */
.panel-notificacion.error .relleno-progreso {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.panel-notificacion.error .estadistica-valor {
    color: #ef4444;
}

/* ============================================
   RESPONSIVO
   ============================================ */

@media (max-width: 768px) {
    .encabezado-tabla,
    .fila-tabla {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .encabezado-tabla {
        display: none;
    }

    .formato-reporte,
    .tiempo-reporte {
        font-size: 12px;
    }

    .panel-notificacion.show {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
    }

    .panel-notificacion.compact {
        width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .estadisticas-notificacion {
        flex-direction: column;
        gap: 10px;
    }

    .encabezado-pagina {
        padding: 20px;
    }

    .encabezado-pagina h1 {
        font-size: 22px;
    }
}