/* ═══════════════════════════════════════════════════════
   INVENTARIO — Estilos del módulo
   ═══════════════════════════════════════════════════════ */

/* ── Sub-tabs ── */
.inv-subtabs {
  display: flex; gap: 2px; margin-bottom: 1rem;
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 4px; width: fit-content;
}
.inv-subtab {
  padding: 7px 16px; border-radius: calc(var(--radius-sm) - 2px);
  font-size: 12.5px; font-weight: 500; border: none;
  background: transparent; color: var(--text-2); cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: background .12s, color .12s;
}
.inv-subtab.active {
  background: var(--surface); color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
html.dark .inv-subtab.active { background: #1e2538; color: #a0b0ff; }

/* ── Cards de producto ── */
.inv-prod-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 1.25rem; border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.inv-prod-item:last-child { border-bottom: none; }
.inv-prod-item:hover { background: var(--surface-2); }

.inv-prod-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.inv-prod-icon.fumigacion { background: #fee2e2; color: #dc2626; }
.inv-prod-icon.limpieza   { background: #dbeafe; color: #1d4ed8; }
html.dark .inv-prod-icon.fumigacion { background: #450a0a; color: #f87171; }
html.dark .inv-prod-icon.limpieza   { background: #172554; color: #93c5fd; }

.inv-prod-info { flex: 1; min-width: 0; }
.inv-prod-nombre { font-size: 14px; font-weight: 600; color: var(--text); }
.inv-prod-meta   { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* Stock badge */
.inv-stock-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 13px; font-weight: 700; line-height: 1;
  height: 30px; min-width: 140px; padding: 0 12px; box-sizing: border-box;
  border-radius: var(--radius-sm); flex-shrink: 0; white-space: nowrap;
}
.inv-stock-badge i { font-size: 15px !important; width: 15px; height: 15px; line-height: 1; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.inv-stock-badge i::before { display: block; line-height: 1; }
.inv-stock-badge.ok     { background: #dcfce7; color: #16a34a; }
.inv-stock-badge.warn   { background: #fef3c7; color: #d97706; }
.inv-stock-badge.agotado  { background: #fee2e2; color: #dc2626; }
html.dark .inv-stock-badge.ok    { background: #14532d; color: #4ade80; }
html.dark .inv-stock-badge.warn  { background: #422006; color: #fbbf24; }
html.dark .inv-stock-badge.agotado { background: #450a0a; color: #f87171; }

.inv-prod-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ── Asignaciones ── */
.inv-asig-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 1.25rem; border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.inv-asig-item:last-child { border-bottom: none; }
.inv-asig-item:hover { background: var(--surface-2); }

.inv-asig-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent-bg); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.inv-asig-info { flex: 1; min-width: 0; }
.inv-asig-nombre { font-size: 13.5px; font-weight: 600; color: var(--text); }
.inv-asig-meta   { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* Token badge */
.inv-token-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; flex-shrink: 0; white-space: nowrap;
}
.inv-token-badge.activo    { background: #dcfce7; color: #16a34a; }
.inv-token-badge.vencido   { background: #fee2e2; color: #dc2626; }
.inv-token-badge.sin_limite { background: var(--accent-bg); color: var(--accent-text); }
html.dark .inv-token-badge.activo    { background: #14532d; color: #4ade80; }
html.dark .inv-token-badge.vencido   { background: #450a0a; color: #f87171; }

@media (max-width: 600px) {
  .inv-prod-item, .inv-asig-item { flex-wrap: wrap; row-gap: 8px; padding: 12px 1rem; }
  .inv-prod-info, .inv-asig-info { flex: 1 1 calc(100% - 54px); }
  .inv-stock-badge, .inv-token-badge { order: 3; margin-left: 54px; }
  .inv-prod-actions { order: 4; margin-left: auto; }
}

/* Chips de empleados con asignaciones (v212) */
.inv-emp-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 500; line-height: 1;
  padding: 3px 8px; border-radius: 999px; background: #e0e7ff; color: #3730a3; white-space: nowrap; }
.inv-emp-chip i { font-size: 11px; }
.inv-emp-chip.inv-emp-mas { background: var(--surface-2); color: var(--text-2); }
html.dark .inv-emp-chip { background: #1e2a5a; color: #c7d2fe; }
