body {
  background-image: url(../public/images/bgbuses.jpg);
  background-attachment: fixed;
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: -1;
}

.table-fixed-header {
  overflow: visible !important;
  position: relative;
}

.table-fixed-header .dropdown-menu {
  position: absolute !important;
  z-index: 99999 !important;
}

.table-fixed-header thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #fff;
}

/* Envoltorio interno con scroll horizontal para tablet/laptop: evita que la
   tabla se salga del contenedor cuando tiene muchas columnas. No se aplica
   overflow directamente en .table-fixed-header porque ese div necesita
   overflow:visible para que el dropdown de "Acciones" no se recorte; al
   estar el scroll en un div interno y el dropdown posicionado (absolute)
   respecto al div externo (position:relative), el menu sigue escapando del
   recorte aunque la tabla ahora se contenga. */
.rev-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

td {
  font-size: small;
}

#placaList {
  height: auto;
  display: none;
  position: absolute;
  background-color: silver;
  color: black;
  z-index: 1000;
}

#placaList option {
  padding: 3px;
  width: 240px;
  cursor: pointer;
}

#placaList option:hover {
  background-color: black;
  color: white;
}

#listContainerNovRev {
  height: auto;
  display: none;
  position: absolute;
  background-color: silver;
  color: black;
  z-index: 1000;
}

#placaListDisplay option {
  width: 150px;
  cursor: pointer;
  padding: 3px;
}

#placaListDisplay option:hover {
  background-color: black;
  color: white;
}

.navbar {
  background-color: rgb(0, 0, 0, 0.8);
  border-bottom: solid 4px rgb(204, 78, 78);
  color: white;
}

.boxscrolltoday {
  min-height: 150px;
  max-height: 350px;
  overflow-y: auto;
}

/* BOXSCROLLTODAY*/

/* Estilos para el scrollbar cuando está seleccionado */
.boxscrolltoday::-webkit-scrollbar {
  width: 10px;
  background-color: rgba(0, 0, 0, 0.2);
  /* Color de fondo del scrollbar */
}

.boxscrolltoday::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.4);
  /* Color del thumb del scrollbar */
  border-radius: 5px;
}

/* Estilos para el scrollbar cuando no está seleccionado */
.boxscrolltoday::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.6);
  /* Color del thumb del scrollbar cuando se le pasa el mouse por encima */
}

.boxscrolltoday::-webkit-scrollbar-thumb:active {
  background-color: rgba(0, 0, 0, 0.8);
  /* Color del thumb del scrollbar cuando está siendo clickeado */
}

.boxscrolltoday::-webkit-scrollbar-thumb:vertical {
  min-height: 50px;
  /* Altura mínima del thumb del scrollbar */
}

.boxscrolltoday::-webkit-scrollbar-track {
  background-color: transparent;
  /* Color de fondo del track del scrollbar */
}

.boxscroll {
  padding: 0px;
  height: 64%;
  width: auto;
  overflow-y: auto;
}

/* Estilos para el scrollbar cuando está seleccionado */
.boxscroll::-webkit-scrollbar {
  width: 10px;
  background-color: rgba(0, 0, 0, 0.2);
  /* Color de fondo del scrollbar */
}

.boxscroll::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.4);
  /* Color del thumb del scrollbar */
  border-radius: 5px;
}

/* Estilos para el scrollbar cuando no está seleccionado */
.boxscroll::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.6);
  /* Color del thumb del scrollbar cuando se le pasa el mouse por encima */
}

.boxscroll::-webkit-scrollbar-thumb:active {
  background-color: rgba(0, 0, 0, 0.8);
  /* Color del thumb del scrollbar cuando está siendo clickeado */
}

.boxscroll::-webkit-scrollbar-thumb:vertical {
  min-height: 50px;
  /* Altura mínima del thumb del scrollbar */
}

.boxscroll::-webkit-scrollbar-track {
  background-color: transparent;
  /* Color de fondo del track del scrollbar */
}

.boxnoscroll {
  padding: 0px;
  height: 74%;
  width: auto;
}

.boxscrollhome {
  padding: 0px;
  height: 74%;
  width: auto;
  overflow-y: scroll;
}

/* Estilos para el scrollbar cuando está seleccionado */
.boxscrollhome::-webkit-scrollbar {
  width: 10px;
  background-color: rgba(0, 0, 0, 0.2);
  /* Color de fondo del scrollbar */
}

