/* --------- FUENTE BASE --------- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* --------- ESTILO GLOBAL --------- */
body {
  font-family: 'Poppins', sans-serif;
  background: #f4f4f4;
  margin: 0;
  padding: 0;
}

/* --------- REGISTRO (LOGIN) --------- */
body.registro-bg {
  background: #f7f7f7;
  min-height: 100vh;
}
.registro-center {
  min-height: 100vh;
  min-width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
}
.registro-container {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 28px #0002;
  padding: 48px 38px 34px 38px;
  max-width: 680px;
  width: 100%;
}
.registro-logo {
  text-align: center;
  margin-bottom: 10px;
}
.registro-logo img {
  max-width: 140px;
  margin-bottom: 7px;
}
.registro-title {
  font-size: 1.7em;
  color: #0d4957;
  font-weight: 600;
  text-align: center;
  margin-bottom: 22px;
  letter-spacing: 0.01em;
}
.registro-form .row {
  display: flex;
  gap: 20px;
  margin-bottom: 0px;
}
.registro-form .row > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 13px;
}
.registro-form label {
  font-weight: 500;
  margin-bottom: 2px;
  color: #154959;
}
.registro-form .req { color: #ff9800; margin-left: 2px; }
.registro-form input,
.registro-form select {
  font-family: inherit;
  font-size: 1em;
  padding: 11px 12px;
  border: 1.7px solid #b7c9ce;
  border-radius: 7px;
  background: #f8fafb;
  margin-bottom: 3px;
  transition: border-color .17s;
}
.registro-form input:focus,
.registro-form select:focus {
  border-color: #ff9800;
  outline: none;
}
.registro-separator {
  color: #ff9800;
  font-weight: 600;
  text-align: left;
  margin: 22px 0 10px 2px;
  font-size: 1.14em;
}

/* Checkbox de términos y condiciones */
.terms-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.terms-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ff9800;
  margin-right: 4px;
  margin-left: 0;
  cursor: pointer;
}
.terms-row label {
  font-size: 0.99em;
  font-weight: 400;
  margin: 0;
  color: #222;
  cursor: pointer;
  user-select: none;
}

/* Pie del formulario: checkbox + botón alineados */
.registro-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 14px;
}
.registro-bottom button {
  background: #ff9800;
  color: #fff;
  font-size: 1.13em;
  padding: 11px 34px;
  border: none;
  border-radius: 7px;
  font-weight: bold;
  cursor: pointer;
  transition: background .16s;
  letter-spacing: 0.01em;
  margin: 0;
  box-shadow: 0 1px 5px #1f959311;
}
.registro-bottom button:hover {
  background: #f99b1c;
}
.registro-bottom button:disabled {
  background: #eee;
  color: #aaa;
  cursor: not-allowed;
}
.input-error {
  border-color: #e74c3c !important;
  background: #fff7f7 !important;
}
.input-ok {
  border-color: #19c37d !important;
}
.registro-error {
  color: #e74c3c;
  font-size: 0.96em;
  margin: 3px 0 8px 0;
  padding-left: 3px;
  font-weight: 500;
  display: none;
}

/* Responsive para registro */
@media (max-width: 800px) {
  .registro-container { padding: 24px 7vw 18px 7vw; }
}
@media (max-width: 600px) {
  .registro-container { padding: 16px 2vw 12px 2vw; }
  .registro-form .row { flex-direction: column; gap: 3px; }
  .registro-bottom { flex-direction: column; gap: 6px; justify-content: center;}
}

/* --------- SIDEBAR (Admin & Panel) --------- */
.sidebar {
  width: 210px;
  min-height: 100vh;
  background: #fff;
  border-right: 1.5px solid #ededed;
  z-index: 20;
  padding-top: 38px;
  box-shadow: 0 6px 24px #0001;
  position: fixed;
  top: 0; left: 0;
}
.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-link {
  color: #333;
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 6px;
  display: block;
  font-weight: 600;
  margin-bottom: 7px;
  font-size: 1.05em;
  transition: background .14s;
}
.sidebar-link.active, .sidebar-link:hover {
  background: #e9f6f9;
  color: #167187;
}

