/* Ferramentas para vendedores: precificação em lote e política de trocas — complementa office.css/calc.css */
.vd-page .tool-head { padding-bottom: 24px; }
.vd-step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font: 700 13px/1 var(--font); margin-right: 6px; vertical-align: 3px; letter-spacing: 0; }
.vd-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }

/* Entrada da planilha */
.vd-drop { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; align-items: center; padding: 16px; border: 2px dashed var(--line-2); border-radius: 16px; background: var(--bg); transition: border-color .15s, background .15s; }
.vd-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.vd-drop-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.vd-drop-ic .ic { width: 24px; height: 24px; }
.vd-drop-title { margin: 0 0 3px; font-weight: 600; font-size: 15px; }
.vd-drop-b { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.vd-drop-b .btn .ic { width: 15px; height: 15px; }
.vd-links { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.vd-link { border: 0; background: none; padding: 0; color: var(--accent); font: 600 13px var(--font); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.vd-file { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--img-soft); }
.vd-file > .ic { width: 20px; height: 20px; color: var(--img); flex: none; }
.vd-file span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vd-file b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-file small { font-size: 12.5px; color: var(--ink-2); }
.vd-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.vd-map-row { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vd-map-k { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.vd-map-k small { font-weight: 400; }
.vd-req { font-size: 10.5px; font-weight: 700; color: var(--biz); text-transform: uppercase; letter-spacing: .03em; margin-left: 2px; }
.vd-map .input { height: 38px; font-size: 13.5px; }
.vd-map-row:not(.on) .input { color: var(--muted); }
.vd-map-row.on .input { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-2)); }
.vd-map-opts { display: flex; gap: 8px 18px; flex-wrap: wrap; margin-top: 12px; }
.vd-map-opts .check { font-size: 13.5px; }

/* Canais */
.vd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 9px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: 500 13.5px var(--font); cursor: pointer; transition: background .12s, border-color .12s; }
.vd-chip .ic { width: 15px; height: 15px; stroke-width: 2.6; opacity: 0; transition: opacity .12s; margin-right: -2px; }
.vd-chip small { font-size: 10.5px; color: var(--biz); font-weight: 600; }
.vd-chip:hover { border-color: var(--accent); }
.vd-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); font-weight: 600; }
.vd-chip[aria-pressed="true"] .ic { opacity: 1; color: var(--accent); }
.vd-chip:not([aria-pressed="true"]) .ic { width: 0; }
.vd-ajustes { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.vd-ajustes > summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); padding: 4px 0; }
.vd-ajustes a, .vd-page .cc-help a, .vd-how a { color: var(--accent); }

