/* ============================================================
   Prana App — Operaciones Logísticas
   Mobile-first (390px) · vanilla CSS
   ============================================================ */

:root {
  --turquoise: #509D97;
  --turquoise-dark: #3c7a75;
  --turquoise-deep: #2c5d59;
  --turquoise-soft: #e9f4f2;   /* fondo suave */
  --turquoise-soft2: #d6ebe8;  /* borde suave */
  --ink: #1c2b2a;
  --muted: #5c716f;
  --line: #e6edec;
  --white: #ffffff;
  --bg: #f4f8f7;

  /* paleta secundaria para diferenciar (inventario) */
  --orange: #E0892C;
  --orange-dark: #b96d18;
  --orange-soft: #fbe6d4;
  --gray: #7c8794;
  --gray-dark: #5a6470;
  --gray-soft: #eceef1;

  --ok: #1b7a47;
  --ok-bg: #e3f6ec;
  --warn: #9a6410;
  --warn-bg: #fdf0db;
  --info: #1f6aa5;
  --info-bg: #e3f0fb;
  --idle: #5d6b7e;
  --idle-bg: #eef1f5;

  /* Sistema de espaciado (spec 2026-08-12-sistema-espaciado-movil-design.md).
     Todo bloque de primer nivel dentro de una .view usa --gutter como inset
     lateral: así el título del hero y el borde de las tarjetas caen en la misma
     línea vertical. --stack separa bloques hermanos; --stack-lg separa
     secciones (después del hero, antes de un título de sección). */
  --gutter: 18px;
  --stack: 16px;
  --stack-lg: 26px;

  --radius: 18px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(44, 93, 89, .07);
  --shadow-md: 0 8px 24px rgba(44, 93, 89, .12);
  --shadow-lg: 0 18px 44px rgba(44, 93, 89, .18);

  --tabbar-h: 68px;
  --appbar-h: 60px;
  --sidebar-w: 244px;

  /* Liquid glass */
  --glass-bg: rgba(255,255,255,.68);
  --glass-bg-strong: rgba(255,255,255,.84);
  --glass-border: rgba(255,255,255,.78);
  --glass-blur: 20px;
  --glass-sheen: inset 0 1px 0 rgba(255,255,255,.65), inset 0 -1px 0 rgba(255,255,255,.18);
  --glass-shadow: 0 10px 34px rgba(44,93,89,.14);
  --ease-soft: cubic-bezier(.4,0,.2,1);
  --ease-spring: cubic-bezier(.34,1.3,.5,1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: #eef6f4;
}

/* Fondo de pantalla completa (idea Safari): una capa fija que sobresale del
   viewport por los 4 lados, con el mismo degradado de la app. Al scrollear,
   al aparecer/ocultarse la barra de Safari o al rebotar, lo que asoma por
   arriba/abajo es SIEMPRE este fondo nítido — nunca un hueco cortado.
   (background-attachment: fixed no funciona en iOS; esta capa sí.) */
body::before {
  content: "";
  position: fixed;
  left: 0; right: 0;
  top: -120px; bottom: -120px;
  z-index: -1;
  background: linear-gradient(165deg, #eef6f4 0%, #e3f0ed 45%, #edf4f2 100%);
  pointer-events: none;
}

html { height: 100%; }
body {
  /* La página NUNCA scrollea: el único scroll vive dentro de .content.
     body mide exactamente el viewport dinámico (100dvh sigue a la barra de
     Safari al aparecer/ocultarse); antes body era 100vh y .device 100dvh,
     y esa diferencia dejaba a la página entera scrolleable — se cortaba
     el appbar o la tabbar según dónde quedara el scroll. */
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; }

/* ---------- Marco de dispositivo ---------- */
.device {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: 100%; /* llena el body, que ya mide 100dvh (única fuente de verdad del alto) */
  background: linear-gradient(165deg, #eef6f4 0%, #e3f0ed 45%, #edf4f2 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ---------- Fondo: blobs de color desenfocados ---------- */
.bg-blobs {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(54px);
  opacity: .55;
  will-change: transform;
}
.blob--1 {
  width: 320px; height: 320px; top: -90px; left: -80px;
  background: radial-gradient(circle at 30% 30%, #6fc3bb, #3c7a75);
  animation: blob-float-1 18s var(--ease-soft) infinite;
}
.blob--2 {
  width: 300px; height: 300px; top: 8%; right: -110px;
  background: radial-gradient(circle at 50% 50%, #8fd4cf, #50a097);
  opacity: .5;
  animation: blob-float-2 22s var(--ease-soft) infinite;
}
.blob--3 {
  width: 360px; height: 360px; bottom: -120px; left: -60px;
  background: radial-gradient(circle at 50% 50%, #aee3dd, #6bbdb5);
  opacity: .45;
  animation: blob-float-3 26s var(--ease-soft) infinite;
}
.blob--4 {
  width: 240px; height: 240px; bottom: 6%; right: -70px;
  background: radial-gradient(circle at 50% 50%, #d8ad6a, #c2913e);
  opacity: .26;
  animation: blob-float-2 20s var(--ease-soft) infinite reverse;
}
@keyframes blob-float-1 {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(40px, 50px) scale(1.12); }
}
@keyframes blob-float-2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-44px, 40px) scale(1.1); }
}
@keyframes blob-float-3 {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(36px, -40px) scale(1.14); }
}

/* ---------- Superficie de cristal reutilizable ---------- */
.glass-card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-sheen);
}

/* ===================== LOGIN ===================== */
.screen { position: absolute; inset: 0; display: none; }
.screen.is-active { display: block; }

.screen--login { z-index: 30; background: transparent; }
.screen--login.is-active { animation: screen-fade .6s var(--ease-soft) both; }

.login__content {
  position: relative;
  z-index: 2;
  height: 100%;
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
  padding: 24px 26px calc(26px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  /* Solo scroll vertical. Al declarar overflow-y, el eje X pasa de 'visible' a
     'auto' por spec, y en el teléfono el login se arrastraba de lado (se veía
     torcido). Con hidden queda clavado en su eje. */
  overflow-x: hidden;
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch;
  text-align: center;
}
/* Centrado cuando el contenido entra; scroll cuando no (p. ej. con el acceso
   rápido de desarrollo visible) — así nunca se recorta el panel de abajo. */
.login__brand { margin-top: auto; }
.login__foot { margin-bottom: auto; }

.login__brand { animation: rise-blur .7s var(--ease-soft) both; }
.login__logo-card {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  margin: 0 auto 24px;
  box-shadow: var(--glass-shadow), var(--glass-sheen);
  width: fit-content;
  animation: pop-in .8s var(--ease-spring) both;
}
.login__logo { width: 168px; max-width: 54vw; height: auto; }

/* ===== Logo animado PRANA (intro + shimmer continuo) ===== */
.prana-logo { display: flex; flex-direction: column; align-items: center; gap: 11px; }
/* El JPEG trae wordmark + subtítulo; recortamos a solo "PRANA" (≈78% superior). */
.prana-logo__mark {
  position: relative;
  width: 208px; max-width: 60vw;
  aspect-ratio: 1600 / 383;     /* recorta el subtítulo del raster */
  overflow: hidden;
}
.prana-logo__img { width: 100%; height: auto; display: block; }
/* Brillo que recorre las letras: 'overlay' resalta solo el turquesa, no el fondo blanco. */
.prana-logo__shimmer {
  position: absolute; inset: -2px 0;
  pointer-events: none; opacity: 0;
  background: linear-gradient(105deg,
    transparent 38%, rgba(255,255,255,.92) 50%, transparent 62%);
  mix-blend-mode: overlay;
  will-change: transform;   /* posición controlada por GSAP (xPercent) */
}
/* Subtítulo como texto real → permite animar el letter-spacing. */
.prana-logo__sub {
  margin: 0; color: var(--turquoise-dark);
  font-size: 12.5px; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; white-space: nowrap;
}

/* Variante de cabecera (arriba a la izquierda): solo el wordmark, compacto. */
.prana-logo--bar { display: inline-flex; align-items: center; }
.prana-logo--bar .prana-logo__mark { width: auto; height: 26px; max-width: none; }

/* Variante de sidebar (escritorio): wordmark + subtítulo, como el login pero compacto.
   (.prana-logo--side gana en especificidad a la regla legada ".side-brand img".) */
.prana-logo--side .prana-logo__mark { width: 150px; max-width: 100%; }
.prana-logo--side .prana-logo__img { width: 100%; height: auto; border-radius: 0; }
.prana-logo--side .prana-logo__sub { font-size: 9.5px; letter-spacing: .16em; }

/* Sin GSAP / movimiento reducido: todo visible y quieto (sin shimmer). */
@media (prefers-reduced-motion: reduce) {
  .prana-logo__shimmer { display: none; }
}

.login__title {
  color: var(--turquoise-deep);
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -1px;
}
.login__subtitle {
  color: var(--turquoise-dark);
  margin: 0 0 26px;
  font-size: 14.5px;
  font-weight: 500;
}

.login__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  padding: 22px 20px;
  border-radius: var(--radius-lg);
  animation: rise-blur .7s var(--ease-soft) .12s both;
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { color: var(--turquoise-dark); font-size: 12.5px; font-weight: 700; padding-left: 4px; }
.field__input {
  height: 52px;
  border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,.6);
  background: rgba(255,255,255,.66);
  padding: 0 16px;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field__input:focus {
  border-color: var(--turquoise);
  background: rgba(255,255,255,.92);
  box-shadow: 0 0 0 4px rgba(80,157,151,.18);
}

/* Login: campos un poco más grandes (no afecta los inputs de las hojas/operador). */
.login__form { gap: 16px; padding: 26px 22px; }
.login__form .field__label { font-size: 13px; }
.login__form .field__input {
  height: 58px;
  border-radius: 16px;
  padding: 0 18px;
  font-size: 16px;
}

.login__foot {
  color: var(--turquoise-dark);
  font-size: 12px;
  margin-top: 24px;
  animation: rise .6s ease .4s both;
}

/* Cuando GSAP está disponible, coreografía la entrada por JS (mejora
   progresiva). Sin GSAP, las animaciones CSS de arriba siguen activas. */
.screen--login.gsap-ready,
.screen--login.gsap-ready.is-active { animation: none; }
.screen--login.gsap-ready .login__brand,
.screen--login.gsap-ready .login__logo-card,
.screen--login.gsap-ready .login__form,
.screen--login.gsap-ready .login__foot { animation: none; }
.screen--login.gsap-ready .login__logo-card,
.screen--login.gsap-ready .login__form .field { will-change: transform; }

/* ===================== BOTONES ===================== */
.btn {
  height: 52px;
  min-height: 48px;
  border-radius: 14px;
  font-size: 15.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.btn--block { width: 100%; }
.btn--primary {
  background: linear-gradient(135deg, var(--turquoise-dark) 0%, var(--turquoise-deep) 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(60,122,117,.34);
}
.screen--login .btn--primary { margin-top: 6px; }
.btn--primary:active { transform: scale(.97); }

.btn--glass {
  background: rgba(255,255,255,.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--turquoise-deep);
  border: 1.5px solid var(--glass-border);
  box-shadow: var(--glass-sheen);
}
.btn--glass:active { transform: scale(.97); background: rgba(255,255,255,.72); }

.btn--solid {
  background: var(--turquoise-dark);
  color: #fff;
  box-shadow: 0 8px 20px rgba(80,157,151,.32);
}
.btn--solid:active { transform: scale(.97); }

/* Alias usado en el markup del panel gerente (antes no existía → botón transparente). */
.btn--turq {
  background: var(--turquoise-dark);
  color: #fff;
  box-shadow: 0 8px 20px rgba(80,157,151,.32);
}
.btn--turq:active { transform: scale(.97); }

.btn--ghost {
  background: var(--turquoise-soft);
  color: var(--turquoise-dark);
}
.btn--ghost:active { transform: scale(.97); }

.btn--outline {
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1.6px solid rgba(255,255,255,.7);
}
.btn--outline:active { transform: scale(.97); background: rgba(255,255,255,.18); }

.login__roles { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }

/* ---- Acceso rápido de desarrollo ---- */
.quicklogin { margin-top: 20px; text-align: left; animation: rise-blur .7s var(--ease-soft) .22s both; }
.quicklogin__head { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 11px; }
.quicklogin__title { font-size: 11.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--turquoise-dark); }
.quicklogin__hint { font-size: 11px; font-weight: 600; color: var(--turquoise-dark); opacity: .6; margin-left: auto; }
.quicklogin__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qprofile {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; border-radius: 16px; text-align: left;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-sheen);
  transition: transform .14s ease, box-shadow .2s ease;
  opacity: 0; transform: translateY(10px); animation: card-in .5s ease forwards;
}
.qprofile:hover { box-shadow: var(--shadow-md), var(--glass-sheen); }
.qprofile:active { transform: scale(.97); }
.qprofile--full { grid-column: 1 / -1; }
.qprofile__av {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
  box-shadow: 0 4px 12px rgba(44,93,89,.22);
}
.qprofile__t { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.qprofile__name { font-size: 13px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qprofile__role { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===================== APP SHELL ===================== */
.app {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  background: transparent;
}
.app.is-active { display: flex; animation: screen-fade .5s var(--ease-soft) both; }

/* ---------- Appbar ---------- */
.appbar {
  height: var(--appbar-h);
  flex: none;
  background: rgba(255,255,255,.55);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  padding-top: env(safe-area-inset-top);
  z-index: 10;
}
.appbar__logo { height: 34px; width: auto; object-fit: contain; }
.appbar__title {
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  display: none;
}
.appbar__back {
  width: 38px; height: 38px;
  border-radius: 11px;
  color: var(--turquoise-dark);
  display: none;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.appbar__back:active { background: var(--turquoise-soft); }
.appbar.is-detail .appbar__back { display: flex; }
.appbar.is-detail .appbar__logo { display: none; }
.appbar.is-detail .appbar__title { display: block; }

.appbar__bell {
  width: 40px; height: 40px;
  margin-left: auto;
  color: var(--turquoise-dark);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: background .15s;
}
.appbar__bell:active { background: var(--turquoise-soft); }
.appbar__dot {
  position: absolute; top: 9px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef5d5d; border: 2px solid #fff;
}

/* ---------- Contenido ---------- */
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom));
}

.view { display: none; }
.view.is-active { display: block; animation: view-in .42s var(--ease-soft) both; }
.view--detail.is-active { animation: detail-in .42s var(--ease-soft) both; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(255,255,255,.22) 0%, transparent 45%),
    radial-gradient(130% 100% at 100% 120%, var(--turquoise-deep) 0%, transparent 55%),
    linear-gradient(150deg, var(--turquoise-dark) 0%, var(--turquoise-deep) 100%);
  color: #fff;
  padding: 20px var(--gutter) 24px;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 14px 34px rgba(44,93,89,.28);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; top: -40%; right: -20%;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
  pointer-events: none;
}
.hero::after { z-index: 0; }
.hero > * { position: relative; z-index: 1; }
.hero--sm { padding-bottom: 22px; }
.hero__hi { margin: 0; font-size: 14px; font-weight: 500; }
.hero__h { margin: 2px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -.5px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.stat {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  backdrop-filter: blur(2px);
}
.stat__num { display: block; font-size: 22px; font-weight: 800; line-height: 1; }
.stat__lbl { display: block; font-size: 11.5px; margin-top: 5px; }

/* ---------- Lista de cards ---------- */
.list { padding: var(--stack) var(--gutter) 0; display: flex; flex-direction: column; gap: 14px; }

.card {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--glass-shadow), var(--glass-sheen);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: transform .18s var(--ease-soft), box-shadow .25s ease;
  opacity: 0;
  transform: translateY(16px);
  animation: card-in .55s var(--ease-soft) forwards;
}
.card:active { transform: scale(.985); box-shadow: var(--shadow-md); }

.card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card__id { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .3px; }
.card__id strong { color: var(--ink); font-weight: 700; }

.badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok   { color: var(--ok);   background: var(--ok-bg); }
.badge--warn { color: var(--warn); background: var(--warn-bg); }
.badge--info { color: var(--info); background: var(--info-bg); }
.badge--idle { color: var(--idle); background: var(--idle-bg); }

.route {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 14px;
}
.route__pt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.route__city { font-size: 16px; font-weight: 700; color: var(--ink); }
.route__tag { font-size: 11px; color: var(--muted); }
.route__line {
  flex: 1;
  height: 2px;
  position: relative;
  background: repeating-linear-gradient(90deg, var(--turquoise-soft2) 0 6px, transparent 6px 12px);
}
.route__truck {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--turquoise-soft);
  color: var(--turquoise-dark);
  border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
}
.route__pt--end { text-align: right; align-items: flex-end; }

.card__foot {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.eta { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.eta strong { color: var(--ink); font-weight: 600; }
.card__cta { color: var(--turquoise-dark); display: flex; }

/* ---------- Texto de estado en card (picking) ---------- */
.cardprog { margin-top: 12px; }
.cardprog__txt { font-size: 11px; color: var(--muted); }

/* ===================== DETALLE ===================== */
.dhero {
  background: linear-gradient(160deg, var(--turquoise) 0%, var(--turquoise-dark) 100%);
  color: #fff;
  padding: 18px 20px 22px;
  border-radius: 0 0 26px 26px;
  box-shadow: var(--shadow-md);
}
.dhero__row { display: flex; justify-content: space-between; align-items: flex-start; }
.dhero__id { font-size: 13px; opacity: .9; font-weight: 600; }
.dhero__cities { font-size: 24px; font-weight: 800; margin-top: 4px; letter-spacing: -.4px; }
.dhero__badge {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px;
}
.dhero__meta { display: flex; gap: 18px; margin-top: 16px; }
.dmeta { }
.dmeta__l { font-size: 11px; opacity: .85; }
.dmeta__v { font-size: 14px; font-weight: 700; margin-top: 2px; }

.section { padding: 18px var(--gutter) 0; }
.section__title {
  font-size: 13px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px;
  margin: 0 0 12px; padding-left: 2px;
}

.panel {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow), var(--glass-sheen);
  padding: 16px;
}

/* ---------- Timeline ---------- */
.timeline { padding: 4px 0; }
.tl {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding-bottom: 22px;
  opacity: 0;
  transform: translateX(-8px);
}
.tl.reveal { animation: tl-in .45s ease forwards; }
.tl:last-child { padding-bottom: 0; }

.tl__marker { position: relative; display: flex; justify-content: center; }
.tl__dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--turquoise-soft);
  border: 2px solid var(--turquoise-soft2);
  color: var(--idle);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  transition: all .3s;
}
.tl__line {
  position: absolute; top: 34px; bottom: -22px; left: 50%;
  transform: translateX(-50%);
  width: 2.5px;
  background: var(--turquoise-soft2);
  z-index: 1;
}
.tl:last-child .tl__line { display: none; }

