/* Café verde, ficha do lote, QR para imprimir, Compras e Contatos (verde.js e compras.js).
   Só tokens de demo.css; a única cor fixa é o preto no branco do QR e da etiqueta impressa, que é papel de verdade. */

.vd-volta { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 12px; }
.vd-volta:hover { color: var(--ink); }
.vd-volta svg { width: 16px; height: 16px; }
.vd-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.vd-cab .acoes { display: flex; gap: 6px; flex-wrap: wrap; }
.vd-eyebrow { color: var(--accent-ink); font-size: 12px; letter-spacing: .04em; margin-bottom: 2px; }
.vd-tit { font-size: clamp(19px, 2.4vw, 24px); font-weight: var(--w-display); letter-spacing: -.02em; line-height: 1.2; }
.vd-cab .muted { font-size: 13.5px; margin-top: 2px; }

/* a corrente do pé de café à xícara */
.vd-rastro { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; counter-reset: none; }
.vd-rastro li { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px 12px 12px; border-radius: var(--r-2); background: var(--sup-1); box-shadow: inset 0 0 0 1px var(--hair); min-width: 0; }
.vd-rastro li + li::before { content: ""; position: absolute; left: -10px; top: 26px; width: 10px; height: 2px; background: var(--accent); opacity: .55; }
.vd-rastro-ic { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 4px; }
.vd-rastro-ic svg { width: 17px; height: 17px; }
.vd-rastro small { font: 500 10.5px/1.2 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.vd-rastro b { font-size: 13.5px; font-weight: var(--w-strong); line-height: 1.3; overflow-wrap: anywhere; }
.vd-rastro span:last-child { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; overflow-wrap: anywhere; }
@media (max-width: 1180px) { .vd-rastro { grid-template-columns: repeat(3, minmax(0, 1fr)); } .vd-rastro li:nth-child(4)::before { display: none; } }
@media (max-width: 620px) {
  .vd-rastro { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .vd-rastro li { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 10px; }
  .vd-rastro li > * { grid-column: 2; }
  .vd-rastro .vd-rastro-ic { grid-column: 1; grid-row: 1 / span 3; margin: 0; }
  .vd-rastro li + li::before { left: 26px; top: -8px; width: 2px; height: 8px; display: block !important; }
}

/* ---------------- QR ---------------- */
.vd-qr { display: block; width: 100%; height: auto; image-rendering: pixelated; border-radius: 4px; }
.vd-qr-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.vd-qr-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; }
.vd-qr-card + .vd-qr-card { margin-top: 0; }
.vd-qr-card-qr { box-shadow: 0 0 0 1px var(--hair); border-radius: 6px; overflow: hidden; }
.vd-qr-card h3 { font-size: 14.5px; font-weight: var(--w-strong); line-height: 1.3; }
.vd-qr-card .muted { font-size: 12.5px; margin-top: 2px; }
.vd-qr-card .sec { display: block; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.vd-qr-card .acoes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.vd-url { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; overflow-wrap: anywhere; }
@media (max-width: 420px) { .vd-qr-card { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; } }

.vd-mini-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.vd-mini { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-2); box-shadow: inset 0 0 0 1px var(--hair-2); background: var(--paper); text-align: left; min-width: 0; }
.vd-mini:hover { background: var(--sup-1); }
.vd-mini.on { box-shadow: inset 0 0 0 2px var(--accent); }
.vd-mini .vd-qr { width: 44px; flex: none; }
.vd-mini span { display: flex; flex-direction: column; min-width: 0; }
.vd-mini b { font-size: 12px; }
.vd-mini small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vd-mini:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; }

