/* Cargar inventario. Todo con prefijo ci- para no chocar con nada. */

.ci-shell { display: grid; gap: 20px; max-width: 980px; color: var(--pos-text, #172033); }

.ci-cabecera { display: flex; align-items: center; gap: 18px; padding: 18px 22px; border-radius: 22px; background: linear-gradient(160deg, #e9f2ff, #d4e6ff); animation: ciEntrar .3s ease; }
.ci-mascota { width: 86px; height: auto; flex: none; filter: drop-shadow(0 12px 16px rgba(7, 63, 154, .22)); animation: ciFlotar 4.5s ease-in-out infinite; }
.ci-cabecera h2 { margin: 0 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.ci-cabecera p { margin: 0; max-width: 640px; color: #475569; font-weight: 600; font-size: 14px; line-height: 1.5; }
.ci-atras { margin: 0 0 6px; padding: 0; border: 0; background: none; color: var(--brand-color, #0d6efd); font-size: 13px; font-weight: 800; cursor: pointer; }

@keyframes ciEntrar { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ciFlotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.ci-tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }

.ci-tarjeta { position: relative; display: grid; gap: 8px; align-content: start; justify-items: start; padding: 20px; text-align: left; border: 2px solid var(--pos-line, #dbe3ef); border-radius: 20px; background: var(--pos-surface-strong, #fff); color: inherit; cursor: pointer; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; animation: ciEntrar .35s ease both; }
.ci-tarjeta:nth-child(2) { animation-delay: .05s; }
.ci-tarjeta:nth-child(3) { animation-delay: .1s; }
.ci-tarjeta:nth-child(4) { animation-delay: .15s; }
.ci-tarjeta:nth-child(5) { animation-delay: .2s; }
.ci-tarjeta:hover { transform: translateY(-3px); border-color: var(--brand-color, #0d6efd); box-shadow: 0 14px 30px rgba(13, 110, 253, .16); }
.ci-tarjeta strong { font-size: 18px; }
.ci-tarjeta > span:last-child { color: var(--pos-muted, #687386); font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.ci-icono { font-size: 30px; line-height: 1; }
.ci-recomendada { border-color: var(--brand-color, #0d6efd); background: #f3f8ff; }
.ci-etiqueta { padding: 3px 10px; border-radius: 999px; background: var(--brand-color, #0d6efd); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .02em; }

.ci-rapida, .ci-lista { display: grid; gap: 14px; }

.ci-buscador input { width: 100%; padding: 16px 20px; border: 2px solid var(--pos-line, #dbe3ef); border-radius: 16px; background: var(--pos-surface-strong, #fff); font-size: 18px; font-weight: 600; }
.ci-buscador input:focus { outline: none; border-color: var(--brand-color, #0d6efd); box-shadow: 0 0 0 4px rgba(13, 110, 253, .12); }

.ci-resultados { display: grid; gap: 10px; }
.ci-resultado { border: 1px solid var(--pos-line, #dbe3ef); border-radius: 16px; background: var(--pos-surface-strong, #fff); overflow: hidden; }
.ci-abierto { border-color: var(--brand-color, #0d6efd); box-shadow: 0 10px 26px rgba(13, 110, 253, .14); }
.ci-ya { opacity: .6; }
.ci-resultado-fila { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; }
.ci-resultado-texto { display: grid; gap: 2px; min-width: 0; }
.ci-resultado-texto strong { font-size: 15px; line-height: 1.3; }
.ci-resultado-texto small { color: var(--pos-muted, #687386); font-size: 12.5px; font-weight: 600; }
.ci-ya-etiqueta { padding: 4px 10px; border-radius: 999px; background: rgba(22, 163, 74, .12); color: #15803d; font-size: 12px; font-weight: 800; white-space: nowrap; }
.ci-manual { border-style: dashed; }

.ci-boton { padding: 10px 18px; border: 0; border-radius: 12px; background: var(--brand-color, #0d6efd); color: #fff; font-size: 14px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.ci-boton:disabled { opacity: .5; cursor: not-allowed; }
.ci-secundario { background: transparent; color: var(--brand-color, #0d6efd); border: 1px solid var(--brand-color, #0d6efd); }
.ci-enlace { border: 0; background: none; color: var(--brand-color, #0d6efd); font-weight: 800; cursor: pointer; text-decoration: underline; }

.ci-formulario { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px 16px 16px; border-top: 1px solid var(--pos-line, #e3e9f3); background: #f8fafc; }
.ci-formulario label { display: grid; gap: 4px; font-size: 12px; font-weight: 800; color: var(--pos-muted, #687386); }
.ci-formulario input { width: 150px; padding: 10px 12px; border: 1px solid var(--pos-line, #cbd5e1); border-radius: 10px; font-size: 16px; font-weight: 700; }
.ci-formulario .ci-error { flex-basis: 100%; margin: 0; }

.ci-agregados { display: grid; gap: 6px; padding: 14px 16px; border-radius: 16px; background: rgba(22, 163, 74, .08); }
.ci-agregados-titulo { display: flex; justify-content: space-between; align-items: center; color: #15803d; }
.ci-agregado { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; font-weight: 600; }
.ci-agregado small { color: var(--pos-muted, #687386); }

.ci-pista { margin: 0; color: var(--pos-muted, #687386); font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.ci-error { margin: 0; color: #b91c1c; font-size: 13px; font-weight: 700; }

.ci-lista textarea { width: 100%; padding: 14px 16px; border: 2px dashed var(--pos-line, #cbd5e1); border-radius: 16px; background: var(--pos-surface-strong, #fff); font-family: Consolas, monospace; font-size: 13px; resize: vertical; }
.ci-lista textarea:focus { outline: none; border-color: var(--brand-color, #0d6efd); }
.ci-lista-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.ci-subir { color: var(--pos-muted, #687386); font-size: 13px; font-weight: 700; }
.ci-subir input { margin-left: 6px; }

.ci-mapeo { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ci-mapeo label { display: grid; gap: 4px; font-size: 12px; font-weight: 800; color: var(--pos-muted, #687386); }
.ci-mapeo select { padding: 9px 10px; border: 1px solid var(--pos-line, #cbd5e1); border-radius: 10px; font-size: 14px; font-weight: 600; }

.ci-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.ci-cifra { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--pos-line, #dbe3ef); border-radius: 14px; background: var(--pos-surface-strong, #fff); }
.ci-cifra strong { font-size: 28px; line-height: 1; }
.ci-cifra span { color: var(--pos-muted, #687386); font-size: 12.5px; font-weight: 700; }
.ci-ok strong { color: #15803d; }
.ci-alerta strong { color: #b45309; }

.ci-tabla { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ci-tabla th, .ci-tabla td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--pos-line, #e3e9f3); }
.ci-tabla th { color: var(--pos-muted, #687386); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }

.ci-problemas { padding: 10px 14px; border-radius: 12px; background: rgba(245, 158, 11, .1); font-size: 13px; font-weight: 600; }
.ci-problemas summary { cursor: pointer; font-weight: 800; }

.ci-barra { height: 14px; border-radius: 999px; background: var(--pos-line, #e3e9f3); overflow: hidden; }
.ci-barra span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1067e8, #18b88f); transition: width .2s ease; }

@media (prefers-reduced-motion: reduce) {
  .ci-cabecera, .ci-tarjeta, .ci-mascota { animation: none; }
}

@media (max-width: 720px) {
  .ci-cabecera { flex-direction: column; align-items: flex-start; }
  .ci-resultado-fila { flex-wrap: wrap; }
  .ci-formulario input { width: 100%; }
  .ci-formulario label { flex: 1 1 140px; }
}
