:root {
  --bg: #0c1220;
  --panel: #162033;
  --border: #2a3a52;
  --rojo: #dc2626;
  --text: #f1f5f9;
  --text-dim: #94a3b8;
  --fondo: var(--bg);
  --panel-alt: #121c2e;
  --borde: var(--border);
  --texto: var(--text);
  --suave: var(--text-dim);
  --oro: #d4af37;
  --oro-claro: #e8c96a;
  --azul: #2563eb;
  --ok: #22c55e;
  --alerta: #d97706;
  --ansa: var(--rojo);
  --header-h: 60px;
  --nav-h: 70px;
  --radius: 12px;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}
body {
  display: flex;
  flex-direction: column;
}

#estadoRed {
  flex: 0 0 auto;
  position: relative;
  z-index: 40;
  margin: 0;
  border-radius: 0;
  padding: 7px 16px;
  padding-top: max(7px, env(safe-area-inset-top));
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

.login-view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px 16px 24px;
  background: #4a0c14 url("branding/fondo_login.jpg?v=99") center center / cover no-repeat;
}
.login-view .brand { display: none; }
.login-view .login-card {
  background: rgba(8, 6, 8, 0.84);
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.app-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-view.hidden,
.hidden { display: none !important; }

.app-header {
  flex: 0 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  padding-top: max(8px, env(safe-area-inset-top));
  background: linear-gradient(180deg, #0b1220 0%, #0a101c 100%);
  border-bottom: 1px solid var(--border);
}

.app-header .who { min-width: 0; }
.app-header h1 {
  margin: 0;
  font-size: 1.02rem;
  color: var(--text);
  letter-spacing: .03em;
  font-weight: 700;
}
.app-header .muted { margin: 2px 0 0; font-size: .74rem; color: #a8b4c6; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#btnApagar.btn-apagar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: .88rem;
  letter-spacing: .03em;
  color: #fff;
  background: #b91c1c;
  border: 2px solid #fca5a5;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35);
}
#btnApagar.btn-apagar svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}
#btnApagar.btn-apagar:active {
  background: #991b1b;
}

.icon-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn.pulso { animation: pulsoTap .18s linear 2; }
@keyframes pulsoTap {
  0% { opacity: 1; transform: scale(1); }
  40% { opacity: .25; transform: scale(.92); }
  100% { opacity: 1; transform: scale(1); }
}
#btnLinterna.on { background: #f5c518; color: #111; }
#btnLinterna svg { fill: currentColor; stroke: none; }
.icon-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}

