/* ===== SOFT UI DASHBOARD STYLE - MODERN DESIGN ===== */

/* Variables CSS para colores consistentes */
:root {
    --primary-color: #6c757d; /* Gris medio */
    --primary-gradient: linear-gradient(87deg, #6c757d 0, #495057 100%); /* Gradiente de gris medio a gris oscuro */
    --secondary-color: #f7fafc;
    --success-color: #B2E8C8; /* Verde menta pastel */
    --info-color: #B0E0F5; /* Azul cielo pastel */
    --warning-color: #FFB380; /* Naranja melocotón pastel */
    --danger-color: #FFB6C1; /* Rosa pastel */
    --dark-color: #172b4d;
    --light-color: #f8f9fa;
    --white-color: #ffffff;
    --gray-100: #f6f9fc;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #8898aa;
    --gray-700: #525f7f;
    --gray-800: #32325d;
    --gray-900: #212529;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --shadow-xl: 0 1.5rem 4rem rgba(0, 0, 0, 0.15);
    --border-radius: 0.375rem;
    --border-radius-lg: 0.5rem;
    --border-radius-xl: 0.75rem;
    --transition: all 0.15s ease-in-out;
}

/* ===== RESET Y ESTILOS BASE ===== */
* {
    box-sizing: border-box;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--gray-700);
    background: 
        linear-gradient(
            rgba(255, 255, 255, 0.85), 
            rgba(255, 255, 255, 0.85)
        ),
        url('/assets/images/bg_indoor_hd.png') no-repeat center center fixed;
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER Y NAVEGACIÓN ===== */
.navbar {
    background: var(--white-color) !important;
    box-shadow: 0 0 2rem 0 rgba(136, 152, 170, 0.15);
    border: none;
    transition: var(--transition);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--dark-color) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    transition: none; /* Quitar transiciones para evitar efectos */
    min-height: 3.5rem !important; /* Altura mínima para el logo */
}

.navbar-brand-icon {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    border-radius: 4px;
    transition: none; /* Sin transiciones */
}

.navbar-brand i {
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: none; /* Quitar transiciones del icono */
}

.navbar-brand:hover {
    color: var(--dark-color) !important; /* Mantener el mismo color que el estado normal */
    text-decoration: none;
}

/* Layout del navbar */
.navbar-collapse {
    justify-content: space-between !important;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-nav .nav-item {
    margin: 0;
}

.navbar-nav .nav-link {
    color: var(--gray-700) !important;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-nav .nav-link:hover {
    color: var(--gray-700) !important;
    text-decoration: none;
}

.navbar-nav .nav-link i {
    font-size: 1rem;
    width: 1rem;
    text-align: center;
}

/* Perfil del usuario - Estilo Soft UI Dashboard */
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--white-color);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    color: var(--gray-700);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 0 0.375rem 0 rgba(0, 0, 0, 0.15);
    cursor: pointer;
    margin-left: 0.5rem;
}

.user-profile:hover {
    border-color: var(--primary-color); /* Borde con el nuevo color primario gris */
    color: var(--gray-700);
    text-decoration: none;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 2px solid var(--gray-200);
    object-fit: cover;
    background: var(--gray-100);
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    color: var(--gray-700);
}

/* Botón de cerrar sesión */
.btn-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 50%;
    color: var(--gray-600);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.875rem;
}

.btn-logout:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
    transform: scale(1.05);
}

.btn-logout:active {
    transform: scale(0.95);
}

.container-fluid {
    padding: 0 1.5rem;
}

/* Botón hamburguesa */
.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-toggler:hover {
    background-color: var(--gray-200);
}

/* ===== CONTENIDO PRINCIPAL ===== */
.container {

    height: 100%;
}

main {
    padding: 2rem 0;
    flex: 1;
    min-height: 0;
}

/* ===== TARJETAS Y COMPONENTES ===== */
.card {
    background: var(--white-color);
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 0 2rem 0 rgba(136, 152, 170, 0.15);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 0 2.5rem 0 rgba(136, 152, 170, 0.25);
}

.card-header {
    background: var(--white-color);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--gray-600);
    line-height: 1.6;
}

