/* ==========================================================================
   LogiTrack · Capa visual móvil (Fase 1)
   Se carga DESPUÉS de sb-admin-2.min.css. Solo estilos: no cambia lógica.
   Alcance: .lt-login (index.php) y .lt-app (main.php)
   ========================================================================== */

:root {
  --lt-red: #e40613;
  --lt-red-600: #c40510;
  --lt-red-700: #9f040d;
  --lt-red-50: #fdecee;
  --lt-ink: #1c1f24;
  --lt-ink-2: #3a3f47;
  --lt-muted: #6b7280;
  --lt-bg: #f2f3f5;
  --lt-surface: #ffffff;
  --lt-border: #e6e8eb;
  --lt-ok: #16a34a;
  --lt-radius: 18px;
  --lt-radius-sm: 12px;
  --lt-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .06);
  --lt-appbar-h: 56px;
  --lt-tabbar-h: 64px;
  --lt-safe-top: env(safe-area-inset-top, 0px);
  --lt-safe-bottom: env(safe-area-inset-bottom, 0px);
  --lt-font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Transición suave entre pantallas (Chrome/Edge 126+, Safari 18+). */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .18s; }

.lt-app, .lt-login {
  font-family: var(--lt-font);
  color: var(--lt-ink);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

.lt-login *, .lt-login *::before, .lt-login *::after { box-sizing: border-box; }
.lt-app button:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.lt-app :focus-visible { outline: 2px solid var(--lt-red); outline-offset: 2px; }

/* Evita el zoom automático de iOS al enfocar campos (necesita >= 16px). */
.lt-app input, .lt-app select, .lt-app textarea,
.lt-login input { font-size: 16px; }

/* ==========================================================================
   LOGIN
   ========================================================================== */
.lt-login {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--lt-surface);
}

.lt-login__hero {
  position: relative;
  flex: 1 0 auto;
  min-height: 38vh;
  padding: calc(32px + var(--lt-safe-top)) 24px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(120% 80% at 85% 0%, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(160deg, var(--lt-red) 0%, var(--lt-red-700) 100%);
  overflow: hidden;
}
.lt-login__hero::after {
  /* ondas decorativas sutiles */
  content: "";
  position: absolute;
  inset: auto -20% -40px -20%;
  height: 120px;
  background: rgba(255, 255, 255, .07);
  border-radius: 50%;
}
.lt-login__badge {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  margin-bottom: 18px;
}
.lt-login__badge img { width: 56px; height: auto; }
.lt-login__brand {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.5px;
  margin: 0;
  line-height: 1.1;
}
.lt-login__brand span { opacity: .75; font-weight: 700; }
.lt-login__tagline { margin: 6px 0 0; font-size: 15px; opacity: .85; }

.lt-login__sheet {
  position: relative;
  z-index: 1;
  margin-top: -28px;
  background: var(--lt-surface);
  border-radius: 28px 28px 0 0;
  padding: 28px 24px calc(24px + var(--lt-safe-bottom));
  width: 100%;
  max-width: 480px;
  align-self: center;
}
.lt-login__title { font-size: 22px; font-weight: 800; margin: 0 0 4px; color: var(--lt-ink); }
.lt-login__subtitle { font-size: 14px; color: var(--lt-muted); margin: 0 0 22px; }

.lt-field { position: relative; margin-bottom: 14px; }
.lt-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--lt-ink-2);
  margin: 0 0 6px 4px;
}
.lt-field__icon {
  position: absolute;
  left: 16px;
  bottom: 0;
  height: 52px;
  display: flex;
  align-items: center;
  color: var(--lt-muted);
  pointer-events: none;
}
.lt-input {
  width: 100%;
  height: 52px;
  border: 1.5px solid var(--lt-border);
  border-radius: 14px;
  background: #f8f9fa;
  padding: 0 48px 0 46px;
  color: var(--lt-ink);
  transition: border-color .15s, background .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.lt-input:focus {
  outline: none;
  background: #fff;
  border-color: var(--lt-red);
  box-shadow: 0 0 0 4px rgba(228, 6, 19, .12);
}
.lt-field__toggle {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--lt-muted);
  border-radius: 10px;
}
.lt-field__toggle:focus-visible { outline: 2px solid var(--lt-red); }

.lt-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 4px 22px;
  font-size: 14px;
  color: var(--lt-ink-2);
  user-select: none;
}
.lt-check input { width: 20px; height: 20px; accent-color: var(--lt-red); }

.lt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .2px;
  color: #fff;
  background: var(--lt-red);
  box-shadow: 0 8px 20px rgba(228, 6, 19, .28);
  transition: transform .1s, background .15s, box-shadow .15s;
  text-decoration: none !important;
}
.lt-btn:hover { background: var(--lt-red-600); color: #fff; }
.lt-btn:active { transform: scale(.98); }
.lt-btn[disabled] { opacity: .8; }
.lt-btn .lt-spinner { display: none; }
.lt-btn.is-loading .lt-spinner { display: inline-block; }
.lt-btn.is-loading .lt-btn__label { opacity: .85; }
.lt-spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lt-spin .7s linear infinite;
}
@keyframes lt-spin { to { transform: rotate(360deg); } }

.lt-alert {
  display: none;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
}
.lt-alert.is-visible { display: flex; }
.lt-alert--error { background: var(--lt-red-50); color: var(--lt-red-700); }
.lt-alert--info { background: #eef2f7; color: var(--lt-ink-2); }

.lt-login__foot {
  text-align: center;
  font-size: 12.5px;
  color: var(--lt-muted);
  margin-top: 22px;
}

@media (min-width: 768px) {
  .lt-login { background: var(--lt-bg); justify-content: center; align-items: center; padding: 32px; }
  .lt-login__hero, .lt-login__sheet { width: 420px; max-width: 420px; flex: none; }
  .lt-login__hero { min-height: 260px; border-radius: 28px 28px 0 0; }
  .lt-login__sheet { border-radius: 0 0 28px 28px; margin-top: 0; box-shadow: var(--lt-shadow); }
  .lt-login__hero::after { display: none; }
}

/* ==========================================================================
   SHELL DE LA APP (main.php)
   ========================================================================== */
.lt-app {
  background: var(--lt-bg);
  padding-top: calc(var(--lt-appbar-h) + var(--lt-safe-top));
  padding-bottom: calc(var(--lt-tabbar-h) + var(--lt-safe-bottom) + 12px);
}
.lt-app #wrapper,
.lt-app #content-wrapper,
.lt-app #content { background: transparent !important; }
.lt-app #content-wrapper { width: 100%; min-width: 0; }
.lt-app .scroll-to-top { display: none !important; }

.lt-app #content > .container-fluid { padding-top: 12px; }

/* ---------- Barra superior ---------- */
.lt-appbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1030;
  height: calc(var(--lt-appbar-h) + var(--lt-safe-top));
  padding: var(--lt-safe-top) 8px 0 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--lt-border);
}
.lt-appbar__icon-btn {
  width: 44px; height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--lt-ink);
  font-size: 18px;
  padding: 0;
}
.lt-appbar__icon-btn:active { background: #eef0f2; }
.lt-appbar__icon-btn[hidden] { display: none; }
.lt-appbar__logo { width: 44px; flex: 0 0 44px; display: grid; place-items: center; }
.lt-appbar__logo img { width: 26px; height: auto; }
.lt-appbar__logo[hidden] { display: none; }
.lt-appbar__title {
  flex: 1;
  min-width: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--lt-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.2px;
}
.lt-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--lt-red);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
}
.lt-appbar .dropdown-menu {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(16, 24, 40, .18);
  padding: 8px;
  min-width: 240px;
  margin-top: 6px;
}
.lt-appbar .dropdown-header {
  padding: 10px 12px 12px;
  color: var(--lt-ink);
  white-space: normal;
  text-transform: none;
  font-size: 1rem;
}
.lt-appbar .dropdown-header strong { display: block; font-size: 15px; }
.lt-appbar .dropdown-header small { color: var(--lt-muted); font-size: 13px; }
.lt-appbar .dropdown-item {
  border-radius: 10px;
  padding: 12px;
  font-weight: 700;
  font-size: 15px;
}
.lt-appbar .dropdown-item.text-danger:active { background: var(--lt-red-50); color: var(--lt-red) !important; }

