/* Shared working UI. Calculation and stored appearance settings stay in engine/app. */
@media screen {
  :root {
    --ink: #1d3028;
    --muted: #58685f;
    --paper: #f2f5f3;
    --line: #dce4df;
    --orange: #c64a1d;
    --green: #315b46;
    --rail: #1c2c25;
    --radius: 10px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
  }
  body { font-size: 14px; line-height: 1.45; }
  h1, h2, h3 { color: var(--ink); letter-spacing: -.25px; font-weight: 650; }
  h1, .page-heading h1 { font-size: 24px; }
  h2, .estimate-metal h2, .estimate-work h2, .estimate-services h2,
  .service-admin h2, .work-admin h2, .appearance-admin h2,
  .estimate-laser h2 { font-size: 17px; }
  h3, .service-section h3, .seal-settings h3 { font-size: 15px; font-weight: 650; }
  input, select, textarea {
    font-size: 14px; font-weight: 400; line-height: 1.3; min-height: 34px;
    padding: 6px 9px; border: 1px solid #82998b; border-radius: 6px;
    color: var(--ink); background: #fff; box-shadow: 0 1px 1px #1d302805;
  }
  select { padding-right: 25px; }
  input::placeholder, textarea::placeholder { color: #728078; opacity: 1; }
  input:disabled, select:disabled { background: #f2f5f3; color: #53675a; }
  input:focus, select:focus, textarea:focus { border-color: #3d7354; }
  button:focus-visible, a:focus-visible, input:focus-visible,
  select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 2px solid #b8441b; outline-offset: 2px;
  }
  input[type=checkbox] {
    appearance: auto; width: 18px; height: 18px; min-width: 18px; min-height: 18px;
    flex: 0 0 18px; margin: 0; padding: 0; border-radius: 4px;
    accent-color: #315b46; vertical-align: middle; cursor: pointer; box-shadow: none;
  }
  input[type=number], .article, .service-table, .estimate-area,
  .estimate-metal-total, .glass-totals, .service-subtotal, .catalog-table {
    font-variant-numeric: tabular-nums;
  }
  .btn, .heading-actions .btn, .btn-small, .heading-actions .btn-small {
    min-height: 34px; padding: 6px 11px; border-radius: 6px;
    font-size: 13px; line-height: 1.3; font-weight: 600;
    border-color: #cbd6cf; gap: 6px; white-space: normal;
  }
  .btn:hover { background: #edf3ef; border-color: #9fb5a7; }
  .btn-primary { background: var(--orange); border-color: var(--orange); color: #fff; }
  .btn-primary:hover { background: #b94218; border-color: #b94218; }
  .btn-dark { background: #294c39; border-color: #294c39; color: #fff; }
  .btn-dark:hover { background: #355e48; border-color: #355e48; }
  .btn-text, .text-button { font-size: 13px; font-weight: 550; }
  button:disabled { opacity: .55; }
  .icon-button, .catalog-v2 .icon-button {
    width: 32px; height: 32px; min-height: 32px; font-size: 20px;
    border-radius: 6px; color: #53675b;
  }
  .icon-button:hover { background: #eaf1ec; color: #244832; }
  .danger-icon:hover { background: #fff0eb; color: #ac351b; }
  .buttons, .heading-actions, .catalog-file-actions, .catalog-icon-actions {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  }
  .rail { width: 208px; padding: 24px 14px 18px; }
  .workspace { margin-left: 208px; }
  .brand { font-size: 18px; gap: 10px; letter-spacing: .8px; }
  .brand small { font-size: 11px; letter-spacing: 0; color: #b9cbbf; }
  .brand-mark { font-size: 36px; }
  .rail-label { margin: 35px 10px 12px; font-size: 11px; letter-spacing: 1.1px; color: #a6b9ac; }
  .rail nav { gap: 6px; }
  .rail nav > a { min-height: 43px; padding: 10px; font-size: 14px; gap: 10px; color: #d0dbd3; }
  .rail nav > a.active { background: #35523f; color: #fff; font-weight: 600; }
  .rail nav > a:hover { background: #304638; }
  .rail-bottom { padding: 15px 10px 0; font-size: 12px; }
  .rail-bottom p { font-size: 12px; color: #b1c1b6; margin: 8px 0 14px; line-height: 1.5; }
  .rail-help { font-size: 12px; color: #d0dbd3; min-height: 28px; }
  main { padding: 18px 20px; max-width: 1660px; }
  .topbar { height: 42px; padding: 0 20px; }
  .breadcrumb, .save-status { font-size: 12px; }
  .app-footer { font-size: 12px; color: var(--muted); padding: 10px 20px 18px; }
  .panel { border-radius: 10px; box-shadow: 0 1px 3px #19312306; }
  .estimate-metal-scroll, #catalog-rows { position: relative; min-width: 0; }
  .page-heading { margin-bottom: 14px; gap: 12px; align-items: center; }
  .heading-actions { padding-top: 0; }
  .estimate-positions { gap: 6px; margin-bottom: 12px; }
  .estimate-positions .btn { min-height: 35px; }
  .estimate-product { padding: 12px 14px; margin-bottom: 12px; }
  .estimate-product h1, .product-admin h1 { font-size: 20px; }
  .estimate-product-heading { justify-content: flex-start; gap: 10px; }
  .estimate-product-fields { gap: 10px 14px; margin-top: 12px; align-items: end; }
  .estimate-product-selectors { gap: 10px; flex: 1 1 320px; max-width: 530px; }
  .estimate-product-selectors > label, .estimate-product-fields label { font-size: 13px; font-weight: 550; }
  .estimate-product-selectors > .product-tier { flex-basis: 125px; }
  .estimate-product-fields input, .estimate-product-fields select { margin-top: 5px; }
  .estimate-size { gap: 7px; }
  .estimate-size label { width: 114px; }
  .estimate-size > span { padding-bottom: 7px; color: var(--muted); font-size: 14px; }
  .estimate-area { font-size: 15px; color: #2c513b; font-weight: 650; padding-bottom: 7px; }
  .estimate-product > .service-controls { margin: 8px 0 0; gap: 6px 18px; }
  .estimate-positions .position-nav-total { display: block; margin-left: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
  .estimate-order-strip {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 10px 20px; margin: 10px 0 12px; padding: 10px 14px;
    border: 2px solid #46704d; border-radius: 8px; background: #edf4ef;
    font-variant-numeric: tabular-nums;
  }
  .estimate-order-strip > span strong { margin-left: 8px; }
  .order-total-button { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; border: 0; padding: 0; background: transparent; color: #254c36; cursor: pointer; text-align: left; }
  .order-total-button strong { font-size: 21px; font-weight: 700; }
  .order-summary { margin: 14px 0; border: 2px solid #46704d; border-radius: 9px; overflow: hidden; font-variant-numeric: tabular-nums; }
  .cost-item { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .cost-item-active { background: #f4f8f4; }
  .cost-item header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
  .cost-item h3 { margin: 0; font-size: 16px; }
  .cost-item header > strong { font-size: 19px; }
  .cost-item-meta { margin: 5px 0; font-size: 13px; line-height: 1.6; color: #4e5d52; overflow-wrap: anywhere; }
  .cost-breakdown { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 24px; margin: 10px 0 0; }
  .cost-breakdown > div, .cost-service-details dl > div { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: 8px 12px; padding: 6px 0; border-bottom: 1px solid #e1e8df; }
  .cost-breakdown dt, .cost-service-details dt { overflow-wrap: anywhere; }
  .cost-breakdown dd, .cost-service-details dd { margin: 0; text-align: right; font-weight: 600; }
  .cost-service-details { margin: 10px 0 0; font-size: 13px; }
  .cost-service-details summary { cursor: pointer; color: #345e3e; width: fit-content; }
  .cost-service-details dl { margin: 6px 0 0; }
  .cost-service-details small { display: block; margin-top: 3px; color: var(--muted); }
  .cost-common-total { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
  .order-pricing { padding: 14px; border-top: 2px solid #46704d; background: #fff; }
  .order-pricing h3 { margin: 0 0 12px; font-size: 18px; }
  .pricing-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 14px; }
  .pricing-controls label { display: grid; gap: 5px; }
  .pricing-controls input { width: 140px; }
  .pricing-controls .field-help { align-self: center; margin: 0; }
  .pricing-totals { margin: 0; }
  .pricing-totals > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
  .pricing-totals dt { overflow-wrap: anywhere; }
  .pricing-totals dd { margin: 0; font-weight: 600; text-align: right; }
  .pricing-totals .pricing-client, .pricing-totals .pricing-profit { padding: 12px; background: #edf4ef; border-radius: 6px; font-weight: 650; }
  .pricing-client dd, .pricing-profit dd { font-size: 20px; }
  .pricing-totals .is-loss { color: #9d3927; background: #fff1ec; }
  .pricing-admin > .field-help { padding: 0 14px 12px; }
  .estimate-order-strip .client-price-strip { color: #254c36; font-size: 16px; }
  .order-totals-table { min-width: 720px; table-layout: fixed; }
  .order-totals-table.with-lift { min-width: 840px; }
  .order-summary .order-totals-table th:nth-child(n) { width: auto; }
  .order-summary .order-totals-table th:first-child { width: 27%; }
  .order-totals-table th, .order-totals-table td { white-space: nowrap; }
  .order-totals-table tbody th { background: transparent; font-size: 14px; color: var(--ink); font-weight: 600; }
  .order-totals-table tbody th small { display: block; max-width: 260px; white-space: normal; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 3px; }
  .order-totals-table .order-item-active { background: #edf4ef; }
  .order-items-subtotal, .order-grand-total { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; padding: 12px 14px; }
  .order-items-subtotal { border-top: 1px solid var(--line); background: #f8faf8; }
  .order-common { padding: 12px 14px; }
  .order-common h3 { margin: 0 0 8px; }
  .order-common dl, .order-common p { margin: 0; }
  .order-common dl > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 20px; padding: 5px 0; }
  .order-common dd { margin: 0; text-align: right; }
  .order-grand-total { background: #edf4ef; border-top: 2px solid #46704d; align-items: baseline; font-weight: 650; }
  .order-grand-total strong { font-size: 23px; }
  .order-totals-note { padding: 0 14px; margin: 10px 0; font-size: 12px; color: var(--muted); }
  .order-issues { margin: 10px 14px 14px; font-size: 13px; color: #874023; }
  #app > .panel[data-completion-section],
  #app > .estimate-production-pair > .panel[data-completion-section] {
    border: 2px solid #82998b;
    box-shadow: 0 2px 4px rgb(29 48 40 / 7%);
  }
  #app .service-section[data-completion-section] {
    border: 2px solid #82998b;
    border-radius: 7px;
    margin: 10px;
  }
  #app [data-completion-section].section-complete { border-color: #46704d !important; }
  .estimate-metal, .estimate-work, .estimate-glass, .estimate-paint,
  .estimate-services, .estimate-laser, .estimate-hardware, .work-admin,
  .service-admin, .appearance-admin, .product-admin { margin: 12px 0; }
  .estimate-metal-heading, .estimate-product-heading, .section-toolbar {
    padding: 10px 14px; gap: 8px 12px; min-height: 54px;
  }
  .estimate-product > .estimate-product-heading { padding: 0; min-height: 32px; }
  .estimate-metal-heading { justify-content: flex-start; }
  [data-completion-section] > .estimate-metal-heading,
  [data-completion-section] > .estimate-product-heading,
  [data-completion-section] > .service-section-heading { gap: 8px 12px; }
  .section-titlebar h1, .section-titlebar h2, .section-titlebar h3 { margin: 0; }
  .section-completion-control {
    min-height: 32px; gap: 7px; font-size: 12px; font-weight: 500;
    margin-left: auto; color: #526459; line-height: 1.25;
  }
  .section-completion-control input { width: 18px; height: 18px; }
  .section-collapsed > .section-titlebar { padding: 7px 14px; min-height: 46px; gap: 8px 12px; }
  .section-collapsed > .section-titlebar h1, .section-collapsed > .section-titlebar h2,
  .section-collapsed > .section-titlebar h3 { font-size: 15px; }
  .section-collapsed-total { font-size: 15px; font-weight: 650; }
  .section-collapse-toggle { width: 28px; height: 30px; min-height: 30px; }
  .completion-heading { gap: 10px; margin-bottom: 6px; min-height: 32px; }
  .estimate-metal-table, .estimate-work-table, .service-table,
  .estimate-glass table, .items-table { font-size: 14px; }
  .estimate-metal-table th, .estimate-work-table th, .service-table th,
  .estimate-glass table th, .items-table th {
    padding: 8px 12px; background: #f2f6f3; color: #506258;
    font-size: 12px; font-weight: 650; letter-spacing: 0; text-transform: none;
  }
  .estimate-metal-table td, .estimate-work-table td, .service-table td,
  .estimate-glass table td, .items-table td { padding: 7px 12px; vertical-align: middle; }
  .estimate-metal-table tbody tr:hover, .estimate-work-table tbody tr:hover,
  .service-table tbody tr:hover { background: #f7faf8; }
  .estimate-metal-table input, .estimate-metal-table select,
  .estimate-work-table input, .estimate-work-table select, .service-table input,
  .estimate-glass table input, .items-table input { font-size: 14px; padding: 6px 8px; min-height: 33px; }
  .estimate-metal-table td:nth-last-child(2), .estimate-work-table td:nth-last-child(2),
  .service-table td:nth-last-child(2) { font-weight: 600; white-space: nowrap; }
  .estimate-metal-table th:nth-child(3) { width: 105px; }
  .estimate-metal-table th:nth-child(5), .estimate-metal-table th:nth-child(6) { width: 120px; }
  .estimate-metal-table th:last-child, .estimate-work-table th:last-child { width: 46px; }
  .estimate-metal-table .article, .article { font-size: 12px; color: #4b6254; }
  .estimate-work-table [data-field=work-quantity] { width: 90px; }
  .estimate-work-table .manual-price, .service-table input { width: 100px; }
  .service-table [data-field=service-name] { width: 100%; }
  .service-table [data-field=service-unit] { width: 65px; }
  .glass-canvas input { width: 90px; }
  .estimate-metal-total, .glass-totals, .table-footer {
    padding: 10px 14px; font-size: 14px; gap: 8px 16px; background: #f8faf8;
  }
  .estimate-metal-total strong, .glass-totals strong, .table-footer strong { font-size: 16px; font-weight: 650; }
  .service-section { padding: 10px 14px; }
  .service-section h3 { margin-bottom: 6px; }
  .service-section-heading { gap: 8px 12px; justify-content: flex-start; margin-bottom: 6px; }
  .service-controls, .service-add { margin: 6px 0; gap: 8px 14px; align-items: end; }
  .service-controls label, .service-option label { font-size: 13px; line-height: 1.35; gap: 4px; }
  .service-controls > label:not(.service-check) { min-width: 120px; }
  .service-controls input:not([type=checkbox]), .service-controls select { width: 155px; max-width: 100%; }
  .service-controls input[data-field=travel-visits], .service-controls input[data-field=travel-km],
  .service-controls input[data-field=measurement-km] { width: 115px; }
  .service-controls > span { font-size: 13px; min-height: 34px; display: inline-flex; align-items: center; gap: 4px; }
  .service-check, .service-controls .service-check {
    min-height: 32px; margin: 0; gap: 8px; font-size: 13px;
    line-height: 1.35; cursor: pointer; align-items: center; font-weight: 500;
  }
  .service-check .field-help { font-size: 12px; }
  .service-add select { min-width: 200px; flex: 1 1 260px; }
  .service-subtotal { font-size: 14px; margin-top: 6px; padding: 5px 0; }
  .service-install-summary p { font-size: 13px; margin: 6px 0; line-height: 1.55; }
  .service-install-summary p:last-child { font-size: 15px; margin: 8px 0 0; }
  .service-option { grid-template-columns: minmax(200px,1fr) 90px 130px 32px; margin: 0; padding: 8px 0; border-bottom: 1px solid #e8ede9; gap: 10px; }
  .service-option:last-child { border-bottom: 0; }
  .service-option input { font-size: 14px; }
  .service-options-head { display: grid; grid-template-columns: minmax(200px,1fr) 90px 130px 32px; gap: 10px; margin-top: 10px; padding-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
  .service-option .service-field-label { display: none; }
  .catalog-navigation { gap: 8px 12px; margin-bottom: 12px; align-items: center; }
  .catalog-pages { gap: 6px; }
  .catalog-page, .catalog-page.add-page { min-height: 35px; padding: 7px 12px; border-radius: 6px; }
  .catalog-page strong, .catalog-page.add-page { font-size: 13px; font-weight: 600; }
  .catalog-tabs-row { padding: 8px 12px; gap: 8px; }
  .catalog-tabs { gap: 5px; }
  .catalog-tabs a, .catalog-tabs button { min-height: 33px; padding: 6px 10px; font-size: 13px; font-weight: 550; border-radius: 5px; }
  .catalog-tabs a[aria-current=page] { background: #e4eddf; color: #244830; font-weight: 650; }
  .catalog-icon-actions .catalog-action-icon { width: 34px; height: 34px; min-height: 34px; }
  .catalog-toolbar { padding: 9px 12px; gap: 8px; align-items: center; }
  .catalog-toolbar .search-field { flex: 1 1 260px; }
  .catalog-toolbar .search-field input, #catalog-sort { font-size: 14px; min-height: 34px; }
  #catalog-sort { width: 155px; max-width: none; }
  .catalog-toolbar small, .catalog-search-scope { font-size: 12px; }
  .catalog-search-scope { gap: 7px; min-height: 34px; cursor: pointer; }
  .filter-reset, .catalog-tabs .filter-reset { width: 32px; height: 34px; min-height: 34px; flex-basis: 32px; color: #52675a; padding: 0; font-size: 20px; }
  .catalog-table th, .catalog-table td { padding: 7px 10px; font-size: 14px; }
  .catalog-table th { font-size: 12px; font-weight: 650; background: #f2f6f3; color: #506258; }
  .catalog-table td input { font-size: 14px; min-height: 33px; padding: 6px 8px; }
  .catalog-table td small, .catalog-comment, .catalog-table .catalog-comment summary { font-size: 12px; }
  .catalog-v2 .catalog-name-button, .catalog-item-label .catalog-name-button { font-size: 14px; line-height: 1.4; font-weight: 500; }
  .catalog-name-button:hover { color: #224b32; text-decoration: underline; text-underline-offset: 3px; }
  .catalog-table.catalog-v2 .catalog-article { width: 70px; }
  .catalog-table.catalog-v2 { min-width: 800px; }
  #catalog-rows { max-width:100%;overflow-x:auto; }
  .catalog-table.catalog-v2:has(.catalog-dimensions) { min-width: 960px; }
  .catalog-table.catalog-v2 .catalog-proposal-name { width: 220px; }
  .catalog-table textarea.catalog-proposal-input { display:block;width:100%;min-width:0;min-height:34px;max-height:96px;padding:6px 8px;margin:0;box-sizing:border-box;resize:none;overflow:auto;font:inherit;line-height:20px;text-align:left; }
  .catalog-article .article { font-size: 12px; }
  .catalog-table.catalog-v2 .catalog-dimensions { width: 155px; font-size: 13px; }
  .catalog-table.catalog-v2 .catalog-tempered { width: 80px; font-size: 13px; }
  .catalog-table.catalog-v2 .catalog-unit { width: 55px; font-size: 13px; }
  .catalog-table.catalog-v2 .catalog-price { width: 130px; }
  .catalog-table.catalog-v2 .catalog-action { width: 120px; }
  .catalog-v2 .supplier-link, .supplier-link { font-size: 12px; margin-top: 4px; color: #365d43; }
  .catalog-table tbody tr:not(.catalog-untempered):hover > td { background: #f7faf8; }
  .catalog-table .untempered-badge { font-size: 12px; }
  .catalog-hint, .pagination { font-size: 13px; }
  .pagination { padding: 10px 12px; gap: 8px; }
  .catalog-table.catalog-v2 .catalog-position { width: 95px; }
  .catalog-v2 .position-controls .icon-button { width: 27px; height: 25px; min-height: 25px; }
  .position-controls input { min-height: 34px; width: 45px; }
  .work-rates { padding: 12px 14px; gap: 12px; }
  .work-rates label { font-size: 13px; font-weight: 550; }
  .work-rates label span { font-size: 12px; margin: 2px 0 5px; font-weight: 400; }
  .seal-settings { padding: 0 14px 12px; }
  .seal-settings h3 { margin: 6px 0; }
  .seal-article { padding: 5px 0; font-size: 14px; gap: 10px; min-height: 38px; }
  .seal-article code { font-size: 12px; }
  .seal-add { margin-top: 8px; }
  .seal-add select { font-size: 14px; }
  .appearance-controls { gap: 10px 16px; padding: 10px 14px; }
  .appearance-controls label, .completion-preview { font-size: 13px; }
  .appearance-controls input[type=color] { width: 46px; height: 34px; min-height: 34px; padding: 3px; }
  .completion-preview { padding: 7px 10px; }
  .product-admin-list { padding: 0 14px 8px; }
  .product-admin-row { font-size: 14px; min-height: 43px; padding: 5px 0; }
  .settings-panel, .formula-panel { padding: 16px; }
  .settings-layout { gap: 16px; grid-template-columns: minmax(0,1fr) 300px; }
  .settings-grid { gap: 14px 16px; margin-top: 16px; }
  .setting-field { font-size: 14px; gap: 5px; }
  .setting-field > span { font-size: 13px; font-weight: 600; }
  .setting-field small, .settings-note, .subheading, .formula-panel li,
  .summary-caption, .help-list { font-size: 13px; color: var(--muted); line-height: 1.5; }
  .formula-panel ol { gap: 14px; }
  .formula-panel li strong { font-size: 13px; }
  .settings-note { margin-top: 16px; padding-top: 14px; }
  .settings-note p:last-child { margin-bottom: 0; }
  .field-help, .metal-price-note, .glass-area-warning { font-size: 12px; line-height: 1.45; }
  .estimate-metal-empty { font-size: 14px; padding: 20px 14px; }
  .empty-state { padding: 30px 18px; }
  .empty-state p { font-size: 14px; }
  dialog { width: min(740px,calc(100% - 32px)); max-height: 90dvh; border-radius: 12px; overflow: hidden; }
  #modal-content { display: flex; flex-direction: column; max-height: calc(90dvh - 2px); }
  .modal-head { padding: 14px 16px; flex-shrink: 0; align-items: center; }
  .modal-head h2 { font-size: 21px; line-height: 1.25; margin: 0; }
  .modal-head p { font-size: 13px; margin-top: 5px; }
  .modal-body { padding: 14px 16px; overflow-y: auto; min-height: 0; }
  .modal-body form { gap: 12px; }
  .modal-body label { font-size: 13px; gap: 5px; font-weight: 550; }
  .modal-body label:has(input[type=checkbox]) { display: flex; align-items: center; }
  .modal-body .form-row { gap: 12px; }
  .modal-footer { flex-wrap: wrap; padding-top: 10px; margin-top: 4px; gap: 8px; }
  .metal-picker-controls, .picker-controls { gap: 8px; padding-bottom: 10px; }
  .metal-picker-controls input, .metal-picker-controls select,
  .picker-controls input, .picker-controls select { font-size: 14px; }
  .metal-picker-row, .picker-row { padding: 9px 0; gap: 12px; }
  .metal-picker-row strong, .picker-row strong { font-size: 14px; font-weight: 600; line-height: 1.4; }
  .metal-picker-row small, .picker-row small { font-size: 12px; line-height: 1.45; }
  .metal-picker-row > div, .picker-row > div { min-width: 0; overflow-wrap: anywhere; }
  .metal-picker-row > .btn, .picker-row > .btn { flex: none; }
  .article-banner, .formula-editor, .formula-preview { font-size: 13px; padding: 10px 12px; }
  .formula-builder { gap: 8px; }
  .form-error, .estimate-error, .storage-warning, .toast { font-size: 14px; line-height: 1.45; }
  .toast { left: calc(50% + 104px); padding: 11px 16px; }
  .summary-top, .summary-body { padding: 18px; }
  .totals-list, .discount-field { font-size: 14px; }
  .order-mini div, .summary-sub { font-size: 12px; }
}

@media screen and (max-width: 1120px) {
  .rail { width: 190px; padding-left: 12px; padding-right: 12px; }
  .workspace { margin-left: 190px; }
  .rail nav > a { font-size: 13px; gap: 8px; padding-left: 9px; padding-right: 9px; }
  .brand { font-size: 16px; }
  .brand small { font-size: 10px; }
  main { padding: 16px; }
  .settings-layout { grid-template-columns: 1fr; }
  .formula-panel ol { display: grid; grid-template-columns: 1fr 1fr; }
  .work-rates { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .estimate-product-selectors { max-width: none; }
  .toast { left: calc(50% + 95px); }
}

@media screen and (max-width: 760px) {
  body { padding-bottom: 0; }
  .rail { position: relative; width: 100%; padding: 12px 14px; }
  .brand { font-size: 17px; }
  .brand-mark { font-size: 30px; }
  .rail nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; margin-top: 12px; }
  .rail nav > a { font-size: 12px; padding: 7px 4px; min-height: 38px; line-height: 1.3; }
  .workspace { margin-left: 0; }
  main { padding: 12px; min-height: 70dvh; }
  .topbar { padding: 0 12px; }
  .page-heading { display: flex; align-items: start; flex-wrap: wrap; }
  .page-heading h1 { font-size: 22px; }
  .heading-actions { margin: 0; max-width: none; }
  .estimate-product { padding: 10px 12px; }
  .estimate-product-selectors { flex: 1 0 100%; max-width: none; }
  .estimate-product-selectors > .product-tier { flex-basis: 115px; }
  .estimate-size { flex: 1 1 100%; gap: 5px; min-width: 0; }
  .estimate-size label { width: auto; min-width: 0; flex: 1; }
  .estimate-size input { padding-left: 7px; padding-right: 5px; }
  .estimate-area { padding-bottom: 0; }
  .estimate-metal-heading { padding: 9px 12px; }
  .section-completion-control { font-size: 12px; min-height: 30px; margin-left: auto; }
  .section-collapsed > .section-titlebar { padding: 7px 12px; gap: 6px 8px; }
  .section-collapsed-total { margin-left: auto; }
  .section-collapsed > .section-titlebar > .section-completion-control { margin-left: 0; }
  .section-collapsed > .section-titlebar h2 { font-size: 14px; }
  .service-controls { gap: 6px 12px; }
  .service-controls > label { width: auto; }
  .service-controls > label:not(.service-check) { flex: 0 1 150px; }
  .service-controls input:not([type=checkbox]), .service-controls select { width: 100%; }
  .service-controls > span { min-height: 26px; }
  .service-option { grid-template-columns: minmax(0,1fr) 75px 110px 32px; gap: 8px; }
  .service-options-head { grid-template-columns: minmax(0,1fr) 75px 110px 32px; gap: 8px; }
  .catalog-toolbar .search-field { flex: 1 0 100%; }
  .catalog-toolbar small { width: auto; }
  .catalog-table { min-width: 720px; }
  #catalog-rows { max-width: 100%; overflow-x: auto; }
  .catalog-pages { flex-wrap: wrap; }
  .catalog-page, .catalog-page.add-page { padding: 7px 10px; }
  .catalog-tabs-row { align-items: center; }
  .catalog-tabs a, .catalog-tabs button { font-size: 13px; }
  .catalog-navigation .catalog-file-actions { margin-left: auto; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .settings-panel, .formula-panel { padding: 14px; }
  .appearance-controls { padding: 10px 12px; }
  .service-section { padding: 9px 12px; }
  .app-footer { padding: 8px 12px 16px; font-size: 11px; }
  dialog { width: calc(100% - 20px); max-height: calc(100dvh - 24px); }
  #modal-content { max-height: calc(100dvh - 26px); }
  .modal-head, .modal-body { padding: 12px; }
  .toast { left: 50%; bottom: 16px; }
  .mobile-total:not([hidden]) { display: flex; }
}

@media screen and (max-width: 1000px) {
  .cost-breakdown { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media screen and (max-width: 600px) {
  .cost-breakdown { grid-template-columns: 1fr; }
}
@media screen and (max-width: 480px) {
  .rail nav > a { font-size: 11px; }
  .estimate-product-heading { flex-wrap: wrap; }
  .estimate-product-selectors { flex-wrap: wrap; }
  .estimate-product-selectors > label:first-child { flex: 1 0 100%; }
  .section-completion-control { white-space: normal; }
  .section-collapsed > .section-titlebar h2 { flex: 1 1 160px; }
  .section-collapsed > .section-titlebar > .section-completion-control { flex: 1 0 auto; }
  .settings-grid, .formula-panel ol, .work-rates { grid-template-columns: 1fr; }
  .service-option { grid-template-columns: 1fr 80px 32px; }
  .service-options-head { display: none; }
  .service-option .service-field-label { display: block; font-size: 12px; }
  .service-option label:first-child { grid-column: 1/-1; }
  .service-option > button { align-self: end; }
  .modal-body .form-row { grid-template-columns: 1fr; }
  .metal-picker-controls { flex-wrap: wrap; }
  .metal-picker-controls > .filter-control { flex: 1 0 100%; }
  #catalog-rows::before, .estimate-metal-scroll::before {
    content: "Прокрутите таблицу вправо, чтобы увидеть все поля";
    display: block; padding: 7px 12px; font-size: 12px;
    color: var(--muted); background: #f7faf8; border-bottom: 1px solid var(--line);
  }
}
/* Accounts and saved orders */
.signed-out .rail,.signed-out .topbar,.signed-out .app-footer{display:none!important}
.signed-out .workspace{margin-left:0!important;width:100%!important}
.signed-out #main{max-width:540px;margin:6vh auto;padding:20px}
.auth-card{padding:28px!important;border:1px solid #9aa99d!important}
.auth-brand{font-weight:800;letter-spacing:.12em;color:#263e31;margin-bottom:20px}
.auth-card h1{font-size:25px;margin:0 0 12px}.auth-card p{color:#526156;line-height:1.5}
.auth-card form,.account-form{display:grid;gap:14px}.auth-card label,.account-form label{display:grid;gap:6px}
.auth-card input,.account-form input,.account-form select{width:100%;min-height:40px}
.auth-card .form-error{color:#b23420;min-height:20px;margin:0}.auth-card small{color:#526156}
.auth-card .form-error:empty,.account-form .form-error:empty{display:none}
.auth-card input:invalid:not(:user-invalid),.account-form input:invalid:not(:user-invalid){border-color:#9aa99d;background:#fff}
.account-bar{display:flex;align-items:center;gap:8px;margin-top:20px;padding:12px 0;border-top:1px solid #405147;font-size:13px}
.account-bar span{min-width:0;overflow-wrap:anywhere}.account-bar small{display:block;opacity:.7;font-size:12px;margin-top:3px}
.account-bar .btn{margin-left:auto;color:#fff;border-color:#536357;background:transparent;padding:5px 8px}
.order-card{margin-bottom:14px;padding:16px!important;border:1.5px solid #728578!important}
.order-card-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.order-card-heading h2{font-size:18px;margin:0 0 4px}.order-card-heading small{color:#617063}
.order-customer-grid{display:grid;grid-template-columns:1fr 2fr 1.3fr;gap:10px;align-items:start}
.order-customer-grid label{display:grid;gap:5px;font-size:14px}.order-customer-grid input{width:100%;min-width:0;min-height:36px}
.order-customer-grid .customer-address{grid-column:1/-1}
.order-price-note{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;color:#617063;margin-top:10px}
.saved-panel{overflow:hidden}.saved-search{display:flex;gap:8px;padding:14px;align-items:center}.saved-search input{flex:1;min-width:160px;min-height:36px}
.table-scroll{overflow-x:auto}.saved-table{min-width:760px;width:100%}.saved-table th,.saved-table td,.users-panel th,.users-panel td{padding:12px;text-align:left}
.saved-table small,.users-panel td small{display:block;color:#617063;font-size:12px;margin-top:4px}
.users-panel{margin-bottom:14px}.users-panel table{width:100%}.users-panel .field-help{padding:0 14px 12px}
.account-form .service-check{display:flex}.account-form input[type=checkbox]{width:16px;min-height:16px}
.catalog-name-button:disabled{opacity:1;color:inherit;cursor:default}
.changes-table{width:100%;font-size:13px}.changes-table th,.changes-table td{padding:9px;border-bottom:1px solid #d5ddd5;text-align:left;overflow-wrap:anywhere;max-width:260px}
[hidden]{display:none!important}
.phone-input{display:flex;align-items:center;border:1px solid #9aa99d;border-radius:5px;background:#fff;overflow:hidden;min-width:0}
.phone-input>span{padding-left:10px;font-size:14px;font-weight:600;flex:none}
.order-customer-grid .phone-input input{border:0!important;box-shadow:none!important;outline:0;min-width:0;padding-left:6px;border-radius:0;font-variant-numeric:tabular-nums}
.phone-input:focus-within{outline:2px solid #617e54;outline-offset:1px}.customer-phone small{font-size:11px;color:#617063}
.estimate-summary-tab{margin-left:auto}
.modal-body .modal-footer{position:sticky;bottom:-14px;z-index:2;background:#fff;border-top:1px solid #d5ddd7;padding:12px 0;margin-bottom:-14px;box-shadow:0 -8px 12px #ffffffed}
@media(max-width:700px){.order-customer-grid{grid-template-columns:1fr 1fr}.order-customer-grid .customer-fullName{grid-column:1/-1;grid-row:2}.order-card-heading .buttons{width:100%;flex-wrap:wrap}.saved-search{flex-wrap:wrap}.order-price-note{align-items:flex-start}.account-bar{margin-top:8px}.signed-out #main{margin-top:2vh}.auth-card{padding:20px!important}}
@media(max-width:520px){.order-customer-grid{grid-template-columns:1fr}.order-customer-grid .customer-fullName{grid-row:auto}.estimate-summary-tab{margin-left:0}.estimate-positions .btn{flex:1 1 auto}}

/* Keep primary actions visible without sideways scrolling on small screens. */
@media(max-width:760px){
  .rail nav{grid-template-columns:repeat(3,minmax(0,1fr))}
  .rail nav>a{font-size:13px;min-height:42px}
  .responsive-records,.responsive-records tbody{display:block;width:100%;min-width:0}
  .responsive-records thead{display:none}
  .responsive-records tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;padding:14px;border-bottom:1px solid #d5ddd7}
  .responsive-records td{display:flex;flex-direction:column;gap:4px;padding:0!important;border:0;min-width:0;overflow-wrap:anywhere;white-space:normal}
  .responsive-records td[data-label]:before{content:attr(data-label);font-size:12px;color:#526156}
  .responsive-records .record-title,.responsive-records .record-author,.responsive-records .record-actions{grid-column:1/-1}
  .saved-table .record-title:not([colspan]){grid-column:1;grid-row:1}
  .saved-table td[data-label="Версия"]{grid-column:2;grid-row:1;align-items:flex-end}
  .responsive-records .record-actions .buttons{display:flex;flex-wrap:wrap;width:100%}
  .responsive-records .record-actions .btn{flex:1;min-height:36px}
  .saved-search input{flex-basis:100%;min-width:0}
  .saved-search .btn{flex:1}
  .saved-panel .pagination{flex-wrap:wrap;gap:12px}
  .saved-panel .pagination .buttons{width:100%;justify-content:space-between}
}
/* Explicit persistence controls stay visible without interrupting input. */
.manual-save-bar{position:sticky;top:8px;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px!important;border:2px solid #6e8776!important;box-shadow:0 3px 12px #20362b18;margin-bottom:14px}
.catalog-action .row-actions{flex-wrap:wrap}
@media(max-width:600px){.manual-save-bar{top:4px;flex-wrap:wrap}.manual-save-bar .btn{width:100%}}
@media screen{
  .estimate-save-controls{position:fixed;right:24px;bottom:calc(20px + env(safe-area-inset-bottom,0px));z-index:15;display:flex;align-items:center;gap:12px;padding:8px 10px;background:#fff;border:1px solid #acbcaf;border-radius:9px;box-shadow:0 4px 18px #20362b38}
  .estimate-save-controls .btn{min-height:44px}
  .estimate-save-state{font-size:13px;font-weight:550;color:#356843;line-height:1.35}
  .estimate-save-state[data-state="unsaved"]{color:#8b570b}
  .estimate-save-state[data-state="saving"]{color:#526156}
  .estimate-save-state[data-state="error"]{color:#a33323}
  #app:has(.estimate-save-controls){padding-bottom:108px}
}
@media screen and (max-width:700px){
  .estimate-save-controls{left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));flex-direction:column;gap:6px}
  .estimate-save-controls .btn{width:100%}
}
.services-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;padding:12px;align-items:stretch}
.services-grid>.service-section{min-width:0;margin:0;border:1.5px solid #a3b3a7;border-radius:8px;padding:12px}
.services-grid>.section-collapsed{align-self:start}
.services-grid .service-controls{gap:8px}
.services-grid .service-controls label{min-width:0}
.services-grid .service-table{width:100%;min-width:0;table-layout:fixed}
.services-grid .service-table th,.services-grid .service-table td{padding:7px 4px;font-size:12px;overflow-wrap:anywhere}
.services-grid .service-table th{font-size:11px}
.services-grid .service-table th:nth-child(1){width:30%}
.services-grid .service-table th:nth-child(2){width:15%}
.services-grid .service-table th:nth-child(3){width:10%}
.services-grid .service-table th:nth-child(4){width:16%}
.services-grid .service-table th:nth-child(5){width:22%}
.services-grid .service-table th:nth-child(6){width:7%}
.services-grid .service-table input{width:100%;min-width:0;font-size:12px;padding:5px}
.services-grid .service-table .icon-button{width:20px}
.estimate-materials-delivery>.service-add,.estimate-materials-delivery>.field-help{margin:12px 14px}
.materials-delivery-switch{margin:12px 14px}
@media(max-width:760px){.services-grid{grid-template-columns:minmax(0,1fr)}}
/* The coating specification belongs to the individual product. */
.estimate-product-fields > .product-ral { flex: 0 1 150px; max-width: 180px; min-width: 120px; }
.estimate-production-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch;margin:12px 0}
.estimate-production-pair>.panel{min-width:0;margin:0;display:flex;flex-direction:column}
.estimate-production-pair>.section-collapsed{align-self:start}
.estimate-production-pair .estimate-metal-total{margin-top:auto;flex-wrap:wrap}
.estimate-production-pair table{width:100%;min-width:0;table-layout:fixed}
.estimate-production-pair table th,.estimate-production-pair table td{padding:7px 5px;font-size:13px;white-space:normal;overflow-wrap:anywhere}
.estimate-production-pair table th{font-size:11px}
.estimate-production-pair table input,.estimate-production-pair table select,.estimate-production-pair .estimate-work-table [data-field="work-quantity"]{width:100%;min-width:0;font-size:13px;padding:5px 4px}
.estimate-production-pair .estimate-metal-table .manual-name,.estimate-production-pair .estimate-metal-table .manual-price,.estimate-production-pair .estimate-work-table .manual-price{width:100%;min-width:0;max-width:none}
.estimate-production-pair .estimate-metal-table th:nth-child(1){width:12%}
.estimate-production-pair .estimate-metal-table th:nth-child(2){width:22%}
.estimate-production-pair .estimate-metal-table th:nth-child(3){width:14%}
.estimate-production-pair .estimate-metal-table th:nth-child(4){width:12%}
.estimate-production-pair .estimate-metal-table th:nth-child(5),.estimate-production-pair .estimate-metal-table th:nth-child(6){width:17%}
.estimate-production-pair .estimate-metal-table th:last-child{width:6%}
.estimate-production-pair .estimate-work-table th:nth-child(1){width:35%}
.estimate-production-pair .estimate-work-table th:nth-child(2){width:13%}
.estimate-production-pair .estimate-work-table th:nth-child(3){width:9%}
.estimate-production-pair .estimate-work-table th:nth-child(4){width:17%}
.estimate-production-pair .estimate-work-table th:nth-child(5){width:19%}
.estimate-production-pair .estimate-work-table th:last-child{width:7%}
.estimate-production-pair table .icon-button{width:24px;min-width:0;padding:0}
@media(max-width:760px){.estimate-production-pair{grid-template-columns:minmax(0,1fr)}.estimate-production-pair .estimate-metal-table{min-width:600px}.estimate-production-pair .estimate-work-table{min-width:480px}}
.estimate-finishing-pair .estimate-glass-table .manual-name,.estimate-finishing-pair .estimate-glass-table .manual-price{width:100%;min-width:0;max-width:none}
.estimate-finishing-pair .estimate-glass-table th:nth-child(1){width:12%}
.estimate-finishing-pair .estimate-glass-table th:nth-child(2){width:19%}
.estimate-finishing-pair .estimate-glass-table th:nth-child(3){width:18%}
.estimate-finishing-pair .estimate-glass-table th:nth-child(4){width:9%}
.estimate-finishing-pair .estimate-glass-table th:nth-child(5){width:12%}
.estimate-finishing-pair .estimate-glass-table th:nth-child(6){width:12%}
.estimate-finishing-pair .estimate-glass-table th:nth-child(7){width:11%}
.estimate-finishing-pair .estimate-glass-table th:last-child{width:7%}
.estimate-finishing-pair .glass-canvas{display:grid;grid-template-columns:minmax(0,1fr);gap:4px}
.estimate-finishing-pair .glass-canvas>span{display:none}
.estimate-finishing-pair .glass-canvas input{width:100%;min-width:0}
.estimate-finishing-pair .estimate-paint>.estimate-metal-total{margin-top:0}
.estimate-finishing-pair .estimate-paint>.paint-order-total,.estimate-finishing-pair .glass-totals{margin-top:auto}
.estimate-finishing-pair .glass-totals{align-items:flex-start;flex-direction:column;gap:6px}
.estimate-finishing-pair .glass-totals>span:last-child strong{margin-left:8px;font-size:16px}
.estimate-finishing-pair .service-controls{gap:8px}
.estimate-finishing-pair .service-controls label{min-width:0;flex:1 1 150px}
@media(max-width:760px){.estimate-finishing-pair .estimate-glass-table{min-width:750px}}
/* Common dimensions and alignment for the order editor. */
@media screen {
  #app.estimate-screen{--control-height:32px;--row-action-size:28px;--section-gap:12px;--section-border:2px solid #82998b;--section-radius:8px}
  #app.estimate-screen .btn{min-height:var(--control-height);height:auto;padding:6px 10px;font-size:13px;line-height:18px;border-radius:6px;box-sizing:border-box}
  #app.estimate-screen .icon-button{width:32px;height:32px;min-height:32px;flex-shrink:0;padding:0;border-radius:6px}
  #app.estimate-screen input:not([type=checkbox]):not([type=color]),#app.estimate-screen select{height:var(--control-height);min-height:var(--control-height);padding:5px 7px;font-size:13px;line-height:20px;border-radius:6px;box-sizing:border-box}
  #app.estimate-screen select{padding-right:22px}
  #app.estimate-screen input[type=checkbox]{width:16px;height:16px;min-width:16px;min-height:16px;margin:0}
  #app.estimate-screen [data-completion-section]{border:var(--section-border);border-radius:var(--section-radius)}
  #app.estimate-screen .section-titlebar{display:grid;grid-template-columns:minmax(0,1fr) max-content max-content max-content;align-items:center;gap:6px 8px;min-height:52px;padding:9px 12px;margin:0;box-sizing:border-box}
  #app.estimate-screen .section-titlebar>h1,#app.estimate-screen .section-titlebar>h2,#app.estimate-screen .section-titlebar>h3{grid-column:1;grid-row:1;min-width:0;margin:0;line-height:1.3}
  #app.estimate-screen .section-titlebar>.btn,#app.estimate-screen .section-titlebar>.buttons{grid-column:2;grid-row:1;margin:0;justify-content:flex-start}
  #app.estimate-screen .section-titlebar>.section-completion-control{grid-column:3;grid-row:1;justify-self:end;display:flex;align-items:center;min-height:32px;margin:0;gap:6px;white-space:nowrap;font-size:11px}
  #app.estimate-screen .section-titlebar>.section-collapse-toggle{grid-column:4;grid-row:1;width:28px;height:32px;min-height:32px}
  #app.estimate-screen .service-section>.section-titlebar,#app.estimate-screen .estimate-product>.section-titlebar{padding:0 0 8px;min-height:40px}
  #app.estimate-screen .section-collapsed>.section-titlebar{display:flex;min-height:46px;padding:7px 12px;gap:8px}
  #app.estimate-screen .section-collapsed>.section-titlebar>.section-completion-control{margin-left:auto}
  #app.estimate-screen .section-collapsed>.section-titlebar h1,#app.estimate-screen .section-collapsed>.section-titlebar h2,#app.estimate-screen .section-collapsed>.section-titlebar h3,#app.estimate-screen .section-collapsed-total{font-size:15px}
  #app.estimate-screen .services-grid{gap:var(--section-gap);padding:12px}
  #app.estimate-screen .services-grid>.service-section{margin:0;padding:12px;min-width:0;display:flex;flex-direction:column;border:var(--section-border);border-radius:var(--section-radius)}
  #app.estimate-screen .services-grid>.service-section>.service-subtotal{margin-top:auto}
  #app.estimate-screen .service-controls{gap:8px 10px;margin:8px 0;align-items:flex-end}
  #app.estimate-screen .service-controls>label:not(.service-check){min-width:0;flex:0 1 auto}
  #app.estimate-screen .service-controls input:not([type=checkbox]){width:110px;max-width:100%;text-align:right;font-variant-numeric:tabular-nums}
  #app.estimate-screen .service-controls input[data-field=travel-visits],#app.estimate-screen .service-controls input[data-field=paint-delivery-visits],#app.estimate-screen .service-controls input[data-field=delivery-lift-floor],#app.estimate-screen .service-controls input[data-field=delivery-lift-parts]{width:72px}
  #app.estimate-screen .service-controls input[data-field=travel-km],#app.estimate-screen .service-controls input[data-field=measurement-km]{width:90px}
  #app.estimate-screen .service-check{min-height:32px;gap:6px;align-items:center}
  #app.estimate-screen .service-add{gap:8px;align-items:center}
  #app.estimate-screen .service-add select{min-width:0;max-width:520px;flex:1 1 220px}
  #app.estimate-screen .estimate-data-table{width:100%;min-width:0;table-layout:auto;font-size:13px;font-variant-numeric:tabular-nums;border-collapse:collapse}
  #app.estimate-screen .estimate-data-table th,#app.estimate-screen .estimate-data-table td{padding:6px 4px;vertical-align:middle;line-height:1.35}
  #app.estimate-screen .estimate-data-table th{height:42px;font-size:11px;font-weight:600;overflow-wrap:normal}
  #app.estimate-screen .estimate-data-table .cell-code{width:calc(var(--code-ch,5)*1ch + 10px);text-align:left}
  #app.estimate-screen .estimate-data-table .cell-name{width:auto;min-width:90px;text-align:left;overflow-wrap:anywhere}
  #app.estimate-screen .estimate-data-table .cell-quantity{width:calc(var(--quantity-ch,5)*1ch + 16px);text-align:right}
  #app.estimate-screen .estimate-data-table .cell-unit{width:calc(var(--unit-ch,5)*1ch + 28px);text-align:center}
  #app.estimate-screen .estimate-data-table .cell-price{width:calc(var(--price-ch,7)*1ch + 18px);text-align:right}
  #app.estimate-screen .estimate-data-table .cell-amount{width:calc(var(--amount-ch,8)*1ch + 12px);text-align:right;white-space:nowrap;font-weight:600}
  #app.estimate-screen .estimate-data-table .cell-actions{width:36px;min-width:36px;text-align:center}
  #app.estimate-screen .estimate-data-table input,#app.estimate-screen .estimate-data-table select{width:100%;min-width:0;max-width:none;margin:0;padding:5px 4px;box-sizing:border-box}
  #app.estimate-screen .estimate-data-table .cell-quantity input,#app.estimate-screen .estimate-data-table .cell-price input,#app.estimate-screen .estimate-data-table .cell-size input{text-align:right}
  #app.estimate-screen .estimate-data-table .cell-unit input,#app.estimate-screen .estimate-data-table .cell-unit select{text-align:center;text-align-last:center}
  #app.estimate-screen .estimate-data-table .cell-unit select{padding:5px 18px 5px 5px;text-align:left;text-align-last:left}
  #app.estimate-screen .estimate-data-table:not(.estimate-glass-table) .cell-unit select{min-width:62px}
  #app.estimate-screen .estimate-data-table:not(.estimate-glass-table) .cell-price input{min-width:calc(var(--price-ch,7)*1ch + 14px)}
  #app.estimate-screen .estimate-data-table .icon-button{width:var(--row-action-size);height:var(--row-action-size);min-height:var(--row-action-size);font-size:18px}
  #app.estimate-screen textarea.compact-name{display:block;width:min(100%,calc(var(--name-ch,24)*1ch + 14px));min-width:0;max-width:100%;min-height:32px;max-height:96px;resize:none;overflow:auto;margin:0;padding:5px 6px;box-sizing:border-box;font-family:inherit;font-size:13px;line-height:20px;border-radius:6px}
  #app.estimate-screen .estimate-data-table .article{font-size:11px;overflow-wrap:normal;word-break:normal}
  #app.estimate-screen .estimate-glass-table{table-layout:fixed;min-width:540px}
  #app.estimate-screen .estimate-glass-table .cell-code{width:9%}
  #app.estimate-screen .estimate-glass-table .cell-name{width:auto;min-width:0}
  #app.estimate-screen .estimate-glass-table .cell-size{width:136px;text-align:center}
  #app.estimate-screen .estimate-glass-table .glass-canvas{display:grid;grid-template-columns:calc(5ch + 18px) 10px calc(5ch + 18px);justify-content:center;align-items:center;gap:4px;font-size:13px;font-variant-numeric:tabular-nums}
  #app.estimate-screen .estimate-glass-table .glass-canvas>span{display:block}
  #app.estimate-screen .estimate-glass-table .glass-canvas input{width:100%;min-width:0;font-variant-numeric:tabular-nums}
  #app.estimate-screen .estimate-glass-table .cell-quantity{width:8%}
  #app.estimate-screen .estimate-glass-table .cell-area{width:10%;text-align:right}
  #app.estimate-screen .estimate-glass-table .cell-price{width:11%}
  #app.estimate-screen .estimate-glass-table .cell-amount{width:12%;white-space:normal}
  #app.estimate-screen .estimate-glass-table .cell-actions{width:7%;min-width:0}
  #app.estimate-screen .estimate-metal-total,#app.estimate-screen .glass-totals{min-height:44px;padding:10px 12px;gap:8px;box-sizing:border-box;font-size:13px}
  #app.estimate-screen .estimate-metal-total strong,#app.estimate-screen .glass-totals strong,#app.estimate-screen .service-subtotal b{font-size:16px;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap}
  #app.estimate-screen .service-subtotal{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:10px 0 0;min-height:34px;font-size:13px}
  #app.estimate-screen .section-metric{display:flex;justify-content:space-between;align-items:baseline;width:100%;gap:10px}
  #app.estimate-screen .section-metric>span:last-child{text-align:right;white-space:nowrap}
  #app.estimate-screen .section-metric>b{white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums}
  #app.estimate-screen .service-install-summary .section-metric{margin:0;padding:8px 0;border-bottom:1px solid #d9e1db;max-width:680px}
  #app.estimate-screen .service-install-summary .installation-grand-total{border-bottom:0;font-size:15px;font-weight:650;padding-top:12px}
  #app.estimate-screen .estimate-size label{width:100px;flex:0 1 100px}
  #app.estimate-screen .estimate-size input{text-align:right}
  #app.estimate-screen .estimate-product-fields>.product-ral{flex-basis:104px;max-width:112px;min-width:90px}
  #app.estimate-screen [data-field=paint-ral]{text-align:center}
}
@supports(field-sizing:content){
  #app.estimate-screen textarea.compact-name{field-sizing:content;height:auto!important}
  .catalog-table textarea.catalog-proposal-input{field-sizing:content;height:auto!important}
}
@media screen and (min-width:761px) and (max-width:1100px){
  #app.estimate-screen .estimate-production-pair,#app.estimate-screen .services-grid{grid-template-columns:minmax(0,1fr)}
}
@media screen and (max-width:760px){
  #app.estimate-screen .section-titlebar{grid-template-columns:minmax(0,1fr) max-content;row-gap:8px}
  #app.estimate-screen .section-titlebar>.btn,#app.estimate-screen .section-titlebar>.buttons{grid-column:1;grid-row:2}
  #app.estimate-screen .section-titlebar>.section-completion-control{grid-column:2;grid-row:1}
  #app.estimate-screen .section-titlebar>.section-collapse-toggle{grid-column:2;grid-row:2;justify-self:end}
  #app.estimate-screen .section-collapsed>.section-titlebar{display:flex;flex-wrap:wrap}
  #app.estimate-screen .estimate-data-table{min-width:560px}
  #app.estimate-screen .estimate-glass-table{min-width:700px}
  #app.estimate-screen .estimate-size label{flex:1;min-width:0;width:auto}
  #app.estimate-screen .service-add select{flex-basis:180px}
}
/* Order data and the active product share one row below the action bar. */
@media screen {
  #app.estimate-screen .estimate-toolbar{position:sticky;top:8px;z-index:16;display:grid;gap:8px;padding:10px;background:var(--paper);border:1px solid #b9c8bd;border-radius:8px;box-shadow:0 3px 10px #20362b12;margin-bottom:12px}
  #app.estimate-screen .estimate-toolbar-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
  #app.estimate-screen .estimate-toolbar-actions>.buttons{gap:6px}
  #app.estimate-screen .estimate-save-controls{position:static;display:flex;flex-direction:row;flex:0 1 300px;min-height:36px;gap:10px;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
  #app.estimate-screen .estimate-save-state{flex:1;min-width:0;text-align:left}
  #app.estimate-screen .estimate-save-controls .btn{width:auto;white-space:nowrap}
  #app.estimate-screen .estimate-positions{margin:0;gap:6px;align-items:center}
  #app.estimate-screen .estimate-details-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:12px;margin-bottom:12px}
  #app.estimate-screen .estimate-details-pair>.panel{min-width:0;margin:0;padding:14px;border:var(--section-border);border-radius:var(--section-radius)}
  #app.estimate-screen .estimate-details-pair>.section-collapsed{align-self:start}
  #app.estimate-screen .estimate-details-pair .order-card-heading{min-height:50px;align-items:flex-start;margin:0 0 10px;box-sizing:border-box}
  #app.estimate-screen .estimate-details-pair .estimate-product>.section-titlebar{min-height:50px;align-items:start}
  #app.estimate-screen .estimate-details-pair .order-card-heading h2,#app.estimate-screen .estimate-details-pair .estimate-product-heading h1{font-size:18px;line-height:1.3}
  #app.estimate-screen .estimate-details-pair .order-card-heading small{font-size:11px}
  #app.estimate-screen .estimate-details-pair .order-customer-grid{grid-template-columns:minmax(185px,1fr) minmax(0,1.2fr);gap:10px}
  #app.estimate-screen .estimate-details-pair .order-customer-grid label{font-size:13px}
  #app.estimate-screen .estimate-details-pair .order-customer-grid .customer-address{grid-column:auto}
  #app.estimate-screen .estimate-details-pair .estimate-product-fields{gap:10px;margin-top:10px}
  #app.estimate-screen .estimate-details-pair .estimate-product-selectors{flex:1 0 100%;max-width:none;min-width:0;flex-wrap:nowrap}
  #app.estimate-screen .estimate-details-pair .estimate-product-selectors>label:first-child{flex:1;min-width:0}
  #app.estimate-screen .estimate-details-pair .product-tier{flex:0 0 115px}
  #app.estimate-screen .estimate-details-pair .estimate-size{flex:0 1 auto;gap:5px;min-width:0}
  #app.estimate-screen .estimate-details-pair .estimate-size label{width:92px;flex:0 1 92px;min-width:0;white-space:nowrap}
  #app.estimate-screen .estimate-details-pair .product-ral{flex:0 1 96px;min-width:86px}
  #app.estimate-screen .estimate-details-pair .estimate-service-switches{gap:4px 14px;margin:6px 0 0;padding-top:6px;border-top:1px solid #dce4df}
  #app.estimate-screen:has(.estimate-save-controls){padding-bottom:24px}
}
@media screen and (max-width:1100px){
  #app.estimate-screen .estimate-details-pair{grid-template-columns:minmax(0,1fr)}
}
@media screen and (max-width:700px){
  #app.estimate-screen .estimate-toolbar{top:4px;padding:8px}
  #app.estimate-screen .estimate-toolbar-actions{gap:8px}
  #app.estimate-screen .estimate-toolbar-actions>.buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  #app.estimate-screen .estimate-save-controls{order:-1;flex:1 0 100%;justify-content:space-between;width:100%;margin:0}
  #app.estimate-screen .estimate-positions{flex-wrap:nowrap;overflow-x:auto;padding-bottom:3px}
  #app.estimate-screen .estimate-positions>.btn{flex:0 0 auto;white-space:nowrap}
  #app.estimate-screen .estimate-details-pair .order-customer-grid{grid-template-columns:minmax(0,1fr)}
  #app.estimate-screen .estimate-details-pair .estimate-size{flex:1 1 100%}
  #app.estimate-screen .estimate-details-pair .estimate-size label{flex:1;width:auto}
}
.catalog-v2 .catalog-weight{width:110px;min-width:100px}
.catalog-v2 .catalog-weight input{width:100%;min-width:0;text-align:right}
.catalog-v2 .catalog-weight small{display:block;margin-top:3px;color:var(--muted,#62736a);font-size:11px}
.materials-summary{margin:10px 0;padding:10px 12px;border:1px solid #b5c6bc;border-radius:6px;background:#f6f9f7;font-size:13px;font-variant-numeric:tabular-nums}
.materials-summary>div{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:baseline;padding:3px 0}
.materials-summary>div>span{min-width:74px}
.materials-summary>div>b{font-weight:500}
.materials-summary>div>strong{margin-left:auto}
.materials-summary .materials-weight-total{border-top:1px solid #d2ddd6;margin-top:5px;padding-top:7px;font-weight:700}
.weight-warning{margin:6px 0 0;color:#805111;font-size:12px;line-height:1.4}
#app.estimate-screen .estimate-data-table.has-weights{table-layout:auto;min-width:580px}
#app.estimate-screen .estimate-glass-table.has-weights{min-width:680px}
#app.estimate-screen .estimate-data-table.has-weights th{width:auto}
#app.estimate-screen .estimate-data-table.has-weights .cell-name{min-width:110px}
#app.estimate-screen .estimate-data-table.has-weights .cell-weight{width:72px;min-width:62px;text-align:right;white-space:nowrap}
#app.estimate-screen .estimate-glass-table.has-weights .cell-size{width:136px;min-width:136px}
#app.estimate-screen .estimate-data-table.has-weights .cell-actions{width:32px;min-width:32px}

.manual-weight-editor{margin-top:4px;font-size:12px}
.manual-weight-editor summary{cursor:pointer;color:#536e60}
.paint-delivery-row,.metal-delivery-row{background:#f1f6f2}
.shared-row-note{display:block;font-size:11px;line-height:1.35;color:var(--muted)}
.manual-weight-editor label{display:flex;align-items:center;gap:6px;margin:6px 0 0}
#app.estimate-screen .manual-weight-editor input{width:76px;flex:0 0 76px;text-align:right}

/* Compact estimate sections: totals stay with their titles in every state. */
@media screen {
  #app.estimate-screen{--section-gap:8px}
  #app.estimate-screen .estimate-production-pair{gap:8px;margin:8px 0;align-items:stretch}
  #app.estimate-screen .section-titlebar{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;min-height:42px;padding:5px 10px}
  #app.estimate-screen .section-heading-label{display:flex;flex:1 1 auto;align-items:baseline;flex-wrap:wrap;gap:3px 10px;min-width:0}
  #app.estimate-screen .section-heading-label h1,#app.estimate-screen .section-heading-label h2,#app.estimate-screen .section-heading-label h3{flex:0 1 auto;margin:0;line-height:1.3;font-size:15px}
  #app.estimate-screen .section-heading-total{display:inline-block;font-size:15px;font-weight:700;line-height:1.3;white-space:nowrap;font-variant-numeric:tabular-nums;color:inherit}
  #app.estimate-screen .section-titlebar>.section-completion-control{min-height:30px;gap:5px;margin:0;font-size:11px}
  #app.estimate-screen .section-titlebar>.btn,#app.estimate-screen .section-titlebar>.buttons{margin:0;flex:0 0 auto}
  #app.estimate-screen .section-titlebar>.section-add-button{width:30px;min-height:30px;height:30px;padding:0;font-size:22px;line-height:28px;text-align:center}
  #app.estimate-screen .section-titlebar>.section-collapse-toggle{width:28px;height:30px;min-height:30px}
  #app.estimate-screen .section-collapsed>.section-titlebar{min-height:42px;padding:5px 10px}
  #app.estimate-screen .section-collapsed>.section-titlebar>.section-heading-label{display:flex!important}
  #app.estimate-screen .estimate-data-table th{height:30px;padding:4px 5px}
  #app.estimate-screen .estimate-data-table td{padding:4px 5px}
  #app.estimate-screen .estimate-metal-empty{height:auto;padding:12px 10px}
  #app.estimate-screen .estimate-metal-total,#app.estimate-screen .glass-totals{min-height:32px;margin-top:0;padding:6px 10px;gap:6px 16px}
  #app.estimate-screen .glass-totals{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;justify-content:space-between}
  #app.estimate-screen .glass-totals .section-metric{width:auto;gap:8px}
  #app.estimate-screen .glass-totals strong{font-size:13px}
  #app.estimate-screen .section-detail{padding:5px 10px;font-size:12px;line-height:1.4}
  #app.estimate-screen .paint-item-total{background:#f6f9f7;text-align:right}
  #app.estimate-screen .glass-help,#app.estimate-screen .glass-warning,#app.estimate-screen .weight-warning{margin:6px 10px;font-size:12px}
  #app.estimate-screen .service-section>.section-titlebar,#app.estimate-screen .estimate-product>.section-titlebar{min-height:32px;padding:0 0 5px}
  #app.estimate-screen .services-grid{gap:8px;padding:8px;align-items:stretch}
  #app.estimate-screen .services-grid>.service-section{padding:8px}
  #app.estimate-screen .service-controls{gap:6px 10px;margin:6px 0}
  #app.estimate-screen .service-add{gap:6px;margin:6px 0}
  #app.estimate-screen .estimate-materials-delivery>.service-add,#app.estimate-screen .estimate-materials-delivery>.field-help,#app.estimate-screen .materials-delivery-switch{margin:6px 10px}
  #app.estimate-screen .service-install-summary{padding:8px 10px}
  #app.estimate-screen .service-install-summary .section-metric{max-width:none;padding:4px 0;font-size:13px}
  #app.estimate-screen .estimate-laser{min-height:0}
  #app.estimate-screen .estimate-laser>.field-help{margin:6px 10px}
  #app.estimate-screen .estimate-details-pair{gap:8px;margin-bottom:8px}
  #app.estimate-screen .estimate-details-pair>.panel{padding:10px}
  #app.estimate-screen .estimate-details-pair .order-card-heading{min-height:32px;margin-bottom:6px}
  #app.estimate-screen .estimate-details-pair .estimate-product>.section-titlebar{min-height:32px;align-items:center}
  #app.estimate-screen .estimate-details-pair .order-card-heading h2,#app.estimate-screen .estimate-details-pair .estimate-product-heading h1{font-size:16px}
  #app.estimate-screen .estimate-details-pair .order-customer-grid{gap:6px 10px}
  #app.estimate-screen .estimate-details-pair .estimate-product-fields{gap:6px 10px;margin-top:6px}
  #app.estimate-screen .estimate-toolbar{gap:6px;padding:8px;margin-bottom:8px}
}
@media screen and (max-width:760px){
  #app.estimate-screen .section-heading-label{flex-basis:calc(100% - 120px)}
  #app.estimate-screen .section-heading-label h1,#app.estimate-screen .section-heading-label h2,#app.estimate-screen .section-heading-label h3,#app.estimate-screen .section-heading-total{font-size:14px}
  #app.estimate-screen .section-titlebar>.section-completion-control{margin-left:auto}
}
@media screen and (max-width:1450px){
  #app.estimate-screen .estimate-production-pair{grid-template-columns:minmax(0,1fr)}
}
@media print{
  .section-heading-label{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px}
  .section-heading-total{display:inline-block}
}

.product-images{margin-top:8px;border-top:1px solid #d5dfd8;padding-top:6px;font-size:13px}
.product-images summary{cursor:pointer;font-weight:600;margin-bottom:6px}
.product-image-list{display:grid;gap:6px;margin-top:6px}
.product-image-card{display:flex;align-items:center;gap:8px;padding:6px 0;border:0}
.product-image-card img{object-fit:contain;max-width:30%;background:transparent;border:0}
.product-image-card label{flex:1;min-width:0;font-size:12px}
.product-image-card textarea{width:100%;min-height:54px;box-sizing:border-box;resize:vertical;font:inherit}
.catalog-source-trigger{display:block;border:0;background:transparent;padding:0;font:inherit;text-decoration:underline;cursor:pointer;text-align:left}
.catalog-sources-editor{border:1px solid #bac8bd;border-radius:6px;padding:10px;margin:10px 0}.catalog-sources-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.catalog-source-row{display:grid;grid-template-columns:minmax(0,1fr) 135px 30px;gap:8px;align-items:end;margin-bottom:8px}.catalog-source-row label{min-width:0;margin:0}.catalog-source-row input{width:100%;min-width:0}.catalog-source-row .icon-button{height:34px}.source-card-table{width:100%;table-layout:fixed}.source-card-table th:last-child,.source-card-table td:last-child{width:145px;text-align:right;white-space:nowrap}.source-card-table a{overflow-wrap:anywhere}.source-reference-price{color:var(--muted,#64645e)}
@media(max-width:600px){.catalog-source-row{grid-template-columns:minmax(0,1fr) 100px 28px;gap:5px}.catalog-sources-heading{flex-wrap:wrap}.source-card-table th:last-child,.source-card-table td:last-child{width:110px}}
.source-card-table th:nth-child(2),.source-card-table td:nth-child(2){width:120px;text-align:right;white-space:nowrap}.source-card-table th:last-child,.source-card-table td:last-child{width:105px;text-align:right;white-space:nowrap}.source-card-table .source-open-button{white-space:nowrap;text-decoration:none}
@media(max-width:600px){.source-card-table th:nth-child(2),.source-card-table td:nth-child(2){width:90px}.source-card-table th:last-child,.source-card-table td:last-child{width:95px}}
.admin-tabs{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:12px}.admin-tabs .admin-tab{min-width:110px;min-height:36px}.admin-tabs .admin-tab.active{background:#283e31;border-color:#283e31;color:#fff}.admin-tab-panel{display:grid;gap:12px;outline:none}.admin-tab-panel[hidden]{display:none}.admin-tab-panel>.panel{margin:0}.admin-tab-panel .seal-settings{border-top:0}
@media(max-width:600px){.admin-tabs .admin-tab{flex:1 0 30%;min-width:90px}}

.hardware-dependencies{padding:10px 12px}.hardware-dependency-row{display:grid;grid-template-columns:135px minmax(0,1fr) 130px 28px;gap:12px;align-items:center;padding:8px 0;border-top:1px solid var(--border,#d6ded8)}.hardware-dependency-row label{display:grid;gap:4px}.hardware-dependency-row input{width:100%;min-width:0}.hardware-dependency-row>.icon-button{align-self:end;margin-bottom:3px}@media(max-width:600px){.hardware-dependency-row{grid-template-columns:minmax(0,1fr) 110px 28px}.hardware-dependency-row>label:first-child{grid-column:1/-1}}

.estimate-hardware-pair .estimate-metal-table th:nth-child(1){width:12%}
.estimate-hardware-pair .estimate-metal-table th:nth-child(2){width:32%}
.estimate-hardware-pair .estimate-metal-table th:nth-child(3){width:16%}
.estimate-hardware-pair .estimate-metal-table th:nth-child(4){width:8%}
.estimate-hardware-pair .estimate-metal-table th:nth-child(5),.estimate-hardware-pair .estimate-metal-table th:nth-child(6){width:13%}
.estimate-hardware-pair .estimate-metal-table th:last-child{width:6%}
@media screen and (min-width:1101px){#app.estimate-screen .estimate-hardware-pair,#app.estimate-screen .estimate-logistics-pair{grid-template-columns:repeat(2,minmax(0,1fr))}}

.estimate-logistics-pair .estimate-work-table .manual-name{width:100%;min-width:0;max-width:none}

.estimate-position-list{display:contents}
.toolbar-short-label{display:none}
@media screen and (max-width:700px){
  #app.estimate-screen .estimate-toolbar-actions>.buttons{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
  .estimate-toolbar .toolbar-wide-label{display:none}
  .estimate-toolbar .toolbar-short-label{display:inline}
  #app.estimate-screen .estimate-toolbar{grid-template-columns:minmax(0,1fr)}
  #app.estimate-screen .estimate-positions{min-width:0;overflow:visible;padding:0}
  .estimate-position-list{display:flex;gap:4px;min-width:0;flex:1;overflow-x:auto}
  .estimate-position-list .btn{flex:0 0 auto;white-space:nowrap}
  #app.estimate-screen .estimate-toolbar-actions>.buttons .btn{min-width:0;padding-inline:4px;white-space:nowrap}
}
/* Metal dimensions editor; the main estimate keeps its direct quantity input. */
.metal-quantity-control{display:flex;align-items:center;gap:3px}
.estimate-metal-table .metal-quantity-control input{flex:1;min-width:42px;width:58px}
.metal-quantity-control .metal-mini-button{flex:0 0 25px;width:25px;min-width:25px;height:28px;font-size:18px;border:1px solid var(--line);border-radius:4px}
.metal-mini-button.is-calculated{background:#e2efe6;color:#254d38;border-color:#789784}
.metal-mini-editor{min-width:520px}
.mini-controls{display:flex;align-items:end;gap:14px;margin-bottom:12px}
.mini-controls label{display:grid;gap:5px;font-size:13px}
.mini-controls [data-mini-count]{margin-left:auto;white-space:nowrap;font-size:12px;color:var(--muted)}
.mini-table-scroll{max-height:46vh;overflow:auto;border:1px solid var(--line);border-radius:5px;margin-bottom:9px}
.metal-mini-table{width:100%;border-collapse:collapse;font-size:14px}
.metal-mini-table th{position:sticky;top:0;background:#eef3ef;text-align:left;font-size:12px}
.metal-mini-table th,.metal-mini-table td{padding:7px 10px;border-bottom:1px solid var(--line)}
.metal-mini-table th:first-child{width:35px}.metal-mini-table th:last-child{width:35px}
.metal-mini-table input{width:110px;min-height:32px;text-align:right}
.metal-mini-table [data-mini-field=count]{width:85px}
.metal-mini-table output{display:block;min-width:85px;text-align:right}
.mini-totals{display:flex;justify-content:space-between;gap:16px;padding:12px 0;font-size:14px}
.mini-totals strong{white-space:nowrap}.metal-mini-editor .modal-footer{justify-content:flex-end}
.metal-mini-editor [data-mini-error]:empty{display:none}