.boxscrollhome::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.4);
  /* Color del thumb del scrollbar */
  border-radius: 5px;
}

/* Estilos para el scrollbar cuando no está seleccionado */
.boxscrollhome::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.6);
  /* Color del thumb del scrollbar cuando se le pasa el mouse por encima */
}

.boxscrollhome::-webkit-scrollbar-thumb:active {
  background-color: rgba(0, 0, 0, 0.8);
  /* Color del thumb del scrollbar cuando está siendo clickeado */
}

.boxscrollhome::-webkit-scrollbar-thumb:vertical {
  min-height: 50px;
  /* Altura mínima del thumb del scrollbar */
}

.boxscrollhome::-webkit-scrollbar-track {
  background-color: transparent;
  /* Color de fondo del track del scrollbar */
}

.boxscrollTable {
  padding: 0px;
  height: 82%;
  width: auto;
  overflow-y: scroll;
}

/* Estilos para el scrollbar cuando está seleccionado */
.boxscrollTable::-webkit-scrollbar {
  width: 10px;
  background-color: rgba(0, 0, 0, 0.2);
  /* Color de fondo del scrollbar */
}

.boxscrollTable::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.4);
  /* Color del thumb del scrollbar */
  border-radius: 5px;
}

/* Estilos para el scrollbar cuando no está seleccionado */
.boxscrollTable::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.6);
  /* Color del thumb del scrollbar cuando se le pasa el mouse por encima */
}

.boxscrollTable::-webkit-scrollbar-thumb:active {
  background-color: rgba(0, 0, 0, 0.8);
  /* Color del thumb del scrollbar cuando está siendo clickeado */
}

.boxscrollTable::-webkit-scrollbar-thumb:vertical {
  min-height: 50px;
  /* Altura mínima del thumb del scrollbar */
}

.boxscrollTable::-webkit-scrollbar-track {
  background-color: transparent;
  /* Color de fondo del track del scrollbar */
}

.boxScrollDetails {
  padding: 0px;
  height: auto;
  width: auto;
  overflow-y: auto;
}

li a[title="Cerrar sesión"] {
  cursor: pointer;
  /* Cambia el cursor a la mano (pointer) */
}

.content-wrapper {
  flex: 1 0 auto;
  padding: 20px 0;
}

.footer {
  flex-shrink: 0;
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 15px 0;
  margin-top: auto;
  border-top: 3px solid #D9534F;
}

/* Estilos para la página de perfil */
.profile-section {
  padding: 25px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
}

.signature-pad {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  background-color: #fff;
  padding: 10px;
  min-height: 200px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

hr.my-4 {
  border-top: 2px solid rgba(0, 0, 0, 0.1);
  margin: 2rem auto;
  width: 80%;
}

.card {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 12px;
  min-height: calc(100vh - 200px); /* Ajustar según necesidad */
}

.card-header {
  border-bottom: 3px solid #D9534F;
}

.card-body {
  padding: 2rem;
}

.input-group-addon {
  background-color: #f8f9fa;
  border: 1px solid #ced4da;
  padding: 0.375rem 0.75rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.btn {
  padding: 10px 20px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========== ESTILOS PARA SELECCIÓN MASIVA ========== */

/* Panel de acciones masivas */
#bulkActionsPanel {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

#bulkActionsPanel .btn-group .btn {
  margin-right: 0.5rem;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  text-transform: none;
  letter-spacing: normal;
}

#bulkActionsPanel .btn-group .btn:last-child {
  margin-right: 0;
}

#selectedCount {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6c757d;
}

/* Checkboxes en la tabla */
.user-checkbox,
#selectAll {
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
}

/* Hover effects para las filas */
#tablaRegistros tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.1) !important;
}

/* Filas seleccionadas */
#tablaRegistros tbody tr.selected {
  background-color: rgba(0, 123, 255, 0.15) !important;
}

/* Responsive adjustments para dispositivos móviles */
@media (max-width: 768px) {
  #bulkActionsPanel {
    padding: 0.75rem;
  }
  
  #bulkActionsPanel .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  #bulkActionsPanel .btn-group .btn {
    margin-right: 0;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  
  #selectedCount {
    margin-top: 0.5rem;
    display: block;
  }
}

/* Animación suave para mostrar/ocultar panel */
#bulkActionsPanel {
  transition: all 0.3s ease-in-out;
}