/* Resultado */
.vd-res { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.vd-empty { display: flex; align-items: center; gap: 14px; color: var(--ink-2); box-shadow: none; background: var(--bg); border-style: dashed; }
.vd-empty .ic { width: 30px; height: 30px; color: var(--muted); flex: none; }
.vd-empty p { margin: 0; font-size: 14.5px; }
.vd-busy { display: flex; flex-direction: column; gap: 8px; }
.vd-progress { height: 6px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.vd-progress i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.vd-res-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.vd-dl { flex: 0 1 auto; }
.vd-dl .btn { flex: 0 0 auto; }
.vd-table-card { padding: 14px; }
.vd-tools { display: flex; gap: 8px 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.vd-tools .seg { flex: 0 0 auto; }
.vd-canal-sel { width: auto; min-width: 200px; height: 38px; font-size: 14px; }
.vd-search { flex: 1 1 180px; height: 38px; font-size: 14px; min-width: 0; }
.vd-only { font-size: 13.5px; white-space: nowrap; }
.vd-wrap { max-height: 620px; }
.vd-table td { vertical-align: top; }
.vd-table td b { font-weight: 700; display: block; }
.vd-table td small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.vd-table td small.neg { color: var(--pdf); font-weight: 600; }
.vd-table td small.wrn, .vd-table td.wrn { color: var(--biz); }
.vd-table td small.pos { color: var(--img); }
.vd-table td.wrn small, .vd-table td.neg small, .vd-table td.pos small { display: inline; color: inherit; opacity: .8; }
.vd-table td.muted { color: var(--muted); text-align: left; font-size: 12.5px; }
.vd-prod { min-width: 190px !important; max-width: 320px; }
.vd-prod b { white-space: normal; font-weight: 600 !important; overflow-wrap: anywhere; }
.vd-flag { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--bg-2); color: var(--ink-2); }
.vd-flag.bad { background: var(--pdf-soft); color: var(--pdf); }
.vd-flag.warn { background: var(--biz-soft); color: var(--biz); }
.cc-table tbody tr.vd-bad td:first-child { box-shadow: 3px 0 0 var(--pdf) inset; }
.cc-table tbody tr.vd-warn td:first-child { box-shadow: 3px 0 0 var(--biz) inset; }
.cc-table tbody tr.vd-bad td { background: color-mix(in srgb, var(--pdf-soft) 55%, var(--surface)); }
.cc-table tbody tr.vd-warn td { background: color-mix(in srgb, var(--biz-soft) 45%, var(--surface)); }
.cc-table tbody tr.vd-err td { color: var(--muted); }
.cc-table tbody td.vd-best { background: var(--img-soft) !important; }
.cc-table tbody td.vd-best b { color: var(--img); }
.vd-nofrete { display: inline-block; font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--biz); background: var(--biz-soft); border-radius: 99px; padding: 0 6px; margin-top: 2px; }
.vd-mob { display: none; }
.vd-pag { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.vd-leg { margin: 10px 0 0; }
.vd-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 3px; }
.vd-sw.best { background: var(--img); } .vd-sw.bad { background: var(--pdf); } .vd-sw.warn { background: var(--biz); }
.vd-how { margin-top: 18px; }
.cc-stat.vd-hl { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 1px var(--accent) inset; }
.cc-stat.vd-hl b { color: var(--accent); }
.vd-table tbody td:first-child { background: var(--surface); }
.vd-table tbody tr:nth-child(even) td:first-child { background: color-mix(in srgb, var(--bg) 60%, var(--surface)); }
@media (max-width: 720px) {
  .vd-table th:first-child, .vd-table td:first-child { position: sticky; left: 0; z-index: 1; }
  .vd-table th:first-child { z-index: 2; }
  .vd-table td:first-child { border-right: 1px solid var(--line); }
  .vd-prod { min-width: 128px !important; max-width: 150px; }
  .vd-table .vd-desk { display: none; }
  .vd-mob { display: inline; }
}
.vd-page .cc-disclaimer { margin-top: 12px; }

/* Política de trocas */
.pt-layout { display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: 18px; align-items: start; }
.pt-form { display: flex; flex-direction: column; gap: 14px; }
.pt-form .of-card > .of-h { display: flex; align-items: center; }
.pt-form .of-h small { font: 400 13px var(--font); color: var(--muted); margin-left: auto; }
.pt-law { margin: 8px 0 0; padding: 9px 11px; border-radius: 10px; background: var(--doc-soft); font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.pt-law b { color: var(--ink); }
.pt-sub { padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.pt-checks { display: flex; flex-direction: column; gap: 8px; }
.pt-checks .check { align-items: flex-start; }
.pt-checks .check input { margin-top: 1px; flex: none; }
.pt-preview-col { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pt-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pt-bar .btn .ic { width: 16px; height: 16px; }
.pt-bar .grow { flex: 1; }
.pt-copy { position: relative; }
.pt-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; min-width: 210px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.pt-menu[hidden] { display: none; }
.pt-menu button { text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; font: 500 14px var(--font); color: var(--ink); cursor: pointer; }
.pt-menu button small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.pt-menu button:hover { background: var(--bg-2); }
.pt-doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px 38px; max-height: calc(100vh - 170px); overflow: auto; font-size: 14.5px; line-height: 1.6; color: var(--ink); overscroll-behavior: contain; }
.pt-doc h1 { font-family: var(--display); font-size: 26px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 4px; }
.pt-doc .pt-meta { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.pt-doc h2 { font-family: var(--display); font-size: 17px; letter-spacing: -.01em; margin: 22px 0 6px; color: var(--accent); }
.pt-doc p { margin: 0 0 10px; }
.pt-doc ul { margin: 0 0 10px; padding-left: 20px; }
.pt-doc li { margin: 3px 0; }
.pt-doc .pt-note { margin-top: 22px; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: 12.5px; color: var(--muted); }
.pt-doc mark { background: var(--biz-soft); color: var(--biz); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.pt-jump { display: none; }
.pt-jump .ic { width: 16px; height: 16px; }

@media (max-width: 920px) {
  .vd-top, .pt-layout { grid-template-columns: minmax(0, 1fr); }
  .pt-preview-col { position: static; }
  .pt-doc { max-height: none; }
  .pt-jump { display: flex; justify-content: center; }
}
@media (max-width: 520px) {
  .vd-map { grid-template-columns: minmax(0, 1fr); }
  .vd-drop { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .vd-drop-ic { display: none; }
  .vd-drop-b .btn { flex: 1 1 auto; }
  .vd-res-head .vd-dl { width: 100%; }
  .vd-res-head .vd-dl .btn { flex: 1 1 auto; width: auto; }
  .vd-tools .seg { width: 100%; }
  .vd-canal-sel { width: 100%; }
  .pt-doc { padding: 22px 18px; font-size: 14px; }
  .pt-doc h1 { font-size: 22px; }
  .pt-bar .btn { flex: 1 1 auto; }
}
