/* Etiquetas de envio a partir de planilha — complementa office.css/shipping.css */
.ev-model { margin-left: auto; font-size: 13px; }
.ev-map-title { margin: 4px 0 8px; font-weight: 600; font-size: 14px; }
.ev-map-title small { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 4px; }
.ev-map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 12px; }
.ev-mapf .label { font-size: 12.5px; }
.ev-mapf select.input { height: 38px; font-size: 13.5px; padding-right: 26px; text-overflow: ellipsis; }
.ev-req { color: var(--pdf); font-weight: 700; }
.ev-miss select.input { border-color: var(--pdf); background: var(--pdf-soft); }

.ev-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-stat { margin: 0; padding: 7px 12px; border-radius: 99px; font-size: 13.5px; background: var(--bg-2); color: var(--ink-2); }
.ev-stat b { color: var(--ink); }
.ev-stat.ok { background: var(--ship-soft); }
.ev-stat.ok b { color: var(--ship); }
.ev-stat.bad { background: var(--pdf-soft); }
.ev-stat.bad b { color: var(--pdf); }
.ev-stat.warn { background: var(--biz-soft); }
.ev-stat.warn b { color: var(--biz); }
.ev-bad li small { white-space: normal; text-align: right; max-width: 55%; }
.ev-bad li.warn small { color: var(--biz); }

.ev-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.ev-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ev-table:empty { display: none; }
.ev-table th, .ev-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.ev-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--bg); }
.ev-table tbody tr:last-child td { border-bottom: 0; }
.ev-table tfoot td { color: var(--muted); border-bottom: 0; border-top: 1px solid var(--line); }
.ev-table-wrap:has(.ev-table:empty) { display: none; }
.ev-seg button { font-size: 13px; }

/* Prévia da etiqueta (HTML aproximado; o PDF sai do servidor) */
.ev-preview { display: grid; place-items: center; }
.ev-label { width: 100%; display: grid; place-items: center; }
.evl { container-type: inline-size; width: min(100%, 340px); aspect-ratio: 100 / 150; background: #fff; color: #000; border: 2px solid #000; box-shadow: 0 0 0 8px #fff, var(--shadow); display: flex; flex-direction: column; font-family: Helvetica, Arial, sans-serif; overflow: hidden; }
.ev-label[data-size="100x100"] .evl { aspect-ratio: 1; }
.ev-label[data-size="a4-4"] .evl { aspect-ratio: 105 / 148.5; }
.ev-label[data-size="a4265"] .evl { aspect-ratio: 99 / 67.8; width: min(100%, 380px); }
.evl p { margin: 0; }
.evl-head { display: flex; justify-content: space-between; align-items: stretch; border-bottom: 1.5px solid #000; font-size: 10px; }
.evl-head b { padding: 5px 7px; }
.evl-head span { background: #000; color: #fff; font-weight: 700; padding: 5px 8px; }
.evl-dest { padding: 6px 9px; flex: 1; display: flex; flex-direction: column; gap: 1px; min-height: 0; }
.evl-nome { font-weight: 700; font-size: 7cqw; line-height: 1.12; }
.evl-addr { font-size: 4.6cqw; line-height: 1.25; }
.evl-city { font-weight: 700; font-size: 5.8cqw; margin-top: 3px !important; }
.evl-cep { font-weight: 700; font-size: 13.5cqw; line-height: 1; letter-spacing: -.01em; margin-top: 2px !important; }
.evl-cep small { font-size: 9px; margin-right: 5px; }
.evl-fone { font-size: 3.6cqw; margin-top: 3px !important; }
.evl-obs { border-top: 1px solid #000; padding: 4px 9px; font-size: 10px; }
.evl-bar { border-top: 1.5px solid #000; padding: 8px 18px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.evl-bar svg { width: 62%; height: 19cqw; fill: #000; }
.evl-bar small { font-size: 9.5px; font-weight: 700; }
.evl-rem { border-top: 1.5px solid #000; padding: 5px 9px 7px; font-size: 9.5px; line-height: 1.3; }
.evl-rem > b { font-size: 8px; display: block; }
.evl-empty { color: #999; font-style: italic; }
.ev-label[data-size="100x100"] .evl-nome { font-size: 5.6cqw; }
.ev-label[data-size="100x100"] .evl-cep { font-size: 10cqw; }
.ev-label[data-size="100x100"] .evl-bar svg { height: 11cqw; }
.ev-label[data-size="100x100"] .evl-fone { display: none; }
.ev-label[data-size="a4265"] .evl-nome { font-size: 4.2cqw; }
.ev-label[data-size="a4265"] .evl-addr { font-size: 3cqw; }
.ev-label[data-size="a4265"] .evl-addr + .evl-addr { display: none; }
.ev-label[data-size="a4265"] .evl-city { font-size: 3.6cqw; margin-top: 0 !important; }
.ev-label[data-size="a4265"] .evl-cep { font-size: 6.5cqw; }
.ev-label[data-size="a4265"] .evl-bar { padding: 4px 18px 2px; }
.ev-label[data-size="a4265"] .evl-bar svg { height: 20px; }
.ev-label[data-size="a4265"] .evl-rem p + p { display: none; }
.ev-label[data-size="a4265"] .evl-rem, .ev-label[data-size="a4265"] .evl-obs { padding-top: 2px; padding-bottom: 3px; font-size: 8px; }

.ev-result { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--ship-soft); }
.ev-done { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.ev-done b { color: var(--ship); }
.ev-done.bad b, .ev-done.bad { color: var(--pdf); }
.ev-files { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-files .btn small { font-weight: 400; opacity: .8; }
@media (max-width: 520px) {
  .ev-model { margin-left: 0; }
  .ev-map-grid { grid-template-columns: 1fr 1fr; }
  .ev-files .btn { flex: 1 1 100%; justify-content: center; }
}