/* a etiqueta: papel branco, tinta preta (é a prévia do que sai na impressora) */
.vd-previa { display: flex; justify-content: center; padding: 18px 10px; border-radius: var(--r-2); background: var(--paper-3); overflow: hidden; }
.vd-etq { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; width: 100%; max-width: 360px; padding: 12px; background: #fff; color: #111; border-radius: 6px; box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 8px 24px -12px rgba(0, 0, 0, .35); font-size: 11.5px; line-height: 1.35; }
.vd-etq-g { max-width: 420px; grid-template-columns: 150px minmax(0, 1fr); padding: 16px; font-size: 12.5px; }
.vd-etq-qr { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.vd-etq-qr .mono { font-size: 10.5px; color: #333; }
.vd-etq-marca { font: 500 9.5px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #6b4a2f; }
.vd-etq h3 { font-size: 15px; font-weight: 700; margin: 2px 0 6px; letter-spacing: -.01em; color: #111; }
.vd-etq-g h3 { font-size: 18px; }
.vd-etq dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 8px; margin: 0; }
.vd-etq dt { color: #555; }
.vd-etq dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.vd-etq-notas { margin-top: 6px; font-style: italic; color: #333; }
.vd-etq-url { margin-top: 6px; font-size: 9.5px; color: #555; overflow-wrap: anywhere; }
@media (max-width: 420px) { .vd-etq, .vd-etq-g { grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 10px; } .vd-etq-g h3 { font-size: 16px; } }

/* o celular de quem lê o QR */
.vd-cel { max-width: 300px; margin: 0 auto; padding: 18px 16px 16px; border-radius: 26px; background: var(--paper); box-shadow: inset 0 0 0 6px var(--ink), 0 12px 30px -18px rgba(21, 16, 12, .6); }
.vd-cel-marca { font: 500 10.5px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); text-align: center; margin-top: 6px; }
.vd-cel h3 { font-size: 18px; font-weight: var(--w-display); text-align: center; margin-top: 4px; letter-spacing: -.015em; }
.vd-cel > .muted { font-size: 12px; text-align: center; }
.vd-cel-passos { list-style: none; margin: 14px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--accent-soft); display: flex; flex-direction: column; gap: 10px; }
.vd-cel-passos li { position: relative; display: flex; flex-direction: column; font-size: 12.5px; }
.vd-cel-passos li::before { content: ""; position: absolute; left: -20px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.vd-cel-passos b { font-weight: var(--w-strong); }
.vd-cel-passos span { color: var(--ink-3); }
.vd-cel-cta { margin: 16px 0 4px; height: 38px; border-radius: 999px; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; font-size: 13.5px; font-weight: var(--w-medium); }

/* impressão: só a etiqueta */
#vdImpressao { display: none; }
@media print {
  html.vd-imprimindo body > *:not(#vdImpressao) { display: none !important; }
  html.vd-imprimindo #vdImpressao { display: block; padding: 8mm; }
  html.vd-imprimindo .vd-etq { box-shadow: none; border: 1px dashed #999; break-inside: avoid; }
}

/* ---------------- Compras ---------------- */
.cp-chave { font-size: 11px; color: var(--ink-3); overflow-wrap: anywhere; }
.cp-xml { max-height: 340px; overflow: auto; margin: 0; padding: 12px; border-radius: var(--r-2); background: var(--sup-1); box-shadow: inset 0 0 0 1px var(--hair); font: 11.5px/1.5 var(--mono); white-space: pre; color: var(--ink-2); }
.cp-passos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cp-passos li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; font-size: 13px; line-height: 1.45; }
.cp-passos li svg { width: 18px; height: 18px; color: var(--pos); margin-top: 1px; }
.cp-passos li.warn svg { color: var(--warn); }
.cp-drop { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r-3); border: 1.5px dashed var(--hair-2); background: var(--sup-1); margin-bottom: 16px; }
.cp-drop.on { border-color: var(--accent); background: var(--accent-soft); }
.cp-drop p { flex: 1 1 220px; font-size: 13px; color: var(--ink-2); line-height: 1.45; min-width: 0; }
.cp-drop label { position: relative; }
.cp-drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cp-drop label:focus-within { outline: 2px solid var(--foco); outline-offset: 2px; }
.cp-pend { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cp-pend .caixa + .caixa { margin-top: 0; }
.cp-nota h3 { font-size: 14.5px; font-weight: var(--w-strong); line-height: 1.3; }
.cp-nota .muted { font-size: 12.5px; }
.cp-nota .cp-v { font-size: 20px; font-weight: var(--w-display); letter-spacing: -.02em; margin: 6px 0 2px; }
.cp-nota .acoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cp-item-sel { min-width: 170px; }
.cp-ins-cm { font-size: 12px; }

/* ---------------- Contatos ---------------- */
.ct-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ct-g .caixa + .caixa { margin-top: 0; }
.ct-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ct-av { flex: none; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 600 13px/1 var(--mono); background: var(--accent-soft); color: var(--accent-ink); }
.ct-top h2 { font-size: 15px; font-weight: var(--w-strong); line-height: 1.25; }
.ct-top p { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.ct-obs { font-size: 13px; color: var(--ink-2); line-height: 1.45; margin-bottom: 10px; }
.ct .dl { font-size: 13px; }
.ct .acoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
@media (max-width: 420px) { .ct-g, .cp-pend, .vd-qr-g { grid-template-columns: minmax(0, 1fr); } }
.tab .vd-origem { min-width: 190px; }
.cp-drop > svg { width: 26px; height: 26px; flex: none; color: var(--accent-ink); }
.vd-qr, .vd-qr * { stroke: none !important; }
