html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

#logosiges {
  /* Aquí puedes modificar solo la imagen del logo */
  height: 50px;
  /* Ajusta según necesites */
  width: auto;
  /* Mantiene la proporción */
  max-width: 100%;
  /* Hace que sea responsiva */
  display: block;
  margin: 0 auto;
}

/* Fondo para todas las páginas */
body {
  background: url('../img/fo2.png') no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  background-color: #f8f9fa;
  /* Color de respaldo en caso de que la imagen no cargue */
}

/* Encabezado de bienvenida - Diseño Hero Card */
.welcome-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.9) 0%, rgba(11, 178, 212, 0.9) 100%);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(13, 110, 253, 0.25);
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* Efecto glassmorphism decorativo */
.welcome-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.welcome-header::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.welcome-avatar {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.welcome-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.welcome-content {
  flex: 1;
  position: relative;
  z-index: 1;
  min-width: 0;
  /* Para text-overflow en flex */
}

.welcome-greeting {
  display: block;
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 4px;
}

.welcome-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.welcome-meta .badge {
  background: rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(4px);
  font-weight: 500;
  padding: 0.35em 0.65em;
}

.welcome-meta .separator {
  opacity: 0.5;
}

.welcome-meta .org-name {
  opacity: 0.9;
}

.welcome-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.welcome-date .date-day {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.welcome-date .date-month {
  font-size: 0.85rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.welcome-date .date-time {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 4px;
}

/* Responsive */
@media (max-width: 768px) {
  .welcome-header {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem 1rem;
    gap: 1rem;
  }

  .welcome-logo {
    width: 64px;
    height: 64px;
  }

  .welcome-name {
    font-size: 1.25rem;
  }

  .welcome-meta {
    justify-content: center;
  }

  .welcome-date {
    align-items: center;
    text-align: center;
    flex-direction: row;
    gap: 0.5rem;
  }

  .welcome-date .date-day {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .welcome-header {
    padding: 1rem;
  }

  .welcome-logo {
    width: 56px;
    height: 56px;
  }

  .welcome-name {
    font-size: 1.1rem;
  }

  .welcome-greeting {
    font-size: 0.8rem;
  }
}

.welcome-text h4 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Contenido del dashboard */
.dashboard-content {
  position: relative;

  border-radius: 15px;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Imagen de fondo con opacidad reducida */
.dashboard-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../img/fo3.png') no-repeat center center;
  background-size: 100% 100%;
  opacity: 0.5;
  z-index: -1;
}

/* Fondo de video solo detrás del login */
.login-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.login-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 550px;
  transform: translate(-50%, -50%);
  z-index: 1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px 8px rgba(0, 0, 0, 0.7), 0 1.5px 8px 2px rgba(0, 0, 0, 0.4);
}

.login-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-form {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  /*background: rgba(0, 0, 0, 0.7);*/
  padding: 1.5rem 2rem;
  border-radius: 12px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 320px;
  z-index: 2;
}

.login-form h2 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  letter-spacing: 1px;
}

.login-form input {
  width: 350px;
  max-width: 100%;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.5);
  color: white;
  outline: none;
  transition: background 0.2s;
  box-sizing: border-box;
}

.login-form input:focus {
  background: #333;
}

.login-form button {
  width: 100%;
  padding: 0.8rem 1rem;
  height: calc(1.5em + 1.6rem + 2px);
  border: none;
  border-radius: 6px;
  background: #007bff;
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.login-form button:hover {
  background: #0056b3;
}


.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

/* Clase .logo eliminada - Se usa #logosiges en su lugar */



.pa {
  font-size: 23px;
  color: white;
  box-shadow: 0 50px 50px rgba(0, 0, 0, 0.4);
}


/* Ocultar iconos nativos de revelar/limpiar contraseña (global) */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}

/* Posibles decoraciones en WebKit/Chromium */
input[type="password"]::-webkit-credentials-auto-fill-button {
  visibility: hidden;
  display: none;
}

/* ====== Estilos para el formulario de login ====== */
.input-container {
  position: relative;
  width: 350px;
  max-width: 100%;
  margin: 0 auto 1rem;
}

.form-input {
  width: 100%;
  padding: 0 3rem 0 1rem;
  margin: 0;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.5);
  color: #fff !important;
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  height: 46px;
  line-height: 46px;
  vertical-align: middle;
}

.form-input:focus {
  background: rgba(255, 255, 255, 0.7);
  color: #333 !important;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.8) !important;
}

