/* EST-01: produtos e estoque. Usa os componentes do app (card, stats, list/item, tag, chip, seg, sheet) e acrescenta só o que é próprio. */
.tabs a { position: relative; flex: none; display: inline-flex; align-items: center; height: 42px; font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none; transition: color .15s; }
.tabs a.on { color: var(--text); }
.tabs a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2.5px; border-radius: 2px 2px 0 0; background: var(--accent); transform: scaleX(0); transition: transform .25s var(--ease); }
.tabs a.on::after { transform: scaleX(1); }
a.stk-entry { text-decoration: none; color: inherit; transition: border-color .15s, background .15s; }
a.stk-entry > svg:first-child { color: var(--accent-fg); flex: none; }
a.stk-entry > svg:last-child { color: var(--muted); flex: none; }
@media (hover: hover) { a.stk-entry:hover { border-color: var(--accent-line); background: var(--surface-2); } }
.stk-top-acts { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) { .top:has(.stk-top-acts) { flex-wrap: wrap; } .stk-top-acts { width: 100%; justify-content: flex-start; } }
[aria-busy="true"] > .list, [aria-busy="true"] > .stk-grid { opacity: .55; transition: opacity .2s; }
/* visão geral */
.stk-stats { margin-bottom: 6px; }
.stk-stats .stat-value { font-size: 28px; }
a.stk-k { text-decoration: none; }
.stk-k.warn .stat-value { color: var(--warn); }
.stk-k.bad .stat-value { color: var(--bad); }
.stk-in { color: var(--good); } .stk-out { color: var(--text-2); }
.stk-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 32px; }
@media (min-width: 900px) { .stk-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }
.stk-empty { margin-top: 18px; }
/* saldo em destaque */
.stk-qty { flex: none; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; color: var(--muted); font-size: 11.5px; }
.stk-qty b { font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.stk-qty.warn b { color: var(--warn); } .stk-qty.bad b { color: var(--bad); }
.stk-av, .stk-p { display: flex; align-items: center; gap: 12px; }
.stk-av .grow, .stk-p .grow { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.stk-p-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
@media (max-width: 520px) { .stk-p { flex-wrap: wrap; } .stk-p .grow { flex-basis: calc(100% - 90px); } .stk-p-tags { order: 3; width: 100%; justify-content: flex-start; } }
/* movimentações */
.stk-mov { display: flex; align-items: flex-start; gap: 12px; }
.stk-mov.corrected .stk-mov-h b { text-decoration: line-through; text-decoration-color: var(--muted); }
.stk-q { flex: none; min-width: 46px; text-align: center; padding: 4px 6px; border-radius: var(--r-sm); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.stk-q.entrada { color: var(--good); background: var(--good-soft); }
.stk-q.saida { color: var(--text-2); background: var(--surface-3); }
.stk-mov-b { flex: 1; min-width: 0; }
.stk-mov-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 13.5px; }
.stk-mov-h b { font-weight: 500; }
.stk-mov-p { color: var(--accent-fg); text-decoration: none; }
.stk-mov-m { margin-top: 2px; overflow-wrap: anywhere; }
.stk-mov-m a { color: var(--accent-fg); text-decoration: none; }
.stk-note { margin: 6px 0 4px; font-size: 13.5px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.stk-mov .tag { margin-top: 4px; margin-right: 6px; }
@media (max-width: 520px) { .stk-mov { flex-wrap: wrap; } .stk-mov > .btn { margin-left: 58px; } }
.stk-mfilters .stk-date { margin: 0; display: flex; align-items: center; gap: 6px; }
.stk-mfilters .stk-date span { margin: 0; font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 899px) { .stk-mfilters .stk-date { display: block; } .stk-mfilters .stk-date span { display: block; margin-bottom: 5px; } }
/* produto */
.stk-desc { margin: 0 0 6px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.stk-vars { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.stk-var-d span { white-space: nowrap; }
.stk-var { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.stk-var.off { opacity: .6; }
.stk-var-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.stk-var-q { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: 12.5px; }
.stk-var-q b { font-family: var(--display); font-size: 30px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.stk-var-a { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
@media (max-width: 520px) { .stk-vars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* formulários */
.stk-form .field { margin-bottom: 14px; }
.stk-form [hidden] { display: none; }
.stk-dir { margin-bottom: 14px; }
.stk-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stk-saldo { margin: -8px 0 12px; }
.stk-check { gap: 8px; align-items: center; }
.stk-tpl { flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.stk-tpl .chip { border-color: var(--line-2); }
.stk-vhead { display: none; }
.stk-vrow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) 36px; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.stk-vrow [name=v_name] { grid-column: 1 / 3; }
.stk-vrow [data-vrm] { grid-column: 3; grid-row: 1; }
.stk-vrow .input { padding-left: 9px; padding-right: 9px; }
@media (min-width: 720px) {
  .stk-vhead, .stk-vrow { display: grid; grid-template-columns: 1.3fr .8fr .9fr 1fr .7fr .8fr 36px; gap: 6px; }
  .stk-vrow { border-top: 0; padding: 3px 0; }
  .stk-vrow [name=v_name] { grid-column: auto; } .stk-vrow [data-vrm] { grid-column: auto; grid-row: auto; }
}
.stk-cat { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.stk-cat form { gap: 8px; flex-wrap: wrap; }
.stk-cat-new { gap: 8px; margin-top: 14px; }
.stk-mat-sec { margin-bottom: 18px; }
.stk-mat-empty { margin-top: 6px; }
