.order-v2{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(360px,.75fr);gap:18px}.order-v2-panel{min-width:0;border:1px solid var(--border);border-radius:14px;background:var(--card-bg);overflow:visible}.order-v2-head{display:flex;align-items:center;gap:9px;padding:14px 16px;border-bottom:1px solid var(--border);font-weight:750;font-size:1rem}.order-v2-head i{color:var(--primary)}.order-v2-body{padding:16px}.order-v2-search{position:relative}.order-v2-results{position:absolute;z-index:150;top:calc(100% + 5px);left:0;right:0;max-height:300px;overflow:auto;background:var(--card-bg);border:1px solid var(--border);border-radius:10px;box-shadow:0 10px 25px rgba(0,0,0,.14)}.order-v2-results:empty{display:none}.order-v2-result{display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;padding:11px;border:0;border-bottom:1px solid var(--border);background:transparent;text-align:left;cursor:pointer}.order-v2-result:hover{background:var(--body-bg)}.order-v2-result small{display:block;color:var(--text-secondary);margin-top:3px}.order-v2-cart{margin-top:16px;border:1px solid var(--border);border-radius:10px;overflow:auto;max-height:480px}.order-v2-cart table{margin:0;min-width:650px}.order-v2-cart thead{position:sticky;top:0;z-index:3;background:var(--card-bg)}.order-v2-cart .qty-input{width:68px}.order-v2-cart .price-input{width:112px}.order-v2-empty{text-align:center;padding:46px 15px;color:var(--text-secondary)}.order-v2-side{position:sticky;top:0}.order-v2-side .order-v2-body{display:flex;flex-direction:column;gap:12px;max-height:calc(100vh - 150px);overflow:auto}.order-v2-side .form-group{margin:0}.order-v2-customer-results{position:absolute;z-index:160;left:0;right:0;top:100%;max-height:220px;overflow:auto;background:var(--card-bg);border:1px solid var(--border);border-radius:9px;box-shadow:0 8px 20px rgba(0,0,0,.12)}.order-v2-customer-results:empty{display:none}.order-v2-customer{position:relative}.order-v2-new-customer{padding:12px;background:var(--body-bg);border:1px dashed var(--primary);border-radius:10px}.order-v2-summary{margin-top:4px;padding:14px;border-radius:12px;background:var(--body-bg);border:1px solid var(--border)}.order-v2-summary-row{display:flex;justify-content:space-between;gap:12px;margin-bottom:8px}.order-v2-summary-total{display:flex;justify-content:space-between;gap:12px;padding-top:11px;border-top:1px solid var(--border);font-size:1.12rem;font-weight:800;color:var(--primary)}.order-v2-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.order-v2-actions .btn{justify-content:center;min-height:42px}.order-v2-actions .btn-print{grid-column:1/-1}.order-v2-paper{display:flex;align-items:center;gap:10px}.order-v2-paper label{font-weight:650;white-space:nowrap}.order-v2-paper select{flex:1}
@media(max-width:950px){.order-v2{grid-template-columns:1fr}.order-v2-side{position:static}.order-v2-side .order-v2-body{max-height:none}}
@media(max-width:600px){.order-v2-actions{grid-template-columns:1fr}.order-v2-actions .btn-print{grid-column:auto}.order-v2-body{padding:12px}}
.modal-footer:empty{display:none}
.order-v2-equal-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.order-v2-cash{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end}
.order-v2-change-value{display:flex;align-items:center;justify-content:flex-end;background:var(--body-bg);font-weight:700;color:var(--primary)}
.order-v2-payment-method{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:10px 12px;border:1px solid var(--border);border-radius:9px;background:var(--body-bg)}.order-v2-payment-method>span{font-weight:650;margin-right:auto}.order-v2-payment-choices{display:flex;align-items:center;gap:16px;flex-wrap:nowrap}.order-v2-payment-method label{display:flex;align-items:center;gap:5px;cursor:pointer;white-space:nowrap}.order-v2-payment-method input{accent-color:var(--primary)}
.order-v2-bottom{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start;padding-top:12px;border-top:1px solid var(--border)}
.order-v2-bottom .order-v2-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
.order-v2-bottom .order-v2-actions .btn{white-space:normal}
.order-v2-bottom .order-v2-paper select{min-width:0}
@media(max-width:600px){.order-v2-bottom{grid-template-columns:1fr}.order-v2-cash{grid-template-columns:1fr}}