.form-input:focus::placeholder {
  color: rgba(0, 0, 0, 0.5) !important;
}

.toggle-password {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  opacity: 0.7;
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border: none;
  color: #495057;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  display: inline-block;
  vertical-align: middle;
}

.toggle-password i {
  font-size: 1.1em;
  transition: all 0.2s ease;
  line-height: inherit;
  vertical-align: middle;
  display: inline-block;
}

.toggle-password:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.15);
}

.toggle-password:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.toggle-password:hover {
  opacity: 1;
}

/* Efecto shake para credenciales incorrectas */
@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }

  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

/* Mejoras para el botón de login */
#login-button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

#login-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

#login-button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#login-button:not(:disabled):active {
  transform: translateY(1px);
}

/* Efecto de carga mejorado */
@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.loading .button-text {
  visibility: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ====== Estilos reutilizables de perfil y grillas ====== */
.profile-header {
  background: linear-gradient(135deg, #eef5ff, #f7fafd);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  border: 1px solid #e6ebf5;
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-xl {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  border: 3px solid #fff;
  background: #fff;
}

.profile-name {
  margin-top: 0;
  font-weight: 700;
}

.profile-badges .badge {
  margin: 0 4px 0 0;
}

.section-title {
  font-weight: 700;
  margin: 14px 0 10px;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #1f2937;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.doc-card {
  background: #fff;
  border: 1px solid #e9eef5;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .03);
}

.doc-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
}

.doc-card .label {
  font-size: .8rem;
  margin-top: 6px;
  color: #6c757d;
  font-weight: 600;
}

.vehiculo-card {
  border: 1px solid #e9eef5;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  margin-bottom: 10px;
}

.vehiculo-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.vehiculo-photos img {
  width: 100%;
  height: 110px;
  border-radius: 8px;
  object-fit: cover;
}

/* ====== Estética de modales de detalle ====== */
#modalDetalles .modal-content,
#modalDetallesVehiculo .modal-content,
#detalleConductorModal .modal-content {
  background: #f7fafd;
  border-radius: 20px;
}

#modalDetalles .modal-header,
#modalDetallesVehiculo .modal-header,
#detalleConductorModal .modal-header {
  border-bottom: none;
}

#modalDetalles .modal-footer,
#modalDetallesVehiculo .modal-footer,
#detalleConductorModal .modal-footer {
  border-top: none;
}

/* ====== Tarjeta presentación (modal conductor) ====== */
.tp-card-blue {
  background: #1663A4;
  background-image: url('../img/fo2.png');
  background-size: cover;
  background-position: center;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  color: #fff;
}

.tp-profile {
  padding: 18px 16px 8px;
}

.tp-profile .tp-avatar {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-top: 8px;
}

.tp-profile .tp-name {
  font-weight: 800;
  margin-top: 10px;
  font-size: 1.125rem;
}

.tp-profile .tp-sub {
  font-size: .9rem;
  opacity: .95;
}

.tp-profile .tp-meta {
  font-size: .9rem;
  opacity: .95;
  line-height: 1.4;
}

.tp-badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .75rem;
  background: #22c55e;
  color: #052e55;
}

.tp-badge.warn {
  background: #facc15;
  color: #0f172a;
}

.tp-badge.danger {
  background: #ef4444;
  color: #fff;
}

/* Botones como imagen (mobile-first) */
.tp-actions {
  padding-bottom: 16px;
}

.tp-actions .tp-btn {
  display: block;
  width: 100%;
  max-width: 560px;
  margin: 12px auto;
  padding: 14px 16px;
  background: #e6f1fb;
  color: #0b3566;
  border-radius: 999px;
  border: 0;
  font-weight: 700;
  text-align: center;
  position: relative;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .25);
}

.tp-actions .tp-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: url('../btn.png') no-repeat center/cover;
  opacity: .14;
}

.tp-actions .tp-btn .bi {
  margin-right: 8px;
}

.tp-actions .tp-btn:active {
  transform: translateY(1px);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .25);
}

@media (min-width: 576px) {
  .tp-profile .tp-name {
    font-size: 1.25rem;
  }
}

/* Variantes para otros modales */
#modalFederacion .modal-content {
  background: #f7fafd;
  border-radius: 20px;
}

#modalFederacion .modal-header {
  border-bottom: none;
}

#modalFederacion .modal-footer {
  border-top: none;
}