/* ---------- Barra de pestañas inferior ---------- */
.lt-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1030;
  height: calc(var(--lt-tabbar-h) + var(--lt-safe-bottom));
  padding: 0 6px var(--lt-safe-bottom);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--lt-border);
  margin: 0;
  list-style: none;
}
.lt-tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  color: #8a9099;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none !important;
  position: relative;
  user-select: none;
}
.lt-tab i { font-size: 19px; line-height: 1; transition: transform .15s; }
.lt-tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lt-tab:active i { transform: scale(.9); }
.lt-tab.active { color: var(--lt-red); }
.lt-tab.active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 28px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--lt-red);
}
/* Botón central (escanear / asignar) */
.lt-tab--fab { color: var(--lt-ink-2); }
.lt-tab--fab .lt-tab__fab {
  width: 54px; height: 54px;
  margin-top: -22px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(160deg, var(--lt-red) 0%, var(--lt-red-600) 100%);
  box-shadow: 0 8px 18px rgba(228, 6, 19, .35), 0 0 0 5px var(--lt-bg);
}
.lt-tab--fab .lt-tab__fab i { font-size: 22px; }
.lt-tab--fab.active::before { display: none; }
.lt-tab--fab.active { color: var(--lt-red); }

@media (min-width: 768px) {
  .lt-tabbar { left: 50%; right: auto; width: 560px; transform: translateX(-50%); border: 1px solid var(--lt-border); border-bottom: 0; border-radius: 20px 20px 0 0; }
}

/* ---------- Modal de salir como hoja inferior ---------- */
.modal.lt-sheet .modal-dialog {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 520px;
  min-height: 0;
  display: block;
}
.modal.lt-sheet.fade .modal-dialog { transform: translateY(100%); transition: transform .22s ease-out; }
.modal.lt-sheet.show .modal-dialog { transform: none; }
.modal.lt-sheet .modal-content {
  border: 0;
  border-radius: 24px 24px 0 0;
  padding: 10px 20px calc(20px + var(--lt-safe-bottom));
  text-align: center;
}
.lt-sheet__grip { width: 40px; height: 5px; border-radius: 3px; background: #d6d9dd; margin: 0 auto 18px; }
.lt-sheet__icon {
  width: 56px; height: 56px;
  border-radius: 18px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  background: var(--lt-red-50);
  color: var(--lt-red);
  font-size: 22px;
}
.lt-sheet__title { font-size: 19px; font-weight: 800; margin: 0 0 4px; }
.lt-sheet__text { color: var(--lt-muted); font-size: 14.5px; margin: 0 0 20px; }
.lt-sheet__actions { display: grid; gap: 10px; }
.lt-btn--ghost {
  background: #eef0f2;
  color: var(--lt-ink) !important;
  box-shadow: none;
}
.lt-btn--ghost:hover { background: #e5e7ea; }

/* ==========================================================================
   INICIO (view/inicio/view.html)
   ========================================================================== */
.lt-home { padding: 16px 16px 8px; max-width: 640px; margin: 0 auto; }

.lt-hero {
  position: relative;
  border-radius: 24px;
  padding: 20px;
  color: #fff;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(150deg, var(--lt-red) 0%, var(--lt-red-700) 100%);
  box-shadow: 0 12px 28px rgba(159, 4, 13, .28);
  overflow: hidden;
}
.lt-hero__greet { font-size: 14px; opacity: .85; margin: 0; font-weight: 600; }
.lt-hero__name {
  font-size: 24px;
  font-weight: 800;
  margin: 2px 0 14px;
  line-height: 1.15;
  letter-spacing: -.3px;
  word-break: break-word;
}
.lt-hero__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.lt-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  max-width: 100%;
}
.lt-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-dot { width: 8px; height: 8px; border-radius: 50%; background: #ffd24d; flex: 0 0 8px; }
.lt-chip.is-live .lt-dot { background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); animation: lt-pulse 1.8s infinite; }
@keyframes lt-pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); }
  70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
.lt-hero__pin {
  position: absolute;
  right: -14px;
  bottom: -18px;
  width: 120px;
  opacity: .10;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.lt-section-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--lt-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin: 24px 4px 10px;
}

