/* ============================================
   ESTILOS ESPECÍFICOS PARA REPORTE POR FLOTA
   ============================================ */

/* Loader */
#loader {
  transition: all 0.3s ease-in-out;
  opacity: 1;
  visibility: visible;
  position: fixed;
  height: 100vh;
  width: 100%;
  background: #fff;
  z-index: 90000;
  top: 0;
  left: 0;
}

#loader.fadeOut {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#loader[style*="display: none"] {
  display: none !important;
}

.spinner {
  width: 40px;
  height: 40px;
  position: absolute;
  top: calc(50% - 20px);
  left: calc(50% - 20px);
  background-color: #333;
  border-radius: 100%;
  -webkit-animation: sk-scaleout 1.0s infinite ease-in-out;
  animation: sk-scaleout 1.0s infinite ease-in-out;
}

@-webkit-keyframes sk-scaleout {
  0% { -webkit-transform: scale(0) }
  100% {
    -webkit-transform: scale(1.0);
    opacity: 0;
  }
}

@keyframes sk-scaleout {
  0% {
    -webkit-transform: scale(0);
    transform: scale(0);
  } 100% {
    -webkit-transform: scale(1.0);
    transform: scale(1.0);
    opacity: 0;
  }
}

/* SOLUCIÓN ESPECÍFICA SOLO PARA ESTA PÁGINA */
body.app.reporte-flota-page {
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.app.reporte-flota-page::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* IMPORTANTE: NO modificar .page-container ni el navbar
   Estos elementos están en base.php y deben mantener sus estilos originales
   Solo modificamos el contenido dentro de #mainContent */

/* CONTENEDOR PRINCIPAL CON SCROLL */
body.app.reporte-flota-page .main-content {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: auto !important;
  max-height: none !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  padding: 20px !important;
}

body.app.reporte-flota-page .main-content::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

body.app.reporte-flota-page #mainContent {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  padding: 0 !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.app.reporte-flota-page #mainContent::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Aplicar padding solo al contenido interno, no al contenedor principal */
body.app.reporte-flota-page #mainContent > .row,
body.app.reporte-flota-page #mainContent > .masonry {
  padding: 0 !important;
}

/* MASONRY CONTAINER */
body.app.reporte-flota-page .masonry {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* MASONRY ITEMS */
body.app.reporte-flota-page .masonry-item {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  width: 100% !important;
  max-width: 100% !important;
}

body.app.reporte-flota-page .masonry-item.w-100 {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* CONTENEDORES DE TARJETAS */
body.app.reporte-flota-page .bd.bgc-white.p-20,
body.app.reporte-flota-page .bd.bgc-white,
body.app.reporte-flota-page .layers.bd.bgc-white.p-20 {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  min-height: auto !important;
  width: 100% !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 1 !important;
}

/* REPORT PAGE CONTAINER */
body.app.reporte-flota-page #reportPage {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  width: 100% !important;
  min-height: auto !important;
  padding-bottom: 50px;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* CANVAS ELEMENTS */
body.app.reporte-flota-page canvas {
  max-width: 100% !important;
  width: 100% !important;
  height: 400px !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 1 !important;
  background: transparent !important;
}

/* CHART CONTAINERS */
body.app.reporte-flota-page .mB-30 {
  width: 100% !important;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
  min-height: 500px !important;
  position: relative !important;
  z-index: 1 !important;
  margin-bottom: 50px !important;
  display: block !important;
  visibility: visible !important;
}

body.app.reporte-flota-page .mB-30 > div {
  position: relative !important;
  z-index: 1 !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: 400px !important;
  max-height: none !important;
  overflow: visible !important;
  display: block !important;
  width: 100% !important;
}

/* ROW Y COLUMNAS - Asegurar que ocupen todo el ancho */
body.app.reporte-flota-page .row {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.app.reporte-flota-page .row.gap-20 {
  width: 100% !important;
}

/* ESTILOS PARA BOTONES DEL HEADER */
.btn-transparent-red {
  background-color: transparent !important;
  border: 2px solid #dc3545 !important;
  color: #dc3545 !important;
  transition: all 0.3s ease !important;
}

.btn-transparent-red:hover {
  background-color: #dc3545 !important;
  color: white !important;
  border-color: #dc3545 !important;
}

.header-buttons {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

/* ASEGURAR QUE EL SELECTOR DE TEMA SEA VISIBLE */
body.app.reporte-flota-page .header .nav-left .theme-toggle,
body.app.reporte-flota-page .header .nav-right .theme-toggle {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: 65px !important;
  align-items: center !important;
}

body.app.reporte-flota-page .header .theme-toggle .form-check {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin: 0 !important;
}

body.app.reporte-flota-page .header .theme-toggle .form-check-input {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body.app.reporte-flota-page .header .theme-toggle .form-check-label {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ESTILOS PARA MODO OSCURO - CALENDARIO AVANZADO */
[data-theme="dark"] #calendarioModal {
  background-color: #2c3e50 !important;
  color: #ecf0f1 !important;
}

[data-theme="dark"] #calendarioModal .modal-content {
  background-color: #34495e !important;
  border: 1px solid #4a5f7a !important;
}

[data-theme="dark"] #calendarioModal h5 {
  color: #ecf0f1 !important;
}

[data-theme="dark"] #calendarioModal label {
  color: #bdc3c7 !important;
}

[data-theme="dark"] #calendarioModal select,
[data-theme="dark"] #calendarioModal input {
  background-color: #2c3e50 !important;
  color: #ecf0f1 !important;
  border: 1px solid #4a5f7a !important;
}

[data-theme="dark"] #calendarioModal button {
  background-color: #3498db !important;
  color: white !important;
  border: 1px solid #2980b9 !important;
}

[data-theme="dark"] #calendarioModal button:hover {
  background-color: #2980b9 !important;
}

/* COLUMNAS PERSONALIZADAS PARA FILTROS */
.col-md-2-4 {
  flex: 0 0 20%;
  max-width: 20%;
  padding-left: 8px;
  padding-right: 8px;
}

@media (min-width: 768px) {
  .col-md-2-4 {
    flex: 0 0 20%;
    max-width: 20%;
  }
}

