/* estadisticasoti.css */
body {
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif; /* Usar la fuente definida en el HTML */
}
.header-image-container {
    width: 100%;
    max-width: 2200px;
    text-align: center;
    margin-bottom: 0;
    padding: 0;
    background-color: white;
}
.header-image-container img {
    display: block;
    width: 100%;
    height: auto;
}
header {
    width: 100%;
    max-width: 2200px;
    text-align: center;
    margin-bottom: 20px;
    padding: 10px 20px;
    background-color: rgb(15, 70, 201);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 60px;
}
header .header-content {
    width: 100%;
    max-width: 2200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-title-area {
    display: flex;
    align-items: center;
}
.header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}
header h1 {
    margin: 0;
    color: white;
    font-size: 1.8em;
}
.stats-container {
    width: 95%;
    max-width: 1200px;
    margin-top: 10px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.chart-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin-bottom: 30px;
}

/* --- SOLUCIÓN APLICADA AQUÍ --- */
.chart-container {
    position: relative; 
    width: 100%;
    max-width: 550px;
    margin: 15px;
    padding: 60px 15px 15px 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    text-align: center;
    cursor: pointer;
    /* Se agrega Flexbox y una altura mínima para evitar que colapse al ocultar el canvas */
    display: flex;
    flex-direction: column;
    min-height: 480px; 
}

.chart-container canvas {
    cursor: pointer;
}
.chart-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #0056b3;
    font-size: 1.3em;
}
canvas {
    max-height: 400px;
}

/* Modificaciones del Botón Volver */
.btn-back {
    position: absolute;
    top: 15px; /* Separación desde arriba */
    left: 15px; /* Separación desde la izquierda */
    z-index: 10;
    padding: 6px 14px;
    background-color: #6c757d;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 5px;
}
.btn-back:hover {
    background-color: #5a6268;
    transform: translateY(-2px); 
}

.drilldown-options-container {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 20;
    text-align: center;
    max-width: 90%;
}
.drilldown-options-container p {
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #333;
}
.drilldown-options-container p span {
    font-weight: bold;
    color: #007bff;
}
.drilldown-options-container .btn {
    margin: 5px;
    min-width: 120px;
}
.chart-container.overlay-active canvas {
    filter: brightness(0.6);
    pointer-events: none;
}
#employeeChartsContainer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
#employeeChartsContainer > h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #0056b3;
}
@media (min-width: 768px) {
    .chart-container {
        width: calc(50% - 30px);
    }
    .chart-row.three-charts .chart-container {
        width: calc(33.33% - 30px);
    }
    #employeeChartsContainer .chart-container {
        width: calc(50% - 30px);
    }
}
@media (min-width: 992px) {
    .chart-container {
        width: calc(50% - 30px);
    }
    .chart-row.three-charts .chart-container {
        width: calc(33.33% - 30px);
    }
    #employeeChartsContainer .chart-container {
        width: calc(50% - 30px);
    }
}
.navbar-brand {
    font-size: 1.8em;
    font-weight: 700;
    color: rgb(16, 53, 141);
    margin-left: 0px;
    text-decoration: none;
}
.nav-item {
    padding: 0 18px;
}
.nav-link {
    color: #333 !important;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
    text-decoration: none;
}
.nav-link:hover {
    color: #3498db !important;
}

/* Estilos para el nuevo Modal de Detalles de Reportes por Hora */
.modal#reportDetailsModal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}
.modal#reportDetailsModal .modal-dialog {
    margin: 50px auto;
    max-width: 700px;
}
.modal#reportDetailsModal .modal-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    padding: 0;
}
.modal#reportDetailsModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}
.modal#reportDetailsModal .modal-title {
    margin: 0;
    font-size: 1.25rem;
    color: #0056b3;
}
.modal#reportDetailsModal .close {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0;
    color: #6c757d;
}
.modal#reportDetailsModal .close:hover {
    color: #000;
}
.modal#reportDetailsModal .modal-body {
    padding: 20px;
    max-height: 450px;
    overflow-y: auto;
}
.modal#reportDetailsModal .modal-body ul {
    list-style-type: none;
    padding-left: 0;
}
.modal#reportDetailsModal .modal-body li {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 10px 15px;
    margin-bottom: 10px;
}
.modal#reportDetailsModal .modal-body li strong {
    color: #0056b3;
}
.modal#reportDetailsModal .modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    text-align: right;
}
.modal#reportDetailsModal .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
    padding: 8px 15px;
    cursor: pointer;
}
.modal#reportDetailsModal .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Estilos para el filtro de tiempo */
.filter-container {
    margin-bottom: 15px;
    text-align: right;
}
.filter-container label {
    margin-right: 10px;
    font-weight: bold;
    color: #333;
}
.filter-container select {
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 0.9em;
    cursor: pointer;
}

/* --- SOLUCIÓN APLICADA AQUÍ --- */
.no-data-message {
    /* Eliminamos la posición absoluta para que no se superponga */
    margin: auto; /* Se centra automáticamente en el contenedor flex */
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 5;
    width: 80%;
    text-align: center;
    display: none;
}
.no-data-message p {
    margin: 0;
    color: #555;
    font-size: 1.1em;
}
.chart-container.no-data canvas {
    display: none;
}
.chart-container:not(.no-data) .no-data-message {
    display: none;
}

.navbar-nav .dropdown-toggle::after {
    content: none !important;
}

/* --- REGLAS PARA DROPDOWN EN NAVEGACIÓN (Optimizadas para clic de Bootstrap) --- */

.navbar-nav .dropdown-menu {
    margin-top: 0;
    border: none;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.navbar-nav .dropdown-menu.show {
    animation: slideDownFade 0.2s ease-out forwards;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-nav .dropdown-toggle,
#navbarDropdownMenuLink {
    cursor: pointer;
}


.modal-mini {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 300px;
    background: rgba(40, 50, 60, 0.9);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    color: white;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.3s ease-out;
}

.modal-mini-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.modal-mini h5 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #f8f9fa;
}

.modal-mini .btn {
    width: 100%;
    padding: 10px 15px;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: background-color 0.2s, transform 0.2s;
}

.modal-mini .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.modal-mini .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
}

.modal-mini .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.modal-mini .btn-secondary:hover {
    background-color: #545b62;
    border-color: #545b62;
    transform: translateY(-2px);
}

.chart-container.overlay-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    border-radius: 8px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}