.lt-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--lt-radius);
  background: var(--lt-surface);
  box-shadow: var(--lt-shadow);
  color: var(--lt-ink) !important;
  text-decoration: none !important;
  margin-top: 16px;
  transition: transform .1s;
}
.lt-cta:active { transform: scale(.985); }
.lt-cta__icon {
  width: 52px; height: 52px;
  flex: 0 0 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--lt-red);
  color: #fff;
  font-size: 22px;
}
.lt-cta__body { flex: 1; min-width: 0; }
.lt-cta__title { font-size: 17px; font-weight: 800; margin: 0; }
.lt-cta__text { font-size: 13.5px; color: var(--lt-muted); margin: 2px 0 0; }
.lt-cta__chev { color: #b7bcc3; font-size: 16px; }

.lt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lt-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 12px;
  border-radius: var(--lt-radius);
  background: var(--lt-surface);
  box-shadow: var(--lt-shadow);
  color: var(--lt-ink) !important;
  text-decoration: none !important;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  transition: transform .1s;
  min-height: 104px;
}
.lt-tile:active { transform: scale(.97); }
.lt-tile__icon {
  width: 40px; height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 17px;
}
.lt-tile small { display: block; font-weight: 600; color: var(--lt-muted); font-size: 12px; margin-top: 2px; }
.lt-tile__icon--red { background: var(--lt-red-50); color: var(--lt-red); }
.lt-tile__icon--dark { background: #eceef1; color: var(--lt-ink); }
.lt-tile__icon--green { background: #e8f7ee; color: var(--lt-ok); }

.lt-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff7e0;
  color: #7a5a00;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 360px) {
  .lt-grid { grid-template-columns: repeat(2, 1fr); }
  .lt-tab span { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   FASE 2 · Guías, preasignación y entrega
   ========================================================================== */

/* ---------- Avisos del servidor (#resultado) como notificación flotante ---------- */
.lt-app #resultado > .alert {
  position: fixed;
  z-index: 1060;
  top: calc(var(--lt-appbar-h) + var(--lt-safe-top) + 8px);
  left: 12px; right: 12px;
  max-width: 520px;
  margin: 0 auto;
  border: 0;
  border-radius: 14px;
  padding: 14px 44px 14px 16px;
  font-weight: 700;
  font-size: 14.5px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .22);
  animation: lt-toast-in .22s ease-out;
}
.lt-app #resultado > .alert-success { background: #0f7a3a; color: #fff; }
.lt-app #resultado > .alert-danger  { background: #b3040f; color: #fff; }
.lt-app #resultado > .alert-info,
.lt-app #resultado > .alert-warning { background: #1c1f24; color: #fff; }
.lt-app #resultado > .alert .close { color: #fff; opacity: .8; text-shadow: none; position: absolute; top: 8px; right: 12px; }
@keyframes lt-toast-in { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Listas de guías ---------- */
.lt-guias { padding-top: 14px !important; padding-bottom: 96px; max-width: 680px; margin: 0 auto; }
.lt-guias > .row { margin-left: -6px; margin-right: -6px; }
.lt-guias > .row > [class*="col-"] { padding-left: 6px; padding-right: 6px; }
.lt-guias h4 { display: none; } /* título estático antiguo de retornos */
.lt-page-hint { font-size: 14px; color: var(--lt-muted); margin: 0 4px 12px; }

.lt-list-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--lt-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin: 6px 0 10px;
  padding-left: 10px !important;
}
.lt-list-head span {
  background: #e3e5e9;
  color: var(--lt-ink-2);
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 12px;
  letter-spacing: 0;
}
.lt-guias.has-tabs .lt-list-head { display: none; }

/* Pestañas segmentadas */
.lt-seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #e4e6ea;
  margin: 0 0 14px;
}
.lt-seg[hidden] { display: none; }
.lt-seg__btn {
  flex: 1;
  height: 40px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  font-weight: 800;
  font-size: 14px;
  color: var(--lt-muted);
}
.lt-seg__btn span {
  display: inline-block;
  min-width: 22px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .08);
  font-size: 12px;
}
.lt-seg__btn.is-active { background: #fff; color: var(--lt-ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.lt-seg__btn.is-active span { background: var(--lt-red); color: #fff; }
.lt-guias[data-tab="entregar"] #list_guias_retorno { display: none !important; }
.lt-guias[data-tab="retorno"] #list_guias,
.lt-guias[data-tab="retorno"] #boton,
.lt-guias[data-tab="retorno"] #resultado > .lt-empty { display: none !important; }

/* Tarjeta de guía */
.lt-gcard {
  position: relative;
  background: var(--lt-surface);
  border-radius: var(--lt-radius);
  box-shadow: var(--lt-shadow);
  overflow: hidden;
}
.lt-gcard::before {
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--lt-red);
}
.lt-gcard--blue::before  { background: #2563eb; }
.lt-gcard--green::before { background: var(--lt-ok); }
.lt-gcard--amber::before { background: #f59e0b; }
.lt-gcard__main {
  display: block;
  padding: 14px 16px 10px 18px;
  color: var(--lt-ink) !important;
  text-decoration: none !important;
}
a.lt-gcard__main:active { background: #fafafa; }
.lt-gcard__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.lt-gcard__num { font-size: 12.5px; font-weight: 800; color: var(--lt-muted); letter-spacing: .2px; }
.lt-gcard__num i { font-size: 11px; margin-right: 2px; }
.lt-gcard__client { font-size: 17px; font-weight: 800; line-height: 1.25; margin-bottom: 6px; word-break: break-word; }
.lt-gcard__line { display: flex; gap: 8px; font-size: 14px; color: var(--lt-ink-2); line-height: 1.35; }
.lt-gcard__line i { color: var(--lt-red); margin-top: 3px; font-size: 13px; }
.lt-gcard__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12.5px; color: var(--lt-muted); font-weight: 600; }
.lt-gcard__meta i { margin-right: 3px; }
.lt-gcard__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 12px 18px;
}
.lt-gcard__actions:empty { display: none; }
.lt-gcard__nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: #eef0f2;
  color: var(--lt-ink) !important;
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none !important;
}
.lt-gcard__nav--waze { width: 36px; padding: 0; justify-content: center; color: #33ccff !important; font-size: 17px; }
.lt-gcard__go {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--lt-red);
  color: #fff !important;
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none !important;
}
.lt-gcard__go--amber { background: #f59e0b; color: #1c1f24 !important; }
.lt-gcard__go:active, .lt-gcard__nav:active { transform: scale(.97); }

.lt-tag {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.lt-tag--red   { background: var(--lt-red-50); color: var(--lt-red-700); }
.lt-tag--blue  { background: #e8effd; color: #1d4ed8; }
.lt-tag--green { background: #e8f7ee; color: #0f7a3a; }
.lt-tag--amber { background: #fff4db; color: #8a5a00; }

/* Estado vacío */
.lt-empty { text-align: center; padding: 48px 24px 24px; }
.lt-empty__icon {
  width: 84px; height: 84px;
  margin: 0 auto 16px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: var(--lt-surface);
  box-shadow: var(--lt-shadow);
  color: var(--lt-red);
  font-size: 32px;
}
.lt-empty__title { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: var(--lt-ink); }
.lt-empty__text { font-size: 14.5px; color: var(--lt-muted); margin: 0 auto 20px; max-width: 280px; }
.lt-empty .lt-btn { max-width: 260px; margin: 0 auto; }

/* Botón fijo "Iniciar ruta" */
.lt-sticky-action:empty { display: none; }
.lt-sticky-action {
  position: fixed;
  z-index: 1020;
  left: 12px; right: 12px;
  bottom: calc(var(--lt-tabbar-h) + var(--lt-safe-bottom) + 10px);
  max-width: 520px;
  margin: 0 auto;
}
.lt-sticky-action .lt-btn[disabled] { background: #9aa0a8; box-shadow: none; }
.lt-mensaje {
  margin: 0 0 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff7e0;
  color: #6b4d00;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--lt-shadow);
}
.lt-mensaje a { font-weight: 800; color: var(--lt-red); }

/* ---------- Hojas inferiores (extra) ---------- */
.lt-sheet__summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 8px 0 20px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f5f6f8;
  text-align: left;
}
.lt-sheet__summary strong { font-size: 12.5px; color: var(--lt-muted); }
.lt-sheet__summary span { font-size: 16px; font-weight: 800; }
.lt-sheet__summary small { font-size: 13px; color: var(--lt-ink-2); }
.lt-sheet__summary strong:empty + span:empty + small:empty { display: none; }
.lt-sheet__actions--2 { grid-template-columns: 1fr 1fr; }
.lt-sheet__close {
  display: block;
  width: 100%;
  margin-top: 10px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--lt-muted);
  font-weight: 700;
  font-size: 15px;
}
.lt-btn--danger-text { color: var(--lt-red-700) !important; }
.lt-btn--sm { height: 40px; font-size: 14px; border-radius: 12px; width: auto; padding: 0 14px; }
.lt-btn--icon { width: 40px; padding: 0; }
.lt-btn--ghost.lt-btn--icon .fa-waze { color: #1fb6e8; font-size: 18px; }

/* Firma */
.lt-sheet--firma .modal-content { text-align: left; }
.lt-sheet--firma .lt-sheet__title, .lt-sheet--firma .lt-sheet__text { text-align: center; }
.lt-sheet--firma .lt-sheet__text { margin-bottom: 14px; }
.lt-firma-pad {
  position: relative;
  border: 2px dashed #cfd3d8;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 12px;
}
.lt-firma-pad canvas {
  display: block;
  width: 100%;
  height: 220px;
  touch-action: none;
  position: relative;
  z-index: 1;
  background: transparent;
}
.lt-firma-pad__line {
  position: absolute;
  left: 18px; right: 18px; bottom: 36px;
  border-top: 1.5px solid #d6d9dd;
  padding-top: 4px;
  font-size: 12px;
  color: #9aa0a8;
  pointer-events: none;
  z-index: 2;
}
.lt-firma-error { color: var(--lt-red-700); font-weight: 700; font-size: 14px; text-align: center; margin: -4px 0 10px; }

/* ---------- Detalle / entrega ---------- */
.lt-app:has(.lt-detalle) .lt-tabbar { display: none; }
.lt-app:has(.lt-detalle) { padding-bottom: calc(96px + var(--lt-safe-bottom)); }
.lt-detalle { max-width: 680px; margin: 0 auto; padding-top: 14px !important; }

.lt-dcard {
  background: var(--lt-surface);
  border-radius: 22px;
  box-shadow: var(--lt-shadow);
  padding: 18px;
}
.lt-dcard__label { margin: 0; font-size: 12px; font-weight: 800; color: var(--lt-muted); text-transform: uppercase; letter-spacing: .6px; }
.lt-dcard__client { font-size: 21px; font-weight: 800; margin: 2px 0 12px; color: var(--lt-ink); line-height: 1.2; word-break: break-word; }
.lt-dcard__row { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--lt-ink-2); margin-bottom: 6px; }
.lt-dcard__row i { width: 16px; color: var(--lt-red); margin-top: 3px; text-align: center; }
.lt-dcard__row span:empty::after { content: "—"; color: #b7bcc3; }
.lt-dcard__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.lt-dcard__nav { display: inline-flex; gap: 8px; }

.lt-step {
  background: var(--lt-surface);
  border-radius: 22px;
  box-shadow: var(--lt-shadow);
  padding: 16px;
}
.lt-step__title { display: block; font-size: 16px; font-weight: 800; margin: 0 0 12px; color: var(--lt-ink); }
.lt-step__title small { display: block; font-size: 12.5px; font-weight: 600; color: var(--lt-muted); margin-top: 2px; }
.lt-label { display: block; font-size: 13px; font-weight: 700; color: var(--lt-ink-2); margin: 12px 0 6px 2px; }

/* Botones de estado */
.lt-estados { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lt-estado {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 80px;
  border: 2px solid var(--lt-border);
  border-radius: 16px;
  background: #fafafa;
  color: var(--lt-ink-2);
  font-weight: 800;
  font-size: 13.5px;
  line-height: 1.15;
  transition: all .12s;
}
.lt-estado i { font-size: 22px; color: #9aa0a8; }
.lt-estado:active { transform: scale(.97); }
.lt-estado--ok.is-active   { border-color: var(--lt-ok); background: #e8f7ee; color: #0f5f2f; }
.lt-estado--ok.is-active i { color: var(--lt-ok); }
.lt-estado--part.is-active   { border-color: #f59e0b; background: #fff4db; color: #7a4f00; }
.lt-estado--part.is-active i { color: #f59e0b; }
.lt-estado--no.is-active   { border-color: var(--lt-red); background: var(--lt-red-50); color: var(--lt-red-700); }
.lt-estado--no.is-active i { color: var(--lt-red); }

/* Selects originales: #estado oculto (lo maneja el script), #subestado con estilo neutro.
   Se usan IDs porque guias.js reescribe sus clases al cambiar de estado. */
#cab_card { background: transparent !important; box-shadow: none !important; border: 0 !important; margin: 0 !important; }
#cab_card > .col { padding: 0 !important; }
#estado { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
#subestado, .lt-field-input, #persona_recibe, #detalles {
  height: auto;
  min-height: 50px;
  border: 1.5px solid var(--lt-border) !important;
  border-radius: 14px !important;
  background: #f8f9fa !important;
  color: var(--lt-ink) !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  padding: 12px 14px !important;
  box-shadow: none !important;
}
#subestado:focus, #persona_recibe:focus, #detalles:focus { border-color: var(--lt-red) !important; background: #fff !important; }
.lt-step[data-estado="300"] #cab_card { display: none; }

/* Chips "Quién recibe" */
#recibe { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.lt-chips { display: flex; gap: 8px; margin-bottom: 10px; }
.lt-chip-opt {
  flex: 1;
  height: 44px;
  border: 2px solid var(--lt-border);
  border-radius: 12px;
  background: #fafafa;
  font-weight: 800;
  font-size: 14.5px;
  color: var(--lt-ink-2);
}
.lt-chip-opt.is-active { border-color: var(--lt-red); background: var(--lt-red-50); color: var(--lt-red-700); }

/* Fotos */
.lt-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lt-photo {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  margin: 0;
  border: 2px dashed #cfd3d8;
  border-radius: 16px;
  background: #fafafa center / cover no-repeat;
  overflow: hidden;
  cursor: pointer;
}
.lt-photo.file-select::before { display: none; content: none; }
.lt-photo input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 3; }
.lt-photo__ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--lt-muted);
  font-size: 12.5px;
  font-weight: 800;
}
.lt-photo__ph i { font-size: 22px; color: #9aa0a8; }
#foto1 .lt-photo__ph i { color: var(--lt-red); }
.lt-photo.has-img { border-style: solid; border-color: transparent; }
.lt-photo.has-img .lt-photo__ph { display: none; }
.lt-photo__ok {
  position: absolute; right: 6px; top: 6px;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: none;
  place-items: center;
  background: var(--lt-ok);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
  z-index: 2;
}
.lt-photo.is-done .lt-photo__ok { display: grid; }

/* Firma */
.lt-sign {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  min-height: 96px;
  border: 2px dashed #cfd3d8;
  border-radius: 16px;
  background: #fafafa;
  color: var(--lt-ink-2) !important;
  font-weight: 800;
  text-decoration: none !important;
  padding: 10px;
}
.lt-sign__empty i { color: var(--lt-red); margin-right: 6px; }
.lt-sign__img, .lt-sign__ok { display: none; }
.lt-sign.is-done { border-style: solid; border-color: #bfe6cd; background: #fff; }
.lt-sign.is-done .lt-sign__empty { display: none; }
.lt-sign.is-done .lt-sign__img { display: block; max-height: 90px; max-width: 100%; }
.lt-sign.is-done .lt-sign__ok { display: block; font-size: 13px; color: #0f7a3a; }

/* Barra de acciones fija */
.lt-actionbar {
  position: fixed;
  z-index: 1025;
  left: 0; right: 0;
  bottom: calc(var(--lt-tabbar-h) + var(--lt-safe-bottom));
  display: flex; /* guias.js lo muestra/oculta con style.display */
  gap: 10px;
  padding: 12px 16px calc(12px) !important;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--lt-border);
}
.lt-app:has(.lt-detalle) .lt-actionbar { bottom: 0; padding-bottom: calc(12px + var(--lt-safe-bottom)) !important; }
.lt-actionbar[style*="block"] { display: flex !important; }
.lt-actionbar .lt-btn { flex: 1; }
.lt-actionbar__cancel { flex: 0 0 34% !important; }
@media (min-width: 768px) { .lt-actionbar { left: 50%; right: auto; width: 680px; transform: translateX(-50%); border-radius: 20px 20px 0 0; } }

.lt-hint { font-size: 14px; color: var(--lt-muted); text-align: center; margin: 4px 0 12px; }

/* Pantalla de éxito tras guardar */
.lt-done { text-align: center; padding: 40px 24px; }
.lt-done__icon {
  width: 96px; height: 96px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--lt-ok);
  color: #fff;
  font-size: 40px;
  box-shadow: 0 0 0 10px #e8f7ee;
  animation: lt-pop .35s ease-out;
}
@keyframes lt-pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: none; opacity: 1; } }
.lt-done__title { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.lt-done__text { color: var(--lt-muted); margin: 0 0 24px; }
.lt-done .lt-btn { max-width: 320px; margin: 0 auto; }

/* Capa de carga (reemplaza el GIF externo) */
.lt-loading {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
  place-items: center;
  background: rgba(242, 243, 245, .92);
}
.lt-loading[style*="block"] { display: grid !important; }
.lt-loading__box { text-align: center; }
.lt-loading__spinner {
  display: inline-block;
  width: 44px; height: 44px;
  border: 4px solid #e3e5e9;
  border-top-color: var(--lt-red);
  border-radius: 50%;
  animation: lt-spin .8s linear infinite;
}
.lt-loading__text { margin: 14px 0 0; font-weight: 800; color: var(--lt-ink-2); }

/* ---------- SweetAlert2 con estilo de la app ---------- */
.swal2-popup { border-radius: 24px !important; font-family: var(--lt-font) !important; padding: 1.4em 1.2em 1.2em !important; }
.swal2-title { font-size: 1.25em !important; color: var(--lt-ink) !important; }
.swal2-html-container { color: var(--lt-muted) !important; font-size: 1em !important; }
.swal2-actions { width: 100%; gap: 8px; flex-wrap: nowrap !important; }
.swal2-styled { flex: 1; margin: 0 !important; border-radius: 14px !important; min-height: 50px; font-weight: 800 !important; font-size: 15px !important; box-shadow: none !important; }
.swal2-styled.swal2-confirm { background-color: var(--lt-red) !important; }
.swal2-styled.swal2-cancel { background-color: #eef0f2 !important; color: var(--lt-ink) !important; }

/* Ajustes finales Fase 2 */
.lt-app input:focus-visible, .lt-app textarea:focus-visible, .lt-app select:focus-visible { outline: none; }
.lt-guias:has(#mensaje[style*="block"]) { padding-bottom: 210px; }
.lt-guias:has(.lt-empty) .lt-page-hint { display: none; }

/* ==========================================================================
   FASE 3 · Inspección preoperacional
   ========================================================================== */
.lt-insp { max-width: 680px; margin: 0 auto; padding-top: 12px !important; padding-bottom: 20px; }
.lt-app:has(.lt-insp) { padding-bottom: calc(var(--lt-tabbar-h) + var(--lt-safe-bottom) + 90px); }
.lt-app #result > .alert {
  position: fixed; z-index: 1060;
  top: calc(var(--lt-appbar-h) + var(--lt-safe-top) + 8px);
  left: 12px; right: 12px; max-width: 520px; margin: 0 auto;
  border: 0; border-radius: 14px; padding: 14px 16px;
  font-weight: 700; font-size: 14.5px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .22);
  animation: lt-toast-in .22s ease-out;
}
.lt-app #result > .alert-danger { background: #b3040f; color: #fff; }
.lt-app #result > .alert-success { background: #0f7a3a; color: #fff; }
.lt-hidden-input { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.lt-hidden-field, .lt-src-table { display: none !important; }

/* Indicador de pasos */
.lt-steps { display: flex; align-items: center; gap: 6px; margin: 2px 2px 14px; }
.lt-steps__item { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: #9aa0a8; white-space: nowrap; }
.lt-steps__item span {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: #e4e6ea; color: var(--lt-muted); font-size: 12.5px;
}
.lt-steps__item.is-active { color: var(--lt-ink); }
.lt-steps__item.is-active span { background: var(--lt-red); color: #fff; }
.lt-steps__item.is-done span { background: var(--lt-ok); color: #fff; }
.lt-steps__item.is-done span { font-size: 0; }
.lt-steps__item.is-done span::before { content: "\f00c"; font-family: "Font Awesome 5 Free"; font-weight: 900; font-size: 11px; }
.lt-steps__bar { flex: 1; height: 2px; background: #e4e6ea; border-radius: 2px; min-width: 10px; }

/* Formulario del paso 1 */
.lt-chips--wrap { flex-wrap: wrap; }
.lt-chips--wrap .lt-chip-opt { flex: 1 1 auto; padding: 0 12px; height: 46px; }
.lt-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.lt-fg { min-width: 0; }
.lt-fg--full { grid-column: 1 / -1; }
.lt-form-grid .lt-label { margin-top: 12px; }
.lt-insp input[type="date"].lt-field-input { min-height: 50px; -webkit-appearance: none; appearance: none; }
@media (max-width: 400px) { .lt-form-grid { grid-template-columns: 1fr; } }

/* Estado de documentos */
.lt-doc__st { display: block; min-height: 0; margin: 5px 2px 0; font-size: 12.5px; font-weight: 700; }
.lt-doc__st:empty { display: none; }
.is-ok > .lt-doc__st, .lt-item.is-ok .lt-doc__st { color: #0f7a3a; }
.is-warn > .lt-doc__st { color: #8a5a00; }
.is-bad > .lt-doc__st { color: var(--lt-red-700); }
.lt-doc.is-warn input { border-color: #f5c04a !important; background: #fffaf0 !important; }
.lt-doc.is-bad input, .lt-item--input.is-bad input { border-color: var(--lt-red) !important; background: var(--lt-red-50) !important; }
.lt-item--input.is-warn input { border-color: #f5c04a !important; }
.lt-item--input.is-warn .lt-doc__st { color: #8a5a00; }
.lt-item--input.is-bad .lt-doc__st { color: var(--lt-red-700); }
.lt-docs-alert { border-radius: 14px; background: #fff7e0; padding: 12px 14px; margin-bottom: 4px; }
.lt-docs-alert p { margin: 0 0 4px; font-size: 14px; }
.lt-docs-alert__bad { color: var(--lt-red-700); }
.lt-docs-alert__warn { color: #7a4f00; }
.lt-docs-alert small { color: var(--lt-muted); font-weight: 600; }

/* Barra fija de acciones de la inspección (encima de la barra de pestañas) */
.lt-actionbar--insp { display: flex !important; }
.lt-actionbar--insp .lt-btn { flex: 1; }

/* Progreso del checklist */
.lt-progress {
  position: sticky;
  top: calc(var(--lt-appbar-h) + var(--lt-safe-top) + 6px);
  z-index: 5;
  background: var(--lt-surface);
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(16, 24, 40, .10);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.lt-progress__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 14.5px; }
.lt-progress__nc { font-size: 12.5px; font-weight: 800; color: var(--lt-red-700); background: var(--lt-red-50); padding: 2px 10px; border-radius: 999px; }
.lt-progress__nc[hidden] { display: none; }
.lt-progress__bar { height: 8px; border-radius: 8px; background: #eceef1; overflow: hidden; }
.lt-progress__bar span { display: block; height: 100%; width: 0; background: var(--lt-red); border-radius: 8px; transition: width .25s ease; }
.lt-progress.is-complete .lt-progress__bar span { background: var(--lt-ok); }

/* Secciones e ítems */
.lt-sec { background: var(--lt-surface); border-radius: 22px; box-shadow: var(--lt-shadow); padding: 14px; margin-bottom: 12px; }
.lt-sec[hidden] { display: none; }
.lt-sec__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.lt-sec__icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: #eef0f2; color: var(--lt-ink-2); font-size: 15px; flex: 0 0 36px; }
.lt-sec.is-complete .lt-sec__icon { background: #e8f7ee; color: var(--lt-ok); }
.lt-sec.has-no .lt-sec__icon { background: var(--lt-red-50); color: var(--lt-red); }
.lt-sec__title { flex: 1; font-size: 16px; font-weight: 800; margin: 0; color: var(--lt-ink); }
.lt-sec__count { font-size: 12.5px; font-weight: 800; color: var(--lt-muted); background: #eef0f2; padding: 2px 9px; border-radius: 999px; }
.lt-sec.is-complete .lt-sec__count { background: #e8f7ee; color: #0f7a3a; }
.lt-sec__all {
  display: block; width: 100%; margin-top: 4px; height: 42px;
  border: 0; border-radius: 12px; background: transparent;
  color: #0f7a3a; font-weight: 800; font-size: 14px;
}
.lt-sec.is-complete .lt-sec__all { display: none; }

.lt-item { padding: 12px; border-radius: 14px; border: 2px solid transparent; background: #f8f9fa; margin-bottom: 8px; transition: border-color .15s, background .15s; }
.lt-item__txt { display: block; margin: 0 0 10px; font-size: 14.5px; font-weight: 700; color: var(--lt-ink); line-height: 1.35; }
.lt-item__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lt-yn {
  height: 44px; border-radius: 12px; border: 2px solid var(--lt-border); background: #fff;
  font-weight: 800; font-size: 14px; color: var(--lt-ink-2);
}
.lt-yn:active { transform: scale(.97); }
.lt-yn--ok.is-active { border-color: var(--lt-ok); background: var(--lt-ok); color: #fff; }
.lt-yn--no.is-active { border-color: var(--lt-red); background: var(--lt-red); color: #fff; }
.lt-item.is-ok { background: #f3fbf6; }
.lt-item.is-no { background: var(--lt-red-50); border-color: var(--lt-red); }
.lt-item.is-no .lt-item__txt { color: var(--lt-red-700); }
.lt-item.is-pending { border-color: #f5c04a; background: #fff7e0; animation: lt-shake .4s ease; }
@keyframes lt-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.lt-item--input .lt-item__txt { margin-bottom: 8px; }
.lt-item--input input { background: #fff !important; }

/* Paso 3 */
.lt-step--warn { border: 2px solid var(--lt-red); }
.lt-step--warn .lt-step__title { color: var(--lt-red-700); }
.lt-nc-list { margin: 0 0 6px; padding-left: 20px; font-size: 14px; color: var(--lt-ink-2); }
.lt-nc-list li { margin-bottom: 4px; }
.lt-hint--left { text-align: left; margin: 6px 0 0; }
.lt-declara { font-size: 13.5px; color: var(--lt-ink-2); line-height: 1.45; margin: 0 0 12px; }

/* Botón con spinner (firma) */
.lt-btn.is-loading .lt-btn__label { display: none; }

/* ==========================================================================
   Funciones de app nativa
   ========================================================================== */
.lt-float {
  position: fixed;
  z-index: 1070;
  left: 12px; right: 12px;
  bottom: calc(var(--lt-tabbar-h) + var(--lt-safe-bottom) + 12px);
  max-width: 520px;
  margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 14px;
  border-radius: 18px;
  background: #1c1f24;
  color: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .3);
  transform: translateY(20px); opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}
.lt-float.is-in { transform: none; opacity: 1; }
.lt-float__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--lt-red); flex: 0 0 40px; font-size: 17px; }
.lt-float--update .lt-float__icon { background: #2563eb; }
.lt-float__body { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; }
.lt-float__body strong { font-size: 15px; margin-bottom: 1px; }
.lt-float__body span { opacity: .8; }
.lt-float__actions { display: flex; align-items: center; gap: 4px; }
.lt-float__btn { height: 38px; padding: 0 14px; border: 0; border-radius: 11px; background: #fff; color: #1c1f24; font-weight: 800; font-size: 14px; }
.lt-float__x { width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: rgba(255, 255, 255, .7); }
.lt-app:has(.lt-detalle) .lt-float { bottom: calc(96px + var(--lt-safe-bottom)); }

/* Deslizar para actualizar */
.lt-ptr {
  position: fixed;
  z-index: 1029;
  left: 50%;
  top: calc(var(--lt-appbar-h) + var(--lt-safe-top) - 34px);
  width: 38px; height: 38px;
  margin-left: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--lt-red);
  box-shadow: 0 4px 14px rgba(16, 24, 40, .18);
  transform: translate(-50%, 0);
  opacity: 0;
  transition: opacity .15s;
  pointer-events: none;
}
.lt-ptr.is-loading { transform: translate(-50%, 60px) !important; opacity: 1 !important; }
.lt-ptr__spin { width: 20px; height: 20px; border: 3px solid #f3c2c5; border-top-color: var(--lt-red); border-radius: 50%; animation: lt-spin .7s linear infinite; }

/* La inspección es un flujo guiado: se oculta la barra de pestañas (como en la entrega) */
.lt-app:has(.lt-insp) .lt-tabbar { display: none; }
.lt-app:has(.lt-insp) { padding-bottom: calc(96px + var(--lt-safe-bottom)); }
.lt-app:has(.lt-insp) .lt-actionbar { bottom: 0; padding-bottom: calc(12px + var(--lt-safe-bottom)) !important; }
/* El botón central de la barra sobresale: el botón fijo "Iniciar ruta" queda por encima */
.lt-sticky-action { bottom: calc(var(--lt-tabbar-h) + var(--lt-safe-bottom) + 30px); }
.lt-guias { padding-bottom: 120px; }
.lt-float { bottom: calc(var(--lt-tabbar-h) + var(--lt-safe-bottom) + 30px); }
.lt-app:has(.lt-insp) .lt-float { bottom: calc(96px + var(--lt-safe-bottom)); }
.lt-sticky-action .lt-btn[disabled] { opacity: 1; }

/* ==========================================================================
   FASE FINAL · Asignar con QR
   ========================================================================== */
.lt-asignar { max-width: 560px; margin: 0 auto; padding-top: 16px !important; }
.lt-scan-hero {
  text-align: center;
  padding: 28px 20px 22px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(150deg, var(--lt-red) 0%, var(--lt-red-700) 100%);
  box-shadow: 0 12px 28px rgba(159, 4, 13, .28);
  margin-bottom: 14px;
}
.lt-scan-hero__icon {
  width: 84px; height: 84px; margin: 0 auto 14px;
  border-radius: 26px; background: rgba(255, 255, 255, .16);
  display: grid; place-items: center; font-size: 40px;
}
.lt-scan-hero__title { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.lt-scan-hero__text { font-size: 14.5px; opacity: .9; margin: 0 auto 18px; max-width: 300px; }
.lt-scan-hero__btn { background: #fff !important; color: var(--lt-red) !important; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.lt-manual__row { display: flex; gap: 8px; }
.lt-manual__row input { flex: 1; min-width: 0; }
.lt-manual__btn { width: auto !important; flex: 0 0 auto; padding: 0 16px; height: 50px; box-shadow: none; }

/* Lector a pantalla completa */
.modal.lt-scanner { padding: 0 !important; }
.modal.lt-scanner .modal-dialog { margin: 0; max-width: none; width: 100%; height: 100%; transform: none !important; }
.modal.lt-scanner .modal-content {
  height: 100%; border: 0; border-radius: 0;
  background: #0d0f12; color: #fff;
  display: flex; flex-direction: column;
}
.lt-scanner__top {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--lt-safe-top)) 10px 10px;
}
.lt-scanner__title { font-weight: 800; font-size: 17px; }
.lt-scanner__btn {
  width: 44px; height: 44px; border: 0; border-radius: 14px;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 18px;
}
.lt-scanner__btn[hidden] { visibility: hidden; display: block; }
.lt-scanner__btn.is-on { background: #ffd24d; color: #1c1f24; }
.lt-scanner #form_leer { flex: 1; display: flex; min-height: 0; }
.lt-scanner__view { position: relative; flex: 1; overflow: hidden; display: grid; place-items: center; }
.lt-scanner #reader { width: 100%; height: 100%; border: 0 !important; }
.lt-scanner #reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
.lt-scanner #reader > div:not(:first-child), .lt-scanner #qr-shaded-region { border-color: transparent !important; }
.lt-scanner__frame {
  position: absolute; top: 50%; left: 50%;
  width: min(260px, 68vw); height: min(260px, 68vw);
  transform: translate(-50%, -50%);
  border-radius: 24px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45);
  pointer-events: none;
}
.lt-scanner__frame::before, .lt-scanner__frame::after, .lt-scanner__frame span::before, .lt-scanner__frame span::after {
  content: ""; position: absolute; width: 40px; height: 40px; border: 4px solid #fff;
}
.lt-scanner__frame::before { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 22px 0 0 0; }
.lt-scanner__frame::after { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 22px 0 0; }
.lt-scanner__frame span::before { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 22px; }
.lt-scanner__frame span::after { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 22px 0; }
.lt-scanner__frame span {
  position: absolute; inset: 0;
}
.lt-scanner__frame span { background: linear-gradient(var(--lt-red), var(--lt-red)) no-repeat 50% 0 / 80% 2px; animation: lt-scanline 2s ease-in-out infinite; }
@keyframes lt-scanline { 0%, 100% { background-position: 50% 12%; } 50% { background-position: 50% 88%; } }
.lt-scanner__msg {
  position: absolute; left: 24px; right: 24px; bottom: 24px; margin: 0;
  text-align: center; font-weight: 700; font-size: 14px;
  background: rgba(0, 0, 0, .55); padding: 10px 14px; border-radius: 12px;
}
.lt-scanner__msg[hidden] { display: none; }
.lt-scanner__bottom { padding: 16px 16px calc(16px + var(--lt-safe-bottom)); text-align: center; }
.lt-scanner__bottom p { margin: 0 0 12px; font-size: 14px; opacity: .8; }
.lt-scanner__bottom .lt-btn--ghost { background: rgba(255, 255, 255, .12) !important; color: #fff !important; }

/* Hoja de confirmación con datos de solo lectura */
.lt-sheet--form .modal-content { text-align: left; max-height: 92vh; overflow-y: auto; }
.lt-sheet--form .lt-sheet__title { text-align: center; margin-bottom: 14px; }
.lt-readonly-card {
  display: flex; flex-wrap: wrap; gap: 10px 12px;
  padding: 14px; border-radius: 16px; background: #f5f6f8; margin-bottom: 4px;
}
.lt-ro { flex: 1 1 100%; min-width: 0; }
.lt-ro--half { flex: 1 1 40%; }
.lt-ro label { display: block; margin: 0; font-size: 11.5px; font-weight: 800; color: var(--lt-muted); text-transform: uppercase; letter-spacing: .4px; }
.lt-ro__input {
  width: 100%; border: 0; background: transparent; padding: 0; margin: 0;
  font-size: 15px !important; font-weight: 700; color: var(--lt-ink); outline: none;
  text-overflow: ellipsis;
}
.lt-ro__input--big { font-size: 17px !important; font-weight: 800; }
.lt-sheet--form .lt-label i { color: var(--lt-muted); margin-right: 4px; }

/* ==========================================================================
   Ajustes para pantallas angostas (360 px y 320 px)
   ========================================================================== */
@media (max-width: 380px) {
  .lt-tab span { font-size: 10px; }
  .lt-tab--fab .lt-tab__fab { width: 50px; height: 50px; }
  .lt-hero__name { font-size: 21px; }
  .lt-gcard__client { font-size: 16px; }
  .lt-gcard__nav { padding: 0 10px; }
  .lt-estado { min-height: 72px; font-size: 12.5px; }
  .lt-steps__item { font-size: 12px; gap: 4px; }
  .lt-yn { font-size: 13px; }
}
@media (max-width: 380px) {
  .lt-tab__label-long { display: none; }
  .lt-tab__label-short { display: inline !important; }
}
@media (max-width: 340px) {
  .lt-steps__item { font-size: 0; }
  .lt-steps__item span { font-size: 12.5px; }
  .lt-steps__item.is-active { font-size: 12px; }
  .lt-grid { grid-template-columns: 1fr 1fr; }
  .lt-gcard__nav span { display: none; }
  .lt-dcard__actions .lt-btn--sm { padding: 0 12px; }
  .lt-chips .lt-chip-opt { font-size: 13px; }
  .lt-login__brand { font-size: 26px; }
  .lt-form-grid { grid-template-columns: 1fr; }
}
.lt-tab__label-short { display: none; }

/* Ajustes lector / hoja de confirmación */
.modal.lt-scanner .modal-content { position: fixed; inset: 0; overflow: hidden; }
.lt-scanner__view { min-height: 0; }
.lt-scanner #reader { position: absolute !important; inset: 0; }
.lt-scanner #qr-shaded-region { display: none !important; }
.modal.lt-sheet.lt-sheet--form .modal-content { text-align: left; }
.lt-sheet--form .lt-form-grid { grid-template-columns: 1fr 1fr; }
/* Evita el color azul de "hover" de la plantilla en la barra de pestañas (queda pegado tras un toque) */
.lt-tab:hover, .lt-tab:focus { color: #8a9099; }
.lt-tab.active:hover, .lt-tab.active:focus, .lt-tab--fab.active:hover { color: var(--lt-red); }
.lt-tab--fab:hover { color: var(--lt-ink-2); }

/* ==========================================================================
   [Recogidas] Servicio de recogidas y entrega en plataforma
   ========================================================================== */
.lt-tag--violet { background: #efe9fd; color: #5b21b6; }
.lt-tag--teal   { background: #e0f5f3; color: #0f766e; }
.lt-tag i { font-size: 10.5px; margin-right: 2px; }
.lt-gcard--violet::before { background: #7c3aed; }
.lt-gcard--teal::before   { background: #0d9488; }
.lt-gcard__tags { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lt-dcard--violet .lt-dcard__row i { color: #7c3aed; }
.lt-dcard--teal .lt-dcard__label { color: #0f766e; }
.lt-dcard__label .lt-tag { text-transform: none; letter-spacing: 0; }
.lt-plat-intro { margin: 0; font-size: 14px; color: var(--lt-ink-2); line-height: 1.45; }

/* Aviso "Entregar en plataforma" en Mis guías */
.lt-plat-banner {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 12px; padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  color: #fff !important; text-decoration: none !important;
  box-shadow: 0 6px 18px rgba(13, 148, 136, .28);
}
.lt-plat-banner:active { transform: scale(.99); }
.lt-plat-banner__icon { flex: 0 0 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 18px; }
.lt-plat-banner__body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.lt-plat-banner__body strong { font-size: 15.5px; font-weight: 800; }
.lt-plat-banner__body span { font-size: 13px; opacity: .92; }

/* Resultado con 2 opciones */
.lt-estados--2 { grid-template-columns: 1fr 1fr; }

/* Selector de cajas */
.lt-stepper { display: flex; align-items: stretch; gap: 10px; }
.lt-stepper__btn {
  flex: 0 0 56px; height: 56px;
  border: 2px solid var(--lt-border); border-radius: 14px;
  background: #fafafa; color: var(--lt-ink-2); font-size: 18px;
}
.lt-stepper__btn:active { transform: scale(.95); background: #f0f1f3; }
.lt-stepper__input {
  flex: 1; min-width: 0; height: 56px; text-align: center;
  border: 1.5px solid var(--lt-border); border-radius: 14px; background: #f8f9fa;
  font-size: 24px; font-weight: 800; color: var(--lt-ink);
}
.lt-stepper__input:focus { outline: none; border-color: #7c3aed; background: #fff; }
.lt-cajas-nota { margin: 10px 2px 0; font-size: 13.5px; font-weight: 600; color: var(--lt-muted); }
.lt-cajas-nota:empty { display: none; }
.lt-cajas-nota.is-warn { color: #8a5a00; background: #fff4db; border-radius: 10px; padding: 8px 10px; }
#rec-foto1 .lt-photo__ph i { color: #7c3aed; }
.lt-rec .lt-chip-opt.is-active { border-color: #7c3aed; background: #efe9fd; color: #5b21b6; }
.lt-rec .lt-field-input:focus { border-color: #7c3aed !important; background: #fff !important; }

/* Motivos de no recogida */
.lt-radios { display: grid; gap: 8px; }
.lt-radio { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; border: 2px solid var(--lt-border); border-radius: 14px; background: #fafafa; font-weight: 700; font-size: 14.5px; color: var(--lt-ink-2); cursor: pointer; }
.lt-radio input { width: 20px; height: 20px; accent-color: var(--lt-red); flex: 0 0 auto; }
.lt-radio:has(input:checked) { border-color: var(--lt-red); background: var(--lt-red-50); color: var(--lt-red-700); }

/* Datos solicitados */
.lt-kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--lt-border); font-size: 14.5px; }
.lt-kv:last-child { border-bottom: 0; }
.lt-kv span { color: var(--lt-muted); font-weight: 600; }
.lt-kv strong { color: var(--lt-ink); font-weight: 800; text-align: right; word-break: break-word; }

/* Lista de guías para plataforma */
.lt-plat-grupo { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--lt-muted); margin: 6px 4px 10px; }
.lt-plat-grupo span { background: #e6e8eb; color: var(--lt-ink-2); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.lt-plat-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--lt-surface); border-radius: 18px; box-shadow: var(--lt-shadow);
  padding: 14px; margin-bottom: 10px; border: 2px solid transparent; transition: opacity .15s;
}
.lt-plat-item:has(input[data-plat-check]:checked) { border-color: #99dcd5; }
.lt-plat-item.is-off { opacity: .55; }
.lt-plat-item__check { margin: 2px 0 0; flex: 0 0 auto; }
.lt-plat-item__check input { width: 24px; height: 24px; accent-color: #0d9488; }
.lt-plat-item__body { flex: 1; min-width: 0; }
.lt-plat-item__top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 2px; font-size: 14px; }
.lt-plat-item__client { font-size: 15.5px; font-weight: 800; color: var(--lt-ink); line-height: 1.25; word-break: break-word; }
.lt-plat-item__meta { font-size: 12.5px; color: var(--lt-muted); font-weight: 600; margin-top: 2px; }
.lt-plat-item__warn { margin: 6px 0 0; font-size: 12.5px; font-weight: 700; color: #8a5a00; }
.lt-plat-item__cajas { flex: 0 0 76px; text-align: center; }
.lt-plat-item__cajas label { display: block; font-size: 11.5px; font-weight: 800; color: var(--lt-muted); margin: 0 0 4px; text-transform: uppercase; }
.lt-plat-item__cajas input { width: 100%; height: 48px; text-align: center; border: 1.5px solid var(--lt-border); border-radius: 12px; background: #f8f9fa; font-size: 20px; font-weight: 800; }
.lt-plat-item__cajas input:focus { outline: none; border-color: #0d9488; background: #fff; }
.lt-plat-item.is-off .lt-plat-item__cajas input { pointer-events: none; }

/* Pantalla final con varias acciones */
.lt-done__actions { display: grid; gap: 10px; max-width: 320px; margin: 0 auto; }
.lt-done__actions .lt-btn { width: 100%; }
.lt-btn.is-disabled { pointer-events: none; opacity: .6; }
@media (max-width: 340px) {
  .lt-plat-item__cajas { flex-basis: 64px; }
  .lt-stepper__btn { flex-basis: 48px; }
}
