/* Poppins self-hosted (subset latin, 20-jul-2026) — sin dependencia de Google Fonts */
@font-face{font-family:'Poppins';font-style:normal;font-weight:400;font-display:swap;src:url('/assets/fonts/poppins-400.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Poppins';font-style:normal;font-weight:500;font-display:swap;src:url('/assets/fonts/poppins-500.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Poppins';font-style:normal;font-weight:600;font-display:swap;src:url('/assets/fonts/poppins-600.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Poppins';font-style:normal;font-weight:700;font-display:swap;src:url('/assets/fonts/poppins-700.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Poppins';font-style:normal;font-weight:800;font-display:swap;src:url('/assets/fonts/poppins-800.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
/**
 * Global GPS Peru SAC — UI compartida: modales, formularios, responsive.
 * Marca: Poppins, --brand #1F4E78, --primary #1a56db
 */
:root {
  --gpp-brand: #1F4E78;
  --gpp-primary: #1a56db;
  --gpp-text: #0F1A3D;
  --gpp-text2: #5B6478;
  --gpp-bg-subtle: #f2f5f9;
  --gpp-border: #E2E8F0;
  --gpp-shadow-modal: 0 20px 60px rgba(15, 26, 61, 0.28);
  --gpp-modal-min: 520px;
  --gpp-modal-max: 920px;
  --gpp-modal-pad: 18px 22px;
  --gpp-touch: 44px;
  --gpp-logo-v: 20260708d;
}

/* Acción semántica con apariencia de enlace. Úsala para handlers JS que no
 * navegan a una URL; evita pseudolinks y conserva el estilo compacto. */
.gpp-link-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--primary, var(--gpp-primary));
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: inherit;
  text-decoration: none;
  cursor: pointer;
}
.gpp-link-btn:hover { text-decoration: underline; }

/* ── Logos corporativos Global GPS Peru SAC (SVG vector + PNG fallback) ── */
.rail .logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  flex-shrink: 0;
  overflow: hidden;
  padding: 0;
  box-shadow: none;
}
.rail .logo img {
  width: auto;
  height: 24px;
  object-fit: contain;
  display: block;
}
.gpp-logo-login {
  display: block;
  width: auto;
  max-width: 200px;
  height: 38px;
  margin: 0 auto 14px;
  object-fit: contain;
  object-position: center;
}
.gpp-logo-hero {
  width: auto;
  height: 48px;
  object-fit: contain;
  display: block;
  margin-bottom: 18px;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35));
}
.gpp-logo-bar {
  height: 23px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  object-position: left center;
  display: block;
  flex-shrink: 0;
}
/* Barra oscura: logo blanco directo (patrón Linear / Stripe — sin pastilla) */
.gpp-logo-on-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border-radius: 0;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  height: auto;
  box-shadow: none;
  text-decoration: none;
  color: #fff;
}
.gpp-logo-on-brand img {
  height: 23px;
  width: auto;
  max-width: 148px;
  object-fit: contain;
  object-position: left center;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
}
/* Lockup compacto: isotipo + wordmark Poppins (rail colapsado / móvil) */
.gpp-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}
.gpp-brand-lockup .gpp-brand-icon {
  width: auto;
  height: 24px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
}
.gpp-brand-lockup .gpp-brand-text {
  font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  line-height: 1;
}
.gpp-brand-lockup--light {
  color: var(--brand, var(--gpp-brand));
}
.gpp-brand-lockup--light .gpp-brand-icon {
  filter: none;
}
.gpp-logo-print {
  height: 34px;
  width: auto;
  object-fit: contain;
  margin-bottom: 8px;
}

/* Logos más compactos en pantallas estrechas */
@media (max-width: 767px) {
  .gpp-logo-login {
    height: 34px;
    max-width: 180px;
    margin-bottom: 12px;
  }
  .gpp-logo-bar,
  .gpp-logo-on-brand img {
    height: 20px;
    max-width: 132px;
  }
  .gpp-brand-lockup .gpp-brand-icon {
    height: 22px;
  }
}
@media (max-width: 479px) {
  .gpp-logo-login {
    height: 32px;
    max-width: 168px;
  }
  .gpp-logo-bar,
  .gpp-logo-on-brand img {
    height: 18px;
    max-width: 120px;
  }
}

/* ── Overlay ── */
#ov,
.ov {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 26, 61, 0.45);
  -webkit-overflow-scrolling: touch;
}
#ov.show,
.ov.show,
#ov[style*="display: flex"],
#ov[style*="display:flex"] {
  display: flex !important;
}

/* ── Modal base ── */
#modal,
.modal,
.gpp-modal {
  font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  background: #fff;
  border-radius: 14px;
  width: min(92vw, var(--gpp-modal-min));
  max-width: var(--gpp-modal-max);
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--gpp-shadow-modal);
  padding: 0 !important;
}
#modal:not(:has(.gpp-modal-shell)),
.modal:not(:has(.gpp-modal-shell)) {
  padding: var(--gpp-modal-pad) !important;
  overflow: auto;
  display: block;
  width: min(92vw, var(--gpp-modal-min));
}
#modal:not(:has(.gpp-modal-shell)) h3,
.modal:not(:has(.gpp-modal-shell)) h3 {
  margin: 0 0 6px;
  color: var(--brand, var(--gpp-brand));
  font-size: 18px;
  font-weight: 600;
}

/* Wide variant */
.gpp-modal-wide,
#modal.gpp-modal-wide,
.modal.gpp-modal-wide,
#modal.dc-wide,
.modal.dc-wide,
#ov.dc-wide #modal {
  width: min(92vw, var(--gpp-modal-max));
  min-width: min(92vw, var(--gpp-modal-min));
}

/* ── Modal shell (header / body / footer) ── */
.gpp-modal-shell {
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  min-height: 0;
}
.gpp-modal-header {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 12px;
  background: linear-gradient(180deg, #f7fafc, #fff);
  border-bottom: 1px solid var(--border, var(--gpp-border));
  position: sticky;
  top: 0;
  z-index: 2;
}
.gpp-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--brand, var(--gpp-brand));
  line-height: 1.25;
}
.gpp-modal-sub,
.gpp-modal-header .mono {
  font-size: 12px;
  color: var(--text2, var(--gpp-text2));
  margin-top: 4px;
  line-height: 1.4;
}
.gpp-modal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 20px;
  -webkit-overflow-scrolling: touch;
}
.gpp-modal-footer {
  flex: none;
  display: flex;
  gap: 10px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border, var(--gpp-border));
  background: #fff;
  position: sticky;
  bottom: 0;
  z-index: 2;
}
.gpp-modal-footer .btn {
  min-height: var(--gpp-touch);
}

