
/* V370 — Báo giá theo phong cách Đơn đặt hàng */
.v370-quote-page{max-width:1500px;margin:0 auto}
.v370-quote-shell{margin-top:16px;border:1px solid var(--border);border-radius:12px;background:var(--card);box-shadow:0 5px 18px rgba(15,23,42,.045);overflow:hidden}
.v370-quote-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--border);background:var(--muted)}
.v370-quote-toolbar span{font-size:8.8px;font-weight:900;letter-spacing:.12em;color:var(--brand-green)}.v370-quote-toolbar h2{margin-top:3px;font-size:17px;font-weight:900}
.v370-quote-toolbar>div:last-child{display:flex;gap:7px}.v370-quote-toolbar button{height:36px;border-radius:7px;padding:0 12px;font-size:10.5px;font-weight:800}
.v370-quote-toolbar button.ghost{border:1px solid var(--border);background:var(--background)}.v370-quote-toolbar button.primary{border:1px solid var(--brand-green);background:var(--brand-green);color:#fff}
.v370-quote-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:12px}
.v370-order-panel{border:1px solid var(--border);border-radius:10px;background:var(--card);padding:14px}
.v370-lines-panel{margin:0 12px 12px}
.v370-panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;padding-bottom:9px;border-bottom:1px solid var(--border)}
.v370-panel-head h3{font-size:13px;font-weight:900}.v370-panel-head span{font-size:8.5px;font-weight:850;letter-spacing:.08em;color:var(--muted-foreground)}
.v370-mode-switch{display:flex;gap:6px;margin-bottom:10px}.v370-mode-switch button{height:34px;border:1px solid var(--border);border-radius:7px;background:var(--background);padding:0 10px;font-size:10px;font-weight:800}.v370-mode-switch button.active{border-color:var(--brand-green);background:#edf8f4;color:#08705c}
.v370-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.v370-form-grid label{display:grid;gap:5px}.v370-form-grid label.full{grid-column:1/-1}.v370-form-grid span{font-size:9.5px;font-weight:800;color:var(--muted-foreground)}
.v370-form-grid input,.v370-product-search,.v370-temp-product input,.v370-lines-table input,.v370-quote-footer textarea{box-sizing:border-box;border:1px solid var(--border);border-radius:7px;background:var(--background);color:var(--foreground);font-size:11px;outline:none}
.v370-form-grid input,.v370-product-search{height:39px;padding:0 10px}.v370-product-search{width:100%}
.v370-form-grid input:focus,.v370-product-search:focus,.v370-temp-product input:focus,.v370-lines-table input:focus,.v370-quote-footer textarea:focus{border-color:var(--brand-green);box-shadow:0 0 0 3px rgba(16,128,103,.08)}
.v370-search-results{display:grid;gap:5px;margin-top:7px;max-height:220px;overflow:auto}.v370-search-results button{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 9px;border:1px solid var(--border);border-radius:7px;background:var(--background);text-align:left}.v370-search-results strong,.v370-search-results small{display:block}.v370-search-results strong{font-size:10.8px}.v370-search-results small{margin-top:2px;font-size:8.8px;color:var(--muted-foreground)}.v370-search-results b{font-size:10.5px;white-space:nowrap;color:var(--brand-green)}
.v370-temp-product{display:grid;grid-template-columns:1fr 80px 120px auto;gap:7px;margin-top:10px;padding-top:10px;border-top:1px dashed var(--border)}.v370-temp-product input{height:36px;padding:0 8px}.v370-temp-product button{border:1px solid var(--brand-green);border-radius:7px;background:#edf8f4;color:#08705c;padding:0 10px;font-size:9.8px;font-weight:800}
.v370-lines-wrap{overflow:auto}.v370-lines-table{width:100%;min-width:900px;border-collapse:collapse;font-size:10.5px}.v370-lines-table th{padding:8px;background:var(--muted);text-align:left;font-size:8.8px;text-transform:uppercase;color:var(--muted-foreground)}.v370-lines-table td{padding:8px;border-top:1px solid var(--border)}.v370-lines-table th:nth-child(n+3),.v370-lines-table td:nth-child(n+3){text-align:right}.v370-lines-table input{width:100%;min-width:70px;height:32px;padding:0 7px}.v370-line-name strong,.v370-line-name small{display:block}.v370-line-name small{margin-top:2px;font-size:8.5px;color:var(--muted-foreground)}.v370-lines-table td.money{font-weight:900;color:var(--brand-green);white-space:nowrap}.delete-line{width:28px;height:28px;border:1px solid #e5bbb6;border-radius:6px;background:#fff3f1;color:#a53f36;font-weight:900}
.v370-quote-footer{display:grid;grid-template-columns:1fr 300px;gap:12px;margin-top:12px}.v370-quote-footer label{display:grid;gap:5px}.v370-quote-footer label span{font-size:9.5px;font-weight:800;color:var(--muted-foreground)}.v370-quote-footer textarea{min-height:84px;padding:9px;resize:vertical}
.v370-total-box{display:grid;align-content:start;justify-items:end;gap:6px;padding:12px;border:1px solid var(--border);border-radius:9px;background:var(--muted)}.v370-total-box span{font-size:8.8px;font-weight:850;letter-spacing:.06em;color:var(--muted-foreground)}.v370-total-box strong{font-size:23px;font-weight:900;color:var(--brand-green)}.v370-total-box button{min-height:36px;border:1px solid var(--brand-green);border-radius:7px;background:var(--brand-green);color:#fff;padding:0 12px;font-size:10px;font-weight:800}
.v370-empty{padding:24px;text-align:center;color:var(--muted-foreground);font-size:10.5px}

.v370-created-quote{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;padding:13px 15px;border:1px solid #b8ddcf;border-radius:10px;background:#f1faf6}.v370-created-quote span,.v370-created-quote h3,.v370-created-quote p{display:block}.v370-created-quote span{font-size:8.5px;font-weight:850;color:#08705c}.v370-created-quote h3{margin-top:3px;font-size:17px;font-weight:900}.v370-created-quote p{margin-top:2px;font-size:9.5px;color:var(--muted-foreground)}.v370-created-quote>div:last-child{display:flex;gap:6px;flex-wrap:wrap}.v370-created-quote button,.v370-created-quote a{display:inline-flex;align-items:center;justify-content:center;min-height:34px;border:1px solid var(--border);border-radius:7px;background:var(--background);padding:0 10px;font-size:9.8px;font-weight:800;text-decoration:none;color:var(--foreground)}.v370-created-quote .order{border-color:var(--brand-green);background:var(--brand-green);color:#fff}.v370-created-quote .danger{border-color:#d49b95;background:#fff3f1;color:#a13e35}

.v370-history-panel{margin-top:14px;border:1px solid var(--border);border-radius:10px;background:var(--card);overflow:hidden}.v370-history-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--border);background:var(--muted)}.v370-history-head h3{font-size:13px;font-weight:900}.v370-history-head span{font-size:9px;color:var(--muted-foreground)}
.v370-history-list{display:grid}.v370-history-list article{display:grid;grid-template-columns:minmax(0,1fr) 190px auto;gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid var(--border)}.v370-history-list article:last-child{border-bottom:0}.v370-history-list .main strong,.v370-history-list .main span,.v370-history-list .main small,.v370-history-list .value strong,.v370-history-list .value small{display:block}.v370-history-list .main strong{font-size:11px}.v370-history-list .main span{margin-top:2px;font-size:10px}.v370-history-list .main small,.v370-history-list .value small{margin-top:2px;font-size:8.8px;color:var(--muted-foreground)}.v370-history-list .value{text-align:right}.v370-history-list .value strong{font-size:10.8px;color:var(--brand-green)}.v370-history-list .actions{display:flex;gap:5px}.v370-history-list .actions button,.v370-history-list .actions a{display:inline-flex;align-items:center;justify-content:center;min-height:30px;border:1px solid var(--border);border-radius:6px;background:var(--background);padding:0 8px;font-size:9px;font-weight:800;text-decoration:none;color:var(--foreground)}.v370-history-list .actions .danger{border-color:#d8aaa5;background:#fff4f2;color:#a3433a}

.v370-delete-overlay{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;background:rgba(15,23,42,.42);padding:16px}.v370-delete-dialog{width:min(420px,100%);border:1px solid var(--border);border-radius:12px;background:var(--card);padding:18px;box-shadow:0 16px 45px rgba(15,23,42,.18)}.v370-delete-dialog h3{font-size:16px;font-weight:900}.v370-delete-dialog p{margin-top:8px;font-size:11px;line-height:1.5;color:var(--muted-foreground)}.v370-delete-dialog>div{display:flex;justify-content:flex-end;gap:7px;margin-top:16px}.v370-delete-dialog button{min-height:36px;border-radius:7px;padding:0 12px;font-size:10px;font-weight:800}.v370-delete-dialog .cancel{border:1px solid var(--border);background:var(--background)}.v370-delete-dialog .danger{border:1px solid #b24a41;background:#b24a41;color:#fff}

@media(max-width:900px){.v370-quote-grid{grid-template-columns:1fr}.v370-quote-footer{grid-template-columns:1fr}.v370-total-box{justify-items:stretch}.v370-created-quote{display:grid}.v370-history-list article{grid-template-columns:1fr}.v370-history-list .value{text-align:left}.v370-history-list .actions{flex-wrap:wrap}.v370-temp-product{grid-template-columns:1fr 80px 110px}.v370-temp-product button{grid-column:1/-1;min-height:36px}}
@media(max-width:560px){.v370-quote-toolbar{display:grid}.v370-quote-toolbar>div:last-child{width:100%}.v370-quote-toolbar button{flex:1}.v370-form-grid{grid-template-columns:1fr}.v370-form-grid label.full{grid-column:auto}.v370-order-panel{padding:11px}.v370-lines-panel{margin:0 8px 8px}.v370-temp-product{grid-template-columns:1fr 1fr}.v370-temp-product input:first-child{grid-column:1/-1}}
