/* ============================================================
   INSUMOS VISUAIS (.insv-) · 23/out
   Mesmo vocabulário da Biblioteca (.v2b-): papel branco, borda suave,
   serifa Mirante nos títulos, dourado só no foco. Nada de painel de
   números: o card fala por si (foto, quantidade, barrinha vs mínimo).
   ============================================================ */
.insv { display: flex; flex-direction: column; gap: 18px; min-width: 0; padding-bottom: 28px; }
.insv-ico { flex: none; vertical-align: -2px; }

/* --- topo: modo + linha calma de reposição --- */
.insv-topo { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; }
.insv-seg { display: flex; background: #EDE7DE; border-radius: var(--v2-r-pill, 11px); padding: 3px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.insv-seg::-webkit-scrollbar { display: none; }
.insv-seg button { border: none; background: transparent; padding: 7px 15px; border-radius: 9px; font-size: 12px; color: var(--v2-sub, #8D7B6A); cursor: pointer; font-family: inherit; font-weight: 600; white-space: nowrap; }
.insv-seg button.on { background: #FFFFFF; color: var(--v2-ink, #241F1B); box-shadow: 0 1px 2px rgba(46,42,38,.06); }
.insv-repor { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; font-size: 12px; }
.insv-repor-link { border: none; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--v2-vermelho, #A5584E); cursor: pointer; text-decoration: underline; text-decoration-color: rgba(165,88,78,.3); text-underline-offset: 3px; }
.insv-repor-link.on { font-weight: 600; }
.insv-link { border: none; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--v2-link, #9B7B3E); cursor: pointer; }
.insv-link:hover { color: #7A5F2F; text-decoration: underline; text-underline-offset: 3px; }
.insv-calmo { font-size: 12px; color: var(--v2-ter, #A99B8C); }
.insv-aviso { font-size: 12px; color: #6B5A3A; background: #FBF6EA; border: 1px solid rgba(202,169,103,.35); border-radius: 12px; padding: 10px 14px; line-height: 1.55; }
.insv-aviso code { font-size: 11px; background: rgba(202,169,103,.18); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
.insv-vazio { padding: 34px 20px; text-align: center; font-size: 12.5px; color: var(--v2-sub, #8D7B6A); background: #FFFFFF; border: 1px dashed var(--v2-line-strong, rgba(46,42,38,.12)); border-radius: var(--v2-r-card, 16px); line-height: 1.6; }

/* --- chips (filtro e organizar) --- */
.insv-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.insv-chip { --c: #8D7B6A; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(46,42,38,.12); background: #FFFFFF; color: #5A5049; border-radius: 20px; padding: 6px 12px; font-size: 11.5px; font-family: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.insv-chip .insv-ico { color: var(--c); }
.insv-chip .n { font-weight: 700; font-size: 10.5px; color: var(--v2-ter, #A99B8C); }
.insv-chip:hover { border-color: var(--v2-gold, #CAA967); color: var(--v2-ink, #241F1B); }
.insv-chip.on { background: color-mix(in srgb, var(--c) 13%, #FFFFFF); border-color: color-mix(in srgb, var(--c) 55%, transparent); color: var(--v2-ink, #241F1B); }
.insv-chip.on .n { color: var(--c); }
.insv-chip.pq { padding: 4px 10px; font-size: 11px; }

/* --- grupos --- */
.insv-grupo { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.insv-grupo-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.insv-grupo-t { --c: #8D7B6A; display: flex; align-items: center; gap: 9px; font-family: 'Mirante', 'Helvetica Neue', serif; font-size: 19px; font-weight: 600; color: var(--v2-ink, #241F1B); line-height: 1.2; margin: 6px 0 0; }
.insv-grupo-ico { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--c) 12%, #FFFFFF); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); }
.insv-grupo-n { font-family: inherit; font-size: 12px; color: var(--v2-ter, #A99B8C); font-weight: 500; }
.insv-grupo-meta { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--v2-sub, #8D7B6A); }
.insv-grupo-meta span { display: inline-flex; align-items: center; gap: 5px; }
.insv-grupo-dica { font-size: 12px; color: var(--v2-sub, #8D7B6A); line-height: 1.5; }

/* --- linha da tabela (a tabela em si é a .iev-tab do Estoque) --- */
.insv-st { display: block; font-size: 12.5px; color: #5F6B4E; }
.insv-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.insv-id > div { min-width: 0; }
.insv-mini-foto { width: 34px; height: 34px; border-radius: 8px; object-fit: contain; flex: none; background: #F5F0E8; }
.insv-exp { background: #FAF7F2; padding: 0 20px 14px; }
.insv .iev-layout.sem-trilho { grid-template-columns: minmax(0, 1fr); }
.insv-org-foto { display: inline-flex; align-items: center; gap: 10px; padding: 7px 12px; background: #FFFFFF; border: 1px dashed var(--v2-line-strong, rgba(46,42,38,.16)); border-radius: 9px; font-size: 12.5px; color: #3E3830; cursor: pointer; margin-bottom: 4px; align-self: flex-start; }
.insv-org-foto.drag { border-color: #8A6B26; }
.insv-org-foto.busy { opacity: .55; pointer-events: none; }
.insv-st.repor { color: var(--v2-vermelho, #A5584E); font-weight: 600; }
.insv-st.atencao { color: #8A6B26; }

.insv-esp { flex: 1; }
.insv-mini { display: inline-flex; align-items: center; gap: 6px; background: #FFFFFF; border: 1px solid rgba(46,42,38,.16); color: #5A5049; border-radius: 8px; padding: 6px 10px; font-size: 11.5px; cursor: pointer; font-family: inherit; font-weight: 600; white-space: nowrap; }
.insv-mini:hover, .insv-mini.on { border-color: var(--v2-gold, #CAA967); color: var(--v2-ink, #241F1B); background: #FBF8F2; }
.insv-txt { border: none; background: none; padding: 4px 2px; font: inherit; font-size: 11px; color: var(--v2-sub, #8D7B6A); cursor: pointer; white-space: nowrap; }
.insv-txt:hover, .insv-txt.on { color: var(--v2-ink, #241F1B); text-decoration: underline; text-underline-offset: 3px; }
.insv-txt.perigo { color: var(--v2-vermelho, #A5584E); }
.insv-btn-dark { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: #211D18; border: none; border-radius: 9px; padding: 8px 14px; font-size: 11.5px; font-weight: 600; color: #F6F2EE; cursor: pointer; font-family: inherit; white-space: nowrap; }
.insv-btn-dark:hover { filter: brightness(1.25); }
.insv-btn-dark:disabled { opacity: .5; cursor: default; filter: none; }
.insv-x { border: none; background: none; font-size: 18px; line-height: 1; color: var(--v2-ter, #A99B8C); cursor: pointer; padding: 2px 6px; }

/* stepper − usar / + entrada */
.insv-step { margin: 6px 12px 0; padding: 10px 11px; background: #FBF8F2; border: 1px solid rgba(202,169,103,.3); border-radius: 11px; display: flex; flex-direction: column; gap: 7px; }
.insv-step label { font-size: 11px; letter-spacing: 0; font-weight: 700; color: #8A6B26; }
.insv-step-l { display: flex; gap: 6px; align-items: center; }
.insv-step-l input { flex: 1; min-width: 0; border: 1px solid var(--v2-line-strong, rgba(46,42,38,.12)); border-radius: 8px; padding: 7px 10px; font-family: inherit; font-size: 14px; color: var(--v2-ink, #241F1B); background: #FFFFFF; }
.insv-step-l input:focus { outline: none; border-color: var(--v2-gold, #CAA967); }
.insv-step-l .insv-btn-dark { padding: 7px 12px; }
.insv-step-rap { display: flex; gap: 5px; flex-wrap: wrap; }
.insv-step-rap button { border: 1px solid rgba(46,42,38,.12); background: #FFFFFF; border-radius: 20px; padding: 3px 11px; font-size: 11px; font-family: inherit; color: #5A5049; cursor: pointer; }
.insv-step-rap button:hover { border-color: var(--v2-gold, #CAA967); }

/* organizar */
.insv-org { margin: 6px 12px 0; padding: 10px 11px 12px; background: #FAF7F2; border: 1px solid var(--v2-line, rgba(46,42,38,.08)); border-radius: 11px; display: flex; flex-direction: column; gap: 7px; }
.insv-org-l { font-size: 11px; letter-spacing: 0; font-weight: 700; color: var(--v2-ter, #A99B8C); margin-top: 2px; }
.insv-org-l span { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* --- boas-vindas --- */
.insv-boasvindas { background: #FFFFFF; border: 1px solid var(--v2-line, rgba(46,42,38,.08)); border-radius: var(--v2-r-card, 16px); padding: 40px 24px 34px; text-align: center; }
.insv-bv-t { font-family: 'Mirante', 'Helvetica Neue', serif; font-size: 21px; color: var(--v2-ink, #241F1B); margin-bottom: 8px; }
.insv-bv-d { font-size: 12.5px; color: var(--v2-sub, #8D7B6A); line-height: 1.65; max-width: 480px; margin: 0 auto 18px; }
.insv-bv-b { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* --- rotinas e folhas --- */
.insv-rot-intro { display: flex; flex-direction: column; gap: 10px; }
.insv-rot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; align-items: stretch; }
.insv-rot { background: #FFFFFF; border: 1px solid var(--v2-line, rgba(46,42,38,.08)); border-radius: var(--v2-r-card, 16px); box-shadow: var(--v2-shadow, 0 1px 2px rgba(46,42,38,.05)); padding: 16px 18px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.insv-rot-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.insv-rot-nome { font-family: 'Mirante', 'Helvetica Neue', serif; font-size: 17px; font-weight: 600; color: var(--v2-ink, #241F1B); line-height: 1.25; }
.insv-rot-d { font-size: 12px; color: var(--v2-sub, #8D7B6A); line-height: 1.5; }
.insv-rot-kv { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #5A5049; }
.insv-rot-kv span { display: flex; align-items: center; gap: 7px; }
.insv-rot-kv .insv-ico { color: var(--v2-ter, #A99B8C); }
.insv-rot-kv em { color: var(--v2-ter, #A99B8C); font-style: normal; }
.insv-rot-itens { display: flex; align-items: center; gap: 10px; min-height: 34px; margin-top: 2px; }
.insv-rot-fotos { display: flex; align-items: center; flex: none; }
.insv-rot-fotos .insv-mini-foto { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #FFFFFF; box-shadow: 0 0 0 1px rgba(46,42,38,.08); background: #F5F0E8; margin-left: -8px; font-size: 12px; }
.insv-rot-fotos .insv-mini-foto:first-child { margin-left: 0; }
.insv-rot-n { font-size: 11.5px; color: var(--v2-sub, #8D7B6A); line-height: 1.35; }
.insv-mini-foto { width: 32px; height: 32px; border-radius: 9px; background: #F5F0E8; border: 1px solid var(--v2-line, rgba(46,42,38,.08)); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex: none; font-family: 'Mirante', 'Helvetica Neue', serif; font-size: 14px; color: #B9AC9B; }
.insv-mini-foto img { width: 100%; height: 100%; object-fit: contain; padding: 2px; box-sizing: border-box; }
.insv-mini-foto.mais { font-family: inherit; font-size: 10.5px; font-weight: 700; color: var(--v2-sub, #8D7B6A); }
.insv-rot-ult { font-size: 11.5px; color: var(--v2-ter, #A99B8C); }
.insv-rot-acoes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.insv-rot-novo { border-style: dashed; background: transparent; box-shadow: none; cursor: pointer; align-items: center; justify-content: center; text-align: center; min-height: 140px; font-family: inherit; }
.insv-rot-novo span { font-family: 'Mirante', 'Helvetica Neue', serif; font-size: 16px; color: var(--v2-ink, #241F1B); }
.insv-rot-novo small { font-size: 11.5px; color: var(--v2-sub, #8D7B6A); }
.insv-rot-novo:hover { border-color: var(--v2-gold, #CAA967); background: #FFFFFF; }
.insv-rot-form { border-color: rgba(202,169,103,.45); }

.insv-hist { display: flex; flex-direction: column; gap: 5px; border-top: 1px solid var(--v2-line, rgba(46,42,38,.08)); padding-top: 8px; }
.insv-hist-i summary { font-size: 11.5px; color: #5A5049; cursor: pointer; line-height: 1.5; }
.insv-hist-i summary strong { color: var(--v2-ink, #241F1B); font-weight: 600; }
.insv-hist-i ul { margin: 5px 0 6px 18px; font-size: 11.5px; color: #5A5049; line-height: 1.6; }
.insv-hist-i ul b { font-weight: 600; color: var(--v2-ink, #241F1B); }
.insv-hist-obs { font-size: 11px; color: var(--v2-sub, #8D7B6A); font-style: italic; margin: 0 0 6px 18px; }

/* --- campos (modais e formulário de setor) --- */
.insv-campo { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.insv-campo > span { font-size: 11px; letter-spacing: 0; color: var(--v2-ter, #A99B8C); font-weight: 700; }
.insv-campo input, .insv-campo select, .insv-campo textarea { width: 100%; padding: 8px 11px; border: 1px solid var(--v2-line-strong, rgba(46,42,38,.12)); border-radius: 10px; background: #FFFFFF; font-family: inherit; font-size: 13px; color: var(--v2-ink, #241F1B); line-height: 1.45; box-sizing: border-box; }
.insv-campo input:focus, .insv-campo select:focus, .insv-campo textarea:focus { outline: none; border-color: var(--v2-gold, #CAA967); }
.insv-check { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #5A5049; margin-top: 12px; cursor: pointer; }
.insv-opcoes { display: flex; flex-direction: column; gap: 7px; margin: 6px 0 14px; }
.insv-opcoes label { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--v2-line-strong, rgba(46,42,38,.12)); border-radius: 11px; cursor: pointer; }
.insv-opcoes label:has(input:checked) { border-color: var(--v2-gold, #CAA967); background: #FBF8F2; }
.insv-opcoes span { display: flex; flex-direction: column; font-size: 12.5px; color: var(--v2-ink, #241F1B); }
.insv-opcoes strong { font-weight: 600; }
.insv-opcoes small { font-size: 11px; color: var(--v2-sub, #8D7B6A); }

/* --- modal Lançar a semana --- */
.insv-modal { max-width: 640px !important; }
.insv-lanc-cab { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; margin-top: 14px; }
.insv-lanc-lista { display: flex; flex-direction: column; }
.insv-lanc-l { display: grid; grid-template-columns: 32px minmax(0, 1fr) 84px 130px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--v2-line, rgba(46,42,38,.08)); }
.insv-lanc-nome { font-size: 13px; color: var(--v2-ink, #241F1B); font-weight: 500; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.insv-lanc-nome small { display: block; font-size: 10.5px; color: var(--v2-ter, #A99B8C); font-weight: 400; }
.insv-lanc-l input { width: 100%; min-width: 0; padding: 7px 9px; border: 1px solid var(--v2-line-strong, rgba(46,42,38,.12)); border-radius: 9px; font-family: inherit; font-size: 13px; color: var(--v2-ink, #241F1B); background: #FFFFFF; box-sizing: border-box; }
.insv-lanc-l input:focus { outline: none; border-color: var(--v2-gold, #CAA967); }
.insv-lanc-q { text-align: center; font-weight: 600; }
.insv-lanc-extra, .insv-lanc-extra + .insv-campo { margin-top: 14px; }
.insv-lanc-resumo { margin-top: 14px; padding: 11px 14px; background: #FBF8F2; border-radius: 11px; font-size: 12.5px; color: #5A5049; line-height: 1.55; display: flex; flex-direction: column; gap: 4px; }
.insv-lanc-resumo strong { color: var(--v2-ink, #241F1B); font-weight: 600; }
.insv-lanc-av { font-size: 11.5px; color: #8A6B26; }
.insv-lanc-av.erro { color: var(--v2-vermelho, #A5584E); }
.insv-lanc-hist { margin-top: 16px; }
.insv-modal-ov .inj-modal-body > .insv-campo:not(:first-child) { margin-top: 14px; }

/* --- celular (375 px) --- */
@media (max-width: 600px) {
  /* 23/out · no celular as 3 visões quebram em linhas em vez de esconder a última */
  .insv-seg { flex-wrap: wrap; overflow: visible; }
  .insv-seg button { flex: 1 1 auto; padding: 7px 10px; }
  .insv { gap: 14px; }
  .insv-mini { padding: 6px 8px; font-size: 11px; }
  .insv-grupo-t { font-size: 17px; }
  .insv-rot-grid { grid-template-columns: 1fr; }
  .insv-lanc-cab { grid-template-columns: 1fr 1fr; }
  .insv-lanc-cab .insv-campo:first-child { grid-column: 1 / -1; }
  .insv-lanc-l { grid-template-columns: 32px minmax(0, 1fr) 70px; }
  .insv-lanc-l .insv-lanc-quem { grid-column: 2 / -1; }
  .insv-filtros { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .insv-filtros::-webkit-scrollbar { display: none; }
}

/* --- barra de Insumos: abas, busca e botão com a mesma altura e respiro entre eles --- */
#insumos-main > .v2i-toolbar { gap: 14px; margin-bottom: 18px; }
#insumos-main > .v2i-toolbar .v2i-search { height: 38px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; max-width: none; }
#insumos-main > .v2i-toolbar > .v2seg { height: 38px; box-sizing: border-box; margin-bottom: 0; }
#insumos-main > .v2i-toolbar .v2sc-newitem, #insumos-main > .v2i-toolbar .v2n-btn-dark { height: 38px; box-sizing: border-box; padding: 0 16px; border-radius: 10px; font-size: 13px; font-weight: 500; white-space: nowrap; }