/* ===== ESTILOS ESPECÍFICOS PARA TARJETAS DE REPORTES ===== */
.report-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.report-card {
    width: 100%;
    transition: var(--transition);
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 2rem rgba(136, 152, 170, 0.2) !important;
}

.report-card .shadow-sm {
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
}

.report-card .shadow-sm:hover {
    box-shadow: 0 0.5rem 2rem rgba(136, 152, 170, 0.2) !important;
}

/* Responsive para dispositivos móviles */
@media (max-width: 768px) {
    .report-card .d-flex {
        flex-direction: column;
        align-items: stretch !important;
    }
    
    .report-card .ms-3 {
        margin-left: 0 !important;
        margin-top: 1rem;
        text-align: center;
    }
    
    .report-card .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== ESTILOS PARA BÚSQUEDA Y FILTRADO ===== */
#searchBox {
    border: 2px solid var(--gray-200);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

#searchBox:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
    outline: none;
}

#searchBox::placeholder {
    color: var(--gray-500);
    font-style: italic;
}

/* Estilos para el resaltado de texto en búsqueda */
mark {
    background-color: #fff3cd !important;
    color: #856404 !important;
    padding: 0.1rem 0.2rem !important;
    border-radius: 0.2rem !important;
    font-weight: 600 !important;
}

/* ===== ESTILOS ESPECÍFICOS PARA BOTÓN VER EN TARJETAS DE REPORTES ===== */
.report-card .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 50%, #495057 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    text-decoration: none !important;
}

.report-card .btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 50%, #343a40 100%) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
    text-decoration: none !important;
}

.report-card .btn-secondary:active {
    background: linear-gradient(135deg, #495057 0%, #343a40 50%, #212529 100%) !important;
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    text-decoration: none !important;
}

/* Mensaje de "sin resultados" */
#noResultsMessage {
    background: var(--gray-100);
    border-radius: var(--border-radius-lg);
    border: 2px dashed var(--gray-300);
    margin: 2rem 0;
}

#noResultsMessage i {
    color: var(--gray-500);
    margin-bottom: 1rem;
}

/* Animación para las tarjetas al filtrar */
.report-card {
    transition: all 0.3s ease-in-out;
}

.report-card[style*="display: none"] {
    opacity: 0;
    transform: scale(0.95);
}

.report-card:not([style*="display: none"]) {
    opacity: 1;
    transform: scale(1);
}

/* ===== BOTONES ===== */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    border: none;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-gradient); /* Fondo con el nuevo gradiente primario gris */
    color: var(--white-color);
    box-shadow: var(--shadow-sm);
    border: none; /* Asegurar que no haya borde que interfiera */
}

.btn-primary:hover {
    color: var(--white-color);
    text-decoration: none;
    opacity: 0.9; /* Pequeño efecto de opacidad al hover */
}