/* Keep create-order content inside the viewport on every device. */
.order-v2-mobile-modal .modal-body{box-sizing:border-box!important;width:100%!important;max-width:100%!important;overflow-x:hidden!important}
.order-v2-mobile-modal .order-v2,.order-v2-mobile-modal .order-v2-panel,.order-v2-mobile-modal .order-v2-body,.order-v2-mobile-modal .order-v2-cart{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
.order-v2-mobile-modal .order-v2-cart{overflow-x:hidden!important}
.order-v2-mobile-modal .order-v2-cart table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important}
.order-v2-mobile-modal .order-v2-cart th,.order-v2-mobile-modal .order-v2-cart td{min-width:0!important;max-width:100%!important;box-sizing:border-box!important;overflow-wrap:anywhere!important;word-break:break-word!important}
.order-v2-mobile-modal .order-v2-results,.order-v2-mobile-modal .order-v2-customer-results{width:100%!important;max-width:100%!important;box-sizing:border-box!important;overflow-x:hidden!important}
@media(min-width:601px){.order-v2-mobile-modal .order-v2-cart{overflow-y:auto!important}.order-v2-mobile-modal .order-v2-cart table{min-width:0!important}}
.order-v2-mobile-modal .order-v2{gap:10px}.order-v2-mobile-modal .order-v2-panel{border-radius:10px}.order-v2-mobile-modal .order-v2-head{padding:11px 12px}.order-v2-mobile-modal .order-v2-body{padding:11px}.order-v2-mobile-modal .order-v2-cart{max-height:none;overflow:visible}.order-v2-mobile-modal .order-v2-cart table{min-width:0;width:100%;table-layout:fixed}.order-v2-mobile-modal .order-v2-cart th,.order-v2-mobile-modal .order-v2-cart td{padding:8px 5px;vertical-align:middle;overflow-wrap:anywhere}.order-v2-mobile-modal .order-v2-cart .qty-input{width:58px;min-height:38px;padding:6px 3px;text-align:center;font-weight:700}.order-v2-mobile-modal .order-v2-cart .price-input{width:100%;min-width:0;padding:6px 2px;text-align:right}.order-v2-mobile-modal .order-v2-cart td:last-child{text-align:center}.order-v2-mobile-modal .order-v2-side .order-v2-body{gap:10px;padding:11px}.order-v2-mobile-modal .order-v2-summary{padding:11px}.order-v2-mobile-modal .order-v2-title-tools .order-v2-actions{gap:6px}
@media(max-width:600px){.order-v2-mobile-modal .order-v2-cart thead{display:none}.order-v2-mobile-modal .order-v2-cart tbody,.order-v2-mobile-modal .order-v2-cart tr{display:block;width:100%}.order-v2-mobile-modal .order-v2-cart tr{display:grid;grid-template-columns:minmax(0,1fr) 64px 88px 38px;grid-template-areas:"product qty total remove" "price price total remove";gap:2px 6px;padding:9px 0;border-bottom:1px solid var(--border)}.order-v2-mobile-modal .order-v2-cart tr:last-child{border-bottom:0}.order-v2-mobile-modal .order-v2-cart tr td{display:block;border:0;padding:2px 0;min-width:0}.order-v2-mobile-modal .order-v2-cart tr td:nth-child(1){display:none}.order-v2-mobile-modal .order-v2-cart tr td:nth-child(2){grid-area:product}.order-v2-mobile-modal .order-v2-cart tr td:nth-child(3){grid-area:qty}.order-v2-mobile-modal .order-v2-cart tr td:nth-child(4){grid-area:price;max-width:150px}.order-v2-mobile-modal .order-v2-cart tr td:nth-child(5){grid-area:total;align-self:center;text-align:right;font-size:.9rem}.order-v2-mobile-modal .order-v2-cart tr td:nth-child(6){grid-area:remove;align-self:center}.order-v2-mobile-modal .order-v2-cart tr td:nth-child(3)::before{content:'SL';display:block;margin-bottom:2px;font-size:.7rem;color:var(--text-secondary);text-align:center}.order-v2-mobile-modal .order-v2-cart tr td:nth-child(4)::before{content:'Đơn giá';display:block;margin-bottom:2px;font-size:.7rem;color:var(--text-secondary)}.order-v2-mobile-modal .order-v2-cart tr td:nth-child(5)::before{content:'Thành tiền';display:block;margin-bottom:2px;font-size:.7rem;color:var(--text-secondary)}.order-v2-mobile-modal .order-v2-title-tools .order-v2-paper{width:100%;flex:1}.order-v2-mobile-modal .order-v2-title-tools .order-v2-actions{position:fixed;left:0;right:0;bottom:0;z-index:2200;display:grid;grid-template-columns:1fr 1fr;padding:8px max(10px,env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom));background:var(--card-bg);border-top:1px solid var(--border);box-shadow:0 -5px 16px rgba(0,0,0,.12)}.order-v2-mobile-modal .order-v2-title-tools .order-v2-actions .btn{min-height:44px}.order-v2-mobile-modal .order-v2-title-tools .order-v2-actions .btn-print{grid-column:auto}.order-v2-mobile-modal .modal-body{padding-bottom:150px!important}.order-v2-mobile-modal .modal-header{align-items:flex-start}.order-v2-mobile-modal .modal-header #modalTitle:has(.order-v2-title-tools){gap:8px}}
.modal-header #modalTitle:has(.order-v2-title-tools){display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:18px;width:100%;min-width:0}
.order-v2-title-tools{display:flex;align-items:center;justify-content:center;gap:10px;min-width:0;font-size:.86rem;font-weight:400}
.order-v2-title-tools .order-v2-paper{flex:0 1 210px}
.order-v2-title-tools .order-v2-actions{display:flex;flex-wrap:nowrap}
.order-v2-title-tools .btn{min-height:38px;padding:7px 10px;white-space:nowrap}
@media(max-width:950px){.modal-header #modalTitle:has(.order-v2-title-tools){grid-template-columns:1fr}.order-v2-title-tools{justify-content:flex-start;flex-wrap:wrap}.order-v2-title-tools .order-v2-actions{flex-wrap:wrap}}
.order-v2-side .order-v2-head{padding:10px 14px}
.order-v2-side .order-v2-body{gap:8px;padding:12px 14px}
.order-v2-side .order-v2-summary{padding:10px 12px}
.order-v2-side .order-v2-summary-row{margin-bottom:5px}
.invoice-product-usage{display:block;margin-top:3px;font-size:.76em;font-weight:400;color:#555;line-height:1.3}
.order-v2-print,.order-v2-print *{color:#000!important}.order-v2-print{font-weight:400}.order-v2-print h2,.order-v2-print th,.order-v2-print td:first-child,.order-v2-print td:nth-child(2)>strong{font-weight:700}.order-v2-print .invoice-info,.order-v2-print .invoice-info p,.order-v2-print td:nth-child(3),.order-v2-print td:nth-child(4){font-weight:400!important}.order-v2-print .invoice-product-usage{max-width:100%;white-space:normal;overflow-wrap:anywhere;word-break:break-word;font-weight:400!important}.order-v2-print-total{text-align:right!important;margin-top:8px;font-size:1.05rem;font-weight:800!important}
@media print{html,body{margin:0!important;padding:0!important;height:auto!important;min-height:0!important;background:#fff!important}body>*:not(#invoicePrint){display:none!important}#invoicePrint{display:block!important;position:absolute!important;inset:0 auto auto 0!important;width:100%!important;height:auto!important;margin:0!important;padding:0!important}.order-v2-print{box-sizing:border-box;max-width:none!important;width:100%!important;margin:0!important;padding:8mm 22mm!important;page-break-before:avoid!important;break-before:avoid-page!important;overflow:hidden!important}.order-v2-print .invoice-header{margin:0 0 8px!important;padding:0 0 5px!important}.order-v2-print .invoice-company h2{margin:0!important}.order-v2-print .invoice-company p{margin:2px 0 0!important}.order-v2-print .invoice-title{margin:8px 0!important}.order-v2-print .invoice-info{margin:0 0 6px!important}.order-v2-print .invoice-info p{margin:1px 0!important;line-height:1.25}.order-v2-print .invoice-table{box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;table-layout:fixed!important}.order-v2-print .invoice-table th,.order-v2-print .invoice-table td{box-sizing:border-box!important;padding:5px 5px!important;line-height:1.25;white-space:normal!important;overflow-wrap:anywhere}.order-v2-print .invoice-table th:nth-child(1){width:9%}.order-v2-print .invoice-table th:nth-child(2){width:45%}.order-v2-print .invoice-table th:nth-child(3){width:9%}.order-v2-print .invoice-table th:nth-child(4){width:17%}.order-v2-print .invoice-table th:nth-child(5){width:20%}.order-v2-print table{page-break-inside:auto}.order-v2-print tr{page-break-inside:avoid;break-inside:avoid}body.print-thermal-80 .order-v2-print,body.print-thermal-58 .order-v2-print{padding:4mm 6mm!important;font-size:10px}body.print-thermal-80 .order-v2-print .invoice-table th,body.print-thermal-80 .order-v2-print .invoice-table td,body.print-thermal-58 .order-v2-print .invoice-table th,body.print-thermal-58 .order-v2-print .invoice-table td{padding-left:2px!important;padding-right:2px!important}}
.order-v2-order-info{display:grid;grid-template-columns:minmax(0,1fr) minmax(185px,.85fr);gap:10px;align-items:end}.order-v2-new-customer{display:grid;grid-template-columns:1fr;gap:10px}.order-v2-new-customer[hidden]{display:none}.order-v2-order-info.has-new-customer .order-v2-customer{grid-column:1/-1}.order-v2-order-info.has-new-customer .order-v2-new-customer,.order-v2-order-info.has-new-customer .order-v2-date{align-self:end}@media(max-width:560px){.order-v2-order-info,.order-v2-new-customer{grid-template-columns:1fr}.order-v2-order-info.has-new-customer .order-v2-customer{grid-column:auto}}
.order-v2-customer-status{min-height:18px;margin-top:4px;font-size:.78rem}.order-v2-customer-status.invalid{color:var(--danger)}.order-v2-customer-status.valid{color:var(--success)}.order-v2-customer-status.new{color:var(--primary)}.order-v2-new-customer{grid-template-columns:1fr;padding:0;border:0;border-radius:0;background:transparent}.order-v2-order-info.has-new-customer{align-items:start}.order-v2-order-info.has-new-customer .order-v2-new-customer,.order-v2-order-info.has-new-customer .order-v2-date{align-self:start}.order-v2-order-info.has-new-customer .form-group{margin-top:0}
@media print{.order-v2-print{padding-top:6mm!important;padding-bottom:6mm!important;font-size:9.5px!important;line-height:1.15!important}.order-v2-print .invoice-header{margin:0 0 3px!important;padding:0 0 2px!important}.order-v2-print .invoice-company h2{margin:0!important;font-size:13px!important;line-height:1.05!important}.order-v2-print .invoice-company p{margin:0!important;font-size:9px!important;line-height:1.05!important}.order-v2-print .invoice-title{margin:3px 0!important}.order-v2-print .invoice-title h2{margin:0!important;font-size:14px!important;line-height:1.05!important}.order-v2-print .invoice-info{margin:0 0 2px!important;row-gap:0!important;column-gap:8px!important;line-height:1.1!important}.order-v2-print .invoice-info p{margin:0!important;padding:0!important;font-size:9.5px!important;line-height:1.1!important}.order-v2-print .invoice-table{margin-top:1px!important}.order-v2-print .invoice-table th,.order-v2-print .invoice-table td{padding:2px 4px!important;font-size:9.5px!important;line-height:1.12!important}.order-v2-print .invoice-product-usage{margin-top:1px!important;font-size:8px!important;line-height:1.08!important}.order-v2-print-total{margin-top:2px!important;font-size:10px!important;line-height:1.15!important}body.print-thermal-80 .order-v2-print,body.print-thermal-58 .order-v2-print{padding-top:3mm!important;padding-bottom:3mm!important;font-size:8.5px!important}body.print-thermal-80 .order-v2-print .invoice-table th,body.print-thermal-80 .order-v2-print .invoice-table td,body.print-thermal-58 .order-v2-print .invoice-table th,body.print-thermal-58 .order-v2-print .invoice-table td{font-size:8.5px!important}}
@media print{.order-v2-print{padding:4mm 12mm 5mm!important;font-size:10.5px!important;line-height:1.18!important}.order-v2-print .invoice-company h2{font-size:14.3px!important}.order-v2-print .invoice-company p{font-size:9.9px!important}.order-v2-print .invoice-title h2{font-size:15.4px!important}.order-v2-print .invoice-info p{font-size:10.5px!important;line-height:1.15!important!important}.order-v2-print .invoice-table th,.order-v2-print .invoice-table td{padding:2.5px 4px!important;font-size:10.5px!important;line-height:1.15!important}.order-v2-print .invoice-product-usage{font-size:8.8px!important;line-height:1.12!important}.order-v2-print-total{font-size:11px!important;margin-top:3px!important}body.print-thermal-80 .order-v2-print,body.print-thermal-58 .order-v2-print{padding:2mm 4mm 3mm!important;font-size:9.4px!important}body.print-thermal-80 .order-v2-print .invoice-info p,body.print-thermal-58 .order-v2-print .invoice-info p,body.print-thermal-80 .order-v2-print .invoice-table th,body.print-thermal-80 .order-v2-print .invoice-table td,body.print-thermal-58 .order-v2-print .invoice-table th,body.print-thermal-58 .order-v2-print .invoice-table td{font-size:9.4px!important}body.print-thermal-80 .order-v2-print .invoice-product-usage,body.print-thermal-58 .order-v2-print .invoice-product-usage{font-size:8px!important}}
@media print{body.print-a5 .order-v2-print,body.print-a4 .order-v2-print{padding-top:14mm!important}}

/* Order form polish: clear hierarchy, keyboard focus and compact mobile controls. */
.order-v2-search-box{position:relative;display:flex;align-items:center}
.order-v2-search-box>i{position:absolute;left:13px;color:var(--text-secondary);pointer-events:none}
.order-v2-search-box .form-control{padding-left:38px;padding-right:40px}
.order-v2-clear{position:absolute;right:8px;width:30px;height:30px;border:0;border-radius:7px;background:transparent;color:var(--text-secondary);cursor:pointer}
.order-v2-clear:hover,.order-v2-clear:focus-visible{background:var(--body-bg);color:var(--text);outline:0}
.order-v2-field-hint{display:block;margin:6px 2px 0;color:var(--text-secondary);font-size:.76rem}
.order-v2-results{top:calc(100% + 5px)}
.order-v2-result:last-child{border-bottom:0}
.order-v2-result:hover,.order-v2-result:focus-visible{background:var(--body-bg);outline:0}
.order-v2-result.is-out-of-stock small,.order-v2-stock-danger{color:var(--danger)}
.order-v2-empty p{margin:10px 0 4px;font-weight:650;color:var(--text)}
.order-v2-cart .qty-input:focus,.order-v2-cart .price-input:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(var(--primary-rgb,37,99,235),.12)}
.order-edit-title{display:flex;align-items:center;gap:10px;line-height:1.2}
.order-edit-title>i{color:var(--primary)}
.order-edit-title span{display:flex;flex-direction:column;gap:3px}
.order-edit-title small{font-size:.72rem;font-weight:500;color:var(--text-secondary)}
.order-v2-screen{padding:0 2px}
.order-v2-context,.order-edit-context{display:flex;align-items:center;gap:12px;margin:0 0 14px;padding:13px 15px;border:1px solid rgba(var(--primary-rgb,126,34,206),.2);border-radius:13px;background:linear-gradient(110deg,rgba(var(--primary-rgb,126,34,206),.1),rgba(255,255,255,.72));box-shadow:0 4px 14px rgba(15,23,42,.06)}
.order-v2-context-icon,.order-edit-context-icon{display:flex;align-items:center;justify-content:center;flex:0 0 38px;width:38px;height:38px;border-radius:11px;background:var(--primary);color:#fff;font-size:1rem}
.order-v2-context strong,.order-edit-context strong{display:block;font-size:.95rem;color:var(--text)}
.order-v2-context small,.order-edit-context small{display:block;margin-top:3px;color:var(--text-secondary);font-size:.76rem}
.order-v2-steps{display:flex;align-items:center;gap:8px;margin-left:auto;color:var(--text-secondary);font-size:.72rem;white-space:nowrap}
.order-v2-steps span{display:flex;align-items:center;gap:5px}.order-v2-steps b{display:flex;align-items:center;justify-content:center;width:21px;height:21px;border-radius:50%;background:var(--border);font-size:.7rem}.order-v2-steps .active{color:var(--primary);font-weight:700}.order-v2-steps .active b{background:var(--primary);color:#fff}.order-v2-steps i{font-size:.65rem;color:var(--border)}
.order-edit-context{margin:0 0 15px}.order-edit-status{margin-left:auto;padding:5px 10px;border-radius:999px;background:rgba(16,185,129,.12);color:#047857;font-size:.76rem;font-weight:700;white-space:nowrap}
@media(max-width:600px){
  .order-v2-context,.order-edit-context{align-items:flex-start;padding:11px;gap:9px}.order-v2-context-icon,.order-edit-context-icon{flex-basis:32px;width:32px;height:32px;border-radius:9px;font-size:.85rem}.order-v2-context small,.order-edit-context small{line-height:1.35}.order-v2-steps{display:none}.order-edit-status{font-size:.7rem;padding:4px 7px}
  .order-v2-mobile-modal .modal-header #modalTitle:has(.order-v2-title-tools){display:block}
  .order-v2-mobile-modal .order-v2-title-tools{display:block;margin-top:8px}
  .order-v2-mobile-modal .order-v2-title-tools .order-v2-paper{display:grid;grid-template-columns:auto minmax(0,1fr);gap:7px;margin-bottom:8px}
  .order-v2-mobile-modal .order-v2-title-tools .order-v2-paper label{font-size:.76rem}
  .order-v2-mobile-modal .order-v2-title-tools .order-v2-actions{position:fixed;left:0;right:0;bottom:0;z-index:2200;grid-template-columns:1fr 1fr;padding:8px max(10px,env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom));background:var(--card-bg);border-top:1px solid var(--border);box-shadow:0 -5px 16px rgba(0,0,0,.12)}
  .order-v2-mobile-modal .order-v2-title-tools .order-v2-actions .btn{min-height:44px;padding:8px 6px;white-space:normal}
  .order-v2-mobile-modal .modal-body{padding-bottom:156px!important}
  .order-v2-mobile-modal .order-v2-search-box .form-control{font-size:16px}
}

/* The compact modal keeps secondary context banners out of the workflow. */
.order-v2-mobile-modal .order-v2-context{display:none!important}
.order-v2-mobile-modal .order-v2-results:empty{display:none!important}

/* Shared create/edit order editor. The modal body is the only scrolling surface. */
.order-editor-modal{width:min(96vw,1280px)!important;max-width:1280px!important;max-height:94dvh!important;overflow:hidden!important}
.order-editor-modal .modal-body{box-sizing:border-box!important;width:100%!important;max-width:100%!important;overflow-x:hidden!important;overflow-y:auto!important;padding:16px!important}
.order-editor{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(330px,.85fr);gap:18px;width:100%;max-width:100%;min-width:0;box-sizing:border-box}
.order-editor-products,.order-editor-info{min-width:0;max-width:100%;box-sizing:border-box;background:var(--card-bg)}
.order-editor-info{border-left:1px solid var(--border);padding-left:18px}
.order-editor-section-title{display:flex;align-items:center;gap:8px;margin:0 0 12px;padding:0 0 10px;border-bottom:1px solid var(--border);font-size:1rem;font-weight:750}
.order-editor-section-title i{color:var(--primary)}
.order-editor-search{position:relative;width:100%;max-width:100%;min-width:0;margin-bottom:14px}
.order-editor-search>i{position:absolute;z-index:2;left:12px;top:50%;transform:translateY(-50%);color:var(--text-secondary);pointer-events:none}
.order-editor-search>.form-control{box-sizing:border-box;width:100%;max-width:100%;padding-left:37px;padding-right:40px;font-size:16px}
.order-editor-search>.order-v2-clear{top:50%;transform:translateY(-50%)}
.order-editor-results,.order-v2-customer-results{position:absolute;z-index:180;left:0;right:0;top:calc(100% + 4px);box-sizing:border-box;width:100%;max-width:100%;max-height:320px;overflow-x:hidden;overflow-y:auto;border:1px solid var(--border);border-radius:8px;background:var(--card-bg);box-shadow:0 12px 28px rgba(15,23,42,.16)}
.order-editor-results:empty,.order-v2-customer-results:empty{display:none}
.order-editor-result{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-width:0;padding:10px 12px;border:0;border-bottom:1px solid var(--border);background:transparent;color:var(--text);text-align:left;cursor:pointer}
.order-editor-result:last-child{border-bottom:0}.order-editor-result:hover,.order-editor-result:focus-visible{background:var(--body-bg);outline:0}
.order-editor-result>span{min-width:0}.order-editor-result strong,.order-editor-result small{display:block;overflow-wrap:anywhere}.order-editor-result small{margin-top:3px;color:var(--text-secondary);font-size:.76rem}.order-editor-result>b{flex:0 0 auto;color:var(--primary);white-space:nowrap}.order-editor-result.is-out-of-stock small{color:var(--danger)}
.order-editor-no-result{padding:18px;text-align:center;color:var(--text-secondary)}
.order-editor-cart{width:100%;max-width:100%;min-width:0;overflow:visible}
.order-editor-cart table{width:100%!important;max-width:100%!important;min-width:0!important;table-layout:fixed;border-collapse:collapse;margin:0}
.order-editor-cart th,.order-editor-cart td{box-sizing:border-box;min-width:0;padding:10px 7px;border:0;border-bottom:1px solid var(--border);vertical-align:middle;overflow-wrap:anywhere}
.order-editor-cart th{font-size:.78rem;color:var(--text-secondary);text-align:left;background:transparent}.order-editor-cart th:nth-child(1){width:7%}.order-editor-cart th:nth-child(2){width:38%}.order-editor-cart th:nth-child(3){width:13%}.order-editor-cart th:nth-child(4){width:17%}.order-editor-cart th:nth-child(5){width:18%;text-align:right}.order-editor-cart th:nth-child(6){width:7%}
.order-editor-cart td:nth-child(5){text-align:right}.order-editor-cart td:last-child{text-align:center}.order-editor-cart td small{display:block;margin-top:3px;color:var(--text-secondary);font-size:.74rem;line-height:1.35}.order-editor-cart .qty-input{width:64px;max-width:100%;min-height:38px;text-align:center;font-weight:700}.order-editor-cart .price-input{width:100%;min-width:0;min-height:38px;padding-left:5px;padding-right:5px;background:transparent}
.order-editor-empty{display:flex;flex-direction:column;align-items:center;gap:6px;padding:42px 12px;color:var(--text-secondary)}.order-editor-empty i{font-size:1.5rem}.order-editor-empty small{margin:0!important}
.order-editor-info-body{display:flex;flex-direction:column;gap:11px;min-width:0}.order-editor-info .form-group{min-width:0;margin:0}.order-editor-info label{display:block;margin-bottom:5px;font-size:.78rem;font-weight:650;color:var(--text-secondary)}
.order-editor-customer-date,.order-editor-adjustments{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,.78fr);gap:10px;align-items:start;min-width:0}
.order-editor-customer-readonly{display:flex;flex-direction:column;justify-content:center;min-height:42px;padding:0 0 7px;border-bottom:1px solid var(--border)}.order-editor-customer-readonly span{font-size:.74rem;color:var(--text-secondary)}.order-editor-customer-readonly strong{margin-top:3px}.order-editor-customer-readonly small{margin-top:2px;color:var(--text-secondary)}
.order-v2-new-customer[hidden],.order-editor-payment[hidden]{display:none!important}.order-v2-new-customer{padding:0;border:0;background:transparent}
.order-editor-discount{display:grid;grid-template-columns:minmax(0,1fr) 64px;gap:6px}.order-editor-discount select{min-width:0;padding-left:8px;padding-right:22px}
.order-editor-summary{display:flex;flex-direction:column;gap:7px;margin-top:2px;padding:11px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}.order-editor-summary>div{display:flex;justify-content:space-between;gap:12px}.order-editor-total{padding-top:8px;border-top:1px solid var(--border);font-size:1.08rem;color:var(--primary)}
.order-editor-payment{display:flex;flex-direction:column;gap:9px}.order-v2-payment-method{padding:8px 0;border:0;border-radius:0;background:transparent}.order-v2-cash{gap:8px}.order-v2-change-value{justify-content:flex-end}
.order-editor-paper{display:flex;align-items:center;gap:8px;padding-top:9px;border-top:1px solid var(--border)}.order-editor-paper label{margin:0;white-space:nowrap}.order-editor-paper select{min-width:0}
.order-editor-modal .order-editor-actions{display:flex!important;flex-wrap:wrap;justify-content:flex-end;gap:7px;padding:10px 16px}.order-editor-modal .order-editor-actions .btn{min-height:40px;justify-content:center;white-space:normal}
@media(max-width:900px){.order-editor{grid-template-columns:1fr}.order-editor-info{border-left:0;border-top:1px solid var(--border);padding:16px 0 0}}
@media(max-width:600px){.modal-overlay:has(.order-editor-modal){padding:0!important}.order-editor-modal{width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important}.order-editor-modal .modal-header{padding:10px 12px!important}.order-editor-modal .modal-body{padding:10px!important}.order-editor{gap:14px}.order-editor-section-title{font-size:.94rem}.order-editor-customer-date,.order-editor-adjustments{grid-template-columns:1fr}.order-editor-cart thead{display:none}.order-editor-cart tbody,.order-editor-cart tr{display:block;width:100%}.order-editor-cart tr:not(.order-editor-empty-row){display:grid;grid-template-columns:minmax(0,1fr) 64px 82px 36px;grid-template-areas:"product qty total remove" "price price total remove";gap:3px 6px;padding:10px 0;border-bottom:1px solid var(--border)}.order-editor-cart tr:not(.order-editor-empty-row) td{display:block;width:auto!important;padding:1px 0;border:0;min-width:0}.order-editor-cart tr:not(.order-editor-empty-row) td:nth-child(1){display:none}.order-editor-cart tr:not(.order-editor-empty-row) td:nth-child(2){grid-area:product}.order-editor-cart tr:not(.order-editor-empty-row) td:nth-child(3){grid-area:qty}.order-editor-cart tr:not(.order-editor-empty-row) td:nth-child(4){grid-area:price;max-width:150px}.order-editor-cart tr:not(.order-editor-empty-row) td:nth-child(5){grid-area:total;align-self:center}.order-editor-cart tr:not(.order-editor-empty-row) td:nth-child(6){grid-area:remove;align-self:center}.order-editor-cart td:nth-child(3)::before,.order-editor-cart td:nth-child(4)::before,.order-editor-cart td:nth-child(5)::before{display:block;margin-bottom:2px;font-size:.68rem;color:var(--text-secondary)}.order-editor-cart td:nth-child(3)::before{content:"SL"}.order-editor-cart td:nth-child(4)::before{content:"Đơn giá"}.order-editor-cart td:nth-child(5)::before{content:"Thành tiền"}.order-editor-cart .qty-input{width:60px}.order-editor-modal .order-editor-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));padding:8px 10px calc(8px + env(safe-area-inset-bottom))}.order-editor-modal .order-editor-actions .btn{min-width:0;padding:8px 6px}.order-editor-results{max-height:45dvh}}