/* Imágenes comunes */
img.secretario_foto {
  width: 40px;
  height: auto;
  border-radius: 4px;
}

.img-doc {
  max-width: 120px;
  max-height: 120px;
}

.file-link {
  font-size: 0.9rem;
}

/* Miniaturas genéricas */
.img-thumb-60 {
  max-width: 60px;
  max-height: 60px;
}

/* Miniatura 100px (logos en Home) */
.img-thumb-100 {
  max-width: 100px;
  max-height: 100px;
}

/* Imagen con altura fija 48px (logos pequeños en cards) */
.img-h-48 {
  max-height: 48px;
  width: auto;
}

/* ====== Quickbar móvil y transiciones de navegación (Home) ====== */
.quickbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  z-index: 1030;
}

.quickbar .btn {
  border-radius: 0;
  padding: .75rem 0;
}

@media (max-width: 576px) {
  body {
    padding-bottom: 56px;
  }
}

body {
  transition: opacity .15s ease-in-out;
}

body.is-fading {
  opacity: 0;
}

/* Fondo con imagen solo para la página de login */
body.login-bg {
  background: url('../img/fo2.png') center center no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

/* Contenedor fijo para gráficos */
.chart-box {
  position: relative;
  height: 340px;
}

@media (max-width: 576px) {
  .chart-box {
    height: 280px;
  }
}

/* ====== Navbar y utilidades relacionadas ====== */
.navbar-siges {
  background: linear-gradient(90deg, #213e60 0%, #0d6efd 60%, #0bb2d4 100%) !important;
  box-shadow: 0 6px 18px rgba(16, 24, 40, .12);
}

.navbar .brand-logo {
  height: 40px;
  width: auto;
}

/* Microinteracciones del navbar */
.navbar-siges .nav-link {
  color: rgba(255, 255, 255, .92) !important;
  transition: color .15s ease, opacity .15s ease;
  padding-left: .6rem;
  padding-right: .6rem;
}

.navbar-siges .nav-link:hover {
  color: #fff !important;
  opacity: 1;
}

.navbar-siges .nav-link.active,
.navbar-siges .nav-link:focus {
  color: #fff !important;
}

/* Subrayado sutil al hover */
.navbar-siges .nav-link {
  position: relative;
}

.navbar-siges .nav-link::after {
  content: "";
  position: absolute;
  left: .6rem;
  right: .6rem;
  bottom: .35rem;
  height: 2px;
  background: rgba(255, 255, 255, .0);
  border-radius: 2px;
  transition: background .15s ease, transform .15s ease;
  transform: scaleX(0);
  transform-origin: left;
}

.navbar-siges .nav-link:hover::after,
.navbar-siges .nav-link:focus::after,
.navbar-siges .nav-item.show>.nav-link::after {
  background: rgba(255, 255, 255, .9);
  transform: scaleX(1);
}

/* Toggler visible en fondo degradado */
.navbar-siges .navbar-toggler {
  border-color: rgba(255, 255, 255, .55);
}

.navbar-siges .navbar-toggler:focus {
  box-shadow: 0 0 0 .15rem rgba(255, 255, 255, .35);
}

/* Dropdown estilizado */
.navbar-siges .dropdown-menu {
  border: 0;
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(16, 24, 40, .18);
  padding: .4rem;
  margin-top: .5rem;
}

.navbar-siges .dropdown-item {
  border-radius: 8px;
  padding: .45rem .75rem;
}

.navbar-siges .dropdown-item:hover {
  background: #eef6ff;
  color: #0d6efd;
}

.navbar-siges .dropdown-divider {
  margin: .35rem 0;
}

/* Prevenir que el dropdown se salga de la pantalla */
.navbar-siges .dropdown-menu-end {
  right: 0 !important;
  left: auto !important;
  transform: translateX(0) !important;
  max-width: calc(100vw - 2rem);
}

@media (max-width: 576px) {
  .navbar-siges .dropdown-menu-end {
    right: 1rem !important;
    left: auto !important;
  }
}

@media (max-width: 576px) {
  .navbar .brand-logo {
    height: 34px;
  }
}

@media (max-width: 400px) {
  .navbar .brand-logo {
    height: 30px;
  }
}

@media (max-width: 340px) {
  .navbar .brand-logo {
    height: 26px;
  }
}

/* Avatar redondo de 40px (logos en navbar) */
.avatar-40 {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* Tamaño de icono 1.5rem */
.fs-15 {
  font-size: 1.5rem;
}

/* Alerta global flotante */
.global-alert {
  z-index: 1080;
  width: 90%;
  max-width: 720px;
}

/* ====== Dashboard cards ====== */
.custom-card {
  border: none;
  border-left: 6px solid transparent;
  border-radius: 16px;
  transition: box-shadow 0.18s ease, transform 0.12s ease;
  box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.1);
}

.custom-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  transform: translateY(-10px);
}

.custom-card:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

a:focus .custom-card {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
}

.custom-card[role="button"] {
  cursor: pointer;
}

.custom-card.red {
  border-left-color: #e53935;
}

.custom-card.amber {
  border-left-color: #fbc02d;
}

.custom-card.blue {
  border-left-color: #1976d2;
}

.custom-card.green {
  border-left-color: #388e3c;
}

.custom-card.orange {
  border-left-color: #f57c00;
}

.custom-card.purple {
  border-left-color: #7b1fa2;
}

.custom-card.teal {
  border-left-color: #00897b;
}

/* Cards generales (no form-siges) */
.card.shadow-sm {
  border-radius: 14px;
  border: 1px solid #e9eef5;
  transition: box-shadow .15s ease, transform .12s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card.shadow-sm:hover {
  box-shadow: 0 12px 32px rgba(16, 24, 40, .18);
  transform: translateY(-2px);
}

.card .card-title {
  font-weight: 600;
}

.card .card-subtitle {
  color: #6b7280;
}

.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  margin-bottom: 8px;
}

.icon-circle.red {
  background: #e53935;
}

.icon-circle.amber {
  background: #fbc02d;
}

.icon-circle.blue {
  background: #1976d2;
}

.icon-circle.green {
  background: #388e3c;
}

.icon-circle.orange {
  background: #f57c00;
}

.icon-circle.purple {
  background: #7b1fa2;
}

.icon-circle.teal {
  background: #00897b;
}

/* ====== Perfil: Tabs y avatar ====== */
.tabs-wrapper {
  position: sticky;
  top: 56px;
  z-index: 1020;
  background: #fff;
  overflow-x: auto;
  white-space: nowrap;
}

.tabs-wrapper .nav {
  flex-wrap: nowrap;
}

.tabs-clean.nav-tabs {
  border-bottom: 1px solid #e5e7eb;
}

.tabs-clean.nav-tabs .nav-link {
  border: none;
  color: #6c757d;
  padding: 0.5rem 0.75rem;
}

.tabs-clean.nav-tabs .nav-link.active {
  color: #0d6efd;
  background: transparent;
  border: none;
  box-shadow: inset 0 -2px 0 0 #0d6efd;
}

.hero-avatar {
  width: 96px;
  height: 96px;
  object-fit: cover;
}

.chip-row>.badge {
  margin-right: .35rem;
  margin-bottom: .35rem;
}

@media (max-width: 576px) {
  .hero-avatar {
    width: 72px;
    height: 72px;
  }
}

/* ====== Skeleton/shimmer reutilizable ====== */
.skeleton {
  position: relative;
  background: #e9ecef;
  overflow: hidden;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, rgba(233, 236, 239, 0) 0%, rgba(255, 255, 255, .6) 50%, rgba(233, 236, 239, 0) 100%);
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* ====== Utilidades de imágenes ====== */
.img-doc-lg {
  max-height: 220px;
  cursor: zoom-in;
}

.avatar-56 {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.img-contain-80vh {
  max-height: 80vh;
  object-fit: contain;
}

.avatar-16 {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: -3px;
}

.avatar-48 {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.img-doc-md {
  max-height: 180px;
  cursor: zoom-in;
}

.img-doc-sm {
  max-height: 120px;
  cursor: zoom-in;
}

.img-thumb-80 {
  max-width: 80px;
  max-height: 80px;
}

.img-thumb-100 {
  max-width: 100px;
  max-height: 100px;
}

.img-thumb-120 {
  max-width: 120px;
  max-height: 120px;
}

.img-thumb-60 {
  max-width: 60px;
  max-height: 60px;
}

.img-thumb-40 {
  max-width: 40px;
  max-height: 40px;
}

.img-h-48 {
  height: 48px;
  width: auto;
}

.zoomable {
  cursor: zoom-in;
}

.rounded-6 {
  border-radius: 6px !important;
}

.rounded-8 {
  border-radius: 8px !important;
}

/* ====== Utilidades de tamaño fijo ====== */
.max-w-360 {
  max-width: 360px !important;
}

.max-w-600 {
  max-width: 600px !important;
}

.max-w-720 {
  max-width: 720px !important;
}

.fs-105 {
  font-size: 1.05rem !important;
}

/* ====== Otras utilidades ====== */
.progress-thin {
  height: 6px;
}

.z-1080 {
  z-index: 1080;
}

/* ====== Ocultar botones nativos de revelar/limpiar contraseña (modalPwd) ====== */
#modalPwd input[type="password"]::-ms-reveal,
#modalPwd input[type="password"]::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}

#modalPwd input[type="password"]::-webkit-credentials-auto-fill-button {
  visibility: hidden;
  display: none;
}

/* ====== Tema unificado para formularios (scoped) ====== */
.form-siges .card {
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(16, 24, 40, .12);
  border: 0;
  overflow: hidden;
}

.form-siges .card-header {
  background: linear-gradient(90deg, #0d6efd 0%, #0bb2d4 100%);
  color: #fff;
  padding-top: 16px;
  padding-bottom: 16px;
}

.form-siges .card-header .subtitle {
  font-weight: 400;
  opacity: .9;
  font-size: .9rem;
}

.form-siges .input-group-text {
  background-color: #eef6ff;
  color: #0d6efd;
  border-color: #d7e7ff;
}

.form-siges .form-label {
  font-weight: 600;
}

.form-siges .form-control:focus,
.form-siges .form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .15);
}

.form-siges .btn-gradient-primary {
  background: linear-gradient(90deg, #0d6efd 0%, #0b8bd4 100%);
  border: none;
  color: #fff;
}

.form-siges .btn-gradient-primary:hover {
  filter: brightness(0.95);
}

.form-siges .btn-secondary {
  border: none;
}

/* Mejor contraste para botones outline en headers con gradiente */
.form-siges .card-header .btn-outline-light {
  color: #0b3566;
  border-color: #ffffff;
  border-width: 2px;
  background: #ffffff;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(16, 24, 40, .22), 0 0 0 2px rgba(255, 255, 255, .35) inset;
  border-radius: 999px;
}

.form-siges .card-header .btn-outline-light:hover,
.form-siges .card-header .btn-outline-light:focus {
  color: #0b3566;
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 12px 26px rgba(16, 24, 40, .24), 0 0 0 3px rgba(255, 255, 255, .45) inset;
  transform: translateY(-1px) scale(1.01);
}

.form-siges .card-header .btn-outline-light:active {
  filter: brightness(.98);
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(16, 24, 40, .18);
}

.form-siges .card-header .btn-outline-light.btn-sm {
  padding: .45rem .8rem;
}

/* Asegurar color de ícono dentro del botón */
.form-siges .card-header .btn-outline-light .bi {
  color: #0b3566;
}

/* Microinteracciones */
.form-siges .btn {
  transition: transform .08s ease, box-shadow .12s ease, filter .12s ease;
}

.form-siges .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(13, 110, 253, .18);
}

.form-siges .btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(13, 110, 253, .12);
}

