html, body {
  max-width: 100vw;
  overflow-x: hidden;
}
#logosiges {
  width: auto;
  height: 175px;
  max-width: 100%;
  display: block;
  margin: 2px auto 4px;
}
/* Logo más grande en móviles */
@media (max-width: 768px) {
  #logosiges { width: 100% !important; height: 190px !important; }
}
@media (max-width: 480px) {
  #logosiges { width: 100% !important; height: 190px !important;}
}
@media (max-width: 360px) {
  #logosiges { width: 100% !important; height: 190px !important;}
}
/* Fondo para todas las páginas */
body {
    background: url('../img/vid.mp4') 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 */
.welcome-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.welcome-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.welcome-text h2 {
    font-size: 1.75rem;
    color: #2c3e50;
    margin: 0;
    line-height: 1.2;
}

.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.jpg') 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;
}

/* Estilos para el video MPEG-DASH de fondo en <body> */
.bg-dash-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.bg-dash-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.login-form {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /*background: rgba(0, 0, 0, 0.7);*/
    padding: 0.25rem 1.25rem 0.6rem;
    border-radius: 12px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 320px;
    width: 400px;
    max-width: calc(100vw - 32px);
    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.6rem 0.9rem;
    margin-bottom: 0.25rem;
    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 0.25rem;
}

.login-form label { margin-bottom: 0.25rem; display:block; }

.form-input {
    width: 100%;
    padding: 0 3rem 0 1rem;
    margin: 0;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    background: rgba(71, 69, 69, 0.5);
    color: #3f3737 ;
    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(20, 18, 18, 0.7);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(20, 22, 24, 0.25);
}

.form-input::placeholder {
    color: rgba(27, 24, 24, 0.8);
}

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

.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); }
}

/* ====== 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%;
  }
}
