/* Ô "Xuất hóa đơn công ty" và khối hóa đơn điện tử (ADR-0050). Nền trắng/xanh rất nhạt, chữ mực; lỗi là chữ đỏ gạch có biểu tượng chữ, không chỉ dựa vào màu. */
.invoice-box{margin:1rem 0;padding:.9rem 1rem;border:1px solid var(--line,#d7e2df);border-radius:10px;background:#f8fbfa;min-width:0}
.invoice-box .invoice-toggle{display:flex;align-items:center;gap:.6rem;min-height:44px;font-weight:700;cursor:pointer}
.invoice-box .invoice-toggle input{width:22px;height:22px;margin:0;flex:none}
.invoice-fields label{display:block;margin-top:.6rem}
.invoice-fields input{display:block;width:100%;max-width:100%;box-sizing:border-box;margin:.4rem 0 .2rem;padding:.7rem;min-height:44px;border:1px solid #bacdc8;border-radius:8px;font:inherit;background:#fff;color:#253c37}
.invoice-fields input[aria-invalid=true]{border:2px solid #a8321e}
.invoice-hint{margin:.1rem 0 .4rem;color:#4a5d56;font-size:.92rem}
.invoice-field-error{margin:.1rem 0 .4rem;color:#a8321e;font-weight:700;font-size:.92rem}
.invoice-field-error::before{content:"Cần sửa: "}
.order-invoice{margin:1rem 0;padding:.9rem 1rem;border:1px solid var(--line,#d7e2df);border-radius:10px;background:#fff;color:#253c37}
.order-invoice h3{font-size:1rem;margin:0 0 .4rem}
.order-invoice dl{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:.25rem .9rem;margin:0}
.order-invoice dt{font-weight:700}.order-invoice dd{margin:0;overflow-wrap:anywhere}
.order-invoice .btn{min-height:44px;margin:.6rem .4rem 0 0;white-space:normal}
.order-invoice p{margin:.5rem 0 0;color:#4a5d56}
.invoice-box .visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:420px){.order-invoice dl{grid-template-columns:minmax(0,1fr)}.order-invoice dd{margin-bottom:.35rem}}

/* Cho phép dùng chung ở Xưởng và trang mua; luôn đủ 16px trên điện thoại. */
.invoice-box legend{font-weight:800;padding:0 .3rem}
.invoice-types{display:grid;grid-template-columns:minmax(0,1fr);gap:.5rem}
.invoice-required{color:#a8321e;font-weight:800}
.invoice-fields input{font-size:max(1rem,16px)}
.invoice-fields input:focus{outline:2px solid #117768;outline-offset:2px}
.invoice-account{margin-top:1rem;max-width:760px;min-width:0}
.invoice-account .invoice-box{margin-top:1rem}
.invoice-account .btn{margin:.3rem .5rem .3rem 0;white-space:normal;min-height:44px}
.invoice-account [role=alert]{color:#a8321e;overflow-wrap:anywhere}

.invoice-box .invoice-choice{display:flex;align-items:flex-start;gap:.65rem;min-height:44px;padding:.7rem .8rem;border:1px solid #bacdc8;border-radius:8px;background:#fff;color:#253c37;cursor:pointer;min-width:0}
.invoice-box .invoice-choice input{display:block;width:22px;height:22px;max-width:none;padding:0;border:0;margin:.1rem 0 0;flex:none;accent-color:#117768}
.invoice-box .invoice-choice span{display:grid;gap:.15rem;min-width:0}
.invoice-choice strong{font-size:1rem;line-height:1.4}
.invoice-choice small{font-size:.92rem;line-height:1.5;color:#4a5d56;overflow-wrap:anywhere}
.invoice-choice.is-checked{border:2px solid #117768;background:#edf7f4;color:#0b4f45}
.invoice-choice:focus-within{outline:2px solid #117768;outline-offset:2px}
.invoice-panel{margin-top:.6rem}
.invoice-lookup{margin:.4rem 0;min-height:44px;max-width:100%;white-space:normal}

.invoice-tax-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.6rem;align-items:center}
.invoice-tax-row .invoice-field{min-width:0}
.invoice-lookup{min-width:44px}
.invoice-lookup[hidden]{display:none!important}