.media-icons {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.icon-media {
  flex: 1;
  min-width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
}

.icon-media svg {
  width: 28px;
  height: 28px;
  stroke: var(--oro);
  fill: none;
  stroke-width: 1.8;
}

.icon-media span { font-size: .78rem; font-weight: 650; }

.erp-filtros {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.erp-filtros button {
  flex: 1;
  min-width: 80px;
  padding: 10px;
  font-size: .82rem;
}

.erp-filtros button.on {
  background: var(--oro);
  color: #1a1408;
}

#erpFicha.erp-hoja {
  position: fixed;
  inset: 0;
  z-index: 90;
  margin: 0;
  max-height: 100vh;
  overflow: auto;
  border-radius: 0;
  padding: 16px 16px 40px;
}
.visor-media {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 8, 14, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.visor-cerrar {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
}

.visor-contenido {
  max-width: 100%;
  max-height: 75vh;
  overflow: auto;
}

.visor-contenido img,
.visor-contenido video {
  max-width: 100%;
  max-height: 66vh;
  border-radius: 8px;
}

.visor-acciones {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.visor-acciones button { min-width: 150px; }

.hoja-acciones {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(2, 6, 23, .72);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.hoja-caja {
  width: 100%;
  max-width: 460px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.hoja-titulo {
  margin: 0 0 4px;
  font-weight: 700;
  word-break: break-word;
}

.hoja-botones { display: grid; gap: 8px; }
.hoja-botones button { width: 100%; padding: 14px; font-size: 1rem; }
.hoja-cancelar { width: 100%; padding: 12px; }

/* La pulsacion larga abre el menu: sin seleccion de texto ni menu del sistema. */
.archivo-link {
  position: relative;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.archivo-pendiente {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: .68rem;
  font-weight: 700;
  color: var(--oro);
  border: 1px solid var(--oro);
  border-radius: 999px;
  padding: 1px 7px;
}

.archivo-thumb {
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border-radius: 8px;
  background: #0f172a center / cover no-repeat;
  border: 1px solid var(--border);
}

.archivo-texto { min-width: 0; overflow: hidden; }
.archivo-texto strong { display: block; word-break: break-word; }

.app-content {
  flex-grow: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  padding-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}

html.modo-enlace, html.modo-enlace body {
  height: 100dvh;
  max-height: 100dvh;
}
html.modo-enlace .app-view {
  min-height: 0;
  padding-bottom: env(safe-area-inset-bottom);
}
html.modo-enlace .bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 50;
  flex-shrink: 0;
}
.bottom-nav {
  flex: 0 0 auto;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background: #0b1220;
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  color: var(--text-dim);
  border: 0;
  border-radius: 0;
  padding: 8px 4px 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.bottom-nav .nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.bottom-nav .nav-item.active {
  color: var(--rojo);
  box-shadow: inset 0 2px 0 var(--rojo);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 8px 4px 10px;
}
.brand img { object-fit: contain; background: #0b0d11; border-radius: 8px; }
.logo-vs { width: 74px; height: 54px; }
.logo-ansa { width: 70px; height: 54px; background: #fff; padding: 4px; }
.brand-centro { flex: 1; text-align: center; min-width: 0; }
.brand-centro strong { display: block; color: var(--text); font-size: 1.02rem; letter-spacing: .04em; }
.brand-centro span { display: block; color: var(--text-dim); font-size: .68rem; letter-spacing: .06em; }
.brand-centro em { display: block; color: var(--rojo); font-style: normal; font-weight: 700; font-size: .78rem; margin-top: 2px; }

.login-card { max-width: 440px; margin: 0 auto; }
button, input, select, textarea { font: inherit; }
button {
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 700;
  background: var(--azul);
  color: #fff;
  transition: filter .12s ease, transform .08s ease;
}
button:active { transform: scale(0.98); }
button:disabled { opacity: .45; }
button.gold {
  background: linear-gradient(180deg, var(--oro-claro) 0%, var(--oro) 100%);
  color: #1a1408;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset;
}
button.ghost {
  background: rgba(255,255,255,.03);
  color: var(--text);
  border: 1px solid var(--border);
}
button.danger { background: var(--rojo); color: #fff; }
input, select, textarea {
  width: 100%;
  background: #0b1220;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 12px;
  min-height: 46px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--oro);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.18);
}
textarea { min-height: 96px; }
h1, h2, h3 { margin: 0 0 8px; font-weight: 750; }
h1 { color: var(--text); font-size: 1.2rem; letter-spacing: .02em; }
h2 { font-size: 1.02rem; letter-spacing: .015em; }
h3 { font-size: .95rem; }
.muted { color: var(--text-dim); font-size: .88rem; line-height: 1.35; }

.ver-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin-bottom: 10px;
  width: 100%;
}
.ver-tabs button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  padding: 4px 2px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-weight: 800;
  font-size: clamp(0.58rem, 2.1vw, 0.72rem);
  line-height: 1.1;
  white-space: normal;
  word-break: break-word;
}
.cuad-panel {
  padding: 12px 4px 8px;
  min-height: 120px;
}
.cuad-bar-perfil {
  margin-bottom: 6px;
}
.cuad-bar-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.cuad-bar-acciones button {
  flex: 1 1 30%;
  min-height: 36px;
  font-size: 0.82rem;
  padding: 6px 8px;
}
.cuad-ficha-nuevo {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.cuad-sub-tabs button {
  font-size: 0.78rem;
  padding: 6px 10px;
  font-weight: 700;
}
.furgo-row {
  align-items: flex-start;
}
.furgo-stock {
  margin: 4px 0 0;
  padding-left: 1.1em;
  font-size: 0.86rem;
}
.furgo-stock li {
  margin: 2px 0;
}
.cuad-pdf-seccion {
  margin: 12px 0 6px;
  font-size: 0.9rem;
  font-weight: 700;
}
.cuad-edit-list {
  max-height: min(52dvh, 400px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
}
.cuad-edit-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  gap: 6px 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.86rem;
}
.cuad-edit-row.on {
  border-color: #f5c518;
  background: rgba(245, 197, 24, 0.07);
}
.cuad-edit-row .cuad-edit-nom {
  grid-column: 2 / -1;
  font-weight: 600;
  line-height: 1.25;
}
.cuad-edit-row .cuad-edit-frec {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 120px;
}
.cuad-edit-row input.inp-frec-modal,
.cuad-edit-row input.inp-ult-modal {
  font-size: 0.84rem;
  padding: 5px 8px;
  box-sizing: border-box;
  min-width: 0;
}
.cuad-edit-row .cuad-edit-frec input.inp-frec-modal {
  max-width: 64px;
}
.cuad-edit-row input.inp-ult-modal {
  grid-column: 3 / -1;
}
.cuad-edit-row .chk-row {
  grid-column: span 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  white-space: nowrap;
}
.chk-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 12px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(0, 0, 0, 0.58);
}
.modal.hidden {
  display: none !important;
}
.modal-box {
  width: min(420px, 96vw);
  margin: auto;
  padding: 16px 14px 14px;
  border-radius: 12px;
  background: var(--card, #1a2332);
  border: 1px solid var(--border, #334155);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.modal-box-wide {
  max-width: min(520px, 96vw);
}
.cuad-pdf-seccion {
  margin: 10px 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f5c518;
  text-transform: uppercase;
}
.cuad-pdf-seccion + .ghost {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 6px;
  font-size: 0.78rem;
  word-break: break-all;
}

.ver-tabs button.on {
  background: #f5c518;
  color: #111;
  border-color: #f5c518;
}
#tab-ver:not(.hidden) {
  display: flex;
  flex-direction: column;
  height: auto;
  max-height: calc(100dvh - var(--header-h) - var(--nav-h) - 8px);
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#verFichaPantalla {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-top: env(safe-area-inset-top, 0px);
}
#verFichaPantalla.hidden { display: none !important; }
.ver-ficha-barra {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.ver-ficha-barra strong {
  font-size: 1.05rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ver-ficha-barra .ghost {
  min-height: 44px;
  padding: 8px 16px;
  font-size: 1rem;
}
#verFichaCuerpo {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 18px 36px;
  min-height: 0;
}
#verFichaCuerpo .falta-detalle {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}
.ver-ficha-linea {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 1.12rem;
  line-height: 1.5;
  word-break: break-word;
}
.ver-ficha-linea b {
  display: block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.ficha-amplia {
  font-size: 1.12rem;
  line-height: 1.55;
}
.ficha-amplia > div {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.ficha-amplia .acciones,
.ficha-amplia .lista {
  border-bottom: none;
}
#verFichaPantalla .acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
#verFichaPantalla .acciones button {
  min-height: 48px;
  padding: 10px 16px;
  font-size: 1rem;
}
.ver-obs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
}
.obs-arriba {
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(260px, .9fr);
  gap: 10px;
  align-items: stretch;
}
#calObs .dia, #calVer .dia, #calMov .dia, #calBajas .dia { min-height: 32px; padding: 1px; }
#calObs .dow { padding: 1px 0; }
.obs-cal { align-self: start; }
#tab-obs { overflow: visible; }
#tab-obs textarea { min-height: 44px; max-height: 56px; }
#tab-obs .icon-media { flex-direction: row; padding: 6px 8px; min-width: 0; gap: 4px; }
#tab-obs .icon-media svg { width: 18px; height: 18px; }
#tab-obs .media-actions { margin-top: 4px; }
#tab-obs .media-actions > .muted { display: none; }
#tab-obs .erp-head { margin-bottom: 2px; }
.obs-cal.card, #tab-obs.card { padding: 10px 12px; }
#tab-obs { overflow: visible; max-height: none; }
.quien-fila {
  display: flex;
  gap: 8px;
  align-items: end;
  margin: 8px 0;
}
.quien-fila label {
  flex: 1;
  color: var(--text-dim);
  font-size: .82rem;
  font-weight: 700;
}
.quien-fila select { min-width: 140px; max-width: 46%; }
.obs-historial {
  flex: none;
  min-height: 0;
  overflow: visible;
  margin-bottom: 12px;
}
#verFalta:not(.hidden), #verMov:not(.hidden), #verBajas:not(.hidden), #verStock:not(.hidden) {
  flex: none;
  min-height: 0;
  overflow: visible;
  padding-bottom: 24px;
}
@media (max-width: 760px) {
  .obs-arriba { grid-template-columns: 1fr; max-height: none; }
}
.ver-furgos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.ver-furgos button {
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
}
.ver-furgos button.on {
  border-color: #f5c518;
  color: #f5c518;
}
.card {
  background: linear-gradient(180deg, #182438 0%, var(--panel) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
#tab-logistica:not(.hidden) {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.log-sel {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  padding: 3px;
  border-radius: 12px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
}
.log-sel-btn {
  min-height: 42px;
  padding: 8px 6px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-dim);
  font-weight: 800;
  font-size: .74rem;
  line-height: 1.15;
}
.log-sel-btn.on {
  background: linear-gradient(180deg, var(--oro-claro) 0%, var(--oro) 100%);
  color: #111;
  box-shadow: 0 1px 6px rgba(0,0,0,.2);
}
.log-stack {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.log-panel.oculto { display: none !important; }
.log-panel.abierto {
  flex: 1 1 0;
  min-height: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.log-panel.mini {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  overflow: visible;
  min-height: 0;
  margin-bottom: 0;
}
.log-panel.mini .log-cuerpo { display: none; }
.log-linea {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  margin-bottom: 8px;
}
.log-linea h2,
.log-linea h3 {
  margin: 0;
  font-size: .95rem;
  white-space: nowrap;
  flex: 0 0 auto;
}
.log-linea-info {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: .78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.log-cuerpo {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.log-head-acc {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}
.log-head-acc button {
  min-height: 32px;
  padding: 4px 10px;
  font-size: .78rem;
  white-space: nowrap;
}
.parte-fila, .ver-mov-linea, .obs-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: .82rem;
  line-height: 1.3;
  cursor: pointer;
}
.parte-arch { min-height: 28px; padding: 2px 8px; }
.ver-mov-linea {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  white-space: normal;
  overflow: visible;
  font-size: .78rem;
  line-height: 1.25;
}
.ver-mov-linea strong { font-weight: 700; font-size: .78rem; }
.baja-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 220px;
  white-space: normal;
}
.log-min {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 14px;
  border: 1px solid var(--oro);
  background: #111;
  color: #f5c518;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}
.log-lateral {
  flex: 0 0 48px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.log-lateral:empty { display: none; }
.log-tab-lat {
  flex: 1 1 0;
  min-height: 112px;
  border: 1px solid #f5c518;
  background: var(--panel);
  color: #f5c518;
  border-radius: 12px;
  writing-mode: vertical-lr;
  font-weight: 800;
  letter-spacing: .03em;
  padding: 14px 0;
}

.tabs, .menu-modulos {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tabs button, .menu-modulos button {
  width: 100%;
  min-height: 52px;
  text-align: left;
  font-size: 1.02rem;
  font-weight: 700;
  background: var(--panel-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.tabs button.on, .menu-modulos button.on {
  background: #3f1214;
  color: #fff;
  border-color: var(--rojo);
}

.parte-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin: 0 0 14px;
  padding: 3px;
  border-radius: 12px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
}
.parte-tabs button {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .02em;
  background: transparent;
  color: var(--text-dim);
  border: 0;
  border-radius: 9px;
  padding: 8px 6px;
}
.parte-tabs button.on {
  background: linear-gradient(180deg, #4a1618 0%, #3a1012 100%);
  color: #fff;
  border: 1px solid rgba(220, 38, 38, 0.45);
  box-shadow: 0 1px 6px rgba(0,0,0,.25);
}

.erp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.pin { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 320px; margin: 18px auto; position: relative; z-index: 5; }
.pin button {
  height: 58px;
  font-size: 1.25rem;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
}
.pin-display {
  letter-spacing: .45em;
  font-size: 1.8rem;
  text-align: center;
  color: var(--oro-claro);
  min-height: 42px;
}

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 6px; }
.cal-layout { display: flex; gap: 10px; align-items: flex-start; }
.cal-malla { flex: 1; min-width: 0; }
.cal-acc { display: flex; flex-direction: column; gap: 8px; width: 118px; flex: none; }
.cal-acc button {
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #121a2b;
  color: var(--text);
  font-weight: 800;
  padding: 8px 6px;
}
.cal-acc button.on { background: #f5c518; color: #111; border-color: #f5c518; }
.cal-acc button:disabled { opacity: .4; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { text-align: center; color: var(--text-dim); font-size: .72rem; font-weight: 800; letter-spacing: .04em; padding: 2px 0 6px; }
.dia {
  position: relative;
  min-height: 34px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 2px;
  text-align: center;
  color: var(--text-dim);
}
.dia .n { font-weight: 700; font-size: 1rem; line-height: 1.1; }
.dia .gold { color: var(--oro-claro); font-size: .72rem; font-weight: 800; }
.dia.hay {
  background: rgba(34, 197, 94, .18);
  border-color: #22c55e;
  color: var(--text);
}
.dia.hoy .n { color: var(--oro-claro); }
.dia.sel {
  border-color: #f5c518;
  box-shadow: inset 0 0 0 1px #f5c518;
  color: var(--text);
}
.dia.hay.sel { background: rgba(245, 197, 24, .16); }
.cal.multi .dia {
  background: #f8fafc;
  border-color: #d7dee8;
  color: #1e293b;
}
.cal.multi .dia.hay {
  background: rgba(34, 197, 94, .22);
  border-color: #22c55e;
  color: var(--text);
}
.cal.multi .dia.sel { border-color: #f5c518; }
.cal.multi .dia.hoy:not(.hay) .n { color: #b45309; }
.dia-check {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 14px;
  height: 14px;
  border: 1.5px solid #3dd6c6;
  border-radius: 3px;
  font-size: 11px;
  line-height: 12px;
  text-align: center;
  color: #04221c;
  background: transparent;
}
.dia-check.on { background: #3dd6c6; }
.dia .bars { display: flex; gap: 2px; margin-top: 4px; height: 4px; }
.dia .bars i { flex: 1; border-radius: 2px; display: block; height: 4px; }
.cal-leyenda { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 10px; font-size: .82rem; }
.cal-leyenda b { font-weight: 800; }
.emp-linea { display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%; }
.emp-linea .nombre { font-weight: 700; }
.chips-dia { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-dia {
  min-width: 32px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  font-weight: 800;
  font-size: .78rem;
  color: #0f172a;
  padding: 0 6px;
}
.bottom-nav .nav-item.hidden { display: none !important; }
.menu-grupo {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  margin: 14px 0 6px;
  font-weight: 700;
}
.menu-grupo:first-child { margin-top: 0; }
.menu-modulos button.on {
  border-color: var(--rojo);
  background: #3f1214;
}
.menu-flotante {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 16px);
  transform: translateX(-50%);
  z-index: 60;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.menu-flotante p { margin: 0 0 4px; }

.item.sel { border-color: var(--rojo); box-shadow: inset 0 0 0 1px var(--rojo); }
.item.enviado { border-color: var(--ok); }
.item.enviado .tick { color: var(--ok); font-weight: 800; margin-left: 6px; }

.falta-detalle {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
}
.falta-detalle .acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.acciones-parte { align-items: center; }
.cola-tipo { font-size: .78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
.lista { display: flex; flex-direction: column; gap: 8px; }
.item {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.net { font-size: .92rem; font-weight: 650; }
.net.wait { background: #3a2a12; color: #e4c35a; }
.net.ok { background: #052e1a; color: #b6f2d2; }
.net.off { background: #4a1010; color: #fecaca; }
.err { color: #f2b4b6; background: #3a1518; border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.okmsg { color: #b6f2d2; background: #052e1a; border-radius: 8px; padding: 8px 10px; margin: 8px 0; }

.banner-consulta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #3f1214;
  border: 1px solid var(--rojo);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.banner-consulta strong { color: #fecaca; }
.lista .item.sel { border-color: var(--rojo); background: #3f1214; }

.subtitulo-card {
  margin: 14px 0 8px;
  font-size: .92rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.archivo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: inherit;
  font: inherit;
}
.archivo-link:hover { border-color: var(--oro); }
.archivos-servidor .item { padding: 10px 12px; }

.form { display: grid; gap: 10px; }
.form label { color: var(--text-dim); font-size: .82rem; font-weight: 700; letter-spacing: .01em; }
.form label > input,
.form label > select,
.form label > textarea,
.form label > .combo-busca {
  margin-top: 5px;
}
.form > label,
.form > .row,
.form > .row-compacta,
.form > #bloqueBajaParte,
.form > #bloqueCosteParte {
  margin-bottom: 12px;
  display: block;
}
.form > .row,
.form > .row-compacta {
  display: grid;
}
.combo-busca {
  display: grid;
  grid-template-columns: 1fr minmax(5.5rem, 42%);
  gap: 6px 8px;
  align-items: center;
}
.combo-busca input.busca-combo,
.combo-busca input[type="search"] {
  font-size: 16px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.combo-busca select {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.combo-busca #btnQuitarCliente,
.combo-busca > button {
  grid-column: 1 / -1;
  justify-self: start;
}
.fila-anadir-cli {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}
.fila-anadir-cli input,
.fila-anadir-cli select {
  flex: 1;
  min-width: 0;
  font-size: 16px;
}
.lista-check {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border, #2a3548);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
}
.check-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text, #e8edf5);
}
.check-line input { width: 20px; height: 20px; flex-shrink: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row-compacta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: end;
}
@media (max-width: 700px) {
  .row { grid-template-columns: 1fr; }
  .row-compacta { grid-template-columns: 1fr 1fr; }
}

.tactico-wrap {
  margin: -16px;
  padding: 0 0 24px;
  display: block;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(100vh - var(--header-h) - var(--nav-h));
}
.tactico-bar {
  margin: 12px 12px 0;
  border-radius: 12px 12px 0 0;
}
.tactico-estado-gps {
  margin: 4px 0 8px;
  font-size: .82rem;
  line-height: 1.35;
}
.tactico-estado-gps.es-vivo {
  color: #15803d;
  font-weight: 650;
}
.tactico-estado-gps.es-cola {
  color: #b45309;
  font-weight: 650;
}
.tactico-estado-gps.es-pc {
  color: #334155;
}
.tactico-controles {
  margin-top: 10px;
  grid-template-columns: 1fr 1fr;
  align-items: end;
}
.tactico-controles label {
  display: grid;
  gap: 4px;
  font-size: .78rem;
  color: var(--text-dim);
  font-weight: 650;
}
.tactico-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 10px;
}
.tactico-accion {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 200px;
  flex: 1 1 140px;
}
.tactico-accion small {
  font-size: .72rem;
  line-height: 1.25;
  color: var(--text-dim, #94a3b8);
}
.tactico-btn-gen,
.tactico-btn-live,
.tactico-btn-yo,
.tactico-btn-idle {
  min-height: 40px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  background: #1d4ed8;
  color: #f8fafc;
  border: 1px solid #1e40af;
  letter-spacing: 0.02em;
}
.tactico-acciones .tactico-btn-activo.gold,
.tactico-acciones button.gold {
  background: var(--gold, #c9a227);
  color: #111827;
  border: 1px solid #a8871c;
}
.tactico-mapa {
  height: 46vh;
  min-height: 260px;
  width: calc(100% - 24px);
  margin: 0 12px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  z-index: 1;
}
.tactico-flota-card {
  margin: 12px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.tactico-flota-card h3 {
  margin: 0 0 8px;
  font-size: .95rem;
}
.tactico-flota {
  overflow-y: auto;
  max-height: 38vh;
  -webkit-overflow-scrolling: touch;
}
.tactico-fila {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}
.tactico-fila:last-child { border-bottom: 0; }
.tactico-fila-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.tactico-hueco { flex: 1; }
.tactico-dias { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow: auto; margin: 8px 0; }
.tactico-mapa { min-height: 180px; }
.tactico-flota { overflow: visible; }
.tactico-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #0f172a;
  font-weight: 800;
  font-size: .78rem;
}
.tactico-estado { margin-left: auto; font-size: .82rem; }
.tactico-meta { margin-top: 4px; font-size: .82rem; line-height: 1.35; }
.tactico-piloto {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.leaflet-container { background: #0f172a; }
.gps-parada { background: none !important; border: none !important; }
.paleta-encargado {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 12px;
}
.paleta-swatch {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid #334155;
  padding: 0;
  cursor: pointer;
}
.paleta-swatch.sel {
  border: 3px solid #e4c35a;
  box-shadow: 0 0 0 1px #0f172a;
}
.roles-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.roles-toggles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 4px;
}
.roles-toggles .rol-check {
  margin: 0;
}
.rol-check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b1220;
  font-weight: 650;
}
.rol-check input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  accent-color: var(--oro);
}
.log-fila {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 100%;
}
.log-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #0b1220;
  flex: 0 0 48px;
}
.log-thumb-vacio {
  display: inline-block;
  border: 1px solid var(--border);
}
.log-refresco {
  min-height: 44px;
  white-space: nowrap;
  flex: 0 0 auto;
}
#logFiltroMov {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 8px 0;
}
#logFiltroMov button {
  min-height: 42px;
  width: 100%;
}
.log-filtros-mov {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.log-filtros-mov label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.log-filtros-mov select {
  min-height: 42px;
  width: 100%;
}
.log-mov-lista {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 6px;
}
.log-mov-linea {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: inherit;
}
.log-mov-linea .log-mov-txt {
  font-size: 13px;
  line-height: 1.35;
}
.log-mov-linea button {
  min-height: 34px;
  min-width: 68px;
  padding: 0 8px;
  font-size: 12px;
}
.log-mov-linea button[data-act="borrar"] {
  border-color: #DC2626;
  color: #FECACA;
}
.log-mov-ficha {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.log-mov-ficha.hidden {
  display: none;
}
#logMovDestFurgo,
#logMovDestNave,
#logMovDestCancel {
  min-height: 48px;
  width: 100%;
}
.tpv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 6px;
  margin: 12px 0;
}
.tpv-card {
  background: #fff;
  color: #111;
  border-radius: 8px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  box-shadow: 0 1px 0 #e8e8e8;
  border: 1px solid #e5e7eb;
}
.tpv-card img,
.tpv-card .tpv-foto-vacia {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #eee;
}
.tpv-foto-wrap {
  position: relative;
  width: 100%;
}
.tpv-card .sel-marca {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: rgba(17, 17, 17, 0.55);
  color: #f5c518;
  font-size: 22px;
  font-weight: 800;
  border-radius: 8px;
}
.tpv-card.sel {
  outline: none;
  border: 3px solid var(--oro);
  background: #fff8e1;
}
.tpv-card.marcado {
  outline: none;
  border: 3px solid var(--oro);
  background: #fff8e1;
}
.tpv-card.marcado img,
.tpv-card.marcado .tpv-foto-vacia {
  filter: brightness(0.55);
}
.tpv-card.marcado .sel-marca {
  display: flex;
}
.enc-foto {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.enc-foto.hidden { display: none; }
.enc-caja {
  width: min(92vw, 380px);
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.enc-caja h3 { margin: 0 0 4px; }
.enc-marco {
  position: relative;
  width: min(78vw, 280px);
  height: min(78vw, 280px);
  margin: 12px auto;
  overflow: hidden;
  border-radius: 12px;
  border: 2px solid #f5c518;
  background: #111;
  touch-action: none;
  cursor: grab;
}
.enc-marco img {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.enc-zoom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.enc-zoom button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 10px;
  border: 1px solid #d4d4d8;
  background: #f4f4f5;
  font-size: 22px;
  font-weight: 800;
}
.enc-zoom input[type="range"] {
  flex: 1;
  min-height: 44px;
  accent-color: #f5c518;
}
.tpv-card .nombre {
  font-weight: 700;
  text-align: center;
  font-size: 11px;
  line-height: 1.2;
  color: #111;
}
.tpv-card .tpv-stock {
  font-size: 10px;
  color: #555;
}
.tpv-card .tpv-stock.bajo {
  color: #DC2626;
  font-weight: 700;
}
.tpv-card .tpv-alerta {
  font-size: 10px;
  color: #888;
}
#tpvGrid .tpv-alerta {
  display: none;
}
#listaLogProductos .tpv-card {
  cursor: pointer;
}
.tpv-qty {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.tpv-qty button {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  border: 1px solid #ddd;
  background: #f4f4f4;
  color: #111;
  touch-action: none;
  user-select: none;
}
.tpv-qty button.tpv-num {
  flex: 1.15 1 0;
  background: #fff;
  border: 1px solid #bbb;
  font-size: 13px;
  height: 28px;
  min-height: 28px;
  touch-action: manipulation;
}
.tpv-qty button.tpv-num.tpv-d2 { font-size: 11px; }
.tpv-qty button.tpv-num.tpv-d3 { font-size: 10px; }
.tpv-qty button.tpv-num.tpv-d4 { font-size: 9px; }
#verStock:not(.hidden) {
  overflow: visible;
}
#verStock .card {
  overflow: visible;
}
.ver-stock-filtros {
  position: relative;
  z-index: 12;
  margin-top: 10px;
}
#verStockFiltroBody {
  margin-top: 8px;
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 13;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
#verStockFiltroBody.hidden { display: none; }
.ver-stock-lista {
  position: relative;
  z-index: 1;
  margin-top: 10px;
}
#tpvCalcUpcRow {
  margin: 8px 0 4px;
}
#tpvCalcUpcRow label {
  display: grid;
  gap: 4px;
  font-weight: 700;
}
#tpvCalcUpcRow input {
  min-height: 42px;
}
#tpvCalcModos {
  grid-template-columns: 1fr 1fr;
}
.tpv-caja {
  width: 100%;
  height: 24px;
  min-height: 24px;
  margin-top: 2px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #1e4a8a;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  touch-action: manipulation;
}
.tpv-calc-caja-txt {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #1e4a8a;
  min-height: 22px;
  margin: 0 0 8px;
}
.log-caja-fila {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.log-caja-fila label {
  display: grid;
  gap: 4px;
}
.tpv-calc-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tpv-calc-foto {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  background: #eee;
  flex: 0 0 88px;
}
.tpv-calc-foto.vacia {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 12px;
}
.tpv-calc {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8, 10, 16, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.tpv-calc.hidden { display: none; }
.tpv-calc-caja {
  width: min(360px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.tpv-calc-caja .row button {
  flex: 1;
  min-height: 48px;
}
#tpvRegistrar {
  width: 100%;
  min-height: 52px;
  margin-top: 4px;
}
.tpv-modos {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 6px 0 10px;
}
.tpv-modos button {
  min-height: 34px;
  font-weight: 800;
  border-radius: 10px;
}
.tpv-modos button.on {
  background: var(--oro);
  color: #111;
  border-color: var(--oro);
}
.tpv-recuento {
  background: #fff;
  color: #111;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.35;
  margin: 8px 0 4px;
}
.tpv-alerta-nave {
  background: #3a2a12;
  color: #e4c35a;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 8px 0;
  font-size: 13px;
}
.tpv-sel-fila {
  display: flex;
  gap: 8px;
}
.tpv-sel-fila .tpv-sel-media {
  flex: 1 1 50%;
  min-width: 0;
}
.furgo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.log-foto-vista {
  width: 250px;
  height: 250px;
  max-width: 100%;
  margin: 8px auto;
  border-radius: 12px;
  background: #eee;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  overflow: hidden;
}
.log-foto-vista img {
  width: 250px;
  height: 250px;
  object-fit: cover;
}
#logFiltroMov button.on {
  background: var(--oro);
  color: #111;
  border-color: var(--oro);
}
.log-hist-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0 10px;
  flex-wrap: wrap;
}
.log-hist-nav input,
.log-hist-nav select {
  flex: 1;
  min-width: 110px;
  min-height: 44px;
}
.log-hist-nav button {
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 44px;
}
.pap-fila {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.pap-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pap-acc { display: flex; gap: 6px; flex: 0 0 auto; }
.pap-acc button { min-height: 32px; padding: 4px 8px; }

.cartel-gps {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 12, 16, 0.94);
}
.cartel-gps-caja {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 20px;
}
.cartel-gps-caja h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--oro-claro);
}
.cartel-gps-lista {
  margin: 12px 0 18px;
  padding-left: 1.2em;
  color: var(--text);
  line-height: 1.45;
}
.cartel-gps-caja button {
  width: 100%;
  margin-top: 8px;
  min-height: 44px;
}