/* completado */
.tl--done .tl__dot {
  background: var(--turquoise);
  border-color: var(--turquoise);
  color: #fff;
}
.tl--done .tl__line { background: var(--turquoise); }

/* activo (actual) */
.tl--active .tl__dot {
  background: var(--turquoise-dark);
  border-color: var(--turquoise-dark);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(60,122,117,.5);
  animation: pulse 1.9s infinite;
}

.tl__body { padding-top: 4px; }
.tl__name { font-size: 15px; font-weight: 700; color: var(--ink); }
.tl--idle .tl__name { color: var(--muted); font-weight: 600; }
.tl__time { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tl__note {
  font-size: 12.5px; color: var(--turquoise-dark);
  background: var(--turquoise-soft);
  display: inline-block; margin-top: 7px;
  padding: 4px 9px; border-radius: 8px; font-weight: 600;
}

/* ---------- Tabla de contenido del trailer ---------- */
.cargo { display: flex; flex-direction: column; gap: 0; }
.cargo__head, .cargo__row {
  display: grid;
  grid-template-columns: 1fr 56px 64px;
  gap: 8px;
  align-items: center;
}
.cargo__head {
  font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--muted); font-weight: 700;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.cargo__row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.cargo__row:last-child { border-bottom: none; }
.cargo__name { font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 9px; }
.cargo__ico {
  width: 30px; height: 30px; flex: none;
  border-radius: 9px; background: var(--turquoise-soft);
  color: var(--turquoise-dark);
  display: flex; align-items: center; justify-content: center;
}
.cargo__qty, .cargo__wt { font-size: 13.5px; text-align: right; color: var(--muted); font-weight: 600; }
.cargo__wt { color: var(--ink); }
.cargo__total {
  display: flex; justify-content: space-between;
  margin-top: 12px; padding-top: 12px;
  border-top: 1.5px dashed var(--turquoise-soft2);
  font-size: 14px;
}
.cargo__total strong { color: var(--turquoise-dark); }

/* ---------- Bodega ---------- */
.warehouse { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wh {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--turquoise-soft);
}
.wh__l { font-size: 11.5px; color: var(--turquoise-dark); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.wh__date { font-size: 15px; font-weight: 800; color: var(--ink); margin-top: 8px; }
.wh__time { font-size: 12px; color: var(--muted); margin-top: 2px; }
.wh--out { background: #fff; }
.wh--out .wh__l { color: var(--muted); }

.detail-actions { padding: 18px var(--gutter) 8px; display: flex; gap: 10px; }

/* ===================== PERFIL ===================== */
.profile { padding: 26px 20px; text-align: center; }
.profile__avatar {
  width: 84px; height: 84px; border-radius: 50%;
  margin: 8px auto 14px;
  background: linear-gradient(160deg, var(--turquoise), var(--turquoise-dark));
  color: #fff; font-size: 30px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}
.profile__name { margin: 0; font-size: 22px; font-weight: 800; }
.profile__role { margin: 4px 0 22px; color: var(--muted); font-size: 14px; }
.profile__rows {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; text-align: left;
  margin-bottom: 18px;
}
.prow {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 16px; border-bottom: 1px solid var(--line); font-size: 14.5px;
}
.prow:last-child { border-bottom: none; }
.prow span { color: var(--muted); }
.prow strong { color: var(--ink); font-weight: 700; }

/* ===================== TABBAR ===================== */
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255,255,255,.58);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -8px 28px rgba(44,93,89,.1);
  display: flex;
  z-index: 20;
}
.app.is-detail .tabbar { transform: translateY(120%); }
.tabbar { transition: transform .3s cubic-bezier(.2,.7,.3,1); }

.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  color: var(--idle);
  font-size: 11px; font-weight: 600;
  position: relative;
  transition: color .2s;
}
.tab svg { transition: transform .2s; }
.tab.is-active { color: var(--turquoise-dark); }
.tab.is-active svg { transform: translateY(-1px) scale(1.06); }
.tab.is-active::before {
  content: ""; position: absolute; top: 8px;
  width: 30px; height: 4px; border-radius: 999px;
  background: var(--turquoise);
}
.tab:active svg { transform: scale(.9); }

/* ===================== ANIMACIONES ===================== */
@keyframes pop-in {
  0% { opacity: 0; transform: scale(.85) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes view-in {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes detail-in {
  from { opacity: 0; transform: translateX(28px) scale(.99); filter: blur(4px); }
  to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}
@keyframes screen-fade {
  from { opacity: 0; transform: scale(1.015); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes rise-blur {
  from { opacity: 0; transform: translateY(22px); filter: blur(7px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes card-in {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes tl-in {
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(60,122,117,.45); }
  70%  { box-shadow: 0 0 0 12px rgba(60,122,117,0); }
  100% { box-shadow: 0 0 0 0 rgba(60,122,117,0); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===================== HERO PILL (rol) ===================== */
.hero__pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  background: rgba(20,40,38,.32);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* ===================== ESTADO (detalle picking) ===================== */
.dprogress {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 16px 18px;
}
.dprogress__lbl { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.dprogress__state { font-size: 13px; color: var(--muted); }
.dprogress__state strong { color: var(--ink); font-weight: 700; }

/* ===================== FOTOS DEL TIMELINE ===================== */
.tl__photo {
  width: 100%;
  height: 190px;
  object-fit: cover;
  padding: 5px;
  border-radius: 18px;
  margin-top: 10px;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  cursor: zoom-in;
  opacity: 0;
  transform: translateY(10px) scale(.98);
  transition: opacity .6s ease, transform .6s ease;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-sheen);
}
.tl__photo.in { opacity: 1; transform: translateY(0) scale(1); }
.tl__photo:active { filter: brightness(.95); }
.tl__photocap {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--muted); margin-top: 6px; font-weight: 600;
}

/* ===================== LIGHTBOX ===================== */
.lightbox {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: rgba(16,28,27,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__fig { margin: 0; max-width: 100%; text-align: center; transform: scale(.94); transition: transform .28s cubic-bezier(.2,.8,.3,1.1); }
.lightbox.is-open .lightbox__fig { transform: scale(1); }
.lightbox__fig img {
  max-width: 100%; max-height: 84vh;
  padding: 6px; border-radius: 20px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), var(--glass-sheen);
}
.lightbox__fig figcaption { color: rgba(255,255,255,.9); font-size: 13px; margin-top: 14px; font-weight: 500; }
.lightbox__close {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__close:active { background: rgba(255,255,255,.28); }

/* ===================== SHEET: registrar evento ===================== */
.sheet-backdrop {
  position: absolute; inset: 0; z-index: 90;
  background: rgba(16,28,27,.42);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }

.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 95;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid var(--glass-border);
  border-bottom: none;
  border-radius: 28px 28px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  box-shadow: 0 -16px 44px rgba(16,28,27,.2), var(--glass-sheen);
  transform: translateY(105%);
  transition: transform .42s var(--ease-spring);
}
.sheet.is-open { transform: translateY(0); }
.sheet__handle { width: 44px; height: 5px; border-radius: 999px; background: var(--turquoise-soft2); margin: 0 auto 16px; }
.sheet__title { margin: 0; font-size: 19px; font-weight: 800; }
.sheet__sub { margin: 3px 0 18px; color: var(--muted); font-size: 13.5px; }
.sheet__label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 4px 0 9px; }

/* segmented selector de tipo */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 20px; }
.seg__btn {
  min-height: 48px;
  border-radius: 13px;
  background: var(--turquoise-soft);
  color: var(--turquoise-dark);
  font-size: 14px; font-weight: 700;
  border: 1.6px solid transparent;
  transition: all .18s ease;
}
.seg__btn:active { transform: scale(.97); }
.seg__btn.is-active {
  background: var(--turquoise-dark);
  color: #fff;
  box-shadow: 0 6px 16px rgba(80,157,151,.32);
}

/* segmentado de 3 columnas (etapas de despacho) */
.seg--3 { grid-template-columns: 1fr 1fr 1fr; gap: 7px; }
.seg--3 .seg__btn { font-size: 13px; }
.seg__btn--done:not(.is-active) {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: var(--ok);
}
.seg__btn--done:not(.is-active)::after { content: " ✓"; font-weight: 800; }

/* guía: qué debe mostrar la foto que toma el operador */
.photo-guide {
  display: flex; align-items: flex-start; gap: 7px;
  margin: -2px 0 10px;
  padding: 10px 12px;
  background: var(--turquoise-soft);
  border: 1px solid var(--turquoise-soft2);
  border-radius: 12px;
  font-size: 12.5px; line-height: 1.45; color: var(--turquoise-dark);
  font-weight: 600;
}
.photo-guide svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; color: var(--turquoise); }

/* foto de portada en cards de Recepción/Despacho */
.card__photo {
  position: relative; padding: 5px; border-radius: 18px; margin: 2px 0;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-sheen);
}
.card__photo img {
  display: block; width: 100%; height: 178px; object-fit: cover; border-radius: 14px;
  background: var(--turquoise-soft);
}
.card__photocap {
  position: absolute; left: 8px; bottom: 8px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(17,24,28,.62); color: #fff;
  font-size: 11.5px; font-weight: 600; backdrop-filter: blur(3px);
}
.card__photocap svg { width: 13px; height: 13px; }

/* bloque de info de salida en la card de despacho */
.dispatch {
  display: flex; flex-direction: column; gap: 9px;
  background: var(--turquoise-soft);
  border-radius: 13px;
  padding: 12px 14px;
  margin: 2px 0;
}
.dispatch__row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--muted);
}
.dispatch__row svg { width: 17px; height: 17px; color: var(--turquoise-dark); }
.dispatch__row strong { color: var(--ink); font-weight: 700; font-size: 13.5px; }

/* ---------- Módulo de Registro (operador) ---------- */
.seg--reg { padding: 0 var(--gutter); margin-top: 4px; }
.reg-hint {
  padding: 0 var(--gutter);
  margin: -8px 0 4px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}
.regcard {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--glass-shadow), var(--glass-sheen);
  border: 1px solid var(--glass-border);
  display: flex; flex-direction: column; gap: 12px;
  opacity: 0;
  transform: translateY(14px);
  animation: card-in .5s ease forwards;
}
.regcard__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.regcard__route { font-size: 15px; font-weight: 700; color: var(--ink); }
.regcard__wh {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 3px;
}
.regcard__wh svg { color: var(--turquoise-dark); }
.regcard__btn {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 14px; font-weight: 700;
  color: #fff;
  background: linear-gradient(160deg, var(--turquoise-dark) 0%, var(--turquoise-deep) 100%);
  box-shadow: 0 6px 16px rgba(80,157,151,.28);
  transition: transform .15s ease;
}
.regcard__btn:active { transform: scale(.98); }
.regcard__btn--out {
  background: linear-gradient(160deg, #e0962a 0%, #b8741a 100%);
  box-shadow: 0 6px 16px rgba(224,150,42,.28);
}

/* info del envío en el sheet de salida */
.salida-info {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--turquoise-soft);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.salida-info__row {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; font-weight: 600; color: var(--turquoise-dark);
}

/* ---------- Notificaciones (sheet de la campana) ---------- */
.notiflist { display: flex; flex-direction: column; gap: 4px; }
.notif {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 6px;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(8px);
  animation: rise .4s ease forwards;
}
.notif:last-child { border-bottom: none; }
.notif__ico {
  width: 38px; height: 38px; flex: none;
  border-radius: 11px;
  background: var(--turquoise-soft);
  color: var(--turquoise-dark);
  display: flex; align-items: center; justify-content: center;
}
.notif__body { flex: 1; min-width: 0; }
.notif__title { font-size: 14px; font-weight: 700; color: var(--ink); }
.notif__sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.notif__time { font-size: 11.5px; color: var(--muted); flex: none; align-self: flex-start; padding-top: 2px; }
.notif--unread .notif__title { position: relative; padding-left: 14px; }
.notif--unread .notif__title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: var(--turquoise);
}
.notif--link { cursor: pointer; border-radius: 12px; transition: background .15s ease, transform .14s ease; }
.notif--link:active { transform: scale(.99); background: var(--turquoise-soft); }
.notif__chev { flex: none; color: var(--turquoise-dark); opacity: .4; display: flex; align-self: center; }
.notif__chev svg { width: 18px; height: 18px; }

/* área de captura */
.capture {
  width: 100%;
  min-height: 92px;
  border-radius: 16px;
  border: 2px dashed var(--turquoise-soft2);
  background: #fafdfc;
  color: var(--turquoise-dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  margin-bottom: 18px;
  transition: all .18s ease;
}
.capture:active { transform: scale(.99); border-color: var(--turquoise); background: var(--turquoise-soft); }
.capture__ico { color: var(--turquoise); }
.capture__txt { font-size: 14.5px; font-weight: 700; }
.capture__hint { font-size: 11px; color: var(--muted); font-weight: 500; }

.capture__preview { position: relative; margin-bottom: 18px; }
.capture__preview img {
  width: 100%; height: 220px; object-fit: cover; cursor: zoom-in;
  padding: 5px; border-radius: 18px;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-sheen);
}
.capture__retake {
  position: absolute; top: 10px; right: 10px;
  background: rgba(16,28,27,.7); color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 7px 12px; border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* botón confirmar con animación de éxito */
.btn-confirm { position: relative; overflow: hidden; }
.btn-confirm__check {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--ok);
  color: #fff;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.2,.8,.3,1.2);
}
.btn-confirm.is-success { background: var(--ok); box-shadow: 0 8px 20px rgba(47,175,107,.4); }
.btn-confirm.is-success .btn-confirm__check { transform: translateY(0); }
.btn-confirm.is-success .btn-confirm__check svg { animation: check-pop .4s ease both; }
@keyframes check-pop {
  0% { transform: scale(.4); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

/* ===================== TOAST ===================== */
.toast {
  position: absolute;
  left: 50%; bottom: calc(var(--tabbar-h) + 24px);
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  font-size: 13.5px; font-weight: 600;
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 1300; /* por encima de cualquier sheet/backdrop/lightbox/modal (incl. .gcm-root, z-index 1200), para que el aviso nunca quede escondido */
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  display: flex; align-items: center; gap: 9px;
  max-width: 86%;
}
.toast.is-open { opacity: 1; transform: translate(-50%, 0); }
.toast__check {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ok); color: #fff; flex: none;
  display: flex; align-items: center; justify-content: center;
}

/* ===================== DASHBOARD (KPIs) ===================== */
.kpis {
  padding: var(--stack) var(--gutter) 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* Tarjetas grandes del Inicio */
.dstat {
  display: flex; align-items: center; gap: 16px;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border); border-radius: 20px;
  padding: 20px 20px; box-shadow: var(--glass-shadow), var(--glass-sheen);
  cursor: pointer; opacity: 0; transform: translateY(12px); animation: card-in .5s ease forwards;
}
.dstat:active { transform: scale(.99); }
.dstat__ico { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dstat__ico svg { width: 27px; height: 27px; }
.dstat--turq .dstat__ico { background: var(--turquoise-soft); color: var(--turquoise-dark); }
.dstat--gray .dstat__ico { background: var(--gray-soft); color: var(--gray-dark); }
.dstat--orange .dstat__ico { background: var(--orange-soft); color: var(--orange-dark); }
.dstat__info { flex: 1; min-width: 0; }
.dstat__num { font-size: 32px; font-weight: 800; color: var(--ink); line-height: 1; }
.dstat--pa .dstat__ico { background: var(--turquoise-deep); color: #fff; }
.dstat__pa-t { font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.15; }
.dstat__lbl { font-size: 14px; color: var(--muted); font-weight: 600; margin-top: 5px; }
.dstat__arrow { color: var(--muted); display: flex; flex-shrink: 0; }
.dstat__arrow svg { width: 22px; height: 22px; }
/* Pie del Inicio */
.dashfoot {
  margin: 12px var(--gutter) 0; display: flex; align-items: center; gap: 14px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-sheen);
  border-radius: 18px; padding: 16px 18px;
}
.dashfoot__ico { width: 44px; height: 44px; border-radius: 13px; background: var(--white); color: var(--turquoise-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dashfoot__ico svg { width: 22px; height: 22px; }
.dashfoot__t { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.dashfoot__s { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* Paneles del Inicio (llegadas anunciadas + actividad reciente).
   Móvil: apilados. Desktop ancho: 2 columnas (ver media query). */
.dashgrid { display: flex; flex-direction: column; gap: 12px; padding: var(--stack) var(--gutter) 0; }
/* Los paneles son columna flex para que el cuerpo pueda estirarse y todos
   los paneles queden del mismo alto, tenga el cliente datos o no. */
.dashpanel { background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border); border-radius: 20px; padding: 16px 16px 18px;
  box-shadow: var(--glass-shadow), var(--glass-sheen);
  display: flex; flex-direction: column; }
.dashpanel__h { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 13px; font-size: 15.5px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; }
.dashpanel__more { font-size: 12.5px; font-weight: 800; color: var(--turquoise-dark);
  background: none; border: none; cursor: pointer; white-space: nowrap; }
.dashpanel__body { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; }
.dashpanel__body .infocard { margin: 0; }
/* Estado vacío: centrado en el alto sobrante para que el panel no se vea
   "a medias" cuando el cliente todavía no tiene datos. */
.dashpanel__body > .dashpanel__empty,
.dashpanel__body > .dashpanel__none { margin-block: auto; }
.dashpanel__empty { width: 100%; text-align: center; color: var(--turquoise-dark);
  font-weight: 700; font-size: 13.5px; padding: 20px; border: 1.5px dashed var(--glass-border);
  border-radius: 14px; background: none; cursor: pointer; }
.dashpanel__none { color: var(--muted); font-weight: 600; font-size: 13px; padding: 8px 2px; }
.kpi {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow), var(--glass-sheen);
  padding: 15px 14px 14px;
  opacity: 0;
  transform: translateY(14px);
  animation: card-in .5s ease forwards;
  position: relative;
  overflow: hidden;
}
.kpi__ico {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--turquoise-soft);
  color: var(--turquoise-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.kpi__num { font-size: 30px; font-weight: 800; color: var(--ink); line-height: 1; letter-spacing: -1px; }
.kpi__lbl { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 6px; line-height: 1.3; }
/* tarjeta de último evento (texto + timestamp) */
.kpi--event .kpi__ev { font-size: 15px; font-weight: 800; color: var(--ink); line-height: 1.2; padding-right: 22px; }
.kpi--event .kpi__time {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; color: var(--turquoise-dark);
  background: var(--turquoise-soft);
  padding: 3px 8px; border-radius: 999px; margin-top: 8px;
}

.quick { padding: var(--stack-lg) var(--gutter) 0; }
.quick__title {
  font-size: 13px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px;
  margin: 0 0 12px; padding-left: 2px;
}
.quick__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick__card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 14px;
  text-align: left;
  display: flex; flex-direction: column; gap: 4px;
  transition: transform .14s ease, box-shadow .2s ease;
}
.quick__card:active { transform: scale(.97); box-shadow: var(--shadow-md); }
.quick__ico {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(160deg, var(--turquoise), var(--turquoise-dark));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.quick__name { font-size: 15px; font-weight: 800; color: var(--ink); }
.quick__sub { font-size: 11.5px; color: var(--muted); }

/* ===================== INVENTARIO — dashboard visual ===================== */
#inventory-charts { padding: 4px var(--gutter) 0; display: flex; flex-direction: column; gap: 14px; }

.invsec-title {
  margin: var(--stack-lg) var(--gutter) 2px; font-size: 15px; font-weight: 800; color: var(--ink);
}

/* KPIs superiores */
.invkpis { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.invkpi {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border); border-radius: 16px;
  padding: 14px 10px; text-align: center; box-shadow: var(--glass-shadow), var(--glass-sheen);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.invkpi__ico {
  width: 34px; height: 34px; border-radius: 10px; margin-bottom: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--turquoise-soft); color: var(--turquoise-dark);
}
.invkpi__ico svg { width: 19px; height: 19px; }
.invkpi__num { font-size: 21px; font-weight: 800; color: var(--ink); line-height: 1; }
.invkpi__lbl { font-size: 11px; color: var(--muted); line-height: 1.25; font-weight: 600; }

/* acentos de color por KPI (turquesa / gris / naranja) */
.invkpi--turq .invkpi__ico   { background: var(--turquoise-soft); color: var(--turquoise-dark); }
.invkpi--gray .invkpi__ico   { background: var(--gray-soft);      color: var(--gray-dark); }
.invkpi--orange .invkpi__ico { background: var(--orange-soft);    color: var(--orange-dark); }
.invkpi--orange .invkpi__num { color: var(--orange-dark); }

/* badge de estado del stock (en cada tarjeta de inventario) */
.invcard__tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 11px 0; }
.invstatus {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; padding: 3px 9px 3px 8px; border-radius: 999px;
}
.invstatus__dot { width: 7px; height: 7px; border-radius: 50%; }

/* Panel de gráfico */
.invpanel {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--glass-shadow), var(--glass-sheen);
}
.invpanel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.invpanel__title { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.invpanel__sub { font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* Donut */
.invpanel__donut { display: flex; align-items: center; gap: 18px; }
.donut { position: relative; width: 118px; height: 118px; flex-shrink: 0; }
.donut__svg { width: 118px; height: 118px; transform: rotate(0deg); }

/* Variante grande del Inventario del cliente: dona protagonista + barras debajo */
.invpanel__donut--big { flex-direction: column; align-items: stretch; gap: 20px; }
.invpanel__donut--big .donut { width: min(220px, 58vw); height: min(220px, 58vw); margin: 4px auto 2px; }
.invpanel__donut--big .donut__svg { width: 100%; height: 100%; }
.invpanel__donut--big .donut__num { font-size: 32px; }
.invpanel__donut--big .donut__lbl { font-size: 13.5px; margin-top: 2px; }

.invleg { display: flex; flex-direction: column; gap: 13px; width: 100%; }
.invleg__row { display: flex; flex-direction: column; gap: 7px; }
.invleg__head { display: flex; align-items: center; gap: 9px; }
.invleg__name { font-size: 14px; font-weight: 700; color: var(--ink); flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invleg__val { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.invleg__bar { height: 10px; border-radius: 999px; background: rgba(20,45,43,.07); overflow: hidden; }
.invleg__fill { display: block; height: 100%; border-radius: 999px; min-width: 4px;
  transition: width .9s cubic-bezier(.4,.8,.3,1); }
.donut__svg circle { transition: stroke-dasharray .9s ease; }
.donut__center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.donut__num { font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1; }
.donut__lbl { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.leg { display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 0; }
.leg__row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.leg__dot { width: 11px; height: 11px; border-radius: 4px; flex-shrink: 0; }
.leg__name { color: var(--ink); font-weight: 700; flex: 1; }
.leg__val { color: var(--muted); font-weight: 600; font-size: 11.5px; }

/* Barras por producto */
.invbars { display: flex; flex-direction: column; gap: 13px; }
.invbar__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.invbar__name { font-size: 13px; font-weight: 700; color: var(--ink); }
.invbar__val { font-size: 12px; font-weight: 700; color: var(--turquoise-dark); white-space: nowrap; }
.invbar__track { height: 9px; border-radius: 99px; background: var(--turquoise-soft); overflow: hidden; }
.invbar__fill { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .9s cubic-bezier(.22,1,.36,1); }

/* elementos del inventario que redirigen a su info */
.invbar--link, .invout--link, .leg__row--link, .invcard--link { cursor: pointer; }
.invbar--link, .invout--link, .leg__row--link { transition: transform .14s ease; }
.invbar--link:active, .invout--link:active, .leg__row--link:active, .invcard--link:active { transform: scale(.99); }
.leg__row--link { border-radius: 8px; padding: 3px 5px; margin: -3px -5px; }
.leg__row--link:active { background: var(--turquoise-soft); }

/* Próximas salidas */
.invouts { display: flex; flex-direction: column; gap: 14px; }
.invout__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.invout__date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink); }
.invout__date svg { width: 15px; height: 15px; color: var(--turquoise-dark); }
.invout__u { font-size: 12px; font-weight: 700; color: var(--turquoise-dark); }
.invout__track { height: 8px; border-radius: 99px; background: var(--turquoise-soft); overflow: hidden; }
.invout__fill {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--turquoise), var(--turquoise-dark));
  transition: width .9s cubic-bezier(.22,1,.36,1);
}
.invout__ships { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 5px; }

.invsearch {
  position: relative;
  margin: var(--stack) var(--gutter) 2px;
}
.invsearch__ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); display: flex;
}
.invsearch__input {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1.5px solid var(--glass-border);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  padding: 0 16px 0 42px;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  box-shadow: var(--glass-sheen);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.invsearch__input:focus {
  border-color: var(--turquoise);
  box-shadow: 0 0 0 4px rgba(80,157,151,.14);
}

.invcard {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--glass-shadow), var(--glass-sheen);
  border: 1px solid var(--glass-border);
  opacity: 0;
  transform: translateY(14px);
  animation: card-in .5s ease forwards;
}
.invcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.invcard__name { font-size: 15px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 9px; }
.invcard__qty {
  font-size: 12px; font-weight: 800; color: var(--turquoise-dark);
  background: var(--turquoise-soft); padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.invcard__loc {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--turquoise-dark);
  background: var(--turquoise-soft); padding: 6px 11px; border-radius: 10px;
}
.invcard__meta { display: flex; gap: 18px; border-top: 1px solid var(--line); padding-top: 11px; }
.invcard__cell { display: flex; flex-direction: column; gap: 2px; }
.invcard__cl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; }
.invcard__cv { font-size: 13px; font-weight: 700; color: var(--ink); }
.inv-empty { text-align: center; color: var(--muted); font-size: 14px; padding: 40px var(--gutter); }

/* ===================== VERIFICACIÓN DE BULTOS (detalle) ===================== */
.bulkverify {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
}
.bulkverify__ico {
  width: 46px; height: 46px; flex: none;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.bulkverify--ok .bulkverify__ico { background: var(--ok); box-shadow: 0 6px 16px rgba(47,175,107,.32); }
.bulkverify--warn .bulkverify__ico { background: var(--warn); box-shadow: 0 6px 16px rgba(224,150,42,.32); }
.bulkverify__nums { font-size: 16px; font-weight: 800; color: var(--ink); }
.bulkverify__nums strong { font-weight: 800; }
.bulkverify__sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.bulkverify--ok .bulkverify__sub { color: var(--ok); font-weight: 700; }
.bulkverify--warn .bulkverify__sub { color: var(--warn); font-weight: 700; }
.bulkverify__check svg { animation: check-pop .5s ease both; }

/* badge ámbar inline para discrepancia */
.disc-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700;
  color: var(--warn); background: var(--warn-bg);
  padding: 4px 10px; border-radius: 999px; margin-left: 8px;
}

/* ===================== FIRMA DE RECEPCIÓN (detalle) ===================== */
.sigcard { padding: 16px; }
.sigcard__pad {
  background: #fafdfc;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex; align-items: center; justify-content: center;
  min-height: 86px;
}
.sigcard__img { max-width: 88%; max-height: 70px; opacity: .92; }
.sigcard__foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.sigcard__avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: linear-gradient(160deg, var(--turquoise), var(--turquoise-dark));
  color: #fff; font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.sigcard__name { font-size: 14px; font-weight: 800; color: var(--ink); }
.sigcard__when { font-size: 12px; color: var(--muted); margin-top: 1px; }
.sigcard__seal {
  margin-left: auto; color: var(--ok);
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700;
}
.sigcard--empty { text-align: center; color: var(--muted); font-size: 13.5px; padding: 22px 16px; }

/* ===================== DOCUMENTOS (detalle) ===================== */
.docs { padding: 6px; }
.doc-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
  border-radius: 10px;
}
.doc-row:last-child { border-bottom: none; }
.doc-row:active { background: var(--turquoise-soft); }
.doc-row__ico {
  width: 38px; height: 44px; flex: none;
  border-radius: 8px;
  background: #fdecec; color: #d6453f;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800; position: relative;
}
.doc-row__name { font-size: 14px; font-weight: 700; color: var(--ink); flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.doc-row__size { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.doc-row__dl { color: var(--turquoise-dark); display: flex; flex: none; }

/* ===================== COMENTARIOS / CHAT (detalle) ===================== */
.chat { padding: 6px 4px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; flex-direction: column; max-width: 82%; }
.msg__bubble {
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 13.5px; line-height: 1.4;
  box-shadow: var(--shadow-sm);
}
.msg__meta { font-size: 10.5px; color: var(--muted); margin-top: 4px; font-weight: 600; }
.msg--them { align-self: flex-start; }
.msg--them .msg__bubble { background: var(--turquoise-soft); color: var(--ink); border-bottom-left-radius: 5px; }
.msg--them .msg__meta { padding-left: 6px; }
.msg--me { align-self: flex-end; align-items: flex-end; }
.msg--me .msg__bubble {
  background: linear-gradient(160deg, var(--turquoise-dark), var(--turquoise-deep));
  color: #fff; border-bottom-right-radius: 5px;
}
.msg--me .msg__meta { padding-right: 6px; }
.msg.pop { animation: msg-in .35s ease both; }
@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.chatbar {
  display: flex; align-items: center; gap: 9px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.chatbar__input {
  flex: 1; height: 46px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fafdfc;
  padding: 0 15px;
  font-size: 16px; color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.chatbar__input:focus { border-color: var(--turquoise); box-shadow: 0 0 0 4px rgba(80,157,151,.14); }
.chatbar__send {
  width: 46px; height: 46px; flex: none;
  border-radius: 14px;
  background: var(--turquoise);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(80,157,151,.32);
  transition: transform .12s ease;
}
.chatbar__send:active { transform: scale(.92); }

/* ===================== VERIFICACIÓN EN SHEET (operador) ===================== */
.verify-block { margin-bottom: 6px; }
.verify-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.verify-declared {
  background: var(--turquoise-soft);
  border-radius: 13px; padding: 12px 14px;
  display: flex; flex-direction: column; justify-content: center;
}
.verify-declared__l { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--turquoise-dark); }
.verify-declared__v { font-size: 24px; font-weight: 800; color: var(--ink); margin-top: 2px; line-height: 1; }
.verify-input-wrap { display: flex; flex-direction: column; }
.verify-input__l { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 6px; }
.verify-input {
  height: 54px;
  border-radius: 13px;
  border: 1.6px solid var(--line);
  background: #fff;
  padding: 0 14px;
  font-size: 22px; font-weight: 800; color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.verify-input:focus { border-color: var(--turquoise); box-shadow: 0 0 0 4px rgba(80,157,151,.14); }
.verify-result {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 700;
  padding: 11px 14px; border-radius: 12px;
  margin-bottom: 16px;
  animation: msg-in .3s ease both;
}
.verify-result__ico { width: 22px; height: 22px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; }
.verify-result--ok { background: var(--ok-bg); color: var(--ok); }
.verify-result--ok .verify-result__ico { background: var(--ok); }
.verify-result--warn { background: var(--warn-bg); color: var(--warn); }
.verify-result--warn .verify-result__ico { background: var(--warn); }

/* ===================== SHEET: FIRMA (canvas) ===================== */
.signfield {
  width: 100%; height: 50px;
  border-radius: 13px;
  border: 1.6px solid var(--line);
  background: #fff;
  padding: 0 15px; margin-bottom: 6px;
  font-size: 15px; color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.signfield:focus { border-color: var(--turquoise); box-shadow: 0 0 0 4px rgba(80,157,151,.14); }
.signpad {
  position: relative;
  border: 2px dashed var(--turquoise-soft2);
  border-radius: 16px;
  background: #fafdfc;
  margin-bottom: 18px;
  overflow: hidden;
}
.signpad__canvas { display: block; width: 100%; height: 168px; touch-action: none; cursor: crosshair; }
.signpad__hint {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; font-weight: 500;
  pointer-events: none; transition: opacity .2s;
}
.signpad__hint.hide { opacity: 0; }
.signpad__clear {
  position: absolute; top: 10px; right: 10px;
  background: rgba(16,28,27,.06); color: var(--turquoise-dark);
  font-size: 12px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px;
}
.signpad__clear:active { background: rgba(16,28,27,.12); }

/* ===================== MÓDULO DE CLIENTES ===================== */
.clients-addwrap { padding: 14px var(--gutter) 0; }

.clientcard {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 13px;
  opacity: 0;
  transform: translateY(14px);
  animation: card-in .5s ease forwards;
}
.clientcard__avatar {
  width: 48px; height: 48px; flex: none;
  border-radius: 14px;
  color: #fff; font-size: 16px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.clientcard__main { flex: 1; min-width: 0; }
.clientcard__name { font-size: 15.5px; font-weight: 800; color: var(--ink); }
.clientcard__company { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 1px; }
.clientcard__meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 9px 0 8px; }
.clienttag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; color: var(--turquoise-dark);
  background: var(--turquoise-soft); padding: 4px 9px; border-radius: 999px;
}
.clientcard__contact {
  display: flex; flex-direction: column; gap: 2px;
  border-top: 1px solid var(--line); padding-top: 9px;
  font-size: 12.5px; color: var(--muted); font-weight: 500;
}
.clientcard__del {
  width: 36px; height: 36px; flex: none;
  border-radius: 11px;
  color: var(--idle);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s, transform .12s;
}
.clientcard__del:active { transform: scale(.9); background: #fdecec; color: #d6453f; }

/* ---- Formulario de cliente (sheet) ---- */
.clientform { display: flex; flex-direction: column; gap: 13px; }
.cfield { display: flex; flex-direction: column; gap: 6px; }
.cfield-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cfield__label {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .4px; padding-left: 2px;
}
.cfield__input {
  height: 50px;
  border-radius: 13px;
  border: 1.6px solid var(--line);
  background: #fff;
  padding: 0 14px;
  font-size: 16px; color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.cfield__input:focus { border-color: var(--turquoise); box-shadow: 0 0 0 4px rgba(80,157,151,.14); }
.clientform .btn-confirm { margin-top: 6px; }

/* sheet con scroll para formularios largos */
.sheet--scroll { max-height: 92%; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ===================== DESKTOP ===================== */
/* ============================================================
   RESPONSIVE
   - < 768px  : móvil (UI actual, pantalla completa)
   - ≥ 768px  : tablet/iPad → barra lateral + columna centrada
   - ≥ 1024px : PC → barra lateral + maestro-detalle (lista + detalle)
   ============================================================ */

/* marca del sidebar (oculta en móvil) */
.side-brand { display: none; }

/* === Tablet / Desktop: barra lateral === */
@media (min-width: 768px) {
  body { align-items: stretch; justify-content: center; padding: 0; background: #ecf5f3; }
  .device {
    max-width: 100%; width: 100%; height: 100%;
    border-radius: 0; box-shadow: none; overflow: hidden;
  }

  /* la tabbar inferior se convierte en sidebar */
  .app { padding-left: var(--sidebar-w); }
  .tabbar {
    top: 0; bottom: 0; left: 0; right: auto;
    width: var(--sidebar-w); height: 100%;
    flex-direction: column; justify-content: flex-start; align-items: stretch;
    gap: 4px; padding: 16px 14px;
    border-top: none; border-right: 1px solid var(--glass-border);
    background: rgba(255,255,255,.55);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    backdrop-filter: blur(22px) saturate(170%);
    box-shadow: none;
    transition: none;
  }
  .app.is-detail .tabbar { transform: none; }

  .side-brand { display: flex; align-items: center; gap: 11px; padding: 10px 10px 18px; margin-bottom: 4px; }
  .side-brand img { height: 42px; width: auto; border-radius: 8px; }
  .side-brand span { font-size: 18px; font-weight: 800; color: var(--ink); letter-spacing: -.3px; }

  .tab {
    flex: none; flex-direction: row; justify-content: flex-start;
    gap: 13px; padding: 12px 14px; border-radius: 12px;
    font-size: 14.5px; font-weight: 600; color: var(--muted);
    transition: background .15s, color .15s;
  }
  .tab span { font-size: 14.5px; }
  .tab.is-active { color: var(--turquoise-dark); background: var(--turquoise-soft); }
  .tab.is-active::before { display: none; }
  .tab.is-active svg { transform: none; }
  .tab:hover { background: var(--turquoise-soft); color: var(--turquoise-dark); }

  /* appbar: el logo vive en el sidebar; mostramos título de sección */
  .appbar__logo, .appbar.is-detail .appbar__logo { display: none; }
  .appbar__title { display: block; }
  .content { padding-bottom: 18px; }

  /* sheets como diálogos centrados */
  .sheet {
    left: 50%; right: auto; top: 50%; bottom: auto;
    width: min(460px, 92vw);
    transform: translate(-50%, calc(-50% + 14px));
    border-radius: 22px;
    padding: 24px 24px 26px;
    box-shadow: 0 30px 80px rgba(16,28,27,.34);
    transition: transform .3s cubic-bezier(.2,.8,.25,1), opacity .26s ease;
    opacity: 0; pointer-events: none;
    max-height: 90vh; overflow-y: auto;
  }
  .sheet.is-open { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
  .sheet--scroll { max-height: 90vh; }
  .sheet__handle { display: none; }

  /* contenido sin maestro-detalle: columna centrada y bien proporcionada */
  .app:not(.app--split) .content { padding-top: 24px; }
  .app:not(.app--split) .content > .view.is-active { max-width: 760px; margin-inline: auto; }
  /* el hero se alinea con las tarjetas (mismo inset) y redondea todas las esquinas */
  .app:not(.app--split) .hero {
    margin: 0 var(--gutter);
    border-radius: 24px;
  }

  /* las tarjetas grandes del Inicio dejan de estirarse: rejilla de 2 columnas */
  .app:not(.app--split) .kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
  }
  .app:not(.app--split) .kpis .dstat { margin: 0; }
}

/* === Desktop ancho: el Inicio se vuelve un dashboard de 2 columnas === */
@media (min-width: 1080px) {
  /* El Inicio rompe el tope de 760px y aprovecha el ancho disponible */
  .app:not(.app--split) .content > #view-dashboard.is-active { max-width: 1080px; }

  /* Panel gerente: usa el ancho disponible en desktop. Antes todas las vistas
     del gerente (incluido el detalle de cliente) quedaban en una columna de
     760px con mucho espacio muerto a los lados en pantallas anchas. */
  .app:not(.app--split) .content > [id^="view-g-"].is-active { max-width: 1060px; }

  /* KPIs: las 3 métricas arriba y las 2 acciones (anunciar llegada +
     solicitar despacho) juntas y centradas debajo. Rejilla de 6 columnas:
     cada tarjeta ocupa 2, y la primera acción arranca en la columna 2 para
     que el par quede centrado (queda media tarjeta de aire a cada lado). */
  .app:not(.app--split) #view-dashboard .kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
  }
  .app:not(.app--split) #view-dashboard .kpis .dstat { grid-column: span 2; }
  /* ojo: hay que repetir el span — usar solo grid-column-start deja el end en
     `auto` y la tarjeta se encoge a 1 columna (quedaba más angosta que el resto) */
  .app:not(.app--split) #view-dashboard .kpis .dstat--pa:nth-last-child(2) { grid-column: 2 / span 2; }
  .app:not(.app--split) #view-dashboard .kpis .dstat { padding: 16px 16px; gap: 12px; }
  .app:not(.app--split) #view-dashboard .kpis .dstat__ico { width: 46px; height: 46px; border-radius: 13px; }
  .app:not(.app--split) #view-dashboard .kpis .dstat__ico svg { width: 23px; height: 23px; }
  .app:not(.app--split) #view-dashboard .kpis .dstat__num { font-size: 27px; }
  .app:not(.app--split) #view-dashboard .kpis .dstat__lbl { font-size: 13px; margin-top: 3px; }
  .app:not(.app--split) #view-dashboard .kpis .dstat__arrow { display: none; }

  /* Paneles: lado a lado y SIEMPRE del mismo alto (stretch, no flex-start),
     mande el contenido lo que mande. Antes cada panel medía lo suyo y
     "Actividad reciente" quedaba más bajo que "Tus llegadas anunciadas".
     El min-height evita que en un cliente nuevo (sin datos) queden dos tiras. */
  .app:not(.app--split) #view-dashboard .dashgrid { flex-direction: row; align-items: stretch; }
  .app:not(.app--split) #view-dashboard .dashgrid > .dashpanel { flex: 1 1 0; min-width: 0; min-height: 180px; }
}

/* === Desktop: maestro-detalle (lista + detalle lado a lado) === */
@media (min-width: 1024px) {
  .app--split .content {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    overflow: hidden;
    padding: 0;
  }
  .app--split .content > .view.is-active {
    height: 100%; overflow-y: auto; min-height: 0; max-width: none; margin: 0;
  }
  .app--split .content > #view-detail {
    border-left: 1px solid var(--line); background: var(--bg); animation: none;
    padding-bottom: 24px;
  }
  .app--split #detail-body { max-width: 760px; margin-inline: auto; }
  /* el panel de detalle tiene scroll propio: aseguramos que las fotos se vean */
  .app--split #view-detail .tl__photo,
  .app--split #view-detail .incident__photo { opacity: 1; transform: none; }

  /* tarjeta seleccionada en la lista */
  .card.is-selected {
    border-color: var(--turquoise);
    box-shadow: 0 0 0 2px var(--turquoise-soft2), var(--shadow-md);
  }

  /* placeholder del panel de detalle */
  .detail-empty {
    height: 100%; min-height: 360px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 18px; text-align: center; padding: 40px; color: var(--muted);
  }
  .detail-empty__ico {
    width: 76px; height: 76px; border-radius: 22px;
    background: var(--turquoise-soft); color: var(--turquoise-dark);
    display: flex; align-items: center; justify-content: center;
  }
  .detail-empty__ico svg { width: 36px; height: 36px; }
  .detail-empty p { max-width: 290px; margin: 0; font-size: 15px; line-height: 1.55; }
}

/* === Monitores grandes: el lienzo ocupa todo el ancho (sin bordes vacíos) === */
@media (min-width: 1380px) {
  body { background: #ecf5f3; }
  .device { max-width: 100%; margin-inline: 0; box-shadow: none; }
}

/* ============================================================
   INCIDENCIAS · FACTURACIÓN · PERFIL · INTRO  (añadidos)
   ============================================================ */

/* segmented de 3 columnas (tipo de incidencia) */
.seg--3 { grid-template-columns: 1fr 1fr 1fr; }

/* textarea de incidencia (reusa look de signfield) */
.incident-desc { width: 100%; min-height: 84px; resize: none; margin-bottom: 18px; font-family: inherit; line-height: 1.45; }

/* tarjeta de incidencia en el detalle */
.incident { display: flex; flex-direction: column; gap: 12px; }
.incident__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.incident__type { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 800; color: var(--warn); }
.incident__type svg { color: var(--warn); }
.incident__desc { font-size: 14px; color: var(--ink); line-height: 1.5; }
.incident__photo {
  width: 100%; height: 200px; object-fit: cover; cursor: zoom-in;
  padding: 5px; border-radius: 18px;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-sheen);
  opacity: 0; transition: opacity .5s ease;
}
.incident__photo.in { opacity: 1; }
.incident__when { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.incident__when svg { color: var(--muted); }
.incident--empty .incident__none { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.incident--empty .incident__none svg { color: var(--ok); }

/* KPI de facturación (ancho completo, tappable) */
.kpi--bill {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 14px;
  text-align: left; cursor: pointer;
  background: linear-gradient(150deg, var(--turquoise-dark) 0%, var(--turquoise-deep) 100%);
  border: none;
  color: #fff;
}
.kpi--bill .kpi__ico { background: rgba(255,255,255,.18); color: #fff; margin-bottom: 0; flex: none; }
.kpi--bill .kpi__num { color: #fff; font-size: 26px; }
.kpi--bill .kpi__lbl { color: rgba(255,255,255,.9); margin-top: 3px; }
.kpi--bill .kpi__bill-cta {
  margin-left: auto; align-self: center; flex: none;
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 12.5px; font-weight: 700; color: #fff; opacity: .95;
}
.kpi--bill:active { transform: scale(.99); }

/* KPIs clickeables que navegan a su sección */
.kpi--link { cursor: pointer; transition: transform .14s ease, box-shadow .2s ease; }
.kpi--link:active { transform: scale(.985); }
.kpi__arrow {
  position: absolute; top: 13px; right: 12px;
  display: flex; color: var(--turquoise-dark); opacity: .45;
}
.kpi__arrow svg { width: 18px; height: 18px; }

/* ===== Inicio: información importante (clickeable) ===== */
#dash-extra { padding: 0 var(--gutter); display: flex; flex-direction: column; gap: 20px; margin-top: 6px; }
.dash-sec { display: flex; flex-direction: column; gap: 9px; }
.dash-sec__title { font-size: 14px; font-weight: 800; color: var(--ink); margin: 4px 2px 2px; }
.infocard {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  padding: 13px 14px; border-radius: 16px;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-sheen);
  cursor: pointer;
  transition: transform .14s ease, box-shadow .2s ease;
}
.infocard:active { transform: scale(.99); }
.infocard__ico {
  width: 40px; height: 40px; flex: none; border-radius: 12px;
  background: var(--turquoise-soft); color: var(--turquoise-dark);
  display: flex; align-items: center; justify-content: center;
}
.infocard__ico svg { width: 20px; height: 20px; }
.infocard__ico--warn { background: var(--warn-bg); color: var(--warn); }
.infocard__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.infocard__title { font-size: 14px; font-weight: 700; color: var(--ink); }
.infocard__sub {
  font-size: 12.5px; color: var(--muted); line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.infocard__chev { flex: none; color: var(--turquoise-dark); opacity: .4; display: flex; }
.infocard__chev svg { width: 18px; height: 18px; }
.infocard--alert { border-color: var(--warn); }

/* ===== Avatar de Perfil en el header ===== */
.appbar__avatar {
  width: 36px; height: 36px; flex: none; margin-left: 4px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--turquoise), var(--turquoise-deep));
  color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .3px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(60,122,117,.3);
  transition: transform .14s ease, box-shadow .2s ease;
}
.appbar__avatar:active { transform: scale(.92); }
.appbar__avatar.is-active { box-shadow: 0 0 0 3px var(--turquoise-soft2), 0 4px 12px rgba(60,122,117,.3); }

/* ===== Módulo Picking ===== */
.pickdest { display: flex; flex-direction: column; gap: 2px; margin: 14px 0 4px; }
.pickdest__name { font-size: 15px; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.pickdest__name svg { width: 15px; height: 15px; color: var(--turquoise-dark); }
.pickdest__tag { font-size: 12px; color: var(--muted); padding-left: 21px; }

.pickitems { padding: 2px 6px; }
.pickitem { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.pickitem:last-child { border-bottom: none; }
.pickitem__check {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  border: 2px solid var(--turquoise-soft2); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.pickitem__check svg { width: 15px; height: 15px; }
.pickitem--done .pickitem__check { background: var(--ok); border-color: var(--ok); }
.pickitem__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pickitem__name { font-size: 14px; font-weight: 700; color: var(--ink); }
.pickitem--done .pickitem__name { color: var(--muted); }
.pickitem__loc { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.pickitem__loc svg { width: 13px; height: 13px; color: var(--turquoise-dark); }
.pickitem__qty { font-size: 14px; font-weight: 800; color: var(--turquoise-dark); flex: none; }

/* estado de cuenta (sheet) */
.bill { display: flex; flex-direction: column; margin-bottom: 12px; }
.bill__row, .bill__total { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.bill__row span, .bill__total span { display: flex; flex-direction: column; font-size: 14px; font-weight: 600; color: var(--ink); }
.bill__row small { font-size: 11.5px; font-weight: 500; color: var(--muted); margin-top: 3px; }
.bill__row strong { font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.bill__total { border-bottom: none; border-top: 1.5px dashed var(--turquoise-soft2); margin-top: 4px; }
.bill__total span { font-size: 15px; font-weight: 800; }
.bill__total strong { font-size: 19px; color: var(--turquoise-dark); }
.bill__note { font-size: 11.5px; color: var(--muted); line-height: 1.45; margin: 0 0 16px; }

/* filas de acción en perfil (estado de cuenta / introducción) */
.profile__actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; text-align: left; }
.acct-row {
  display: flex; align-items: center; gap: 13px;
  width: 100%; padding: 14px 15px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-sm);
  transition: transform .14s ease;
}
.acct-row:active { transform: scale(.985); }
.acct-row__ico { width: 38px; height: 38px; flex: none; border-radius: 11px; background: var(--turquoise-soft); color: var(--turquoise-dark); display: flex; align-items: center; justify-content: center; }
.acct-row__txt { flex: 1; display: flex; flex-direction: column; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.acct-row__txt small { font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.acct-row__chev { color: var(--muted); flex: none; }

/* ---------- ONBOARDING de bienvenida (overlay, capturas reales) ---------- */
.onboarding { position: absolute; inset: 0; z-index: 110; display: none; }
.onboarding.is-open { display: flex; flex-direction: column; }
.onboarding__bg {
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 0%, #6fb6af 0%, var(--turquoise) 45%, var(--turquoise-dark) 100%);
}
.onboarding__skip {
  position: absolute; top: 18px; right: 18px; z-index: 2;
  color: #fff; font-size: 13.5px; font-weight: 700; opacity: .9;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(255,255,255,.14); backdrop-filter: blur(4px);
}
.onboarding__content {
  position: relative; z-index: 1;
  flex: 1; width: 100%; max-width: 460px; margin-inline: auto;
  display: flex; flex-direction: column; justify-content: center;
  padding: 24px 28px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  min-height: 0; /* permite que un flex item con overflow se achique en vez de desbordar .device */
}
.onboarding__track { flex: 1; display: flex; align-items: center; min-height: 0; }
.onboardslide { width: 100%; text-align: center; animation: rise .45s ease; }
.onboardslide__hero {
  position: relative;
  width: min(90vw, 360px); max-height: 44vh;
  aspect-ratio: 4 / 5;
  margin: 0 auto 20px;
  border-radius: 26px; overflow: hidden;
  box-shadow: 0 22px 44px rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.25);
}
.onboardslide__hero img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top; }
.onboardslide__ring {
  position: absolute; width: 54px; height: 54px; border-radius: 50%;
  border: 2.5px solid #fff; box-shadow: 0 0 0 6px rgba(255,255,255,.25);
  animation: onboardPulse 1.6s ease-in-out infinite;
}
@keyframes onboardPulse {
  0%, 100% { transform: scale(1); opacity: .95; }
  50% { transform: scale(1.12); opacity: .6; }
}
.onboardslide__title { margin: 0 0 12px; font-size: 24px; font-weight: 800; color: #fff; line-height: 1.15; }
.onboardslide__text { margin: 0; font-size: 15px; line-height: 1.5; color: rgba(255,255,255,.92); max-width: 300px; margin-inline: auto; }
.onboarding__progress { display: flex; justify-content: center; gap: 5px; margin: 20px 0 20px; }
.onboardseg { width: 20px; height: 4px; border-radius: 999px; background: rgba(255,255,255,.35); transition: background .25s ease; }
.onboardseg.is-active, .onboardseg.is-done { background: #fff; }
.onboarding__next { background: #fff; color: var(--turquoise-dark); box-shadow: 0 10px 26px rgba(0,0,0,.2); }
.onboarding__next:active { transform: scale(.98); }

/* ===================== Login error + nota de inventario ===================== */
.login__error {
  margin: 2px 2px 0; padding: 9px 12px; border-radius: 10px;
  background: var(--err-bg, #fdecec); color: var(--err, #c0392b);
  font-size: 12.5px; font-weight: 600; text-align: center;
}
.inv-updated { margin: 12px 2px 0; font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* ===================== Operaciones (recepción/picking/despacho con fotos) ===================== */
.opcard {
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px 15px;
  box-shadow: var(--glass-shadow), var(--glass-sheen);
  opacity: 0; transform: translateY(14px); animation: card-in .5s ease forwards;
}
.opcard__title { font-size: 15.5px; font-weight: 700; color: var(--ink); margin: 8px 0 0; }
.opcard__note { font-size: 14.5px; color: var(--ink); font-weight: 600; margin: 8px 0 0; line-height: 1.45; }
.opcard__photos { display: flex; gap: 8px; overflow-x: auto; margin: 10px 0 2px; padding-bottom: 3px; }
.opcard__thumb {
  width: 96px; height: 96px; object-fit: cover; border-radius: 12px; flex-shrink: 0;
  border: 1px solid var(--line); cursor: pointer; background: var(--turquoise-soft);
}
.opcard__nophoto {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 2px;
  font-size: 12.5px; color: var(--muted); font-weight: 600;
}
.opcard__nophoto svg { width: 16px; height: 16px; }

/* ===================== Operaciones por etapa ===================== */
.opstage { margin-top: 2px; }
.opstage .cfield__label { display: block; margin-bottom: 6px; }
.opstage__input { margin-bottom: 4px; }
.opstage-view { margin-top: 10px; }
.opstage-view__lbl {
  display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
  color: var(--turquoise-dark); background: var(--turquoise-soft); padding: 3px 9px; border-radius: 999px; margin-bottom: 6px;
}

/* ===================== Captura por cámara (operador) ===================== */
.op-shot-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  background: var(--turquoise-soft); color: var(--turquoise-dark);
  border: 1.5px dashed var(--turquoise-soft2); border-radius: 12px;
  padding: 11px 14px; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.op-shot-btn svg { width: 18px; height: 18px; }
.op-shot-btn:active { transform: scale(.99); }
.opstage__shots { display: flex; flex-wrap: wrap; gap: 8px; }
.opstage__shots:not(:empty) { margin-bottom: 8px; }
.op-thumb { position: relative; width: 72px; height: 72px; }
.op-thumb img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.op-thumb__rm {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%;
  background: #c0392b; color: #fff; border: 2px solid #fff; font-size: 14px; font-weight: 700;
  line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.op-thumb__rm::before { content: ""; position: absolute; inset: -11px; }

/* KPIs de inventario a 2 columnas + SKU sutil en tarjeta */
.invkpis--2 { grid-template-columns: 1fr 1fr; }
.invcard__sku { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 8px; display: inline-block; }

/* ===================== Tarjeta de operación (cliente) — rediseño ===================== */
.opcard__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.opcard__headl { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.opcard__type { font-size: 17px; font-weight: 800; color: var(--ink); }
.opcard__ref { font-size: 13.5px; font-weight: 700; color: var(--turquoise-dark); }
.opcard__date { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.opcard__date svg { width: 15px; height: 15px; }
.opgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.opgrid--single { grid-template-columns: 1fr; }
/* Foto de evidencia con marco liquid glass */
.opshot {
  position: relative;
  margin: 0; /* <figure> trae margen por defecto del navegador (1em 40px) y encogía la foto */
  padding: 5px;
  border-radius: 19px;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-sheen);
  overflow: hidden;
}
.opshot__img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; cursor: zoom-in; border-radius: 14px; background: var(--turquoise-soft); }
.opshot__cap {
  position: absolute; left: 5px; right: 5px; bottom: 5px;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 8px 10px; border-radius: 0 0 14px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,0));
}
.opshot__stage { font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); text-transform: uppercase; letter-spacing: .3px; }
.opshot__time { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.opshot__time svg { width: 12px; height: 12px; }

/* ===================== Desglose vertical por etapa (timeline) ===================== */
.opstages { margin-top: 12px; }
.opstg { position: relative; padding-left: 26px; padding-bottom: 16px; }
.opstg:last-child { padding-bottom: 0; }
.opstg__dot {
  position: absolute; left: 3px; top: 2px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--white); border: 2.5px solid var(--turquoise-soft2); z-index: 1;
}
.opstg--done .opstg__dot { background: var(--turquoise); border-color: var(--turquoise); }
.opstg::before {
  content: ""; position: absolute; left: 9px; top: 4px; bottom: -2px; width: 2px; background: var(--turquoise-soft2);
}
.opstg--last::before { display: none; }
.opstg__lbl { font-size: 13px; font-weight: 800; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.opstg--done .opstg__lbl { color: var(--turquoise-dark); }
.opstg__count { font-size: 11px; font-weight: 700; color: var(--turquoise-dark); background: var(--turquoise-soft); border-radius: 999px; padding: 1px 8px; }
.opstg__empty { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.opstg__photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-top: 10px; }
.opstg__photos .opshot__img { height: 230px; }
.opshot__cap { justify-content: flex-end; }

/* ===================== TARJETA DE OPERACIÓN DEL CLIENTE — "comprobante" =====================
   Un solo componente para recepción (--in), despacho (--out), picking (--pick) y
   llegada anunciada (--pa). El acento se cambia por variables, no duplicando reglas.
   Spec: docs/superpowers/specs/2026-08-12-rediseno-tarjetas-operaciones-design.md
   .opc--compact queda reservada para migrar las vistas del operador (paso 2). */
.opc {
  --opc-accent: var(--turquoise-dark);
  --opc-soft: var(--turquoise-soft);
  --opc-soft2: var(--turquoise-soft2);
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 18px 18px 16px;
  box-shadow: var(--glass-shadow), var(--glass-sheen);
  opacity: 0; transform: translateY(14px); animation: card-in .5s ease forwards;
  transition: transform .14s ease;
}
.opc:active { transform: scale(.99); }
.opc--out, .opc--pick { --opc-accent: var(--orange-dark); --opc-soft: var(--orange-soft); --opc-soft2: #f2d3b4; }
.opc--recibido { --opc-accent: #2e8f63; --opc-soft: #e4f5ec; --opc-soft2: #c4e7d5; border-color: rgba(46,158,111,.30); }

/* Cejilla: tipo de operación + referencia, y la fecha a la derecha */
.opc__kick { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.opc__kickl { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--opc-accent); }
.opc__kickl svg { width: 17px; height: 17px; flex: none; }
.opc__type { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--opc-accent); }
.opc__ref { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.opc__date { flex: none; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }

/* Titular: la cifra manda. Si no hay cifra (picking sin líneas, pre-aviso),
   el título de la operación ocupa su lugar en tamaño intermedio. */
.opc__fig { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.opc__num { font-size: 38px; font-weight: 800; color: var(--ink); line-height: 1; letter-spacing: -1.2px; }
.opc__unit { font-size: 17px; font-weight: 700; color: var(--muted); }
.opc__figtxt { font-size: 24px; font-weight: 800; color: var(--ink); line-height: 1.15; letter-spacing: -.4px; }
.opc__sub { display: block; margin-top: 7px; font-size: 15px; font-weight: 600; color: var(--muted); }
.opc__note { display: block; margin: 12px 0 0; font-size: 15.5px; font-weight: 600; color: var(--ink); line-height: 1.4; }

/* Líneas de producto */
.opc__lines { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.opc__line {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--opc-soft); border: 1px solid var(--opc-soft2);
  border-radius: 14px; padding: 13px 15px;
}
.opc__linfo { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.opc__lname { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.opc__lloc { font-size: 14px; font-weight: 600; color: var(--muted); }
.opc__lqty { flex: none; font-size: 20px; font-weight: 800; color: var(--opc-accent); white-space: nowrap; }
.opc__luom { font-size: 13.5px; font-weight: 700; color: var(--muted); }
.opc__rest { margin-top: 9px; font-size: 14px; font-weight: 700; color: var(--opc-accent); }

/* Evidencia: tira horizontal de fotos. El tamaño está pensado para que entren
   dos por pantalla y asome la tercera (así se ve que la tira se desliza).
   Con una sola foto la tira se convierte en una foto a lo ancho de la tarjeta. */
.opc__ev { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; overflow-x: auto; padding-bottom: 2px; }
.opc__thumb { margin: 0; flex: none; width: 140px; position: relative; }
.opc__thumbimg {
  width: 100%; height: 140px; object-fit: cover; display: block; cursor: zoom-in;
  border-radius: 16px; border: 1px solid var(--glass-border); background: var(--opc-soft);
}
.opc__thumbcap {
  position: absolute; left: 8px; bottom: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 800; color: #fff;
  background: rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.opc__thumbcap svg { width: 12px; height: 12px; }
.opc__more {
  flex: none; width: 84px; height: 140px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; color: var(--opc-accent);
  background: var(--opc-soft); border: 1px dashed var(--opc-soft2);
}
/* Foto única: a lo ancho, en formato apaisado */
.opc__ev--one .opc__thumb { width: 100%; flex: 1 1 auto; }
.opc__ev--one .opc__thumbimg { height: auto; aspect-ratio: 16 / 10; border-radius: 18px; }
.opc__noev { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--muted); }

/* Pie */
.opc__foot { display: flex; justify-content: flex-end; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--glass-border); }
.opc__go { display: inline-flex; align-items: center; gap: 4px; font-size: 14.5px; font-weight: 800; color: var(--opc-accent); }
.opc__go svg { width: 17px; height: 17px; }

/* Chip de estado (solo llegadas anunciadas) */
.opc__chip { flex: none; font-size: 12.5px; font-weight: 800; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.opc__chip--enviado { color: #9a6a12; background: #fbeccd; }
.opc__chip--visto { color: #1f6f86; background: #d6eef6; }
.opc__chip--recibido { color: #226b49; background: #d2f0df; }
.opc__chip--cancelado { color: #7a7a7a; background: #ececec; }
.opc--pa { margin-bottom: 12px; }

/* ===================== Hoja de detalle de la operación ===================== */
.opd { padding-bottom: 6px; }
.opd .opc__fig { margin-top: 12px; }
.opd .pad-tiles { margin-top: 18px; }
.opd__x {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: none;
  background: var(--turquoise-soft); color: var(--turquoise-dark);
  font-size: 22px; line-height: 1; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.opd__sec {
  margin: 24px 0 10px; font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .6px; color: var(--opc-accent);
}
.opd__close { margin-top: 24px; }

/* ===================== Contenido del movimiento (productos del WMS) ===================== */
.movcontent { margin-top: 12px; }
.movcontent__h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--turquoise-dark); margin-bottom: 8px; }
.movcontent__h svg { width: 14px; height: 14px; }
/* sin scroll propio: una lista con overflow dentro de una tarjeta dentro del
   scroll de la página se traga el gesto en celular. Manda el scroll de la página. */
.movcontent__list { display: flex; flex-direction: column; gap: 8px; }
.movrow {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--turquoise-soft); border: 1px solid var(--turquoise-soft2);
  border-radius: 10px; padding: 11px 13px; font-size: 15px;
}
.movrow__l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.movrow__name { color: var(--ink); font-weight: 600; }
.movrow__loc { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.movrow__qty { color: var(--turquoise-dark); font-weight: 800; white-space: nowrap; font-size: 16px; }
.movrow__uom { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.movrow__sku { color: var(--muted); font-weight: 600; font-size: 11.5px; }
.movcontent__alm {
  margin-left: auto; text-transform: none; letter-spacing: 0;
  font-size: 11px; font-weight: 800; color: var(--turquoise-dark);
  background: var(--turquoise-soft); border: 1px solid var(--turquoise-soft2);
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}

/* Líneas de producto del pre-aviso (cliente/operador) + formulario de recepción */
.opcard__items { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.pa-recline { display: grid; grid-template-columns: 1fr 78px 64px 38px; gap: 6px; align-items: center; margin-bottom: 8px; }
.pa-recline .field__input { margin: 0; }
.pa-recline__rm {
  border: none; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0;
  position: relative; width: 38px; height: 38px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
/* Amplía el área táctil real (~44px) sin invadir las columnas vecinas de la fila */
.pa-recline__rm::before { content: ""; position: absolute; inset: -6px 0; }

/* ===================== Botón eliminar foto (operador) ===================== */
.opshot__del {
  position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(192,57,43,.92); color: #fff; border: 1.5px solid #fff; font-size: 15px; font-weight: 700;
  line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
/* Amplía el área táctil a ~44x44 sin agrandar el círculo visual sobre la foto */
.opshot__del::before { content: ""; position: absolute; inset: -9px; }

/* ===================== Botón exportar PDF (inventario) ===================== */
.invexport { display: flex; justify-content: flex-end; margin: 18px 0 16px; }
.invexport__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: auto; height: 40px; padding: 0 16px; font-size: 13.5px; font-weight: 700; line-height: 1; border-radius: 12px;
}
.invexport__btn svg { flex-shrink: 0; }

/* ===================== Reporte PDF ===================== */
/* Fuera de pantalla: html2pdf lo captura; ancho ~A4 a 96dpi */
/* pointer-events:none para que este bloque no pueda robarse un toque nunca:
   vive fuera de pantalla, pero si algo lo movía quedaba la app "muerta". */
#print-report { position: fixed; left: -10000px; top: 0; width: 794px; background: #fff; pointer-events: none; }
@media print {
  .device, #lightbox, .sheet, .sheet-backdrop, #intro, #toast, .bg-blobs { display: none !important; }
  #print-report { position: static; left: auto; width: auto; pointer-events: auto; }
  html, body { background: #fff !important; }
  @page { margin: 14mm; }
}
.prep { font-family: 'Inter', system-ui, sans-serif; color: #1c2b2a; -webkit-print-color-adjust: exact; print-color-adjust: exact; padding: 6px 4px; }
.prep__head { display: flex; align-items: center; gap: 20px; border-bottom: 3px solid #509D97; padding-bottom: 18px; margin-bottom: 24px; }
.prep__logo { width: auto; height: 76px; object-fit: contain; }
.prep__ht h1 { font-size: 30px; font-weight: 800; color: #2c5d59; margin: 0; letter-spacing: -.3px; }
.prep__ht p { font-size: 16px; color: #6b817f; margin: 6px 0 0; font-weight: 600; }
.prep__kpis { display: flex; gap: 16px; margin-bottom: 8px; }
.prep__kpi { flex: 1; border: 1px solid #e6edec; border-radius: 14px; padding: 16px 18px; }
.prep__kpinum { display: block; font-size: 32px; font-weight: 800; color: #509D97; line-height: 1; }
.prep__kpilbl { font-size: 14px; color: #6b817f; font-weight: 600; }
.prep__h2 { font-size: 19px; font-weight: 800; color: #2c5d59; margin: 26px 0 14px; }
.prep__chartrow { display: flex; align-items: center; gap: 34px; }
.prep__chartrow .donut, .prep__chartrow .donut__svg { width: 240px; height: 240px; flex-shrink: 0; }
.prep__chartrow .donut__num { font-size: 34px; }
.prep__chartrow .donut__lbl { font-size: 15px; }
.prep-leg { display: flex; flex-direction: column; gap: 11px; flex: 1; }
.prep-leg__row { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.prep-leg__dot { width: 15px; height: 15px; border-radius: 5px; flex-shrink: 0; }
.prep-leg__name { font-weight: 700; flex: 1; }
.prep-leg__val { color: #6b817f; font-weight: 600; white-space: nowrap; }
.prep__table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.prep__table th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: #6b817f; border-bottom: 2px solid #509D97; padding: 11px 8px; }
.prep__table th.num, .prep__table td.num { text-align: right; }
.prep__table td { font-size: 16px; padding: 11px 8px; border-bottom: 1px solid #e6edec; }
.prep__table td.num { font-weight: 700; color: #2c5d59; }
.prep__foot { margin-top: 26px; padding-top: 14px; border-top: 1px solid #e6edec; font-size: 13px; color: #6b817f; text-align: center; }

/* ===================== Filtro de fecha por módulo (cliente) ===================== */
.datefilter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px;
  margin: var(--stack-lg) var(--gutter) var(--stack); }
.datefilter__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.dfchip {
  border: 1px solid var(--line); background: var(--white); color: var(--muted);
  border-radius: 999px; padding: 8px 16px; min-height: 44px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center;
  transition: background .15s, color .15s, border-color .15s;
}
.dfchip:hover { background: var(--turquoise-soft); color: var(--turquoise-dark); }
.dfchip.is-active { background: var(--turquoise-dark); border-color: var(--turquoise-dark); color: #fff; }
.datefilter__custom { display: flex; gap: 10px; flex-wrap: wrap; }
.datefilter__f { display: flex; flex-direction: column; gap: 5px; }
.datefilter__f span { font-size: 11px; font-weight: 700; color: var(--muted); padding-left: 2px; }
.datefilter__f input {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; font-size: 16px;
  font-family: inherit; color: var(--ink); background: var(--white);
}

/* Listas de operaciones: vertical en celular, horizontal en PC */
@media (min-width: 768px) {
  .list--ops {
    flex-direction: row; flex-wrap: nowrap; align-items: flex-start;
    overflow-x: auto; overflow-y: visible; padding-bottom: 16px;
    scroll-snap-type: x proximity;
  }
  .list--ops > .opcard { min-width: 340px; max-width: 340px; scroll-snap-align: start; }
  /* las tarjetas con fotos de evidencia necesitan más ancho: si no, las fotos
     quedan en una sola columna larguísima hacia abajo en vez de agruparse */
  .list--ops > .opcard:has(.opgrid),
  .list--ops > .opcard:has(.opstg__photos) { min-width: 560px; max-width: 560px; }
  /* la tarjeta nueva del cliente ya es un resumen (las fotos van al detalle),
     así que mantiene un ancho fijo cómodo sin importar cuánto contenga */
  .list--ops > .opc { min-width: 380px; max-width: 380px; scroll-snap-align: start; }
  .list--ops > .inv-empty { min-width: 280px; }
}

/* ===================== Logo del cliente dentro del hero de Inicio ===================== */
.hero--logo { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hero--logo .hero__txt { min-width: 0; }
.hero__logo:empty { display: none; }
.hero__logo {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  padding: 12px 16px; border-radius: 20px;
  /* sin relleno blanco: el turquesa se ve a través; marco fino de vidrio */
  border: 1px solid rgba(255, 255, 255, .38);
  box-shadow: 0 12px 30px rgba(16, 28, 27, .22), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.hero__logo img {
  display: block; height: 108px; max-width: 220px; object-fit: contain;
  mix-blend-mode: multiply; /* el fondo blanco del logo se funde con el turquesa */
}
@media (max-width: 480px) {
  .hero__logo { padding: 9px 12px; border-radius: 15px; }
  .hero__logo img { height: 74px; max-width: 132px; }
}

/* ===================== Mini-gráfico de actividad por mes (Inicio) ===================== */
.actchart { margin-top: 4px; }
.actsvg { width: 100%; height: auto; display: block; }
.actsvg .actx { font-size: 11px; fill: var(--muted); font-weight: 700; }
.actmini { display: flex; gap: 12px; }
.actmini__b { flex: 1; text-align: center; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.actmini__n { display: block; font-size: 28px; font-weight: 800; line-height: 1; }
.actmini__l { font-size: 12px; color: var(--muted); font-weight: 600; }
.actlegend { display: flex; gap: 18px; justify-content: center; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.actdot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.actdot--rec { background: var(--turquoise); }
.actdot--des { background: var(--orange); }

/* ============================================================
   PANEL GERENTE
   ============================================================ */
.invkpis--3 { grid-template-columns: repeat(3, 1fr); }

/* Barra de ocupación segmentada */
.gbar {
  display: flex; height: 16px; border-radius: 9px; overflow: hidden;
  background: var(--turquoise-soft); border: 1px solid var(--line);
}
.gbar__seg { height: 100%; min-width: 1px; }
.gbar__seg--free { background: repeating-linear-gradient(45deg, var(--gray-soft) 0 5px, #f4f6f8 5px 10px); }

/* Leyenda clickeable */
.leg__row--btn {
  width: 100%; border: 0; background: none; text-align: left; cursor: pointer;
  border-radius: 9px; padding: 5px 6px; margin: -3px -6px; transition: background .14s ease;
}
.leg__row--btn:active { background: var(--turquoise-soft); }
.leg__dot--free {
  width: 11px; height: 11px; border-radius: 4px; flex-shrink: 0;
  background: repeating-linear-gradient(45deg, var(--gray-soft) 0 3px, #f4f6f8 3px 6px);
}

/* Nota de "datos de ejemplo" */
.gnote {
  display: flex; align-items: center; gap: 8px; margin: 14px 2px 4px;
  font-size: 12.5px; color: var(--muted); line-height: 1.35;
}
.gnote svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--orange-dark); }

/* Grilla de posiciones */
.gposgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gpos {
  --gpos-c: var(--turquoise);
  position: relative; display: flex; flex-direction: column; gap: 2px;
  padding: 9px 8px; border-radius: 12px; cursor: pointer; text-align: left;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gpos-c);
  transition: transform .14s ease;
}
.gpos:active { transform: scale(.97); }
.gpos__code { font-size: 12.5px; font-weight: 800; color: var(--ink); letter-spacing: .2px; }
.gpos__cli { font-size: 11px; font-weight: 700; color: var(--muted); }
.gpos--free { border-left-color: var(--gray-soft); background: #fafbfc; opacity: .9; }
.gpos--free .gpos__cli { color: var(--turquoise-dark); }

/* Filas de cliente */
.grow {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 14px; margin-bottom: 10px; transition: transform .14s ease;
  animation: cardIn .4s ease both;
}
.grow:active { transform: scale(.99); }
.grow--flat { margin: 0; box-shadow: none; }
.grow__av {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800;
}
.grow__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.grow__name { font-size: 15px; font-weight: 800; color: var(--ink); }
.grow__sub { font-size: 12px; color: var(--muted); }
.grow__bar { height: 6px; border-radius: 4px; background: var(--turquoise-soft); overflow: hidden; margin-top: 3px; }
.grow__bar-fill { display: block; height: 100%; border-radius: 4px; }
.grow__val {
  display: flex; flex-direction: column; align-items: flex-end; font-size: 15px; font-weight: 800;
  color: var(--turquoise-dark); flex-shrink: 0;
}
.grow__val small { font-size: 10px; font-weight: 600; color: var(--muted); }
.grow__chev { color: var(--turquoise-dark); display: flex; flex-shrink: 0; }

/* Bodies del gerente — contenedor con espaciado uniforme (evita que los paneles
   se peguen / se monten unos sobre otros). #g-clientes-body se excluye: su .list
   ya trae su propio padding/gap. */
#g-detalle-body,
#g-inicio-body,
#g-bodega-body,
#g-inventario-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: var(--stack) var(--gutter) 0;
}
/* hijos que ya traían su propio espaciado: se neutraliza para no duplicar */
#g-inicio-body .kpis { padding: 0; }
#g-inicio-body .gnote,
#g-bodega-body .gnote,
#g-inventario-body .gnote { margin: 2px 0 0; }
.gback {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  border: 0; background: var(--turquoise-soft);
  color: var(--turquoise-dark); font-weight: 700; font-size: 13.5px; padding: 7px 13px 7px 9px;
  border-radius: 20px; cursor: pointer; margin-bottom: 2px;
}
.gback:active { transform: scale(.98); }
.gdetail-head { margin-bottom: 2px; }
/* En Bodega 3D estos dos son hijos directos de la .view y quedaban pegados al
   borde (en el panel del gerente los envuelve un #g-*-body que ya trae inset). */
#view-bodega3d > .gback { margin: var(--stack) 0 0 var(--gutter); }
#view-bodega3d > .gdetail-head { margin: 10px var(--gutter) 2px; }
.gdetail-head__t { font-size: 21px; font-weight: 800; color: var(--ink); margin: 0; }
.gdetail-head__s { font-size: 13px; color: var(--muted); margin: 4px 0 0; }

/* Lista de inventario en el detalle */
.ginvlist { display: flex; flex-direction: column; }
.ginvrow {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-top: 1px solid var(--line);
}
.ginvrow:first-child { border-top: 0; }
.ginvrow--flat { border-top: 0; padding: 4px 0 0; }
.ginvrow__main { min-width: 0; }
.ginvrow__name { display: block; font-size: 14px; font-weight: 700; color: var(--ink); }
.ginvrow__meta { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ginvrow__nums { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.ginvrow__u { font-size: 14px; font-weight: 800; color: var(--ink); }
.ginvrow__p { font-size: 11.5px; font-weight: 700; color: var(--turquoise-dark); }

/* Meta de una posición */
.gposmeta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gposmeta__row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--turquoise-soft); border-radius: 12px; padding: 11px 14px;
}
.gposmeta__row span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.gposmeta__row strong { font-size: 18px; font-weight: 800; color: var(--turquoise-dark); }

/* ---- Leyenda de bodega (chips por cliente) ---- */
.gmap-leg { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: 14px; }
.gchip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.gchip__dot { width: 11px; height: 11px; border-radius: 4px; flex-shrink: 0; }
.gchip__dot--free { background: #eef2f4; border: 1px solid #dfe6e9; }

/* ---- Vista 3D de racks ---- */
.g3d {
  width: 100%; border-radius: 14px; overflow: hidden; background: #eaf3f1;
  border: 1px solid var(--turquoise-soft2); min-height: 280px; position: relative;
  touch-action: none;
}
.g3d canvas { display: block; width: 100% !important; height: auto !important; cursor: grab; }
.g3d canvas:active { cursor: grabbing; }
.g3d-fallback {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13.5px;
}
.g3d-fallback svg { width: 26px; height: 26px; color: var(--orange-dark); }

/* ---- Gemelo digital 1ª persona (overlay sobre el 3D) ---- */
.g3d { cursor: grab; }
.g3d:active { cursor: grabbing; }
.g3d-canvas { pointer-events: none; }
.g3d-ui { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.g3d-ui button { pointer-events: auto; }

.g3d-enter {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(28,43,42,.82); color: #fff; border: 0; backdrop-filter: blur(8px);
  font-size: 14px; font-weight: 700; padding: 11px 18px; border-radius: 24px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.22);
}
.g3d-enter:active { transform: translateX(-50%) scale(.97); }
/* El display de la regla de arriba le ganaba al atributo [hidden], así que el
   botón seguía visible dentro de la primera persona. */
.g3d-enter[hidden] { display: none; }

.g3d-reticle {
  position: absolute; left: 50%; top: 50%; width: 18px; height: 18px;
  transform: translate(-50%,-50%); border: 2px solid rgba(255,255,255,.85);
  border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.25); opacity: .8;
}
.g3d-reticle::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 3px; height: 3px;
  transform: translate(-50%,-50%); background: #fff; border-radius: 50%;
}
.g3d-joy {
  position: absolute; left: 18px; bottom: 18px; width: 96px; height: 96px;
  border-radius: 50%; background: rgba(255,255,255,.16); border: 1.5px solid rgba(255,255,255,.5);
  backdrop-filter: blur(6px); pointer-events: none;
}
.g3d-joy-knob {
  position: absolute; left: 50%; top: 50%; width: 42px; height: 42px;
  transform: translate(-50%,-50%); border-radius: 50%;
  background: rgba(80,157,151,.92); border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.25);
}
.g3d-fpbtns { position: absolute; right: 14px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.g3d-gyro, .g3d-exit {
  background: rgba(28,43,42,.82); color: #fff; border: 0; backdrop-filter: blur(8px);
  font-size: 12.5px; font-weight: 700; padding: 9px 14px; border-radius: 18px; cursor: pointer;
}
.g3d-gyro.is-on { background: var(--turquoise); }
.g3d-exit { background: rgba(192,57,43,.85); }
.g3d-hint {
  position: absolute; left: 50%; top: 12px; transform: translateX(-50%);
  background: rgba(28,43,42,.6); color: #fff; font-size: 11px; font-weight: 600;
  padding: 5px 12px; border-radius: 14px; white-space: nowrap; backdrop-filter: blur(6px);
}

/* ===== Mejoras UI/UX (jun 2026) ===== */
.invcard__meta { margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.invcard__warn { display: inline-block; margin-left: 4px; font-size: 10.5px; font-weight: 800; color: #c0392b; background: #fdecea; border-radius: 999px; padding: 1px 8px; }
.prep__table td.num, .prep__table th.num { font-variant-numeric: tabular-nums; }
button:not(:disabled) { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--turquoise); outline-offset: 2px; border-radius: 6px; }

/* ============================================================
   PRE-AVISOS
   ============================================================ */
.pa-chip { display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:800;
  letter-spacing:.2px; padding:3px 10px; border-radius:999px; white-space:nowrap; }
.pa-chip::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
.pa--enviado   { color:#9a6a12; background:#fbeccd; }
.pa--visto     { color:#1f6f86; background:#d6eef6; }
.pa--recibido  { color:#2e6b4f; background:#d6f0e0; }
.pa--cancelado { color:#7a7a7a; background:#ececec; }

/* Tarjeta CTA en el Inicio del cliente */
.pa-cta { display:flex; flex-direction:column; gap:12px; padding:16px; margin:0 16px 14px;
  border-radius:18px; background:var(--glass-bg-strong); border:1px solid var(--glass-border);
  -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); box-shadow:var(--glass-shadow); }
.pa-cta__h { display:flex; align-items:center; gap:9px; }
.pa-cta__t { font-size:15px; font-weight:800; color:var(--ink); }
.pa-cta__s { font-size:12px; font-weight:600; color:var(--muted); margin-top:1px; }
.pa-cta__btn { height:46px; border:none; border-radius:13px; font-size:14.5px; font-weight:800;
  color:#fff; cursor:pointer; background:linear-gradient(135deg,var(--turquoise) 0%,var(--turquoise-deep) 100%);
  box-shadow:0 8px 20px rgba(80,157,151,.3); }
.pa-cta__list { display:flex; flex-direction:column; gap:8px; }

/* Tarjeta de pre-aviso (lista cliente y banda operador) */
.pa-card { width:100%; text-align:left; cursor:pointer; border:1.5px solid var(--line);
  background:#fff; border-radius:15px; padding:13px 14px; margin-bottom:10px; }
.pa-card__top { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:6px; }
.pa-card__prov { font-size:14.5px; font-weight:800; color:var(--ink); }
.pa-card__meta { display:flex; flex-wrap:wrap; gap:4px 12px; font-size:12px; color:var(--muted); font-weight:600; }
.pa-card__meta b { color:var(--ink); }

/* Banda "En camino" (operador) */
.pa-band { margin:0 0 14px; }
#op-encamino { padding: 18px var(--gutter) 0; }
#op-encamino:empty { display: none; }
/* Banda de llegadas anunciadas dentro de la Recepción del cliente */
#rec-preavisos { padding: 16px 16px 4px; }
#rec-preavisos:empty { display: none; }

/* Tarjeta "Anunciar llegada" al tope de Mis llegadas: comparte los márgenes de
   .rpa-band para que quede alineada con las tarjetas de abajo. */
.dstat--cta { margin: var(--stack) var(--gutter) 0; }

.rpa-band { margin: var(--stack) var(--gutter) 0; }
.rpa-band__head { display: flex; align-items: center; gap: 10px; margin: 0 2px 12px; }
.rpa-band__title { font-size: 16.5px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; }
.rpa-band__count { margin-left: auto; font-size: 12.5px; font-weight: 800; color: #fff;
  background: var(--turquoise-deep); border-radius: 999px; padding: 3px 12px; }

/* La tarjeta de llegada anunciada usa el componente .opc (ver arriba); acá solo
   queda su pista de avance, que es lo propio de este tipo de tarjeta. */

/* Pista de avance: Anunciado → Visto → Recibido */
.rpa__track { display: flex; align-items: flex-start; margin-top: 16px; max-width: 440px; }
.rpa__step { display: flex; flex-direction: column; align-items: center; gap: 7px; flex: none; width: 66px; }
.rpa__dot { width: 14px; height: 14px; border-radius: 50%; background: #fff;
  border: 2.5px solid var(--turquoise-soft2); }
.rpa__lbl { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.rpa__bar { flex: 1; height: 3px; border-radius: 3px; background: var(--turquoise-soft2); margin: 6px 4px 0; }
.rpa__step.is-done .rpa__dot { background: var(--turquoise); border-color: var(--turquoise); }
.rpa__step.is-done .rpa__lbl { color: var(--ink); }
.rpa__bar.is-done { background: var(--turquoise); }
.opc--recibido .rpa__step.is-done .rpa__dot { background: #2e9e6f; border-color: #2e9e6f; }
.opc--recibido .rpa__bar.is-done { background: #2e9e6f; }
.pa-band__head { display:flex; align-items:center; gap:8px; margin:0 2px 9px; }
.pa-band__title { font-size:11.5px; font-weight:800; letter-spacing:.5px; text-transform:uppercase; color:var(--turquoise-dark); }
.pa-band__count { font-size:11px; font-weight:800; color:#fff; background:var(--turquoise-deep);
  border-radius:999px; padding:1px 8px; }

/* Línea de tiempo de estados (detalle) */
.pa-tl { display:flex; flex-direction:column; gap:0; margin:14px 0; }
.pa-tl__step { display:flex; gap:11px; align-items:flex-start; }
.pa-tl__col { display:flex; flex-direction:column; align-items:center; }
.pa-tl__dot { width:14px; height:14px; border-radius:50%; border:2.5px solid var(--turquoise);
  background:#fff; margin-top:2px; }
.pa-tl__step.is-done .pa-tl__dot { background:var(--turquoise); }
.pa-tl__line { width:2px; flex:1; min-height:22px; background:var(--turquoise-soft2); }
.pa-tl__step:last-child .pa-tl__line { display:none; }
.pa-tl__body { padding-bottom:14px; }
.pa-tl__t { font-size:13.5px; font-weight:800; color:var(--ink); }
.pa-tl__s { font-size:11.5px; font-weight:600; color:var(--muted); margin-top:1px; }

/* Fila de documento PDF */
.pa-pdf { display:flex; align-items:center; gap:10px; width:100%; text-align:left; cursor:pointer;
  border:1.5px solid var(--line); background:#fff; border-radius:13px; padding:11px 13px; margin:8px 0; }
.pa-pdf__ico { width:34px; height:34px; border-radius:9px; display:grid; place-items:center;
  background:#fce8e6; color:#c0392b; font-size:11px; font-weight:900; }
.pa-pdf__n { font-size:13.5px; font-weight:700; color:var(--ink); }

/* Volver a Inicio (cabecera de la vista pre-avisos) */
.pa-back { display:inline-flex; align-items:center; gap:6px; background:none; border:none; cursor:pointer;
  color:var(--turquoise-dark); font-size:13.5px; font-weight:800; padding:4px 2px;
  margin:0 var(--gutter) 6px; }

.pa-empty { text-align:center; color:var(--muted); font-weight:600; font-size:13.5px; padding:34px var(--gutter); }
/* Lista de llegadas de la vista Pre-avisos. El hero de esa vista es full-bleed
   a propósito, por eso el inset va acá y no en #preavisos-body. */
.pa-list { padding: var(--stack) var(--gutter) 0; }

/* ============================================================
   PRE-AVISO · DETALLE (vista cliente, rediseño jun 2026)
   Letra más grande, info en tarjetas, seguimiento legible.
   ============================================================ */
.pad-hero { padding-bottom: 26px; }
.pad-hero__h { font-size: 30px; line-height: 1.12; margin-top: 8px; }
.pad-hero .pa-chip { font-size: 12.5px; padding: 5px 13px; }

.pad-body { padding: var(--stack) var(--gutter) 8px; display: flex; flex-direction: column; gap: var(--stack); }

/* Tarjetas de datos clave */
.pad-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pad-tile { background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--glass-border); border-radius: 16px; padding: 15px 16px;
  display: flex; flex-direction: column; gap: 6px; box-shadow: var(--glass-shadow); }
.pad-tile:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.pad-tile__lbl { font-size: 12.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .4px; }
.pad-tile__val { font-size: 21px; font-weight: 800; color: var(--ink); letter-spacing: -.3px; }

/* Fila PDF (más grande) */
.pad-pdf { border-radius: 16px; padding: 14px 16px; margin: 0;
  border: 1px solid var(--glass-border); background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--glass-shadow); }
.pad-pdf .pa-pdf__ico { width: 40px; height: 40px; border-radius: 11px; font-size: 12px; }
.pad-pdf .pa-pdf__n { font-size: 15px; }
.pad-pdf__go { margin-left: auto; font-size: 14px; font-weight: 800; color: var(--turquoise-dark); }

/* Tarjeta de seguimiento (timeline) */
.pad-tl-card { background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--glass-border); border-radius: 18px; padding: 18px 18px 6px;
  box-shadow: var(--glass-shadow); }
.pad-tl-card__h { font-size: 13px; font-weight: 800; color: var(--turquoise-dark);
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: 14px; }
.pad-tl-card .pa-tl { margin: 0; }
.pad-tl-card .pa-tl__dot { width: 18px; height: 18px; border-width: 3px; }
.pad-tl-card .pa-tl__line { width: 2.5px; min-height: 26px; }
.pad-tl-card .pa-tl__step { gap: 14px; }
.pad-tl-card .pa-tl__body { padding-bottom: 20px; }
.pad-tl-card .pa-tl__step:last-child .pa-tl__body { padding-bottom: 2px; }
.pad-tl-card .pa-tl__t { font-size: 16px; }
.pad-tl-card .pa-tl__s { font-size: 13.5px; margin-top: 3px; }
.pad-tl-card .pa-tl__step:not(.is-done) .pa-tl__t { color: var(--muted); }

/* ============================================================
   GERENTE · Módulo de cuentas de cliente (acceso + actividad)
   ============================================================ */
/* Botón "Agregar cliente" */
.gc-add {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 50px; margin-bottom: 14px;
  border-radius: 14px; border: 1.6px dashed var(--turquoise-soft2);
  background: var(--turquoise-soft); color: var(--turquoise-dark);
  font-size: 14.5px; font-weight: 800; transition: all .18s ease;
}
.gc-add:active { transform: scale(.98); }
.gc-add__ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--turquoise); color: #fff; font-size: 17px; font-weight: 700; line-height: 1;
}

/* Etiqueta suspendido en la lista + subtítulo suave con "último ingreso" */
.gc-tag { font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; vertical-align: middle; }
.gc-tag--susp { color: #c2453b; background: #fbe3e0; }
.grow__sub--soft { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); opacity: .85; margin-top: 2px; }
.grow__sub--soft svg { flex: none; opacity: .8; }

/* Segmentado Bodega · Acceso · Actividad */
.seg--gc { grid-template-columns: 1fr 1fr 1fr; gap: 7px; margin-bottom: 16px; }
.seg--gc .seg__btn { font-size: 13.5px; min-height: 44px; }
.gc-pane[hidden] { display: none; }

/* Estado de la cuenta */
.gc-state { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.gc-state--on   { color: var(--ok); background: var(--ok-bg); }
.gc-state--susp { color: #c2453b; background: #fbe3e0; }

/* Credenciales */
.gc-cred { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 14px; }
.gc-field {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 11px 12px; border-radius: 12px;
  background: var(--turquoise-soft); border: 1px solid var(--line);
}
.gc-field__lbl { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--turquoise-dark); flex: none; width: 74px; }
.gc-field__val { font-size: 14px; font-weight: 700; color: var(--ink); flex: 1 1 auto; min-width: 0; word-break: break-all; }
.gc-pass { letter-spacing: 1px; }
.gc-mini {
  flex: none; font-size: 12px; font-weight: 800; color: var(--turquoise-dark);
  background: #fff; border: 1.4px solid var(--turquoise-soft2);
  border-radius: 9px; padding: 5px 10px; transition: all .15s ease;
}
.gc-mini:active { transform: scale(.95); background: var(--turquoise-soft); }

.gc-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.gc-actions .btn { flex: 1 1 auto; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.gnote--tight { margin-top: 12px; }

/* Línea de tiempo de actividad */
.gc-timeline { display: flex; flex-direction: column; }
.gc-tl { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.gc-tl:last-child { border-bottom: 0; }
.gc-tl__ico {
  flex: none; width: 32px; height: 32px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--turquoise-soft); color: var(--turquoise-dark);
}
.gc-tl__ico--login, .gc-tl__ico--logout { background: var(--turquoise-soft); color: var(--turquoise); }
.gc-tl__ico--preaviso { background: var(--orange-soft); color: var(--orange-dark); }
.gc-tl__ico--cuenta { background: var(--ok-bg); color: var(--ok); }
.gc-tl__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.gc-tl__label { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.gc-tl__time { font-size: 12px; font-weight: 600; color: var(--muted); }

/* ---- Modal (alta de cliente / editar contraseña) ---- */
.gcm-root { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: flex-end; justify-content: center; }
.gcm-backdrop { position: absolute; inset: 0; background: rgba(20,34,33,.46); backdrop-filter: blur(2px); }
.gcm-card {
  position: relative; width: 100%; max-width: 440px;
  background: #fff; border-radius: 22px 22px 0 0;
  padding: 20px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(20,34,33,.25);
  animation: gcm-up .24s cubic-bezier(.2,.8,.25,1);
  max-height: 92vh; overflow-y: auto;
}
@keyframes gcm-up { from { transform: translateY(28px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
@media (min-width: 720px) {
  .gcm-root { align-items: center; }
  .gcm-card { border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) { .gcm-card { animation: none; } }
.gcm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.gcm-title { margin: 0; font-size: 19px; font-weight: 800; color: var(--ink); }
.gcm-x { flex: none; width: 44px; height: 44px; border-radius: 12px; font-size: 22px; line-height: 1; color: var(--muted); background: var(--turquoise-soft); display: flex; align-items: center; justify-content: center; }
.gcm-x:active { transform: scale(.94); }
.gcm-sub { margin: 2px 0 8px; font-size: 13px; font-weight: 700; color: var(--turquoise-dark); }
.gcm-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.gcm-lbl { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--turquoise-dark); }
.gcm-in {
  width: 100%; min-height: 46px; padding: 0 13px;
  border-radius: 12px; border: 1.6px solid var(--line); background: #fff;
  font-size: 15px; font-weight: 600; color: var(--ink);
}
.gcm-in:focus { outline: none; border-color: var(--turquoise); }
.gcm-in--code { text-transform: uppercase; letter-spacing: 2px; font-weight: 800; max-width: 140px; }
.gcm-hint { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.gcm-passrow { display: flex; gap: 8px; align-items: center; }
.gcm-passrow .gcm-in { flex: 1 1 auto; }
.gcm-err { color: #c2453b; background: #fbe3e0; font-size: 13px; font-weight: 700; padding: 9px 12px; border-radius: 10px; margin: 0; }
.gcm-actions { display: flex; gap: 10px; margin-top: 4px; }
.gcm-actions .btn { flex: 1 1 auto; min-height: 48px; }

/* ---- Aviso dentro del modal de alta de cliente ---- */
.gcm-note {
  display: flex; gap: 7px; font-size: 12.5px; line-height: 1.45; color: var(--muted);
  background: var(--turquoise-soft); border-radius: 10px; padding: 10px 12px; margin: 2px 0 0;
}
.gcm-note b { color: var(--turquoise-dark); }

/* ---- Launcher "Ver mi bodega en 3D" (portal cliente) ---- */
.b3d-launch {
  display: flex; align-items: center; gap: 12px; width: calc(100% - var(--gutter) * 2); margin: 0 var(--gutter) var(--stack);
  padding: 14px 16px; border: none; border-radius: 16px;
  background: linear-gradient(135deg, var(--turquoise-dark), var(--turquoise-deep));
  color: #fff; cursor: pointer; box-shadow: 0 8px 22px rgba(20,160,150,.28);
}
.b3d-launch:active { transform: scale(.99); }
.b3d-launch__ico { font-size: 22px; }
.b3d-launch__t { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; flex: 1; }
.b3d-launch__t small { opacity: .85; font-size: 12px; }
.b3d-launch__chev { font-size: 24px; opacity: .9; }

/* ---- Pantalla táctil real (celular o tablet, cualquier ancho): pantalla
   completa, sin el "marco de teléfono" en miniatura. Va al final del archivo
   para ganarle a las reglas de .device por ancho (768/1024/1380px) — ese
   marco centrado es solo una vista previa cosmética para mouse de escritorio,
   y en una tablet táctil real solo generaba bordes en blanco. ---- */
@media (pointer: coarse) {
  .device {
    max-width: 100%;
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
  }
  body { padding: 0; }
}

/* Fotos de recepción agrupadas por producto */
.opprod { margin-top: 12px; }
.opprod__h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--turquoise-dark); margin-bottom: 6px; }
.opprod__h svg { width: 14px; height: 14px; }

/* Nunca scroll horizontal a nivel de página/sheet (móvil) */
html, body { overflow-x: hidden; max-width: 100%; }
.device, .view, .sheet { overflow-x: hidden; }
.sheet img, .view img { max-width: 100%; }

/* Barra de cupo de posiciones */
.gcupo__bar { height: 10px; border-radius: 999px; background: var(--turquoise-soft); overflow: hidden; margin-top: 6px; }
.gcupo__fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--turquoise), var(--turquoise-deep)); transition: width .4s ease; }
.gcupo__fill--full { background: #c0532f; }
