/* UI audit A04–A17. Presentation only; same forms, columns and actions. */
:root{--control-height:2.25rem;--radius-control:.375rem}
body,body:has(.order-head){--text:#18232e;--secondary:#5f6d7b;--divider:#dfe5ea;--radius-panel:.625rem;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:.875rem;line-height:1.45}
body :is(button,.button){min-height:36px;height:auto;padding:7px 12px;border-radius:var(--radius-control);line-height:20px;white-space:normal;box-shadow:none}
body :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select){height:36px;min-height:36px;max-width:100%;padding:6px 10px;line-height:22px;border:1px solid var(--control-border);border-radius:var(--radius-control);font-size:14px;box-sizing:border-box}
body select{-webkit-appearance:none;appearance:none;background-image:url('/static/retail-select-caret.svg');background-repeat:no-repeat;background-position:right 10px center;background-size:12px;padding-right:30px!important}
body textarea{max-width:100%;min-height:72px;border-radius:var(--radius-control);font:inherit}
body :is(button,.button,input,select,textarea,a):focus-visible{outline:2px solid var(--focus);outline-offset:2px}
body .filters{align-items:end;gap:8px;padding:0;margin-bottom:12px}
body .filters>:is(button,.button){flex:0 0 auto;width:auto;min-width:0;min-height:36px;align-self:end}
body .filters input{min-width:0;flex:1}
body .filters label{min-width:0}
body .page-header{margin-bottom:16px;gap:12px}
body .card{padding:16px}
body .topbar{min-height:40px;padding:8px 24px;margin-bottom:16px}
body .order-filters{padding:12px 16px;margin-bottom:12px}
body .order-filters .filter-main{grid-template-columns:minmax(200px,2fr) minmax(130px,1fr) minmax(130px,1fr) auto auto;gap:8px;align-items:end}
body .order-filters .filter-secondary{gap:8px;margin-top:8px;align-items:end}
body .filter-secondary label{flex:1;min-width:110px;width:auto}
body .orders-table{min-width:880px;table-layout:auto}
body .orders-table :is(th,td){padding:8px;vertical-align:top}
body .orders-table .order-composition{max-width:220px}
body .orders-table .num{white-space:nowrap}
body .table-wrap{max-width:100%;overflow-x:auto}
.stock-units-table{table-layout:fixed;min-width:940px;width:100%}
.stock-units-table :is(th,td){padding:8px!important;vertical-align:top;overflow-wrap:break-word;word-break:normal}
.stock-units-table th:nth-child(1){width:22%}.stock-units-table th:nth-child(2){width:18%}.stock-units-table th:nth-child(3){width:11%}.stock-units-table th:nth-child(4){width:12%}.stock-units-table th:nth-child(5){width:10%}.stock-units-table th:nth-child(6){width:12%}.stock-units-table th:nth-child(7){width:15%}
.stock-units-table .mono{white-space:normal;font-size:12px}.stock-units-table .mono>div{white-space:nowrap}
.stock-units-table .num{white-space:nowrap;font-size:13px}.stock-units-table .button{display:flex;white-space:normal;text-align:left;font-size:12px;line-height:18px;padding:6px 8px;min-width:0}
body .catalog-results{gap:4px;margin:6px 0;max-height:55vh}
body [data-catalog-search] .catalog-results{max-height:none}
body .catalog-results .catalog-result{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 12px;padding:8px 10px;min-height:56px;line-height:20px;border-radius:6px}
.catalog-results .catalog-result strong{grid-column:1;font-size:14px;line-height:20px}
.catalog-result-code,.catalog-result-variant{grid-column:1;font-size:12px;line-height:18px}
.catalog-results .catalog-result-price{grid-column:2;grid-row:1/4;align-self:center;text-align:right;font-size:13px;max-width:180px}
body #stock-options button{display:block;text-align:left;white-space:normal;overflow-wrap:anywhere;width:100%;height:auto;min-height:36px;padding:8px 10px;line-height:22px}
body #device-dialog{max-width:calc(100vw - 24px)}
body #device-list{min-width:0}.device-card{min-width:0}.device-card .mono{overflow-wrap:anywhere}
body:has(.order-head) .menu{width:var(--nav-width);padding:24px 16px;background:var(--surface);border-right:1px solid var(--divider);color:var(--text)}
body:has(.order-head) .menu .brand{margin-bottom:30px;color:var(--text)}
body:has(.order-head) .menu .brand img{position:static;width:38px;height:38px}
body:has(.order-head) .menu .nav-label{display:block}
body:has(.order-head) .menu nav{gap:4px}
body:has(.order-head) .menu-link{font-size:14px;min-height:40px;padding:10px 12px;border-radius:6px;font-weight:600!important;color:var(--secondary)}
body:has(.order-head) .menu-link.active{background:var(--brand-subtle);color:var(--brand);box-shadow:none}
body:has(.order-head) main{margin-left:var(--nav-width);padding:20px 24px 100px}
body:has(.order-head) .topbar{padding:8px 0;margin:0 0 12px;min-height:36px}
body:has(.order-head) .order-head{margin:12px 0 16px;box-shadow:none;border-radius:6px}
body:has(.order-head) .panel{margin-bottom:16px;border-radius:6px}
body:has(.order-head) .panel-head,#composition .panel-head{padding:8px 16px!important;min-height:48px}
body:has(.order-head) :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select),body:has(.order-head) .contact-field input,body:has(.order-head) .contact-field select{height:36px!important;min-height:36px!important;padding:6px 10px!important;border-color:var(--control-border);box-shadow:none}
body:has(.order-head) select{padding-right:30px!important}
body:has(.order-head) :is(button,.button){border-radius:6px;min-height:36px;font-size:14px;padding:7px 12px}
body:has(.order-head) button:not(.primary):not(.link):not(.section-fold):not(.choose-model):not(.show-devices):not(.remove-line){background:var(--surface);border-color:var(--control-border);color:var(--text);box-shadow:none}
body:has(.order-head) .primary{background:var(--brand);border-color:var(--brand)}
body:has(.order-head) .contact-fields-grid,body:has(.order-head) .contact-main-grid{padding:16px;gap:12px 24px}
body:has(.order-head) .contact-column{gap:12px}
body:has(.order-head) .contact-top{padding:12px 16px 0;gap:12px}
body:has(.order-head) .contact-tools{padding:0 16px 12px!important}
body:has(.order-head) .contact-scope-note{padding:0 16px 12px!important}
body:has(.order-head) .contact-field{grid-template-columns:95px minmax(0,1fr)}
#composition .line-table{min-width:790px!important;table-layout:fixed}
#composition .line-table :is(th,td){padding:8px 6px!important}
#composition .line-table th:nth-child(1){width:24px!important}
#composition .line-table th:nth-child(2){width:auto!important}
#composition .line-table th:nth-child(3){width:45px!important}
#composition .line-table th:nth-child(4){width:76px!important}
#composition .line-table th:nth-child(5){width:108px!important}
#composition .line-table th:nth-child(6){width:112px!important}
#composition .line-table th:nth-child(7){width:110px!important}
#composition .line-table th:nth-child(8){width:110px!important}
#composition .line-table td:first-child{min-width:0}
#composition .line-table td:nth-child(4){white-space:normal;word-break:normal;overflow-wrap:normal}
#composition .line-table .choose-model{max-width:none;line-height:20px;font-size:14px}
#composition .quantity-control{max-width:100%!important;width:100%!important}
#composition .line-table .show-devices{min-height:32px!important;font-size:12px}
#composition .totals{padding:12px 16px!important;gap:8px}
#delivery .fields{padding:0 16px 16px;gap:12px}
#delivery .comments{padding:16px}
body:has(.order-head) .save-bar{left:var(--nav-width);padding:8px 16px!important}
body .notice-error,body .form-error{grid-column:1/-1;min-width:0}
body .field-error{font-size:13px;line-height:20px}
body .document-summary:empty{display:none}
@media(max-width:900px){
 body main,body:has(.order-head) main{margin-left:0;padding:12px 16px 80px}
 body .mobile-nav{position:sticky;top:0;min-height:44px;height:auto;padding:4px 12px;gap:12px}
 body .mobile-nav button{min-height:36px;padding:4px 10px}
 body .topbar,body:has(.order-head) .topbar{display:none}
 body .page-header{margin:12px 0}
 body .order-filters .filter-main{grid-template-columns:repeat(2,minmax(0,1fr))}
 body .order-filters .search-label{grid-column:1/-1}
 body .order-filters .filter-submit{width:auto;justify-self:start}
 body:has(.order-head) .save-bar{left:0}
 body:has(.order-head) .contact-field{grid-template-columns:1fr;gap:4px}
 body:has(.order-head) .contact-fields-grid,body:has(.order-head) .contact-main-grid{column-gap:16px}
 body dialog{max-height:calc(100dvh - 24px);max-width:calc(100vw - 24px);padding:16px}
}
@media(max-width:767.98px){
 body :is(button,.button){min-height:44px}
 body :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select){min-height:44px;height:44px}
 body:has(.order-head) :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select),body:has(.order-head) .contact-field input{height:44px!important;min-height:44px!important}
 #composition .line-table,#composition .line-table tbody{min-width:0!important}
 #composition .line-table :is(th,td){padding:0!important}
 body:has(.order-head) .contact-field{grid-template-columns:100px minmax(0,1fr)}
 body:has(.order-head) .save-bar{position:static!important}
 body .catalog-results .catalog-result{gap:4px 8px;min-height:64px}
}
@media(max-width:480px){
 body .catalog-results .catalog-result{grid-template-columns:minmax(0,1fr)}
 .catalog-results .catalog-result-price{grid-column:1;grid-row:auto;text-align:left;max-width:none}
 body:has(.order-head) .contact-field{grid-template-columns:minmax(0,1fr)}
}
body .orders-table{table-layout:fixed;width:100%;min-width:920px}
body .orders-table th:nth-child(1){width:12%}body .orders-table th:nth-child(2){width:16%}body .orders-table th:nth-child(3){width:16%}body .orders-table th:nth-child(4){width:20%}body .orders-table th:nth-child(5){width:11%}body .orders-table th:nth-child(6){width:10%}body .orders-table th:nth-child(7){width:10%}body .orders-table th:nth-child(8){width:5%}
body .orders-table td{overflow-wrap:anywhere;font-size:13px}
body .orders-table .order-composition-cell{min-width:0;width:auto}
body .orders-table .order-composition{max-width:none;gap:6px}
body .orders-table .order-composition-name{display:block;max-height:none;overflow:visible;-webkit-line-clamp:unset;line-clamp:unset}
body .order-filters .filter-secondary label:has(select[name=sort]){flex:1.25}
body .orders-table th{font-size:12px;white-space:normal;overflow-wrap:normal}
body .orders-table th:nth-child(1){width:12%}body .orders-table th:nth-child(2){width:15%}body .orders-table th:nth-child(3){width:15%}body .orders-table th:nth-child(4){width:18%}body .orders-table th:nth-child(5){width:11%}body .orders-table th:nth-child(6){width:11%}body .orders-table th:nth-child(7){width:11%}body .orders-table th:nth-child(8){width:7%}
#composition .line-table{min-width:850px!important}
#composition .line-table th:nth-child(3){width:70px!important}
#composition .line-table th:nth-child(4){width:90px!important}
#composition .line-table th{overflow-wrap:normal;white-space:normal}
body .filters>:is(button,.button){justify-self:start;flex:0 0 auto!important;width:max-content!important;max-width:100%;min-width:0!important}
@media(max-width:900px){body .mobile-nav{flex-wrap:wrap;justify-content:flex-start}body .mobile-nav>span{display:none}body .mobile-nav>.notification-center{margin-left:auto}body .mobile-nav>.mobile-logout{display:block;margin:0}body .topbar:has(.notification-center){display:none!important}body .topbar:not(:has(.notification-center)){display:none!important}}
body form.stock-filters,body form.customer-filters{display:flex!important;flex-wrap:wrap;align-items:end;gap:8px}
body form.stock-filters>label,body form.customer-filters>input{flex:1 1 260px!important;width:auto;min-width:0!important}
body .list-card{padding:0}
#composition .line-table th:nth-child(5){width:124px!important}
#composition .line-table input[type=number]{appearance:textfield;-moz-appearance:textfield;font-size:13px!important}
#composition .line-table input[type=number]::-webkit-inner-spin-button,#composition .line-table input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
#composition .money-field input{padding:6px 22px 6px 6px!important}
body [data-barcode-scan]{align-items:end}
body [data-barcode-scan]>label{margin-bottom:0!important}
body [data-barcode-scan]>button{margin-bottom:0!important;align-self:end}
.stock-units-table th{white-space:normal!important;line-height:18px;font-size:12px}
/* A validation summary must not displace composition behind a fixed grid row. */
body:has(.order-head) #order-form>.order-comments{grid-row:auto!important}