/* Estilos para alertas de confirmación */
.alertify-confirm .ajs-header {
  font-weight: 600;
}

.alertify-confirm .ajs-content {
  margin: 1rem 0;
}

/* Checklist Cumple/No cumple/No Aplica (diarias y bimestrales):
   toda la celda es clickeable, no solo el circulo del radio */
td.checklist-radio-td {
  padding: 0 !important;
  position: relative;
}

.checklist-radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  min-height: 32px;
  padding: 6px 0;
  margin: 0;
  cursor: pointer;
}

.checklist-radio-label input[type="radio"] {
  cursor: pointer;
  margin: 0;
}

/* Checklist diaria en formato cards para movil.
   Nota: los selectores de Bootstrap ".table(-bordered) > tbody > tr > td/th" usan
   combinador hijo y superan en especificidad a ".items-checklist-table td/th", por
   eso padding/border/background van con !important. */
@media (max-width: 768px) {
  .items-checklist-table {
    border: 0;
  }

  .items-checklist-table thead {
    display: none;
  }

  .items-checklist-table,
  .items-checklist-table tbody,
  .items-checklist-table tr,
  .items-checklist-table td,
  .items-checklist-table th {
    display: block;
    width: 100%;
  }

  .items-checklist-table tr {
    margin-bottom: 12px;
    padding: 8px 10px;
    border: 1px solid #d7dbe0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  }

  /* Fila de encabezado de categoria (th colspan) dentro del tbody */
  .items-checklist-table tr th {
    background-color: #f0f0f0 !important;
    border: 0 !important;
    border-radius: 6px;
    padding: 6px 8px !important;
    margin: -8px -10px 8px -10px;
    width: calc(100% + 20px) !important;
  }

  .items-checklist-table td {
    border: 0 !important;
    padding: 6px 4px !important;
    background: transparent !important;
  }

  .items-checklist-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #5f6b78;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .items-checklist-table td[data-label="Cumple"],
  .items-checklist-table td[data-label="No cumple"],
  .items-checklist-table td[data-label="No aplica"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .items-checklist-table input[type="radio"] {
    width: 20px;
    height: 20px;
    margin: 0;
  }
}

/* Tablas de listado Revision Diaria / Bimestral en formato cards para movil.
   Nota: Bootstrap define ".table > tbody > tr > td { padding; border-top }" con
   selectores de combinador hijo, cuya especificidad supera a ".rev-table-cards td".
   Por eso las propiedades de layout van con !important: si no, Bootstrap gana y la
   etiqueta (::before) queda superpuesta con el valor de la celda. */
@media (max-width: 768px) {
  .rev-table-cards thead {
    display: none;
  }

  .rev-table-cards,
  .rev-table-cards tbody,
  .rev-table-cards tr,
  .rev-table-cards td {
    display: block !important;
    width: 100% !important;
  }

  .rev-table-cards tr {
    border: 1px solid #ddd !important;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff !important;
    padding: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  }

  .rev-table-cards td {
    position: relative;
    padding: 6px 6px 6px 42% !important;
    border: none !important;
    border-bottom: 1px dashed #eee !important;
    min-height: 34px;
    text-align: left !important;
    white-space: normal !important;
    background: transparent !important;
  }

  .rev-table-cards td:last-child {
    border-bottom: none !important;
  }

  .rev-table-cards td::before {
    content: attr(data-label);
    position: absolute;
    left: 8px;
    top: 6px;
    width: 38%;
    font-weight: 700;
    color: #333;
    font-size: 11px;
  }

  .rev-table-cards .btn-group {
    display: flex;
    justify-content: flex-end;
  }

  /* El boton "Acciones" (btn-default) es gris muy claro por defecto en
     Bootstrap; sobre el fondo blanco del card queda casi invisible. El menu
     desplegable hereda el tema oscuro de bannerStyle.css (fondo #1a1a1a,
     texto blanco), pero se refuerza aqui por si algo lo deja transparente. */
  .rev-table-cards .btn-group > .btn-default {
    background-color: #eef0f2 !important;
    border: 1px solid #adb5bd !important;
    color: #333 !important;
  }

  .rev-table-cards .dropdown-menu {
    background-color: #1a1a1a !important;
    color: #fff !important;
  }

  .rev-table-cards .dropdown-menu > li > a {
    color: #fff !important;
  }

  .rev-table-cards .dropdown-menu > li.dropdown-header {
    color: #ccc !important;
  }
}