.btn-success {
    background: linear-gradient(87deg, var(--success-color) 0, #9ED5B8 100%); /* Verde menta más suave */
    color: var(--white-color);
    border: none;
}

.btn-info {
    background: linear-gradient(87deg, var(--info-color) 0, #9BC8E8 100%); /* Azul cielo más suave */
    color: var(--white-color);
    border: none;
}

.btn-warning {
    background: linear-gradient(87deg, var(--warning-color) 0, #FFA366 100%); /* Naranja melocotón más suave */
    color: var(--white-color);
    border: none;
}

.btn-danger {
    background: linear-gradient(87deg, var(--danger-color) 0, #FFA5B0 100%); /* Rosa más suave */
    color: var(--white-color);
    border: none;
}

/* ===== FORMULARIOS ===== */
.form-control {
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: var(--transition);
    background-color: var(--white-color);
}

.form-control:focus {
    border-color: var(--primary-color); /* Usar el nuevo color primario gris */
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25); /* Sombra con el nuevo color primario gris */
    outline: none;
}

.form-control::placeholder {
    color: var(--gray-500);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* ===== TABLAS ===== */
.table {
    background: var(--white-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background: var(--gray-100);
    border: none;
    font-weight: 600;
    color: var(--dark-color);
    padding: 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.table tbody td {
    border: none;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: var(--gray-100);
}

/* ===== BADGES ===== */
.badge {
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    text-align: center;
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.badge-container {
    height: 100%;
    display: flex;
    align-items: stretch;
}

.badge-container .badge {
    width: 100%;
    margin: 0;
}

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

.badge-secondary {
    background: var(--gray-500);
    color: var(--white-color);
}

.badge-success {
    background: var(--success-color);
    color: var(--white-color);
}

.badge-info {
    background: var(--info-color);
    color: var(--white-color);
}

.badge-warning {
    background: var(--warning-color);
    color: var(--white-color);
}

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

/* ===== UTILIDADES ===== */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-info { color: var(--info-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-dark { color: var(--dark-color) !important; }
.text-muted { color: var(--gray-600) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-info { background-color: var(--info-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-light { background-color: var(--light-color) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 0.25rem;
    }
    
    .navbar-nav .nav-link {
        width: 100%;
        justify-content: center;
    }
    
    .user-profile {
        margin-top: 1rem;
        justify-content: center;
    }
    
    .container-fluid {
        padding: 0 1rem;
    }
    
    /* Mejorar presentación de badges en móvil */
    .badge {
        min-height: 2rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .badge-container {
        margin-bottom: 0.5rem;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--white-color);
    border-top: 1px solid var(--gray-200);
    padding: 0.5rem 0;
    margin-top: auto;
    text-align: center;
    color: var(--gray-600);
    box-shadow: 0 0 0.5rem 0 rgba(136, 152, 170, 0.1);
    flex-shrink: 0;
    position: relative;
    bottom: auto;
    width: 100%;
    white-space: nowrap;
    line-height: 1.2;
}

.footer a {
    color: var(--primary-color); /* Enlaces con el nuevo color primario gris */
    text-decoration: none;
}

.footer a:hover {
    color: var(--dark-color);
    text-decoration: underline;
}

.footer-brand-icon {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    border-radius: 3px;
    vertical-align: middle;
    transition: none;
}

/* ===== ESTILOS COMPLEMENTARIOS PARA COMPONENTES RAZOR ===== */
/* Estilos para enlaces generales */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--dark-color);
    text-decoration: underline;
}

/* Estilos para navegación de píldoras */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    color: var(--white-color);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Estilos para bordes */
.border-top {
    border-top: 1px solid var(--gray-200);
}

.border-bottom {
    border-bottom: 1px solid var(--gray-200);
}

/* Estilos para sombras de cajas */
.box-shadow {
    box-shadow: var(--shadow-sm);
}

/* Estilos para botones de política */
button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

/* ===== ESTILOS PARA LOGO DEL HEADER ===== */
.navbar-brand .header-logo {
    width: auto !important;
    height: 100% !important; /* Ocupar todo el alto del header */
    max-width: none !important;
    max-height: 3.5rem !important; /* Altura máxima para evitar desbordamiento */
    margin: 0 !important;
    filter: none !important;
    display: inline-block !important;
    object-fit: contain !important; /* Mantener proporciones */
}

/* ===== ESTILOS ESPECÍFICOS PARA GESTIÓN DE USUARIOS ===== */
.user-management-container {
    max-width: 95% !important;
}

.user-stats-card {
    transition: all 0.3s ease;
    border-radius: 8px;
}

.user-stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-table-row {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f3f4;
}

.user-table-row:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.user-role-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.user-action-btn {
    border-radius: 6px;
    padding: 6px 12px;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
}

.user-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.user-header-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

.user-empty-state {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
}

/* Responsive adjustments for user management */
@media (max-width: 768px) {
    .user-management-container {
        max-width: 100% !important;
        padding: 0 0.5rem;
    }
    
    .user-stats-card .col-md-3 {
        margin-bottom: 1rem;
    }
    
    .user-action-btn {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .user-header-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
}

/* ===== ESTILOS PARA REPORTE EN PANTALLA COMPLETA ===== */
.report-body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    background: #f8f9fa !important;
}

#reportContainer {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1 !important; /* Asegurar que esté por debajo del overlay */
}

/* Asegurar que el iframe de PowerBI ocupe todo el espacio */
#reportContainer iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    z-index: 1 !important; /* Asegurar que esté por debajo del overlay */
}

/* Forzar estilos para elementos internos de PowerBI */
#reportContainer div,
#reportContainer section,
#reportContainer article {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Forzar estilos para todos los elementos de PowerBI */
#reportContainer * {
    box-sizing: border-box !important;
}

/* Estilos específicos para el reporte embebido */
[data-report-id] {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Override de estilos de PowerBI */
.powerbi-report-container {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ===== ESTILOS PARA BOTÓN VOLVER EN VIEWREPORT ===== */
.btn-back {
    position: fixed !important;
    top: 1rem !important;
    left: 1rem !important;
    z-index: 1002 !important; /* Por encima del overlay (z-index: 1001) */
    background: rgba(255, 255, 255, 0.3) !important; /* Fondo muy tenue */
    border: 1px solid rgba(255, 255, 255, 0.5) !important; /* Borde tenue */
    color: rgba(255, 255, 255, 0.8) !important; /* Texto tenue */
    padding: 0.75rem !important; /* Padding igual para hacer círculo perfecto */
    border-radius: 50% !important; /* Forma redonda */
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important; /* Sombra sutil */
    transition: all 0.3s ease !important; /* Transición suave */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important; /* Centrar contenido */
    width: 3rem !important; /* Ancho fijo para círculo perfecto */
    height: 3rem !important; /* Alto fijo para círculo perfecto */
    font-weight: 600 !important;
    font-size: 1rem !important;
    -webkit-backdrop-filter: blur(10px) !important; /* Efecto de cristal */
    backdrop-filter: blur(10px) !important; /* Efecto de cristal */
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.8) !important; /* Fondo más opaco */
    border-color: rgba(255, 255, 255, 0.9) !important; /* Borde más visible */
    color: rgba(0, 0, 0, 0.8) !important; /* Texto más oscuro */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important; /* Sombra más pronunciada */
    transform: scale(1.05) !important; /* Ligero aumento de tamaño */
}

.btn-back:active {
    background: rgba(255, 255, 255, 0.9) !important; /* Fondo casi opaco */
    border-color: rgba(255, 255, 255, 1) !important; /* Borde completamente visible */
    color: rgba(0, 0, 0, 0.9) !important; /* Texto muy oscuro */
    transform: scale(0.95) !important; /* Ligera reducción de tamaño */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important; /* Sombra más intensa */
}

/* ===== OVERLAY PARA OCULTAR BANNER DE POWER BI ===== */
#powerbiBannerOverlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: 40px !important; /* Altura reducida para cubrir solo el banner y maximizar espacio del informe */
    background: #ffffff !important; /* Fondo blanco sólido */
    z-index: 1001 !important; /* Por encima del reporte y del iframe, pero por debajo del botón de volver (z-index: 1002) */
    pointer-events: none !important; /* Permitir interacción con elementos debajo si es necesario */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important; /* Sombra sutil para separación visual */
}

/* Ajuste para dispositivos móviles */
@media (max-width: 768px) {
    #powerbiBannerOverlay {
        height: 35px !important; /* Altura reducida en móviles */
    }
}

/* Estilos para el badge de admin */
.badge.bg-primary {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-weight: 600;
    background: var(--primary-color) !important;
    color: white !important;
}

/* Estilos para el nombre del usuario en el dropdown */
.user-dropdown-toggle .user-name {
    color: var(--gray-700);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

/* Estilos para el dropdown del usuario */
.user-dropdown-toggle {
    background: transparent;
    color: var(--gray-700) !important;
    border-radius: 0.375rem;
    padding: 0.375rem 1rem;
    transition: all 0.2s ease;
    border: 1px solid var(--gray-200);
    box-shadow: none;
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 160px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-dropdown-toggle:hover {
    background: var(--gray-100);
    color: var(--gray-900) !important;
    border-color: var(--gray-300);
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-dropdown-toggle:focus {
    background: var(--gray-100);
    color: var(--gray-900) !important;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
}

/* Mejorar el dropdown del usuario */
.navbar-nav .dropdown-menu {
    border: none;
    background: var(--white-color);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    position: absolute;
    right: 0 !important;
    left: auto !important;
    min-width: 200px;
    transform: none !important;
}

.navbar-nav .dropdown-item {
    padding: 0.75rem 1.5rem;
    color: var(--gray-700);
    transition: all 0.2s ease;
    border-radius: 0.25rem;
    margin: 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-nav .dropdown-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
    transform: none;
}

.navbar-nav .dropdown-divider {
    margin: 0.5rem 0;
    border-color: #e9ecef;
}

/* Indicador visual de admin en el header */
.navbar-brand .header-logo {
    width: auto !important;
    height: 100% !important; /* Ocupar todo el alto del header */
    max-width: none !important;
    max-height: 3.5rem !important; /* Altura máxima para evitar desbordamiento */
    margin: 0 !important;
    filter: none !important;
    display: inline-block !important;
    object-fit: contain !important; /* Mantener proporciones */
    padding: 0.25rem 0 !important; /* Pequeño padding vertical para centrar */
}

.navbar-brand {
    /* ... existing styles ... */
    min-height: 3.5rem !important; /* Altura mínima para el logo */
}

/* Estilos para el footer */
.footer-brand-icon {
    width: 1.2rem !important;
    height: 1.2rem !important;
    margin: 0 0.3rem !important;
    vertical-align: middle !important;
    filter: none !important;
}

/* Estilos para reportes a pantalla completa */
.report-body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    background-color: #f8f9fa !important;
}

#reportContainer {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

#reportContainer iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

#reportContainer div, #reportContainer section, #reportContainer article {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

#reportContainer * {
    max-width: none !important;
    max-height: none !important;
}

[data-report-id] {
    width: 100% !important;
    height: 100% !important;
}

.powerbi-report-container {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Estilos para la lista de reportes */
.report-list {
    margin-top: 1rem;
}

.report-card {
    transition: all 0.3s ease;
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Estilos para el botón de búsqueda */
#searchBox {
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#searchBox:focus {
    border-color: #6c757d;
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
    outline: none;
}

#searchBox::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

/* Estilos para el resaltado de texto */
mark {
    background-color: #fff3cd;
    color: #856404;
    padding: 0.1rem 0.2rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

/* Estilos para el mensaje de no resultados */
#noResultsMessage {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

/* Estilos para el botón secundario en las tarjetas */
.report-card .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 50%, #495057 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    text-decoration: none !important;
}

.report-card .btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 50%, #343a40 100%) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
    text-decoration: none !important;
}

.report-card .btn-secondary:active {
    background: linear-gradient(135deg, #495057 0%, #343a40 50%, #212529 100%) !important;
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    text-decoration: none !important;
}

/* Estilos para el fondo de la página de reportes */
.reports-page {
    background: 
        linear-gradient(
            rgba(255, 255, 255, 0.7), 
            rgba(255, 255, 255, 0.7)
        ),
        url('/assets/images/bg_indoor_hd.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
}

/* Estilos para el body con fondo global */
body {
    background: 
        linear-gradient(
            rgba(255, 255, 255, 0.65), 
            rgba(255, 255, 255, 0.65)
        ),
        url('/assets/images/bg_indoor_hd.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Remover fondo blanco del main para mostrar el fondo del body */
main {
    background-color: transparent !important;
}

/* ===== INDICADOR DE ESTADO DEL SISTEMA ===== */
.system-status-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 200px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s ease;
}

.system-status-indicator:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.status-icon {
    font-size: 16px;
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
}

.status-text {
    font-weight: 600;
    font-size: 14px;
    color: #2d3748;
    display: inline-block;
    vertical-align: middle;
    margin: 0;
}

.status-details {
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
    line-height: 1.4;
}

/* Estados específicos del indicador */
.system-status-indicator.connected {
    border-left: 4px solid #48bb78;
}

.system-status-indicator.reconnecting {
    border-left: 4px solid #ed8936;
}

.system-status-indicator.disconnected {
    border-left: 4px solid #f56565;
}

/* Animación para el estado de reconexión */
.system-status-indicator.reconnecting .status-icon {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Responsive para el indicador */
@media (max-width: 768px) {
    .system-status-indicator {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        padding: 10px 12px;
    }
    
    .status-text {
        font-size: 13px;
    }
    
    .status-details {
        font-size: 11px;
    }
}