/* ── Tabs (editor dispositivo) ── */
.gpp-tabs,
.gpp-modal-tabs {
  flex: none;
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 2px solid var(--border, var(--gpp-border));
  padding: 0 8px;
  background: #fff;
  scrollbar-width: thin;
}
.gpp-tabs .etab,
.gpp-modal-tabs .etab,
.etab {
  flex: none;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2, var(--gpp-text2));
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  user-select: none;
  white-space: nowrap;
  min-height: var(--gpp-touch);
  display: flex;
  align-items: center;
  background: transparent;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  font-family: inherit;
}
.gpp-tabs .etab.on,
.etab.on {
  color: var(--primary, var(--gpp-primary));
  border-bottom-color: var(--primary, var(--gpp-primary));
}

/* ── Forms ── */
.gpp-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 16px;
}
@media (min-width: 640px) {
  .gpp-form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .gpp-form-grid .gpp-span-2,
  .gpp-form-grid > label:has(textarea),
  .gpp-form-grid > .gpp-field-full {
    grid-column: 1 / -1;
  }
}
.gpp-modal label,
#modal label,
#ov label,
.modal label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2, var(--gpp-text2));
  margin: 10px 0 5px;
}
.gpp-modal input,
.gpp-modal select,
.gpp-modal textarea,
#modal input,
#modal select,
#modal textarea,
#ov input,
#ov select,
#ov textarea,
.modal input,
.modal select,
.modal textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border, var(--gpp-border));
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  box-sizing: border-box;
  min-height: var(--gpp-touch);
}
.gpp-modal textarea,
#modal textarea,
#ov textarea {
  min-height: 80px;
  resize: vertical;
}

/* ── Más acciones: filas y tarjetas ── */
.gpp-action-card {
  background: var(--bg-subtle, var(--gpp-bg-subtle));
  border: 1px solid var(--border, var(--gpp-border));
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.gpp-action-card:last-child {
  margin-bottom: 0;
}
.gpp-action-card-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand, var(--gpp-brand));
  margin-bottom: 10px;
}
.gpp-action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}
.gpp-action-row:last-child {
  margin-bottom: 0;
}
@media (min-width: 640px) {
  .gpp-action-row {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }
  .gpp-action-row > label {
    margin: 0;
  }
  .gpp-action-row > .btn,
  .gpp-action-row > button.btn {
    min-width: 110px;
    min-height: var(--gpp-touch);
    align-self: end;
  }
}
.gpp-quick-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 640px) {
  .gpp-quick-actions {
    grid-template-columns: 1fr 1fr;
  }
}
.gpp-quick-actions .btn {
  min-height: var(--gpp-touch);
  text-align: left;
  justify-content: flex-start;
}

