/* ============================================
   dbr.css - Estilos específicos para Dashboard Reportes
   Diseño: Material + Fluent Design System
   ============================================ */

/* Cards de resumen */
.card-primary.card-outline {
    border-top: 3px solid #6f42c1;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.card-primary.card-outline:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
}

/* Barra de progreso */
.progress-lg {
    height: 20px;
    border-radius: 10px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #fd7e14, #ffc107);
    border-radius: 10px;
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.1) 0%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0.1) 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Tablas */
.table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #6f42c1;
    color: #495057;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(111, 66, 193, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(111, 66, 193, 0.05);
    transition: background-color 0.2s ease;
}

.table td {
    vertical-align: middle;
    padding: 0.75rem;
}

/* Badges para totales */
.badge-primary {
    background-color: #6f42c1;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 20px;
}

.badge-success {
    background-color: #28a745;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 20px;
}

/* Filtros */
.select2-container--bootstrap4 .select2-selection {
    border-radius: 0.5rem !important;
    border: 1px solid #ced4da;
    min-height: 38px;
}

.select2-container--bootstrap4.select2-container--focus .select2-selection {
    border-color: #6f42c1;
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.25);
}

/* Números en display */
.display-4 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #6f42c1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* Texto de progreso */
.text-muted {
    color: #6c757d !important;
    font-size: 0.9rem;
}

/* Tooltips personalizados */
[data-toggle="tooltip"] {
    cursor: help;
}

.tooltip-inner {
    background-color: #6f42c1;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.tooltip.bs-tooltip-top .arrow::before {
    border-top-color: #6f42c1;
}

/* Loader específico */
#dbr-loader {
    -webkit-backdrop-filter: blur(3px); /* Safari 9+, iOS 9+ */
    backdrop-filter: blur(3px);         /* Estándar */
    transition: all 0.3s ease;
}

.spinner-border.text-primary {
    color: #6f42c1 !important;
    width: 3rem;
    height: 3rem;
    border-width: 0.25rem;
}

/* Animaciones de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.5s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .display-4 {
        font-size: 1.8rem;
    }
    
    .table thead th {
        font-size: 0.75rem;
    }
    
    .table td {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
    
    .badge-primary,
    .badge-success {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .progress-lg {
        height: 15px;
    }
}

/* Impresión */
@media print {
    .main-header,
    .main-sidebar,
    .content-header .breadcrumb,
    .card-tools,
    .select2,
    .btn,
    footer {
        display: none !important;
    }
    
    .content-wrapper {
        margin-left: 0 !important;
        padding: 20px;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
    
    .table {
        border-collapse: collapse !important;
    }
    
    .table td,
    .table th {
        background-color: #fff !important;
        color: #000 !important;
    }
}