* { box-sizing: border-box; }
body { margin: 0; padding: 16px; color: #202820; background: #f4f6f0; font: 14px/1.4 system-ui, sans-serif; }
article, .tools { width: min(100%, 720px); margin: 0 auto 12px; }
.thermal article, .thermal .tools { max-width: 74mm; }
article { background: #fff; padding: 20px; border: 1px solid #dfe5db; }
.thermal article { padding: 10px; font-size: 12px; }
header { border-bottom: 1px solid #aaa; padding-bottom: 9px; }
h1 { margin: 0; line-height: 1.2; font-size: 1.5em; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 4px 3px; border-bottom: 1px solid #ccc; }
th:last-child, td:last-child { text-align: right; }
tfoot th { text-align: left; }
.payment { display: flex; justify-content: space-between; gap: 4px; margin: 7px 0; }
.legend { margin-bottom: 0; text-align: center; font-weight: 700; letter-spacing: .04em; }
.tools { display: flex; gap: 12px; align-items: center; }
.tools button { background: #245540; color: #fff; border-radius: 6px; border: 0; padding: 6px 12px; font: inherit; cursor: pointer; }
.tools a { color: #245540; }
.fiscal-actions { flex-wrap: wrap; }
.fiscal-actions label { display: grid; gap: 3px; max-width: 100%; }
.fiscal-actions select { max-width: 100%; font: inherit; }

@media print {
    body { background: white; padding: 0; }
    .tools { display: none; }
    article, .thermal article { border: 0; padding: 0; margin: 0 auto; break-inside: auto; }
    tr { break-inside: avoid; }
}
.devoluciones { display: block; box-sizing: border-box; padding: 16px; background: #fff; border: 1px solid #dfe5db; }
.devoluciones h2 { margin-top: 0; }
.devoluciones input { max-width: 100%; font: inherit; }
.devoluciones input[type=number] { width: 6em; }
