/* Inventario (vista #/inventario). Prefijo iv- para no chocar con el resto del back office. */
.iv { display: grid; gap: 16px; min-width: 0; max-width: 100%; }
.iv > *, .iv-ficha > *, .iv-escaner > * { min-width: 0; }
#iv-cont { min-width: 0; }
.iv h3 { margin: 0 0 10px; }
.iv .card { min-width: 0; }
.iv-sub { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.88rem; }
.iv-note { color: var(--ink-faint); font-size: 0.8rem; margin: 0; }
.iv-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.iv-tabs a { text-decoration: none; }
.iv-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.iv-tile { padding: 14px; border-radius: 12px; border: 1px solid var(--glass-border); background: var(--glass); }
.iv-tile b { display: block; font-family: 'Space Grotesk', Arial, sans-serif; font-size: 1.6rem; line-height: 1.1; }
.iv-tile span { font-size: 0.75rem; color: var(--ink-faint); }
.iv-tile.mal b { color: var(--danger); }
.iv-tile.ojo b { color: var(--orange-light); }
.iv-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.iv-tabla { overflow-x: auto; }
.iv-tabla table { width: 100%; }
.iv-acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.iv-acciones .btn { padding: 8px 14px; font-size: 0.85rem; }
.iv-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 10px; align-items: end; }
.iv-form label { display: grid; gap: 4px; font-size: 0.78rem; color: var(--ink-soft); }
.iv-form .ancho { grid-column: 1 / -1; }
.iv-form textarea.field-input { min-height: 80px; resize: vertical; }
.iv-filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.iv-filtros .field-input { width: auto; min-width: 150px; }

/* Escaneo */
.iv-escaner { display: grid; gap: 12px; max-width: 560px; }
.iv-video { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #000; border-radius: 14px; overflow: hidden; border: 1px solid var(--glass-border); }
.iv-video video { width: 100%; height: 100%; object-fit: cover; }
.iv-video .guia { position: absolute; inset: 18% 18%; border: 3px solid rgba(255, 255, 255, 0.85); border-radius: 16px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35); }
.iv-manual { display: flex; gap: 8px; }
.iv-manual .field-input { flex: 1; text-transform: uppercase; }
.iv-cola { padding: 10px 14px; border-radius: 10px; background: rgba(247, 117, 53, 0.14); border: 1px solid rgba(247, 117, 53, 0.5); font-size: 0.85rem; }

/* Tarjeta de resultado */
.iv-ficha { display: grid; gap: 14px; }
.iv-cab { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.iv-cab h2 { margin: 0; }
.iv-cod { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.82rem; color: var(--ink-faint); }
.iv-grande { font-family: 'Space Grotesk', Arial, sans-serif; font-size: 2.2rem; line-height: 1; }
.iv-veredicto { overflow-wrap: anywhere; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--glass-border); font-size: 0.95rem; line-height: 1.5; }
.iv-veredicto.en_bodega { border-color: rgba(76, 175, 125, 0.6); background: rgba(76, 175, 125, 0.1); }
.iv-veredicto.prestable { border-color: rgba(247, 117, 53, 0.6); background: rgba(247, 117, 53, 0.1); }
.iv-veredicto.sin_opciones { border-color: rgba(229, 72, 77, 0.6); background: rgba(229, 72, 77, 0.1); }
.iv-veredicto b { display: block; margin-bottom: 4px; }
.iv-lista { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.iv-lista li { overflow-wrap: anywhere; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--glass-border); background: var(--glass); font-size: 0.88rem; }
.iv-lista small { color: var(--ink-faint); display: block; }
.iv-panel-accion { padding: 14px; border-radius: 12px; border: 1px dashed var(--glass-border); }
.iv-ok { color: var(--success); }
.iv-mal { color: var(--danger); }

@media (max-width: 760px) {
  .iv-grande { font-size: 1.8rem; }
  .iv-acciones .btn { flex: 1 1 140px; }
}

/* Motores, identificación de planta, homólogos y hoja de vida (2026-11-20) */
.iv-motor { margin-top: 4px; font-size: 0.82rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.iv-ident { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; font-size: 0.9rem; }
.iv-ident b { font-family: ui-monospace, Menlo, Consolas, monospace; }
.iv-ojo { display: block; color: #b8601e; font-size: 0.8rem; margin-top: 2px; }
.iv-linea { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 0; }
.iv-evento { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 10px 0; border-left: 2px solid var(--glass-border); margin-left: 14px; padding-left: 0; overflow-wrap: anywhere; font-size: 0.9rem; }
.iv-evento-icono { width: 28px; height: 28px; margin-left: -15px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--glass-border); font-size: 0.9rem; }
.iv-bloque-motor { padding: 10px 12px; border: 1px dashed var(--glass-border); border-radius: 10px; }