.form-siges .form-control,
.form-siges .form-select {
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.form-siges .form-control:hover,
.form-siges .form-select:hover {
  border-color: #b6d0ff;
}

.form-siges .card {
  transition: box-shadow .15s ease;
}

.form-siges .card:hover {
  box-shadow: 0 12px 28px rgba(16, 24, 40, .16);
}

/* Feedback de validación */
.form-siges .form-control.is-valid,
.form-siges .form-select.is-valid {
  border-color: #198754;
  padding-right: calc(1.5em + .75rem);
}

.form-siges .form-control.is-invalid,
.form-siges .form-select.is-invalid {
  border-color: #dc3545;
  padding-right: calc(1.5em + .75rem);
}

.form-siges .was-validated .form-control:valid,
.form-siges .was-validated .form-select:valid {
  border-color: #198754;
  box-shadow: 0 0 0 .2rem rgba(25, 135, 84, .15);
}

.form-siges .was-validated .form-control:invalid,
.form-siges .was-validated .form-select:invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .12);
}

.form-siges .form-control:invalid:not(:focus):not(.is-invalid),
.form-siges .form-select:invalid:not(:focus):not(.is-invalid) {
  border-color: #e6b3b8;
}

/* ====== Quickbar global ====== */
.quickbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  z-index: 1030;
}

