/* annonERP prototype — inventory module styles. Use tokens from tokens.css only. */

/* signed quantities */
.neg { color: var(--danger); font-variant-numeric: tabular-nums; }
.pos { color: var(--success); font-variant-numeric: tabular-nums; }
.kpi-value.neg, .kpi-value.pos { font-variant-numeric: tabular-nums; }
.kpi-value.kpi-sm { font-size: var(--fs-section); }

/* archived callout (neutral) */
.callout.archived { background: var(--fill); color: var(--text-secondary); }

/* transfer progress steps */
.steps { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; gap: var(--space-2); }
.steps li { flex: 1; min-width: 120px; display: flex; align-items: center; gap: var(--space-2); color: var(--text-muted); }
.steps li.current { color: var(--text-primary); font-weight: 600; }
.steps li.done { color: var(--text-secondary); }
.steps li:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: var(--border); border-radius: var(--radius-full); }
.steps li.done:not(:last-child)::after { background: var(--success); }

/* catalogue setup */
.setup-grid .card { min-width: 0; }
.setup-grid .table td .swatch { vertical-align: -2px; }

/* product images */
.img-strip { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.img-strip img { width: 88px; height: 88px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--hairline); background: var(--fill); }
.img-edit { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.img-edit figure { margin: 0; width: 140px; display: flex; flex-direction: column; gap: var(--space-2); }
.img-edit img { width: 140px; height: 140px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--hairline); background: var(--fill); }
.img-edit figcaption { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }

/* ratio packs */
.pack-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.pack-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) var(--space-3); border: 1px solid var(--hairline); border-radius: var(--radius-md); }
.pack-list li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pack-new { border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); margin: 0; }
.pack-new legend { padding: 0 var(--space-1); }
.pack-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: var(--space-2); margin-top: var(--space-3); }

/* barcode labels (screen preview; print uses its own sheet) */
.label-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--space-2); max-height: 420px; overflow: auto; padding: var(--space-2); background: var(--fill); border-radius: var(--radius-md); }
.label-tag { background: #fff; color: #000; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: var(--space-2); display: flex; flex-direction: column; gap: 2px; min-height: 120px; }
.lt-name { font-weight: 700; font-size: var(--fs-meta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-var { font-size: var(--fs-meta); }
.lt-code svg { width: 100%; height: auto; display: block; }
.lt-foot { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; margin-top: auto; }

/* size grid: inactive SKU */
.size-grid .stock-cell.inactive { color: var(--text-muted); text-decoration: line-through; }
.size-grid input:disabled[title] { background: repeating-linear-gradient(135deg, var(--fill), var(--fill) 4px, transparent 4px, transparent 8px); }

/* adjustment lines: remove / add switch */
.line-card-head .line-dir { width: 160px; }
.line-card.dir-remove { box-shadow: inset 3px 0 0 var(--danger); }
.line-card.dir-add { box-shadow: inset 3px 0 0 var(--success); }
.chips .chip .meta { margin-left: var(--space-1); }

/* import preview */
.import-table { max-height: 260px; overflow: auto; border: 1px solid var(--hairline); border-radius: var(--radius-md); }

/* stock count: scanning */
.scan-card .combo-input { max-width: 520px; }
.scan-last { min-height: 24px; margin-top: var(--space-2); color: var(--success); display: flex; align-items: center; gap: var(--space-1); }
.scan-last svg { width: 16px; height: 16px; }
.count-kpis .kpi-value { font-variant-numeric: tabular-nums; }

/* ledger */
.ledger-filters { border-bottom: 0; padding: 0 0 var(--space-4); align-items: flex-end; }
.ledger-filters .field { margin: 0; min-width: 160px; }
.ledger-table tr.ledger-open td, .ledger-table tr.ledger-close td { background: var(--fill); }
.ledger-table tr.ledger-close td { border-top: 2px solid var(--border-strong); }

/* phones (390px) */
@media (max-width: 640px) {
  .line-card-head .line-dir { width: 100%; }
  .img-edit figure { width: calc(50% - var(--space-2)); }
  .img-edit img { width: 100%; height: auto; aspect-ratio: 1; }
  .ledger-filters .field { min-width: 0; flex: 1 1 45%; }
  .ledger-filters .select { min-width: 0; width: 100%; }
  .steps li { min-width: 0; flex: 1 1 45%; }
  .steps li::after { display: none; }
  .pack-list li { flex-wrap: wrap; }
  .label-sheet { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
