/**
 * wiz.css · 49cb.142c · F3 PWA Movers
 *
 * Estilos del wizard de visita (paso 1 "Datos visita" en F3,
 * más pasos llegan en F4, F8).
 *
 * Layout: el shell (topbar + tabbar) sigue ahí; este wizard mete:
 *   · wiz-topbar  (cabecera interna con back + título + total)
 *   · wiz-stepper (5 pasos visual)
 *   · wiz-main    (cards apilados)
 *   · wiz-foot    (status autoguardado + acciones)
 *   · wiz-conflict (banner si 409)
 */

[data-screen="wiz-datos"] {
  padding-bottom: 92px;   /* footer fijo · evitar tapar último input */
}

/* ── Topbar interna ─────────────────────────────────────────── */
.wiz-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.wiz-back {
  background: rgba(255,255,255,0.05); border: none;
  width: 36px; height: 36px; border-radius: 10px;
  color: var(--txt, #f5f3ed);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.wiz-back:active { transform: scale(0.96); }
.wiz-titles { flex: 1; min-width: 0; }
.wiz-title {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px; font-weight: 700; color: var(--txt, #f5f3ed);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wiz-sub {
  font-size: 12px; color: var(--text-dim, #b1adb0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wiz-total { text-align: right; }
.wiz-total-val {
  font-size: 16px; font-weight: 700; color: var(--pri-soft, #7B6FE8);
}
.wiz-total-val small { font-size: 11px; opacity: 0.7; }
.wiz-total-lbl {
  font-size: 9px; color: var(--text-dim, #b1adb0);
  letter-spacing: 1px; text-transform: uppercase;
}

/* ── Stepper ──────────────────────────────────────────────────── */
.wiz-stepper {
  display: flex; gap: 4px;
  padding: 10px 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.wiz-stepper::-webkit-scrollbar { display: none; }
.wiz-step {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; min-width: 56px; gap: 4px;
  padding: 6px 4px;
  border-radius: 8px;
  opacity: 0.45;
  transition: opacity .15s, background .15s;
}
.wiz-step.is-current {
  opacity: 1;
  background: rgba(123,111,232,0.10);
}
.wiz-step-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,0.10);
  color: var(--txt, #f5f3ed);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.wiz-step.is-current .wiz-step-num {
  background: linear-gradient(135deg, #4A3FB8, #7B6FE8);
  color: #fff;
}
.wiz-step-lbl {
  font-size: 10px;
  color: var(--text-dim, #b1adb0);
  text-align: center; line-height: 1.2;
}
.wiz-step.is-current .wiz-step-lbl { color: var(--txt, #f5f3ed); }

/* ── Main + cards ─────────────────────────────────────────────── */
.wiz-main {
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
}
.wiz-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px;
}
.wiz-card-cta {
  background: linear-gradient(135deg, rgba(74,63,184,0.10), rgba(123,111,232,0.05));
  border-color: rgba(123,111,232,0.20);
}
.wiz-card-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-dim, #b1adb0);
  margin-bottom: 12px;
}
.wiz-card-icon { font-size: 14px; }
.wiz-card-pill {
  margin-left: auto;
  font-size: 9px;
  background: rgba(123,111,232,0.18);
  color: #A39AFA;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}
.wiz-card-text {
  font-size: 13px; color: var(--text-dim, #b1adb0);
  margin: 0 0 12px;
}

/* KV (cliente / expediente) */
.wiz-kv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wiz-kv-lbl {
  font-size: 9px; color: var(--text-dim, #b1adb0);
  letter-spacing: 0.8px; text-transform: uppercase;
  margin-bottom: 3px;
}
.wiz-kv-val {
  font-size: 14px; color: var(--txt, #f5f3ed);
  font-weight: 600;
}
.wiz-kv-val.mono {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
}

/* Fields (label + input) */
.wiz-field { display: block; margin-bottom: 10px; }
.wiz-field-lbl {
  display: block;
  font-size: 11px; color: var(--text-dim, #b1adb0);
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}
.wiz-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wiz-input {
  width: 100%; box-sizing: border-box;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--txt, #f5f3ed);
  font-family: inherit; font-size: 14px;
  transition: border .15s, background .15s;
}
.wiz-input:focus {
  outline: none;
  border-color: rgba(123,111,232,0.55);
  background: rgba(0,0,0,0.35);
}
.wiz-textarea { resize: vertical; min-height: 60px; line-height: 1.5; }
select.wiz-input {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b1adb0' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* Hint */
.wiz-hint {
  font-size: 12px; color: #FBBF24;
  background: rgba(245,158,11,0.10);
  border: 1px solid rgba(245,158,11,0.20);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 0 0 12px;
}

/* ── Footer fijo ──────────────────────────────────────────────── */
.wiz-foot {
  position: fixed; left: 0; right: 0;
  bottom: calc(64px + env(safe-area-inset-bottom));   /* sobre el tabbar */
  z-index: 45;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(10,10,20,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.wiz-foot-status { font-size: 12px; color: var(--text-dim, #b1adb0); }
.wiz-foot-acts { display: flex; gap: 8px; }
.wiz-foot .btn {
  padding: 8px 14px; font-size: 13px;
  white-space: nowrap;
}

.wiz-st { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.wiz-st.ok { background: #4ADE80; }
.wiz-st.pe { background: #FBBF24; animation: chip-pulse 1.4s ease-in-out infinite; }
.wiz-st.sg { animation: chip-pulse 0.8s ease-in-out infinite; color: #A39AFA; }
.wiz-st.nu { background: rgba(255,255,255,0.20); }
.wiz-st.of { background: #FBBF24; animation: chip-pulse 1.8s ease-in-out infinite; }

/* Centrado en desktop (cuando shell aplica frame móvil) */
@media (min-width: 1200px) and (pointer: fine) and (hover: hover) {
  .wiz-foot {
    left: 50%; right: auto;
    transform: translateX(-50%);
    width: 100%; max-width: 480px;
  }
}

/* ── Conflict banner ──────────────────────────────────────────── */
.wiz-conflict {
  margin: 14px 16px 0;
  padding: 14px;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.30);
  border-radius: 12px;
}
.wiz-conflict-head {
  font-size: 13px; font-weight: 700; color: #FBBF24;
  margin-bottom: 4px;
}
.wiz-conflict-msg {
  font-size: 13px; color: var(--text-dim, #b1adb0);
  margin: 0 0 12px; line-height: 1.4;
}
.wiz-conflict-acts {
  display: flex; gap: 8px;
}
.wiz-conflict-acts .btn { flex: 1; padding: 8px 12px; font-size: 13px; }

/* ── Skeleton ─────────────────────────────────────────────────── */
.wiz-skeleton .wiz-sk-card {
  height: 120px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  background-size: 200% 100%;
  animation: sk-shimmer 1.4s ease-in-out infinite;
}

/* ── Error ────────────────────────────────────────────────────── */
.wiz-error {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 60px 18px;
  text-align: center;
}
.wiz-error-icon { font-size: 36px; }
.wiz-error-msg {
  font-size: 14px; color: var(--text-dim, #b1adb0);
  max-width: 280px;
}

/* ── Responsive tablet ────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .wiz-main { max-width: 720px; margin: 0 auto; padding: 24px; gap: 18px; }
  .wiz-card { padding: 20px 22px; }
  .wiz-input { font-size: 15px; padding: 12px 14px; }
}

/* ════════════════════════════════════════════════════════════════
   49cb.145 · Wizard pasos 2 (destinos) + 3 (inventario)
   ════════════════════════════════════════════════════════════════ */

/* Stepper · estados clickeable / locked */
.wiz-step.is-clickable { cursor: pointer; opacity: 0.85; }
.wiz-step.is-clickable:hover { opacity: 1; transform: translateY(-1px); }
.wiz-step.is-locked    { opacity: 0.35; cursor: not-allowed; }
.wiz-step.is-current   { opacity: 1; cursor: default; }

/* Cabecera compacta */
.wiz-cabecera {
  background: rgba(99,102,241,0.06);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
}
.wiz-cab-title { font-size: 15px; font-weight: 600; color: var(--text); }
.wiz-cab-sub   { font-size: 12px; color: var(--text-dim, #b1adb0); margin-top: 2px; }

/* Hint */
.wiz-h    { font-size: 14px; color: var(--text); margin: 14px 0 4px; font-weight: 600; }
.wiz-hint { font-size: 12px; color: var(--text-dim, #b1adb0); margin: 0 0 12px; line-height: 1.4; }

/* Cards (genérico) */
.wiz-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.wiz-card {
  background: var(--bg-card, #1c1f26);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.wiz-card-main { cursor: pointer; }
.wiz-card-titulo { font-size: 14px; font-weight: 600; color: var(--text); }
.wiz-card-sub    { font-size: 12px; color: var(--text-dim, #b1adb0); margin-top: 2px; }
.wiz-card-kpis   { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.wiz-card-acts   { display: flex; gap: 4px; }

.wiz-kpi {
  background: rgba(99,102,241,0.12);
  color: var(--accent, #6366f1);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

/* Botón icono compacto */
.btn-icon {
  background: transparent;
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 8px;
  width: 32px; height: 32px;
  font-size: 14px;
  color: var(--text-dim, #b1adb0);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-icon:hover { color: var(--text); border-color: var(--accent); }

/* Botón añadir grande */
.wiz-add { margin-bottom: 18px; }

/* Empty state */
.wiz-empty {
  text-align: center;
  padding: 28px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px dashed var(--border, rgba(255,255,255,.10));
  border-radius: 12px;
  color: var(--text-dim, #b1adb0);
  font-size: 13px;
  line-height: 1.4;
}
.wiz-empty-mini {
  text-align: center;
  padding: 12px;
  color: var(--text-dim, #b1adb0);
  font-size: 12px;
}

/* Stale banner */
.wiz-stale-banner {
  background: rgba(245,158,11,0.10);
  color: #f59e0b;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  text-align: center;
}

/* Chips destinos */
.wiz-chips {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 4px;
  margin: 12px -16px 14px;
  padding-left: 16px; padding-right: 16px;
  scrollbar-width: none;
}
.wiz-chips::-webkit-scrollbar { display: none; }
.wiz-chip {
  flex-shrink: 0;
  background: var(--bg-card, #1c1f26);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-dim, #b1adb0);
  cursor: pointer;
  display: flex; flex-direction: column; gap: 2px;
  min-width: 90px;
}
.wiz-chip.is-active {
  background: rgba(99,102,241,0.15);
  border-color: var(--accent, #6366f1);
  color: var(--text);
}
.wiz-chip-kpi { font-size: 10px; opacity: 0.7; }

/* Estancia expandible */
.wiz-est.is-expanded { border-color: var(--accent, #6366f1); }
.wiz-est-body {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border, rgba(255,255,255,.08));
  padding-top: 10px;
  margin-top: 10px;
  display: flex; flex-direction: column; gap: 8px;
}

/* Enser fila */
.wiz-enser {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
}
.wiz-enser-cant {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 3px 4px;
}
.wiz-enser-n { font-size: 13px; font-weight: 600; min-width: 18px; text-align: center; }
.wiz-enser-info { font-size: 13px; }
.wiz-enser-name { color: var(--text); }
.wiz-enser-meta { font-size: 11px; color: var(--text-dim, #b1adb0); margin-top: 1px; }
.wiz-enser-acts { display: flex; gap: 2px; }

.btn-mini { padding: 6px 10px; font-size: 12px; }

/* Modal genérico */
.wiz-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 9999;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.wiz-modal {
  background: var(--bg-card, #1c1f26);
  border-radius: 16px 16px 0 0;
  padding: 20px 18px 28px;
  width: 100%; max-width: 520px;
  max-height: 88vh; overflow-y: auto;
  animation: wiz-modal-up 200ms ease-out;
}
@keyframes wiz-modal-up { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.wiz-modal-h { font-size: 16px; font-weight: 600; margin: 0 0 14px; color: var(--text); }
.wiz-modal-acts {
  display: flex; gap: 8px; margin-top: 14px;
}
.wiz-modal-acts .btn { flex: 1; }

/* Loading */
.wiz-loading {
  text-align: center;
  padding: 60px 18px;
  color: var(--text-dim, #b1adb0);
  font-size: 13px;
}

/* Responsive tablet/desktop modal centrado */
@media (min-width: 768px) {
  .wiz-modal-overlay { align-items: center; padding: 32px; }
  .wiz-modal { border-radius: 18px; }
}

/* ════════════════════════════════════════════════════════════════
   49cb.146 · Botón archivar topbar + canvas firma + visitas list
   ════════════════════════════════════════════════════════════════ */

/* Botón archivar visita en el topbar del wizard */
.wiz-archivar {
  background: transparent;
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 10px;
  width: 38px; height: 38px;
  font-size: 16px;
  cursor: pointer;
  margin-left: 6px;
  color: var(--text-dim, #b1adb0);
}
.wiz-archivar:hover { color: var(--text); border-color: var(--accent); }

/* Canvas firma · paso 5 */
.wiz-firma-pad-wrap {
  position: relative;
  margin: 10px 0 14px;
}
.wiz-firma-pad {
  display: block;
  width: 100%;
  height: 200px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border, rgba(255,255,255,.10));
  border-radius: 12px;
  cursor: crosshair;
  touch-action: none;
}
.wiz-firma-limpiar {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--bg-card, #1c1f26);
}
.wiz-firma-cerrada {
  text-align: center;
  padding: 14px;
  background: rgba(16,185,129,0.12);
  color: #10B981;
  border: 1px solid rgba(16,185,129,0.30);
  border-radius: 12px;
  margin-bottom: 12px;
  font-weight: 600;
}
.wiz-firma-actual {
  background: var(--bg-card, #1c1f26);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.wiz-firma-actual-h {
  font-size: 11px;
  color: var(--text-dim, #b1adb0);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
  font-weight: 700;
}
.wiz-firma-actual-meta {
  font-size: 12px;
  color: var(--text-dim, #b1adb0);
  margin: 4px 0 8px;
}

/* Filter bar visitas */
.filter-bar {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,.08));
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.chip-filter {
  flex-shrink: 0;
  background: var(--bg-input, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,.08));
  color: var(--text-dim, #b1adb0);
  border-radius: 14px;
  padding: 4px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.chip-filter.is-active {
  background: var(--accent, #6366f1);
  color: #fff;
  border-color: var(--accent, #6366f1);
}
.chip-archivadas { font-size: 11px; }
.chip-archivadas.is-active { background: #6B7280; border-color: #6B7280; }

#visitas-list { padding: 14px; }
.visitas-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-dim, #b1adb0);
}
.visitas-empty-error { color: var(--danger, #ef4444); }
.visitas-stale-banner {
  background: #FEF3C7;
  color: #92400E;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  text-align: center;
}

.visita-card {
  background: var(--bg-card, #1c1f26);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  width: 100%;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: inherit;
}
.visita-card-fecha {
  color: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
  min-width: 62px;
  flex-shrink: 0;
}
.visita-fecha-dia  { font-size: 10px; font-weight: 700; }
.visita-fecha-hora { font-size: 15px; font-weight: 800; }
.visita-card-info { flex: 1; min-width: 0; }
.visita-card-cliente { font-weight: 600; font-size: 14px; }
.visita-card-dir { font-size: 11px; color: var(--text-dim, #b1adb0); margin: 2px 0; }
.visita-card-meta { font-size: 11px; display: flex; gap: 6px; align-items: center; }
.visita-exp {
  background: var(--bg-input, rgba(255,255,255,0.04));
  padding: 2px 6px;
  border-radius: 8px;
  color: var(--text-dim, #b1adb0);
  font-family: ui-monospace, monospace;
}
.visita-ia-badge {
  background: linear-gradient(135deg, #6366F1, #818CF8);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}
.visita-card-arrow { color: var(--text-faint, #6b6b6b); font-size: 18px; }

/* Visita detalle layout */
.vd-loading, .vd-error {
  text-align: center;
  padding: 32px;
  color: var(--text-dim, #b1adb0);
}
.vd-error { color: var(--danger, #ef4444); }
.vd-card {
  background: var(--bg-card, #1c1f26);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.vd-label {
  font-size: 11px;
  color: var(--text-faint, #6b6b6b);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
  font-weight: 700;
}
.vd-cliente { font-weight: 600; font-size: 15px; }
.vd-tel { font-size: 12px; color: var(--text-dim, #b1adb0); margin-top: 4px; }
.vd-dir { font-size: 12px; margin: 4px 0; }
.vd-acts { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }

/* Inventario IA box */
.vd-ia-card {
  background: linear-gradient(135deg, rgba(99,102,241,.10), rgba(99,102,241,.02));
  border-color: rgba(99,102,241,.30);
}
.vd-ia-row { display: flex; align-items: center; gap: 10px; }
.vd-ia-icon { font-size: 22px; }
.vd-ia-info { flex: 1; }
.vd-ia-title { font-weight: 700; font-size: 14px; }
.vd-ia-meta { font-size: 11px; color: var(--text-dim, #b1adb0); }
.vd-ia-estado {
  background: rgba(16,185,129,.15);
  color: var(--success-hi, #10b981);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════
   49cb.148 · Combobox buscable
   ════════════════════════════════════════════════════════════════ */

.petri-combo { position: relative; }
.petri-combo-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.petri-combo-input {
  width: 100%;
  padding: 10px 32px 10px 12px;
  background: var(--bg-input, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,.10));
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
.petri-combo-input:focus {
  outline: none;
  border-color: var(--accent, #6366f1);
  background: rgba(99,102,241,0.06);
}
.petri-combo-clear {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--text-dim, #b1adb0);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}
.petri-combo-clear:hover { color: var(--text); }

.petri-combo-dropdown {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  background: var(--bg-card, #1c1f26);
  border: 1px solid var(--border, rgba(255,255,255,.10));
  border-radius: 10px;
  z-index: 10001;
  box-shadow: 0 8px 24px rgba(0,0,0,0.30);
  -webkit-overflow-scrolling: touch;
}
.petri-combo-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.petri-combo-opt:last-child { border-bottom: none; }
.petri-combo-opt:hover,
.petri-combo-opt:focus {
  background: rgba(99,102,241,0.12);
  outline: none;
}
.petri-combo-opt-icon { font-size: 15px; flex-shrink: 0; }
.petri-combo-opt-label { flex: 1; }
.petri-combo-opt-hint {
  font-size: 11px;
  color: var(--text-dim, #b1adb0);
  flex-shrink: 0;
}
.petri-combo-empty {
  padding: 14px;
  text-align: center;
  color: var(--text-dim, #b1adb0);
  font-size: 12px;
}

/* ════════════════════════════════════════════════════════════════
   49cb.148 · Pantalla Yo (PULL explícito · centro de sync)
   ════════════════════════════════════════════════════════════════ */

.home-main { padding: 20px 16px 28px; max-width: 520px; margin: 0 auto; }

.home-id {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; margin-bottom: 22px;
}
.home-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent, #6366f1);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 600;
  margin-bottom: 10px;
}
.home-name { font-size: 18px; font-weight: 600; color: var(--text); }
.home-sub  { font-size: 13px; color: var(--text-dim, #b1adb0); margin-top: 4px; }

.home-section-h {
  font-size: 13px;
  color: var(--text-dim, #b1adb0);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 18px 0 10px;
  font-weight: 600;
}

.home-sync-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  background: var(--bg-card, #1c1f26);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.home-sync-title { font-size: 14px; font-weight: 600; color: var(--text); }
.home-sync-stats {
  font-size: 12px;
  color: var(--text-dim, #b1adb0);
  margin-top: 4px;
}
.home-sync-ts {
  font-size: 11px;
  color: var(--text-faint, #6b6b6b);
  margin-top: 2px;
}
.home-sync-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(99,102,241,0.14);
  border: 1px solid var(--accent, #6366f1);
  color: var(--accent, #6366f1);
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
}
.home-sync-btn:hover:not([disabled]) {
  background: var(--accent, #6366f1);
  color: #fff;
}
.home-sync-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.home-offline-banner {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.30);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  text-align: center;
  margin-top: 14px;
}

.home-version {
  text-align: center;
  color: var(--text-dim, #b1adb0);
  font-size: 11px;
  line-height: 1.5;
  margin-top: 18px;
}
.home-build { opacity: 0.6; font-size: 10px; }

/* 49cb.151 · firma SVG read-only tras cerrar inspección */
.wiz-firma-actual-nombre {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 4px 0 2px;
}
.wiz-firma-svg-readonly {
  margin-top: 10px;
  padding: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 10px;
  text-align: center;
}
.wiz-firma-svg-readonly svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  color: var(--text);
  filter: drop-shadow(0 0 2px rgba(99,102,241,0.30));
}

/* ════════════════════════════════════════════════════════════════
   49cb.153 · Pantalla Inventario IA detalle (galería fotos cliente)
   ════════════════════════════════════════════════════════════════ */

.iia-main { padding: 12px 14px 24px; max-width: 720px; margin: 0 auto; }
.iia-loading, .iia-error {
  text-align: center; padding: 40px 20px;
  color: var(--text-dim, #b1adb0);
}
.iia-error { color: var(--danger, #ef4444); }

.iia-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 4px;
  margin-bottom: 10px;
}
.iia-titles { min-width: 0; }
.iia-title  { font-weight: 600; font-size: 15px; color: var(--text); }
.iia-sub    { font-size: 12px; color: var(--text-dim, #b1adb0); margin-top: 2px; }

.iia-estado-card {
  background: var(--bg-card, #1c1f26);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}
.iia-estado-h {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
}
.iia-estado-val { font-weight: 600; font-size: 14px; }
.iia-estado-listo_revisar { border-color: #10b981; }
.iia-estado-listo_revisar .iia-estado-val { color: #10b981; }
.iia-estado-procesando .iia-estado-val { color: #f59e0b; }
.iia-estado-capturando .iia-estado-val { color: #6366f1; }

.iia-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.iia-kpi {
  background: var(--bg-card, #1c1f26);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 10px;
  padding: 8px;
  text-align: center;
}
.iia-kpi-val { font-size: 18px; font-weight: 600; color: var(--text); }
.iia-kpi-val small { font-size: 10px; opacity: 0.7; }
.iia-kpi-lbl { font-size: 10px; color: var(--text-dim); margin-top: 2px; }

.iia-filtros {
  display: flex; gap: 8px;
  margin-bottom: 12px;
}
.iia-filtro {
  flex: 1;
  background: var(--bg-input, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,.08));
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 12px;
}

.iia-empty {
  text-align: center;
  padding: 40px 20px;
  background: rgba(255,255,255,0.02);
  border: 1px dashed var(--border, rgba(255,255,255,.10));
  border-radius: 12px;
  color: var(--text-dim, #b1adb0);
  font-size: 14px;
}
.iia-empty-hint {
  margin-top: 8px;
  font-size: 11px;
  opacity: 0.7;
}

.iia-galeria {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
@media (min-width: 600px) {
  .iia-galeria { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .iia-galeria { grid-template-columns: repeat(4, 1fr); }
}

.iia-foto-card {
  position: relative;
  background: var(--bg-card, #1c1f26);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
}
.iia-foto-card.is-procesada { border-color: rgba(16,185,129,.40); }
.iia-foto-img {
  flex: 1;
  width: 100%;
  object-fit: cover;
  background: rgba(255,255,255,0.04);
}
.iia-foto-video {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--text-dim);
  background: rgba(99,102,241,0.08);
}
.iia-foto-meta {
  padding: 6px 8px;
  background: rgba(0,0,0,0.30);
  font-size: 10px;
}
.iia-foto-hab { color: var(--text); font-weight: 500; }

.iia-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
  margin-top: 2px;
}
.iia-badge-ok   { background: rgba(16,185,129,.20); color: #10b981; }
.iia-badge-pend { background: rgba(245,158,11,.15); color: #f59e0b; }

.iia-foto-err {
  background: rgba(239,68,68,.20);
  color: #ef4444;
  font-size: 10px;
  padding: 2px 6px;
}

.iia-section-h {
  font-size: 13px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 18px 0 10px;
  font-weight: 700;
}

.iia-items-grupo {
  background: var(--bg-card, #1c1f26);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
}
.iia-items-grupo-h {
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13px;
  background: rgba(99,102,241,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.iia-items-grupo-meta { font-size: 11px; color: var(--text-dim); font-weight: 400; }
.iia-item-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid rgba(255,255,255,0.04);
  align-items: center;
}
.iia-item-cant {
  background: rgba(99,102,241,0.12);
  color: var(--accent, #6366f1);
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}
.iia-item-name { font-size: 13px; color: var(--text); }
.iia-item-meta { font-size: 10px; color: var(--text-dim); margin-top: 1px; }
.iia-item-fragil { font-size: 14px; }

.iia-foto-modal { max-width: 600px; }
.iia-foto-modal-img {
  width: 100%; max-height: 50vh;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 12px;
  background: #000;
}
.iia-foto-acts {
  flex-wrap: wrap;
}