.quickbar .btn {
  border-radius: 0;
  padding: .75rem 0;
}

/* ====== Vehículo: doc-card y tamaños de imagen ====== */
.doc-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: static;
}

.doc-card .card-body {
  position: static !important;
}

.doc-card .card-footer {
  margin-top: auto;
  background: #fff;
}

.img-max-140 {
  max-width: 140px;
  height: auto;
}

/* ====== Mejoras específicas para manejo de errores en móviles ====== */
@media (max-width: 768px) {

  /* Ajustes para el botón en móviles */
  .login-form button {
    height: calc(1.5em + 1.6rem + 2px) !important;
    font-size: 1rem !important;
    padding: 0.8rem 1rem !important;
  }

  /* Formularios más amigables en móviles */
  .form-siges {
    margin: 0.5rem;
    max-width: calc(100vw - 1rem);
  }

  .form-siges .card {
    border-radius: 12px;
  }

  .form-siges .card-header {
    padding: 12px 16px;
    border-radius: 12px 12px 0 0;
  }

  .form-siges .card-body {
    padding: 16px;
  }

  /* Inputs más grandes en móviles para mejor usabilidad */
  .form-siges .form-control,
  .form-siges .form-select {
    min-height: 44px;
    /* Mínimo para touch targets */
    font-size: 16px;
    /* Prevenir zoom en iOS */
    border-radius: 8px;
  }

  .form-siges .btn {
    min-height: 44px;
    font-size: 16px;
    border-radius: 8px;
    margin-bottom: 8px;
  }

  /* Mejorar checkboxes y radios en móviles */
  .form-siges .form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 0.25rem;
  }

  .form-siges .form-check-label {
    padding-left: 8px;
    font-size: 14px;
  }

  /* Inputs de archivo más accesibles */
  .form-siges input[type="file"] {
    padding: 12px 8px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
  }

  .form-siges input[type="file"]:hover {
    border-color: #0d6efd;
    background: #eef6ff;
  }

  /* Alertas móviles mejoradas */
  .mobile-alert {
    animation: slideDown 0.3s ease-out;
    backdrop-filter: blur(4px);
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translate(-50%, -20px);
    }

    to {
      opacity: 1;
      transform: translate(-50%, 0);
    }
  }

  /* Loading states para móviles */
  .mobile-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-loading::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

  @keyframes spin {
    0% {
      transform: rotate(0deg);
    }

    100% {
      transform: rotate(360deg);
    }
  }
}