/* --------- PANEL MAIN --------- */
.panel-main {
  margin-left: 230px;
  padding: 28px 18px 40px 18px;
  max-width: 1300px;
}
@media (max-width: 800px) {
  .sidebar { position: static; width: 100vw; border-right: none; min-height: unset; }
  .panel-main { margin-left: 0; padding: 14px 3vw 30px 3vw; }
}
@media (max-width: 600px) {
  .panel-main { padding: 7px 1vw 16px 1vw; }
}

header, .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}
h2 {
  font-size: 1.14em;
  color: #17485e;
  font-weight: 600;
  margin-top: 22px;
  margin-bottom: 12px;
}
h3 {
  margin: 14px 0 10px 0;
  font-size: 1.05em;
  color: #10616a;
}
.btn-cerrar-sesion {
  background: #f44336;
  color: white;
  border: none;
  padding: 10px 32px;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-left: 14px;
  margin-top: 0;
  margin-bottom: 0;
  width: auto;
  transition: background 0.3s;
}
.btn-cerrar-sesion:hover {
  background: #d32f2f;
}

/* --------- TABLAS MODERNAS (Admin & Panel) --------- */
.table-section {
  background: #fff;
  border-radius: 13px;
  box-shadow: 0 2px 12px #b4e3e443;
  border: 1.2px solid #e0eaea;
  margin-top: 24px;
  padding: 10px 8px 14px 8px;
  margin-bottom: 32px;
  overflow-x: auto;
  width: 100%;
  box-sizing: border-box;
}

.tabla {
  width: 100%;
  min-width: 700px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.98em;
  margin-bottom: 0;
  background: #fff;
  table-layout: auto;
}

.tabla th, .tabla td {
  border: none;
  padding: 13px 10px;
  text-align: center;
  vertical-align: middle;
  font-size: 0.80em;
  transition: background .15s;
  min-width: 90px;
}
.tabla th {
  background: #b3bec2;
  color: #144753;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-bottom: 3px solid #f4f4f4;
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: center;
}
.tabla tr:nth-child(even) { background: #f7fbfb; }
.tabla tr:nth-child(odd) { background: #fff; }
.tabla td { border-bottom: 1.5px solid #e2eced; color: #144753; }

.tabla button, .btn-tabla {
  background: #167187;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  margin: 1px 3px;
  transition: background .2s, color .17s, border .17s;
  box-shadow: 0 2px 7px #1f959311;
  min-width: 90px;
}
.tabla button:hover, .btn-tabla:hover {
  background: #17485e;
  color: #fff;
}
.btn-tabla.btn-minimal, .tabla .btn-minimal {
  background: #fff;
  color: #167187;
  border: 1.2px solid #e0e0e0;
  padding: 7px 0;
  min-width: 100px;
  font-size: 0.97em;
  font-weight: 600;
  box-shadow: none;
}
.btn-tabla.btn-minimal:hover, .tabla .btn-minimal:hover {
  background: #e9f6f9;
  color: #0e5d77;
  border-color: #b6e5ee;
}
.btn-tabla.btn-eliminar, .tabla .btn-eliminar {
  background: #e84848;
  color: #fff;
  border-color: #ffe3e3;
}
.btn-tabla.btn-eliminar:hover, .tabla .btn-eliminar:hover {
  background: #fceaea;
  color: #c20000;
  border-color: #facaca;
}
.tabla select {
  padding: 7px 10px;
  font-size: 0.97em;
  min-width: 115px;
  border-radius: 5px;
  border: 1.2px solid #b7c9ce;
  background: #f8fafb;
  color: #17485e;
}
.tabla ul {
  list-style: disc;
  margin: 0 0 0 18px;
  padding: 0;
  text-align: left;
  color: #222;
  font-size: 0.99em;
}

/* Responsive para tablas FULL ancho real */
@media (max-width: 1200px) {
  .tabla { min-width: 600px; font-size: 0.95em; }
  .table-section { padding: 7px 1vw 9px 1vw; }
}
@media (max-width: 900px) {
  .tabla {
    min-width: 480px;
    font-size: 0.91em;
  }
  .tabla th, .tabla td {
    font-size: 0.89em;
    padding: 10px 6px;
  }
}
@media (max-width: 650px) {
  .table-section, .tabla {
    min-width: unset;
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: auto !important;
  }
  .tabla th, .tabla td {
    font-size: 0.87em;
    padding: 8px 5px;
    word-break: break-word;
  }
}
@media (max-width: 480px) {
  .tabla, .table-section {
    min-width: 340px !important;
    font-size: 0.82em;
    padding: 2px 0 6px 0;
    border-radius: 0;
  }
}

/* No datos y celdas vacías */
.no-datos {
  text-align: center;
  color: #888;
  font-style: italic;
  padding: 24px 0 18px 0;
}
#detalleVacio {
  text-align: center;
  color: #999;
  padding: 10px 0;
  font-size: 15px;
}

/* Popup Historial */
#historialPopup {
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1002;
}
#historialPopup > div {
  background: #fff;
  border-radius: 18px;
  min-width: 330px;
  max-width: 90vw;
  max-height: 88vh;
  padding: 32px 28px 20px 28px;
  box-shadow: 0 10px 40px #0012;
  position: relative;
}
#historialPopup button {
  font-size: 1.4em !important;
  font-weight: bold !important;
  color: #e84848 !important;
  background: none !important;
  border: none !important;
  right: 12px;
  top: 7px;
}

