[hidden] { display: none !important; }
button, h1, h2, h3, td, th, .brand span, .quote-card { overflow-wrap: anywhere; }
button:disabled { opacity: .55; cursor: default; }
.locale-control { display: grid; gap: 4px; font-size: 12px; min-width: 130px; }
.locale-control select, .language-toolbar input, .language-toolbar select {
 padding: 8px; border: 1px solid var(--line); border-radius: 4px; background: white; color: var(--ink); min-width: 0;
}
.language-toolbar { display: grid; grid-template-columns: minmax(160px,2fr) minmax(140px,1fr) minmax(140px,1fr) auto auto; gap: 12px; align-items: end; }
.language-toolbar label { display: grid; gap: 6px; font-size: 13px; }
.language-summary, .language-pagination { display:flex; gap:16px; flex-wrap:wrap; align-items:center; }
.language-summary p { margin: 0; }
.language-table { table-layout: fixed; min-width: 760px; }
.language-table th:nth-child(1) { width: 22%; }
.language-table th:nth-child(2), .language-table th:nth-child(3) { width: 31%; }
.language-table th:nth-child(4) { width: 16%; }
.language-table textarea { width:100%; min-height:80px; padding:8px; border:1px solid var(--line); border-radius:4px; resize:vertical; }
.language-table code { font-size:12px; overflow-wrap:anywhere; }
#document-dialog { width: min(1100px, calc(100vw - 24px)); }
#document-dialog .dialog-card.wide { width:100%; }
#app-error:empty { display:none; }
@media(max-width:1150px) { .language-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); } .topbar { flex-wrap:wrap; } }
@media(max-width:620px) { .language-toolbar { grid-template-columns:1fr; } .dialog-card footer { flex-wrap:wrap; } .topbar-actions { width:100%; } }
.operation-dialog { width: min(1200px, calc(100vw - 24px)); max-height: 94vh; }
.operation-dialog .dialog-card { width: 100%; max-width: none; box-sizing: border-box; }
.operation-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.operation-grid label { min-width: 0; }
.operation-dialog input,.operation-dialog select,.operation-dialog textarea { max-width:100%; box-sizing:border-box; }
.operation-dialog .item-editor { min-width: 940px; table-layout: fixed; }
.item-editor th:nth-child(1),.item-editor th:nth-child(2) { width: 22%; }
.item-editor th:nth-child(7) { width: 52px; }
.item-editor input,.item-editor select { width: 100%; min-width: 0; }
.check-field { display:flex; align-items:center; gap:8px; }
.check-field input { width:auto; }
#forms .button-row { flex-wrap:wrap; }
#users,#inventory,#receivables,#prices { min-width:0; }
#inventory > button,#receivables > button,#prices > button { justify-self:start; width:auto; margin-right:8px; }
:is(#users,#inventory,#receivables,#prices,#forms,.operation-dialog) button:not(.primary-action) { border:1px solid var(--line); border-radius:4px; padding:8px 12px; background:#fff; color:#126b6f; font:inherit; font-size:13px; cursor:pointer; }
:is(#users,#inventory,#receivables,#prices,#forms,.operation-dialog) button:hover { border-color:#126b6f; background:#eef7f5; }
.operation-dialog button[data-close],.operation-dialog button[data-remove-line] { width:36px; height:36px; padding:0; flex-shrink:0; }
.operation-dialog footer button[data-close] { width:auto; padding:8px 12px; }
#inventory td,#receivables td,#prices td,#users td { min-width:90px; }
@media(max-width:700px) { .operation-grid { grid-template-columns:1fr; } .operation-dialog .dialog-card {padding:12px;} }
.tax-toolbar { display:flex; flex-wrap:wrap; gap:12px; align-items:end; }
.tax-toolbar label { display:grid; gap:6px; }
#taxes,#warehouses {min-width:0;}
#taxes button,#warehouses button {border:1px solid var(--line);border-radius:4px;padding:8px 12px;background:#fff;color:#126b6f;cursor:pointer;}
.item-editor th:nth-child(7) {width:auto;}
.item-editor th:nth-child(8) {width:52px;}
.operation-dialog .item-editor {min-width:1100px;}
.invoice-dialog .table-wrap{max-height:50vh;overflow:auto;margin:16px 0}
.invoice-dialog td{min-width:110px;vertical-align:top}
.invoice-dialog td select{min-width:220px;max-width:300px}
.invoice-dialog td input{width:120px}
.invoice-dialog .invoice-hash{overflow-wrap:anywhere;font-size:12px}
.invoice-dialog [data-upload]{border-bottom:1px solid #d7dce0;padding-bottom:16px;margin-bottom:16px}
.invoice-dialog input[type=file]{max-width:100%;min-width:0}
.invoice-dialog [data-split-line]{min-width:0;max-width:100%}
.invoice-drop{display:grid;gap:12px;border:1px dashed #7a858c;padding:16px;background:#f6f8fa}
.invoice-drop.dragging{border-color:#177454;background:#e8f6ef}
.invoice-dialog [data-selected-files]{list-style:none;padding:0;max-height:180px;overflow:auto}
.invoice-dialog [data-selected-files] li{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:8px 0}
.invoice-dialog [data-selected-files] span{overflow-wrap:anywhere;min-width:0}
.invoice-dialog [data-download]{max-width:260px;white-space:normal;overflow-wrap:anywhere;text-align:left}
.invoice-dialog {overflow-x:hidden;}
.invoice-dialog header {display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.invoice-dialog header h2 {min-width:0;font-size:20px;line-height:1.35;margin:0;}
.invoice-dialog [data-body],.invoice-dialog form {min-width:0;}
.invoice-dialog .button-row {display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px;}
.invoice-dialog [data-selected-files] button {flex:0 0 36px;width:36px;height:36px;padding:0;}
.invoice-dialog [data-selected-files]:empty,.invoice-dialog [data-file-summary]:empty,.invoice-dialog [data-upload-result]:empty {display:none;}
.invoice-dialog [data-file-summary],.invoice-dialog [data-upload-result] {font-size:13px;}
.invoice-dialog [data-search-status] {min-height:18px;font-size:13px;margin:6px 0;}
.invoice-dialog [data-upload-result] {color:#176443;}
.invoice-dialog .invoice-empty {text-align:center;padding:24px;color:#58646b;}
.invoice-dialog [data-search] {width:100%;min-width:0;}
.invoice-dialog input[type=file] {width:100%;font-size:13px;}
.invoice-dialog .check-field {align-items:flex-start;line-height:1.5;margin:16px 0;}
.invoice-dialog .check-field input {flex-shrink:0;margin-top:4px;}
.invoice-dialog .invoice-drop:focus-within {outline:2px solid #177454;outline-offset:2px;}
.invoice-dialog [data-pick-files] {justify-self:start;min-width:110px;}
@media(max-width:620px) {
 .invoice-dialog {max-height:calc(100dvh - 16px);width:calc(100vw - 16px);}
 .invoice-dialog header h2 {font-size:18px;}
 .invoice-dialog .invoice-drop {padding:12px;}
 .invoice-dialog button,.invoice-dialog input,.invoice-dialog select {min-height:44px;}
 .invoice-dialog .table-wrap {max-width:100%;}
 .invoice-dialog [data-split-line] {width:100%;}
 .invoice-dialog [data-selected-files] button {flex-basis:44px;width:44px;height:44px;}
}
#forms > .panel{min-width:0;max-width:100%;}
.invoice-dialog .check-field{display:flex;}
.invoice-dialog .check-field input[type=checkbox]{flex:0 0 18px;width:18px;height:18px;min-height:18px;min-width:18px;padding:0;}
.boq-dialog{width:min(1450px,calc(100vw - 20px));}
.boq-dialog .dialog-card{min-width:0;grid-template-columns:minmax(0,1fr);}
.boq-dialog [data-intake],.boq-dialog form{min-width:0;}
.boq-dialog header{align-items:flex-start;}
.boq-dialog header h2{min-width:0;overflow-wrap:anywhere;}
.boq-controls select{width:100%;}
.boq-review abbr{cursor:help;white-space:nowrap;}
.boq-controls{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin-bottom:12px;}
.boq-controls label{min-width:0;max-width:100%;}
.boq-controls input[type=number]{width:95px;}
.boq-filter{flex:1;min-width:190px!important;}
.boq-dialog .table-wrap{max-width:100%;max-height:52vh;overflow:auto;margin:14px 0;}
.boq-raw th{position:sticky;top:0;z-index:1;background:#eef3f7;vertical-align:top;min-width:180px;}
.boq-raw th:first-child,.boq-raw td:first-child{position:sticky;left:0;min-width:75px;background:#eef3f7;z-index:2;}
.boq-raw th:first-child{z-index:3;}
.boq-raw .boq-heading{max-height:48px;overflow:auto;margin:6px 0;font-size:12px;}
.boq-raw select{width:175px;}
.boq-cell{width:190px;max-height:84px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;}
.boq-ignored{color:#69747c;background:#f7f8fa;}
.boq-raw tr.selected td{background:#e9f5ef;}
.boq-dialog .boq-row-select,.boq-dialog .boq-confirm{display:flex;align-items:start;gap:10px;}
.boq-dialog input[type=checkbox]{width:18px;height:18px;min-width:18px;flex:0 0 18px;margin:3px 0;padding:0;}
.boq-dialog .boq-confirm{margin:18px 0;}
.boq-review td{min-width:130px;vertical-align:top;}
.boq-review td:first-child,.boq-review td:last-child{min-width:65px;}
.boq-review td:nth-child(2),.boq-review td:nth-child(3),.boq-review td:nth-child(5){min-width:235px;}
.boq-review textarea{resize:vertical;}
.boq-dialog footer,.boq-dialog .button-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;}
#forms .section-heading{flex-wrap:wrap;gap:12px;}
@media(max-width:620px){.boq-dialog header h2{font-size:19px;min-width:0;}.boq-controls label{flex:1 1 140px;}.boq-dialog{max-height:96dvh;}.boq-dialog .table-wrap{max-height:48vh;}}