/* Detección de conexión lenta */
@media (prefers-reduced-motion: reduce) {
  .mobile-alert {
    animation: none;
  }

  .form-siges .btn,
  .form-siges .form-control,
  .form-siges .form-select {
    transition: none;
  }
}

/* Ajustes para el modal de detalles del conductor en móviles */
@media (max-width: 767px) {
  #detalleConductorModal .modal-dialog {
    max-width: 95%;
    margin: 1.75rem auto;
    /* Margen vertical y centrado horizontal */
  }

  #detalleConductorModal .tp-profile .tp-avatar {
    width: 120px;
    height: 120px;
  }

  #detalleConductorModal .tp-profile {
    padding: 12px 12px 4px;
  }

  #detalleConductorModal .tp-actions .tp-btn {
    padding: 12px 14px;
    margin: 10px auto;
  }
}

/* Estilos para el modal de detalles en pantallas de escritorio */
@media (min-width: 768px) {
  #detalleConductorModal .modal-dialog {
    max-width: 50%;
  }
}

/* ====== User Avatar en Navbar (diseño híbrido) ====== */
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.user-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.user-avatar-initials {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Info del usuario */
.user-info {
  max-width: 150px;
}

.user-name {
  font-size: 0.85rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Colores personalizados por rol */
.bg-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%) !important;
}

.bg-teal {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%) !important;
}

/* Mejorar colores existentes con gradientes */
.user-avatar.bg-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
}

.user-avatar.bg-success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
}

.user-avatar.bg-info {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
}

.user-avatar.bg-warning {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
}

.user-avatar.bg-secondary {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
}

.user-avatar.bg-dark {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%) !important;
}

/* Dropdown del usuario mejorado */
#userMenuContainer .dropdown-toggle::after {
  margin-left: 0.5rem;
  vertical-align: middle;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

#userMenuContainer .dropdown-toggle:hover::after {
  opacity: 1;
}

/* Ajustes responsivos */
@media (max-width: 767px) {
  .user-avatar {
    width: 32px;
    height: 32px;
  }

  .user-avatar-initials {
    font-size: 0.75rem;
  }
}