/* Filtros */
#filtroUsuario {
  margin: 12px 0 18px 0;
  width: 100%;
  max-width: 340px;
  display: block;
}

/* Botones tabla minimalista */
.btn-tabla {
  background: #167187;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  margin: 2px 0;
  transition: background .2s;
  box-shadow: 0 2px 7px #1f959311;
  display: inline-block;
  min-width: 105px;
}
.btn-tabla:hover {
  background: #17485e;
}
.btn-eliminar {
  background: #e84848;
}
.btn-eliminar:hover {
  background: #b71c1c;
}
.btn-tabla.btn-minimal {
  background: #fff;
  color: #167187;
  border: 1.3px solid #e0e0e0;
  border-radius: 6px;
  padding: 7px 0;
  min-width: 95px;
  font-size: 0.98em;
  font-weight: 600;
  cursor: pointer;
  margin: 2px 6px 2px 0;
  box-shadow: none;
  transition: all .17s;
  outline: none;
  letter-spacing: 0.01em;
}
.btn-tabla.btn-minimal:hover {
  background: #e9f6f9;
  color: #0e5d77;
  border-color: #b6e5ee;
}
.btn-tabla.btn-eliminar {
  color: #e84848;
  border-color: #ffe3e3;
}
.btn-tabla.btn-eliminar:hover {
  background: #fceaea;
  color: #c20000;
  border-color: #facaca;
}

/* ===== SIDEBAR ADMIN ===== */
.sidebar {
  width: 210px;
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0;
  background: #fff;
  border-right: 1.5px solid #ededed;
  z-index: 20;
  padding-top: 38px;
  box-shadow: 0 6px 24px #0001;
}
.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-link {
  color: #333;
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 6px;
  display: block;
  font-weight: 600;
  margin-bottom: 7px;
  font-size: 1.05em;
  transition: background .14s;
}
.sidebar-link.active, .sidebar-link:hover {
  background: #e9f6f9;
  color: #167187;
}

/* ===== MAIN PANEL CONTENT ===== */
.panel-main {
  margin-left: 230px;
  padding: 28px 16px 40px 16px;
  max-width: unset;
  width: calc(100vw - 230px);
  box-sizing: border-box;
  min-height: 100vh;
  background: #f4f4f4;
}
@media (max-width: 800px) {
  .sidebar { position: static; width: 100vw; border-right: none; min-height: unset; }
  .panel-main { margin-left: 0; padding: 14px 3vw 30px 3vw; width: 100vw; }
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}

