@media screen {
  body.erp-test-style {
    --ink:var(--aio-text); --muted:var(--aio-muted); --line:var(--aio-border);
    --panel:var(--aio-surface); --soft:var(--aio-raised); --accent:var(--aio-action);
    font-size:14px; background:var(--aio-bg); color:var(--aio-text);
  }
  body.erp-test-style :is(h3,.panel>.page-title h2) {font-size:17px;line-height:1.35;}
  body.erp-test-style :is(h4,legend) {font-size:15px;}
  /* Page landmarks reuse the destination colors; the sidebar is unchanged. */
  body.erp-test-style .section {--page-tone:var(--aio-info);}
  body.erp-test-style :is(#section-purchase,#section-planning) {--page-tone:#f3c56b;}
  body.erp-test-style :is(#section-orders,#section-profitability) {--page-tone:#80d0aa;}
  body.erp-test-style :is(#section-powder,#section-workshop-mode) {--page-tone:#f3a6c2;}
  body.erp-test-style #section-library {--page-tone:#9bd6d0;}
  body.erp-test-style :is(#section-tools,#section-tasks) {--page-tone:#c3b2ff;}
  body.erp-test-style :is(#section-archive,#section-settings) {--page-tone:var(--aio-muted);}
  body.erp-test-style .section>.page-title h2 {color:var(--page-tone);}
  body.erp-test-style .section .reference-box {background:var(--aio-info-bg);border-color:#3d5c71;}
  body.erp-test-style .section .reference-box :is(span,b,strong) {color:var(--aio-info);}
  body.erp-test-style .section .lab-order-link strong {color:var(--aio-info);}
  body.erp-test-style .section .lab-order-link:hover strong {text-decoration:underline;text-underline-offset:3px;}
  /* Buying and receiving use page accents without changing the sidebar or workflow. */
  body.erp-test-style :is(#section-purchase,#section-orders) .table-wrap thead th {
    background:color-mix(in srgb,var(--page-tone) 7%,var(--aio-surface));
    color:var(--page-tone);border-bottom-color:color-mix(in srgb,var(--page-tone) 35%,var(--aio-border));
  }
  body.erp-test-style #purchaseFamilyFilters [data-purchase-filter][aria-pressed=true] {
    background:var(--aio-warning-bg);color:var(--page-tone);border-color:#967b44;
    box-shadow:inset 0 -2px var(--page-tone);
  }
  body.erp-test-style #labCommerceSelection {color:var(--page-tone);font-weight:600;}
  body.erp-test-style #purchaseAllLinesBody tr:has([data-select-purchase-line]:checked)>td {
    background:#302b1e!important;
  }
  body.erp-test-style #orderEditPanel>.page-title>div:first-child {display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;}
  body.erp-test-style #orderEditPanel #orderEditTitle {margin:0;color:var(--page-tone);}
  body.erp-test-style #orderEditPanel .lab-commerce-status {margin:0;}
  body.erp-test-style #orderEditPanel .lab-commerce-stages [aria-selected=true] {
    background:var(--aio-success-bg)!important;color:var(--page-tone)!important;
    border-color:#609b7b!important;box-shadow:inset 0 -2px var(--page-tone);
  }
  body.erp-test-style #orderEditPanel .field:has(#orderSupplierInput)>label {color:var(--page-tone);}
  body.erp-test-style #orderEditPanel #orderSupplierInput {border-color:#609b7b;}
  body.erp-test-style #orderEditPanel .lab-commerce-affair {color:var(--aio-info);}
  body.erp-test-style #orderEditPanel .lab-commerce-amount b {color:var(--page-tone);font-variant-numeric:tabular-nums;}
  body.erp-test-style #orderEditPanel #labCommerceFooter {position:static;}
  body.erp-test-style #orderEditPanel .lab-commerce-product-detail:has(.order-price-warning:not(.hidden):not([hidden])) {
    display:grid;grid-template-columns:minmax(90px,1fr) minmax(0,2fr);align-items:center;
  }
  @media (max-width:700px) {
    body.erp-test-style #orderEditPanel .lab-commerce-product-detail:has(.order-price-warning:not(.hidden):not([hidden])) {grid-template-columns:minmax(0,1fr);}
  }
  body.erp-test-style #orderEditLinesBody .lab-receipt-badge.complete {color:var(--aio-success)!important;}
  body.erp-test-style #orderEditLinesBody .lab-receipt-badge.partial {color:var(--aio-warning)!important;}
  body.erp-test-style #orderEditLinesBody .lab-receipt-badge.waiting {color:var(--aio-danger)!important;}
  body.erp-test-style #orderEditLinesBody .lab-receipt-badge.draft {color:var(--aio-info)!important;}
  body.erp-test-style #orderEditLinesBody [data-receipt-state=partial] .lab-receipt-progress span:last-child b {color:var(--aio-warning);}
  body.erp-test-style :is(.small,label,.brand .subtitle,.nav-badge,.sync-status,.initials-badge,.kpi-card small,.lab-nav-group) {font-size:12px;}
  body.erp-test-style :is(small,.plasterer-layer-number,.plasterer-reference-system b),
  body.erp-test-style #labTriangleWorkspace .aio-tool-preview dt small {font-size:12px;}
  body.erp-test-style .nav-card .nav-button {--nav-tone:#bdc8d2;--lab-icon:var(--nav-tone);}
  body.erp-test-style .nav-card [data-section=dashboard] {--nav-tone:#9ac9ff;}
  body.erp-test-style .nav-card [data-section=profitability] {--nav-tone:#81d7b1;}
  body.erp-test-style .nav-card [data-section=folders] {--nav-tone:#86c4ff;}
  body.erp-test-style .nav-card [data-section=purchase] {--nav-tone:#f3c56b;}
  body.erp-test-style .nav-card [data-section=orders] {--nav-tone:#80d0aa;}
  body.erp-test-style .nav-card [data-section=workshop-mode] {--nav-tone:#f3a6c2;}
  body.erp-test-style .nav-card [data-section=planning] {--nav-tone:#edcb7a;}
  body.erp-test-style .nav-card [data-section=tasks] {--nav-tone:#bdb0ed;}
  body.erp-test-style .nav-card [data-section=powder] {--nav-tone:#f3a6c2;}
  body.erp-test-style .nav-card [data-section=library] {--nav-tone:#9bd6d0;}
  body.erp-test-style .nav-card [data-section=archive] {--nav-tone:#b7c4cf;}
  body.erp-test-style .nav-card>* {flex-shrink:0;}
  body.erp-test-style .nav-card #labToolsNav {--nav-tone:#c3b2ff;--lab-icon:var(--nav-tone);background:transparent;color:var(--aio-text);border-color:transparent;font-size:13px;font-weight:550;}
  body.erp-test-style .nav-card #labToolsNav .ico {color:var(--lab-icon);width:19px;height:19px;flex-basis:19px;}
  body.erp-test-style .nav-card .nav-button:hover {background:color-mix(in srgb,var(--nav-tone) 10%,var(--aio-bg));}
  body.erp-test-style .nav-card .nav-button.active,
  body.erp-test-style .nav-card #labToolsNav.active {--lab-icon:var(--nav-tone);color:var(--aio-text);font-weight:650;background:color-mix(in srgb,var(--nav-tone) 18%,var(--aio-bg));border-color:color-mix(in srgb,var(--nav-tone) 32%,var(--aio-border));box-shadow:inset 3px 0 var(--nav-tone);}
  body.erp-test-style .nav-card .nav-button.lab-menu-drop-before {box-shadow:0 -3px 0 var(--aio-focus);}
  body.erp-test-style .nav-card .nav-button.lab-menu-drop-after {box-shadow:0 3px 0 var(--aio-focus);}
  body.erp-test-style .brand img {object-fit:contain;background:transparent;}
  body.erp-test-style :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible {outline:2px solid var(--aio-focus);outline-offset:3px;}
  body.erp-test-style .btn {min-height:var(--aio-control);font-size:13px;border-radius:var(--aio-radius);}
  body.erp-test-style .btn:not(.secondary):not(.danger):not(.lab-archive-action) {background:var(--aio-action);border-color:var(--aio-action);color:var(--aio-on-action);}
  body.erp-test-style .btn:not(.secondary):not(.danger):not(.lab-archive-action):hover {background:var(--aio-hover);}
  body.erp-test-style .btn.secondary {background:var(--aio-raised);color:var(--aio-text);border-color:var(--aio-border);}
  body.erp-test-style .btn.danger {background:var(--aio-danger-bg);color:var(--aio-danger);}
  body.erp-test-style :is(.btn.lab-archive-action,.lab-study-confirm-reset) {background:var(--aio-warning-bg);color:var(--aio-warning);}
  body.erp-test-style input::file-selector-button {background:var(--aio-raised);color:var(--aio-text);border:1px solid var(--aio-border);border-radius:var(--aio-radius);padding:8px 12px;margin-right:12px;cursor:pointer;}
  body.erp-test-style :is(input,select,textarea) {font-variant-numeric:tabular-nums;}
  body.erp-test-style :is(th,td) {border-left:0!important;border-right:0!important;font-variant-numeric:tabular-nums;}
  body.erp-test-style th {font-size:12px;background:var(--aio-raised);color:var(--aio-muted);}
  body.erp-test-style td {font-size:13px;}
  body.erp-test-style td :is(.btn,.small,.status-pill) {font-size:12px;}
  body.erp-test-style :is([data-order-field=quantity],[data-order-field=unitPrice],[data-order-field=totalPrice],[data-order-field=stockQuantity],[data-purchase-field=quantity],[data-purchase-field=unitPrice],[data-purchase-field=totalPrice]) {text-align:right;}
  body.erp-test-style :is(.affair-tabs,.lab-analysis-tabs,.lab-planning-navigation,.lab-analysis-spaces) {gap:4px;}
  body.erp-test-style :is(.affair-tab-button,.settings-tab-button,.lab-planning-navigation .btn,.lab-analysis-spaces .btn,#labAffairSubnav .btn) {
    background:transparent;color:var(--aio-muted);border:0;border-bottom:2px solid transparent;border-radius:0;box-shadow:none;min-height:40px;font-size:13px;padding:9px 12px;
  }
  body.erp-test-style :is(.affair-tab-button.active,.settings-tab-button.active,.lab-planning-navigation [aria-current=page],.lab-analysis-spaces [aria-pressed=true],#labAffairSubnav [aria-current=page]) {
    background:var(--aio-selected)!important;color:var(--aio-action)!important;border-color:var(--aio-action)!important;box-shadow:none;
  }
  body.erp-test-style .lab-analysis-spaces {border-bottom:1px solid var(--aio-border);margin-bottom:8px;}
  body.erp-test-style .kpi-card:nth-child(n) {border-color:var(--aio-border);border-top-color:var(--aio-border);background:var(--aio-surface);}
  body.erp-test-style .kpi-card b {font-size:24px;}
  body.erp-test-style #labSettingsContent {max-width:1000px;}
  body.erp-test-style #labSettingsContent .lab-install-grid .btn {width:auto;justify-self:start;}
  .lab-visual-summary {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border-block:1px solid var(--aio-border);margin:12px 0 0;padding:12px 0;gap:12px;}
  .lab-visual-summary>div {min-width:0;padding:0 12px;border-left:1px solid var(--aio-border);}
  .lab-visual-summary>div:first-child {padding-left:0;border-left:0;}
  .lab-visual-summary dt {font-size:12px;color:var(--aio-muted);margin-bottom:5px;}
  .lab-visual-summary dd {margin:0;overflow-wrap:anywhere;font-size:14px;font-weight:600;}
  .lab-visual-summary .btn {max-width:100%;}
  body.erp-test-style .lab-affair-spaces .lab-affair-sticky {background:var(--aio-bg);}
  body.erp-test-style .lab-affair-spaces #affairTabs {display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;scrollbar-width:thin;padding-block:6px 10px;}
  body.erp-test-style .lab-affair-spaces #affairTabs button {--space-tone:#86c4ff;display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:0 0 auto;white-space:nowrap;padding:9px 12px;min-height:44px;border:1px solid color-mix(in srgb,var(--space-tone) 36%,var(--aio-border));border-radius:6px;background:color-mix(in srgb,var(--space-tone) 8%,var(--aio-bg));color:var(--aio-text);cursor:pointer;font-weight:650;}
  body.erp-test-style .lab-affair-spaces #affairTabs [data-ux-affair-space=documents] {--space-tone:#c3b2ff;}
  body.erp-test-style .lab-affair-spaces #affairTabs [data-ux-affair-space=prepare] {--space-tone:#f3a6c2;}
  body.erp-test-style .lab-affair-spaces #affairTabs [data-ux-affair-space=purchasing] {--space-tone:#f3c56b;}
  body.erp-test-style .lab-affair-spaces #affairTabs [data-ux-affair-space=follow] {--space-tone:#80d0aa;}
  body.erp-test-style .lab-affair-spaces #affairTabs button .ico {color:var(--space-tone);width:18px;height:18px;flex:0 0 18px;background:none;border:0;}
  body.erp-test-style .lab-affair-spaces #affairTabs button .ico svg {width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
  body.erp-test-style .lab-affair-spaces #affairTabs button:hover {background:color-mix(in srgb,var(--space-tone) 17%,var(--aio-bg));}
  body.erp-test-style .lab-affair-spaces #affairTabs button[aria-selected=true] {background:color-mix(in srgb,var(--space-tone) 22%,var(--aio-bg))!important;color:var(--aio-text)!important;border-color:var(--space-tone)!important;box-shadow:inset 0 -3px 0 var(--space-tone);font-weight:650;}
  body.erp-test-style .lab-affair-spaces .lab-overview-facts {gap:12px;padding:12px 0;}
  body.erp-test-style .affair-real-days-box {background:var(--aio-surface);border-color:var(--aio-border);border-radius:var(--aio-radius);}
  body.erp-test-style #affairDocumentsBody [data-lab-document-open] {text-align:left;justify-content:flex-start;background:transparent;border-color:transparent;font-size:14px;color:var(--aio-info);}
  body.erp-test-style #affairDocumentsBody [data-lab-document-open]:hover {text-decoration:underline;background:var(--aio-raised);}
  body.erp-test-style #affairDocumentsPanel.lab-has-documents #affairDocumentDrop {min-height:64px;padding:10px 12px;}
  .lab-setup-progress {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));list-style:none;padding:0;margin:16px 0 20px;gap:8px;}
  .lab-setup-progress li {border-top:3px solid var(--aio-border);padding-top:8px;font-size:12px;color:var(--aio-muted);}
  .lab-setup-progress [aria-current=step] {border-color:var(--aio-action);color:var(--aio-text);font-weight:650;}
  .lab-setup-progress .is-complete {border-color:var(--aio-success);}
  .lab-rank-meter {grid-column:1/-1;width:100%;height:7px;accent-color:var(--aio-action);}
  .lab-rank-meter::-webkit-meter-bar {background:var(--aio-raised);border:0;}
  .lab-rank-meter::-webkit-meter-optimum-value {background:var(--aio-action);}
  .lab-analysis-ranking li {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;padding:10px 0;}
  .lab-analysis-ranking li>span {overflow-wrap:anywhere;}
  .lab-design-incomplete {border-left:3px solid var(--aio-warning);background:var(--aio-warning-bg);color:var(--aio-warning);padding:10px 12px;margin:12px 0;}
  .lab-month-chart {display:grid;gap:12px;margin:16px 0;}
  .lab-month-chart>div {display:grid;grid-template-columns:minmax(100px,1fr) minmax(0,3fr);gap:6px 12px;align-items:center;}
  .lab-month-chart label {display:flex;justify-content:space-between;gap:12px;}
  .lab-month-chart meter {width:100%;height:10px;}
  .lab-month-chart meter::-webkit-meter-bar {background:var(--aio-raised);border:0;}
  .lab-month-chart meter::-webkit-meter-optimum-value {background:var(--aio-info);}
  .lab-month-chart .lab-cost-meter::-webkit-meter-optimum-value {background:var(--aio-warning);}
  .lab-month-chart .lab-margin-meter::-webkit-meter-optimum-value {background:var(--aio-success);}
  body.erp-test-style .lab-study-results {background:var(--aio-surface);border-color:var(--aio-border);}
  body.erp-test-style .lab-study-results summary {font-size:14px;}
  body.erp-test-style .affaireio-publisher {font-size:12px!important;color:var(--aio-muted)!important;}
}
@media screen and (max-width:800px) {
  body.erp-test-style .btn {min-height:44px;}
  body.erp-test-style #labSettingsContent .btn,
  body.erp-test-style #labCompanySetup .btn,
  body.erp-test-style #labRolesBody button {min-height:44px;}
  body.erp-test-style #labSettingsContent #labRolesBody button {min-width:44px;}
  body.erp-test-style :is(input,select,textarea) {font-size:16px;}
  .lab-visual-summary {grid-template-columns:repeat(2,minmax(0,1fr));}
  .lab-visual-summary>div:nth-child(odd) {border-left:0;padding-left:0;}
  body.erp-test-style .lab-affair-header .toolbar {display:flex;flex-wrap:wrap;justify-content:flex-start;}
  body.erp-test-style .lab-affair-spaces .lab-affair-sticky {position:static;}
  .lab-setup-progress {grid-template-columns:repeat(2,minmax(0,1fr));}
  .lab-month-chart>div {grid-template-columns:minmax(0,1fr);}
}
@media screen and (max-width:760px) {
  body.erp-test-style table:has(#labRolesBody),body.erp-test-style #labRolesBody {display:block;width:100%!important;min-width:0!important;}
  table:has(#labRolesBody) thead {display:none;}
  body.erp-test-style #labRolesBody tr {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-bottom:1px solid var(--aio-border);padding:8px;}
  body.erp-test-style #labRolesBody td {min-width:0!important;max-width:none!important;width:auto!important;border:0;white-space:normal;overflow-wrap:anywhere;}
  #labRolesBody td:before {content:attr(data-role-label);display:block;color:var(--aio-muted);font-size:12px;margin-bottom:6px;}
  #labRolesBody td:last-child {grid-column:1/-1;}
  #labRolesBody td:last-child .btn {min-width:44px;min-height:44px;}
}