/* ── Device config (GppDeviceConfig / dc-*) ── */
#ov.dc-wide {
  align-items: stretch;
  justify-content: center;
  padding: 12px;
}
.dc-shell {
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  font-family: inherit;
}
.dc-hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 10px;
  background: linear-gradient(180deg, #f7fafc, #fff);
  border-bottom: 1px solid var(--border, var(--gpp-border));
}
.dc-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand, var(--gpp-brand));
}
.dc-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 2px solid var(--border, var(--gpp-border));
  padding: 0 8px;
  flex: none;
  background: #fff;
}
.dc-tab {
  flex: none;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2, var(--gpp-text2));
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  min-height: var(--gpp-touch);
  white-space: nowrap;
}
.dc-tab.on {
  color: var(--primary, var(--gpp-primary));
  border-bottom-color: var(--primary, var(--gpp-primary));
}
.dc-body {
  padding: 14px 18px 18px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.dc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.dc-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 8px;
}
.dc-ico {
  width: 48px;
  height: 40px;
  border: 2px solid var(--border, var(--gpp-border));
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
.dc-ico .dc-ico-emoji {
  display: block;
  pointer-events: none;
  font-size: 22px;
  line-height: 1;
}
.dc-ico .dc-ico-svg,
.dc-ico .gpp-veh-svg {
  display: block;
  pointer-events: none;
}
.dc-ico .dc-ico-img {
  display: block;
  pointer-events: none;
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.dc-ico.on {
  border-color: var(--primary, var(--gpp-primary));
  background: #eef4ff;
  box-shadow: 0 0 0 2px rgba(26, 86, 219, 0.15);
}
.dc-photo-preview {
  width: 96px;
  height: 70px;
  border: 1px solid var(--border, var(--gpp-border));
  border-radius: 8px;
  background: #f6f9fc;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  line-height: 1;
  color: var(--text, #0F1A3D);
}
.dc-card {
  padding: 10px;
  border: 1px solid var(--border, var(--gpp-border));
  border-radius: 10px;
  margin: 8px 0;
  background: #fff;
}
.dc-tank-meta {
  font-size: 11px;
  font-weight: 500;
  color: var(--text2, #5B6478);
  margin-top: 4px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.dc-tank-inact {
  color: var(--danger, #dc2626);
  font-weight: 600;
}
.dc-subtabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.dc-stab {
  padding: 8px 12px;
  border: 1px solid var(--border, var(--gpp-border));
  border-radius: 20px;
  background: #f6f9fc;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text2, var(--gpp-text2));
  cursor: pointer;
  min-height: 36px;
}
.dc-stab.on {
  background: var(--primary, var(--gpp-primary));
  color: #fff;
  border-color: var(--primary, var(--gpp-primary));
}
.dc-algrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dc-al,
.dc-radio {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--border, var(--gpp-border));
  border-radius: 10px;
  cursor: pointer;
  font-size: 13.5px;
  background: #fff;
}
.dc-al input,
.dc-radio input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: none;
  min-height: auto;
}

/* ── Responsive sitio: panel gestión ── */
@media (max-width: 1023px) {
  .wrap nav {
    width: 72px;
  }
  .wrap nav .it {
    padding: 11px 6px;
    font-size: 10px;
    text-align: center;
  }
}

@media (max-width: 767px) {
  #ov,
  .ov {
    padding: 8px;
    align-items: flex-end;
  }
  #modal,
  .modal,
  .gpp-modal,
  .gpp-modal-wide,
  #modal.dc-wide {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
  }
  .gpp-modal-header,
  .gpp-modal-body,
  .gpp-modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .dc-grid,
  .dc-algrid {
    grid-template-columns: 1fr;
  }
  .wrap {
    flex-direction: column;
  }
  .wrap nav {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0;
    -webkit-overflow-scrolling: touch;
  }
  .wrap nav .it {
    flex: none;
    white-space: nowrap;
    border-left: 0;
    border-bottom: 3px solid transparent;
    padding: 10px 14px;
    font-size: 12px;
  }
  .wrap nav .it.on {
    border-left: 0;
    border-bottom-color: var(--accent, var(--gpp-primary));
  }
  main,
  #main {
    padding: 12px !important;
  }
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  #acctreewrap,
  #acctreebody {
    width: 100%;
  }
}

@media (max-width: 479px) {
  .gpp-tabs .etab,
  .dc-tab {
    padding: 10px 10px;
    font-size: 12px;
  }
  .gpp-action-card {
    padding: 12px;
  }
  .gpp-quick-actions {
    grid-template-columns: 1fr;
  }
}

/* ── Popup de unidad (Monitor / mapa) ── */
.upop .leaflet-popup-content-wrapper {
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 4px 20px rgba(15, 26, 61, 0.22);
  overflow: hidden;
}
.upop .leaflet-popup-content {
  margin: 0;
  width: 340px !important;
  max-width: min(92vw, 340px);
  font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
  line-height: 1.35;
}
.upop .leaflet-popup-tip {
  box-shadow: 0 3px 10px rgba(15, 26, 61, 0.15);
}
.up-card {
  display: flex;
  flex-direction: column;
  max-height: none;
  overflow: visible;
}
.up-card.up-crystal {
  background: #fff;
  overflow: visible;
}
.up-accent {
  height: 3px;
  flex: none;
  background: linear-gradient(90deg, var(--brand, #1F4E78), var(--primary, #1a56db) 55%, rgba(26, 86, 219, 0.2));
}
.up-h {
  background: linear-gradient(180deg, #f3f7fb 0%, #fff 100%);
  color: var(--text, var(--gpp-text));
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--border, var(--gpp-border));
  flex: none;
}
.up-h-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.up-h b {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand, var(--gpp-brand));
  white-space: normal;
  overflow: visible;
  word-break: break-word;
  line-height: 1.25;
}
.up-mdl {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text2, var(--gpp-text2));
  background: var(--gpp-bg-subtle, #f2f5f9);
  padding: 2px 6px;
  border-radius: 4px;
  flex: none;
}
.up-x {
  margin-left: auto;
  cursor: pointer;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1;
  padding: 4px;
  flex: none;
  border-radius: 4px;
  border: 0;
  background: transparent;
  font: inherit;
}
.up-x:hover {
  color: var(--text2, var(--gpp-text2));
  background: #f1f5f9;
}
.up-body {
  padding: 6px 10px 5px;
  overflow: visible;
  flex: 1 1 auto;
  min-height: 0;
}
.up-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.up-status.up-status-dense {
  gap: 5px;
  margin-bottom: 6px;
}
.up-online {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
  flex: none;
}
.up-online.on {
  color: var(--success, #059669);
  background: rgba(5, 150, 105, 0.10);
  border-color: rgba(5, 150, 105, 0.28);
}
.up-online.off {
  color: var(--danger, #dc2626);
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.28);
}
.up-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--border, #e4eaf1);
  background: #f8fafc;
  color: var(--text2, #5B6478);
  flex: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.up-badge.on {
  color: var(--success, #059669);
  background: rgba(5, 150, 105, 0.10);
  border-color: rgba(5, 150, 105, 0.30);
}
.up-badge.off {
  color: var(--text2, #5B6478);
  background: #f1f5f9;
}
.up-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  background: #f1f5f9;
  color: var(--text, var(--gpp-text));
}
.up-chip-live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, var(--gpp-primary));
  flex: none;
}
.up-chip-stale {
  background: rgba(217, 119, 6, 0.12);
  color: var(--warning-text, #92400e);
}
.up-silencio {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(217, 119, 6, 0.10);
  border: 1px solid rgba(217, 119, 6, 0.28);
  color: var(--text, var(--gpp-text));
  font-size: 12.5px;
  line-height: 1.45;
}
.up-silencio b {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--warning-text, #92400e);
}
.up-silencio span {
  display: block;
  color: var(--text2, var(--gpp-text2));
  font-size: 12px;
  font-weight: 400;
}
.up-dur {
  font-size: 11px;
  color: var(--text2, var(--gpp-text2));
}
.up-driver {
  font-size: 11.5px;
  color: var(--text, var(--gpp-text));
  margin: -4px 0 8px;
  padding: 4px 8px;
  background: #f8fafc;
  border-radius: 6px;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
  line-height: 1.35;
}
.up-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  margin-bottom: 8px;
}
/* Crystal Dock · métricas en franja con divisores */
.up-kv {
  display: grid;
  /* 4 métricas densas: Odóm. · Hoy · Bat. · Disp. (ACC/MOT van en header) */
  grid-template-columns: repeat(4, 1fr);
  margin: 0 0 6px;
  padding: 5px 0;
  border-top: 1px solid var(--border, #e4eaf1);
  border-bottom: 1px solid var(--border, #e4eaf1);
}
.up-kv.up-kv-4 {
  grid-template-columns: repeat(4, 1fr);
}
/* Legacy: ACC en strip (tests / rollback visual) */
.up-kv.up-kv-has-acc {
  grid-template-columns: 0.7fr 1fr 0.9fr 0.75fr 0.58fr 0.85fr;
}
.up-kv-cell {
  text-align: center;
  padding: 0 4px;
  min-width: 0;
  overflow: visible;
}
.up-kv-cell.up-kv-motor {
  min-width: 0;
}
.up-kv-cell.up-kv-acc .up-val {
  font-size: 11.5px;
}
.up-kv-cell + .up-kv-cell {
  border-left: 1px solid var(--border, #e4eaf1);
}
.up-kv-cell .up-lbl {
  display: block;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text2, #5B6478);
  margin-bottom: 1px;
}
.up-kv-cell .up-val {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text, #0F1A3D);
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.3;
  max-width: none;
  max-height: none;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}
.up-kv-cell .up-val > * {
  display: block;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: break-word;
  max-width: none;
}
.up-kv-cell .up-val .up-val-sub {
  display: block;
  margin-top: 1px;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--text2, #5B6478);
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
@media (max-width: 479px) {
  .up-kv,
  .up-kv.up-kv-4 {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 6px;
  }
  .up-kv.up-kv-has-acc {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Sin divisor al inicio de cada fila (2 columnas) */
  .up-kv-cell:nth-child(odd) {
    border-left: 0;
  }
}

.up-kv-cell.up-kv-disp .up-val {
  font-size: 11px;
}
.up-dock {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 6px 0 2px;
  font-size: 10px;
  color: #94a3b8;
}
.up-dock b {
  color: var(--text2, #5B6478);
  font-weight: 600;
}

/* W1 Compact Dock fuel (aprobado) — TOTAL tiene/cap + Faltan + barra */
.up-fuel-w1,
.up-fuel-crystal {
  margin: 4px 0 3px;
  position: relative;
}
.up-fuel-w1-hd {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
.up-fuel-w1-pump {
  flex: none;
  color: var(--brand, #1F4E78);
  display: block;
}
.up-fuel-w1-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text2, #5B6478);
}
.up-fuel-w1-badge {
  display: inline-block;
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(26, 86, 219, 0.08);
  color: var(--primary, #1a56db);
  letter-spacing: 0;
  text-transform: none;
}
.up-fuel-w1-hd > .up-fuel-badge {
  margin-left: auto;
}
.up-fuel-w1-row {
  display: flex;
  align-items: flex-end;
  gap: 8px 10px;
  flex-wrap: wrap;
  list-style: none;
  cursor: default;
}
details.up-fuel-tanks > summary.up-fuel-w1-row {
  cursor: pointer;
}
.up-fuel-w1-row::-webkit-details-marker {
  display: none;
}
.up-fuel-w1-total {
  min-width: 0;
  flex: 1 1 auto;
}
.up-fuel-w1-total .k {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text2, #5B6478);
  margin-bottom: 1px;
}
.up-fuel-w1-vol {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--brand, #1F4E78);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.up-fuel-w1-vol .sep {
  color: #94a3b8;
  font-weight: 600;
  margin: 0 1px;
}
.up-fuel-w1-vol small {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2, #5B6478);
  margin-left: 2px;
}
.up-fuel-w1-falta {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: #d97706;
  white-space: nowrap;
  padding-bottom: 2px;
}
.up-fuel-w1-falta.full {
  color: var(--success, #059669);
}
.up-fuel-w1-more-lbl {
  flex: none;
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary, #1a56db);
  white-space: nowrap;
  padding-bottom: 2px;
}
.up-fuel-w1-more-lbl::before {
  content: 'Ver tanques ›';
}
details.up-fuel-tanks[open] .up-fuel-w1-more-lbl::before {
  content: 'Ocultar tanques';
}
details.up-fuel-tanks[open] .up-fuel-w1-more-lbl {
  text-decoration: underline;
}
.up-fuel-w1-bar {
  margin-top: 6px;
  height: 7px;
  border-radius: 99px;
  background: #e8eef5;
  overflow: hidden;
}
.up-fuel-w1-bar > i {
  display: block;
  height: 100%;
  border-radius: 99px;
}
.up-fuel-w1-bar.low > i {
  background: #dc2626 !important;
}
.up-fuel-w1-bar.mid > i {
  /* keep fuelColor from inline; mid keeps amber from JS */
}
.up-fuel-w1-meta {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text2, #5B6478);
  line-height: 1.3;
}
.up-fuel-w1-meta .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success, #059669);
  flex: none;
}
.up-fuel-w1.is-stale .up-fuel-w1-pump {
  color: var(--warning, #d97706);
}
.up-fuel-w1.is-stale .up-fuel-w1-badge {
  background: rgba(217, 119, 6, 0.12);
  color: var(--warning-text, #92400e);
}
.up-fuel-w1.is-stale .up-fuel-w1-meta {
  color: var(--warning-text, #92400e);
}
.up-fuel-w1.is-stale .up-fuel-w1-meta .dot {
  background: var(--warning, #d97706);
}
.up-fuel-tanks {
  margin: 0;
}
.up-fuel-tanks-body {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
/* Per-tank · trío Tiene/Capacidad/Faltan (solo expandido) */
.up-fuel-trio {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1.1fr;
  gap: 5px;
}
.up-fuel-cell {
  padding: 6px 7px;
  border-radius: 10px;
  background: #f4f7fb;
  text-align: center;
}
.up-fuel-cell.now {
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.25);
}
.up-fuel-cell.need {
  background: rgba(26, 86, 219, 0.07);
  border: 1px solid rgba(26, 86, 219, 0.22);
}
.up-fuel-cell .k {
  display: block;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text2, #5B6478);
}
.up-fuel-cell .v {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 800;
  color: var(--brand, #1F4E78);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
}
.up-fuel-cell .v small {
  font-size: 9.5px;
  font-weight: 500;
  color: var(--text2, #5B6478);
  margin-left: 1px;
}
.up-fuel-cell.need .v {
  color: var(--primary, #1a56db);
}
.up-fuel-tank {
  padding: 4px 6px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e4eaf1;
}
.up-fuel-tank-tit {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 5px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text2, #5B6478);
  margin-bottom: 3px;
  line-height: 1.2;
}
.up-fuel-trio-tank {
  gap: 3px;
}
.up-fuel-trio-tank .up-fuel-cell {
  padding: 3px 4px;
  border-radius: 6px;
}
.up-fuel-trio-tank .up-fuel-cell .k {
  font-size: 7px;
}
.up-fuel-trio-tank .up-fuel-cell .v {
  font-size: 11px;
  margin-top: 0;
  line-height: 1.15;
}
.up-fuel-trio-tank .up-fuel-cell .v small {
  font-size: 8px;
}
.up-fuel-w1-bar-tank {
  margin-top: 3px;
  height: 3px;
}
.up-fuel-w1:has(.up-fuel-tanks[open]) {
  margin: 4px 0 2px;
}
.up-fuel-w1:has(.up-fuel-tanks[open]) > .up-fuel-w1-bar {
  margin-top: 5px;
  height: 5px;
}
/* Legacy salto (detalle no compact) */
.up-fuel-salto {
  margin-top: 7px;
  padding: 7px 9px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(199, 160, 74, 0.14), #fff);
  border: 1px solid rgba(199, 160, 74, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.up-fuel-salto-l {
  font-size: 10px;
  font-weight: 600;
  color: #8a6a28;
  line-height: 1.25;
}
.up-fuel-salto-l span {
  display: block;
  font-size: 8.5px;
  font-weight: 500;
  color: var(--text2, #5B6478);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.up-fuel-salto-n {
  font-size: 14px;
  font-weight: 800;
  color: #8a6a28;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.up-fuel-salto-n small {
  font-size: 10px;
  font-weight: 500;
}

/* Flecha de rumbo: gira con el course; el emoji se mantiene legible */
.gpp-veh-emoji .veh-heading {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  transform-origin: 50% 50%;
  pointer-events: none;
  z-index: 1;
}

/* Punta triangular a las 12; al rotar el contenedor apunta al rumbo real */
.gpp-veh-emoji .veh-heading::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  margin-left: -6px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid var(--primary, #1a56db);
  filter: drop-shadow(0 1px 2px rgba(15, 37, 64, 0.45));
}

.gpp-veh-emoji .veh.on .veh-heading::before {
  border-bottom-color: var(--gold, #c7a04a);
}

/* Chip unificado con la app: WebP del portal + aro del color del estado */
.gpp-veh-emoji .veh-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(248, 250, 252, 0.96);
  border: 3px solid #64748b;
  box-shadow: 0 2px 6px rgba(15, 37, 64, 0.3);
  box-sizing: border-box;
  user-select: none;
}
.gpp-veh-emoji .veh-chip-img { width: 22px; height: 22px; object-fit: contain; display: block; }
.gpp-veh-emoji .veh-chip-emoji { font-size: 18px; line-height: 1; }
.gpp-veh-emoji .veh-chip.st-mov { border-color: #10b981; }
.gpp-veh-emoji .veh-chip.st-exceso { border-color: #dc2626; }
.gpp-veh-emoji .veh-chip.st-idle { border-color: #d97706; }
.gpp-veh-emoji .veh-chip.st-stop { border-color: #1a56db; }
.gpp-veh-emoji .veh-chip.st-off,
.gpp-veh-emoji .veh-chip.st-venc,
.gpp-veh-emoji .veh-chip.st-desact { border-color: #64748b; }
.gpp-veh-emoji .veh.on .veh-chip {
  box-shadow: 0 0 0 3px rgba(199, 160, 74, 0.55), 0 3px 8px rgba(15, 37, 64, 0.35);
}

/* Emoji markers en mapa */
.gpp-veh-emoji .veh-emoji {
  display: block;
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(15, 37, 64, 0.25));
  user-select: none;
}
.gpp-veh-emoji .veh.on .veh-emoji {
  font-size: 28px;
  filter: drop-shadow(0 3px 6px rgba(26, 86, 219, 0.35));
}
.up-stat {
  font-size: 11px;
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
}
.up-stat .up-lbl {
  display: block;
  position: static;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--text2, var(--gpp-text2));
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 1px;
  white-space: normal;
  box-shadow: none;
  border: none;
  background: transparent;
  padding: 0;
}
.up-stat .up-val {
  display: block;
  font-weight: 600;
  color: var(--text, var(--gpp-text));
  word-break: break-word;
}
.up-stat .up-val sub {
  font-size: 9.5px;
  font-weight: 400;
  color: var(--text2, var(--gpp-text2));
}
.up-fuel-wrap {
  margin: 6px 0 8px;
  border: 1px solid var(--border, var(--gpp-border));
  border-radius: 8px;
  overflow: hidden;
  background: #fafbfc;
}
.up-fuel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand, var(--gpp-brand));
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.up-fuel-hd::-webkit-details-marker {
  display: none;
}
.up-fuel-hd::after {
  content: '▾';
  font-size: 10px;
  color: var(--text2, var(--gpp-text2));
  transition: transform 0.15s;
}
details[open] > .up-fuel-hd::after {
  transform: rotate(180deg);
}
.up-fuel-body {
  padding: 0 8px 6px;
}
.up-fuel-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 4px 8px;
  align-items: center;
  padding: 3px 0;
  font-size: 10.5px;
}
.up-fuel-row .up-fuel-lbl {
  grid-column: 1;
  color: var(--text2, var(--gpp-text2));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.up-fuel-row .up-fuel-val {
  grid-column: 2;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text, var(--gpp-text));
}
.up-fuel-bar {
  grid-column: 1 / -1;
  height: 5px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}
.up-fuel-bar > div {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s;
}
.up-fuel-warn {
  font-size: 10px;
  color: var(--danger, #dc2626);
  margin: 4px 0 0;
  line-height: 1.35;
}
.up-fuel-setup {
  padding: 8px;
  font-size: 11px;
}
.up-fuel-missing {
  grid-column: 1 / -1;
  font-size: 9.5px;
  color: var(--brand, #1f4e78);
  margin-top: 1px;
  line-height: 1.35;
}
.up-fuel-missing b {
  font-weight: 700;
  color: var(--brand, #1f4e78);
}
.up-fuel-missing-inline {
  font-weight: 500;
  color: var(--text2, #64748b);
  font-size: 10px;
}
.up-fuel-missing-inline b {
  color: var(--brand, #1f4e78);
  font-weight: 700;
}
.up-fuel-cap-summary {
  font-size: 10px;
  color: var(--text2, #64748b);
  padding: 2px 0 4px;
  border-bottom: 1px solid #e8edf3;
  margin-bottom: 2px;
  line-height: 1.4;
}
.up-fuel-cap-summary b {
  color: var(--brand, #1f4e78);
  font-weight: 700;
}
.up-fuel-auth {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(26, 86, 219, 0.06);
  border: 1px solid rgba(26, 86, 219, 0.22);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.up-fuel-auth.wide {
  margin: 8px 0;
}
.up-fuel-auth-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 11px;
  color: var(--text2, #5B6478);
  line-height: 1.35;
}
.up-fuel-auth-row b {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text, #0F1A3D);
}
.up-fuel-auth-row.auth {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand, #1F4E78);
  padding-top: 4px;
  margin-top: 2px;
  border-top: 1px solid rgba(26, 86, 219, 0.18);
}
.up-fuel-auth-row.auth b {
  color: var(--primary, #1a56db);
  font-size: 13px;
}
.up-fuel-badge {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 600;
  padding: 0 4px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 2px;
  letter-spacing: 0.02em;
}
.up-fuel-badge-ligo {
  background: #e0f2fe;
  color: #0369a1;
}
.up-fuel-badge-escort {
  background: #fef3c7;
  color: #b45309;
}
.up-fuel-low {
  font-size: 10px;
  color: #b45309;
  margin: 4px 0 0;
  line-height: 1.35;
  font-weight: 500;
}
.up-fuel-ts {
  font-size: 9.5px;
  color: var(--text2, #64748b);
  margin: 2px 0 0;
  line-height: 1.3;
}
.up-fuel-na {
  padding: 6px 8px;
  background: #f8fafc;
}
.up-fuel-na-txt {
  font-size: 10.5px;
  color: var(--text2, #64748b);
}

/* Peso / carga Technoton GNOM */
.up-weight-wrap {
  margin: 6px 0 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.up-weight-hd {
  font-size: 11px;
  font-weight: 600;
  color: #065f46;
  cursor: pointer;
  list-style: none;
}
.up-weight-hd::-webkit-details-marker { display: none; }
.up-weight-body { padding-top: 4px; }
.up-weight-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin: 4px 0;
}
.up-weight-bar > div { height: 100%; border-radius: 4px; transition: width 0.3s; }
.up-weight-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  padding: 2px 0;
}
.up-weight-lbl { color: var(--text2, #64748b); }
.up-weight-val { font-weight: 600; }
.up-weight-missing {
  font-size: 10px;
  color: #b45309;
  margin-top: 2px;
}
.up-weight-setup {
  background: #fffbeb;
  border-color: #fde68a;
}
.up-cfg-btn {
  display: block;
  width: 100%;
  margin: 4px 0 8px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary, var(--gpp-primary));
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  cursor: pointer;
  min-height: 32px;
  text-align: center;
}
.up-cfg-btn:hover {
  background: #dbeafe;
}
.up-warn {
  font-size: 10.5px;
  color: var(--danger, #dc2626);
  background: #fef2f2;
  border-radius: 6px;
  padding: 5px 8px;
  margin-bottom: 6px;
  line-height: 1.35;
}
.up-warn.up-warn-acc {
  color: var(--warning, #b45309);
  background: #fffbeb;
  border: 1px solid rgba(217, 119, 6, 0.28);
}
.up-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding-top: 6px;
  border-top: 1px solid var(--border, var(--gpp-border));
  font-size: 10px;
  color: var(--text2, var(--gpp-text2));
  word-break: break-word;
}
.up-meta .mono {
  word-break: break-all;
}
.up-last {
  margin: 8px 0 4px;
  padding-top: 7px;
  border-top: 1px solid var(--border, var(--gpp-border));
  line-height: 1.3;
}
.up-last .ago {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text2, var(--gpp-text2));
}
.up-last .abs {
  margin-top: 1px;
  font-size: 11px;
  color: var(--text2, var(--gpp-text2));
  font-variant-numeric: tabular-nums;
  opacity: .95;
}
.up-last.aging .ago { color: var(--warning, #d97706); }
.up-last.stale .ago { color: var(--danger, #dc2626); }
/* Ficha: comunicación / posición en filas claras (evita “pegar” fecha + siguiente label). */
.up-times {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border, var(--gpp-border));
}
.up-time-row {
  display: grid;
  grid-template-columns: 7.2rem minmax(0, 1fr);
  gap: 6px 10px;
  align-items: baseline;
}
.up-time-k {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--text2, var(--gpp-text2));
  opacity: .9;
}
.up-time-v {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}
.up-time-v .ago {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, var(--gpp-text, #0F1A3D));
}
.up-time-v .abs {
  font-size: 11px;
  color: var(--text2, var(--gpp-text2));
  font-variant-numeric: tabular-nums;
}
.up-time-row.aging .up-time-v .ago { color: var(--warning, #d97706); }
.up-time-row.stale .up-time-v .ago { color: var(--danger, #dc2626); }
.up-meta span {
  white-space: normal;
  word-break: break-word;
}
.up-meta a {
  color: var(--primary, var(--gpp-primary));
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.up-meta a:hover {
  text-decoration: underline;
}
.up-acts {
  display: flex;
  flex-wrap: nowrap;
  background: #fff;
  border-top: 1px solid var(--border, var(--gpp-border));
  padding: 2px 4px;
  flex: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.up-acts button {
  flex: 1 0 auto;
  min-width: 36px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 5px 2px 4px;
  font-family: inherit;
  font-size: 8px;
  color: var(--text2, var(--gpp-text2));
  line-height: 1.2;
}
.up-acts button .ai {
  display: block;
  font-size: 15px;
  line-height: 1.15;
  filter: grayscale(0.35);
}
.up-acts button:hover {
  color: var(--accent, var(--gpp-primary));
}
.up-acts button:hover .ai {
  filter: none;
}
.up-acts button.on {
  color: var(--accent, var(--gpp-primary));
  font-weight: 600;
}
.up-acts button.on .ai {
  filter: none;
}
@media (max-width: 767px) {
  .upop .leaflet-popup-content {
    width: min(92vw, 340px) !important;
  }
  .up-grid {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .up-card {
    max-height: none;
    overflow: visible;
  }
}

/* ── Reportes programados (sched modal) ── */
#schedov.ov {
  z-index: 2600;
}
.sched-modal.gpp-modal,
#schedov .gpp-modal {
  width: min(96vw, 620px);
  max-width: 620px;
}
.gpp-modal-close {
  flex: none;
  width: var(--gpp-touch);
  height: var(--gpp-touch);
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text2, var(--gpp-text2));
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
.gpp-modal-close:hover {
  background: var(--bg-subtle, var(--gpp-bg-subtle));
  color: var(--text, var(--gpp-text));
}
.gpp-modal-close:focus-visible {
  outline: 2px solid var(--primary, var(--gpp-primary));
  outline-offset: 2px;
}
.sched-tabs {
  padding: 0 12px;
}
.sched-section {
  background: var(--bg-subtle, var(--gpp-bg-subtle));
  border: 1px solid var(--border, var(--gpp-border));
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.sched-section:last-child {
  margin-bottom: 0;
}
.sched-section-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand, var(--gpp-brand));
  letter-spacing: 0.02em;
}
.sched-section-hint,
.sched-inline-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text2, var(--gpp-text2));
  line-height: 1.4;
}
.sched-inline-hint {
  margin: 6px 0 0;
}
.sched-preview {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef4ff;
  border: 1px solid #c7d9f5;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand, var(--gpp-brand));
}
.sched-fmt-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sched-fmt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--gpp-touch);
  padding: 10px 14px;
  border: 2px solid var(--border, var(--gpp-border));
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text2, var(--gpp-text2));
  cursor: pointer;
}
.sched-fmt-btn span {
  font-size: 18px;
}
.sched-fmt-btn.on {
  border-color: var(--primary, var(--gpp-primary));
  background: #eef4ff;
  color: var(--primary, var(--gpp-primary));
}
.sched-fmt-btn:focus-visible {
  outline: 2px solid var(--primary, var(--gpp-primary));
  outline-offset: 2px;
}
.sched-channels {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sched-ch-card {
  border: 2px solid var(--border, var(--gpp-border));
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.sched-ch-card.on {
  border-color: var(--primary, var(--gpp-primary));
  background: #f8fbff;
  box-shadow: 0 0 0 1px rgba(26, 86, 219, 0.08);
}
.sched-ch-card.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.sched-ch-card:focus-visible {
  outline: 2px solid var(--primary, var(--gpp-primary));
  outline-offset: 2px;
}
.sched-ch-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sched-ch-icon {
  font-size: 22px;
  flex: none;
  line-height: 1;
}
.sched-ch-head b {
  display: block;
  font-size: 14px;
  color: var(--text, var(--gpp-text));
}
.sched-ch-head small {
  display: block;
  font-size: 12px;
  color: var(--text2, var(--gpp-text2));
  font-weight: 400;
  margin-top: 1px;
}
.sched-ch-tick {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border, var(--gpp-border));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: transparent;
  flex: none;
}
.sched-ch-card.on .sched-ch-tick {
  border-color: var(--primary, var(--gpp-primary));
  background: var(--primary, var(--gpp-primary));
  color: #fff;
}
.sched-ch-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border, var(--gpp-border));
}
.sched-ch-body label {
  margin: 0;
}
.sched-warn {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--warning, #d97706);
}
.sched-empty {
  text-align: center;
  padding: 36px 16px 28px;
}
.sched-empty-icon {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 10px;
}
.sched-empty b {
  display: block;
  font-size: 15px;
  color: var(--text, var(--gpp-text));
  margin-bottom: 6px;
}
.sched-empty p {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text2, var(--gpp-text2));
  line-height: 1.45;
}
.sched-task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sched-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border, var(--gpp-border));
  border-radius: 10px;
  background: #fff;
}
.sched-task-main {
  flex: 1;
  min-width: 0;
}
.sched-task-main b {
  display: block;
  font-size: 14px;
  color: var(--text, var(--gpp-text));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sched-task-meta {
  font-size: 12px;
  color: var(--text2, var(--gpp-text2));
  margin-top: 3px;
  line-height: 1.35;
}
.sched-task-actions {
  display: flex;
  gap: 6px;
  flex: none;
}
.sched-task-actions .btn {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
}
.sched-task-del {
  min-width: 36px;
  padding: 6px 8px !important;
}
.sched-info-banner {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #eef4ff;
  border: 1px solid #c7d9f5;
  font-size: 12.5px;
  color: var(--text, var(--gpp-text));
  line-height: 1.45;
}
.sched-info-banner b {
  display: block;
  font-size: 13px;
  color: var(--brand, var(--gpp-brand));
  margin-bottom: 4px;
}
.sched-desc-box {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border, var(--gpp-border));
}
.sched-desc-box p {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--text, var(--gpp-text));
  line-height: 1.5;
}
.sched-desc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sched-desc-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(31, 78, 120, 0.08);
  color: var(--brand, var(--gpp-brand));
  font-weight: 500;
}
.sched-scope-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.sched-scope-badge.flota {
  background: rgba(26, 86, 219, 0.1);
  color: var(--primary, var(--gpp-primary));
}
.sched-scope-badge.unidad {
  background: rgba(5, 150, 105, 0.1);
  color: var(--success, #059669);
}
.sched-period-box {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px dashed var(--border, var(--gpp-border));
  font-size: 12px;
  color: var(--text2, var(--gpp-text2));
  line-height: 1.45;
}
.sched-summary-card {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
  border: 1px solid #c7d9f5;
}
.sched-summary-card dt {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2, var(--gpp-text2));
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 8px;
}
.sched-summary-card dt:first-child {
  margin-top: 0;
}
.sched-summary-card dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, var(--gpp-text));
}
#schedov label,
#schedov input,
#schedov select,
#schedov textarea,
#schedov button {
  font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
}
@media (max-width: 767px) {
  .sched-modal.gpp-modal,
  #schedov .gpp-modal {
    width: 100%;
    max-width: 100%;
  }
  .sched-fmt-pick {
    grid-template-columns: 1fr;
  }
  .sched-task {
    flex-direction: column;
    align-items: stretch;
  }
  .sched-task-actions {
    justify-content: flex-end;
  }
}

/* ── Unit picker (buscar placa) — combobox HubSpot/Linear-like ── */
.gpp-upick {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  min-width: 168px;
  max-width: 280px;
  vertical-align: middle;
  font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
}
.gpp-upick-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.gpp-upick-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  margin: 0;
  border: 1px solid var(--border, var(--gpp-border));
  border-radius: 8px;
  background: #fff;
  color: var(--text, var(--gpp-text));
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}
.gpp-upick-btn:hover {
  border-color: var(--primary, var(--gpp-primary));
}
.gpp-upick-btn:focus {
  outline: 2px solid var(--primary, var(--gpp-primary));
  outline-offset: 1px;
}
.gpp-upick.open .gpp-upick-btn {
  border-color: var(--primary, var(--gpp-primary));
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}
.gpp-upick-btn-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gpp-upick-chev {
  flex-shrink: 0;
  color: var(--text2, var(--gpp-text2));
  font-size: 11px;
  line-height: 1;
}
.gpp-upick-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 4000;
  width: max(100%, 240px);
  max-width: min(360px, 92vw);
  background: #fff;
  border: 1px solid var(--border, var(--gpp-border));
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 26, 61, 0.16);
  overflow: hidden;
}
.gpp-upick-search {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--border, var(--gpp-border));
  font: inherit;
  font-size: 13.5px;
  color: var(--text, var(--gpp-text));
  background: var(--gpp-bg-subtle, #f2f5f9);
  min-height: 44px;
}
.gpp-upick-search:focus {
  outline: none;
  background: #fff;
}
.gpp-upick-list {
  list-style: none;
  margin: 0;
  padding: 4px;
  max-height: 280px;
  overflow: auto;
}
.gpp-upick-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text, var(--gpp-text));
  cursor: pointer;
  min-height: 40px;
  box-sizing: border-box;
}
.gpp-upick-opt:hover,
.gpp-upick-opt.on {
  background: rgba(26, 86, 219, 0.1);
  color: var(--primary, var(--gpp-primary));
}
.gpp-upick-opt.selected {
  font-weight: 600;
}
.gpp-upick-check {
  color: var(--primary, var(--gpp-primary));
  font-size: 12px;
}
.gpp-upick-empty {
  padding: 16px 12px;
  text-align: center;
  color: var(--text2, var(--gpp-text2));
  font-size: 12.5px;
}
.form .gpp-upick,
.gpp-form-grid .gpp-upick,
.ctl .gpp-upick {
  width: 100%;
  max-width: 320px;
  display: flex;
}
.repbar .gpp-upick {
  min-width: 170px;
  max-width: 220px;
}
@media (max-width: 767px) {
  .repbar .gpp-upick,
  .form .gpp-upick,
  .ctl .gpp-upick {
    max-width: none;
    width: 100%;
  }
}
.gpp-upick-multi {
  min-width: 200px;
  max-width: 260px;
}
.gpp-upick-tools {
  display: flex;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border, var(--gpp-border));
  background: #fff;
}
.gpp-upick-tool {
  border: 0;
  background: transparent;
  color: var(--primary, var(--gpp-primary));
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 2px;
  min-height: 32px;
}
.gpp-upick-checkrow label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  cursor: pointer;
  margin: 0;
}
.gpp-upick-checkrow input {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
#repfleetw select#rscope,
#repfleetw select#rgroup {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--border, var(--gpp-border));
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  background: #fff;
}

/* Account tree + profile initials (no emoji chrome) */
.gpp-acc-ico {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex: none;
  letter-spacing: 0;
  background: #eef2f7;
  color: var(--brand, var(--gpp-brand));
}
.gpp-acc-ico.cli {
  background: #e8eefc;
  color: var(--primary, var(--gpp-primary));
}
.gpp-acc-ico.grp {
  background: #fff4e5;
  color: var(--accent, #e67e22);
}
.gpp-acc-ico.all {
  background: #eef2f7;
  color: var(--text2, var(--gpp-text2));
}
.gpp-pf-avatar {
  font-family: Poppins, system-ui, sans-serif;
}

/* ── Anti-flash de login (FOUC de autenticación) ──────────────────
   Al navegar entre páginas con sesión activa, el #login pintaba un
   instante mientras el JS validaba el token contra /api/auth/me.
   gpp-auth-shim.js añade html.gpp-authed de forma síncrona si hay
   token guardado → el login queda oculto desde el primer paint.
   Failsafe: si en 5s nadie arrancó la app (token inválido, JS roto),
   el login reaparece solo — nunca deja la pantalla en blanco. */
html.gpp-authed #login {
  visibility: hidden;
  opacity: 0;
  animation: gppLoginReveal 0.25s ease 5s forwards;
}
@keyframes gppLoginReveal {
  to {
    visibility: visible;
    opacity: 1;
  }
}

/* Combustible parcial: conserva el tanque sano y separa la incidencia. */
.up-fuel-partial {
  background: #fffbeb;
  color: var(--text, #1f2937);
  font-size: 11px;
}
.up-fuel-partial-hd {
  color: #92400e;
  font-weight: 700;
  margin-bottom: 2px;
}
.up-fuel-partial-note {
  color: var(--text2, #64748b);
  line-height: 1.3;
  margin-bottom: 6px;
}
.up-fuel-partial-tank {
  border-top: 1px solid rgba(146, 64, 14, .15);
  padding: 6px 0 2px;
}
.up-fuel-partial-tank > div:first-child,
.up-fuel-partial-tank.warn {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.up-fuel-partial-tank.warn span {
  color: #92400e;
  text-align: right;
}

/* Un GPS, varios activos físicos: cada tanque conserva su propio contexto. */
.up-fuel-assets {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.up-fuel-assets-hd {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--brand, var(--gpp-brand));
  font-size: 12px;
}
.up-fuel-assets-hd svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.up-fuel-assets-hd > span {
  margin-left: auto;
  color: var(--text2, var(--gpp-text2));
  font-size: 10px;
  font-weight: 600;
}
.up-fuel-asset {
  overflow: hidden;
  border: 1px solid var(--border, var(--gpp-border));
  border-left: 3px solid var(--brand, var(--gpp-brand));
  border-radius: 10px;
  background: var(--card, #fff);
}
.up-fuel-asset.independent {
  border-left-color: var(--gold, var(--gpp-gold));
}
.up-fuel-asset-secondary {
  border-left-width: 3px;
}
.up-fuel-asset-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-bottom: 1px solid var(--border, var(--gpp-border));
  background: var(--bg-subtle, #f8fafc);
}
.up-fuel-asset-name {
  min-width: 0;
  color: var(--text, var(--gpp-text));
  font-size: 11px;
  line-height: 1.3;
}
.up-fuel-asset-mode {
  flex: none;
  border: 1px solid var(--border, var(--gpp-border));
  border-radius: 999px;
  padding: 2px 6px;
  color: var(--text2, var(--gpp-text2));
  background: var(--card, #fff);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}
.up-fuel-asset.independent .up-fuel-asset-mode {
  color: var(--brand, var(--gpp-brand));
}
.up-fuel-asset-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 7px 9px;
  cursor: pointer;
  list-style: none;
  background: var(--bg-subtle, #f8fafc);
}
.up-fuel-asset-summary::-webkit-details-marker {
  display: none;
}
.up-fuel-asset-summary-name,
.up-fuel-asset-summary-reading {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}
.up-fuel-asset-summary-name b {
  overflow: hidden;
  color: var(--text, var(--gpp-text));
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.up-fuel-asset-summary-name small,
.up-fuel-asset-summary-reading small {
  color: var(--text2, var(--gpp-text2));
  font-size: 8.5px;
}
.up-fuel-asset-summary-reading {
  text-align: right;
  white-space: nowrap;
}
.up-fuel-asset-summary-reading b {
  color: var(--brand, var(--gpp-brand));
  font-size: 11px;
}
.up-fuel-asset-action {
  color: var(--primary, var(--gpp-primary));
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.up-fuel-asset-action::after {
  content: ' ›';
}
.up-fuel-asset-action .when-open {
  display: none;
}
.up-fuel-asset-secondary[open] .up-fuel-asset-action .when-closed {
  display: none;
}
.up-fuel-asset-secondary[open] .up-fuel-asset-action .when-open {
  display: inline;
}
.up-fuel-asset-secondary[open] .up-fuel-asset-action::after {
  content: ' ⌃';
}
.up-fuel-asset-body {
  border-top: 1px solid var(--border, var(--gpp-border));
}
.up-fuel-asset > .up-fuel-w1,
.up-fuel-asset > .up-fuel-wrap,
.up-fuel-asset > .up-fuel-partial,
.up-fuel-asset-body > .up-fuel-w1,
.up-fuel-asset-body > .up-fuel-wrap,
.up-fuel-asset-body > .up-fuel-partial {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.up-fuel-asset-empty,
.up-fuel-assets-note {
  color: var(--text2, var(--gpp-text2));
  font-size: 10px;
}
.up-fuel-asset-empty {
  padding: 9px;
}
.up-fuel-assets-note {
  line-height: 1.35;
}
@media (max-width: 479px) {
  .up-fuel-asset-hd {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .up-fuel-asset-mode {
    white-space: normal;
  }
  .up-fuel-asset-summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 8px;
  }
  .up-fuel-asset-action {
    grid-column: 1 / -1;
    justify-self: end;
    margin-top: -3px;
  }
}