.btn-cerrar-sesion {
  background: #f44336;
  color: white;
  border: none;
  padding: 10px 32px;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-left: 14px;
  width: auto;
  transition: background 0.3s;
}
.btn-cerrar-sesion:hover {
  background: #d32f2f;
}

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 20px;
}
.filter-bar label {
  font-weight: 500;
  font-size: 1em;
  margin-bottom: 3px;
  display: block;
}
.filter-bar input,
.filter-bar select {
  max-width: 210px;
  padding: 9px 13px;
  border-radius: 6px;
  border: 1.5px solid #b3bec2;
  font-size: 1em;
}

/* ===== TABLA ACCIONES TH ===== */
.acciones-th {
  text-align: center;
}

/* ===== POPUP HISTORIAL ===== */
.historial-popup {
  display: none;
  position: fixed;
  left: 0; top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,.4);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
.historial-popup-content {
  background: #fff;
  padding: 24px 24px 12px 24px;
  border-radius: 10px;
  min-width: 300px;
  max-width: 94vw;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 4px 32px #0004;
  position: relative;
}
.btn-cerrar-popup {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  color: #d32f2f;
}
.historial-popup-content h2 {
  margin-top: 0;
}

/* Responsive tabla para mobile */
@media (max-width: 1200px) {
  .tabla { min-width: 800px; font-size: 0.96em; }
}
@media (max-width: 800px) {
  .tabla { min-width: 640px; font-size: 0.93em; }
}
@media (max-width: 650px) {
  .tabla, .table-section { min-width: 380px; }
  .tabla th, .tabla td { font-size: 0.89em; padding: 10px 6px;}
}
/* --------- LOGIN --------- */
body.login-bg {
  background: #f4f4f4;
  min-height: 100vh;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-container {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 18px #0002;
  max-width: 380px;
  width: 100%;
  padding: 38px 36px 32px 36px;
  text-align: center;
  margin: 0 auto;
}

.login-logo {
  margin-bottom: 24px;
}
.login-logo img {
  max-width: 140px;
  margin-bottom: 10px;
}

.login-title {
  font-size: 1.36em;
  color: #0d4957;
  font-weight: bold;
  margin-bottom: 26px;
  letter-spacing: .02em;
}

.login-form input {
  width: 100%;
  padding: 12px 12px;
  margin-bottom: 19px;
  border-radius: 6px;
  border: 1.5px solid #c1d2d8;
  background: #f8fafb;
  font-size: 1em;
  transition: border-color .18s;
}
.login-form input:focus {
  border-color: #23b3b7;
  outline: none;
}
.login-form button {
  width: 100%;
  background: #ff9800;
  color: #fff;
  font-size: 1.12em;
  padding: 12px 0;
  border: none;
  border-radius: 7px;
  font-weight: bold;
  cursor: pointer;
  transition: background .15s;
  margin-bottom: 15px;
}
.login-form button:hover {
  background: #f99b1c;
}
.login-form .login-error {
  color: #e74c3c;
  font-size: 1em;
  margin-bottom: 15px;
  display: none;
}
.login-link {
  margin-top: 5px;
  font-size: .99em;
  color: #444;
}
.login-link a {
  color: #ff9800;
  text-decoration: none;
  font-weight: 600;
}
.login-link a:hover {
  text-decoration: underline;
}

/* Responsive login */
@media (max-width: 480px) {
  .login-container {
    padding: 18px 6vw 12px 6vw;
    max-width: 98vw;
  }
  .login-title { font-size: 1.04em; }
}
/* --------- LOGIN ADMIN --------- */
body.admin-login-bg {
  background: #f7f7f7;
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
}

.admin-login-container {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px #0002;
  padding: 40px 30px;
  max-width: 350px;
  width: 100%;
  text-align: center;
}

.admin-login-title {
  color: #0d4957;
  margin-bottom: 32px;
  font-size: 1.6em;
}

.admin-login-input {
  width: 100%;
  padding: 12px;
  margin-bottom: 18px;
  border-radius: 7px;
  border: 1.5px solid #b7c9ce;
  font-size: 1em;
  background: #f8fafb;
  transition: border-color .15s;
}
.admin-login-input:focus {
  border-color: #ff9800;
  outline: none;
}

.admin-login-btn {
  width: 100%;
  background: #167187;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 13px 0;
  font-size: 1.15em;
  font-weight: 600;
  cursor: pointer;
  transition: background .17s;
  margin-top: 5px;
  box-shadow: 0 2px 7px #1f959311;
}
.admin-login-btn:hover {
  background: #0d4957;
}

.error-admin {
  color: #e84848;
  font-size: 0.98em;
  margin-bottom: 14px;
  display: none;
}

/* Responsive admin login */
@media (max-width: 500px) {
  .admin-login-container {
    padding: 20px 6vw;
    max-width: 98vw;
  }
  .admin-login-title { font-size: 1.08em; }
}

 .input-error-msg {
      color: #e84848;
      font-size: 0.95em;
      margin-top: 2px;
      display: block;
      min-height: 1em;
    }

    /* --- MODAL/POPUP EDICIÓN DE PRE ALERTA (ADMIN) --- */
#popupEditarPrealerta {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.23);
  z-index: 99999;
}
#formEditarPrealerta {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 48px #0003;
  min-width: 340px;
  max-width: 97vw;
  padding: 28px 26px 22px 26px;
  font-family: inherit;
  position: relative;
  margin: 0 12px;
  width: 100%;
  max-width: 470px;
  animation: popupFadeIn .25s;
}
#formEditarPrealerta > .popup-title,
#formEditarPrealerta > .modal-title {
  font-size: 1.5em;
  font-weight: 700;
  margin-bottom: 20px;
  color: #184e67;
}
#formEditarPrealerta label {
  font-weight: 600;
  margin-bottom: 2px;
}
#formEditarPrealerta input,
#formEditarPrealerta select {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  font-size: 1em;
  margin-bottom: 0;
  background: #fafbfc;
}
#formEditarPrealerta th,
#formEditarPrealerta td {
  font-size: 0.98em;
}
#formEditarPrealerta th {
  background: #f3f6fa;
  font-weight: 700;
  padding: 7px 0;
  border-bottom: 1px solid #e1e7ec;
}
#formEditarPrealerta td {
  background: #fff;
  padding: 6px 2px;
  border-bottom: 1px solid #f2f2f2;
}
#formEditarPrealerta table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 7px;
  margin-bottom: 5px;
}
#formEditarPrealerta input[type="number"] {
  text-align: right;
}
#cerrarEditarBtn {
  position: absolute;
  top: 15px;
  right: 18px;
  background: none;
  border: none;
  font-size: 2em;
  color: #333;
  cursor: pointer;
  line-height: 1;
  transition: color .15s;
}
#cerrarEditarBtn:hover {
  color: #e84848;
}
#formEditarPrealerta button[type="submit"] {
  background: #16a34a;
  color: #fff;
  padding: 11px 26px;
  border: none;
  border-radius: 7px;
  font-size: 1.15em;
  font-weight: 600;
  letter-spacing: .02em;
  box-shadow: 0 2px 8px #0002;
  cursor: pointer;
  transition: background .18s;
}
#formEditarPrealerta button[type="submit"]:hover {
  background: #118032;
}
@media (max-width: 560px) {
  #formEditarPrealerta {
    min-width: 0;
    padding: 15px 5vw;
  }
  #formEditarPrealerta table {
    font-size: .97em;
  }
}
@keyframes popupFadeIn {
  from { opacity: 0; transform: scale(.97);}
  to   { opacity: 1; transform: scale(1);}
}
   /* Tarjetas dashboard */
    .dashboard-cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 22px;
      margin-bottom: 28px;
    }
    .dashboard-card {
      background: #fff;
      border-radius: 14px;
      box-shadow: 0 2px 12px #b4e3e443;
      padding: 26px 22px 18px 26px;
      min-height: 120px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      position: relative;
      border: 1.1px solid #e0eaea;
    }
    .dashboard-card .dashboard-title {
      font-size: 1.10em;
      color: #167187;
      font-weight: 600;
      margin-bottom: 9px;
      letter-spacing: 0.01em;
    }
    .dashboard-card .dashboard-value {
      font-size: 2.18em;
      font-weight: bold;
      color: #154959;
      margin-bottom: 2px;
      line-height: 1.15;
    }
    .dashboard-card .dashboard-desc {
      font-size: 1em;
      color: #58666b;
      margin-bottom: 7px;
    }
    .dashboard-card .dashboard-diff {
      font-size: 1.05em;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      margin-top: 2px;
    }
    .dashboard-card .dashboard-diff.positivo { color: #19c37d; }
    .dashboard-card .dashboard-diff.negativo { color: #e84848; }

    /* Contenedor gráficas */
    .dashboard-charts {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 28px;
      margin-top: 10px;
    }
    @media (max-width: 1100px) {
      .dashboard-charts { grid-template-columns: 1fr; }
    }
    .chart-card {
      background: #fff;
      border-radius: 13px;
      box-shadow: 0 2px 12px #b4e3e443;
      border: 1.2px solid #e0eaea;
      padding: 20px 16px 10px 22px;
      min-height: 285px;
      overflow-x: auto;
    }
    .chart-title {
      font-size: 1.05em;
      font-weight: 600;
      color: #167187;
      margin-bottom: 8px;
    }
    .fleet-status-list {
      list-style: none;
      padding: 0;
      margin: 0;
    }
    .fleet-status-list li {
      display: flex;
      align-items: center;
      margin-bottom: 8px;
      font-size: 1em;
      font-weight: 500;
      color: #17485e;
      gap: 9px;
    }
    .fleet-bar-bg {
      width: 100%;
      height: 13px;
      background: #e8edf5;
      border-radius: 7px;
      margin-left: 10px;
      margin-right: 10px;
      overflow: hidden;
      position: relative;
      flex: 1;
    }
    .fleet-bar-fill {
      height: 100%;
      border-radius: 7px;
      transition: width .4s;
    }
    .fleet-bar-fill.active { background: #19c37d; }
    .fleet-bar-fill.maintenance { background: #ff9800; }
    .fleet-bar-fill.available { background: #167187; }
    .fleet-status-list .fleet-label { min-width: 86px; }
    .fleet-status-list .fleet-value { min-width: 22px; text-align: right; }
    
    .modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.21);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-content {
  animation: popupFadeIn .22s;
}
@keyframes popupFadeIn {
  from { opacity: 0; transform: scale(.96);}
  to   { opacity: 1; transform: scale(1);}
}


/* ===== Reset Password Modal (login) ===== */
#resetModal.modal-overlay {
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(1.5px);
  z-index: 9999;
}

#resetModal .modal-content {
  background: #fff;
  color: #133444;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.18);
  padding: 18px 18px 14px 18px;
  /* Rectángulo centrado y responsive */
  width: clamp(340px, 88vw, 480px);
  box-sizing: border-box;
  display: block;
  overflow: hidden;              /* ✅ recorta sombras/overflow del input en iOS */
}

#resetModal .login-title {
  margin: 0 0 8px 0;
}

/* ✅ evita overflow por bordes/padding y estilos nativos de iOS */
#resetModal .admin-login-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;        /* clave */
  display: block;
  padding: 12px 12px;
  margin-top: 8px;
  border: 1.4px solid #c1d2d8;
  border-radius: 10px;
  background: #f8fafb;
  font-size: 1em;
  -webkit-appearance: none;      /* iOS fix */
  appearance: none;
}

#resetModal .btn-tabla { min-width: 120px; }
#resetModal .btn-minimal { min-width: 110px; }

#resetMsg {
  margin-top: 8px;
  display: none;
}

/* Evita bloquear clics cuando está oculto */
#resetModal[style*="display: none"] { pointer-events: none; }

/* Responsive fino (clamp ya cubre; esto es opcional) */
@media (max-width: 420px) {
  #resetModal .modal-content { width: 92vw; }
}
