/* Light-theme colour contract. Text uses >=4.5:1; control/focus boundaries
   use >=3:1. --color-divider is decorative, never a control boundary.
   Semantic state text remains visible beside its colour treatment. */
:root{
 color-scheme:light;
 --color-canvas:#f6f5f0;
 --color-surface:#ffffff;
 --color-surface-subtle:#f1f3ec;
 --color-surface-raised:#fafaf6;
 --color-surface-hover:#eaf0e5;
 --color-surface-warm:#eee5d5;
 --color-text:#253b32;
 --color-text-muted:#53614f;
 --color-text-subtle:#65705e;
 --color-text-warm:#6b552f;
 --color-control-border:#778472;
 --color-border:var(--color-control-border);
 --color-divider:#d6ddd2;
 --color-brand:#285e47;
 --color-brand-hover:#1f4d38;
 --color-brand-strong:#203b2e;
 --color-on-brand:#ffffff;
 --color-inverse-text:#f7f5e9;
 --color-inverse-muted:#d3dec8;
 --color-focus:#1d62a2;
 --color-focus-halo:#ffffff;
 --color-selected-bg:#e4eee0;
 --color-selected-border:#285e47;
 --color-info-text:#245d80;
 --color-info-bg:#eaf3f7;
 --color-info-border:#477a96;
 --color-success-text:#285e47;
 --color-success-bg:#e9f2e8;
 --color-success-border:#5d805c;
 --color-warning-text:#75531c;
 --color-warning-bg:#fff5df;
 --color-warning-border:#a17a31;
 --color-error-text:#9b3d2c;
 --color-error-bg:#fff0ea;
 --color-error-border:#b65a42;
 --color-disabled-text:#5e6a57;
 --color-disabled-bg:#edf0e9;
 --color-disabled-border:#778472;
 --color-pattern-light:#eeeae1;
 --color-pattern-dark:#e6e0d4;
 --color-chart-primary:#285e47;
 --color-chart-secondary:#b8caa8;
 --color-chart-track:#e8eee1;
 --color-chart-outline:#253b32;
 --color-overlay:rgba(24,39,30,.4);
 --color-shadow:rgba(20,38,23,.2);
 --color-shadow-soft:rgba(32,59,50,.08);
 --color-glass-surface:rgba(255,255,255,.94);
 --color-label-overlay:#ffffff;
 --color-auth-decoration:rgba(211,222,200,.14);
 --color-auth-decoration-soft:rgba(211,222,200,.04);
 --color-print-text:#000000;
 --color-print-border:#777777;
 --color-print-surface:#ffffff;
 /* Public design-system roles; semantic components keep their named roles. */
 --color-primary:var(--color-brand);
 --color-secondary:var(--color-text-muted);
 --color-accent:var(--color-info-text);
 --color-background:var(--color-canvas);
 /* Compatibility for existing components; new styles use semantic tokens. */
 --ink:var(--color-text);
 --muted:var(--color-text-muted);
 --line:var(--color-divider);
 --green:var(--color-brand);
 --pale:var(--color-selected-bg);
 --rust:var(--color-warning-text);
 --cream:var(--color-surface-subtle);
}


:root{font-family:Inter,'Segoe UI',Arial,sans-serif;color:var(--color-text);background:var(--color-canvas);font-size:14px;line-height:1.5}*{box-sizing:border-box}body{margin:0;background:var(--color-canvas);color:var(--color-text)}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:4px}button{cursor:pointer}button:disabled{opacity:1;cursor:wait}a{color:inherit;text-decoration:none}button{border:0}svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.initial{padding:25vh 20px;text-align:center;color:var(--muted)}.shell{display:grid;grid-template-columns:242px minmax(0,1fr);min-height:100vh}.sidebar{background:var(--color-surface);border-right:1px solid var(--line);padding:31px 19px;position:fixed;top:0;bottom:0;width:242px;display:flex;flex-direction:column;z-index:20}.brand{display:flex;gap:11px;align-items:center;padding:0 12px 31px}.brand-mark{width:33px;height:37px;background:var(--ink);color:var(--color-text-muted);border-radius:8px;display:grid;place-items:center}.brand-mark svg{width:22px;height:26px}.brand strong{font-family:Georgia,serif;font-weight:500;font-size:25px;letter-spacing:-1px}.brand small{display:block;font-size:14px;font-weight:600;letter-spacing:2.4px;color:var(--color-text-muted);margin-top:-2px}.nav-label{font-size:14px;letter-spacing:1.8px;color:var(--color-text-muted);padding:18px 15px 10px;font-weight:600}.nav-item{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:7px;color:var(--color-text-muted);margin:3px 0;font-size:14px}.nav-item:hover{background:var(--color-surface-hover);color:var(--ink)}.nav-item.active{background:var(--color-selected-bg);color:var(--color-brand);font-weight:600}.nav-count{margin-left:auto;background:var(--color-selected-bg);border-radius:5px;font-size:14px;padding:1px 7px}.sidebar-foot{margin-top:auto}.private-label{margin:16px 12px;color:var(--color-text-muted);font-size:14px;display:flex;gap:7px;align-items:center}.private-label svg{width:12px;height:12px}.profile{display:flex;align-items:center;gap:10px;border-top:1px solid var(--line);padding:21px 10px 0}.avatar{width:35px;height:35px;border-radius:50%;background:var(--color-surface-warm);color:var(--color-text-warm);display:grid;place-items:center;font-size:14px;font-weight:600}.profile strong{display:block;font-size:14px}.profile small{color:var(--muted);font-size:14px}.profile button{margin-left:auto;background:none;color:var(--color-text-muted)}.main{grid-column:2;min-width:0}.topbar{height:76px;border-bottom:1px solid var(--line);background:var(--color-glass-surface);display:flex;align-items:center;gap:16px;padding:0 38px}.breadcrumb{font-size:14px;color:var(--color-text-muted)}.breadcrumb span{color:var(--color-text-muted);margin-left:10px}.top-actions{margin-left:auto;display:flex;align-items:center;gap:16px}.top-actions select{border:0;background:none;color:var(--color-text-muted);font-size:14px;max-width:160px}.online{display:flex;align-items:center;gap:6px;color:var(--color-text-muted);font-size:14px}.dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--color-success-border)}.icon-btn{background:none;color:var(--color-text-muted);padding:7px;display:flex;gap:6px;align-items:center}.content{max-width:1600px;margin:auto;padding:32px 38px 48px}.eyebrow{display:flex;gap:8px;align-items:center;font-size:14px;letter-spacing:1.8px;font-weight:600;color:var(--color-text-muted);text-transform:uppercase;margin-bottom:10px}.page-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:26px}.page-heading h1{font-family:Georgia,serif;letter-spacing:-.8px;font-weight:400;font-size:32px;margin:0 0 7px;line-height:1.2}.page-heading p{margin:0;font-size:14px;color:var(--color-text-muted)}.button{display:inline-flex;gap:8px;align-items:center;justify-content:center;min-height:39px;padding:10px 16px;border-radius:6px;font-size:14px;font-weight:500;border:1px solid var(--color-control-border);background:var(--color-surface);color:var(--color-text-muted);white-space:nowrap}.button.primary{background:var(--color-brand);border-color:var(--color-brand);color:var(--color-surface)}.button.primary:hover{background:var(--color-brand-hover)}.button.danger{color:var(--color-error-text);border-color:var(--color-error-border)}.button.small{font-size:14px;min-height:32px;padding:7px 11px}.buttons{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:26px}.metric{display:block;background:var(--color-surface);border:1px solid var(--line);border-radius:9px;padding:19px 20px;position:relative;transition:.15s}.metric:hover{border-color:var(--color-control-border);transform:translateY(-2px)}.metric-top{display:flex;justify-content:space-between;align-items:center;color:var(--color-text-muted);font-size:14px}.metric-top svg{width:16px;color:var(--color-text-muted)}.metric strong{font-family:Georgia,serif;display:block;font-size:33px;font-weight:400;line-height:1.2;margin:15px 0 10px;color:var(--color-text)}.metric small{font-size:14px;color:var(--color-text-muted)}.metric .accent{color:var(--color-text-muted)}.metric .arrow{position:absolute;right:21px;bottom:20px;color:var(--color-text-muted)}.workbar{background:var(--color-selected-bg);border:1px solid var(--color-divider);border-radius:8px;display:flex;align-items:center;justify-content:space-between;padding:17px 20px;gap:15px;margin-bottom:28px}.workbar-title{display:flex;align-items:center;gap:11px;font-size:14px}.workbar-title svg{color:var(--color-text-muted)}.workbar small{display:block;color:var(--color-text-muted);font-size:14px;margin-top:3px}.chips{display:flex;gap:8px;flex-wrap:wrap}.chip{background:var(--color-surface);border:1px solid var(--color-divider);border-radius:5px;padding:6px 10px;font-size:14px;color:var(--color-text-muted);display:flex;align-items:center;gap:7px}.chip b{font-size:14px;color:var(--color-text-muted)}.chip.warn{color:var(--color-text-muted)}.panel{border:1px solid var(--line);border-radius:9px;background:var(--color-surface);overflow:hidden;margin-bottom:24px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:21px 22px;border-bottom:1px solid var(--line)}.panel-head h2{font-family:Georgia,serif;font-size:20px;font-weight:400;margin:0}.panel-head p{font-size:14px;color:var(--color-text-muted);margin:4px 0 0}.text-link{font-size:14px;color:var(--color-text-muted);display:flex;align-items:center;gap:6px}.text-link svg{width:13px}.tabs{display:flex;align-items:center;border-bottom:1px solid var(--line);padding:0 22px;gap:25px;overflow:auto}.tab{background:none;border-bottom:2px solid transparent;padding:14px 0 12px;font-size:14px;color:var(--color-text-muted);white-space:nowrap}.tab.active{color:var(--color-text-muted);border-bottom-color:var(--color-selected-border)}.tab span{font-size:14px;border-radius:4px;background:var(--color-selected-bg);padding:2px 5px;margin-left:4px}.table-toolbar{display:flex;align-items:center;justify-content:space-between;padding:15px 22px;gap:12px}.searchbox{display:flex;align-items:center;gap:9px;color:var(--color-text-muted);min-width:100px}.searchbox svg{width:15px;height:15px}.searchbox input{border:0;outline:none;font-size:14px;padding:5px 0;width:220px;background:none;color:var(--ink)}.table-toolbar .button{color:var(--color-text-muted);min-height:30px}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;text-align:left;white-space:nowrap}thead{background:var(--color-surface-raised);border-block:1px solid var(--color-divider)}th{font-size:14px;text-transform:uppercase;letter-spacing:.8px;color:var(--color-text-muted);font-weight:500;padding:12px 20px}td{padding:16px 20px;border-bottom:1px solid var(--color-divider);color:var(--color-text-muted);font-size:14px}tr:last-child td{border-bottom:0}tr.clickable{cursor:pointer}tr.clickable:hover{background:var(--color-surface-raised)}td strong{display:block;font-size:14px;font-weight:500;color:var(--color-text)}td small{display:block;color:var(--color-text-muted);font-size:14px;margin-top:3px}.product-cell{display:flex;gap:11px;align-items:center}.thumb{height:37px;width:35px;border-radius:5px;background:var(--color-surface-warm);display:grid;place-items:center;color:var(--color-text-muted);flex-shrink:0}.thumb svg{width:23px;height:26px}.thumb.home{background:var(--color-surface-subtle);color:var(--color-text-muted)}.thumb.bag{background:var(--color-surface-warm);color:var(--color-text-muted)}.badge{display:inline-flex;align-items:center;gap:5px;border-radius:4px;padding:4px 7px;font-size:14px;letter-spacing:.1px;background:var(--color-surface-subtle);color:var(--color-text-muted)}.badge:before{content:'';width:4px;height:4px;border-radius:50%;background:currentColor}.badge.assigned{background:var(--color-surface-subtle);color:var(--color-text-muted)}.badge.in-process{background:var(--color-warning-bg);color:var(--color-text-muted)}.badge.ready{background:var(--color-success-bg);color:var(--color-text-muted)}.badge.dispatch{background:var(--color-success-bg);color:var(--color-text-muted)}.badge.overdue{background:var(--color-error-bg);color:var(--color-text-muted)}.badge.pending{background:var(--color-warning-bg);color:var(--color-text-muted)}.date.overdue{color:var(--color-text-muted)}.pagination{border-top:1px solid var(--line);padding:15px 22px;display:flex;align-items:center;justify-content:space-between;color:var(--color-text-muted);font-size:14px}.pagination .buttons{gap:5px}.pagination button{background:var(--color-surface);color:var(--color-text-muted);border:1px solid var(--color-control-border);padding:5px 9px;border-radius:4px}.lower-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:22px}.lower-grid .panel{margin-bottom:0}.partner-row{padding:16px 22px;border-bottom:1px solid var(--color-divider);display:flex;align-items:center;gap:12px}.partner-row:last-child{border:0}.partner-avatar{width:31px;height:31px;display:grid;place-items:center;border-radius:7px;background:var(--color-surface-subtle);color:var(--color-text-muted);font-size:14px}.partner-row strong{font-size:14px;font-weight:500}.partner-row small{display:block;font-size:14px;color:var(--color-text-muted)}.partner-row .bar{height:4px;background:var(--color-surface-subtle);width:100px;border-radius:3px;overflow:hidden;margin-left:auto}.partner-row .bar span{display:block;height:100%;background:var(--color-chart-primary);border-radius:3px}.partner-row .count{font-size:14px;color:var(--color-text-muted);min-width:46px;text-align:right}.stock-summary{padding:24px}.stock-number{font-family:Georgia,serif;font-size:31px;color:var(--color-brand)}.stock-number small{font-family:'Segoe UI',sans-serif;font-size:14px;color:var(--color-text-muted)}.stackbar{display:flex;gap:3px;height:7px;border-radius:5px;overflow:hidden;margin:20px 0}.stackbar span{background:var(--color-chart-primary)}.stackbar span+span{background:var(--color-chart-secondary)}.legend{display:flex;justify-content:space-between;font-size:14px;color:var(--color-text-muted);margin:13px 0}.legend b{color:var(--color-text-muted);font-weight:500}.legend i{display:inline-block;height:6px;width:6px;background:var(--color-chart-primary);border-radius:50%;margin-right:7px}.legend i.light{background:var(--color-chart-secondary)}.footer-note{display:flex;justify-content:space-between;gap:10px;font-size:14px;color:var(--color-text-muted);padding-top:23px}.empty{text-align:center;padding:43px 20px;color:var(--color-text-muted)}.empty svg{width:28px;height:28px;margin-bottom:10px;color:var(--color-text-muted)}.empty h3{font-family:Georgia,serif;font-weight:400;font-size:21px;color:var(--color-text-muted);margin:0 0 7px}.empty p{font-size:14px;margin:0 auto 18px;max-width:380px}.notice{border:1px solid var(--color-warning-border);background:var(--color-warning-bg);border-radius:6px;padding:12px 16px;font-size:14px;color:var(--color-text-muted);margin-bottom:18px}.notice.error{border-color:var(--color-error-border);background:var(--color-error-bg);color:var(--color-error-text)}.catalogue-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.design-card{border:1px solid var(--line);background:var(--color-surface);border-radius:9px;overflow:hidden;cursor:pointer}.design-art{height:185px;background:repeating-linear-gradient(0deg,var(--color-pattern-light),var(--color-pattern-light) 2px,var(--color-pattern-dark) 2px,var(--color-pattern-dark) 3px);display:grid;place-items:center;color:var(--color-text-muted);position:relative}.design-art svg{height:110px;width:110px;stroke-width:.6}.design-art.home{background:var(--color-surface-subtle);color:var(--color-text-muted)}.design-art.bag{background:var(--color-surface-warm);color:var(--color-text-muted)}.design-art .design-id{position:absolute;left:15px;top:15px;background:var(--color-label-overlay);padding:4px 8px;border-radius:4px;font-size:14px}.design-info{padding:18px}.design-info h3{font-family:Georgia,serif;font-size:20px;font-weight:400;margin:0 0 7px}.design-info p{font-size:14px;color:var(--color-text-muted);margin:0}.detail-grid{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:24px}.detail-main .panel-body,.panel-body{padding:22px}.job-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.meta-label{font-size:14px;text-transform:uppercase;letter-spacing:1px;color:var(--color-text-muted);margin-bottom:7px}.meta-value{font-size:14px;color:var(--color-text)}.stage-track{display:flex;justify-content:space-between;gap:8px;margin:25px 0}.stage-step{font-size:14px;flex:1;color:var(--color-text-muted);border-top:3px solid var(--color-surface-subtle);padding-top:10px}.stage-step.done{border-color:var(--color-selected-border);color:var(--color-text-muted)}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}.field{min-width:0}.field.wide{grid-column:1/-1}label{display:block;font-size:14px;color:var(--color-text-muted);margin-bottom:6px}label small{color:var(--color-text-muted)}input,select,textarea{border:1px solid var(--color-control-border);border-radius:5px;padding:10px 11px;width:100%;color:var(--color-text);background:var(--color-surface);font-size:14px}input[type=checkbox]{width:auto}textarea{min-height:80px;resize:vertical}input:focus,select:focus,textarea:focus{border-color:var(--color-control-border);outline:2px solid var(--color-surface-subtle)}.hint{font-size:14px;color:var(--color-text-muted);margin-top:6px}.modal-backdrop{position:fixed;inset:0;background:var(--color-overlay);z-index:100;display:flex;align-items:center;justify-content:center;padding:25px;backdrop-filter:blur(3px)}.modal{background:var(--color-surface-raised);border-radius:12px;width:min(740px,100%);max-height:90vh;overflow:auto;box-shadow:0 20px 90px var(--color-shadow)}.modal-head{padding:24px 27px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--color-surface-raised);z-index:2}.modal-head h2{font-family:Georgia,serif;font-weight:400;font-size:25px;margin:0}.modal-head button{background:none;font-size:25px;color:var(--color-text-muted)}.modal form{padding:25px 27px}.modal-foot{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--line);padding-top:19px;margin-top:24px}.form-error{color:var(--color-error-text);font-size:14px;margin:10px 0}.line-card{padding:18px;border:1px solid var(--line);border-radius:7px;margin-top:18px;background:var(--color-surface)}.line-card h3{margin:0 0 15px;font-size:14px;font-weight:600}.subheading{font-family:Georgia,serif;font-size:19px;font-weight:400;border-top:1px solid var(--line);padding-top:18px;margin:24px 0 17px}.comment{border-bottom:1px solid var(--line);padding:15px 0}.comment:first-child{padding-top:0}.comment small{font-size:14px;color:var(--color-text-muted)}.comment p{font-size:14px;color:var(--color-text-muted);white-space:pre-wrap;margin:6px 0}.specs{display:grid;grid-template-columns:1fr 1fr;gap:18px}.spec{font-size:14px}.spec small{display:block;font-size:14px;color:var(--color-text-muted);margin-bottom:4px}.spec p{white-space:pre-wrap;margin:0;color:var(--color-text)}.spec.wide{grid-column:1/-1}.photo-grid{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.photo-grid img{width:100px;height:100px;object-fit:cover;border-radius:6px;border:1px solid var(--line)}.queue-nav{display:flex;align-items:center;gap:12px}.queue-nav a{display:flex;gap:6px;align-items:center;font-size:14px;color:var(--color-text-muted)}.queue-nav span{font-size:14px;color:var(--color-text-muted)}.queue-nav svg{width:14px}.auth-shell{min-height:100vh;display:grid;grid-template-columns:1fr 1fr;background:var(--color-surface-raised)}.auth-art{background:var(--color-brand-strong);color:var(--color-text-muted);padding:60px;display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden}.auth-art:after{content:'';position:absolute;width:800px;height:800px;right:-350px;bottom:-350px;border:1px solid var(--color-auth-decoration);border-radius:50%;box-shadow:0 0 0 60px var(--color-auth-decoration-soft),0 0 0 120px var(--color-auth-decoration-soft),0 0 0 180px var(--color-auth-decoration-soft),0 0 0 240px var(--color-auth-decoration-soft)}.auth-art .brand{padding:0}.auth-art .brand small{color:var(--color-text-muted)}.auth-art h1{font-family:Georgia,serif;font-size:48px;font-weight:400;line-height:1.15;max-width:440px;position:relative;z-index:1;letter-spacing:-1px}.auth-art p{max-width:330px;font-size:14px;color:var(--color-text-muted);line-height:1.9}.auth-art footer{font-size:14px;color:var(--color-text-muted);letter-spacing:1px}.auth-main{display:grid;place-items:center;padding:40px}.auth-form{width:100%;max-width:350px}.auth-form h2{font-family:Georgia,serif;font-size:32px;font-weight:400;margin:0 0 10px}.auth-form>p{font-size:14px;color:var(--color-text-muted);margin-bottom:30px}.auth-form .field{margin-bottom:18px}.auth-form .button{width:100%;margin-top:10px}.auth-form .hint{text-align:center;margin-top:22px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);padding:12px 22px;border-radius:7px;background:var(--color-brand);color:var(--color-surface);font-size:14px;z-index:300;display:none;box-shadow:0 5px 30px var(--color-shadow)}.mobile-menu{display:none}.skeleton{padding:60px;color:var(--color-text-muted);text-align:center}.print-only{display:none}.demo-banner{padding:7px 20px;text-align:center;background:var(--color-surface-subtle);color:var(--color-text-muted);font-size:14px}.check-list{display:grid;grid-template-columns:1fr 1fr;gap:10px}.check-list label{display:flex;gap:8px;align-items:center;font-size:14px}.json-editor{font-family:Consolas,monospace;font-size:14px;min-height:120px}.row-editor{display:grid;grid-template-columns:1fr 120px 30px;gap:8px;align-items:end;margin-top:10px}.template-row{display:grid;grid-template-columns:1fr 1fr 100px 100px;gap:10px;border-bottom:1px solid var(--line);padding:15px 0}.template-row .field-grid{grid-column:1/-1}.delete-row{background:none;color:var(--color-text-muted);font-size:20px}.summary-list{padding:10px 0}.summary-list>div{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding:12px 0;font-size:14px;color:var(--color-text-muted)}.summary-list>div:last-child{border:0}.file-list a{display:flex;gap:8px;padding:10px;border:1px solid var(--color-control-border);border-radius:5px;font-size:14px;margin-top:8px}.full-image{max-width:100%;max-height:70vh;object-fit:contain}.no-wrap{white-space:nowrap}
@media(min-width:1550px){.content{padding-top:40px}.metric{padding:24px}.metric strong{font-size:38px}}
@media(max-width:1150px){.shell{grid-template-columns:205px minmax(0,1fr)}.sidebar{width:205px;padding-inline:12px}.content{padding:25px}.topbar{padding:0 25px}.lower-grid{grid-template-columns:1fr 1fr}.metric-grid{gap:10px}.metric{padding:15px}.chips{gap:4px}.chip{padding:5px 7px}.detail-grid{grid-template-columns:1fr}.detail-aside{display:grid;grid-template-columns:1fr 1fr;gap:20px}.catalogue-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:800px){.shell{grid-template-columns:1fr}.sidebar{transform:translateX(-100%);transition:.2s;width:242px;box-shadow:0 0 50px var(--color-shadow)}.sidebar.open{transform:translateX(0)}.main{grid-column:1}.mobile-menu{display:flex}.topbar{height:62px;padding:0 15px;gap:8px}.breadcrumb{font-size:14px}.top-actions{gap:5px}.top-actions select{max-width:110px;font-size:14px}.online{display:none}.content{padding:25px 17px}.page-heading{align-items:flex-start;gap:10px}.page-heading h1{font-size:28px}.page-heading p{font-size:14px}.page-heading .button{padding:9px;font-size:14px}.metric-grid{grid-template-columns:1fr 1fr;gap:10px}.metric strong{font-size:29px}.metric small{font-size:14px}.metric .arrow{right:12px;bottom:14px}.workbar{align-items:flex-start;flex-direction:column;padding:14px}.lower-grid{grid-template-columns:1fr}.panel-head{padding:17px}.panel-head h2{font-size:18px}.tabs{padding:0 17px;gap:20px}.table-toolbar{padding:13px 17px}.searchbox input{width:160px}td,th{padding:14px}.footer-note{font-size:14px}.field-grid,.specs{grid-template-columns:1fr 1fr}.detail-aside{display:block}.modal-backdrop{padding:10px}.modal{max-height:95vh}.modal-head{padding:18px}.modal form{padding:18px}.job-meta{gap:13px}.auth-shell{grid-template-columns:1fr}.auth-art{padding:30px;min-height:230px}.auth-art h1{font-size:32px;margin:30px 0 0}.auth-art p,.auth-art footer{display:none}.auth-main{padding:35px}.auth-art:after{bottom:-650px}.template-row{grid-template-columns:1fr 1fr}.queue-nav{gap:7px}.queue-nav span{display:none}.catalogue-grid{gap:13px}.design-art{height:145px}.design-info h3{font-size:17px}}
@media(max-width:440px){.field-grid,.specs{grid-template-columns:1fr}.field.wide,.spec.wide{grid-column:auto}.top-actions .language{max-width:65px}.catalogue-grid{grid-template-columns:1fr}.page-heading{flex-wrap:wrap}.page-heading .buttons .button[data-action=export]{display:none}.check-list{grid-template-columns:1fr}.button,.icon-btn,.tab{min-height:44px}.nav-item{min-height:46px}.metric small{font-size:14px}td{font-size:14px}th{font-size:14px}input,select,textarea{font-size:14px;min-height:44px}}
@media print{body{background:var(--color-surface);color:var(--color-print-text)}.sidebar,.topbar,.page-heading .buttons,.queue-nav,.no-print,.footer-note,.demo-banner{display:none!important}.shell,.main,.content{display:block;padding:0;margin:0;max-width:none}.print-only{display:block}.detail-grid{display:block}.detail-aside{display:none}.panel{border:1px solid var(--color-print-border);break-inside:avoid}.panel-head{padding:12px}td,th{padding:10px;color:var(--color-print-text)}.button{display:none}.page-heading h1{font-size:24px}.spec p,.meta-value{color:var(--color-print-text)}.notice{display:none}.panel-body{padding:15px}.table-wrap{overflow:visible}table{white-space:normal}.badge{color:var(--color-print-text)}.print-hide-rate{display:none!important}}


@media print{body.print-charges .print-hide-rate{display:block!important}.detail-aside:has(.print-hide-rate){display:block}.detail-aside>.panel:not(.print-hide-rate){display:none}}

.workspace-banner{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;padding:14px 25px;background:var(--color-surface-subtle);border-bottom:1px solid var(--line);color:var(--color-brand)}.workspace-banner>div{display:flex;flex-wrap:wrap;gap:6px 18px;min-width:0;overflow-wrap:anywhere}.workspace-banner strong{font-size:14px}.workspace-banner span{font-size:14px}.workspace-banner .button{flex-shrink:0}.admin-actions{margin-bottom:20px}.admin-actions+.panel{margin-top:0}.main{min-width:0}.panel-head{flex-wrap:wrap;gap:12px}.panel-head .buttons{flex-wrap:wrap}.button:disabled{cursor:not-allowed;opacity:1}
@media(max-width:800px){.workspace-banner{padding:12px 17px}.workspace-banner>div{flex-direction:column}.workspace-banner .button{min-height:44px}.breadcrumb{min-width:0;overflow-wrap:anywhere}.top-actions{flex-shrink:0}.sidebar-foot{position:static;margin-top:auto}.sidebar{display:flex;flex-direction:column;overflow-y:auto;max-height:100dvh}.row-editor{grid-template-columns:minmax(0,1fr) 90px 30px}}

.workspace-banner{position:sticky;top:0;z-index:15}.system-services{padding:10px 22px}
@media(max-width:440px){.system-services>div{gap:12px;align-items:flex-start}.system-services strong{max-width:55%;text-align:right}}

.field[hidden]{display:none!important}.account-role-fields{display:contents}.permission-groups{display:grid;gap:16px}.permission-groups fieldset,fieldset.field{min-width:0;border:1px solid var(--line);border-radius:8px;padding:12px}.permission-groups legend,fieldset.field legend{font-weight:600;padding:0 5px}.permission-groups .check-list{display:grid;gap:9px}.permission-groups label{display:flex;gap:8px;align-items:flex-start}.permission-groups input{flex-shrink:0}details.field>summary{cursor:pointer;font-weight:600}details.field .field{margin-top:12px}.comment .buttons{flex-wrap:wrap;gap:8px;margin-top:10px}fieldset.field .check-list{display:grid;gap:8px}

.category-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:22px}.category-tile{display:grid;gap:5px;background:var(--color-surface);border:1px solid var(--color-control-border);border-radius:12px;padding:18px}.category-tile.selected{border-color:var(--green);background:var(--pale)}.category-tile small{color:var(--muted)}.design-art img{width:100%;height:100%;object-fit:cover}.ce-tabs{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:14px}.ce-tab[hidden]{display:none!important}.ce-tab>fieldset,.ce-option,.ce-personal,.ce-info{border:1px solid var(--line);padding:18px;border-radius:10px;margin:15px 0;min-width:0}.ce-tab p{margin-bottom:14px}.ce-values{display:grid;gap:8px;margin:12px 0}.ce-value,.ce-sku-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.ce-value input,.ce-sku-row input,.ce-role input{padding:10px;border:1px solid var(--color-control-border);border-radius:7px;min-width:0;flex:1}.ce-checks{display:flex;gap:10px 20px;flex-wrap:wrap;margin:14px 0}.ce-checks label{display:flex;gap:8px;align-items:center}.ce-tabs .button{white-space:normal}.ce-sku-row{padding:9px 0}.ce-sku-row label{min-width:180px;flex:1}.ce-review-product{display:flex;gap:10px;margin:12px 0}.product-preview{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px}.product-preview>img{width:100%;border-radius:10px}.material-tabs{margin-bottom:20px}.ce-tab .buttons{flex-wrap:wrap}.ce-tab input:not([type=checkbox]){max-width:100%}.ce-role{margin:10px 0}.usage-row{grid-template-columns:minmax(0,2fr) minmax(100px,1fr) 90px}.ce-reference-row{border:1px solid var(--line);padding:14px;margin:12px 0}.ce-tab>h3{margin-top:16px}fieldset legend{font-weight:600}.modal .field-grid{min-width:0}.modal input[type=checkbox]{width:auto}.ce-tab details{margin:12px 0}@media(max-width:700px){.product-preview{grid-template-columns:1fr}.category-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.category-tile{padding:13px}.usage-row{grid-template-columns:minmax(0,1fr)}.ce-value input{width:70%}.ce-tabs{gap:6px}.ce-tab>fieldset,.ce-option,.ce-personal,.ce-info{padding:12px}.ce-sku-row label{min-width:0}.ce-checks{display:grid;gap:12px}.ce-tabs .button{min-height:44px}}
.red-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;border-bottom:1px solid var(--line);padding-bottom:16px;position:sticky;top:0;background:var(--color-surface);z-index:3}.red-tabs .button{white-space:normal;text-align:left;min-height:58px}.red-pane[hidden]{display:none!important}.red-pane{align-items:start}.red-pane>fieldset,.red-variation,.red-offer,.red-library,.red-field{grid-column:1/-1;min-width:0;padding:18px;border:1px solid var(--line);border-radius:10px;margin:10px 0}.red-pane>.notice,.red-pane>p,.red-pane>h3,.red-pane>#red-skus,.red-pane>#red-references{grid-column:1/-1}.red-choice{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0}.red-choice>input{min-width:120px;flex:1;padding:10px;border:1px solid var(--color-control-border);border-radius:6px}.red-choice>label{display:flex;align-items:center;gap:6px}.red-sku{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:10px 0}.red-sku input{border:1px solid var(--color-control-border);border-radius:6px;padding:12px;max-width:45%}.red-field details{border-top:1px solid var(--line);padding:12px 0}.red-field summary{cursor:pointer;font-weight:600}.red-field details>.field-grid{padding-top:15px}.red-media-row{border:1px solid var(--line);border-radius:8px;padding:12px;display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:10px 0}.red-media-row img{width:75px;height:75px;object-fit:cover}.red-media-row a{overflow-wrap:anywhere;flex:1}.red-pane select[multiple]{min-height:115px}.red-pane input[type=checkbox]{flex-shrink:0}.usage-row{display:grid;grid-template-columns:minmax(180px,2fr) minmax(100px,1fr) 80px;gap:12px;border:1px solid var(--line);padding:12px;margin-top:12px}.usage-row .field{min-width:0}.usage-row .button{align-self:end}#inventory-content>.notice{margin:16px}#inventory-content{min-width:0}
@media(max-width:700px){.red-tabs{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.red-tabs .button{font-size:14px;padding:9px;min-height:55px}.red-pane>fieldset{padding:12px}.red-choice{gap:6px}.red-choice>input{flex-basis:60%}.red-choice>.button{padding:8px;min-height:40px}.usage-row{grid-template-columns:minmax(0,1fr)}.red-sku{align-items:stretch;flex-direction:column}.red-sku input{max-width:100%}.material-tabs .button{white-space:normal;min-height:44px}}
.simple-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;border-bottom:1px solid var(--line);padding-bottom:16px;margin-bottom:20px}.simple-tabs .button{white-space:normal;min-height:58px;text-align:left}.simple-pane[hidden]{display:none!important}.simple-pane{min-width:0}.simple-pane>h3,.simple-pane>.hint,.simple-pane>.simple-card,.simple-pane>.simple-upload{grid-column:1/-1}.simple-card{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--color-surface);min-width:0}.simple-card>div:first-child{min-width:0;flex:1}.simple-card h3{margin:0 0 7px}.simple-card p{margin:0 0 9px;color:var(--muted)}.choice-chips{display:flex;flex-wrap:wrap;gap:7px}.choice-chips>span{display:inline-block;padding:5px 10px;border-radius:20px;border:1px solid var(--line);background:var(--color-surface-subtle);font-size:14px}.simple-card .buttons{flex-wrap:wrap;flex-shrink:0}.simple-upload{padding:18px;border:1px dashed var(--color-control-border);border-radius:12px;min-width:0}.simple-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px;margin:12px 0}.simple-asset{min-width:0;border:1px solid var(--line);border-radius:8px;padding:8px}.simple-asset img{width:100%;height:125px;object-fit:cover;border-radius:5px}.simple-asset a{display:block;overflow-wrap:anywhere;font-size:14px;margin:5px 0}.simple-asset .buttons{flex-wrap:wrap;gap:4px}.simple-asset .button{font-size:14px;padding:7px}.simple-file{width:1px;height:1px;position:absolute;opacity:0}.simple-upload label.button{cursor:pointer;position:relative}.simple-upload label.button:focus-within{outline:2px solid var(--green)}.simple-dependencies{display:grid;grid-template-columns:1fr 1fr;gap:20px}.simple-dependency>.field{margin-top:8px}.simple-choice{display:flex;gap:8px;align-items:center;margin:8px 0}.simple-choice input{flex:1;min-width:0;padding:12px;border:1px solid var(--color-control-border);border-radius:8px}.simple-sku{display:grid;grid-template-columns:1fr 1fr;gap:15px;padding:10px 0;align-items:center}.simple-sku input{padding:12px;border:1px solid var(--color-control-border);border-radius:8px;min-width:0}.simple-filters{display:flex;align-items:end;flex-wrap:wrap;gap:14px;padding:18px}.simple-filters .field{min-width:160px;flex:1}.simple-detail-gallery{display:flex;gap:12px;overflow-x:auto}.simple-detail-gallery img{max-width:240px;height:260px;object-fit:cover;border-radius:10px}.preserve-lines{white-space:pre-wrap}.simple-pane details{padding:15px;border:1px solid var(--line);border-radius:9px}.simple-pane summary{font-weight:600;cursor:pointer}.simple-pane>details .buttons{margin-top:10px}.simple-pane .notice p{margin-top:10px}.simple-pane>.button{justify-self:start}.simple-card .button{white-space:nowrap}
@media(max-width:700px){.simple-tabs{grid-template-columns:1fr 1fr;gap:6px}.simple-tabs .button{padding:10px;font-size:14px}.simple-card{align-items:stretch;flex-direction:column;padding:14px;gap:12px}.simple-card .buttons{display:flex}.simple-dependencies{grid-template-columns:1fr}.simple-choice{flex-wrap:wrap}.simple-choice input{flex-basis:100%}.simple-sku{grid-template-columns:1fr;gap:6px}.simple-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.simple-filters{padding:12px}.simple-filters .field{min-width:100%;flex-basis:100%}.simple-detail-gallery img{max-width:180px;height:210px}.simple-upload{padding:12px}}
.account-password-input{display:flex;gap:8px;align-items:stretch}.account-password-input input{flex:1;min-width:0;width:100%}.account-password-input .button{flex-shrink:0}
.price-context{display:flex;justify-content:space-between;gap:12px;margin-bottom:16px;flex-wrap:wrap}.price-context span{color:var(--muted)}.price-tabs{display:flex;gap:8px;margin-bottom:18px}.price-tabs .button{white-space:normal}.price-bulk{border:1px solid var(--line);border-radius:8px;padding:15px;margin:18px 0}.price-bulk legend{padding:0 6px}.price-bulk-controls{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.price-bulk-controls .field{flex:1;min-width:150px}.price-table input[name=group_price]{width:145px;max-width:100%;padding:10px;border:1px solid var(--color-control-border);border-radius:6px}.price-table td:last-child{white-space:normal;min-width:120px}.price-pages{margin:16px 0}#price-editor .notice p{margin:8px 0 0}#price-editor>details{padding:14px;border:1px solid var(--line);border-radius:8px;margin-top:16px}#price-change-summary{margin:16px 0;font-weight:600}@media(max-width:700px){.price-bulk-controls{display:grid;grid-template-columns:minmax(0,1fr)}.price-bulk-controls .field{min-width:0}.price-tabs{flex-wrap:wrap}.price-pages{gap:7px}.price-pages .button{padding:9px}.price-table th,.price-table td{padding:10px}.price-table input[name=group_price]{width:120px}}
.modal-foot button[hidden]{display:none!important}

.price-bulk>summary{cursor:pointer;font-weight:600}.price-bulk-controls{margin-top:12px}.price-select-page{display:flex;gap:8px;align-items:center;margin:12px 0}@media(max-width:700px){.price-table,.price-table tbody{display:block;width:100%}.price-table thead{display:none}.price-table tr.price-row{display:block;border:1px solid var(--line);border-radius:8px;margin:12px 0;padding:12px}.price-table td{display:block;min-width:0!important;border:0;padding:6px 0}.price-table input[name=group_price]{width:100%}.price-table td[data-price-label]:before{content:attr(data-price-label);display:block;font-size:14px;color:var(--muted);margin-bottom:6px}}

/* Shared readable defaults for catalogue, stock, accounts and administration. */
:root{font-size:16px}
.shared-access-cell{display:grid;gap:8px;justify-items:start}.shared-access-options{display:grid;gap:12px;margin:18px 0}.shared-access-option{display:flex;align-items:center;justify-content:space-between;gap:22px;border:1px solid var(--line);border-radius:10px;padding:16px;cursor:pointer}.shared-access-option strong{font-size:16px}.shared-access-option p{font-size:14px;color:var(--muted);margin:5px 0}.shared-access-toggle{display:grid;justify-items:center;gap:6px;min-width:90px;flex-shrink:0}.shared-access-toggle input[role=switch]{appearance:none!important;width:48px!important;height:28px;min-height:28px;border:1px solid var(--color-control-border);border-radius:20px;background:var(--color-surface-subtle);position:relative;cursor:pointer}.shared-access-toggle input:before{content:'';position:absolute;width:20px;height:20px;left:3px;top:3px;border-radius:50%;background:var(--color-brand);transition:left .12s}.shared-access-toggle input:checked{background:var(--color-brand)}.shared-access-toggle input:checked:before{left:23px;background:var(--color-surface)}.shared-access-toggle input:disabled{cursor:default;opacity:1}.shared-access-toggle>span{font-size:14px}.shared-access-option small{color:var(--muted)}@media(max-width:500px){.shared-access-option{padding:12px;gap:10px}.shared-access-toggle{min-width:76px}}
body{font-size:16px;line-height:1.55}
input,select,textarea{font-size:16px!important;line-height:1.45;min-height:44px;color:var(--color-text);background-color:var(--color-surface)}
input::placeholder,textarea::placeholder{color:var(--color-text-muted);opacity:1}
input[type=checkbox],input[type=radio]{width:20px;height:20px;min-height:20px;accent-color:var(--color-brand);flex-shrink:0}
input:disabled,select:disabled,textarea:disabled{opacity:1;color:var(--color-text-muted);background:var(--color-surface-subtle)}
input[readonly]{background:var(--color-surface-subtle)}
button,.button,.button.small,.tab,.chip,label,.field>label,td,th,.hint,small{font-size:14px}
.button,.icon-btn,button[data-action],label.button{min-height:44px;min-width:44px;touch-action:manipulation}
.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;line-height:1.4;padding:11px 15px;white-space:normal}
.button svg{width:18px;height:18px}
.button:disabled{opacity:1;cursor:not-allowed}
.button.primary{color:var(--color-surface);background:var(--color-brand)}
.nav-item{font-size:15px;min-height:46px}
.nav-label,.private-label,.brand small,.profile small,.breadcrumb,.demo-banner,.footer-note{font-size:14px}
.sidebar{overflow-y:auto;max-height:100dvh}
.sidebar-foot{position:static;margin-top:28px}
.profile button{background:transparent;display:grid;place-items:center}
.page-heading p,.panel-head p,.meta-label,.spec small,.metric small,.comment small,.legend,.summary-list>div,.notice,.tabs .tab,.pagination{font-size:14px;color:var(--color-text-muted)}
.page-heading h1{line-height:1.2}.panel-head h2{line-height:1.3}
.hint{color:var(--color-text-muted);line-height:1.6}.notice{line-height:1.6;padding:14px 16px}
.notice.error{background:var(--color-error-bg);border:1px solid var(--color-error-border);color:var(--color-error-text);white-space:pre-line}
.field-grid{gap:20px}.field{min-width:0}.field>label{line-height:1.5;margin-bottom:7px;font-weight:600}
.search-label{display:flex;align-items:center;gap:8px}
.sort-handle{touch-action:none;cursor:grab;flex-shrink:0}.sort-handle svg{stroke-width:4;stroke-linecap:round}.sort-handle:active{cursor:grabbing}.sort-dragging{outline:2px dashed var(--color-brand);outline-offset:3px;background:var(--color-selected-bg)}.sorting{user-select:none}.sort-before{box-shadow:0 -4px 0 var(--color-focus)!important}.sort-after{box-shadow:0 4px 0 var(--color-focus)!important}.simple-gallery .sort-before{box-shadow:-4px 0 0 var(--color-focus)!important}.simple-gallery .sort-after{box-shadow:4px 0 0 var(--color-focus)!important}.simple-choice .sort-handle{order:-1}.simple-card{gap:14px;padding:16px}.simple-card .buttons{gap:6px}.action-icon-only.button{width:44px;padding:10px}.simple-gallery .buttons{gap:6px}.simple-choice{flex-wrap:nowrap}.simple-choice input{min-width:0}.simple-choice .button{flex-shrink:0}.action-tooltip{white-space:normal;text-align:left}.simple-card .action-tooltip{max-width:210px}
@media(max-width:700px){.simple-choice input{flex-basis:auto}.simple-card .buttons{align-self:flex-end}.simple-card{padding:14px}.simple-asset .buttons{flex-wrap:wrap}}
.buttons{gap:10px;flex-wrap:wrap}.panel{margin-bottom:24px}.panel-body{padding:24px}
td,th{font-size:14px;line-height:1.5;padding:16px}th{color:var(--color-text-muted);font-weight:650;letter-spacing:.03em}
td small{font-size:14px;color:var(--color-text-muted)}.table-wrap,.table-scroll{max-width:100%;overflow:auto;overscroll-behavior-inline:contain}
.table-scroll>table{min-width:620px}.panel,.content,.modal,.main,.detail-main,.detail-aside{min-width:0}
.badge{font-size:14px;font-weight:600}.spec,.spec p,.comment p{font-size:16px;color:var(--color-text)}
.workspace-banner strong,.workspace-banner span{font-size:14px}.workspace-banner{border-bottom:2px solid var(--color-selected-border)}
.auth-art{color:var(--color-inverse-text)}.auth-art p,.auth-art footer,.auth-art .brand small{color:var(--color-inverse-muted)}
.auth-form>p{font-size:16px;color:var(--color-text-muted)}#toast{font-size:16px;color:var(--color-surface);max-width:calc(100vw - 24px)}
.auth-form .button{font-size:16px}.simple-tabs,.red-tabs{gap:10px}.simple-card,.simple-upload{padding:22px}
.simple-card h3{font-size:19px}.simple-card p,.choice-chips>span,.simple-asset a{font-size:14px}
.design-art{height:auto;aspect-ratio:3/4;overflow:hidden;grid-template-rows:minmax(0,1fr);background:var(--color-surface-subtle)}.design-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.design-id{z-index:2}.mobile-menu{display:none}
summary{cursor:pointer;min-height:44px;padding:10px 0;font-size:16px}.secondary-help{margin:20px 0;padding:10px 16px;border:1px solid var(--line);border-radius:9px}
.secondary-help p,.price-fill-help p{font-size:14px;color:var(--color-text-muted)}
:focus-visible{outline:3px solid var(--color-focus)!important;outline-offset:3px;box-shadow:0 0 0 2px var(--color-surface)}
.action-icon-only{position:relative;display:inline-flex;align-items:center;justify-content:center;overflow:visible}
.action-tooltip{display:none;position:absolute;top:100%;right:0;z-index:80;width:max-content;max-width:230px;padding:7px 10px;border-radius:5px;background:var(--color-text);color:var(--color-surface);font-size:14px;pointer-events:none;font-weight:400}
.action-icon-only:hover>.action-tooltip,.action-icon-only:focus-visible>.action-tooltip{display:block}
.modal-head{z-index:6}.modal-foot{position:sticky;bottom:0;z-index:5;background:var(--color-surface-raised);padding-block:16px;box-shadow:0 -5px 10px var(--color-surface-raised)}
.price-cell-select{min-height:44px}
.icon-btn.mobile-menu{display:none}
@media(max-width:800px){.icon-btn.mobile-menu{display:inline-flex}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* Real spreadsheet geometry. Only the grid scrolls on small screens. */
.modal.price-dialog{width:1120px;max-width:calc(100vw - 32px)}
.price-context{padding:14px 16px;background:var(--color-selected-bg);border-radius:8px}
.price-tabs{flex-wrap:wrap;gap:10px}.price-grid-toolbar{display:flex;align-items:end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:18px 0}
.price-grid-toolbar .field{min-width:220px}.price-selection-tools,.price-grid-paging,.price-fill-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:14px 0}
.price-selection-tools label{display:flex;align-items:center;gap:8px;min-height:44px}.price-fill-help{padding:8px 16px;border:1px solid var(--line);border-radius:8px;margin:14px 0}
.price-fill-controls{align-items:end}.price-fill-controls .field{flex:1;max-width:300px}.price-grid-scroll{overflow:auto;max-width:100%;max-height:60vh;border:1px solid var(--color-control-border);border-radius:8px;overscroll-behavior:contain}
#price-grid{border-collapse:separate;border-spacing:0;width:100%;white-space:normal;table-layout:auto}
#price-grid th,#price-grid td{border:0;border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:12px;vertical-align:top;min-width:180px}
#price-grid th{background:var(--color-selected-bg);color:var(--color-text);text-transform:none;letter-spacing:0}
#price-grid thead th{position:sticky;top:0;z-index:3;font-size:15px}
#price-grid th[scope=row]{position:sticky;left:0;z-index:2;min-width:140px;max-width:200px}
#price-grid thead th:first-child{left:0;z-index:4}
#price-grid input[data-price-input]{display:block;width:100%;min-width:125px;border:1px solid var(--color-control-border);border-radius:5px;padding:10px 12px;text-align:right;font-variant-numeric:tabular-nums}
.price-cell-select{display:flex;align-items:center;gap:8px;min-height:36px;margin-bottom:6px;color:var(--color-text-muted)}
.price-cell-state{display:block;font-size:14px;margin-top:7px;color:var(--color-text-muted)}
#price-grid td[data-state=unsaved]{background:var(--color-warning-bg)}#price-grid td[data-state=unsaved] .price-cell-state{color:var(--color-warning-text);font-weight:600}
#price-grid td[data-state=invalid]{background:var(--color-error-bg)}#price-grid td[data-state=invalid] .price-cell-state{color:var(--color-error-text);font-weight:600}
#price-grid td[data-state=saved] .price-cell-state{color:var(--color-brand)}
#price-change-summary{font-weight:600;line-height:1.5}
@media(max-width:800px){.topbar{height:auto;min-height:70px;flex-wrap:wrap;padding:12px 16px}.top-actions{max-width:100%;margin-left:auto;flex-wrap:wrap}.top-actions select{font-size:16px;max-width:155px}.breadcrumb{font-size:14px}.content{padding:24px 16px}.panel-body{padding:18px}.panel-head{padding:18px}.table-toolbar{flex-wrap:wrap;gap:12px}.searchbox{min-width:0;flex:1}.searchbox input{width:100%;min-width:0}.workspace-banner{position:static}.modal.price-dialog{max-width:calc(100vw - 20px)}.price-grid-scroll{max-height:48vh}.price-grid-toolbar .field{min-width:0;width:100%}.price-grid-paging .button{padding:10px}.price-fill-controls{align-items:stretch;flex-direction:column}.price-fill-controls .field{max-width:none}.simple-card,.simple-upload{padding:16px}.page-heading .button,.simple-tabs .button,.red-tabs .button{font-size:14px}.page-heading h1{font-size:29px}.modal-head{gap:16px}.modal-head h2{font-size:23px;overflow-wrap:anywhere}.modal-foot{gap:10px;flex-wrap:wrap}.modal-foot .button{flex:1}.tabs{overflow-x:auto;max-width:100%;gap:16px}.tab{white-space:nowrap}.metric-grid{grid-template-columns:1fr 1fr}.metric{min-width:0}.metric small{font-size:14px}.metric-top{font-size:14px}.footer-note{flex-wrap:wrap;gap:12px}}
@media(max-width:440px){.top-actions .language{max-width:115px}.top-actions select{max-width:160px}.simple-tabs .button{min-height:70px}.price-tabs .button{flex:1}.price-selection-tools{align-items:flex-start}.price-grid-scroll th[scope=row]{min-width:95px!important;max-width:110px!important}.table-toolbar select{max-width:100%}.auth-main{padding:28px 20px}.row-editor{grid-template-columns:minmax(0,1fr) 85px 44px}}
@media print{.action-tooltip{display:none!important}.table-scroll,.price-grid-scroll{overflow:visible;max-height:none}.table-scroll>table{min-width:0}.price-cell-select,.price-selection-tools,.price-fill-help{display:none}}
@media(max-width:440px){#price-grid th:first-child{width:95px;min-width:95px!important;max-width:110px!important}#price-grid th,#price-grid td{padding:10px}#price-grid input[data-price-input]{min-width:125px}}
@media(max-width:800px){.top-actions{flex:1 0 100%;justify-content:flex-start;margin-left:0;flex-wrap:nowrap;max-width:100%}.top-actions select{flex:1;width:auto;min-width:0;max-width:none}.top-actions .language{flex:0 0 110px;max-width:none}}

/* Listing-style variation pricing: compact rows, one amount column. */
.simple-pricing-policies{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:12px}
.simple-price-policy{border:1px solid var(--line);border-radius:10px;padding:16px;min-width:0;background:var(--color-surface-raised)}
.simple-dependency h4{font-size:17px;margin:0 0 12px}.simple-price-policy .hint{margin:8px 0}.simple-price-next{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-top:12px}.simple-price-next>span{font-size:14px;font-weight:600}.price-next-check{display:flex;align-items:center;gap:10px}
.simple-pane[data-pane="1"] .simple-card{padding:12px}.simple-pane[data-pane="1"] .simple-card h3{font-size:17px;margin-bottom:3px}.simple-pane[data-pane="1"] .simple-card p{margin-bottom:5px}.simple-pane[data-pane="1"] .choice-chips>span{padding:3px 9px}
.modal.price-list-dialog{width:980px}.price-list-dialog .price-context{padding:10px 12px;margin-bottom:12px}.price-list-dialog .price-tabs{margin-bottom:12px}.price-rule-summary{font-size:14px;color:var(--muted);margin:12px 0}
.modal.price-single-dialog{width:660px}.price-single-dialog .price-rows-heading{align-items:flex-start;flex-direction:column;gap:5px}
.price-rows-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:15px 0}.price-rows-heading>span{font-size:14px;font-weight:400}.price-rows-scroll{max-height:55vh;max-width:100%;overflow:auto;border:1px solid var(--line);border-radius:9px;overscroll-behavior:contain}
#price-grid.price-rows{table-layout:auto;border-collapse:separate;border-spacing:0;width:100%;white-space:normal}
#price-grid.price-rows th,#price-grid.price-rows td{min-width:80px;max-width:220px;border-right:0;border-bottom:1px solid var(--line);padding:12px 14px;vertical-align:middle;font-size:16px}
#price-grid.price-rows th{position:sticky;top:0;left:auto;z-index:2;text-transform:none;letter-spacing:0;background:var(--color-surface-subtle);font-size:14px}
#price-grid.price-rows tbody tr:last-child td{border-bottom:0}
#price-grid.price-rows .price-select-column{width:48px;min-width:48px!important;max-width:48px!important;padding:6px}
.price-select-column label{display:flex;align-items:center;justify-content:center;min-height:44px;cursor:pointer}
.price-amount{display:flex;align-items:center;border:1px solid var(--color-control-border);border-radius:7px;background:var(--color-surface);max-width:245px;min-width:135px}.price-amount>span{font-size:14px;color:var(--muted);padding-left:12px;flex-shrink:0}
#price-grid .price-amount input[data-price-input]{min-width:0;width:100%;border:0;padding:10px;background:transparent;text-align:right;border-radius:7px}
#price-grid .price-cell-state{font-size:14px;margin-top:4px}.price-amount-cell{width:260px}#price-grid.price-rows .price-mobile-options{display:none}
.price-single{max-width:300px;margin:18px 0}.price-single label{display:block;font-weight:600;margin-bottom:8px}.price-single .price-amount{max-width:none}
.price-fill-bar{display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding:12px;background:var(--color-selected-bg);border-radius:8px;margin:12px 0}.price-fill-bar[hidden]{display:none}.price-fill-bar .field{flex:1;min-width:135px;max-width:200px}.price-fill-bar>strong{align-self:center;font-size:14px}
.price-base-note,.price-paste-hint{font-size:14px;color:var(--muted);margin:10px 0}.price-help{margin-top:12px}.price-help summary{font-size:14px}.price-help p{font-size:14px}
#price-grid.price-rows tr[data-state=unsaved] .price-amount{background:var(--color-warning-bg);border-color:var(--color-warning-border)}#price-grid.price-rows tr[data-state=invalid] .price-amount{background:var(--color-error-bg);border-color:var(--color-error-border)}
@media(max-width:650px){.simple-pricing-policies{grid-template-columns:minmax(0,1fr)}.price-list-dialog .modal-head h2{font-size:21px}.price-list-dialog .price-tabs .button{font-size:14px;padding:9px}.price-rows-heading{align-items:flex-start;flex-direction:column;gap:4px}#price-grid.price-rows .price-option-column{display:none}#price-grid.price-rows .price-mobile-options{display:table-cell;min-width:90px;max-width:140px;font-size:14px}#price-grid.price-rows .price-mobile-options small{display:block;font-size:14px;color:var(--muted)}#price-grid.price-rows td,#price-grid.price-rows th{padding:9px 8px}#price-grid.price-rows .price-select-column{width:36px;min-width:36px!important;max-width:36px!important;padding:2px}#price-grid.price-rows .price-amount-cell{width:145px;min-width:130px;max-width:170px}.price-amount{min-width:120px}.price-amount>span{padding-left:7px}#price-grid .price-amount input[data-price-input]{padding:10px 7px}.price-fill-bar .field{max-width:none}.price-rows-scroll{max-height:50vh}}
.addon-panel{padding:12px;border:1px solid var(--line);border-radius:9px}
.addon-panel .service-option{display:inline-flex;align-items:center;gap:6px;margin:4px 16px 4px 0}

/* Semantic colour states. Geometry and typography stay with each component. */
.brand>div{min-width:0}
.brand-mark{flex-shrink:0;background:var(--color-brand);color:var(--color-on-brand)}
.auth-art{background:var(--color-brand-strong);color:var(--color-inverse-text)}
.auth-art .brand-mark{background:var(--color-surface);color:var(--color-brand)}
.auth-art .eyebrow,.auth-art .brand small,.auth-art p,.auth-art footer{color:var(--color-inverse-muted)}
.design-art .design-id{background:var(--color-surface);color:var(--color-text)}
.catalogue-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.catalogue-grid .design-card{display:flex;flex-direction:column;min-width:0}.catalogue-grid .design-art{flex-shrink:0}.catalogue-grid .design-info{padding:10px;display:flex;flex-direction:column;flex:1;min-width:0;overflow-wrap:anywhere}.catalogue-grid .design-info h3{font-size:16px;line-height:1.35}.catalogue-grid .design-info .buttons{display:grid;grid-template-columns:repeat(2,minmax(44px,1fr));gap:4px;margin-top:auto;padding-top:8px}.catalogue-grid .design-info .buttons .button{width:100%;min-height:44px;padding:8px 2px}.catalogue-grid .design-art .design-id{left:8px;top:8px;max-width:calc(100% - 16px);overflow-wrap:anywhere;padding:3px 6px}.catalogue-grid .design-art>svg{max-width:60%;height:auto;aspect-ratio:1}
@media(max-width:1099px){.catalogue-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:700px){.catalogue-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}
label,.field>label{color:var(--color-text-muted)}
input,select,textarea{border-color:var(--color-control-border)}
input:focus,select:focus,textarea:focus{border-color:var(--color-focus);outline-color:var(--color-focus)}
input[readonly],textarea[readonly]{background:var(--color-surface-subtle);color:var(--color-text-muted)}
input:disabled,select:disabled,textarea:disabled,button:disabled,.button:disabled,.button.primary:disabled{
 opacity:1;color:var(--color-disabled-text);background:var(--color-disabled-bg);border-color:var(--color-disabled-border)
}
.shared-access-toggle input:disabled{opacity:1}
.shared-access-toggle input:disabled:before{background:var(--color-disabled-text)}
.shared-access-toggle input:checked:disabled:before{background:var(--color-on-brand)}
.shared-access-toggle input:checked:disabled{background:var(--color-brand);border-color:var(--color-brand)}
.button:hover:not(:disabled),.icon-btn:hover:not(:disabled),.om-pick:hover:not(:disabled){background:var(--color-surface-hover);border-color:var(--color-brand);color:var(--color-brand-strong)}
.button.primary:hover:not(:disabled){background:var(--color-brand-hover);border-color:var(--color-brand-hover);color:var(--color-on-brand)}
.button.danger{color:var(--color-error-text);border-color:var(--color-error-border)}
.button.danger:hover:not(:disabled){background:var(--color-error-bg);border-color:var(--color-error-border);color:var(--color-error-text)}
.button[aria-selected=true]:not(.primary),.category-tile.selected{background:var(--color-selected-bg);border-color:var(--color-selected-border);color:var(--color-text)}
.nav-item.active{background:var(--color-selected-bg);color:var(--color-brand-strong);box-shadow:inset 3px 0 0 var(--color-selected-border)}
.tab.active{color:var(--color-brand);border-bottom-color:var(--color-selected-border)}
.simple-tabs .button.primary,.red-tabs .button.primary,.price-tabs .button.primary,.material-tabs .button.primary{box-shadow:inset 0 -3px 0 var(--color-on-brand)}
.notice{background:var(--color-warning-bg);border-color:var(--color-warning-border);color:var(--color-warning-text)}
.notice.info{background:var(--color-info-bg);border-color:var(--color-info-border);color:var(--color-info-text)}
.notice.success{background:var(--color-success-bg);border-color:var(--color-success-border);color:var(--color-success-text)}
.notice.error{background:var(--color-error-bg);border-color:var(--color-error-border);color:var(--color-error-text)}
.form-error,.date.overdue{color:var(--color-error-text)}
.badge.assigned,.badge.new-orders{background:var(--color-info-bg);color:var(--color-info-text)}
.badge.in-process,.badge.pending{background:var(--color-warning-bg);color:var(--color-warning-text)}
.badge.ready,.badge.quality-check{background:var(--color-info-bg);color:var(--color-info-text)}
.badge.dispatch,.badge.completed,.badge.approved{background:var(--color-success-bg);color:var(--color-success-text)}
.badge.cancelled{background:var(--color-surface-subtle);color:var(--color-text-muted)}
.badge.overdue,.badge.rejected,.badge.failed{background:var(--color-error-bg);color:var(--color-error-text)}
.demo-banner{background:var(--color-warning-bg);color:var(--color-warning-text)}
.workspace-banner,.workspace-banner.admin{background:var(--color-selected-bg);border-bottom-color:var(--color-selected-border);color:var(--color-brand-strong)}
.workspace-banner.preview{background:var(--color-info-bg);border-bottom-color:var(--color-info-border);color:var(--color-info-text)}
.workbar,.price-context,.price-fill-bar{background:var(--color-selected-bg);color:var(--color-text)}
.om-rework-notes{background:var(--color-warning-bg);border-color:var(--color-warning-border);color:var(--color-warning-text)}
.material-review-confirm{background:var(--color-success-bg);border-color:var(--color-success-border);color:var(--color-success-text)}
.price-amount{border-color:var(--color-control-border)}
#price-grid [data-price-entry][data-state=unsaved]{background:var(--color-warning-bg)}
#price-grid [data-price-entry][data-state=invalid]{background:var(--color-error-bg)}
#price-grid [data-price-entry][data-state=unsaved] .price-amount{background:var(--color-warning-bg);border-color:var(--color-warning-border)}
#price-grid [data-price-entry][data-state=invalid] .price-amount,#price-grid input[aria-invalid=true]{background:var(--color-error-bg);border-color:var(--color-error-border)}
#price-grid [data-state=unsaved] .price-cell-state{color:var(--color-warning-text)}
#price-grid [data-state=invalid] .price-cell-state{color:var(--color-error-text)}
#price-grid [data-state=saved] .price-cell-state{color:var(--color-success-text)}
#price-grid tr[data-price-row]:has([data-select-cell]:checked){background:var(--color-selected-bg);box-shadow:inset 3px 0 0 var(--color-selected-border)}
.partner-row .bar{background:var(--color-chart-track)}
.partner-row .bar span,.stackbar span,.legend i{background:var(--color-chart-primary)}
.stackbar span+span,.legend i.light{background:var(--color-chart-secondary);box-shadow:inset 0 0 0 1px var(--color-chart-outline)}
#buyer-addon-amount{margin-top:10px}
#price-grid.price-service-table .price-amount-cell{width:165px;min-width:145px;white-space:normal}
#price-grid.price-service-table .price-amount{min-width:125px}
.pm-configuration{border:1px solid var(--color-divider);border-radius:8px;padding:14px;min-width:0}.pm-configuration h3{margin:0 0 8px}.pm-material-list{list-style:none;padding:0;margin:12px 0}.pm-material-list li,.pm-result{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--color-divider);min-width:0}.pm-material-list li:last-child{border-bottom:0}.pm-material-list li>div,.pm-result>div{min-width:0;overflow-wrap:anywhere}.pm-material-list strong,.pm-result strong{display:block}.pm-material-list small,.pm-result small{display:block;color:var(--color-text-muted)}.pm-material-list .button,.pm-result>.button{flex-shrink:0}.pm-search-results{min-width:0}.pm-search-results+.pagination{flex-wrap:wrap;gap:8px}

/* Overview: a scoped visual hierarchy; shared screens retain their own layout. */
.overview-page{display:grid;gap:22px;min-width:0}.overview-page>.page-heading{margin:0;align-items:flex-start}.overview-page .page-heading h1{font-size:34px;line-height:1.2}.overview-page .page-heading p{margin-top:8px}.overview-page>.page-heading>.buttons{flex-shrink:0}.ov-scope{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-bottom:16px;border-bottom:1px solid var(--color-divider);min-width:0}.ov-scope>span{display:flex;align-items:center;gap:8px;min-width:0;overflow-wrap:anywhere;font-size:14px;font-weight:600;color:var(--color-text)}.ov-scope>small{color:var(--color-text-muted);font-size:14px;text-align:right}
.overview-page .ov-metrics{margin:0;gap:14px}.overview-page .ov-metric{padding:20px;min-width:0;overflow-wrap:anywhere;box-shadow:0 2px 8px var(--color-shadow-soft);transition:border-color .15s,background-color .15s}.overview-page .ov-metric:hover{transform:none;background:var(--color-surface-raised)}.ov-metric .metric-top{gap:10px;align-items:flex-start;line-height:1.4;color:var(--color-text)}.ov-metric-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:8px;flex-shrink:0;background:var(--color-selected-bg);color:var(--color-brand)}.ov-metric-icon svg{color:inherit;width:17px;height:17px}.overview-page .ov-metric>strong{font-family:Inter,'Segoe UI',Arial,sans-serif;font-size:36px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.15;margin:14px 0 10px;letter-spacing:-1px}.ov-metric>small{display:block;line-height:1.45;padding-right:22px}.ov-metric-link{position:absolute;right:17px;bottom:20px;display:flex;color:var(--color-text-muted)}.ov-metric-link svg{width:16px;height:16px}.ov-metric-warning .ov-metric-icon{background:var(--color-warning-bg);color:var(--color-warning-text)}.ov-metric-warning>strong{color:var(--color-warning-text)}
.ov-attention{display:grid;grid-template-columns:minmax(200px,.9fr) minmax(0,2fr);gap:24px;align-items:center;border:1px solid var(--color-divider);border-radius:10px;background:var(--color-surface-subtle);padding:18px 20px}.ov-attention-heading{display:flex;align-items:flex-start;gap:12px;min-width:0}.ov-attention h2{font-family:inherit;font-size:16px;font-weight:600;line-height:1.4;margin:0 0 4px}.ov-attention p{font-size:14px;color:var(--color-text-muted);margin:0;line-height:1.5}.ov-section-icon{display:grid;place-items:center;flex-shrink:0;width:36px;height:36px;border-radius:8px;background:var(--color-surface-subtle);color:var(--color-brand)}.ov-attention-heading>.ov-section-icon{background:var(--color-surface)}.ov-attention-items{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;min-width:0}.ov-attention-link{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;min-width:0;min-height:58px;padding:10px 12px;background:var(--color-surface);border:1px solid var(--color-control-border);border-radius:7px;color:var(--color-text-muted)}.ov-attention-link>span{font-size:14px;line-height:1.4;overflow-wrap:anywhere}.ov-attention-link>strong{font-size:22px;font-weight:600;color:var(--color-text);font-variant-numeric:tabular-nums}.ov-attention-link>svg{width:15px;height:15px}.ov-attention-link:hover{background:var(--color-surface-hover)}.ov-attention-link.has-items>strong{color:var(--color-warning-text)}
.overview-page .panel{margin-bottom:0;min-width:0;overflow:hidden}.overview-page .panel-head{padding:20px 22px;gap:16px;align-items:flex-start}.overview-page .panel-head>div{min-width:0}.overview-page .panel-head h2{margin:3px 0 5px;font-size:22px;line-height:1.25}.overview-page .panel-head p{font-size:14px;line-height:1.5;margin:0;color:var(--color-text-muted)}.ov-section-label{font-size:12px;letter-spacing:1.2px;font-weight:600;color:var(--color-text-muted)}.overview-page .panel-head>.text-link{flex-shrink:0;font-size:14px;min-height:44px;display:inline-flex;align-items:center;gap:6px}.overview-page .ov-queue{margin:0}.overview-page .ov-stage-tabs{display:flex;gap:4px;flex-wrap:wrap;padding:0 18px;border-bottom:1px solid var(--color-divider)}.ov-stage-tabs>.tab{display:flex;align-items:center;justify-content:center;gap:7px;min-height:48px;padding:12px 10px;white-space:normal;border-bottom:3px solid transparent;border-radius:5px 5px 0 0;line-height:1.4}.ov-stage-tabs>.tab.active{background:var(--color-selected-bg);color:var(--color-brand);border-bottom-color:var(--color-brand)}.ov-stage-tabs>.tab>span{margin:0;padding:1px 6px;border-radius:4px;color:var(--color-text-muted);font-size:13px;background:var(--color-surface-subtle);font-variant-numeric:tabular-nums}.ov-stage-tabs>.tab.active>span{background:var(--color-surface);color:var(--color-brand)}.overview-page .ov-queue .pagination{flex-wrap:wrap;gap:10px;padding:14px 22px}.overview-page .ov-queue .pagination .text-link{display:inline-flex;align-items:center;gap:6px;min-height:44px}.overview-page .ov-queue .om-queue .product-cell{min-width:0}.overview-page .ov-queue .om-queue .product-cell>div{min-width:0;overflow-wrap:anywhere}.overview-page .ov-queue .om-queue small{overflow-wrap:anywhere}
.ov-lower-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:20px;min-width:0}.ov-lower-grid.ov-single-panel{grid-template-columns:minmax(0,1fr)}.ov-workload-list{padding:0 22px 6px}.ov-workload-row{display:flex;align-items:center;gap:12px;padding:17px 0;border-top:1px solid var(--color-divider);min-width:0}.ov-workload-row:first-child{border-top:0}.ov-workload-name{flex:1;min-width:0;overflow-wrap:anywhere}.ov-workload-name>strong{font-size:14px;font-weight:600;line-height:1.45;display:block}.ov-workload-name>small{display:block;color:var(--color-text-muted);font-size:14px;line-height:1.45;margin:3px 0 9px}.ov-workload-bar{display:block;height:5px;background:var(--color-surface-subtle);border-radius:4px;overflow:hidden}.ov-workload-bar>span{display:block;height:100%;background:var(--color-chart-primary);border-radius:4px}.ov-workload-count{min-width:44px;text-align:right;flex-shrink:0}.ov-workload-count>strong{display:block;font-size:20px;line-height:1.2;font-weight:600;font-variant-numeric:tabular-nums}.ov-workload-count>small{display:block;font-size:13px;color:var(--color-text-muted);margin-top:4px}.overview-page .stock-summary{padding:18px 22px 22px}.ov-stock-total{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 10px}.ov-stock-total>strong{font-size:32px;line-height:1.2;font-weight:600;color:var(--color-brand);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;max-width:100%}.ov-stock-total>span{font-size:14px;color:var(--color-text-muted)}.overview-page .ov-stock-bar{margin:20px 0;background:var(--color-surface-subtle);height:9px;gap:0}.overview-page .ov-stock-bar>span{flex-shrink:0}.overview-page .legend{gap:12px;align-items:flex-start;font-size:14px}.overview-page .legend>span{min-width:0}.overview-page .legend>b{flex-shrink:0;text-align:right;font-variant-numeric:tabular-nums;color:var(--color-text);font-weight:600}.overview-page .ov-stock-note{padding-top:14px;border-top:1px solid var(--color-divider);margin:18px 0 10px}.ov-stock .text-link{display:inline-flex;align-items:center;gap:8px;min-height:44px}.ov-empty{padding:32px 22px;text-align:center;color:var(--color-text-muted)}.ov-empty-icon{display:grid;place-items:center;width:44px;height:44px;margin:0 auto 12px;background:var(--color-surface-subtle);color:var(--color-brand);border-radius:10px}.ov-empty h2,.ov-empty h3{font-family:inherit;font-size:16px;font-weight:600;color:var(--color-text);margin:0 0 8px}.ov-empty p{margin:0 auto;max-width:400px;font-size:14px;line-height:1.5}.ov-empty-note{font-size:14px;color:var(--color-text-muted);margin:10px 0}.overview-page .ov-footer{padding:0;margin:0;font-size:14px;line-height:1.5}.ov-footer>span{align-items:flex-start}
.ov-services-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:0 22px 4px;column-gap:28px}.ov-service{display:flex;align-items:flex-start;gap:12px;min-width:0;padding:22px 0;border-top:1px solid var(--color-divider)}.ov-service:nth-child(-n+2){border-top:0}.ov-service>div{min-width:0;overflow-wrap:anywhere}.ov-service h3{font-family:inherit;font-size:15px;font-weight:600;margin:0 0 5px;line-height:1.4}.ov-service p{font-size:14px;line-height:1.45;margin:0 0 12px;color:var(--color-text-muted)}.ov-service .badge{font-size:13px;white-space:normal}.ov-service-queue{display:flex;gap:8px 18px;flex-wrap:wrap;font-size:14px;color:var(--color-text-muted)}.ov-service-queue strong{font-size:18px;color:var(--color-text);font-variant-numeric:tabular-nums}
@media(max-width:1150px){.ov-attention{grid-template-columns:minmax(0,1fr);gap:14px}.overview-page .ov-metric{padding:16px}.overview-page .ov-metrics{gap:12px}.ov-metric .metric-top{gap:8px}.ov-metric-icon{width:28px;height:28px}.overview-page .ov-metric>strong{font-size:32px}.ov-lower-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:700px){.overview-page{gap:18px}.overview-page>.page-heading{flex-direction:column;gap:14px}.overview-page>.page-heading>.buttons{width:100%}.overview-page .page-heading h1{font-size:30px}.ov-scope{align-items:flex-start;flex-direction:column;gap:5px;padding-bottom:14px}.ov-scope>small{text-align:left}.overview-page .ov-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.overview-page .ov-metric{padding:14px}.ov-metric>small{padding-right:0}.ov-metric-link{display:none}.ov-metric .metric-top{flex-direction:row}.ov-metric-icon{width:26px;height:26px}.overview-page .ov-metric>strong{font-size:30px;margin:12px 0 8px}.ov-attention{padding:16px;gap:14px}.ov-attention-items{grid-template-columns:minmax(0,1fr);gap:8px}.ov-attention-link{min-height:48px}.overview-page .panel-head{padding:18px 16px;flex-wrap:wrap;gap:10px}.overview-page .panel-head h2{font-size:21px}.overview-page .panel-head>.text-link{min-height:44px}.overview-page .ov-stage-tabs{padding:0 10px;gap:2px}.ov-stage-tabs>.tab{flex:1 1 auto;font-size:14px;padding:10px 7px;min-height:48px}.overview-page .ov-queue .pagination{padding:12px 16px}.ov-workload-list{padding:0 16px 4px}.ov-workload-row{gap:10px;padding:15px 0}.overview-page .stock-summary{padding:16px}.ov-stock-total>strong{font-size:29px}.ov-services-grid{grid-template-columns:minmax(0,1fr);padding:0 16px 4px}.ov-service:nth-child(2){border-top:1px solid var(--color-divider)}.ov-service{padding:18px 0}.ov-footer{margin-bottom:6px}}
@media(prefers-reduced-motion:reduce){.overview-page .ov-metric{transition:none}}
.overview-page .table-wrap:focus-visible,.overview-page .table-scroll:focus-visible,.overview-page tr[data-job]:focus-visible{outline-offset:-4px}
@media print{.overview-page{display:block}.overview-page>.page-heading{margin-bottom:16px}.overview-page .ov-metric{box-shadow:none;break-inside:avoid}.overview-page .ov-attention,.overview-page .ov-stage-tabs{display:none}.overview-page .ov-lower-grid,.overview-page .ov-services-grid{display:block}.overview-page .panel,.overview-page .metric-grid{margin-bottom:16px}}

.om-thumb{display:block;width:54px;height:64px;object-fit:cover;border-radius:8px;background:var(--cream,var(--color-surface-subtle));flex-shrink:0}
.om-placeholder{display:grid;place-items:center}.om-placeholder svg{width:25px;height:25px}
.om-picker{background:var(--color-surface-subtle);border:1px solid var(--line,var(--color-divider));padding:16px;border-radius:12px}
.om-picker h3{margin:0 0 12px}.om-picker .field-grid{gap:10px}
.om-product-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:300px;overflow:auto;margin-top:12px}
.om-pick{display:flex;gap:10px;text-align:left;align-items:center;background:var(--color-surface);border:1px solid var(--color-control-border);padding:8px;border-radius:10px;color:inherit;cursor:pointer}
.om-pick>span{flex:1;min-width:0}.om-pick strong,.om-pick small{display:block;overflow-wrap:anywhere}.om-pick strong{font-size:13px;line-height:1.4}.om-pick small{font-size:11px;color:var(--color-text-muted);margin-top:4px}.om-pick>svg{width:18px;height:18px;flex-shrink:0}.om-pick:hover{border-color:var(--color-control-border)}
.om-order-card{padding:18px;border:1px solid var(--color-divider);border-radius:12px;background:var(--color-surface);margin-bottom:16px}
.om-card-head{display:flex;gap:12px;align-items:center;margin-bottom:16px}.om-card-head>div:first-of-type{flex:1;min-width:0}.om-card-head h3{margin:0;font-size:18px;overflow-wrap:anywhere}.om-card-head small{color:var(--color-text-muted)}
.om-order-form details{border:1px solid var(--color-divider);border-radius:8px;padding:12px}.om-order-form summary{cursor:pointer;font-weight:600;font-size:13px}.om-order-form details .field-grid{margin-top:12px}
.om-order-form textarea{min-height:85px}.om-order-form .addon-panel{padding:12px}.om-draft-tools{display:flex;gap:8px}
.om-primary-material{min-width:0}.om-primary-material>.field{margin:0}.om-primary-material .hint{margin-bottom:0}.om-additional-materials{min-width:0}.om-additional-list{display:grid;gap:10px;margin:10px 0}.om-additional-row{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) 44px;gap:10px;align-items:end}.om-additional-row>.field{margin:0;min-width:0}.om-additional-row>.button{width:44px;height:44px;padding:10px}.om-revision-materials{min-width:0}.om-revision-materials .om-additional-materials{border:1px solid var(--color-divider);border-radius:8px;padding:12px}.om-revision-materials summary{cursor:pointer;font-weight:600}
.om-material-instructions{padding:14px 16px;margin:14px 0 18px;border:1px solid var(--color-divider);border-radius:8px;background:var(--color-surface-subtle);overflow-wrap:anywhere}.om-material-instructions h2{font-size:18px;margin:0 0 12px}.om-material-instructions h3{font-size:14px;margin:14px 0 8px}.om-material-role{display:block;font-size:14px;font-weight:600;color:var(--color-brand);margin-bottom:3px}.om-material-instructions strong{display:block}.om-material-identification,.om-material-purpose{font-size:14px;line-height:1.5;margin:4px 0;color:var(--color-text)}.om-material-purpose>span{font-weight:600}.om-material-selected{list-style:none;padding:0;margin:0;display:grid;gap:10px}.om-material-selected>li{border-top:1px solid var(--color-divider);padding-top:10px}.om-material-instructions>.hint{margin-bottom:0}
@media(max-width:650px){.om-additional-row{grid-template-columns:minmax(0,1fr) 44px}.om-additional-row>.field:first-child{grid-column:1/-1}.om-additional-row>.field:nth-child(2){grid-column:1}.om-additional-row>.button{grid-column:2}.om-material-instructions{padding:12px}}
@media print{.om-material-primary,.om-material-selected>li{break-inside:avoid}.om-material-instructions{background:var(--color-print-surface);color:var(--color-print-text)}.om-material-instructions h2{font-size:16px}.om-material-role,.om-material-identification,.om-material-purpose{color:var(--color-print-text);font-size:12px}}
.om-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:10px;padding:16px;border-bottom:1px solid var(--color-divider);align-items:end}
.om-filters .searchbox{grid-column:span 2;height:40px;align-self:end}.om-filters label{font-size:11px}.om-filters input,.om-filters select{padding:8px;font-size:12px;min-height:40px}.om-filters .field{min-width:0;margin:0}
.om-filter-chips{display:flex;gap:8px;flex-wrap:wrap;padding:12px 16px}.om-filter-chips button{cursor:pointer}
.om-stage-tabs{overflow:auto;flex-wrap:nowrap}.om-stage-tabs .tab{flex-shrink:0;white-space:nowrap}
.om-private-tab svg,.om-private-label svg{height:12px;width:12px;vertical-align:middle;margin-right:5px}.om-private-label{color:var(--color-text-muted)}
.om-queue td{vertical-align:middle}.om-queue .product-cell>div{min-width:170px}.om-queue .product-cell span{display:block;font-size:13px}.om-option-summary{display:grid;gap:4px;font-size:12px;max-width:230px;white-space:normal;min-width:140px}.om-option-summary small{margin-top:3px}
.om-job .job-meta strong,.om-job .job-meta small{display:block}.om-job .job-meta strong{font-size:20px;margin-top:6px}.om-job .job-meta small{font-size:11px;color:var(--color-text-muted)}
.om-job .stage-track{margin:20px 0}.om-job .stage-step{font-size:12px}
.om-my-step{display:flex;gap:12px;align-items:end;margin-top:16px;padding:12px;background:var(--color-surface-subtle);border-radius:9px}.om-my-step .field{flex:1;margin:0}.om-my-step select{font-size:13px}.om-my-step label{font-size:11px}
.om-important{background:var(--color-surface-subtle);border-left:3px solid var(--color-control-border);padding:14px!important}.om-job .spec p,.om-verbatim,.om-job .comment p{white-space:pre-wrap;overflow-wrap:anywhere}
.om-job .specs:empty{display:none}.om-legacy{margin-top:16px}.om-legacy summary{font-size:12px;cursor:pointer}.om-job-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.om-job-gallery a{color:inherit;text-decoration:none;min-width:0}.om-job-gallery img{width:100%;height:180px;border-radius:8px;object-fit:contain;background:var(--color-surface-subtle)}.om-job-gallery small{display:block;font-size:11px;overflow-wrap:anywhere;margin-top:5px}
.om-peer{display:block;margin-bottom:14px;color:inherit;text-decoration:none}.om-peer small{display:block;font-size:12px;margin-top:4px}.om-confirm{display:flex;align-items:center;gap:8px}.om-confirm input{width:auto}
.om-step-row{display:grid;grid-template-columns:1fr 1fr auto auto;gap:10px;align-items:end;padding:12px 0;border-bottom:1px solid var(--color-divider)}.om-step-row .field{margin:0;min-width:0}
@media(max-width:650px){.om-product-picker{grid-template-columns:1fr}.om-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.om-filters .searchbox{grid-column:1/-1}.om-card-head{flex-wrap:wrap}.om-card-head h3{font-size:16px}.om-order-card{padding:12px}.om-job-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.om-job-gallery img{height:140px}.om-my-step{flex-wrap:wrap}.om-my-step .field{flex-basis:100%}.om-step-row{grid-template-columns:1fr auto auto}.om-step-row>.field:nth-child(2){grid-row:2;grid-column:1/-1}}
@media print{.om-job-gallery{grid-template-columns:repeat(4,1fr)}.om-job-gallery img{height:130px}.om-legacy{display:block}.om-legacy>.specs{display:grid}.om-job .panel{break-inside:auto}.om-job .spec,.om-job-gallery a{break-inside:avoid}.om-my-step,.om-private-label,.om-private-tab,.om-filters,.om-filter-chips{display:none!important}}
.om-order-form [hidden],#modal-form [data-action="om-undo-step"][hidden]{display:none!important}
.om-queue-controls>summary{cursor:pointer;padding:12px 16px;font-size:13px;color:var(--color-text-muted)}.om-queue-controls[open]>summary{border-bottom:1px solid var(--color-divider)}
.om-job .stage-track{display:flex;overflow:auto}.om-job .stage-step{flex:1;min-width:90px}.om-private-track{font-style:italic}.om-private-track svg{width:12px;height:12px;margin-right:5px;vertical-align:middle}
@media(max-width:650px){.om-job .stage-step{min-width:68px;white-space:normal}}
@media(max-width:650px){
 .om-queue{display:block;min-width:0;width:100%;white-space:normal}.om-queue thead{display:none}.om-queue tbody{display:block}
 .om-queue tr{display:grid;grid-template-columns:1fr 1fr;padding:14px;border-bottom:1px solid var(--color-divider);gap:8px}
 .om-queue td{display:block;padding:0;border:0;min-width:0;white-space:normal;font-size:13px}.om-queue td:first-child,.om-queue td:nth-child(2){grid-column:1/-1}
 .om-queue td:nth-child(3){grid-column:1/-1}.om-queue .product-cell>div{min-width:0}.om-queue .om-option-summary{max-width:none;min-width:0;display:flex;flex-wrap:wrap;gap:5px 12px}.om-queue .om-option-summary small{flex-basis:100%}
 .om-queue td small{font-size:12px}.om-queue td:last-child{grid-column:1/-1;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
}
.om-stage-tabs .om-tab-count{margin-left:4px;font-size:12px;font-weight:500;color:var(--color-text-muted)}.om-tabs-header{display:flex;align-items:stretch;border-bottom:1px solid var(--line)}.om-tabs-header .om-stage-tabs{flex:1;min-width:0;border-bottom:0}.om-edit-tabs{flex-shrink:0;background:var(--color-surface);padding-left:12px!important;padding-right:12px!important}.om-edit-tabs svg{width:20px;height:20px}
.om-queue-actions{display:flex;align-items:center;gap:14px;padding:12px 16px;border-bottom:1px solid var(--color-divider);flex-wrap:wrap}.om-queue-actions label{display:flex;align-items:center;gap:8px;font-size:13px}.om-queue-actions>span{font-size:12px;color:var(--color-text-muted)}.om-queue-actions>button{margin-left:auto}
.om-queue-actions input,.om-ticket-select{width:18px!important;height:18px!important;min-width:18px;accent-color:var(--color-brand);margin:0}.om-ticket-select{align-self:flex-start;margin-top:5px}.om-move-ticket{padding:7px!important;margin:5px 0 0 8px}.om-move-ticket svg{width:18px;height:18px}
@media(max-width:650px){.om-queue-actions{gap:8px}.om-queue-actions label{font-size:12px}.om-queue-actions>button{font-size:12px;padding:8px}.om-move-ticket{margin:0 0 0 auto}.om-stage-tabs{gap:12px}.om-stage-tabs .tab{font-size:13px}}
@media print{.om-queue-actions,.om-ticket-select,.om-edit-tabs,.om-move-ticket,.om-personal-badge{display:none!important}}
@media print{.om-private-track{display:none!important}}

.badge.completed{background:var(--color-success-bg);color:var(--color-brand)}
.om-rework-notes{padding:16px;margin:16px 0;border:1px solid var(--color-warning-border);border-left:4px solid var(--color-warning-border);border-radius:8px;background:var(--color-warning-bg)}.om-rework-notes h2{font-size:18px;margin:0 0 8px}.om-rework-notes p{margin:6px 0;white-space:pre-wrap;overflow-wrap:anywhere}

.om-queue-buttons{margin-left:auto}.om-selection-hint,#om-selection-hint{flex-basis:100%;color:var(--color-warning-text)!important}#om-selection-hint:empty{display:none}.om-next-ticket{padding:7px!important;margin:5px 0 0 8px}.om-next-ticket svg{width:18px;height:18px}
@media(max-width:650px){.om-next-ticket{margin:0 0 0 auto}.om-next-ticket+.om-move-ticket{margin-left:0}}
@media print{.om-next-ticket{display:none!important}}

.material-use-review{border:1px solid var(--line);border-radius:8px;padding:14px}.material-use-review h3{font-size:16px;margin:0 0 12px;overflow-wrap:anywhere}.material-use-review h4{font-size:14px;margin:0 0 8px}.material-use-review td,.material-use-review th{white-space:normal;padding:10px 12px}.material-use-review .notice{margin:8px 0}.material-review-confirm{padding:14px;background:var(--color-selected-bg);border:1px solid var(--color-control-border);border-radius:8px;align-items:flex-start!important}.material-review-confirm input{width:20px!important;height:20px;flex-shrink:0;margin-top:2px}.material-review-confirm span{white-space:normal}

.usage-row{grid-template-columns:minmax(0,1fr) 120px 90px}.usage-row>.field{min-width:0}.usage-row>.field:nth-child(4){grid-column:1/3}.usage-row>button{justify-self:end}
@media(max-width:650px){.usage-row{grid-template-columns:minmax(0,1fr) 90px;gap:12px}.usage-row>.field:first-child,.usage-row>.field:nth-child(4){grid-column:1/-1}.usage-row>button{grid-column:2}}

/* Orders form and office ticket polish. Screen-only; print instructions and
   all existing controls, disclosure states and ordering remain unchanged. */
@media screen{
 .om-order-form{align-items:start;row-gap:6px}
 .om-order-form>.hint{grid-column:1/-1;margin:0 0 16px;line-height:1.6}
 .om-order-form .field>label{color:var(--color-text);font-size:14px}
 .om-order-form :is(input:not([type=checkbox]):not([type=radio]),select,textarea){max-width:100%;border-radius:8px}
 .om-order-form textarea{min-height:96px;resize:vertical}
 .om-order-form .om-picker{padding:18px;background:var(--color-surface-raised);border-color:var(--color-divider);border-radius:12px}
 .om-order-form .om-picker h3{margin:0 0 14px;font-size:18px;line-height:1.35}
 .om-order-form .om-picker .field-grid{gap:14px}
 .om-order-form .om-product-picker{gap:10px;padding:2px;scrollbar-gutter:stable}
 .om-order-form .om-pick{gap:12px;border-color:var(--color-control-border);padding:10px;transition:background-color .15s,border-color .15s}
 .om-order-form .om-pick:hover{background:var(--color-surface-hover);border-color:var(--color-brand)}
 .om-order-form .om-pick:focus-visible{outline-offset:-4px}
 .om-order-form .om-pick strong{font-size:14px;line-height:1.45;color:var(--color-text)}
 .om-order-form .om-pick small{font-size:12px;line-height:1.45}
 .om-order-form .om-pick>svg{color:var(--color-brand)}
 .om-order-form .om-thumb{width:48px;height:64px;border:1px solid var(--color-divider)}
 .om-order-form .om-picker .pagination{gap:10px;margin-top:12px;padding-top:12px;border-top:1px solid var(--color-divider);flex-wrap:wrap}
 .om-order-form #order-lines{margin-bottom:0}
 .om-order-form .om-order-card{padding:20px;margin-bottom:18px;box-shadow:0 2px 6px var(--color-shadow-soft)}
 .om-order-form .om-card-head{gap:14px;padding-bottom:16px;margin-bottom:18px;border-bottom:1px solid var(--color-divider)}
 .om-order-form .om-card-head h3{font-size:19px;line-height:1.35;margin-bottom:5px}
 .om-order-form .om-card-head small{font-size:13px;line-height:1.45;overflow-wrap:anywhere}
 .om-order-form .om-card-head .buttons{gap:6px;flex-shrink:0}
 .om-order-form .om-card-head .button{background:var(--color-surface-raised)}
 .om-order-form .om-card-head .button:hover{background:var(--color-surface-hover)}
 .om-order-form .om-order-card>.field-grid{gap:16px}
 .om-order-form .om-order-card>.field-grid>.field{margin-bottom:0}
 .om-order-form .line-fields>.field-grid:empty{display:none}
 .om-order-form .om-material-hint{font-size:13px;line-height:1.55;margin-top:8px}
 .om-order-form .om-additional-row{padding:12px;background:var(--color-surface);border:1px solid var(--color-divider);border-radius:8px}
 .om-order-form details{padding:14px 16px;background:var(--color-surface-raised);border-radius:10px}
 .om-order-form summary{font-size:14px;line-height:1.5;color:var(--color-text);padding:4px 0;min-height:44px;align-content:center}
 .om-order-form details[open]>summary{margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid var(--color-divider)}
 .om-order-form details .field:last-child{margin-bottom:0}
 .om-order-form .om-rate-slot:empty,.om-order-form #om-reference-slot:empty{margin:0}
 .om-order-form .om-rate-slot .hint{font-size:13px;margin-bottom:0}
 .om-order-form .om-draft-tools{gap:10px;flex-wrap:wrap;margin-bottom:18px}
 .om-order-form #private-order-fields:empty{margin:0}

 .om-job .job-meta{gap:12px}
 .om-job .job-meta>div{min-width:0;padding:14px 16px;background:var(--color-surface-raised);border:1px solid var(--color-divider);border-radius:9px}
 .om-job .job-meta small{font-size:12px;font-weight:600;line-height:1.4}
 .om-job .job-meta strong{font-size:20px;line-height:1.4;margin-top:5px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
 .om-job .stage-track{gap:10px;margin:20px 0 22px}
 .om-job .stage-step{font-size:13px;font-weight:600;line-height:1.5;padding-top:10px}
 .om-job .stage-step.done{color:var(--color-brand)}
 .om-job .panel-body>.buttons{margin-bottom:20px}
 .om-job .subheading{margin-top:24px;margin-bottom:12px;font-size:18px;line-height:1.4}
 .om-job .specs{gap:12px}
 .om-job .spec:not(.om-important){min-width:0;padding:12px 14px;background:var(--color-surface-raised);border:1px solid var(--color-divider);border-radius:8px}
 .om-job .spec small{font-size:13px;font-weight:600;color:var(--color-text-muted);line-height:1.5}
 .om-job .spec p{margin:6px 0 0;line-height:1.65}
 .om-job .om-important{border-left-color:var(--color-selected-border);border-radius:0 8px 8px 0}
 .om-job .om-material-instructions{padding:16px 18px;border-radius:10px;margin:18px 0;background:var(--color-surface-raised)}
 .om-job .om-material-role{font-size:13px;line-height:1.5;margin-bottom:4px}
 .om-job .om-material-primary>strong,.om-job .om-material-selected strong{line-height:1.5}
 .om-job .om-material-identification,.om-job .om-material-purpose{font-size:14px;line-height:1.6}
 .om-job .om-job-gallery{gap:14px}
 .om-job .om-job-gallery a{padding:6px;border:1px solid var(--color-divider);border-radius:10px}
 .om-job .om-job-gallery a:hover{border-color:var(--color-control-border);background:var(--color-surface-raised)}
 .om-job .om-job-gallery small{font-size:12px;line-height:1.5;margin:8px 4px 3px}
 .om-job .detail-aside .panel-body{padding:18px}
 .om-job .summary-list strong{font-variant-numeric:tabular-nums;overflow-wrap:anywhere;text-align:right}
 .om-job .om-peer{padding:12px;border:1px solid var(--color-divider);border-radius:8px;background:var(--color-surface-raised);margin-bottom:10px;overflow-wrap:anywhere}
 .om-job .om-peer:hover{border-color:var(--color-control-border);background:var(--color-surface-hover)}
 .om-job .om-peer strong{font-size:14px;line-height:1.5}
 .om-job .om-peer small{font-size:13px;line-height:1.5;margin-top:5px}
 .material-use-review{padding:16px;border-radius:10px;background:var(--color-surface-raised)}
 .material-use-review h3{font-size:17px;line-height:1.45;margin-bottom:14px}
 .material-use-review h4{font-size:14px;line-height:1.5;color:var(--color-text)}
 .material-use-review .notice{border-radius:8px}
}
@media screen and (max-width:650px){
 .om-order-form .om-picker{padding:14px}
 .om-order-form .om-order-card{padding:14px}
 .om-order-form .om-card-head{gap:12px;padding-bottom:14px;margin-bottom:16px}
 .om-order-form .om-card-head h3{font-size:17px}
 .om-order-form .om-card-head>.buttons{flex-basis:100%;justify-content:flex-end;flex-shrink:1}
 .om-order-form .om-card-head .button{min-height:44px}
 .om-order-form .om-order-card>.field-grid{gap:14px}
 .om-order-form details{padding:12px}
 .om-order-form summary{min-height:44px}
 .om-order-form .om-additional-row{padding:10px}
 .om-order-form .om-picker .pagination>.buttons{margin-left:auto}
 .om-order-form .om-draft-tools>.button{flex:1}
 .om-job .job-meta{gap:8px}
 .om-job .job-meta>div{padding:10px}
 .om-job .job-meta strong{font-size:17px}
 .om-job .job-meta small{font-size:12px}
 .om-job .stage-track{gap:8px}
 .om-job .stage-step{font-size:12px}
 .om-job .spec:not(.om-important){padding:12px}
 .om-job .om-material-instructions{padding:14px}
 .om-job .detail-aside .panel-body{padding:16px}
 .material-use-review{padding:12px}
}

/* Orders presentation is scoped so the compact Overview queue stays unchanged. */
.om-mobile-label{display:none}
@media screen{
 .orders-page{display:grid;gap:22px;min-width:0}
 .orders-page>.page-heading{margin:0;gap:20px;align-items:flex-start}
 .orders-page>.page-heading>div{min-width:0}
 .orders-page .page-heading h1{font-size:34px;line-height:1.2}
 .orders-page .page-heading p{line-height:1.6;margin-top:8px}
 .orders-page>.page-heading>.buttons{flex-shrink:0;justify-content:flex-end;gap:8px;max-width:52%}
 .orders-page .page-heading .button{min-height:44px}
 .orders-page .om-queue-panel{margin:0;min-width:0;border-radius:12px;overflow:hidden;box-shadow:0 2px 6px var(--color-shadow-soft)}
 .orders-page .om-tabs-header{padding:10px 12px 0;gap:8px;background:var(--color-surface)}
 .orders-page .om-stage-tabs{gap:4px;padding:0;scroll-padding-inline:4px;align-items:stretch}
 .orders-page .om-stage-tabs .tab{display:flex;gap:8px;align-items:center;min-height:48px;padding:11px 12px;border-bottom-width:3px;border-radius:7px 7px 0 0;font-size:14px;font-weight:500;line-height:1.4}
 .orders-page .om-stage-tabs .tab:hover{background:var(--color-surface-hover)}
 .orders-page .om-stage-tabs .tab.active{background:var(--color-selected-bg);color:var(--color-brand);border-bottom-color:var(--color-brand);font-weight:650}
 .orders-page .om-tab-count{min-width:24px;margin:0;padding:2px 6px;border-radius:5px;font-size:12px;line-height:1.5;text-align:center;font-variant-numeric:tabular-nums;background:var(--color-surface-subtle);color:var(--color-text-muted)}
 .orders-page .tab.active .om-tab-count{background:var(--color-surface);color:var(--color-brand)}
 .orders-page .om-private-tab{font-style:italic}
 .orders-page .om-edit-tabs{align-self:center;min-width:44px;min-height:44px;padding:10px!important;border:1px solid var(--color-control-border);border-radius:7px;margin-bottom:8px}
 .orders-page .om-tabs-header :focus-visible{outline-offset:-4px}
 .orders-page .om-queue-controls{background:var(--color-surface-raised)}
 .orders-page .om-queue-controls>summary{min-height:48px;padding:13px 20px;color:var(--color-text);font-size:14px;font-weight:600}
 .orders-page .om-queue-controls>summary:hover{background:var(--color-surface-hover)}
 .orders-page .om-filters{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 16px;padding:16px 20px 20px}
 .orders-page .om-filters .searchbox{grid-column:span 2;min-width:0;height:44px;border-color:var(--color-control-border);background:var(--color-surface);padding-inline:12px}
 .orders-page .om-filters .searchbox>svg{color:var(--color-text-muted);width:18px;height:18px}
 .orders-page .om-filters .searchbox input{width:100%;min-width:0;padding:10px 0;border:0;border-radius:0;background:transparent}
 .orders-page .om-filters label{font-size:12px;font-weight:600;line-height:1.5;color:var(--color-text-muted);margin-bottom:6px}
 .orders-page .om-filters input,.orders-page .om-filters select{font-size:14px;min-height:44px;border-radius:6px}
 .orders-page .om-filter-chips{gap:8px;padding:12px 20px;border-bottom:1px solid var(--color-divider)}
 .orders-page .om-filter-chips .chip{display:inline-flex;align-items:center;text-align:left;white-space:normal;overflow-wrap:anywhere;min-height:36px;line-height:1.5;font-size:13px;border:1px solid var(--color-control-border);background:var(--color-surface-raised);color:var(--color-text);border-radius:6px}
 .orders-page .om-filter-chips .button{margin-left:auto;min-height:36px;font-size:13px}
 .orders-page .om-queue-actions{padding:12px 20px;gap:10px 16px;background:var(--color-surface);min-height:68px}
 .orders-page .om-queue-actions label{margin:0;font-size:13px;min-height:44px;line-height:1.4}
 .orders-page #om-selection-count{font-size:13px;font-variant-numeric:tabular-nums}
 .orders-page .om-queue-buttons{gap:8px;flex-wrap:wrap}
 .orders-page .om-queue-buttons .button{min-height:44px;font-size:13px}
 .orders-page #om-selection-hint{font-size:13px;line-height:1.5}
 .orders-page .om-queue{table-layout:fixed;width:100%;min-width:0;white-space:normal}
 .orders-page .om-queue th{font-size:12px;line-height:1.5;letter-spacing:.055em;font-weight:650;color:var(--color-text-muted);background:var(--color-surface-subtle);padding:12px 14px;white-space:normal;vertical-align:bottom}
 .orders-page .om-queue th:first-child,.orders-page .om-queue td:first-child{padding-left:20px}
 .orders-page .om-queue th:last-child,.orders-page .om-queue td:last-child{padding-right:20px}
 .orders-page th.om-col-product{width:29%}
 .orders-page th.om-col-configuration{width:21%}
 .orders-page th.om-col-business{width:16%}
 .orders-page th.om-col-quantity{width:8%;text-align:right}
 .orders-page th.om-col-due{width:11%}
 .orders-page th.om-col-stage{width:15%}
 .orders-page .om-queue td{padding:18px 14px;vertical-align:top;font-size:14px;line-height:1.55;white-space:normal;overflow-wrap:anywhere;border-bottom:1px solid var(--color-divider);background:var(--color-surface)}
 .orders-page .om-queue tbody>tr:last-child>td{border-bottom:0}
 .orders-page .om-queue tr:hover>td{background:var(--color-surface-raised)}
 .orders-page .om-queue tr:has(.om-ticket-select:checked)>td{background:var(--color-selected-bg)}
 .orders-page .om-queue tr:has(.om-ticket-select:checked)>td:first-child{box-shadow:inset 3px 0 var(--color-selected-border)}
 .orders-page .om-queue tr:focus-visible{outline-offset:-4px}
 .orders-page .om-queue .product-cell{gap:10px;align-items:flex-start;min-width:0}
 .orders-page .om-queue .product-cell>div{min-width:0;flex:1}
 .orders-page .om-queue .om-thumb{width:48px;height:64px;border:1px solid var(--color-divider);border-radius:7px}
 .orders-page .om-ticket-select{align-self:flex-start;margin-top:3px}
 .orders-page .om-queue .om-ticket-number{font-size:15px;font-weight:700;color:var(--color-brand);line-height:1.4;font-variant-numeric:tabular-nums}
 .orders-page .om-queue .om-order-reference{font-size:12px;margin:3px 0 7px;line-height:1.5;color:var(--color-text-muted)}
 .orders-page .om-queue .om-product-title{font-size:14px;font-weight:600;line-height:1.5;color:var(--color-text)}
 .orders-page .om-queue .om-product-reference,.orders-page .om-queue .om-sale-reference{font-size:12px;line-height:1.55;margin-top:5px;color:var(--color-text-muted)}
 .orders-page .om-option-summary{min-width:0;max-width:none;font-size:13px;line-height:1.6;gap:5px}
 .orders-page .om-option-summary b{font-weight:600;color:var(--color-text)}
 .orders-page .om-option-summary small{font-size:12px;line-height:1.6;padding-top:6px;margin-top:3px;border-top:1px solid var(--color-divider)}
 .orders-page td.om-col-business>strong{display:block;font-size:13px;font-weight:600;line-height:1.6}
 .orders-page td.om-col-business>small{font-size:12px;line-height:1.6;margin-top:5px}
 .orders-page td.om-col-quantity{text-align:right;font-variant-numeric:tabular-nums}
 .orders-page .om-quantity-value{font-weight:650;font-size:15px}
 .orders-page .om-quantity-unit{display:block;font-size:12px;color:var(--color-text-muted)}
 .orders-page .om-due-date{font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}
 .orders-page .om-col-due small{font-size:12px;margin-top:5px}
 .orders-page .om-col-due.overdue .om-due-date{color:var(--color-error-text)}
 .orders-page .om-stage-layout{display:grid;gap:10px}
 .orders-page .om-stage-info{min-width:0}
 .orders-page .om-stage-info small{font-size:12px;line-height:1.5;margin-top:6px}
 .orders-page .om-stage-info .badge{font-size:12px;line-height:1.5;max-width:100%;white-space:normal;padding:5px 8px}
 .orders-page .om-ticket-actions{display:flex;gap:6px;flex-wrap:wrap}
 .orders-page .om-ticket-actions:empty{display:none}
 .orders-page .om-ticket-actions .button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;padding:10px!important;margin:0;border-radius:7px}
 .orders-page .pagination{padding:14px 20px;gap:12px;flex-wrap:wrap;background:var(--color-surface-raised);font-size:13px;line-height:1.5}
 .orders-page .pagination>.buttons{align-items:center;gap:8px;margin-left:auto;font-variant-numeric:tabular-nums}
 .orders-page .pagination .button{min-width:44px;min-height:44px;font-size:13px}
 .orders-page .empty{padding:48px 20px}
 .orders-page .empty h3{color:var(--color-text);margin-bottom:10px}
}
@media screen and (max-width:1100px){
 .orders-page>.page-heading{flex-wrap:wrap;gap:14px}
 .orders-page>.page-heading>.buttons{max-width:100%;justify-content:flex-start}
 .orders-page .om-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
 .orders-page .om-filters .searchbox{grid-column:1/-1}
 .orders-page th.om-col-product{width:28%}
 .orders-page th.om-col-configuration{width:20%}
 .orders-page th.om-col-business{width:15%}
 .orders-page th.om-col-quantity{width:9%}
 .orders-page th.om-col-due{width:12%}
 .orders-page th.om-col-stage{width:16%}
 .orders-page .om-queue td,.orders-page .om-queue th{padding-inline:10px}
 .orders-page .om-queue th:first-child,.orders-page .om-queue td:first-child{padding-left:16px}
 .orders-page .om-queue th:last-child,.orders-page .om-queue td:last-child{padding-right:16px}
}
@media screen and (max-width:800px){
 .orders-page{gap:18px}
 .orders-page .page-heading h1{font-size:30px}
 .orders-page .page-heading p{font-size:13px}
 .orders-page>.page-heading>.buttons{width:100%;gap:8px}
 .orders-page .page-heading .buttons .button[data-action=export]{display:inline-flex}
 .orders-page .om-tabs-header{padding:8px 8px 0;gap:4px}
 .orders-page .om-stage-tabs{gap:2px}
 .orders-page .om-stage-tabs .tab{padding:11px 10px;font-size:13px}
 .orders-page .om-tab-count{min-width:22px;font-size:12px}
 .orders-page .om-edit-tabs{margin-bottom:6px}
 .orders-page .om-queue-controls>summary{padding-inline:14px}
 .orders-page .om-filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px;gap:12px}
 .orders-page .om-filters input,.orders-page .om-filters select{font-size:16px}
 .orders-page .om-filter-chips{padding:12px 14px}
 .orders-page .om-filter-chips .chip,.orders-page .om-filter-chips .button{min-height:44px}
 .orders-page .om-queue-actions{padding:10px 14px;gap:4px 12px}
 .orders-page .om-queue-actions label{font-size:12px}
 .orders-page #om-selection-count{margin-left:auto;font-size:12px}
 .orders-page .om-queue-buttons{width:100%;margin:4px 0 0;justify-content:flex-end}
 .orders-page .om-queue-buttons .button{flex:1;white-space:normal}
 .orders-page .om-queue,.orders-page .om-queue tbody{display:block;width:100%;min-width:0}
 .orders-page .om-queue thead{display:table-header-group;position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .orders-page .om-queue tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px;padding:18px 14px;border-bottom:1px solid var(--color-divider);background:var(--color-surface)}
 .orders-page .om-queue tbody>tr:last-child{border-bottom:0}
 .orders-page .om-queue tr:hover{background:var(--color-surface-raised)}
 .orders-page .om-queue tr:has(.om-ticket-select:checked){background:var(--color-selected-bg);box-shadow:inset 3px 0 var(--color-selected-border)}
 .orders-page .om-queue td,.orders-page .om-queue td:first-child,.orders-page .om-queue td:last-child{display:block;min-width:0;padding:0;border:0;background:transparent;box-shadow:none;text-align:left}
 .orders-page .om-queue tr:hover>td,.orders-page .om-queue tr:has(.om-ticket-select:checked)>td{background:transparent}
 .orders-page .om-queue tr:has(.om-ticket-select:checked)>td:first-child{box-shadow:none}
 .orders-page td.om-col-product,.orders-page td.om-col-configuration,.orders-page td.om-col-business,.orders-page td.om-col-stage{grid-column:1/-1}
 .orders-page td.om-col-quantity,.orders-page td.om-col-due{grid-column:auto}
 .orders-page .om-mobile-label{display:block;font-size:12px;font-weight:600;line-height:1.5;color:var(--color-text-muted);letter-spacing:.035em;margin-bottom:5px}
 .orders-page .om-queue .product-cell{gap:10px}
 .orders-page .om-queue .om-thumb{width:54px;height:72px}
 .orders-page .om-queue .om-ticket-number{font-size:16px}
 .orders-page .om-queue .om-order-reference{display:inline-block;margin:3px 0 7px}
 .orders-page .om-queue .om-product-title{font-size:15px}
 .orders-page .om-option-summary{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13px}
 .orders-page .om-option-summary small{flex-basis:100%;margin-top:3px}
 .orders-page td.om-col-business{padding-top:12px;border-top:1px solid var(--color-divider)}
 .orders-page td.om-col-business>strong{display:inline;font-size:13px}
 .orders-page td.om-col-business>small{display:block;margin-top:3px}
 .orders-page .om-quantity-value{font-size:16px}
 .orders-page .om-quantity-unit{display:inline;font-size:13px}
 .orders-page .om-due-date{font-size:14px}
 .orders-page td.om-col-stage{padding-top:12px;border-top:1px solid var(--color-divider)}
 .orders-page .om-stage-layout{display:flex;gap:12px;align-items:center;justify-content:space-between}
 .orders-page .om-ticket-actions{flex-shrink:0;flex-wrap:nowrap;margin-left:auto}
 .orders-page .pagination{padding:12px 14px;gap:10px}
 .orders-page .pagination>span{flex-basis:100%}
 .orders-page .pagination>.buttons{width:100%;margin:0;justify-content:space-between}
}

.production-sheet{padding-bottom:30px}.ps-heading{display:flex;align-items:start;justify-content:space-between;gap:16px;margin:4px 0 20px}.ps-heading h1{font-size:28px;line-height:1.3;margin:8px 0}.ps-heading p{margin:5px 0;color:var(--color-text-muted)}.ps-heading .eyebrow{font-size:12px}.ps-ticket{display:inline-block;color:var(--color-brand);font-family:system-ui,sans-serif;font-weight:750;margin-right:8px;letter-spacing:.02em}
.ps-facts{display:flex;flex-wrap:wrap;gap:24px;background:var(--color-surface);border:1px solid var(--color-divider);padding:16px 20px;border-radius:10px;margin-bottom:14px}.ps-facts>div{flex:1;min-width:85px}.ps-facts small{display:block;color:var(--color-text-muted);font-size:12px;margin-bottom:5px}.ps-facts strong{font-size:22px}.ps-facts .badge{margin-top:5px}
.ps-choices{background:var(--color-selected-bg);padding:14px 18px;border-radius:10px;margin-bottom:18px}.ps-choices .specs{display:flex;gap:14px 28px;flex-wrap:wrap}.ps-choices .spec{min-width:90px;padding:0;flex:1;background:none;border:0}.ps-choices .spec.wide{flex-basis:100%}.ps-choices .spec p{margin:5px 0;font-size:17px;font-weight:650}.ps-primary{border-top:1px solid var(--color-divider);padding-top:12px;margin-top:10px}.ps-primary small,.ps-primary strong{display:block}.ps-primary small{font-size:12px;color:var(--color-text-muted);margin-bottom:5px}
.ps-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px;align-items:start}.ps-media,.ps-instructions{min-width:0;background:var(--color-surface);border:1px solid var(--color-divider);border-radius:12px;padding:18px}.production-sheet h2{font-size:21px;margin:0 0 16px}.production-sheet h3{font-size:16px;margin:18px 0 10px}.ps-main-images{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.ps-main-images.has-sketch{grid-template-columns:repeat(2,minmax(0,1fr))}.ps-image{margin:0;min-width:0}.ps-image>button{display:block;width:100%;padding:0;border:1px solid var(--color-control-border);border-radius:8px;background:var(--color-surface-raised);cursor:zoom-in}.ps-image img{width:100%;height:360px;display:block;object-fit:contain}.ps-image figcaption{font-size:12px;font-weight:600;margin:8px 0;overflow-wrap:anywhere}.ps-image figcaption span{font-weight:400;color:var(--color-text-muted);display:block;margin-top:3px}.ps-thumbnails{display:flex;gap:8px;overflow:auto;padding:8px 0}.ps-thumbnails button{padding:3px;background:var(--color-surface);border:2px solid transparent;border-radius:8px;cursor:pointer;flex-shrink:0}.ps-thumbnails button[aria-pressed=true]{border-color:var(--color-brand)}.ps-thumbnails img{width:68px;height:78px;object-fit:contain;display:block}.ps-order-images{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.ps-order-images img{height:220px}
.ps-instructions .specs{display:block}.ps-instructions .spec{margin-bottom:14px;padding:0 0 12px;border-bottom:1px solid var(--color-divider)}.ps-instructions .spec small{font-size:12px;font-weight:650;color:var(--color-text)}.ps-instructions .spec p,.ps-comments p{font-size:17px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;margin:5px 0 0;color:var(--color-text)}.ps-instructions .om-important{padding:12px!important;background:var(--color-surface-subtle);border:0;border-left:3px solid var(--color-selected-border);border-radius:4px}.ps-instructions .spec small{display:block}.ps-comments{margin-top:18px}.ps-comments .comment small{font-size:12px}.ps-handover{border-top:1px solid var(--color-divider);padding-top:14px;margin-top:18px}.ps-handover p{font-size:14px}
.ps-secondary{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;margin-top:18px}.ps-secondary>details{padding:14px;background:var(--color-surface);border:1px solid var(--color-divider);border-radius:9px}.ps-secondary summary{font-size:14px;cursor:pointer;font-weight:600}.ps-secondary .field{margin-top:12px}.ps-secondary .om-peer{margin-top:14px}.ps-snapshot{font-size:12px}
.ps-action-bar{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:12px;padding:12px;background:var(--color-glass-surface);border:1px solid var(--color-divider);border-radius:12px;z-index:20;box-shadow:0 -5px 18px var(--color-shadow-soft)}.ps-action-bar .primary{min-width:200px}.ps-photo-dialog{max-width:1100px!important}.ps-photo-tools{justify-content:center;margin-bottom:12px}.ps-photo-tools>span{font-size:13px}.ps-photo-canvas{max-height:70vh;overflow:auto;background:var(--color-surface-subtle);text-align:center;border-radius:8px}.ps-photo-canvas img{width:100%;max-height:65vh;object-fit:contain;display:block}.ps-photo-canvas .hint{margin-top:10px}
@media(max-width:800px){.ps-layout{grid-template-columns:1fr}.ps-image img{height:300px}.production-mode .topbar{min-height:52px;padding:10px 16px}.production-mode .topbar .top-actions{display:none}.production-mode .content{padding-top:18px}.ps-heading{display:block;margin-bottom:14px}.ps-heading h1{font-size:24px}.ps-heading>.buttons{margin-top:12px}.ps-facts{gap:12px;padding:14px}.ps-facts>div{min-width:70px}.ps-facts strong{font-size:20px}.ps-facts .badge{font-size:11px}.ps-choices{padding:12px}.ps-choices .specs{gap:10px 16px}.ps-choices .spec p{font-size:16px}.ps-media,.ps-instructions{padding:14px}.ps-main-images.has-sketch img{height:240px}.ps-instructions .spec p,.ps-comments p{font-size:17px}.ps-action-bar{position:fixed;bottom:0;left:0;right:0;margin:0;border-radius:0;padding:10px 12px calc(10px + env(safe-area-inset-bottom));gap:8px}.ps-action-bar .button{flex:1;font-size:14px;min-width:0;min-height:48px}.ps-action-bar .primary{flex:2}.production-sheet{padding-bottom:90px}.ps-photo-tools{gap:6px}.ps-photo-tools .button{padding:9px;font-size:13px}.ps-photo-canvas{max-height:60vh}.ps-photo-canvas img{max-height:55vh}}
@media print{.production-sheet{padding:0}.ps-layout{grid-template-columns:1fr 1fr}.ps-image img{height:220px}.ps-heading h1{font-size:22px}.ps-media,.ps-instructions{padding:12px;break-inside:auto}.ps-instructions .spec{break-inside:avoid}.ps-facts,.ps-choices{break-inside:avoid}.ps-choices{background:var(--color-surface)}.ps-instructions .spec p,.ps-comments p{font-size:12px}.ps-thumbnails{display:none}.ps-heading .buttons{display:none}.ps-image>button{display:block!important}.ps-image figcaption span{display:none}.ps-layout,.ps-facts{gap:12px}.ps-primary strong{font-size:14px}.ps-facts strong{font-size:18px}.ps-ticket{color:var(--color-print-text)}}
@media print{
 .production-sheet .ps-image>button:focus,.production-sheet .ps-image>button:focus-visible{outline:none!important;box-shadow:none!important}
}
@media(min-width:801px) and (min-height:500px){.production-mode .topbar{display:none}.production-mode .content{padding:20px 30px}.ps-heading{margin:0 0 14px}.ps-heading h1{font-size:23px;margin:5px 0}.ps-heading p{font-size:13px}.ps-facts{padding:10px 16px;gap:20px;margin-bottom:12px}.ps-facts strong{font-size:20px}.ps-choices{display:flex;gap:18px;padding:12px 16px;margin-bottom:14px}.ps-choices>.specs{flex:3}.ps-primary{flex:1;margin:0;padding:0 0 0 16px;border:0;border-left:1px solid var(--color-divider)}.ps-image img{height:285px}.ps-media,.ps-instructions{padding:15px}.ps-layout{gap:16px}}
@media(max-width:500px){.ps-main-images.has-sketch{grid-template-columns:1fr}.ps-main-images.has-sketch img{height:300px}}

/* Screen-only presentation polish: production data and print layouts stay intact. */
@media screen{
 .production-sheet{min-width:0}
 .ps-heading>div:first-child{min-width:0;flex:1}
 .ps-heading h1,.ps-heading p,.ps-heading .eyebrow{overflow-wrap:anywhere}
 .ps-heading h1{letter-spacing:-.025em}
 .ps-heading .eyebrow{font-size:12px;letter-spacing:.08em;line-height:1.6}
 .ps-heading>.buttons{align-self:flex-start;justify-content:flex-end;gap:8px}
 .ps-ticket{padding:3px 9px;border:1px solid var(--color-divider);border-radius:7px;background:var(--color-surface);font-size:.8em;vertical-align:2px;letter-spacing:0;font-variant-numeric:tabular-nums}
 .ps-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:0;padding:0;overflow:hidden;box-shadow:0 1px 2px var(--color-shadow-soft)}
 .ps-facts>div{min-width:0;padding:14px 18px;overflow-wrap:anywhere}
 .ps-facts>div+div{border-left:1px solid var(--color-divider)}
 .ps-facts small{font-size:12px;line-height:1.55;margin-bottom:6px}
 .ps-facts strong{display:block;font-size:22px;font-weight:650;line-height:1.35;font-variant-numeric:tabular-nums}
 .ps-facts strong+small{margin:7px 0 0}
 .ps-facts .badge{max-width:100%;white-space:normal;line-height:1.5;margin-top:1px}
 .ps-choices{border:1px solid var(--color-divider);background:var(--color-surface-raised);padding:14px 18px}
 .ps-choices .specs{gap:12px 24px;min-width:0}
 .ps-choices .spec{min-width:0;flex-basis:120px;overflow-wrap:anywhere}
 .ps-choices .spec small{display:block;font-size:12px;line-height:1.5;color:var(--color-text-muted)}
 .ps-choices .spec p{font-size:16px;line-height:1.5;margin:5px 0 0;color:var(--color-text)}
 .production-sheet .om-material-instructions{border-color:var(--color-divider);background:var(--color-surface);border-radius:10px;padding:16px 18px;margin:14px 0 18px}
 .production-sheet .om-material-instructions h2{font-size:18px;margin-bottom:14px}
 .production-sheet .om-material-primary{padding:12px 14px;background:var(--color-surface-subtle);border-left:3px solid var(--color-selected-border);border-radius:5px}
 .production-sheet .om-material-role{font-size:12px;font-weight:650;margin-bottom:5px;line-height:1.5}
 .production-sheet .om-material-primary>strong,.production-sheet .om-material-selected strong{font-size:15px;line-height:1.5}
 .production-sheet .om-material-identification,.production-sheet .om-material-purpose{font-size:14px;line-height:1.65}
 .production-sheet .om-material-instructions>h3{font-size:13px;margin:16px 0 9px;color:var(--color-text-muted)}
 .production-sheet .om-material-selected{gap:0}
 .production-sheet .om-material-selected>li{padding:10px 0}
 .production-sheet .om-material-instructions>.hint{margin:10px 0 0;font-size:12px;line-height:1.6}
 .ps-media,.ps-instructions{border-radius:12px;box-shadow:0 1px 2px var(--color-shadow-soft)}
 .ps-media>h2,.ps-instructions>h2{font-size:20px;line-height:1.35;padding-bottom:13px;margin-bottom:16px;border-bottom:1px solid var(--color-divider)}
 .ps-main-images{align-items:start}
 .ps-image>button{background:var(--color-surface-raised);overflow:hidden}
 .ps-image>button:hover{border-color:var(--color-brand)}
 .ps-image figcaption{font-size:12px;line-height:1.5;margin:9px 0 2px}
 .ps-image figcaption span{font-size:12px}
 .ps-thumbnails{padding:10px 3px;scroll-padding:3px}
 .ps-thumbnails button{border-color:var(--color-divider);background:var(--color-surface-raised)}
 .ps-thumbnails button:hover{border-color:var(--color-control-border)}
 .ps-thumbnails button:focus-visible{outline-offset:-4px}
 .ps-thumbnails button[aria-pressed=true]{border-color:var(--color-brand);background:var(--color-selected-bg)}
 .ps-instructions .spec:last-child{margin-bottom:0}
 .ps-instructions .spec small{font-size:13px;line-height:1.5}
 .ps-instructions .spec p,.ps-comments p{line-height:1.7}
 .ps-instructions .om-important{padding:14px!important;border-radius:7px;margin-bottom:16px}
 .ps-comments{border-top:1px solid var(--color-divider);padding-top:4px;margin-top:20px}
 .ps-comments .comment{min-width:0}
 .ps-comments .comment small{line-height:1.6;overflow-wrap:anywhere}
 .ps-handover{border:1px solid var(--color-divider);background:var(--color-surface-subtle);border-radius:8px;padding:14px;margin-top:18px}
 .ps-handover p{margin-bottom:0;line-height:1.6}
 .ps-secondary>details{min-width:0}
 .ps-secondary summary{line-height:1.6;overflow-wrap:anywhere}
 .ps-secondary .summary-list>div{gap:16px;overflow-wrap:anywhere}
 .ps-secondary .summary-list>div>strong{flex-shrink:0;font-variant-numeric:tabular-nums}
 .ps-secondary .om-peer{border-bottom:1px solid var(--color-divider);padding-bottom:12px;overflow-wrap:anywhere}
 .ps-secondary .om-peer:last-child{border-bottom:0;padding-bottom:0}
 .ps-snapshot{line-height:1.65;margin:14px 0}
 .ps-action-bar{border-color:var(--color-control-border);margin-top:18px;gap:10px}
 .ps-photo-tools>span{font-variant-numeric:tabular-nums;white-space:nowrap}
}
@media screen and (max-width:800px){
 .ps-heading>.buttons{justify-content:flex-start}
 .ps-heading h1{font-size:25px;line-height:1.35}
 .ps-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
 .ps-facts>div{padding:13px 14px}
 .ps-facts>div:nth-child(odd){border-left:0}
 .ps-facts>div:nth-child(n+3){border-top:1px solid var(--color-divider)}
 .ps-facts strong{font-size:20px}
 .ps-choices{padding:13px 14px}
 .production-sheet .om-material-instructions{padding:14px}
 .production-sheet .om-material-primary{padding:11px 12px}
 .ps-media>h2,.ps-instructions>h2{font-size:19px}
 .ps-secondary{grid-template-columns:minmax(0,1fr)}
 .ps-action-bar{margin-top:0;border-left:0;border-right:0;border-bottom:0}
 .ps-action-bar .button{white-space:normal;overflow-wrap:anywhere;text-align:center;line-height:1.4}
 .production-sheet{padding-bottom:calc(100px + env(safe-area-inset-bottom))}
}

/* Workshop reading view: retain the same instructions and actions at every size. */
@media screen{
 .production-sheet .ps-heading{padding-bottom:18px;border-bottom:1px solid var(--color-divider);gap:20px}
 .production-sheet .ps-heading .eyebrow{color:var(--color-text-muted);line-height:1.6}
 .production-sheet .ps-heading h1{margin-top:10px;line-height:1.35}
 .production-sheet .ps-heading p{font-size:14px;line-height:1.6}
 .production-sheet .ps-heading>.buttons{max-width:46%;gap:8px}
 .production-sheet .ps-heading .button{min-height:44px}
 .production-sheet .ps-facts small{font-size:13px}
 .production-sheet .ps-facts strong{line-height:1.45}
 .production-sheet .ps-facts strong.overdue{color:var(--color-error-text)}
 .production-sheet .ps-facts>div:first-child{background:var(--color-surface-subtle)}
 .production-sheet .ps-choices{margin-top:16px;margin-bottom:18px}
 .production-sheet .ps-choices:has(>.specs:empty){display:none}
 .production-sheet .ps-choices .spec p{font-size:17px;line-height:1.6}
 .production-sheet .ps-choices .spec small{font-size:13px}
 .production-sheet .ps-layout{gap:20px;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr)}
 .production-sheet .ps-media,.production-sheet .ps-instructions{padding:18px}
 .production-sheet .ps-main-images{gap:14px}
 .production-sheet .ps-image>button:focus-visible{outline-offset:-4px}
 .production-sheet .ps-image img{background:var(--color-surface-raised)}
 .production-sheet .ps-image figcaption{font-size:13px;line-height:1.55}
 .production-sheet .ps-image figcaption span{font-size:12px}
 .production-sheet .ps-instructions .spec small{font-size:13px;font-weight:650;line-height:1.6}
 .production-sheet .ps-instructions .spec p{font-size:17px;line-height:1.7}
 .production-sheet .ps-instructions .om-important{padding:14px 16px!important;background:var(--color-surface-subtle);border-left:3px solid var(--color-selected-border)}
 .production-sheet .ps-instructions .spec p,.production-sheet .ps-comments p{tab-size:4}
 .production-sheet .ps-handover strong{font-size:15px;line-height:1.5}
 .production-sheet .ps-handover p{font-size:14px;line-height:1.65}
 .production-sheet .ps-secondary{gap:14px}
 .production-sheet .ps-secondary>details{padding:0 16px 12px}
 .production-sheet .ps-secondary summary{font-size:14px;min-height:48px;padding:13px 0;line-height:1.6}
 .production-sheet .ps-secondary>details[open]>summary{border-bottom:1px solid var(--color-divider);margin-bottom:14px}
 .production-sheet .ps-secondary .summary-list>div{align-items:flex-start;gap:14px}
 .production-sheet .ps-secondary .summary-list>div>span{min-width:0;overflow-wrap:anywhere}
 .production-sheet .ps-secondary .summary-list>div>strong{white-space:normal;max-width:50%;text-align:right;overflow-wrap:anywhere}
 .production-sheet .ps-snapshot{font-size:13px;line-height:1.6;margin-top:18px}
 .production-sheet .ps-action-bar .button{min-height:48px}
 .production-sheet .ps-action-bar .button[aria-busy=true]{cursor:progress}
 .modal.ps-photo-dialog{width:min(1100px,100%)}
 .ps-photo-dialog .ps-photo-tools{gap:8px 12px;align-items:center}
 .ps-photo-dialog .ps-photo-tools>span{font-size:14px;text-align:center}
 .ps-photo-dialog .ps-photo-canvas{overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom}
 .ps-photo-dialog .ps-photo-canvas:focus-visible{outline-offset:-4px}
}
@media screen and (max-width:1100px){
 .production-sheet .ps-heading{flex-wrap:wrap;gap:12px}
 .production-sheet .ps-heading>.buttons{max-width:100%;justify-content:flex-start}
}
@media screen and (max-width:800px){
 .production-mode .sidebar.open{z-index:30}
 .production-mode .topbar{padding-top:calc(10px + env(safe-area-inset-top))}
 .production-mode .content{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
 .production-sheet{--ps-action-bar-height:calc(100px + env(safe-area-inset-bottom));padding-bottom:calc(var(--ps-action-bar-height) + 16px)}
 .production-sheet .ps-heading{padding-bottom:16px;margin-bottom:16px}
 .production-sheet .ps-heading h1{font-size:25px;line-height:1.4}
 .production-sheet .ps-heading>.buttons{width:100%;gap:8px}
 .production-sheet .ps-facts>div{padding:12px 14px}
 .production-sheet .ps-facts strong{font-size:20px}
 .production-sheet .ps-layout{grid-template-columns:minmax(0,1fr);gap:16px}
 .production-sheet .ps-media,.production-sheet .ps-instructions{padding:14px}
 .production-sheet .ps-instructions .spec p{font-size:17px}
 .production-sheet .ps-action-bar{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));gap:8px}
 .production-sheet .ps-action-bar .button{font-size:15px;line-height:1.5;min-height:48px}
 .production-mode .modal-backdrop{padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
 .production-mode .modal{max-height:calc(100dvh - 20px);min-width:0}
 .production-mode .modal-head{padding:16px;gap:12px}
 .production-mode .modal-head h2{font-size:22px;line-height:1.4}
 .production-mode .modal-head>button{min-width:44px;min-height:44px;flex-shrink:0}
 .production-mode .modal form{padding:16px;min-width:0}
 .production-mode .modal-foot{padding-bottom:max(16px,env(safe-area-inset-bottom))}
 .ps-photo-dialog .ps-photo-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 .ps-photo-dialog .ps-photo-tools .button{font-size:13px;padding:10px 8px;min-width:0}
 .ps-photo-dialog .ps-photo-tools>span{min-width:0;font-size:13px}
 .ps-photo-dialog .ps-photo-canvas{max-height:60dvh}
 .ps-photo-dialog .ps-photo-canvas img{max-height:55dvh}
}
@media (prefers-reduced-motion:reduce){.production-sheet *{scroll-behavior:auto}}

.sr-filters{display:flex;gap:16px;padding:16px;border-bottom:1px solid var(--line);flex-wrap:wrap}.sr-filters .field{flex:1;min-width:200px;margin:0}
.sr-table-wrap{width:100%;min-width:0}.sr-table{width:100%;min-width:0;table-layout:fixed;border-collapse:collapse}.sr-table th,.sr-table td{padding:14px 12px;vertical-align:top;white-space:normal;overflow-wrap:anywhere}.sr-table thead th{background:var(--color-surface-subtle);color:var(--color-text-muted);font-weight:600;text-align:left;overflow-wrap:normal}.sr-table thead th:nth-child(1){width:12%}.sr-table thead th:nth-child(2){width:28%}.sr-table thead th:nth-child(3){width:auto}.sr-table thead th:nth-child(4){width:112px}.sr-table thead th:nth-child(5){width:17%}.sr-table thead th:nth-child(6){width:86px}.sr-table tbody>tr{border-bottom:1px solid var(--color-divider)}.sr-table tbody>tr:last-child{border-bottom:0}.sr-table tbody>tr:hover,.sr-table tbody>tr:focus-within{background:var(--color-surface-hover)}
.sr-table .sr-reference{font-weight:400;text-align:left;background:none;text-transform:none;letter-spacing:normal}.sr-reference>strong{display:block;color:var(--color-brand);font-weight:700;font-variant-numeric:tabular-nums}.sr-secondary{display:block;color:var(--color-text-muted);font-size:14px;line-height:1.45}.sr-state{display:block;color:var(--color-text-muted);margin-top:4px}.sr-product-cell{display:flex;align-items:flex-start;gap:10px;min-width:0}.sr-product-cell>div{min-width:0}.sr-product-name{display:block;font-weight:600;line-height:1.45}.sr-thumb{display:block;position:relative;flex:0 0 56px;width:56px;height:64px;overflow:hidden;border:1px solid var(--color-divider);border-radius:6px;background:var(--color-surface-subtle)}.sr-thumb-placeholder{position:absolute;inset:0;display:grid;place-items:center;color:var(--color-text-muted)}.sr-thumb-placeholder svg{width:24px;height:24px}.sr-thumb-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:var(--color-surface-subtle)}.sr-thumb-image[hidden]{display:none}
.sr-main-match{margin:0 0 7px;color:var(--color-text-muted);font-size:14px}.sr-match-label{display:inline-block;font-size:12px;font-weight:600;line-height:1.4;padding:1px 5px;border:1px solid var(--color-control-border);border-radius:4px;color:var(--color-text);background:var(--color-surface-subtle);vertical-align:baseline}.sr-list-specs{margin:0;display:grid;gap:5px}.sr-list-specs>div{min-width:0}.sr-list-specs dt,.sr-list-specs dd{display:inline;margin:0;font-size:14px}.sr-list-specs dt{color:var(--color-text-muted)}.sr-list-specs dt:after{content:': '}.sr-list-specs dd{color:var(--color-text)}.sr-list-specs .sr-match-label{font-size:12px}
.sr-table .sr-quantity{text-align:right;font-variant-numeric:tabular-nums}.sr-quantity>strong{font-weight:600}.sr-location>.sr-secondary{margin-top:3px}.sr-table .sr-actions{text-align:right}.sr-actions .button{position:relative;width:44px;height:44px;padding:10px}.sr-mobile-label{display:none}.sr-notes{white-space:pre-wrap;overflow-wrap:anywhere}.sr-table .sr-empty{padding:24px 16px;text-align:center;color:var(--color-text-muted)}.sr-spec-row{display:grid;grid-template-columns:1fr auto;gap:16px;align-items:center}.sr-spec-row>.field{margin:0;min-width:0}.sr-spec-row>label{display:flex;align-items:center;gap:8px}.sr-spec-row input[type=checkbox]{width:18px;height:18px}.sr-history{margin-top:20px}.sr-history summary{cursor:pointer;font-weight:600}.sr-picker{display:grid;gap:8px}.sr-picker button{justify-content:flex-start;white-space:normal;text-align:left}
.sr-spec-value{display:inline-block;max-width:100%;vertical-align:bottom;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sr-order-header{flex-wrap:wrap;column-gap:12px}.sr-order-header>h2{flex:1;min-width:0}
.sr-advice{position:relative;flex-basis:100%;min-width:0;margin:12px 0 0;background:var(--color-selected-bg);border:1px solid var(--color-control-border);border-radius:8px;font-size:13px}.sr-advice[hidden]{display:none}
.sr-advice-details{margin:0}.sr-advice-details>summary{cursor:pointer;min-height:44px;padding:10px 42px 10px 12px;list-style-position:inside}.sr-advice-details>summary span{font-weight:400}
.sr-advice-list{padding:0 12px 12px;max-height:min(320px,40vh);overflow:auto}.sr-advice-list>p{margin:0 0 8px}
.sr-suggestion{position:relative;padding:12px 36px 12px 0;border-top:1px solid var(--color-divider)}.sr-suggestion p{margin:5px 0}.sr-suggestion summary{cursor:pointer}.sr-advice .summary-list{font-size:13px}.sr-suggestion details{margin-top:8px}
.sr-advice .sr-advice-close{position:absolute;right:2px;top:2px;width:40px;height:40px;justify-content:center;font-size:24px;padding:4px;z-index:1}.sr-dismiss{position:absolute;right:0;top:8px;font-size:24px}
@media(max-width:1050px){
 .sr-table-wrap{overflow:visible}.sr-table,.sr-table tbody{display:block;width:100%;min-width:0}.sr-table thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.sr-table tbody>tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 16px;padding:16px}.sr-table th,.sr-table td{display:block;min-width:0;border:0;padding:0}.sr-table .sr-reference{grid-column:1;grid-row:1}.sr-table .sr-actions{grid-column:2;grid-row:1;justify-self:end;align-self:start}.sr-table .sr-product{grid-column:1/-1;grid-row:2}.sr-table .sr-specifications{grid-column:1/-1;grid-row:3}.sr-table .sr-quantity{grid-column:1;grid-row:4;text-align:left}.sr-table .sr-location{grid-column:2;grid-row:4}.sr-mobile-label{display:block;color:var(--color-text-muted);font-size:14px;margin-bottom:3px}.sr-list-specs{display:flex;flex-wrap:wrap;gap:6px 16px}.sr-main-match{margin-bottom:6px}.sr-table .sr-empty-row{display:block}.sr-table .sr-empty{padding:8px 0}.sr-filters{min-width:0}.sr-filters .field{min-width:0}
}
@media(max-width:650px){.sr-spec-row{grid-template-columns:1fr}.sr-filters .field{min-width:0;flex-basis:100%}.sr-advice-list{max-height:32vh}.sr-table-wrap+.pagination{align-items:flex-start;flex-wrap:wrap;gap:10px}.sr-table-wrap+.pagination .buttons{flex-wrap:wrap}.sr-thumb{flex-basis:56px}}

/* Presentation refinement uses the existing palette and register structure. */
@media screen{
 .surplus-page{display:grid;gap:20px;min-width:0}
 .surplus-page>.page-heading{margin:0;align-items:flex-start;gap:20px}
 .surplus-page .page-heading h1{font-size:34px;line-height:1.2}
 .surplus-page .page-heading p{line-height:1.6;margin-top:8px}
 .surplus-page .page-heading .button{min-height:44px}
 .sr-scope{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:16px;border-bottom:1px solid var(--color-divider);min-width:0}
 .sr-scope>span{display:flex;align-items:center;gap:8px;min-width:0;overflow-wrap:anywhere;color:var(--color-text);font-size:14px}
 .sr-scope>span>svg{color:var(--color-brand);width:18px;height:18px}
 .sr-scope>small{color:var(--color-text-muted);font-size:13px;text-align:right;line-height:1.5}
 .surplus-page .sr-register{margin:0;border-radius:12px;min-width:0;box-shadow:0 2px 6px var(--color-shadow-soft)}
 .surplus-page .sr-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(170px,240px);gap:16px;padding:18px 20px;background:var(--color-surface-raised);border-radius:12px 12px 0 0;align-items:end}
 .surplus-page .sr-filters .field{min-width:0;margin:0}
 .surplus-page .sr-filters label{font-size:13px;font-weight:600;line-height:1.5;color:var(--color-text-muted);margin-bottom:7px}
 .surplus-page .sr-filters :is(input,select){min-height:44px;border-radius:6px}
 .surplus-page .sr-table-wrap{overflow:visible}
 .surplus-page .sr-table th,.surplus-page .sr-table td{padding:18px 14px;line-height:1.55}
 .surplus-page .sr-table thead th{padding-block:12px;font-size:12px;line-height:1.5;font-weight:650;letter-spacing:.035em}
 .surplus-page .sr-table th:first-child{padding-left:20px}
 .surplus-page .sr-table th:last-child,.surplus-page .sr-table td:last-child{padding-right:20px}
 .surplus-page .sr-table thead th:nth-child(1){width:13%}
 .surplus-page .sr-table thead th:nth-child(2){width:27%}
 .surplus-page .sr-table thead th:nth-child(3){width:auto}
 .surplus-page .sr-table thead th:nth-child(4){width:100px}
 .surplus-page .sr-table thead th:nth-child(5){width:17%}
 .surplus-page .sr-table thead th:nth-child(6){width:78px}
 .surplus-page .sr-table tbody>tr:hover{background:var(--color-surface-raised)}
 .surplus-page .sr-table tbody>tr:focus-within{background:var(--color-selected-bg)}
 .surplus-page .sr-reference>strong{font-size:16px;line-height:1.4;margin-bottom:6px}
 .surplus-page .sr-reference>.sr-secondary{font-size:12px;line-height:1.6}
 .surplus-page .sr-state{display:inline-block;padding:3px 7px;border-radius:5px;border:1px solid var(--color-divider);background:var(--color-surface-subtle);color:var(--color-text-muted);font-size:12px;line-height:1.5;margin-top:8px}
 .surplus-page .sr-product-cell{gap:12px;align-items:flex-start}
 .surplus-page .sr-product-cell>div{flex:1;min-width:0}
 .surplus-page .sr-thumb{width:48px;height:64px;flex-basis:48px;border-radius:7px}
 .surplus-page .sr-product-name{font-size:14px;font-weight:650;line-height:1.55;margin-bottom:6px}
 .surplus-page .sr-product-sku,.surplus-page .sr-product-category{font-size:12px;line-height:1.6;margin-top:3px}
 .surplus-page .sr-main-match{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:12px;line-height:1.55;margin-bottom:10px}
 .surplus-page .sr-match-label{font-size:12px;line-height:1.5;padding:2px 5px;border-radius:4px;white-space:nowrap}
 .surplus-page .sr-list-specs{gap:10px}
 .surplus-page .sr-list-specs dt{display:block;font-size:12px;line-height:1.5;margin-bottom:2px}
 .surplus-page .sr-list-specs dt:after{content:''}
 .surplus-page .sr-list-specs dd{display:block;font-size:13px;line-height:1.6}
 .surplus-page .sr-spec-value{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-width:100%;white-space:normal;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere;font-weight:500}
 .surplus-page .sr-list-specs dd>.sr-match-label{margin-top:4px}
 .surplus-page .sr-quantity>strong{font-size:20px;line-height:1.3;font-weight:650}
 .surplus-page .sr-quantity>span:not(.sr-mobile-label){display:block;font-size:12px;line-height:1.6;color:var(--color-text-muted);margin-top:4px}
 .surplus-page .sr-location>span:not(.sr-secondary):not(.sr-mobile-label){font-size:13px;line-height:1.6;font-weight:500}
 .surplus-page .sr-location>.sr-secondary{font-size:12px;line-height:1.6;margin-top:5px}
 .surplus-page .sr-actions .button{border-radius:7px}
 .surplus-page .sr-table-wrap:focus-visible{outline-offset:4px}
 .surplus-page .sr-register>.pagination{padding:14px 20px;gap:12px;flex-wrap:wrap;background:var(--color-surface-raised);border-radius:0 0 12px 12px;font-size:13px;line-height:1.5}
 .surplus-page .pagination>.buttons{gap:8px;align-items:center;margin-left:auto;font-variant-numeric:tabular-nums}
 .surplus-page .pagination .button{min-height:44px;min-width:44px;font-size:13px}
 .surplus-page .sr-page-number{font-size:13px}
 .surplus-page .sr-table .sr-empty{padding:48px 20px}
 .sr-empty-content{display:grid;justify-items:center;gap:8px;line-height:1.6}
 .sr-empty-content>strong{font-family:Georgia,serif;font-size:21px;font-weight:400;color:var(--color-text)}
 .sr-empty-content>span{font-size:14px;color:var(--color-text-muted)}
 .sr-entry-form>.field-grid>.field.wide:first-child,.sr-adjust-form>.field-grid>.field.wide:first-child{padding:14px 16px;background:var(--color-surface-subtle);border:1px solid var(--color-divider);border-radius:8px;line-height:1.6;margin:0;overflow-wrap:anywhere}
 .sr-entry-form .sr-spec-row{padding:14px 16px;border:1px solid var(--color-divider);border-radius:8px;background:var(--color-surface);gap:16px;align-items:end}
 .sr-entry-form .sr-spec-row>label{align-self:center;margin:0;min-height:44px;font-size:13px;line-height:1.5}
 .sr-entry-form .sr-spec-row:has(input[type=checkbox]:checked){border-color:var(--color-selected-border);background:var(--color-surface-raised)}
 .sr-entry-form .sr-spec-row label:has(input[type=checkbox]){padding:8px 0;white-space:nowrap}
 .sr-entry-form .hint{font-size:14px;line-height:1.65}
 .sr-entry-form .field>label,.sr-adjust-form .field>label,.sr-product-picker-form .field>label{font-size:14px}
 .sr-entry-form textarea,.sr-adjust-form textarea{min-height:96px}
 .sr-entry-form :is(input,select,textarea),.sr-adjust-form :is(input,select,textarea){border-radius:7px}
 .sr-product-picker-form .sr-picker{gap:10px}
 .sr-product-picker-form .sr-picker>.button{padding:12px 14px;min-height:52px;gap:10px;justify-content:flex-start;border-radius:8px;line-height:1.6;overflow-wrap:anywhere}
 .sr-product-picker-form .sr-picker>.button>strong{color:var(--color-brand);min-width:0;max-width:100%;flex-shrink:1;font-variant-numeric:tabular-nums}
 .sr-product-picker-form .pagination{padding:14px 0;gap:10px;flex-wrap:wrap}
 .sr-detail-dialog .sr-detail-product{margin:0 0 16px;font-size:20px;line-height:1.5;overflow-wrap:anywhere}
 .sr-detail-dialog .sr-detail-quantity{padding:14px 16px;background:var(--color-surface-subtle);border:1px solid var(--color-divider);border-radius:8px;font-size:17px;line-height:1.6;font-variant-numeric:tabular-nums}
 .sr-detail-dialog .sr-detail-location{font-size:14px;line-height:1.65;color:var(--color-text-muted);overflow-wrap:anywhere}
 .sr-detail-dialog .summary-list>div{gap:18px;align-items:flex-start;font-size:14px}
 .sr-detail-dialog .summary-list>div>span{min-width:0;overflow-wrap:anywhere}
 .sr-detail-dialog .summary-list strong{max-width:65%;text-align:right;color:var(--color-text);white-space:pre-wrap;overflow-wrap:anywhere}
 .sr-detail-dialog .sr-notes{font-size:15px;line-height:1.7}
 .sr-detail-dialog .sr-detail-body>.buttons{margin:18px 0;gap:8px}
 .sr-detail-dialog .sr-history{margin-top:20px;border-top:1px solid var(--color-divider)}
 .sr-detail-dialog .sr-history>summary{font-size:14px;line-height:1.6;min-height:48px;padding:14px 0}
 .sr-detail-dialog .sr-history .comment{padding:14px 0}
 .sr-detail-dialog .sr-history .comment>strong{display:block;font-size:14px;font-variant-numeric:tabular-nums;line-height:1.6;overflow-wrap:anywhere}
 .sr-detail-dialog .sr-history .comment>small{display:block;margin-top:5px;font-size:12px;line-height:1.6}
 .sr-detail-dialog .sr-history .comment p{font-size:14px;line-height:1.65;margin:8px 0 0}
 .sr-advice{background:var(--color-surface-subtle);border-color:var(--color-control-border);box-shadow:0 1px 2px var(--color-shadow-soft)}
 .sr-advice-details>summary{padding-top:12px;padding-bottom:12px;padding-right:54px;font-size:14px;line-height:1.5}
 .sr-advice-list{padding-bottom:14px}
 .sr-advice-list>p,.sr-suggestion>p{font-size:13px;line-height:1.65;overflow-wrap:anywhere}
 .sr-suggestion{padding-right:52px}
 .sr-suggestion>strong{display:block;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
 .sr-suggestion details>summary{font-size:13px;min-height:44px}
 .sr-advice .sr-advice-close{min-width:44px;min-height:44px}
 .sr-advice .sr-notes{font-size:13px;line-height:1.65}
}
@media screen and (max-width:1050px){
 .surplus-page .sr-table tbody>tr{gap:14px 18px;padding:18px 20px}
 .surplus-page .sr-table th,.surplus-page .sr-table td,.surplus-page .sr-table th:first-child,.surplus-page .sr-table td:last-child{padding:0}
 .surplus-page .sr-table .sr-reference{grid-column:1;grid-row:1}
 .surplus-page .sr-table .sr-actions{grid-column:2;grid-row:1}
 .surplus-page .sr-reference>strong{font-size:16px;margin-bottom:3px}
 .surplus-page .sr-table .sr-product{padding-bottom:14px;border-bottom:1px solid var(--color-divider)}
 .surplus-page .sr-thumb{width:54px;height:72px;flex-basis:54px}
 .surplus-page .sr-product-name{font-size:15px;margin-bottom:5px}
 .surplus-page .sr-list-specs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 18px}
 .surplus-page .sr-specifications>.sr-mobile-label{display:block;font-size:12px;font-weight:600;line-height:1.5;margin-bottom:10px}
 .surplus-page .sr-main-match{margin-bottom:12px}
 .surplus-page .sr-mobile-label{font-size:12px;line-height:1.5;font-weight:600;margin-bottom:5px}
 .surplus-page .sr-table .sr-quantity,.surplus-page .sr-table .sr-location{padding-top:12px;border-top:1px solid var(--color-divider)}
 .surplus-page .sr-quantity>strong{font-size:20px}
 .surplus-page .sr-quantity>span:not(.sr-mobile-label){display:inline;font-size:13px;margin-top:0}
 .surplus-page .sr-location>span:not(.sr-secondary):not(.sr-mobile-label){font-size:14px}
 .surplus-page .sr-table .sr-empty{padding:28px 0}
}
@media screen and (max-width:650px){
 .surplus-page{gap:18px}
 .surplus-page .page-heading{flex-wrap:wrap;gap:14px}
 .surplus-page .page-heading h1{font-size:30px}
 .sr-scope{align-items:flex-start;flex-direction:column;gap:5px;padding-bottom:14px}
 .sr-scope>small{text-align:left;font-size:12px}
 .surplus-page .sr-filters{grid-template-columns:minmax(0,1fr);padding:16px 14px;gap:12px}
 .surplus-page .sr-table tbody>tr{padding:18px 14px;gap:14px}
 .surplus-page .sr-register>.pagination{padding:12px 14px;gap:10px}
 .surplus-page .sr-register>.pagination>span{flex-basis:100%}
 .surplus-page .pagination>.buttons{width:100%;justify-content:space-between;margin:0}
 .sr-entry-form .sr-spec-row{padding:12px;gap:8px}
 .sr-entry-form .sr-spec-row>label{justify-self:start;padding:0}
 .sr-product-picker-form .sr-picker>.button{flex-wrap:wrap;gap:5px 10px}
 .sr-product-picker-form .pagination>.buttons{margin-left:auto}
 .sr-detail-dialog .sr-detail-product{font-size:18px}
 .sr-detail-dialog .sr-detail-quantity{padding:12px 14px;font-size:16px}
 .sr-detail-dialog .summary-list>div{flex-wrap:wrap;gap:5px}
 .sr-detail-dialog .summary-list strong{flex-basis:100%;max-width:none;text-align:left}
 .sr-detail-dialog .sr-detail-body>.buttons>.button{flex:1}
 .sr-advice-details>summary{font-size:13px}
}

.acc-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:20px}.acc-summary>div{background:var(--color-surface);border:1px solid var(--line);border-radius:8px;padding:18px}.acc-summary span{display:block;color:var(--color-text-muted)}.acc-summary strong{display:block;font-size:23px;margin-top:8px}.acc-tabs{padding:0;margin:20px 0}.acc-more{position:relative}.acc-more>.buttons{position:absolute;right:0;top:45px;z-index:8;background:var(--color-surface);padding:14px;border:1px solid var(--line);border-radius:8px;min-width:240px}.acc-more>summary{cursor:pointer}.acc-filters{padding:18px;display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;border-bottom:1px solid var(--line)}.acc-filters>.field{flex:1;min-width:140px;margin:0}.acc-help{padding:12px 18px;color:var(--color-text-muted)}.acc-number{text-align:right!important;font-variant-numeric:tabular-nums;white-space:nowrap}.acc-ledger td{vertical-align:top}.acc-ledger summary{cursor:pointer}.acc-ledger summary span{display:block;margin:5px 0;color:var(--color-text-muted)}.acc-entry-detail{padding:8px 0;max-width:560px;white-space:normal}.acc-order{padding:18px;border-bottom:1px solid var(--line)}.acc-order>summary{display:flex;justify-content:space-between;gap:16px;cursor:pointer}.acc-order>summary span{font-weight:600}.acc-bill{padding:18px;display:flex;align-items:center;gap:20px;border-bottom:1px solid var(--line)}.acc-bill span{flex:1}.acc-pending{cursor:pointer;width:100%;text-align:left}#acc-rates{padding:16px}#acc-rates input[type=number]{max-width:180px;width:100%;padding:10px;border:1px solid var(--color-control-border);border-radius:6px}#acc-rates input[type=checkbox]{width:20px;height:20px}
@media(max-width:650px){.acc-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.acc-summary>div{padding:12px}.acc-summary strong{font-size:19px;overflow-wrap:anywhere}.acc-ledger,.acc-ledger tbody,.acc-ledger tr,.acc-ledger td{display:block;width:100%}.acc-ledger thead{display:none}.acc-ledger tr{padding:12px;border-bottom:1px solid var(--line)}.acc-ledger td{padding:5px!important;border:0;white-space:normal;text-align:left!important}.acc-ledger .acc-number:nth-last-child(2)::before{content:'Change: ';color:var(--color-text-muted)}.acc-ledger .acc-number:last-child::before{content:'Balance: ';color:var(--color-text-muted)}.acc-filters{padding:12px}.acc-filters>.field{flex-basis:45%;min-width:0}.acc-order>summary{flex-direction:column;gap:6px}.acc-bill{flex-wrap:wrap;gap:10px}.acc-tabs{gap:14px}.acc-more>.buttons{right:auto;left:0}}
#acc-credit-confirm[hidden],#acc-duplicate[hidden]{display:none!important}

@media(max-width:650px){.acc-charge-table .acc-number:nth-last-child(2)::before{content:none}.acc-charge-table .acc-number:last-child::before{content:'Charge: '}}

/* Raw Materials presentation only. Stock rules and shared production forms stay independent. */
@media screen{
 .inventory-page{min-width:0}
 .inventory-page>.eyebrow{margin-bottom:10px}
 .inventory-page>.page-heading{align-items:flex-start;gap:20px;margin-bottom:24px}
 .inventory-page .page-heading h1{font-size:34px;line-height:1.2}
 .inventory-page .page-heading p{max-width:650px;line-height:1.6;margin-top:8px}
 .inventory-page .page-heading>.buttons{justify-content:flex-end}
 .inventory-navigation{padding:6px;margin-bottom:20px;gap:6px;border:1px solid var(--color-divider);border-radius:10px;background:var(--color-surface-raised)}
 .inventory-navigation .button{background:transparent;border-color:transparent;border-radius:6px;box-shadow:none;font-weight:500}
 .inventory-navigation .button:hover{background:var(--color-surface-hover)}
 .inventory-navigation .button[aria-pressed=true]{background:var(--color-brand);border-color:var(--color-brand);color:var(--color-on-brand);box-shadow:none;font-weight:650}
 .inventory-page .inventory-register{margin:0;border-radius:12px;box-shadow:0 2px 6px var(--color-shadow-soft)}
 .inventory-view-heading{padding:20px;align-items:flex-start;gap:20px;border-bottom:1px solid var(--color-divider)}
 .inventory-view-heading>div:first-child{min-width:0;flex:1 1 250px}
 .inventory-kicker{display:block;color:var(--color-text-muted);font-size:12px;font-weight:650;letter-spacing:.065em;text-transform:uppercase;margin-bottom:6px}
 .inventory-view-heading h2{font-size:23px;margin:0;line-height:1.3;overflow-wrap:anywhere}
 .inventory-view-heading p{font-size:14px;line-height:1.55;color:var(--color-text-muted);margin:7px 0 0}
 .inventory-view-heading>.buttons{gap:8px;justify-content:flex-end;flex:0 1 auto;max-width:100%}
 .inventory-view-heading .button{padding:10px 12px}
 .inventory-page .inventory-callout{display:flex;gap:10px 16px;align-items:baseline;margin:16px 20px 6px;padding:12px 14px;background:var(--color-surface-subtle);border-radius:7px;font-size:13px;line-height:1.6;color:var(--color-text-muted)}
 .inventory-callout>strong{color:var(--color-text);flex-shrink:0;font-size:13px}
 .inventory-table-wrap{overflow:visible;min-width:0}
 .inventory-table{width:100%;table-layout:fixed;white-space:normal}
 .inventory-table th,.inventory-table td{white-space:normal;overflow-wrap:anywhere;word-break:normal;padding:16px 14px;line-height:1.55;vertical-align:top}
 .inventory-table th{font-size:12px;font-weight:650;letter-spacing:.035em;padding-block:12px;background:var(--color-surface-raised);color:var(--color-text-muted)}
 .inventory-table th:first-child,.inventory-table td:first-child{padding-left:20px}
 .inventory-table th:last-child,.inventory-table td:last-child{padding-right:20px}
 .inventory-table tbody>tr:hover{background:var(--color-surface-raised)}
 .inventory-table tbody>tr:focus-within{background:var(--color-selected-bg)}
 .inventory-table tbody>tr:last-child>td{border-bottom:0}
 .inventory-material>strong{display:block;font-size:15px;font-weight:650;line-height:1.5}
 .inventory-table td small{display:block;font-size:13px;line-height:1.55;margin-top:5px;color:var(--color-text-muted)}
 .inventory-library-table .inventory-material>small{font-size:12px}
 .inventory-notes{font-size:14px;color:var(--color-text-muted);white-space:pre-wrap!important}
 .inventory-unit,.inventory-kind{display:inline-block;padding:2px 7px;border:1px solid var(--color-divider);border-radius:5px;background:var(--color-surface-subtle);font-size:12px;font-weight:600;color:var(--color-text);max-width:100%}
 .inventory-quantity{text-align:right;font-variant-numeric:tabular-nums}
 .inventory-stock-table .inventory-quantity>strong{font-size:20px;font-weight:650;line-height:1.4}
 .inventory-history-table .inventory-quantity>strong{font-size:15px;font-weight:650}
 .inventory-history-table .inventory-quantity>small{font-size:12px}
 .inventory-actions{text-align:right}
 .inventory-actions .button{padding:10px;font-size:13px;max-width:100%}
 .inventory-actions .action-tooltip{right:0;top:auto;bottom:100%}
 .inventory-library-table th:nth-child(1){width:28%}
 .inventory-library-table th:nth-child(2){width:18%}
 .inventory-library-table th:nth-child(3){width:9%}
 .inventory-library-table th:last-child{width:82px}
 .inventory-stock-table th:nth-child(1){width:34%}
 .inventory-stock-table th:nth-child(2){width:24%}
 .inventory-stock-table th:nth-child(3){width:22%}
 .inventory-stock-table th:nth-child(4){width:20%}
 .inventory-history-table th:nth-child(1){width:17%}
 .inventory-history-table th:nth-child(2){width:22%}
 .inventory-history-table th:nth-child(3){width:12%}
 .inventory-history-table th:nth-child(4){width:20%}
 .inventory-history-table th:last-child{width:112px}
 .inventory-page .pagination{padding:14px 20px;border-top:1px solid var(--color-divider);font-size:13px;gap:12px;flex-wrap:wrap;color:var(--color-text-muted)}
 .inventory-page .pagination .button{padding:9px 12px}
 .inventory-page .inventory-empty{text-align:center;padding:40px 20px;color:var(--color-text-muted)}
 .inventory-empty>strong{display:block;font-size:16px;color:var(--color-text);font-weight:600}
 .inventory-empty>p{font-size:14px;line-height:1.6;max-width:430px;margin:8px auto 0}
 .inventory-loading{padding:32px 20px;color:var(--color-text-muted);font-size:14px}
 .inventory-page .inventory-table-wrap:focus-visible{outline-offset:-4px}

 /* Existing modal controls stay in their original order and retain their selectors. */
 .inventory-form-section{padding:0;margin:0;min-width:0}
 .inventory-form-section+ .inventory-form-section{padding-top:20px;border-top:1px solid var(--color-divider)}
 .inventory-form-section>h3{font-family:inherit;font-size:15px;font-weight:650;margin:0 0 16px;line-height:1.5}
 .inventory-form-section>.field-grid{gap:16px 20px}
 .inventory-form-section .field:has(>textarea){grid-column:1/-1}
 .inventory-form-section>.inventory-form-note{margin-top:12px}
 .inventory-form-note{font-size:13px;line-height:1.6;color:var(--color-text-muted);margin:0}
 .notice.inventory-form-note{padding:12px 14px;border-radius:7px;background:var(--color-surface-subtle)}
 .inventory-material-identity{padding:12px 14px;margin-bottom:16px;background:var(--color-surface-raised);border:1px solid var(--color-divider);border-radius:7px;overflow-wrap:anywhere}
 .inventory-material-identity>span{display:block;font-size:12px;color:var(--color-text-muted);margin-bottom:4px}
 .inventory-material-identity>strong{font-size:14px;font-weight:600}
 .inventory-check{display:flex;align-items:center;gap:10px;min-height:44px;line-height:1.5;cursor:pointer}
 .inventory-check input{margin:0}
 .inventory-category-list,.inventory-reconciliation-list{border:1px solid var(--color-divider);border-radius:8px;overflow-wrap:anywhere}
 .inventory-category-list:empty{display:none}
 .inventory-category-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;min-width:0;border-bottom:1px solid var(--color-divider)}
 .inventory-category-row:last-child{border-bottom:0}
 .inventory-category-row>span{min-width:0}
 .inventory-category-row strong{font-size:14px;font-weight:600}
 .inventory-category-row small{display:block;font-size:13px;color:var(--color-text-muted);line-height:1.5;margin-top:4px}
 .inventory-category-row>.button{flex-shrink:0}
 .inventory-balance{padding:12px 14px;background:var(--color-surface-subtle);border:1px solid var(--color-divider);border-radius:7px;margin:0;font-size:13px;line-height:1.6;overflow-wrap:anywhere}
 .inventory-balance:empty{display:none}
}
@media screen and (max-width:1100px){
 .inventory-history-table,.inventory-history-table tbody{display:block;width:100%}
 .inventory-history-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
 .inventory-history-table tbody>tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px 20px;padding:18px 20px;border-bottom:1px solid var(--color-divider)}
 .inventory-history-table td{display:block;padding:0!important;border:0;min-width:0}
 .inventory-history-table td[data-label]:before{content:attr(data-label);display:block;font-size:12px;font-weight:500;line-height:1.5;color:var(--color-text-muted);margin-bottom:5px}
 .inventory-history-table td:first-child{grid-column:1;grid-row:1}
 .inventory-history-table .inventory-actions{grid-column:2;grid-row:1;align-self:start}
 .inventory-history-table .inventory-material{grid-column:1/-1;grid-row:2}
 .inventory-history-table td:nth-child(3){grid-column:1;grid-row:3}
 .inventory-history-table .inventory-quantity{grid-column:2;grid-row:3}
 .inventory-history-table .inventory-notes{grid-column:1/-1;grid-row:4}
 .inventory-history-table .inventory-empty-row{display:block}
 .inventory-history-table .inventory-empty{padding:18px 0!important}
 .inventory-history-table .inventory-empty-row>td:before{content:none}
}
@media screen and (max-width:720px){
 .inventory-page>.page-heading{flex-direction:column;gap:16px;margin-bottom:20px}
 .inventory-page .page-heading h1{font-size:30px}
 .inventory-page .page-heading>.buttons{width:100%;justify-content:flex-start}
 .inventory-navigation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
 .inventory-navigation .button{width:100%;padding:10px;line-height:1.5}
 .inventory-view-heading{padding:18px 16px;gap:16px}
 .inventory-view-heading h2{font-size:22px}
 .inventory-view-heading>div:first-child{flex-basis:100%}
 .inventory-view-heading>.buttons{justify-content:flex-start;gap:8px}
 .inventory-page .inventory-callout{margin:14px 16px 0;flex-direction:column;gap:3px}
 .inventory-table,.inventory-table tbody{display:block;width:100%}
 .inventory-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
 .inventory-table tbody>tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px 16px;padding:18px 16px;border-bottom:1px solid var(--color-divider)}
 .inventory-table td{display:block;padding:0!important;border:0;min-width:0}
 .inventory-table td[data-label]:before{content:attr(data-label);display:block;font-size:12px;font-weight:500;line-height:1.5;color:var(--color-text-muted);margin-bottom:5px}
 .inventory-library-table .inventory-material{grid-column:1;grid-row:1}
 .inventory-library-table .inventory-material:before,.inventory-stock-table .inventory-material:before{content:none}
 .inventory-library-table .inventory-actions{grid-column:2;grid-row:1;align-self:start}
 .inventory-library-table td:nth-child(2){grid-column:1;grid-row:2}
 .inventory-library-table td:nth-child(3){grid-column:2;grid-row:2;text-align:right}
 .inventory-library-table .inventory-notes{grid-column:1/-1;grid-row:3}
 .inventory-stock-table .inventory-material{grid-column:1/-1;grid-row:1}
 .inventory-stock-table td:nth-child(2){grid-column:1;grid-row:2}
 .inventory-stock-table td:nth-child(3){grid-column:2;grid-row:2}
 .inventory-stock-table .inventory-quantity{grid-column:1/-1;grid-row:3;text-align:left;padding-top:12px!important;border-top:1px solid var(--color-divider)}
 .inventory-table tbody>.inventory-empty-row{display:block}
 .inventory-page .inventory-table .inventory-empty{padding:18px 0!important}
 .inventory-page .pagination{padding:14px 16px;align-items:flex-start}
 .inventory-page .pagination>.buttons{margin-left:auto}
 .inventory-form-section>.field-grid{grid-template-columns:minmax(0,1fr)}
 .inventory-category-row{padding:12px;gap:10px}
}
@media print{
 .inventory-navigation,.inventory-kicker{display:none!important}
 .inventory-table{width:100%;white-space:normal;table-layout:auto}
 .inventory-table th,.inventory-table td{white-space:normal;overflow-wrap:anywhere}
 .inventory-table .inventory-quantity{text-align:right}
 .inventory-table .inventory-material>strong,.inventory-table small{display:block}
}

/* QC presentation uses existing workflow data and leaves Orders/Partner layouts intact. */
@media screen{
 .qc-page{gap:18px}
 .qc-page .page-heading p{max-width:620px}
 .qc-workflow-note{display:flex;align-items:baseline;justify-content:space-between;gap:8px 24px;flex-wrap:wrap;padding:0 0 16px;border-bottom:1px solid var(--color-divider);color:var(--color-text-muted);font-size:13px;line-height:1.6}
 .qc-workflow-note>strong{color:var(--color-text);font-weight:600}
 .qc-page .om-queue-panel{overflow:visible}
 .qc-page .om-tabs-header{border-radius:12px 12px 0 0}
 .qc-page .pagination{border-radius:0 0 12px 12px}
 .qc-page .table-wrap{overflow:visible}
 .qc-page .om-queue th{letter-spacing:.035em}
 .qc-page th.om-col-product{width:26%}
 .qc-page th.om-col-configuration{width:19%}
 .qc-page th.om-col-business{width:15%}
 .qc-page th.om-col-quantity{width:13%}
 .qc-page th.om-col-due{width:11%}
 .qc-page th.om-col-stage{width:16%}
 .qc-page .om-queue td{padding-block:20px}
 .qc-page .om-col-quantity .om-quantity-value{font-size:19px}
 .qc-page .om-col-quantity .om-quantity-unit{font-size:13px}
 .qc-quantity-details{display:grid;gap:5px;margin:10px 0 0;font-variant-numeric:tabular-nums;font-size:12px;line-height:1.5}
 .qc-quantity-details>div{display:flex;justify-content:space-between;gap:6px;min-width:0}
 .qc-quantity-details dt{color:var(--color-text-muted);font-weight:400;text-align:left;overflow-wrap:anywhere}
 .qc-quantity-details dd{margin:0;font-weight:600;color:var(--color-text);overflow-wrap:anywhere}
 .qc-page .om-stage-layout{gap:12px}
 .qc-page .om-stage-info .badge{font-size:13px}
 .qc-page .om-stage-info>small{font-size:13px;line-height:1.55}
 .qc-page .om-stage-info>.qc-dispatch-state{margin-top:8px;padding-top:8px;border-top:1px solid var(--color-divider);font-size:12px;color:var(--color-text-muted)}
 .qc-page .om-ticket-actions .button{border-color:var(--color-control-border);color:var(--color-brand);background:var(--color-surface)}
 .qc-page .om-ticket-actions .button:hover{background:var(--color-selected-bg)}
 .qc-page .om-ticket-actions .action-tooltip{top:auto;bottom:100%;right:0}
 .qc-page .table-wrap:focus-visible{outline-offset:-4px}

 /* Office ticket: make the outcome and separate dispatch record easy to distinguish. */
 .om-job .qc-job-panel{border-color:var(--color-divider);border-top:3px solid var(--color-brand);border-radius:10px}
 .om-job .qc-job-panel>.panel-head{padding:16px 18px;gap:10px;align-items:flex-start}
 .om-job .qc-job-panel h2{font-size:20px;line-height:1.35;flex:1 1 160px}
 .om-job .qc-job-panel .badge{font-size:12px;white-space:normal}
 .om-job .qc-job-panel .summary-list>div{gap:14px;align-items:baseline;padding-block:11px;line-height:1.55}
 .om-job .qc-job-panel .summary-list>div:first-child{padding-top:0}
 .om-job .qc-job-panel .summary-list span{font-size:13px}
 .om-job .qc-job-panel .summary-list strong{font-size:15px;line-height:1.55}
 .qc-job-actions{margin-top:18px;gap:8px}
 .qc-job-actions:empty{display:none}
 .qc-job-actions>.button{width:100%;justify-content:center;min-height:44px}
 .qc-job-dispatch{padding:12px 14px;border:1px solid var(--color-divider);border-radius:7px;background:var(--color-surface-raised);margin:16px 0 0}
 .qc-job-dispatch>strong{display:block;font-size:13px;line-height:1.5;font-weight:600}
 .qc-job-dispatch>span{display:block;font-size:13px;line-height:1.6;color:var(--color-text-muted);margin-top:5px}
 .om-job .qc-job-help{font-size:13px;line-height:1.65;margin:14px 0 0}

 /* The same form controls, grouped into receipt, decision and notes. */
 .qc-form-context{padding:16px;background:var(--color-surface-raised);border:1px solid var(--color-divider);border-radius:9px;min-width:0}
 .qc-context-identity{min-width:0;overflow-wrap:anywhere}
 .qc-context-identity>span{display:block;font-size:13px;color:var(--color-text-muted);line-height:1.55;margin-bottom:5px}
 .qc-context-identity>strong{display:block;font-size:17px;font-weight:650;line-height:1.5}
 .qc-context-counts{display:flex;flex-wrap:wrap;gap:12px 24px;margin:14px 0 0;padding-top:12px;border-top:1px solid var(--color-divider)}
 .qc-context-counts>div{min-width:0;flex:1 1 120px;overflow-wrap:anywhere}
 .qc-context-counts dt{font-size:12px;line-height:1.5;color:var(--color-text-muted);margin-bottom:4px}
 .qc-context-counts dd{margin:0;font-size:17px;font-weight:650;line-height:1.45;font-variant-numeric:tabular-nums}
 .qc-form-section{padding:0;min-width:0;margin:0}
 .qc-form-section>h3{font-family:inherit;font-size:15px;font-weight:650;line-height:1.5;margin:0 0 12px}
 .qc-form-section+.qc-form-section{padding-top:18px;border-top:1px solid var(--color-divider)}
 .qc-form-section>.field-grid{gap:12px 16px;align-items:end}
 .qc-form-section>.field-grid>.field:first-child{grid-column:1/-1}
 .qc-form-section>.field-grid>.field:has(input[name=accepted]){grid-column:1}
 .qc-form-section .qc-accept-all{grid-column:2;justify-self:start;padding-bottom:1px}
 .qc-form-section .field{margin:0;min-width:0}
 .qc-form-section textarea{width:100%;min-height:108px;resize:vertical}
 .qc-receipt-confirm{padding:14px;border:1px solid var(--color-control-border);border-radius:8px;background:var(--color-surface-raised);align-items:flex-start;min-height:48px;margin:0;cursor:pointer}
 .qc-receipt-confirm>input{margin:2px 0 0}
 .qc-receipt-confirm>span{font-size:14px;line-height:1.6}
 .qc-receipt-confirm:has(:checked){background:var(--color-selected-bg);border-color:var(--color-selected-border)}
 .qc-receipt-confirm:focus-within{outline:3px solid var(--color-focus);outline-offset:3px}
 .qc-receipt-recorded{padding:12px 14px;margin:0;border-radius:7px;background:var(--color-success-bg);color:var(--color-success-text);font-size:14px;line-height:1.6}
 .qc-form-note{margin:0;padding:12px 14px;border-radius:7px;background:var(--color-surface-subtle);color:var(--color-text-muted);font-size:13px;line-height:1.65}
 .qc-dispatch-context{padding:18px;background:var(--color-surface-raised);border:1px solid var(--color-divider);border-radius:9px;overflow-wrap:anywhere}
 .qc-dispatch-context>span{display:block;font-size:12px;color:var(--color-text-muted);line-height:1.5;margin-bottom:5px}
 .qc-dispatch-context>strong{display:block;font-size:24px;font-weight:650;line-height:1.4;font-variant-numeric:tabular-nums}
 .qc-dispatch-context>p{font-size:14px;line-height:1.6;color:var(--color-text-muted);margin:8px 0 0}
 .qc-dispatch-checks>p{font-size:14px;line-height:1.65;margin:0;color:var(--color-text)}
}
@media screen and (max-width:1100px) and (min-width:801px){
 .qc-page .om-queue th,.qc-page .om-queue td{padding-inline:10px}
 .qc-page th.om-col-product{width:25%}
 .qc-page th.om-col-configuration{width:18%}
 .qc-page th.om-col-business{width:14%}
 .qc-page th.om-col-quantity{width:15%}
 .qc-page th.om-col-stage{width:17%}
 .qc-page .om-queue .product-cell{gap:8px}
 .qc-page .om-queue .om-thumb{width:36px;height:48px;border-radius:5px}
 .qc-quantity-details>div{flex-wrap:wrap;gap:0 6px}
}
@media screen and (max-width:800px){
 .qc-page{gap:16px}
 .qc-workflow-note{padding-bottom:14px;flex-direction:column;gap:4px}
 .qc-page .om-queue td{padding-block:0}
 .qc-page .om-col-quantity .om-quantity-value{font-size:20px}
 .qc-quantity-details{font-size:13px;max-width:200px;gap:6px;margin-top:8px}
 .qc-page td.om-col-stage{padding-top:14px}
 .qc-page .om-stage-layout{align-items:flex-start}
 .qc-page .om-stage-info .badge{font-size:13px}
 .qc-page .om-stage-info>.qc-dispatch-state{display:block}
 .qc-page .om-ticket-actions{padding-top:2px}
 .om-job .qc-job-panel>.panel-head{padding:16px}
}
@media screen and (max-width:480px){
 .qc-form-context,.qc-dispatch-context{padding:14px}
 .qc-context-counts{gap:12px 18px}
 .qc-context-counts>div{flex-basis:100px}
 .qc-context-counts dd{font-size:16px}
 .qc-form-section>.field-grid{grid-template-columns:minmax(0,1fr) auto;gap:12px}
 .qc-form-section .qc-accept-all .button{padding-inline:12px}
 .qc-receipt-confirm{padding:12px}
}
@media print{
 .qc-workflow-note{font-size:12px;margin:12px 0}
 .qc-workflow-note>span{margin-left:12px}
 .qc-quantity-details{font-size:12px;margin:6px 0 0}
 .qc-quantity-details>div{display:flex;gap:6px;justify-content:flex-end}
 .qc-quantity-details dt:after{content:':'}
 .qc-quantity-details dd{margin:0}
 .qc-job-dispatch>span{display:block}
}

/* Partner Accounts presentation: existing money, permissions and actions stay intact. */
@media screen{
 .accounts-page,.partner-account-page{display:grid;gap:20px;min-width:0}
 :is(.accounts-page,.partner-account-page)>.page-heading{margin:0;gap:20px;align-items:flex-start}
 :is(.accounts-page,.partner-account-page) .page-heading h1{font-size:34px;line-height:1.2;overflow-wrap:anywhere}
 :is(.accounts-page,.partner-account-page) .page-heading p{line-height:1.6;margin-top:8px}
 .partner-account-page .page-heading>.buttons{justify-content:flex-end;gap:8px;max-width:54%}
 :is(.ap-directory,.ap-account-panel){margin:0;border-radius:12px;overflow:visible;box-shadow:0 2px 6px var(--color-shadow-soft)}
 .ap-period{display:flex;justify-content:space-between;gap:10px 24px;flex-wrap:wrap;padding-bottom:14px;border-bottom:1px solid var(--color-divider);font-size:14px;color:var(--color-text);line-height:1.55}
 .ap-period>small{font-size:13px;color:var(--color-text-muted)}
 .partner-account-page .acc-summary{margin:0;gap:14px}
 .partner-account-page .acc-summary>div{padding:18px;border:1px solid var(--color-divider);border-radius:10px;background:var(--color-surface);min-width:0}
 .partner-account-page .acc-summary span{font-size:13px;font-weight:500;line-height:1.5;color:var(--color-text-muted)}
 .partner-account-page .acc-summary strong{margin-top:12px;font-size:25px;line-height:1.35;font-weight:650;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
 .partner-account-page .acc-summary>.ap-balance-card{border-color:var(--color-selected-border);background:var(--color-selected-bg)}
 .partner-account-page .ap-balance-card>span{color:var(--color-text);font-weight:600}
 .partner-account-page .ap-balance-card>strong{color:var(--color-brand-strong)}
 .partner-account-page .acc-pending{margin:0;padding:14px 16px;border:1px solid var(--color-warning-border);border-radius:8px;background:var(--color-warning-bg);color:var(--color-warning-text);font-size:14px;line-height:1.6;min-height:48px}
 .partner-account-page .acc-tabs{margin:0;padding:0;gap:6px;flex-wrap:wrap;overflow:visible;border-bottom:1px solid var(--color-divider)}
 .partner-account-page .acc-tabs .tab{min-height:48px;padding:11px 14px;font-size:14px;font-weight:500;border-bottom-width:3px;border-radius:6px 6px 0 0;white-space:normal;line-height:1.5}
 .partner-account-page .acc-tabs .tab:hover{background:var(--color-surface-hover)}
 .partner-account-page .acc-tabs .tab.active{background:var(--color-selected-bg);border-bottom-color:var(--color-brand);color:var(--color-brand);font-weight:650}
 .partner-account-page .acc-tabs .tab:focus-visible{outline-offset:-4px}
 .partner-account-page .acc-more{z-index:9;max-width:100%}
 .partner-account-page .acc-more>summary{min-height:44px;border-color:var(--color-control-border)}
 .partner-account-page .acc-more>.buttons{top:calc(100% + 6px);right:0;left:auto;display:grid;gap:6px;min-width:240px;max-width:min(320px,calc(100vw - 48px));padding:10px;border-color:var(--color-control-border);box-shadow:0 6px 20px var(--color-shadow-soft);border-radius:9px}
 .partner-account-page .acc-more .button{justify-content:flex-start;text-align:left;min-height:44px;width:100%}
 :is(.accounts-page,.partner-account-page) .acc-filters{padding:18px 20px;gap:14px;align-items:end;background:var(--color-surface-raised);border-radius:12px 12px 0 0}
 :is(.accounts-page,.partner-account-page) .acc-filters label{font-size:13px;color:var(--color-text-muted);line-height:1.5}
 :is(.accounts-page,.partner-account-page) .acc-filters>.field{min-width:140px}
 .accounts-page #acc-list-filters>.field{flex:0 1 460px;min-width:0}
 :is(.accounts-page,.partner-account-page) .acc-filters :is(input,select){min-height:44px;border-radius:6px}
 .partner-account-page .acc-help{margin:0;padding:16px 20px;font-size:13px;line-height:1.65;color:var(--color-text-muted)}
 .partner-account-page .acc-help strong{color:var(--color-text);font-variant-numeric:tabular-nums}
 :is(.accounts-page,.partner-account-page) .pagination{padding:14px 20px;gap:12px;flex-wrap:wrap;font-size:13px;border-top:1px solid var(--color-divider);border-radius:0 0 12px 12px;background:var(--color-surface-raised)}
 :is(.accounts-page,.partner-account-page) .pagination>.buttons{margin-left:auto;gap:8px}
 :is(.accounts-page,.partner-account-page) .pagination .button{min-height:44px;padding:9px 12px}
 .partner-account-page .ap-account-note{margin:0;font-size:13px;line-height:1.65}

 :is(.ap-directory-region,.ap-ledger-region,.ap-order-region,.ap-rates-region){overflow:visible;min-width:0}
 :is(.ap-directory-table,.ap-ledger-region .acc-ledger,.ap-order-lines,.ap-rates-table){width:100%;table-layout:fixed;white-space:normal}
 :is(.ap-directory-table,.ap-ledger-region .acc-ledger,.ap-order-lines,.ap-rates-table) :is(th,td){white-space:normal;overflow-wrap:anywhere;vertical-align:top;line-height:1.55;padding:16px 14px}
 :is(.ap-directory-table,.ap-ledger-region .acc-ledger,.ap-order-lines,.ap-rates-table) th{padding-block:12px;font-size:12px;font-weight:650;letter-spacing:.035em;color:var(--color-text-muted);background:var(--color-surface-subtle)}
 :is(.ap-directory-table,.ap-ledger-region .acc-ledger) :is(th,td):first-child{padding-left:20px}
 :is(.ap-directory-table,.ap-ledger-region .acc-ledger) :is(th,td):last-child{padding-right:20px}
 :is(.ap-directory-table,.ap-ledger-region .acc-ledger,.ap-order-lines,.ap-rates-table) td{font-size:14px;border-bottom:1px solid var(--color-divider)}
 :is(.ap-directory-table,.ap-ledger-region .acc-ledger,.ap-order-lines,.ap-rates-table) td small{display:block;margin-top:5px;font-size:13px;line-height:1.55;color:var(--color-text-muted)}
 :is(.ap-directory-table,.ap-ledger-region .acc-ledger,.ap-order-lines,.ap-rates-table) tbody>tr:last-child>td{border-bottom:0}
 :is(.ap-directory-table,.ap-ledger-region .acc-ledger,.ap-rates-table) tbody>tr:hover{background:var(--color-surface-raised)}
 .ap-directory-table tr:focus-visible{outline-offset:-4px}
 .ap-directory-table th:nth-child(1){width:24%}.ap-directory-table th:nth-child(2){width:28%}.ap-directory-table th:nth-child(3){width:18%}.ap-directory-table th:nth-child(4){width:25%}.ap-directory-table th:last-child{width:60px}
 .ap-directory-table .ap-partner-name>strong{font-size:15px;font-weight:650;line-height:1.5}
 .ap-directory-table .ap-pending-column{text-align:center;font-variant-numeric:tabular-nums}
 .ap-directory-table .acc-number>strong{font-size:17px;font-weight:650}
 .ap-open-cell{color:var(--color-text-muted);text-align:right}
 .ap-open-cell svg{width:18px;height:18px}
 .ap-ledger-region .acc-ledger th:nth-child(1){width:19%}.ap-ledger-region .acc-ledger th:nth-child(2){width:36%}.ap-ledger-region .acc-ledger th:nth-child(3){width:21%}.ap-ledger-region .acc-ledger th:nth-child(4){width:24%}
 .ap-ledger-region .acc-charge-table th:nth-child(1){width:23%}.ap-ledger-region .acc-charge-table th:nth-child(2){width:48%}.ap-ledger-region .acc-charge-table th:nth-child(3){width:29%}
 .ap-ledger-date>strong{font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}
 .ap-ledger-region .acc-number{white-space:normal;font-variant-numeric:tabular-nums}
 .ap-ledger-region .acc-number>strong{font-size:15px;font-weight:650;line-height:1.55}
 .ap-ledger-entry>details>summary{min-height:44px;padding:0 0 6px;line-height:1.5}
 .ap-ledger-entry>details>summary::marker{color:var(--color-brand)}
 .ap-ledger-entry>details>summary>strong{font-size:14px;font-weight:650}
 .ap-ledger-entry>details>summary>span{font-size:13px;line-height:1.6;margin:6px 0 0;overflow-wrap:anywhere}
 .ap-ledger-region .acc-entry-detail{border-top:1px solid var(--color-divider);padding:10px 0 0;margin-top:6px;max-width:none;overflow-wrap:anywhere}
 .ap-ledger-region .acc-entry-detail p{font-size:13px;line-height:1.65;white-space:pre-wrap;margin:0 0 12px}
 .ap-ledger-region .acc-entry-detail>small{font-size:12px;line-height:1.6}
 .ap-ledger-region .acc-entry-detail>.buttons{gap:8px;margin-top:12px}
 .ap-ledger-region .acc-entry-detail .button{padding:9px 11px;max-width:100%}
 .ap-ledger-region .action-tooltip{top:auto;bottom:100%}
 :is(.ap-directory-region,.ap-ledger-region,.ap-order-region,.ap-rates-region):focus-visible{outline-offset:-4px}

 .partner-account-page .acc-order{padding:18px 20px;overflow-wrap:anywhere}
 .partner-account-page .acc-order>summary{align-items:center;min-height:48px;gap:16px;line-height:1.5}
 .partner-account-page .acc-order>summary>strong{font-size:17px;font-weight:650;font-variant-numeric:tabular-nums}
 .partner-account-page .ap-order-total{text-align:right;font-size:19px;font-variant-numeric:tabular-nums;line-height:1.5;min-width:0}
 .ap-order-total>small{display:block;font-size:12px;line-height:1.5;color:var(--color-text-muted);font-weight:400;margin-bottom:3px}
 .ap-order-total>.ap-pending-label{margin:5px 0 0;font-size:12px;font-weight:600;color:var(--color-warning-text)}
 .partner-account-page .acc-order>summary:after{content:'⌄';color:var(--color-text-muted);font-size:20px;flex-shrink:0}
 .partner-account-page .acc-order[open]>summary:after{transform:rotate(180deg)}
 .partner-account-page .acc-order>summary>.ap-order-total{margin-left:auto}
 .ap-order-totals{display:flex;gap:6px 24px;flex-wrap:wrap;font-size:13px;line-height:1.6;color:var(--color-text-muted);margin:16px 0}
 .ap-order-totals strong{color:var(--color-text);font-weight:600}
 .ap-order-lines th:nth-child(1){width:40%}.ap-order-lines th:nth-child(2){width:18%}.ap-order-lines th:nth-child(3){width:20%}.ap-order-lines th:nth-child(4){width:22%}
 .ap-order-lines td:first-child>strong{font-size:14px;font-weight:600}
 .partner-account-page .acc-order>.button{margin-top:14px}
 .ap-rates-intro{display:flex;align-items:center;gap:12px;padding-right:20px;flex-wrap:wrap}
 .ap-rates-intro .acc-help{flex:1 1 280px}
 .partner-account-page #acc-rates{padding:0}
 .ap-rates-table th:first-child{width:76px}.ap-rates-table th:nth-child(2){width:42%}.ap-rates-table th:nth-child(3){width:16%}
 .ap-rate-target{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;cursor:pointer}
 .ap-rate-target:has(:disabled){cursor:default}
 .ap-rate-select input{margin:0;cursor:inherit}
 .ap-rates-table tr:has(:checked){background:var(--color-selected-bg)}
 .ap-rates-table tr:focus-within{background:var(--color-surface-raised)}
 .ap-rates-table tr:has(:checked):focus-within{background:var(--color-selected-bg)}
 .ap-rates-table input[data-pending-rate]{min-height:44px;max-width:100%!important;min-width:0;font-variant-numeric:tabular-nums;text-align:right}
 .ap-rates-footer{padding:16px 20px}
 .ap-rates-footer:has(.form-error:empty):not(:has(button)){padding:0}
 .partner-account-page .acc-bill{padding:18px 20px;gap:20px;min-width:0}
 .ap-bill-identity{flex:1;min-width:0;overflow-wrap:anywhere}
 .ap-bill-identity>strong{display:block;font-size:16px;font-weight:650;line-height:1.5}
 .ap-bill-identity>small{display:block;font-size:13px;color:var(--color-text-muted);margin-top:5px}
 .partner-account-page .acc-bill>.ap-bill-amount{flex:0 1 40%;text-align:right;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
 .ap-bill-amount>strong{display:block;font-size:18px;font-weight:650;line-height:1.5}
 .ap-bill-amount>small{display:block;font-size:12px;color:var(--color-text-muted);line-height:1.5}
 .ap-empty{text-align:center;padding:36px 20px!important;color:var(--color-text-muted)}
 .ap-empty>strong{display:block;font-size:16px;font-weight:600;line-height:1.5;color:var(--color-text)}
 .ap-empty>p{font-size:14px;line-height:1.6;margin:8px auto 0;max-width:400px}

 .ap-form-context,.ap-bill-context,.ap-reversal-context{padding:16px;background:var(--color-surface-raised);border:1px solid var(--color-divider);border-radius:9px;min-width:0;overflow-wrap:anywhere}
 .ap-form-account{font-size:15px;line-height:1.6;font-weight:600}
 .ap-form-balance{margin:10px 0 0;font-size:14px;line-height:1.6;font-variant-numeric:tabular-nums;color:var(--color-text-muted)}
 .ap-form-balance strong{color:var(--color-text);font-size:18px;line-height:1.5}
 .ap-form-section{margin:0;padding:0;min-width:0}
 .ap-form-section>h3,.ap-duplicate-review>h3{font-family:inherit;font-size:15px;font-weight:650;line-height:1.5;margin:0 0 12px}
 .ap-form-section+.ap-form-section{padding-top:18px;border-top:1px solid var(--color-divider)}
 .ap-form-section>.field-grid{gap:16px 20px}
 .ap-form-section .field{margin:0;min-width:0}
 .ap-form-section textarea{width:100%;min-height:100px;resize:vertical}
 .ap-form-note{font-size:13px;line-height:1.65;color:var(--color-text-muted);margin:10px 0 0}
 .ap-payment-preview{padding:14px 16px;border-radius:8px;background:var(--color-surface-subtle);font-size:14px;line-height:1.7;font-variant-numeric:tabular-nums}
 .ap-payment-preview strong{font-weight:650;color:var(--color-text)}
 .ap-credit-confirm{display:flex;align-items:flex-start;gap:10px;padding:14px;border:1px solid var(--color-warning-border);border-radius:8px;background:var(--color-warning-bg);color:var(--color-warning-text);cursor:pointer}
 .ap-credit-confirm input{margin:3px 0 0}
 .ap-credit-confirm>span{font-size:14px;line-height:1.6}
 .ap-credit-confirm:focus-within{outline:3px solid var(--color-focus);outline-offset:3px}
 .ap-duplicate-review{padding:16px;border:1px solid var(--color-warning-border);border-radius:8px;background:var(--color-warning-bg)}
 .ap-duplicate-review textarea{background:var(--color-surface)}
 .ap-bill-total{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap;margin-top:14px;padding-top:12px;border-top:1px solid var(--color-divider);font-size:14px;line-height:1.6;font-variant-numeric:tabular-nums}
 .ap-bill-total strong{font-size:22px;font-weight:650;line-height:1.4}
 .ap-bill-entries{min-width:0}
 .ap-bill-print{margin-top:16px}
 .ap-receipt-upload label{display:grid;gap:8px;font-size:14px;font-weight:600;line-height:1.6}
}
@media screen and (max-width:1100px){
 .partner-account-page>.page-heading{flex-wrap:wrap;gap:14px}
 .partner-account-page .page-heading>.buttons{max-width:100%;justify-content:flex-start}
 .partner-account-page .acc-summary{gap:10px}
 .partner-account-page .acc-summary>div{padding:15px}
 .partner-account-page .acc-summary strong{font-size:22px}
 .ap-directory-table th:last-child{width:60px}
}
@media screen and (max-width:760px){
 .accounts-page,.partner-account-page{gap:16px}
 :is(.accounts-page,.partner-account-page) .page-heading h1{font-size:30px}
 .partner-account-page .page-heading>.buttons{width:100%}
 .partner-account-page .acc-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .partner-account-page .acc-summary>div{padding:14px}
 .partner-account-page .acc-summary strong{font-size:21px;margin-top:9px}
 .partner-account-page .acc-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
 .partner-account-page .acc-tabs .tab{min-height:48px;text-align:center;padding:10px 8px}
 :is(.accounts-page,.partner-account-page) .acc-filters{padding:14px;gap:12px}
 :is(.accounts-page,.partner-account-page) .acc-filters>.field{min-width:0;flex-basis:45%}
 .accounts-page #acc-list-filters>.field{flex:1 1 170px}
 :is(.accounts-page,.partner-account-page) .pagination{padding:14px;align-items:flex-start}
 .partner-account-page .acc-help{padding:14px;font-size:13px}
 .partner-account-page .acc-more{flex:1 1 100%;width:100%}
 .partner-account-page .acc-more>summary{display:flex;width:100%;justify-content:center}
 .partner-account-page .acc-more>.buttons{position:static;left:auto;right:auto;width:100%;min-width:0;max-width:none;margin-top:8px}
 :is(.ap-directory-table,.ap-ledger-region .acc-ledger,.ap-order-lines,.ap-rates-table),:is(.ap-directory-table,.ap-ledger-region .acc-ledger,.ap-order-lines,.ap-rates-table) tbody{display:block;width:100%}
 :is(.ap-directory-table,.ap-ledger-region .acc-ledger,.ap-order-lines,.ap-rates-table) thead{display:table-header-group;position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
 :is(.ap-directory-table,.ap-ledger-region .acc-ledger,.ap-order-lines,.ap-rates-table) tbody>tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px;padding:18px 14px;border-bottom:1px solid var(--color-divider)}
 :is(.ap-directory-table,.ap-ledger-region .acc-ledger,.ap-order-lines,.ap-rates-table) tbody>tr:last-child{border-bottom:0}
 :is(.ap-directory-table,.ap-ledger-region .acc-ledger,.ap-order-lines,.ap-rates-table) td{display:block;padding:0!important;border:0;min-width:0;width:auto;white-space:normal;overflow-wrap:anywhere}
 :is(.ap-directory-table,.ap-ledger-region .acc-ledger,.ap-order-lines,.ap-rates-table) td[data-label]:before{content:attr(data-label);display:block;margin-bottom:5px;font-size:12px;font-weight:500;line-height:1.5;color:var(--color-text-muted)}
 .ap-directory-table td:nth-child(2){grid-column:1;grid-row:1}.ap-directory-table .ap-open-cell{grid-column:2;grid-row:1;justify-self:end}.ap-directory-table td:first-child{grid-column:1/-1;grid-row:2}.ap-directory-table td:nth-child(3){grid-column:1;grid-row:3;text-align:left}.ap-directory-table td:nth-child(4){grid-column:2;grid-row:3}
 .ap-directory-table .ap-partner-name:before{content:none!important}
 .ap-directory-table .acc-number{white-space:normal!important}
 .ap-ledger-region .acc-ledger .ap-ledger-date{grid-column:1/-1;grid-row:1}
 .ap-ledger-region .acc-ledger .ap-ledger-date:before{content:none}
 .ap-ledger-region .acc-ledger .ap-ledger-entry{grid-column:1/-1;grid-row:2}
 .ap-ledger-region .acc-ledger .ap-ledger-change{grid-column:1;grid-row:3;text-align:left!important}
 .ap-ledger-region .acc-ledger .ap-ledger-balance{grid-column:2;grid-row:3;text-align:right!important}
 .ap-ledger-region .acc-charge-table .ap-ledger-change{grid-column:1/-1}
 .ap-ledger-region .acc-ledger .acc-number{font-variant-numeric:tabular-nums}
 .ap-ledger-entry>details>summary{padding-top:0}
 .ap-ledger-region .acc-number>strong{font-size:16px}
 .partner-account-page .acc-order{padding:16px 14px}
 .partner-account-page .acc-order>summary{flex-direction:row;align-items:flex-start;gap:12px;flex-wrap:wrap}
 .partner-account-page .acc-order>summary>strong{flex:1}
 .partner-account-page .acc-order>summary>.ap-order-total{flex-basis:100%;order:2;text-align:left;margin:0}
 .ap-order-total>small{display:inline;margin-right:8px}
 .ap-order-total>.ap-pending-label{display:block;margin-top:5px}
 .ap-order-totals{display:grid;gap:6px;margin-block:14px}
 .ap-order-lines td:first-child{grid-column:1/-1}
 .ap-order-lines td:nth-child(3),.ap-order-lines td:nth-child(4){text-align:left!important}
 .ap-order-lines td:nth-child(4){grid-column:1/-1}
 .ap-order-lines tbody>tr{padding-inline:0}
 .ap-rates-intro{padding:0 14px 14px;gap:8px}
 .ap-rates-intro .acc-help{padding:14px 0 6px}
 .ap-rates-table tbody>tr{grid-template-columns:44px minmax(0,1fr)}
 .ap-rates-table td:first-child{grid-column:1;grid-row:1}
 .ap-rates-table td:nth-child(2){grid-column:2;grid-row:1}
 .ap-rates-table td:nth-child(2):before{content:none}
 .ap-rates-table td:nth-child(3){grid-column:2;grid-row:2}
 .ap-rates-table td:nth-child(4){grid-column:2;grid-row:3}
 .ap-rate-select{min-height:44px;display:flex!important;align-items:flex-start;justify-content:center;padding-top:2px!important}
 .ap-rates-table input[data-pending-rate]{max-width:240px!important}
 .ap-rates-footer{padding:14px}
 .ap-rates-footer>.button{width:100%}
 .partner-account-page .acc-bill{padding:16px 14px;gap:12px;flex-wrap:wrap}
 .partner-account-page .acc-bill>.ap-bill-amount{flex:0 1 55%;min-width:0}
 .partner-account-page .acc-bill>.button{margin-left:auto;min-height:44px}
 :is(.ap-directory-table,.ap-ledger-region .acc-ledger,.ap-order-lines,.ap-rates-table) tbody>.ap-empty-row{display:block}
 .ap-form-section>.field-grid{grid-template-columns:minmax(0,1fr);gap:14px}
 .ap-form-context,.ap-bill-context,.ap-reversal-context{padding:14px}
 .ap-credit-confirm{padding:12px}
}
@media print{
 .ap-directory-table,.ap-order-lines,.ap-rates-table,.ap-ledger-region .acc-ledger{display:table;width:100%;table-layout:auto;white-space:normal}
 :is(.ap-directory-table,.ap-order-lines,.ap-rates-table,.ap-ledger-region .acc-ledger) thead{display:table-header-group;position:static;clip:auto;width:auto;height:auto;overflow:visible}
 :is(.ap-directory-table,.ap-order-lines,.ap-rates-table,.ap-ledger-region .acc-ledger) tbody{display:table-row-group}
 :is(.ap-directory-table,.ap-order-lines,.ap-rates-table,.ap-ledger-region .acc-ledger) tr{display:table-row}
 :is(.ap-directory-table,.ap-order-lines,.ap-rates-table,.ap-ledger-region .acc-ledger) td{display:table-cell;white-space:normal}
 :is(.ap-directory-table,.ap-order-lines,.ap-rates-table,.ap-ledger-region .acc-ledger) td:before{content:none!important}
}

/* Catalogue presentation only. Existing controls, state and workflows remain
   in their original renderers. Screen rules do not alter production printouts. */
@media screen {
 .catalogue-page,.catalogue-categories,.catalogue-detail{min-width:0}
 .catalogue-page .page-heading,.catalogue-categories .page-heading{align-items:flex-start;margin-bottom:22px}
 .catalogue-page .page-heading>div,.catalogue-categories .page-heading>div{min-width:0}
 .catalogue-page .page-heading h1,.catalogue-categories .page-heading h1{overflow-wrap:anywhere}
 .catalogue-filter-panel{overflow:visible;border-radius:12px;box-shadow:0 2px 8px var(--color-shadow-soft);margin-bottom:22px}
 .catalogue-page .simple-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:end;gap:14px;padding:18px}
 .catalogue-page .simple-filters .field{min-width:0;max-width:100%;margin:0}
 .catalogue-page .simple-filters .field:first-child{grid-column:span 2}
 .catalogue-page .simple-filters input,.catalogue-page .simple-filters select{width:100%;min-width:0}
 .catalogue-page .simple-filters input[type=checkbox]{width:auto;flex-shrink:0}
 .catalogue-review-toggle{display:flex;align-items:center;gap:9px;min-height:44px;font-weight:500;color:var(--color-text)}
 .catalogue-page .simple-filters>a{justify-self:start;max-width:100%}
 .catalogue-filter-chips{padding:0 18px 16px;gap:7px;overflow-wrap:anywhere}
 .catalogue-filter-chips:empty{display:none}
 .catalogue-filter-chips>span{max-width:100%;border-color:var(--color-divider);background:var(--color-selected-bg);color:var(--color-text);font-size:14px;line-height:1.4}
 .catalogue-tools{display:flex;flex-wrap:wrap;gap:8px;padding:12px 18px;border-top:1px solid var(--color-divider);background:var(--color-surface-raised);border-radius:0 0 12px 12px}
 .catalogue-tools .button{white-space:normal;text-align:left;min-height:44px}
 .catalogue-page .catalogue-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:16px 12px}
 .catalogue-page .design-card{border:1px solid var(--color-divider);border-radius:12px;overflow:visible;background:var(--color-surface);box-shadow:0 1px 3px var(--color-shadow-soft);transition:border-color .15s,box-shadow .15s}
 .catalogue-page .design-card:hover,.catalogue-page .design-card:focus-within{border-color:var(--color-control-border);box-shadow:0 4px 14px var(--color-shadow-soft)}
 .catalogue-page .design-art{height:auto;aspect-ratio:3/4;overflow:hidden;border-radius:11px 11px 0 0;border-bottom:1px solid var(--color-divider);background:var(--color-surface-subtle)}
 .catalogue-page .design-art img{object-fit:contain}
 .catalogue-page .design-art .design-id{top:8px;left:8px;max-width:calc(100% - 16px);padding:4px 7px;border:1px solid var(--color-divider);border-radius:5px;background:var(--color-surface);color:var(--color-text);font-size:14px;font-weight:650;line-height:1.35}
 .catalogue-page .design-info{padding:12px;gap:0;overflow-wrap:anywhere}
 .catalogue-page .design-info>small:first-child{display:block;margin-bottom:5px;font-size:14px;font-weight:500;color:var(--color-text-muted);line-height:1.35}
 .catalogue-page .design-info h3{font-family:inherit;font-size:16px;font-weight:650;line-height:1.4;letter-spacing:0;margin:0 0 6px;color:var(--color-text)}
 .catalogue-page .design-info>p{font-size:14px;line-height:1.45;margin:0 0 10px;color:var(--color-text-muted)}
 .catalogue-page .catalogue-review-badge{display:block;align-self:flex-start;padding:3px 7px;border:1px solid var(--color-warning-border);border-radius:5px;background:var(--color-warning-bg);color:var(--color-warning-text);font-size:14px;line-height:1.4;margin-bottom:10px}
 .catalogue-page .design-info .buttons{padding-top:10px;border-top:1px solid var(--color-divider);gap:6px}
 .catalogue-page .design-info .buttons .button{min-width:0;min-height:44px;padding:8px 4px}
 .catalogue-page .design-info .buttons .action-tooltip{max-width:180px}
 .catalogue-empty{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:14px;padding:44px 20px;text-align:center;color:var(--color-text-muted);border-style:dashed;box-shadow:none}
 .catalogue-empty>span>svg{width:36px;height:36px;color:var(--color-brand)}
 .catalogue-page>.pagination,.catalogue-categories>.pagination{flex-wrap:wrap;gap:10px;align-items:center;margin-top:22px;padding-top:16px;border-top:1px solid var(--color-divider);font-variant-numeric:tabular-nums}
 .catalogue-page>.pagination>span{margin-right:auto}
 .catalogue-categories .category-strip{grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:16px}
 .catalogue-category-card{display:flex;flex-direction:column;border-radius:12px;overflow:visible;box-shadow:0 1px 3px var(--color-shadow-soft)}
 .catalogue-category-card .panel-body{display:flex;flex-direction:column;align-items:flex-start;min-width:0;flex:1;padding:20px}
 .catalogue-category-card h2{font-family:inherit;font-size:20px;line-height:1.4;margin:0 0 8px;overflow-wrap:anywhere}
 .catalogue-category-version{display:inline-block;padding:3px 8px;border:1px solid var(--color-divider);border-radius:5px;background:var(--color-surface-subtle);font-size:14px;color:var(--color-text-muted);margin:0 0 12px}
 .catalogue-category-card .panel-body>p:not(.catalogue-category-version){line-height:1.6;overflow-wrap:anywhere;margin:0 0 18px;color:var(--color-text-muted)}
 .catalogue-category-card .buttons{width:100%;padding-top:12px;margin-top:auto;border-top:1px solid var(--color-divider);gap:8px;flex-wrap:wrap}
 .catalogue-detail{display:grid;gap:18px}
 .catalogue-detail .simple-detail-gallery{padding:4px 4px 12px;gap:12px;max-width:100%;min-width:0;overscroll-behavior-inline:contain}
 .catalogue-detail .simple-detail-gallery:empty{display:none}
 .catalogue-detail .simple-detail-gallery img{width:210px;max-width:75vw;height:280px;object-fit:contain;flex-shrink:0;border:1px solid var(--color-divider);border-radius:9px;background:var(--color-surface-subtle)}
 .catalogue-detail-section{min-width:0;padding:18px 20px;border:1px solid var(--color-divider);border-radius:10px;background:var(--color-surface);overflow-wrap:anywhere}
 .catalogue-detail-section>h3:first-child{font-family:inherit;font-size:18px;font-weight:650;line-height:1.4;margin:0 0 14px;padding-bottom:10px;border-bottom:1px solid var(--color-divider)}
 .catalogue-detail-section h4{font-size:18px;line-height:1.45;margin:12px 0;color:var(--color-text)}
 .catalogue-detail-section p{line-height:1.65;margin:10px 0;color:var(--color-text)}
 .catalogue-detail-section .preserve-lines{overflow-wrap:anywhere}
 .catalogue-detail-section .buttons{flex-wrap:wrap;gap:8px;margin:12px 0}
 .catalogue-detail-actions{display:flex;flex-wrap:wrap;gap:8px;padding-top:4px}
 #simple-editor{min-width:0}
 #simple-editor .simple-tabs{gap:8px;padding:0 0 18px;margin:0 0 22px}
 #simple-editor .simple-tabs .button{display:flex;justify-content:flex-start;align-items:center;gap:9px;min-height:66px;padding:11px 12px;font-weight:500;line-height:1.4;border-color:var(--color-divider);background:var(--color-surface-raised);color:var(--color-text-muted);box-shadow:none}
 #simple-editor .simple-tabs .button.primary{border-color:var(--color-selected-border);background:var(--color-selected-bg);color:var(--color-brand);box-shadow:inset 0 -3px 0 var(--color-selected-border)}
 #simple-editor .simple-step-number{display:grid;place-items:center;width:25px;height:25px;flex:0 0 25px;border:1px solid var(--color-control-border);border-radius:50%;font-size:14px;line-height:1;background:var(--color-surface)}
 #simple-editor .simple-tabs .primary .simple-step-number{border-color:var(--color-brand);background:var(--color-brand);color:var(--color-on-brand)}
 #simple-editor .simple-step-title{min-width:0;overflow-wrap:anywhere}
 #simple-editor .simple-pane{gap:18px}
 #simple-editor .simple-pane>.hint{margin:0;line-height:1.6}
 #simple-editor .simple-pane>h3{font-size:18px;margin:8px 0 0}
 #simple-editor .simple-card{padding:16px;gap:16px;align-items:flex-start;box-shadow:0 1px 3px var(--color-shadow-soft)}
 #simple-editor .simple-card h3{font-family:inherit;font-size:17px;line-height:1.45;margin:0 0 5px;overflow-wrap:anywhere}
 #simple-editor .simple-card-meta{font-size:14px;line-height:1.5;margin:0 0 9px;color:var(--color-text-muted)}
 #simple-editor .simple-card-actions{gap:6px;align-items:center}
 #simple-editor .choice-chips{gap:6px}
 #simple-editor .choice-chips:empty{display:none}
 #simple-editor .choice-chips>span{padding:4px 9px;font-size:14px;line-height:1.45;max-width:100%;overflow-wrap:anywhere;background:var(--color-surface-subtle)}
 #simple-editor .simple-upload{padding:18px;border-style:solid;border-color:var(--color-divider);background:var(--color-surface-raised)}
 #simple-editor .simple-upload h3{font-family:inherit;font-size:17px;line-height:1.4;margin:0 0 12px}
 #simple-editor .simple-upload .hint{font-size:14px;line-height:1.6;margin:12px 0 0}
 #simple-editor .simple-gallery{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin:12px 0 16px}
 #simple-editor .simple-gallery:empty{display:none}
 #simple-editor .simple-asset{padding:8px;border-radius:9px;background:var(--color-surface)}
 #simple-editor .simple-asset img{height:auto;aspect-ratio:3/4;object-fit:contain;background:var(--color-surface-subtle);border-radius:5px}
 #simple-editor .simple-asset a{font-size:14px;line-height:1.4;margin:8px 0;overflow-wrap:anywhere}
 #simple-editor .simple-asset .buttons{gap:6px;align-items:center}
 #simple-editor .simple-asset .buttons .button{min-height:44px}
 #simple-editor .simple-upload label.button:focus-within{outline:3px solid var(--color-focus);outline-offset:3px}
 #simple-editor .simple-pricing-policies{gap:14px;margin-top:2px}
 #simple-editor .simple-price-policy{padding:18px;background:var(--color-surface-raised)}
 #simple-editor .simple-dependency h4{font-family:inherit;font-size:17px;line-height:1.4;margin:0 0 12px}
 #simple-editor .simple-price-next{padding-top:12px;border-top:1px solid var(--color-divider)}
 #simple-editor .simple-price-next>span{font-size:14px;font-variant-numeric:tabular-nums}
 #simple-editor .simple-pane details{background:var(--color-surface-raised);padding:10px 16px}
 #simple-editor .simple-pane details>summary{font-size:15px;color:var(--color-text)}
 #simple-editor .addon-panel,#simple-editor .pm-configuration{padding:18px;border-radius:10px;background:var(--color-surface-raised)}
 #simple-editor .addon-panel h3,#simple-editor .pm-configuration h3{font-family:inherit;font-size:17px;line-height:1.4;margin:0 0 10px}
 #simple-editor .addon-panel>.hint,#simple-editor .pm-configuration>.hint{line-height:1.6;margin:8px 0 14px}
 #simple-editor .addon-panel .simple-card{margin:10px 0;background:var(--color-surface)}
 #simple-editor .pm-material-list{margin:12px 0}
 #simple-editor .pm-material-list li{padding:12px 0}
 #simple-editor .pm-material-list small{line-height:1.5;margin-top:3px}
 #simple-editor .simple-sku{border-bottom:1px solid var(--color-divider);gap:12px}
 #simple-editor #simple-upload-status:empty{display:none}
 #price-editor .price-context{gap:8px 20px;padding:14px 16px;border:1px solid var(--color-divider);border-radius:9px;background:var(--color-surface-subtle);margin-bottom:16px}
 #price-editor .price-context strong{color:var(--color-text);overflow-wrap:anywhere}
 #price-editor .price-context span{font-variant-numeric:tabular-nums;line-height:1.5}
 #price-editor .price-tabs{gap:8px;margin-bottom:16px}
 #price-editor .price-tabs .button{min-height:44px;border-color:var(--color-control-border);box-shadow:none}
 #price-editor .price-tabs .primary{box-shadow:inset 0 -3px 0 var(--color-on-brand)}
 #price-editor .price-rule-summary{padding:10px 0;border-bottom:1px solid var(--color-divider);line-height:1.6;margin:12px 0;color:var(--color-text-muted)}
 #price-editor .price-rows-heading{margin:16px 0 12px;gap:8px}
 #price-editor #price-change-summary{margin:0;font-size:14px}
 #price-editor .price-fill-bar{border:1px solid var(--color-selected-border);border-radius:9px;gap:12px;padding:14px}
 #price-editor #price-grid.price-rows thead th{background:var(--color-surface-subtle);color:var(--color-text);font-weight:650;font-size:14px;line-height:1.5}
 #price-editor #price-grid.price-rows tbody tr:hover{background:var(--color-surface-raised)}
 #price-editor .price-amount{border-radius:7px}
 #price-editor #price-grid input[data-price-input]{font-size:16px;font-variant-numeric:tabular-nums}
 #price-editor .price-paste-hint,#price-editor .price-help p{font-size:14px;line-height:1.65;color:var(--color-text-muted)}
 #price-editor .price-help{background:var(--color-surface-raised);margin-bottom:0}
 #price-editor .price-help summary{font-size:15px}
 #price-editor .price-single{max-width:480px;margin:18px 0}
}
@media screen and (max-width:1099px){
 .catalogue-page .catalogue-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
 .catalogue-page .simple-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
 .catalogue-page .simple-filters .field:first-child{grid-column:1/-1}
}
@media screen and (max-width:700px){
 .catalogue-page .page-heading,.catalogue-categories .page-heading{gap:12px;align-items:flex-start}
 .catalogue-page .page-heading>.button,.catalogue-categories .page-heading>.button{flex-shrink:0;min-height:44px;padding:10px 12px}
 .catalogue-page .simple-filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:14px;gap:12px}
 .catalogue-page .simple-filters .field{min-width:0;flex-basis:auto}
 .catalogue-page .simple-filters .field:first-child{grid-column:1/-1}
 .catalogue-page .simple-filters input,.catalogue-page .simple-filters select{font-size:16px}
 .catalogue-filter-chips{padding:0 14px 14px}
 .catalogue-tools{padding:12px 14px}
 .catalogue-tools .button{max-width:100%;font-size:14px}
 .catalogue-page .catalogue-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 10px}
 .catalogue-page .design-info{padding:10px}
 .catalogue-page .design-info h3{font-size:16px}
 .catalogue-page .design-info .buttons{gap:6px;padding-top:9px}
 .catalogue-page>.pagination>span{width:100%}
 .catalogue-detail{gap:14px}
 .catalogue-detail-section{padding:16px}
 .catalogue-detail .simple-detail-gallery img{width:165px;height:220px}
 #simple-editor .simple-tabs{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:18px;padding-bottom:16px}
 #simple-editor .simple-tabs .button{padding:10px;min-height:68px;gap:8px;font-size:14px}
 #simple-editor .simple-pane{gap:16px}
 #simple-editor .simple-card{gap:12px;padding:14px;align-items:stretch}
 #simple-editor .simple-card-actions{align-self:flex-end}
 #simple-editor .simple-upload,#simple-editor .simple-price-policy,#simple-editor .addon-panel,#simple-editor .pm-configuration{padding:14px}
 #simple-editor .simple-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 #simple-editor .simple-asset .buttons{gap:5px}
 #simple-editor .simple-asset .buttons .button{padding:8px}
 #simple-editor .simple-pricing-policies{grid-template-columns:minmax(0,1fr)}
 #price-editor .price-context{padding:12px;gap:5px 12px}
 #price-editor .price-tabs .button{flex:1;padding:10px;font-size:14px}
}
@media screen and (prefers-reduced-motion:reduce){
 .catalogue-page .design-card{transition:none}
}

/* Add/Edit Product only. All controls stay mounted in their original order.
   Existing validation, sorting, modal lifecycle and print styles are retained. */
@media screen {
 #simple-editor.product-editor{min-width:0}
 #simple-editor.product-editor .pe-context{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px 12px;margin:0 0 18px;padding:11px 14px;border-left:3px solid var(--color-brand);border-radius:0 6px 6px 0;background:var(--color-surface-subtle);color:var(--color-text-muted);font-size:14px;line-height:1.5}
 #simple-editor.product-editor .pe-context strong{color:var(--color-text);font-weight:650}
 #simple-editor.product-editor .simple-tabs{margin-bottom:24px;padding-bottom:20px}
 #simple-editor.product-editor .simple-tabs .button{min-height:64px;line-height:1.4;gap:10px;border-radius:8px}
 #simple-editor.product-editor .simple-pane{grid-template-columns:minmax(0,1fr);gap:20px;align-items:start}
 #simple-editor.product-editor .simple-pane>.pe-block,#simple-editor.product-editor .simple-pane>.pe-pricing-heading{grid-column:1/-1}
 #simple-editor.product-editor .pe-block{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;min-width:0;padding:20px;border:1px solid var(--color-divider);border-radius:12px;background:var(--color-surface)}
 #simple-editor.product-editor .pe-block-heading{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px 16px;min-width:0;padding-bottom:14px;border-bottom:1px solid var(--color-divider)}
 #simple-editor.product-editor .pe-block-heading h3{font-family:inherit;font-size:18px;font-weight:650;line-height:1.45;color:var(--color-text);margin:0;overflow-wrap:anywhere}
 #simple-editor.product-editor .pe-note{font-size:14px;line-height:1.5;color:var(--color-text-muted);font-variant-numeric:tabular-nums}
 #simple-editor.product-editor .pe-identity{grid-template-columns:repeat(2,minmax(0,1fr)) minmax(160px,.9fr);gap:18px;min-width:0}
 #simple-editor.product-editor .pe-identity>.field:first-child{grid-column:1/-1;max-width:430px;width:100%}
 #simple-editor.product-editor .pe-identity>.field:nth-child(2){grid-column:span 2}
 #simple-editor.product-editor .pe-identity>.field:nth-child(3){grid-column:span 1}
 #simple-editor.product-editor .pe-identity>.field:last-child{grid-column:1/-1}
 #simple-editor.product-editor .field{margin:0;min-width:0;max-width:100%}
 #simple-editor.product-editor .field>label{font-size:14px;font-weight:600;line-height:1.5;color:var(--color-text);margin-bottom:7px;overflow-wrap:anywhere}
 #simple-editor.product-editor input:not([type=checkbox]):not([type=file]),#simple-editor.product-editor select,#simple-editor.product-editor textarea{min-width:0;max-width:100%;font-size:16px;line-height:1.5}
 #simple-editor.product-editor .pe-identity textarea{min-height:144px;resize:vertical}
 #simple-editor.product-editor .pe-production textarea{min-height:160px;resize:vertical}
 #simple-editor.product-editor input[name=simple_code]{font-variant-numeric:tabular-nums;letter-spacing:.02em}
 #simple-editor.product-editor .pe-media-grid{display:grid;grid-template-columns:minmax(0,1fr) 220px;align-items:start;gap:20px;min-width:0}
 #simple-editor.product-editor .pe-media .simple-upload{padding:0;border:0;border-radius:0;background:var(--color-surface)}
 #simple-editor.product-editor .pe-media .simple-upload-header h3{font-size:15px;font-weight:600;line-height:1.5;margin:0}
 #simple-editor.product-editor .pe-media .simple-upload-sketch{padding-left:20px;border-left:1px solid var(--color-divider)}
 #simple-editor.product-editor .pe-media .simple-gallery{margin:12px 0 14px;gap:10px}
 #simple-editor.product-editor .pe-media .simple-upload-sketch .simple-gallery{grid-template-columns:minmax(0,1fr)}
 #simple-editor.product-editor .pe-media .simple-asset{padding:8px;border-radius:8px;box-shadow:none}
 #simple-editor.product-editor .pe-media .simple-asset img{display:block;width:100%;aspect-ratio:3/4;object-fit:contain}
 #simple-editor.product-editor .pe-media .simple-asset-name{font-size:14px;line-height:1.4;overflow-wrap:anywhere}
 #simple-editor.product-editor .pe-media .simple-asset-actions{gap:6px}
 #simple-editor.product-editor .pe-media .simple-asset-actions .badge{font-size:14px;padding:3px 7px}
 #simple-editor.product-editor .simple-upload-footer{display:grid;justify-items:start;gap:10px;min-width:0}
 #simple-editor.product-editor .simple-upload-footer>.hint{margin:0;line-height:1.6}
 #simple-editor.product-editor .simple-upload-footer>.button{white-space:normal;text-align:left;min-height:44px}
 #simple-editor.product-editor .pe-media .simple-gallery:empty{display:grid;grid-template-columns:minmax(0,1fr);place-items:center;min-height:140px;padding:16px;border:1px dashed var(--color-control-border);border-radius:8px;background:var(--color-surface-raised);color:var(--color-text-muted);font-size:14px;text-align:center}
 #simple-editor.product-editor .pe-media .simple-upload-gallery .simple-gallery:empty::before{content:"No product photos yet"}
 #simple-editor.product-editor .pe-media .simple-upload-sketch .simple-gallery:empty::before{content:"No sketch added"}
 #simple-editor.product-editor .pe-block>.hint{margin:0;line-height:1.6}
 #simple-editor.product-editor .pe-block>.button{justify-self:start;min-height:44px;white-space:normal;text-align:left}
 #simple-editor.product-editor .pe-block>.simple-card{background:var(--color-surface-raised);border-color:var(--color-divider);box-shadow:none;padding:14px;gap:14px}
 #simple-editor.product-editor .simple-card-main{min-width:0}
 #simple-editor.product-editor .simple-card-main>.field{margin-top:14px}
 #simple-editor.product-editor .simple-card-actions{align-self:flex-start;gap:6px}
 #simple-editor.product-editor .simple-card .choice-chips>span{background:var(--color-surface);padding:4px 9px;font-size:14px}
 #simple-editor.product-editor .simple-card .simple-upload{margin-top:14px;padding:14px;background:var(--color-surface)}
 #simple-editor.product-editor .pe-pricing-heading{margin-top:2px}
 #simple-editor.product-editor .pe-pricing-heading h3{font-family:inherit;font-size:18px;line-height:1.45;font-weight:650;margin:0 0 5px;color:var(--color-text)}
 #simple-editor.product-editor .pe-pricing-heading p{font-size:14px;line-height:1.6;color:var(--color-text-muted);margin:0}
 #simple-editor.product-editor .simple-pricing-policies{gap:16px;margin:0}
 #simple-editor.product-editor .simple-price-policy{padding:18px;background:var(--color-surface);border-radius:12px}
 #simple-editor.product-editor .simple-policy-title{font-size:16px;font-weight:650;margin-bottom:14px}
 #simple-editor.product-editor .simple-price-policy .simple-price-next{gap:10px;margin-top:14px}
 #simple-editor.product-editor .simple-price-next>.button{min-height:44px;white-space:normal;text-align:left}
 #simple-editor.product-editor .simple-pane>details{border-radius:10px;padding:10px 18px;margin:0;background:var(--color-surface-raised)}
 #simple-editor.product-editor .simple-pane>details>summary{line-height:1.5;min-height:44px;font-size:15px}
 #simple-editor.product-editor .simple-sku{grid-template-columns:minmax(0,1fr) minmax(160px,1fr);gap:14px;padding:12px 0}
 #simple-editor.product-editor .simple-sku label{line-height:1.5;overflow-wrap:anywhere}
 #simple-editor.product-editor .price-next-check{gap:10px;align-items:flex-start;padding:12px 14px;border-radius:8px;background:var(--color-surface-subtle);line-height:1.6;font-size:14px}
 #simple-editor.product-editor .price-next-check input{margin-top:5px;flex-shrink:0}
 #simple-editor.product-editor .pm-configuration,#simple-editor.product-editor .addon-panel{padding:20px;border-radius:12px;background:var(--color-surface)}
 #simple-editor.product-editor .pm-configuration>h3,#simple-editor.product-editor .addon-panel>h3{font-size:18px;font-weight:650;line-height:1.45;margin:0 0 12px}
 #simple-editor.product-editor .pm-material-list li{gap:14px;padding:14px 0}
 #simple-editor.product-editor .pm-material-list strong{font-size:15px;font-weight:600;line-height:1.5}
 #simple-editor.product-editor .pm-material-list small{font-size:14px;line-height:1.6;margin-top:3px}
 #simple-editor.product-editor .pm-configuration>.button{min-height:44px}
 #simple-editor.product-editor .notice{line-height:1.65;overflow-wrap:anywhere}
 #simple-editor.product-editor #simple-upload-status:not(:empty){margin:16px 0 0;padding:12px 14px;border:1px solid var(--color-info-border);border-radius:8px;background:var(--color-info-bg);color:var(--color-info-text);font-size:14px;line-height:1.5}
}
@supports selector(:has(*)) {
 @media screen {
  .modal:has(#simple-editor.product-editor){width:1040px;max-width:calc(100vw - 32px)}
  .modal:has(#simple-editor.product-editor)>.modal-head{padding:20px 28px}
  .modal:has(#simple-editor.product-editor)>form{padding:24px 28px 0}
  .modal:has(#simple-editor.product-editor) .modal-foot{margin-top:24px;padding-bottom:20px;gap:10px}
  .modal:has(#simple-editor.product-editor) .form-error:not(:empty){margin-top:18px;padding:12px 14px;border:1px solid var(--color-error-border);border-radius:8px;background:var(--color-error-bg);color:var(--color-error-text);line-height:1.6}
 }
}
@media screen and (max-width:800px){
 #simple-editor.product-editor .pe-media-grid{grid-template-columns:minmax(0,1fr);gap:18px}
 #simple-editor.product-editor .pe-media .simple-upload-sketch{border-left:0;border-top:1px solid var(--color-divider);padding:18px 0 0}
 #simple-editor.product-editor .pe-media .simple-upload-sketch .simple-gallery{grid-template-columns:repeat(auto-fill,minmax(150px,190px))}
 #simple-editor.product-editor .pe-media .simple-upload-sketch .simple-gallery:empty{grid-template-columns:minmax(0,1fr)}
 #simple-editor.product-editor .pe-media .simple-upload-sketch .simple-gallery:empty{min-height:100px}
}
@media screen and (max-width:600px){
 #simple-editor.product-editor .pe-context{gap:3px 10px;margin-bottom:16px;padding:10px 12px}
 #simple-editor.product-editor .simple-tabs{gap:8px;margin-bottom:18px;padding-bottom:16px}
 #simple-editor.product-editor .simple-tabs .button{min-height:72px;padding:10px;gap:8px;font-size:14px}
 #simple-editor.product-editor .simple-pane{gap:16px}
 #simple-editor.product-editor .pe-block{gap:14px;padding:14px;border-radius:10px}
 #simple-editor.product-editor .pe-block-heading{padding-bottom:12px;gap:4px 10px}
 #simple-editor.product-editor .pe-block-heading h3{font-size:17px}
 #simple-editor.product-editor .pe-identity{grid-template-columns:minmax(0,1fr);gap:16px}
 #simple-editor.product-editor .pe-identity>.field:first-child,#simple-editor.product-editor .pe-identity>.field:nth-child(2),#simple-editor.product-editor .pe-identity>.field:nth-child(3),#simple-editor.product-editor .pe-identity>.field:last-child{grid-column:1/-1;max-width:100%}
 #simple-editor.product-editor .field.wide{grid-column:1/-1}
 #simple-editor.product-editor .pe-identity textarea{min-height:132px}
 #simple-editor.product-editor .pe-production textarea{min-height:140px}
 #simple-editor.product-editor .pe-media .simple-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 #simple-editor.product-editor .pe-media .simple-upload-sketch .simple-gallery{grid-template-columns:minmax(0,190px)}
 #simple-editor.product-editor .pe-media .simple-upload-sketch .simple-gallery:empty{grid-template-columns:minmax(0,1fr)}
 #simple-editor.product-editor .pe-block>.simple-card{padding:12px;gap:12px}
 #simple-editor.product-editor .simple-card-actions{align-self:flex-end}
 #simple-editor.product-editor .simple-pricing-policies{grid-template-columns:minmax(0,1fr);gap:12px}
 #simple-editor.product-editor .simple-price-policy,#simple-editor.product-editor .pm-configuration,#simple-editor.product-editor .addon-panel{padding:14px;border-radius:10px}
 #simple-editor.product-editor .simple-sku{grid-template-columns:minmax(0,1fr);gap:7px}
 #simple-editor.product-editor .simple-pane>details{padding:8px 14px}
}
@supports selector(:has(*)) {
 @media screen and (max-width:600px){
  .modal:has(#simple-editor.product-editor){max-width:calc(100vw - 20px)}
  .modal:has(#simple-editor.product-editor)>.modal-head{padding:16px}
  .modal:has(#simple-editor.product-editor)>form{padding:16px 14px 0}
  .modal:has(#simple-editor.product-editor) .modal-foot{padding-bottom:16px;margin-top:18px}
  .modal:has(#simple-editor.product-editor) .modal-foot>.primary{flex:2}
 }
}

/* Category Templates presentation only. Controls, callbacks, sort groups and
   publication rules remain in their existing renderers. Print styles unchanged. */
@media screen {
 .category-template-page{min-width:0}
 .category-template-page .category-strip{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
 .category-template-page .catalogue-category-card{border:1px solid var(--color-divider);border-radius:12px;box-shadow:0 1px 4px var(--color-shadow-soft);transition:border-color .15s,box-shadow .15s}
 .category-template-page .catalogue-category-card:hover,.category-template-page .catalogue-category-card:focus-within{border-color:var(--color-control-border);box-shadow:0 4px 14px var(--color-shadow-soft)}
 .category-template-page .catalogue-category-card .panel-body{padding:20px;min-width:0}
 .category-template-page .catalogue-category-card h2{font-size:20px;font-weight:650;line-height:1.4;margin:0 0 10px;overflow-wrap:anywhere}
 .category-template-page .catalogue-category-version{font-size:14px;line-height:1.4;padding:3px 8px;border-radius:5px;margin:0 0 16px;background:var(--color-surface-subtle);color:var(--color-text-muted)}
 .category-template-page .ct-card-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;margin:0 0 16px}
 .category-template-page .ct-card-summary>div{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:9px 10px;border-radius:7px;background:var(--color-surface-raised);min-width:0}
 .category-template-page .ct-card-summary dt{font-size:14px;line-height:1.45;color:var(--color-text-muted);min-width:0;overflow-wrap:anywhere}
 .category-template-page .ct-card-summary dd{margin:0;font-size:18px;font-weight:650;line-height:1.3;color:var(--color-text);font-variant-numeric:tabular-nums}
 .category-template-page .catalogue-category-card .panel-body>.ct-card-variations{font-size:14px;line-height:1.6;margin:0 0 18px;color:var(--color-text-muted);overflow-wrap:anywhere}
 .category-template-page .catalogue-category-card .buttons{gap:8px;padding-top:14px}
 .category-template-page .catalogue-category-card .buttons>.button{min-height:44px}
 .category-template-page .catalogue-category-card .buttons>a{margin-left:auto;padding-inline:16px}
 .category-template-page>.pagination{gap:12px;font-size:14px;line-height:1.5}
 .category-template-page>.pagination>.buttons{gap:8px}
 .category-template-page .ct-empty{padding:36px 20px;border:1px dashed var(--color-control-border);border-radius:10px;background:var(--color-surface-raised);box-shadow:none;text-align:center;color:var(--color-text-muted);line-height:1.6}
 #simple-editor.category-editor{min-width:0}
 #simple-editor.category-editor .ct-context{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px 12px;margin:0 0 18px;padding:11px 14px;border-left:3px solid var(--color-brand);border-radius:0 6px 6px 0;background:var(--color-surface-subtle);color:var(--color-text-muted);font-size:14px;line-height:1.6}
 #simple-editor.category-editor .ct-context strong{font-weight:650;color:var(--color-text)}
 #simple-editor.category-editor .simple-tabs{margin-bottom:24px;padding-bottom:20px}
 #simple-editor.category-editor .simple-tabs .button{min-height:64px;gap:10px;border-radius:8px;line-height:1.4}
 #simple-editor.category-editor .simple-pane{grid-template-columns:minmax(0,1fr);gap:20px;align-items:start}
 #simple-editor.category-editor .simple-pane>.ct-block,#simple-editor.category-editor .ct-rules-heading{grid-column:1/-1}
 #simple-editor.category-editor .ct-block{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;min-width:0;padding:20px;border:1px solid var(--color-divider);border-radius:12px;background:var(--color-surface)}
 #simple-editor.category-editor .ct-block-heading{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:5px 16px;padding-bottom:14px;border-bottom:1px solid var(--color-divider);min-width:0}
 #simple-editor.category-editor .ct-block-heading h3{font-family:inherit;font-size:18px;font-weight:650;line-height:1.45;margin:0;color:var(--color-text);overflow-wrap:anywhere}
 #simple-editor.category-editor .ct-note{font-size:14px;line-height:1.5;color:var(--color-text-muted);font-variant-numeric:tabular-nums}
 #simple-editor.category-editor .ct-identity-fields{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:18px}
 #simple-editor.category-editor .ct-identity-fields>.field:first-child{grid-column:1;grid-row:1}
 #simple-editor.category-editor .ct-identity-fields>.field:nth-child(2){grid-column:2;grid-row:1/span 2}
 #simple-editor.category-editor .ct-identity-fields>.field:nth-child(3){grid-column:1;grid-row:2;max-width:250px;width:100%}
 #simple-editor.category-editor .ct-identity-fields textarea{min-height:148px;resize:vertical}
 #simple-editor.category-editor .field{min-width:0;max-width:100%;margin:0}
 #simple-editor.category-editor .field>label,.category-subeditor .field>label{font-size:14px;font-weight:600;line-height:1.5;color:var(--color-text);overflow-wrap:anywhere;margin-bottom:7px}
 #simple-editor.category-editor input:not([type=checkbox]),#simple-editor.category-editor select,#simple-editor.category-editor textarea,.category-subeditor input:not([type=checkbox]),.category-subeditor select,.category-subeditor textarea{min-width:0;max-width:100%;font-size:16px;line-height:1.5}
 #simple-editor.category-editor .ct-included{padding:16px 18px;border:1px solid var(--color-divider);border-radius:10px;background:var(--color-surface-subtle);color:var(--color-text);font-size:14px;line-height:1.65}
 #simple-editor.category-editor .ct-included strong{font-weight:650;font-size:15px}
 #simple-editor.category-editor .ct-included p{margin:8px 0 0;font-size:14px;color:var(--color-text-muted);line-height:1.65}
 #simple-editor.category-editor .ct-block>.hint{margin:0;font-size:14px;line-height:1.65}
 #simple-editor.category-editor .ct-block>.button{justify-self:start;min-height:44px;white-space:normal;text-align:left}
 #simple-editor.category-editor .ct-block>.simple-card,#simple-editor.category-editor .addon-panel>.simple-card{padding:14px;gap:14px;box-shadow:none;background:var(--color-surface-raised);border-color:var(--color-divider)}
 #simple-editor.category-editor .simple-card h3{font-family:inherit;font-size:17px;line-height:1.45;margin:0 0 5px;overflow-wrap:anywhere}
 #simple-editor.category-editor .simple-card-meta{font-size:14px;line-height:1.5;margin-bottom:9px}
 #simple-editor.category-editor .simple-card-actions{align-self:flex-start;gap:6px}
 #simple-editor.category-editor .choice-chips{gap:6px}
 #simple-editor.category-editor .choice-chips>span{background:var(--color-surface);padding:4px 9px;font-size:14px;line-height:1.45;max-width:100%;overflow-wrap:anywhere}
 #simple-editor.category-editor .ct-rules-heading{margin-top:2px}
 #simple-editor.category-editor .ct-rules-heading h3{font-family:inherit;font-size:18px;font-weight:650;line-height:1.45;margin:0 0 5px;color:var(--color-text)}
 #simple-editor.category-editor .ct-rules-heading p{font-size:14px;line-height:1.6;margin:0;color:var(--color-text-muted)}
 #simple-editor.category-editor .simple-pricing-policies{gap:16px;margin:0}
 #simple-editor.category-editor .simple-price-policy{padding:18px;border-radius:12px;background:var(--color-surface)}
 #simple-editor.category-editor .simple-policy-title{font-size:16px;font-weight:650;margin-bottom:14px}
 #simple-editor.category-editor .simple-price-next{gap:10px;margin-top:14px}
 #simple-editor.category-editor .simple-pane>details{margin:0;padding:10px 18px;border-radius:10px;background:var(--color-surface-raised)}
 #simple-editor.category-editor .simple-pane>details>summary{font-size:15px;line-height:1.5;min-height:44px}
 #simple-editor.category-editor .addon-panel{padding:20px;border-radius:12px;background:var(--color-surface)}
 #simple-editor.category-editor .addon-panel>h3{font-family:inherit;font-size:18px;font-weight:650;line-height:1.45;margin:0 0 12px}
 #simple-editor.category-editor .addon-panel>.hint{font-size:14px;line-height:1.65;margin:0 0 16px}
 #simple-editor.category-editor .addon-panel>.simple-card{margin:10px 0}
 #simple-editor.category-editor .addon-panel>.button{min-height:44px}
 #simple-editor.category-editor .ct-production textarea{min-height:160px;resize:vertical}
 #simple-editor.category-editor .notice{line-height:1.65;overflow-wrap:anywhere}
 .category-subeditor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;min-width:0}
 .category-subeditor>.field:first-child,.category-subeditor>#simple-field-settings,.category-subeditor>#simple-choices,.category-subeditor>details,.category-subeditor>.hint,.category-subeditor>.notice{grid-column:1/-1}
 .category-subeditor .field.wide{grid-column:1/-1}
 .category-subeditor .field{min-width:0;margin:0}
 .category-subeditor>#simple-field-settings{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;min-width:0}
 .category-subeditor #simple-field-settings>.field:has(input[type=number]){max-width:280px}
 .category-subeditor .simple-choice{margin:0 0 10px;gap:8px;flex-wrap:nowrap}
 .category-subeditor .simple-choice input{min-width:0;font-size:16px}
 .category-subeditor .simple-choice>.button{min-height:44px;flex-shrink:0}
 .category-subeditor>.button{justify-self:start;white-space:normal;text-align:left;min-height:44px}
 .category-subeditor>details{margin:0;padding:10px 16px;border:1px solid var(--color-divider);border-radius:9px;background:var(--color-surface-raised)}
 .category-subeditor summary{font-size:15px;line-height:1.5;min-height:44px}
 .category-subeditor details>label{display:flex;align-items:flex-start;gap:9px;line-height:1.6;font-size:14px;margin:12px 0;overflow-wrap:anywhere}
 .category-subeditor details>label input{margin-top:5px;flex-shrink:0}
 .category-subeditor #simple-default-setting{margin-top:14px;min-width:0}
 .category-subeditor textarea{resize:vertical;min-height:108px}
}
@supports selector(:has(*)) {
 @media screen {
  .modal:has(#simple-editor.category-editor){width:1000px;max-width:calc(100vw - 32px)}
  .modal:has(.category-subeditor){width:720px;max-width:calc(100vw - 32px)}
  .modal:has(#simple-editor.category-editor)>.modal-head,.modal:has(.category-subeditor)>.modal-head{padding:20px 28px}
  .modal:has(#simple-editor.category-editor)>form,.modal:has(.category-subeditor)>form{padding:24px 28px 0}
  .modal:has(#simple-editor.category-editor) .modal-foot,.modal:has(.category-subeditor) .modal-foot{margin-top:24px;padding-bottom:20px;gap:10px}
  .modal:has(#simple-editor.category-editor) .form-error:not(:empty),.modal:has(.category-subeditor) .form-error:not(:empty){margin-top:18px;padding:12px 14px;border:1px solid var(--color-error-border);border-radius:8px;background:var(--color-error-bg);color:var(--color-error-text);line-height:1.6}
 }
}
@media screen and (max-width:1099px){
 .category-template-page .category-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
}
@media screen and (max-width:700px){
 #simple-editor.category-editor .simple-tabs{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #simple-editor.category-editor .simple-tabs .button{min-height:72px;padding:10px;gap:8px;font-size:14px}
 #simple-editor.category-editor .ct-identity-fields{grid-template-columns:minmax(0,1fr);gap:16px}
 #simple-editor.category-editor .ct-identity-fields>.field:first-child,#simple-editor.category-editor .ct-identity-fields>.field:nth-child(2),#simple-editor.category-editor .ct-identity-fields>.field:nth-child(3){grid-column:1/-1;grid-row:auto;max-width:100%}
 #simple-editor.category-editor .ct-identity-fields textarea{min-height:112px}
 #simple-editor.category-editor .simple-card-actions{align-self:flex-end}
 #simple-editor.category-editor .simple-pricing-policies{grid-template-columns:minmax(0,1fr)}
}
@media screen and (max-width:600px){
 .category-template-page .category-strip{grid-template-columns:minmax(0,1fr);gap:14px}
 .category-template-page .catalogue-category-card .panel-body{padding:18px}
 .category-template-page .catalogue-category-card h2{font-size:19px}
 .category-template-page .page-heading{gap:12px}
 .category-template-page .page-heading>.button{min-height:44px}
 .category-template-page>.pagination{align-items:flex-start;flex-direction:column}
 #simple-editor.category-editor .ct-context{gap:3px 10px;padding:10px 12px;margin-bottom:16px}
 #simple-editor.category-editor .simple-tabs{margin-bottom:18px;padding-bottom:16px}
 #simple-editor.category-editor .simple-pane{gap:16px}
 #simple-editor.category-editor .ct-block,#simple-editor.category-editor .addon-panel{padding:14px;border-radius:10px;gap:14px}
 #simple-editor.category-editor .ct-block-heading{padding-bottom:12px}
 #simple-editor.category-editor .ct-block-heading h3,#simple-editor.category-editor .addon-panel>h3{font-size:17px}
 #simple-editor.category-editor .ct-included{padding:14px}
 #simple-editor.category-editor .simple-card{padding:12px;gap:12px}
 #simple-editor.category-editor .simple-price-policy{padding:14px}
 #simple-editor.category-editor .simple-pane>details{padding:8px 14px}
 #simple-editor.category-editor .field.wide{grid-column:1/-1}
 #simple-editor.category-editor .ct-production textarea{min-height:140px}
 .category-subeditor{grid-template-columns:minmax(0,1fr);gap:16px}
 .category-subeditor>.button{max-width:100%}
 .category-subeditor details{padding:8px 14px}
}
@supports selector(:has(*)) {
 @media screen and (max-width:600px){
  .modal:has(#simple-editor.category-editor),.modal:has(.category-subeditor){max-width:calc(100vw - 20px)}
  .modal:has(#simple-editor.category-editor)>.modal-head,.modal:has(.category-subeditor)>.modal-head{padding:16px}
  .modal:has(#simple-editor.category-editor)>form,.modal:has(.category-subeditor)>form{padding:16px 14px 0}
  .modal:has(#simple-editor.category-editor) .modal-foot,.modal:has(.category-subeditor) .modal-foot{padding-bottom:16px;margin-top:18px}
  .modal:has(#simple-editor.category-editor) .modal-foot>.primary,.modal:has(.category-subeditor) .modal-foot>.primary{flex:2}
 }
}
@media screen and (prefers-reduced-motion:reduce){
 .category-template-page .catalogue-category-card{transition:none}
}

/* Selling Prices and Partner Making Rates presentation. Existing grouping,
   paste/fill, page-save limits and guarded writes stay in the pricing module. */
@media screen {
 #price-editor{min-width:0}
 #price-editor .pp-context-group{padding:16px;border:1px solid var(--color-divider);border-radius:12px;background:var(--color-surface)}
 #price-editor .pp-context-group .price-context{margin:0 0 14px;padding:0 0 14px;border:0;border-bottom:1px solid var(--color-divider);border-radius:0;background:var(--color-surface);align-items:baseline;gap:8px 18px}
 #price-editor .price-context strong{font-size:17px;font-weight:650;line-height:1.5;overflow-wrap:anywhere}
 #price-editor .price-context span{font-size:14px;line-height:1.5;color:var(--color-text-muted);font-variant-numeric:tabular-nums}
 #price-editor .pp-navigation{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}
 #price-editor .pp-navigation .price-tabs{margin:0;gap:8px}
 #price-editor .price-tabs .button{min-height:44px;padding:10px 16px;border-radius:7px;font-size:14px;line-height:1.45;font-weight:600}
 #price-editor .pp-navigation>.button{min-height:44px;white-space:normal;text-align:left}
 #price-editor .pp-partner{margin-top:16px;padding-top:16px;border-top:1px solid var(--color-divider);min-width:0}
 #price-editor .pp-partner>.field{max-width:460px;margin:0;min-width:0}
 #price-editor .pp-partner label{font-size:14px;font-weight:600;line-height:1.5;color:var(--color-text)}
 #price-editor .pp-partner select{font-size:16px;min-width:0;max-width:100%}
 #price-editor .price-rule-summary{margin:14px 0 18px;padding:12px 14px;border:1px solid var(--color-divider);border-radius:8px;background:var(--color-surface-subtle);font-size:14px;line-height:1.65;color:var(--color-text-muted);overflow-wrap:anywhere}
 #price-editor .pp-table-section{min-width:0;padding:18px;border:1px solid var(--color-divider);border-radius:12px;background:var(--color-surface)}
 #price-editor .price-rows-heading{align-items:baseline;gap:8px 18px;margin:0 0 16px}
 #price-editor .price-rows-heading>strong{font-size:16px;font-weight:650;line-height:1.5;color:var(--color-text)}
 #price-editor #price-change-summary{margin:0;font-size:14px;font-weight:500;line-height:1.6;color:var(--color-text-muted);font-variant-numeric:tabular-nums}
 #price-editor .price-base-note{padding:10px 12px;border-left:3px solid var(--color-info-border);border-radius:0 6px 6px 0;background:var(--color-info-bg);color:var(--color-info-text);font-size:14px;line-height:1.65;margin:0 0 14px}
 #price-editor .pp-refresh-warning{padding:12px 14px;border:1px solid var(--color-warning-border);border-radius:8px;background:var(--color-warning-bg);color:var(--color-warning-text);font-size:14px;line-height:1.65;margin:0 0 16px}
 #price-editor .price-fill-bar{margin:0 0 16px;padding:14px;border:1px solid var(--color-selected-border);border-radius:9px;background:var(--color-selected-bg);gap:12px;align-items:end}
 #price-editor .price-fill-bar>strong{font-size:14px;font-weight:650;line-height:1.5;align-self:center;min-width:85px;font-variant-numeric:tabular-nums}
 #price-editor .price-fill-bar .field{flex:1;min-width:150px;max-width:240px;margin:0}
 #price-editor .price-fill-bar .field>label{font-size:14px;line-height:1.5;color:var(--color-text);overflow-wrap:anywhere}
 #price-editor .price-fill-bar input,#price-editor .price-fill-bar select{font-size:16px;min-width:0;max-width:100%}
 #price-editor .price-fill-bar .button{min-height:44px;white-space:normal;text-align:left}
 #price-editor #price-grid-message{white-space:pre-line;margin:0 0 14px;padding:12px 14px;font-size:14px;line-height:1.65;overflow-wrap:anywhere}
 #price-editor .price-rows-scroll{border-radius:9px;max-width:100%;max-height:52vh;overscroll-behavior:contain;scroll-padding-top:54px}
 #price-editor #price-grid.price-rows th,#price-editor #price-grid.price-rows td{padding:12px 14px;vertical-align:middle;font-size:15px;line-height:1.5}
 #price-editor #price-grid.price-rows th{background:var(--color-surface-subtle);color:var(--color-text);font-size:14px;font-weight:650;line-height:1.5}
 #price-editor #price-grid.price-rows th small{display:block;font-size:14px;font-weight:400;line-height:1.4;margin-top:3px;color:var(--color-text-muted)}
 #price-editor #price-grid.price-rows td.price-option-column{font-weight:500;overflow-wrap:anywhere}
 #price-editor #price-grid.price-rows tbody tr:hover{background:var(--color-surface-raised)}
 #price-editor #price-grid.price-rows tbody tr:has([data-select-cell]:checked){background:var(--color-selected-bg)}
 #price-editor #price-grid.price-rows .price-select-column{padding:6px;min-width:44px!important;width:44px}
 #price-editor #price-grid.price-rows .price-select-column input{cursor:pointer}
 #price-editor .price-amount{border-radius:7px;min-width:140px}
 #price-editor .price-amount>span{font-size:14px;font-weight:500;line-height:1.5;color:var(--color-text-muted);padding-left:12px}
 #price-editor #price-grid input[data-price-input]{font-size:16px;font-variant-numeric:tabular-nums;line-height:1.5;min-height:44px}
 #price-editor #price-grid .price-cell-state{font-size:14px;line-height:1.5;margin-top:5px;white-space:normal}
 #price-editor #price-grid [data-state=unsaved] .price-cell-state{color:var(--color-warning-text);font-weight:600}
 #price-editor #price-grid [data-state=invalid] .price-cell-state{color:var(--color-error-text);font-weight:600}
 #price-editor .price-single{max-width:460px;margin:0;padding:4px 0 6px}
 #price-editor .price-single [data-price-entry]>label{display:block;margin-bottom:10px;font-size:15px;font-weight:600;line-height:1.5;color:var(--color-text)}
 #price-editor .price-single .price-amount{min-width:0}
 #price-editor .price-grid-paging{margin:16px 0 0;gap:12px;flex-wrap:wrap;align-items:center;font-size:14px;line-height:1.5;font-variant-numeric:tabular-nums}
 #price-editor .price-grid-paging .button{min-height:44px}
 #price-editor .price-paste-hint{font-size:14px;line-height:1.65;color:var(--color-text-muted);margin:16px 0 12px}
 #price-editor .price-help{margin:0;padding:8px 14px;border-radius:8px;background:var(--color-surface-raised)}
 #price-editor .price-help summary{font-size:14px;font-weight:600;line-height:1.5;min-height:44px}
 #price-editor .price-help p{font-size:14px;line-height:1.65;color:var(--color-text-muted);overflow-wrap:anywhere}
 #buyer-addon-prices{min-width:0}
 #buyer-addon-prices .pp-addon-context{padding:14px 16px;border:1px solid var(--color-divider);border-radius:9px;background:var(--color-surface-subtle);margin-bottom:16px}
 #buyer-addon-prices .pp-addon-context p{font-size:14px;line-height:1.65;margin:0;overflow-wrap:anywhere}
 #buyer-addon-prices .pp-addon-context strong{font-weight:650;color:var(--color-text)}
 #buyer-addon-prices .pp-addon-context .pp-addon-product{margin-top:6px;color:var(--color-text-muted)}
 #buyer-addon-prices>.hint{font-size:14px;line-height:1.65;color:var(--color-text-muted);margin:0 0 18px}
 #buyer-addon-prices .pp-addon-fields{gap:18px;min-width:0}
 #buyer-addon-prices .field{min-width:0}
 #buyer-addon-prices .field>label{font-size:14px;font-weight:600;line-height:1.5;margin-bottom:8px;overflow-wrap:anywhere}
 #buyer-addon-prices input{font-size:16px;font-variant-numeric:tabular-nums;min-width:0;max-width:100%;min-height:44px}
 #price-owner-choice{padding:16px;border:1px solid var(--color-divider);border-radius:10px;background:var(--color-surface-raised);min-width:0}
 #price-owner-choice .field{margin:0;min-width:0}
 #price-owner-choice select{font-size:16px;min-width:0;max-width:100%}
 #price-owner-choice .pp-owner-hint{font-size:14px;line-height:1.65;color:var(--color-text-muted);margin:12px 0 0}
 .modal.price-list-dialog{width:1120px;max-width:calc(100vw - 32px)}
 .modal.price-single-dialog{width:700px}
 .modal.price-dialog>.modal-head{padding:20px 26px}
 .modal.price-dialog>form{padding:22px 24px 0}
 .modal.price-dialog .modal-foot{margin-top:20px;padding-bottom:20px;gap:10px}
 .modal.price-dialog .form-error:not(:empty){margin-top:16px;padding:12px 14px;border:1px solid var(--color-error-border);border-radius:8px;background:var(--color-error-bg);color:var(--color-error-text);font-size:14px;line-height:1.65}
}
@supports selector(:has(*)) {
 @media screen {
  .modal:has(#buyer-addon-prices){width:760px;max-width:calc(100vw - 32px)}
  .modal:has(#price-owner-choice){width:600px;max-width:calc(100vw - 32px)}
 }
}
@media screen and (max-width:700px){
 #price-editor .pp-context-group,#price-editor .pp-table-section{padding:14px;border-radius:10px}
 #price-editor .pp-navigation{align-items:stretch;gap:10px}
 #price-editor .pp-navigation .price-tabs{width:100%}
 #price-editor .price-tabs .button{flex:1;padding:10px;font-size:14px}
 #price-editor .pp-partner>.field{max-width:100%}
 #price-editor .price-rows-heading{align-items:flex-start;flex-direction:column;gap:6px}
 #price-editor .price-fill-bar{padding:12px;gap:10px}
 #price-editor .price-fill-bar>strong{width:100%}
 #price-editor .price-fill-bar .field{min-width:0;max-width:none;flex-basis:100%}
 #price-editor .price-fill-bar .button{flex:1}
 #price-editor #price-grid.price-rows th,#price-editor #price-grid.price-rows td{padding:10px 8px;font-size:14px}
 #price-editor #price-grid.price-rows .price-amount-cell{min-width:150px;max-width:185px}
 #price-editor .price-amount{min-width:130px}
 #price-editor .price-amount>span{padding-left:8px}
 #price-editor #price-grid .price-amount input[data-price-input]{padding:10px 8px}
 #price-editor #price-grid.price-rows .price-mobile-options{overflow-wrap:anywhere;line-height:1.6}
 #price-editor .price-rows-scroll{max-height:50vh}
 #price-editor .price-single{max-width:100%}
 #price-editor .price-grid-paging{gap:8px;justify-content:space-between}
 #price-editor .price-grid-paging .button{padding:9px}
 #price-editor .price-help{padding:8px 12px}
 #buyer-addon-prices .pp-addon-fields{grid-template-columns:minmax(0,1fr);gap:16px}
 .modal.price-dialog{max-width:calc(100vw - 20px)}
 .modal.price-dialog>.modal-head{padding:16px}
 .modal.price-dialog>form{padding:16px 14px 0}
 .modal.price-dialog .modal-foot{padding-bottom:16px;margin-top:16px}
 .modal.price-dialog .modal-foot>.primary{flex:2}
}

/* Businesses & partners: presentation only, scoped to this Console screen and
   its existing forms. Business relationships and account actions are unchanged. */
@media screen {
 .business-admin-page{min-width:0}
 .business-admin-page>.page-heading{gap:20px;align-items:flex-start}
 .business-admin-page>.page-heading>.buttons{flex-shrink:0}
 .business-admin-page .panel{overflow:hidden;border-radius:12px;box-shadow:0 1px 4px var(--color-shadow-soft)}
 .business-admin-page .panel-head{gap:16px;align-items:center;flex-wrap:wrap;padding:20px 22px;background:var(--color-surface-raised);border-bottom:1px solid var(--color-divider)}
 .business-admin-page .panel-head h2{margin:0;font-size:21px;line-height:1.4;display:flex;align-items:center;gap:10px;min-width:0;overflow-wrap:anywhere}
 .business-admin-page .bp-count{display:inline-flex;align-items:center;justify-content:center;min-width:28px;padding:2px 8px;border-radius:6px;background:var(--color-surface-subtle);color:var(--color-text-muted);font-size:14px;font-weight:600;line-height:1.5;font-variant-numeric:tabular-nums}
 .business-admin-page .panel-head>.buttons{margin-left:auto;gap:8px}
 .business-admin-page .button{min-height:44px;white-space:normal;text-align:center;line-height:1.4}
 .business-admin-page .bp-table-wrap{min-width:0;width:100%}
 .business-admin-page .bp-table-wrap:focus-visible{outline:2px solid var(--color-focus);outline-offset:-3px}
 .business-admin-page .bp-table{table-layout:fixed;width:100%;min-width:0;margin:0;white-space:normal}
 .business-admin-page .bp-table th{padding:12px 22px;font-size:12px;line-height:1.5;letter-spacing:.06em;color:var(--color-text-muted);background:var(--color-surface);border-bottom:1px solid var(--color-divider);text-align:left}
 .business-admin-page .bp-table td{padding:17px 22px;vertical-align:middle;font-size:14px;line-height:1.6;border-bottom:1px solid var(--color-divider);overflow-wrap:anywhere}
 .business-admin-page .bp-table tbody tr:last-child td{border-bottom:0}
 .business-admin-page .bp-table tbody tr:hover{background:var(--color-surface-raised)}
 .business-admin-page .bp-table tbody tr:focus-within{background:var(--color-surface-hover)}
 .business-admin-page .bp-table td strong{display:block;font-size:16px;font-weight:650;line-height:1.5;color:var(--color-text)}
 .business-admin-page .bp-table td small{display:block;font-size:13px;line-height:1.6;margin-top:5px;color:var(--color-text-muted)}
 .business-admin-page .bp-business-table th:first-child{width:42%}
 .business-admin-page .bp-business-table th:nth-child(2){width:14%}
 .business-admin-page .bp-business-table th:nth-child(3){width:18%}
 .business-admin-page .bp-business-table th:last-child{width:26%}
 .business-admin-page .bp-partner-table th:first-child{width:27%}
 .business-admin-page .bp-partner-table th:nth-child(2){width:30%}
 .business-admin-page .bp-partner-table th:nth-child(3){width:19%}
 .business-admin-page .bp-partner-table th:last-child{width:24%}
 .business-admin-page .bp-table th:last-child{text-align:right}
 .business-admin-page .bp-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
 .business-admin-page .bp-row-actions .button{font-size:13px;padding:10px 12px}
 .business-admin-page .bp-currency,.business-admin-page .bp-numeric{font-variant-numeric:tabular-nums;font-weight:600}
 .business-admin-page .bp-currency{letter-spacing:.04em}
 .business-admin-page .bp-links{display:flex;gap:6px;flex-wrap:wrap;min-width:0}
 .business-admin-page .bp-links>span{padding:3px 8px;border:1px solid var(--color-divider);border-radius:5px;background:var(--color-surface-subtle);color:var(--color-text);max-width:100%;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
 .business-admin-page .bp-links>.bp-unlinked{display:block;padding:0;border:0;background:transparent;color:var(--color-warning-text);font-size:14px;line-height:1.6}
 .business-admin-page .bp-table .bp-test-copy{color:var(--color-warning-text);font-weight:600}
 .business-admin-page .bp-mobile-label{display:none}
 .business-admin-page .bp-partner-note{margin:0;padding:13px 22px;border-top:1px solid var(--color-divider);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:13px;line-height:1.65;overflow-wrap:anywhere}
 .business-admin-page .bp-empty{margin:18px 22px;padding:26px 18px;border:1px dashed var(--color-control-border);border-radius:8px;background:var(--color-surface-raised);color:var(--color-text-muted);font-size:14px;line-height:1.6;text-align:center;overflow-wrap:anywhere}
 .bp-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;grid-column:1/-1;min-width:0}
 .bp-form>.wide{grid-column:1/-1}
 .bp-form .field{min-width:0;margin:0}
 .bp-form .field>label{font-size:14px;line-height:1.5;font-weight:600;overflow-wrap:anywhere}
 .bp-form input:not([type=checkbox]),.bp-form select{min-width:0;width:100%;max-width:100%;font-size:16px;line-height:1.5}
 .bp-form>.hint{margin:0;font-size:14px;line-height:1.65;color:var(--color-text-muted);overflow-wrap:anywhere}
 .bp-form>.field:has(input[name=name]){grid-column:1/-1}
 .bp-form fieldset{margin:0;padding:15px 16px 16px;border:1px solid var(--color-divider);border-radius:8px;background:var(--color-surface-raised);min-width:0}
 .bp-form legend{padding:0 6px;font-size:14px;font-weight:600;line-height:1.6;overflow-wrap:anywhere;max-width:100%}
 .bp-form .check-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 14px;max-height:260px;overflow:auto;overscroll-behavior:contain}
 .bp-form .check-list>label{display:flex;align-items:flex-start;gap:9px;min-height:44px;padding:10px 4px;font-size:14px;line-height:1.6;overflow-wrap:anywhere;min-width:0}
 .bp-form input[type=checkbox]{flex-shrink:0;margin-top:4px;accent-color:var(--color-brand)}
 .bp-form .bp-login-toggle{padding:14px 16px;border:1px solid var(--color-divider);border-radius:8px;background:var(--color-surface-subtle);min-height:48px}
 .bp-form .bp-login-toggle>span{display:flex;align-items:flex-start;gap:9px;font-size:14px;line-height:1.6;font-weight:600;overflow-wrap:anywhere}
 .bp-form #partner-login-fields{padding:16px;border-left:3px solid var(--color-brand);background:var(--color-surface-raised);border-radius:0 8px 8px 0}
 .bp-form #partner-login-fields .field-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .bp-form #partner-login-fields .field-grid>.field:last-child{grid-column:1/-1}
 .bp-form #partner-login-fields>.hint{margin:14px 0 0;font-size:14px;line-height:1.6}
 .bp-form #link-partner-choice{min-width:0}
 .bp-form #link-partner-choice>.field{margin:0}
 .bp-form.bp-link-form>.field{grid-column:1/-1}
 .bp-form .button{min-height:44px}
}
@supports selector(:has(*)) {
 @media screen {
  .modal:has(.bp-form){width:660px;max-width:calc(100vw - 32px)}
  .modal:has(.bp-form) .modal-head{padding-bottom:20px}
  .modal:has(.bp-form) .modal-head h2{font-size:24px;line-height:1.35;overflow-wrap:anywhere}
  .modal:has(.bp-form) .modal-foot{gap:10px}
  .modal:has(.bp-form) .modal-foot .button{min-height:44px}
 }
}
@media screen and (max-width:1100px) and (min-width:761px) {
 .business-admin-page .bp-table td,.business-admin-page .bp-table th{padding-inline:15px}
 .business-admin-page .bp-partner-table th:first-child{width:25%}
 .business-admin-page .bp-partner-table th:nth-child(2){width:28%}
 .business-admin-page .bp-partner-table th:nth-child(3){width:18%}
 .business-admin-page .bp-partner-table th:last-child{width:29%}
}
@media screen and (max-width:760px) {
 .business-admin-page>.page-heading{flex-direction:column;gap:14px}
 .business-admin-page>.page-heading>.buttons{width:100%}
 .business-admin-page>.page-heading .button{width:100%}
 .business-admin-page .panel-head{padding:17px 16px;gap:12px}
 .business-admin-page .panel-head h2{font-size:20px}
 .business-admin-page .panel-head>.buttons{margin-left:0;width:100%}
 .business-admin-page .panel-head>.buttons>.button{flex:1 1 160px}
 .business-admin-page .bp-table-wrap{overflow:visible}
 .business-admin-page .bp-table,.business-admin-page .bp-table tbody{display:block;width:100%;min-width:0}
 .business-admin-page .bp-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .business-admin-page .bp-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px;padding:18px 16px;border-bottom:1px solid var(--color-divider)}
 .business-admin-page .bp-table tbody tr:last-child{border-bottom:0}
 .business-admin-page .bp-table td{display:block;padding:0;border:0;min-width:0;width:auto;font-size:14px}
 .business-admin-page .bp-table td:first-child{grid-column:1/-1}
 .business-admin-page .bp-mobile-label{display:block;margin-bottom:3px;font-size:12px;line-height:1.5;font-weight:600;letter-spacing:.03em;color:var(--color-text-muted)}
 .business-admin-page .bp-table td:last-child{grid-column:1/-1}
 .business-admin-page .bp-row-actions{justify-content:flex-start;gap:8px}
 .business-admin-page .bp-row-actions>.button{min-height:44px}
 .business-admin-page .bp-business-table .bp-row-actions>.button{width:100%}
 .business-admin-page .bp-partner-table td:nth-child(2){grid-column:1/-1}
 .business-admin-page .bp-partner-note{padding:13px 16px}
 .business-admin-page .bp-empty{margin:16px;padding:24px 14px}
 .bp-form{grid-template-columns:minmax(0,1fr);gap:16px}
 .bp-form>.field,.bp-form>.wide{grid-column:1/-1}
 .bp-form .check-list{grid-template-columns:minmax(0,1fr)}
 .bp-form #partner-login-fields .field-grid{grid-template-columns:minmax(0,1fr)}
 .bp-form #partner-login-fields{padding:14px}
}

/* Users & permissions presentation only. Role checks, grants and account
   operations remain in their existing services and guarded handlers. */
@media screen {
 .users-permissions-page{min-width:0}
 .users-permissions-page>.page-heading{align-items:flex-start;gap:20px}
 .users-permissions-page>.page-heading>.buttons{gap:8px;flex-wrap:wrap}
 .users-permissions-page .panel{overflow:hidden;border-radius:12px;box-shadow:0 1px 4px var(--color-shadow-soft)}
 .users-permissions-page .panel-head{padding:20px 22px;gap:14px;align-items:flex-start;flex-wrap:wrap;background:var(--color-surface-raised);border-bottom:1px solid var(--color-divider)}
 .users-permissions-page .panel-head h2{display:flex;align-items:center;gap:10px;font-size:21px;line-height:1.4;margin:0;min-width:0;overflow-wrap:anywhere}
 .users-permissions-page .panel-head p{font-size:14px;line-height:1.6;margin:6px 0 0;color:var(--color-text-muted);overflow-wrap:anywhere}
 .users-permissions-page .up-count{display:inline-flex;align-items:center;justify-content:center;min-width:28px;padding:2px 8px;border-radius:6px;background:var(--color-surface-subtle);color:var(--color-text-muted);font-size:14px;font-weight:600;line-height:1.5;font-variant-numeric:tabular-nums}
 .users-permissions-page .button{min-height:44px;white-space:normal;line-height:1.4}
 .users-permissions-page .up-table-wrap{min-width:0;width:100%}
 .users-permissions-page .up-table-wrap:focus-visible{outline:2px solid var(--color-focus);outline-offset:-3px}
 .users-permissions-page .up-account-table{table-layout:fixed;width:100%;min-width:0;margin:0;white-space:normal}
 .users-permissions-page .up-account-table th{padding:12px 16px;font-size:12px;line-height:1.5;letter-spacing:.05em;background:var(--color-surface);color:var(--color-text-muted);text-align:left;border-bottom:1px solid var(--color-divider)}
 .users-permissions-page .up-account-table td{padding:17px 16px;font-size:14px;line-height:1.6;vertical-align:top;border-bottom:1px solid var(--color-divider);overflow-wrap:anywhere}
 .users-permissions-page .up-account-table th:first-child{width:22%}
 .users-permissions-page .up-account-table th:nth-child(2){width:17%}
 .users-permissions-page .up-account-table th:nth-child(3){width:9%}
 .users-permissions-page .up-account-table th:nth-child(4){width:17%}
 .users-permissions-page .up-account-table th:last-child{width:35%;text-align:right}
 .users-permissions-page .up-account-table td:first-child strong{display:block;font-size:16px;font-weight:650;line-height:1.5;color:var(--color-text)}
 .users-permissions-page .up-account-table td small{display:block;margin-top:5px;font-size:13px;line-height:1.6;color:var(--color-text-muted)}
 .users-permissions-page .up-account-table tbody tr:last-child td{border-bottom:0}
 .users-permissions-page .up-account-table tbody tr:hover{background:var(--color-surface-raised)}
 .users-permissions-page .up-account-table tbody tr:focus-within{background:var(--color-surface-hover)}
 .users-permissions-page .up-role{display:inline-block;padding:2px 7px;border-radius:5px;background:var(--color-surface-subtle);color:var(--color-text);font-size:13px;font-weight:600;line-height:1.5;max-width:100%;overflow-wrap:anywhere}
 .users-permissions-page .up-status{display:inline-block;font-size:13px;font-weight:600;line-height:1.5;padding:2px 7px;border-radius:5px;max-width:100%;overflow-wrap:anywhere}
 .users-permissions-page .up-status-active{background:var(--color-success-bg);color:var(--color-success-text)}
 .users-permissions-page .up-status-disabled{background:var(--color-disabled-bg);color:var(--color-disabled-text)}
 .users-permissions-page .up-row-actions{display:flex;justify-content:flex-end;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}
 .users-permissions-page .up-row-actions>.button{padding:10px 11px;font-size:13px;max-width:100%}
 .users-permissions-page .up-row-actions>.button.primary{background:var(--color-surface);border-color:var(--color-control-border);color:var(--color-text)}
 .users-permissions-page .up-row-actions>.button.primary:hover{background:var(--color-surface-hover)}
 .users-permissions-page .up-row-actions>[data-action=preview-user]{border-color:var(--color-divider);background:transparent;color:var(--color-text-muted)}
 .users-permissions-page .shared-access-cell{gap:8px;min-width:0}
 .users-permissions-page .shared-access-cell small{margin:0;font-size:13px;line-height:1.6}
 .users-permissions-page .shared-access-cell>.button{padding:9px 11px;font-size:13px;max-width:100%}
 .users-permissions-page .up-mobile-label{display:none}
 .users-permissions-page .up-grants{padding:0}
 .users-permissions-page .up-grant-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px 24px;padding:20px 22px;border-bottom:1px solid var(--color-divider);min-width:0}
 .users-permissions-page .up-grant-row:last-child{border-bottom:0}
 .users-permissions-page .up-grant-identity{min-width:0}
 .users-permissions-page .up-grant-identity>strong{font-size:16px;line-height:1.5;font-weight:650;color:var(--color-text);overflow-wrap:anywhere}
 .users-permissions-page .up-grant-identity>p{margin:6px 0 0;font-size:14px;line-height:1.6;color:var(--color-text-muted);overflow-wrap:anywhere}
 .users-permissions-page .up-grant-actions{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap;grid-column:2;grid-row:1}
 .users-permissions-page .up-grant-actions>.button{min-height:44px;padding:10px 12px;font-size:13px}
 .users-permissions-page .up-grant-actions>[data-action=revoke-grant]{color:var(--color-error-text);border-color:var(--color-error-border);background:var(--color-surface)}
 .users-permissions-page .up-grant-actions>[data-action=revoke-grant]:hover{background:var(--color-error-bg)}
 .users-permissions-page .up-action-summary{grid-column:1/-1;display:flex;gap:6px;flex-wrap:wrap;min-width:0;font-size:13px;line-height:1.6;color:var(--color-text)}
 .users-permissions-page .up-action-summary>span{padding:3px 8px;border:1px solid var(--color-divider);border-radius:5px;background:var(--color-surface-raised);max-width:100%;overflow-wrap:anywhere}
 .users-permissions-page .up-empty{margin:18px 22px;padding:26px 18px;border:1px dashed var(--color-control-border);border-radius:8px;background:var(--color-surface-raised);font-size:14px;line-height:1.6;color:var(--color-text-muted);text-align:center;overflow-wrap:anywhere}
 .up-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;grid-column:1/-1;min-width:0}
 .up-form .field{min-width:0;margin:0}
 .up-form>.wide,.up-form>.hint,.up-form>.notice,.up-form>details{grid-column:1/-1}
 .up-form .field>label{font-size:14px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
 .up-form input:not([type=checkbox]),.up-form select,.up-form textarea{min-width:0;max-width:100%;font-size:16px;line-height:1.5}
 .up-form>.hint,.up-form .account-role-fields>.hint{margin:0;font-size:14px;line-height:1.65;color:var(--color-text-muted);overflow-wrap:anywhere}
 .up-form>.notice{margin:0;font-size:14px;line-height:1.65;overflow-wrap:anywhere}
 .up-form .account-role-fields{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;padding:16px;border:1px solid var(--color-divider);border-radius:8px;background:var(--color-surface-raised)}
 .up-form .account-role-fields>.button{justify-self:start;min-height:44px}
 .up-form [data-password-section]{margin:0;padding:10px 16px;border:1px solid var(--color-divider);border-radius:8px;background:var(--color-surface-raised)}
 .up-form [data-password-section]>summary{min-height:44px;font-size:15px;font-weight:600;line-height:1.6;cursor:pointer}
 .up-form [data-password-section]>.hint{font-size:14px;line-height:1.65;margin:12px 0;color:var(--color-text-muted)}
 .up-form .account-password-input{display:flex;align-items:stretch;gap:8px;min-width:0}
 .up-form .account-password-input>input{flex:1;min-width:0}
 .up-form .account-password-input>.button{flex-shrink:0;min-width:64px;min-height:44px}
 .up-form label.field>span{font-size:14px;line-height:1.6;overflow-wrap:anywhere}
 .up-form label.field>span:has(input[type=checkbox]){display:flex;align-items:center;gap:9px;min-height:44px}
 .up-form #staff-partner-scope{min-width:0;padding:16px;border:1px solid var(--color-divider);border-radius:8px;background:var(--color-surface-raised)}
 .up-form .permission-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .up-form .permission-groups>fieldset{min-width:0;margin:0;padding:10px 14px 12px;border:1px solid var(--color-divider);border-radius:8px;background:var(--color-surface)}
 .up-form .permission-groups legend{font-size:14px;line-height:1.6;font-weight:650;padding:0 6px;max-width:100%;overflow-wrap:anywhere}
 .up-form .check-list{display:grid;grid-template-columns:minmax(0,1fr);gap:2px}
 .up-form .check-list>label{display:flex;align-items:flex-start;gap:9px;min-height:44px;padding:9px 0;font-size:14px;line-height:1.6;min-width:0;overflow-wrap:anywhere}
 .up-form .check-list input{flex-shrink:0;margin-top:3px}
 .up-form.up-shared-form{grid-template-columns:minmax(0,1fr)}
 .up-shared-form .shared-access-options{margin:0;gap:12px}
 .up-shared-form .shared-access-option{gap:16px;margin:0;padding:16px;border:1px solid var(--color-divider);border-radius:9px;background:var(--color-surface)}
 .up-shared-form .shared-access-option>div{min-width:0;overflow-wrap:anywhere}
 .up-shared-form .shared-access-option strong{font-size:15px;line-height:1.5}
 .up-shared-form .shared-access-option p{font-size:14px;line-height:1.6;margin:5px 0 0;color:var(--color-text-muted)}
 .up-shared-form .shared-access-option small{display:block;font-size:13px;line-height:1.6;margin-top:7px;color:var(--color-text-muted)}
 .up-shared-form .shared-access-toggle{min-width:84px}
 .up-form .up-permission-summary{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;margin:0;min-width:0}
 .up-form .up-dialog-grant{margin:0;padding:16px;border:1px solid var(--color-divider);border-radius:8px;background:var(--color-surface-raised);overflow-wrap:anywhere}
 .up-form .up-dialog-grant strong{font-size:16px;line-height:1.5;font-weight:650}
 .up-form .up-dialog-grant p{font-size:14px;line-height:1.65;margin:7px 0 0}
 .up-form .up-dialog-grant .buttons{gap:8px;margin-top:14px}
 .up-form .up-dialog-grant .button{min-height:44px}
}
@supports selector(:has(*)) {
 @media screen {
  .modal:has(.up-form){width:720px;max-width:calc(100vw - 32px)}
  .modal:has(.up-grant-form){width:880px}
  .modal:has(.up-form) .modal-head h2{font-size:24px;line-height:1.35;overflow-wrap:anywhere}
  .modal:has(.up-form) .modal-foot{gap:10px}
  .modal:has(.up-form) .modal-foot .button{min-height:44px}
 }
}
@media screen and (max-width:1100px) {
 .users-permissions-page .up-table-wrap{overflow:visible}
 .users-permissions-page .up-account-table,.users-permissions-page .up-account-table tbody{display:block;min-width:0;width:100%}
 .users-permissions-page .up-account-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .users-permissions-page .up-account-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px;padding:18px 20px;border-bottom:1px solid var(--color-divider)}
 .users-permissions-page .up-account-table tbody tr:last-child{border-bottom:0}
 .users-permissions-page .up-account-table td{display:block;width:auto;min-width:0;padding:0;border:0;font-size:14px}
 .users-permissions-page .up-account-table td:first-child{grid-column:1/-1}
 .users-permissions-page .up-account-table td:last-child{grid-column:1/-1}
 .users-permissions-page .up-mobile-label{display:block;font-size:12px;line-height:1.5;font-weight:600;color:var(--color-text-muted);letter-spacing:.03em;margin-bottom:5px}
 .users-permissions-page .up-row-actions{justify-content:flex-start;gap:8px}
 .users-permissions-page .shared-access-cell{justify-items:start}
}
@media screen and (max-width:650px) {
 .users-permissions-page>.page-heading{flex-direction:column;gap:14px}
 .users-permissions-page>.page-heading>.buttons{width:100%;display:flex}
 .users-permissions-page>.page-heading>.buttons>.button{flex:1 1 160px}
 .users-permissions-page .panel-head{padding:17px 16px}
 .users-permissions-page .panel-head h2{font-size:20px}
 .users-permissions-page .up-account-table tbody tr{padding:18px 16px}
 .users-permissions-page .up-row-actions>.button{flex:1 1 auto}
 .users-permissions-page .up-grant-row{grid-template-columns:minmax(0,1fr);padding:18px 16px;gap:14px}
 .users-permissions-page .up-grant-actions{grid-column:1;grid-row:3;gap:8px}
 .users-permissions-page .up-grant-actions>.button{flex:1 1 auto}
 .users-permissions-page .up-empty{margin:16px;padding:24px 14px}
 .up-form,.up-form .permission-groups{grid-template-columns:minmax(0,1fr);gap:16px}
 .up-form>.field,.up-form>.wide{grid-column:1/-1}
 .up-shared-form .shared-access-option{padding:14px;gap:10px}
 .up-shared-form .shared-access-toggle{min-width:76px}
 .up-form #staff-partner-scope,.up-form .account-role-fields{padding:14px}
}

/* Approvals presentation only. Decision authority, correction application and
   request scope remain in their existing guarded services. */
@media screen {
 .approvals-page{min-width:0}
 .approvals-page>.page-heading{gap:20px;align-items:flex-start}
 .approvals-page .panel{overflow:hidden;border-radius:12px;box-shadow:0 1px 4px var(--color-shadow-soft)}
 .approvals-page .ap-list-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;padding:20px 22px;border-bottom:1px solid var(--color-divider);background:var(--color-surface-raised)}
 .approvals-page .ap-list-heading h2{display:flex;align-items:center;gap:10px;font-size:21px;line-height:1.4;margin:0;min-width:0;overflow-wrap:anywhere}
 .approvals-page .ap-count{display:inline-flex;justify-content:center;align-items:center;min-width:28px;padding:2px 8px;border-radius:6px;background:var(--color-surface-subtle);font-size:14px;font-weight:600;line-height:1.5;color:var(--color-text-muted);font-variant-numeric:tabular-nums}
 .approvals-page .ap-list-heading p{margin:0;font-size:14px;line-height:1.6;color:var(--color-text-muted);overflow-wrap:anywhere}
 .approvals-page .ap-table-wrap{min-width:0;width:100%}
 .approvals-page .ap-table-wrap:focus-visible{outline:2px solid var(--color-focus);outline-offset:-3px}
 .approvals-page .ap-table{table-layout:fixed;width:100%;min-width:0;margin:0;white-space:normal}
 .approvals-page .ap-table th{padding:12px 16px;text-align:left;font-size:12px;line-height:1.5;letter-spacing:.05em;background:var(--color-surface);color:var(--color-text-muted);border-bottom:1px solid var(--color-divider)}
 .approvals-page .ap-table td{padding:17px 16px;vertical-align:top;font-size:14px;line-height:1.6;border-bottom:1px solid var(--color-divider);overflow-wrap:anywhere}
 .approvals-page .ap-table tbody tr:last-child td{border-bottom:0}
 .approvals-page .ap-table tbody tr:hover{background:var(--color-surface-raised)}
 .approvals-page .ap-table tbody tr:focus-within{background:var(--color-surface-hover)}
 .approvals-page .ap-table th:first-child{width:13%}
 .approvals-page .ap-table th:nth-child(2){width:22%}
 .approvals-page .ap-table th:nth-child(3){width:14%}
 .approvals-page .ap-table th:nth-child(4){width:29%}
 .approvals-page .ap-table th:nth-child(5){width:12%}
 .approvals-page .ap-table th:last-child{width:10%;text-align:right}
 .approvals-page .ap-table td strong{display:block;font-size:15px;line-height:1.5;font-weight:650;color:var(--color-text)}
 .approvals-page .ap-table td small{display:block;font-size:13px;line-height:1.6;margin-top:5px;color:var(--color-text-muted)}
 .approvals-page .ap-date{font-variant-numeric:tabular-nums;color:var(--color-text-muted)}
 .approvals-page .ap-kind{font-size:13px;font-weight:600;line-height:1.5}
 .approvals-page .ap-reason{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;white-space:pre-wrap;margin:0;font-size:14px;line-height:1.65;color:var(--color-text)}
 .approvals-page .ap-status .badge{max-width:100%;white-space:normal;overflow-wrap:anywhere;font-size:13px;font-weight:600;line-height:1.5;padding:3px 8px;border-radius:5px}
 .approvals-page .ap-status-pending .badge{background:var(--color-warning-bg);color:var(--color-warning-text)}
 .approvals-page .ap-status-approved .badge{background:var(--color-success-bg);color:var(--color-success-text)}
 .approvals-page .ap-status-declined .badge{background:var(--color-surface-subtle);color:var(--color-text-muted)}
 .approvals-page .ap-row-actions{display:flex;justify-content:flex-end;align-items:flex-start}
 .approvals-page .ap-row-actions>.button{min-height:44px;font-size:13px;padding:10px 12px;white-space:normal;max-width:100%}
 .approvals-page .ap-mobile-label{display:none}
 .approvals-page .ap-empty{margin:18px 22px;padding:28px 18px;border:1px dashed var(--color-control-border);border-radius:8px;background:var(--color-surface-raised);text-align:center;overflow-wrap:anywhere}
 .ap-review,.ap-correction-form{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;grid-column:1/-1;min-width:0}
 .ap-review>.wide,.ap-correction-form>.wide{grid-column:1/-1}
 .ap-review .field,.ap-correction-form .field{min-width:0;margin:0}
 .ap-review .field>label,.ap-correction-form .field>label{font-size:14px;line-height:1.5;font-weight:600;overflow-wrap:anywhere}
 .ap-review input,.ap-review select,.ap-correction-form input,.ap-correction-form select,.ap-correction-form textarea{min-width:0;max-width:100%;font-size:16px;line-height:1.5}
 .ap-review .ap-reason-panel{padding:16px;border-left:3px solid var(--color-brand);border-radius:0 8px 8px 0;background:var(--color-surface-subtle);min-width:0}
 .ap-review .ap-reason-label{display:block;margin-bottom:7px;font-size:12px;line-height:1.5;font-weight:600;letter-spacing:.05em;color:var(--color-text-muted)}
 .ap-review .ap-reason-panel>p{margin:0;font-size:15px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--color-text)}
 .ap-review .ap-reason-panel>.hint{font-size:14px;color:var(--color-text-muted);margin-top:10px;line-height:1.65}
 .ap-review .ap-details{margin:0;min-width:0}
 .ap-review .ap-details>summary{min-height:44px;cursor:pointer;font-size:14px;line-height:1.6;font-weight:600;color:var(--color-text)}
 .ap-review .ap-details .json-editor{margin:10px 0 0;padding:16px;background:var(--color-surface-raised);border:1px solid var(--color-divider);border-radius:8px;font-size:13px;line-height:1.65;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere}
 .ap-review .ap-request-summary{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:16px;border:1px solid var(--color-divider);border-radius:8px;background:var(--color-surface);min-width:0}
 .ap-review .ap-request-summary>div{min-width:0}
 .ap-review .ap-request-summary dt{font-size:12px;font-weight:600;line-height:1.5;color:var(--color-text-muted);margin:0 0 5px}
 .ap-review .ap-request-summary dd{font-size:15px;line-height:1.65;color:var(--color-text);margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
 .ap-review .ap-compare-wrap{min-width:0;border:1px solid var(--color-divider);border-radius:8px;overflow:auto}
 .ap-review .ap-compare-wrap:focus-visible{outline:2px solid var(--color-focus);outline-offset:-3px}
 .ap-review .ap-compare-table{table-layout:fixed;width:100%;min-width:0;white-space:normal;margin:0}
 .ap-review .ap-compare-table th{font-size:12px;font-weight:600;line-height:1.5;padding:12px 14px;background:var(--color-surface-raised);color:var(--color-text-muted);text-align:left;border-bottom:1px solid var(--color-divider)}
 .ap-review .ap-compare-table td{font-size:14px;line-height:1.65;padding:14px;vertical-align:top;border-bottom:1px solid var(--color-divider);white-space:pre-wrap;overflow-wrap:anywhere}
 .ap-review .ap-compare-table th:first-child{width:23%}
 .ap-review .ap-compare-table th:nth-child(2){width:38%}
 .ap-review .ap-compare-table th:last-child{width:39%}
 .ap-review .ap-compare-table tbody th{background:var(--color-surface);font-size:14px;color:var(--color-text);overflow-wrap:anywhere;vertical-align:top}
 .ap-review .ap-compare-table tbody td:last-child{background:var(--color-surface-raised)}
 .ap-review .ap-compare-table tbody tr:last-child>*{border-bottom:0}
 .ap-review .ap-compare-mobile-label{display:none}
 .ap-correction-form .om-revision-materials{margin:0;padding:16px;border:1px solid var(--color-divider);border-radius:8px;background:var(--color-surface-raised);min-width:0}
 .ap-correction-form textarea{resize:vertical}
 .ap-correction-form .hint{font-size:14px;line-height:1.65;margin:0;color:var(--color-text-muted);overflow-wrap:anywhere}
 .ap-correction-form .om-revision-materials>.hint{margin-top:12px}
 .ap-correction-form .om-additional-row{min-width:0}
}
@supports selector(:has(*)) {
 @media screen {
  .modal:has(.ap-review){width:820px;max-width:calc(100vw - 32px)}
  .modal:has(.ap-correction-form){width:760px;max-width:calc(100vw - 32px)}
  .modal:has(.ap-review) .modal-head h2,.modal:has(.ap-correction-form) .modal-head h2{font-size:24px;line-height:1.35;overflow-wrap:anywhere}
  .modal:has(.ap-review) .modal-foot,.modal:has(.ap-correction-form) .modal-foot{gap:10px}
  .modal:has(.ap-review) .modal-foot .button,.modal:has(.ap-correction-form) .modal-foot .button{min-height:44px}
 }
}
@media screen and (max-width:950px) {
 .approvals-page .ap-table-wrap{overflow:visible}
 .approvals-page .ap-table,.approvals-page .ap-table tbody{display:block;min-width:0;width:100%}
 .approvals-page .ap-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .approvals-page .ap-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px;padding:18px 20px;border-bottom:1px solid var(--color-divider)}
 .approvals-page .ap-table tbody tr:last-child{border-bottom:0}
 .approvals-page .ap-table td{display:block;padding:0;border:0;min-width:0;width:auto}
 .approvals-page .ap-table td:nth-child(2){grid-column:1/-1;grid-row:1}
 .approvals-page .ap-table td:nth-child(4){grid-column:1/-1}
 .approvals-page .ap-table td:last-child{justify-self:end}
 .approvals-page .ap-mobile-label{display:block;font-size:12px;line-height:1.5;font-weight:600;color:var(--color-text-muted);letter-spacing:.03em;margin-bottom:5px}
}
@media screen and (max-width:650px) {
 .approvals-page .ap-list-heading{padding:17px 16px;gap:8px}
 .approvals-page .ap-list-heading h2{font-size:20px}
 .approvals-page .ap-table tbody tr{padding:18px 16px}
 .approvals-page .ap-row-actions>.button{min-width:100px}
 .approvals-page .ap-empty{margin:16px;padding:24px 14px}
 .ap-review .ap-request-summary{grid-template-columns:minmax(0,1fr)}
 .ap-review .ap-compare-wrap{overflow:visible}
 .ap-review .ap-compare-table,.ap-review .ap-compare-table tbody{display:block;min-width:0;width:100%}
 .ap-review .ap-compare-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .ap-review .ap-compare-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr);border-bottom:1px solid var(--color-divider)}
 .ap-review .ap-compare-table tbody tr:last-child{border-bottom:0}
 .ap-review .ap-compare-table tbody th,.ap-review .ap-compare-table tbody td{display:block;min-width:0;width:auto;border:0;padding:12px 14px}
 .ap-review .ap-compare-table tbody th{padding-bottom:4px}
 .ap-review .ap-compare-table tbody th:first-child{width:auto}
 .ap-review .ap-compare-mobile-label{display:block;font-size:12px;line-height:1.5;font-weight:600;color:var(--color-text-muted);margin-bottom:6px}
}

/* Activity/Audit Logs presentation only. Read scope, immutable records and
   the existing paged API remain in their guarded services. */
@media screen {
 .activity-audit-page{min-width:0}
 .activity-audit-page>.page-heading{align-items:flex-start;gap:20px}
 .activity-audit-page .panel{overflow:hidden;border-radius:12px;box-shadow:0 1px 4px var(--color-shadow-soft)}
 .activity-audit-page .al-list-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:20px 22px;border-bottom:1px solid var(--color-divider);background:var(--color-surface-raised)}
 .activity-audit-page .al-list-heading h2{display:flex;align-items:center;gap:10px;margin:0;font-size:21px;line-height:1.4;min-width:0;overflow-wrap:anywhere}
 .activity-audit-page .al-list-heading p{margin:0;font-size:13px;line-height:1.6;color:var(--color-text-muted);overflow-wrap:anywhere}
 .activity-audit-page .al-count{display:inline-flex;align-items:center;justify-content:center;min-width:28px;padding:2px 8px;border-radius:6px;background:var(--color-surface-subtle);font-size:14px;font-weight:600;line-height:1.5;color:var(--color-text-muted);font-variant-numeric:tabular-nums}
 .activity-audit-page .al-table-wrap{min-width:0;width:100%}
 .activity-audit-page .al-table-wrap:focus-visible{outline:2px solid var(--color-focus);outline-offset:-3px}
 .activity-audit-page .al-table{table-layout:fixed;min-width:0;width:100%;white-space:normal;margin:0}
 .activity-audit-page .al-table th{padding:12px 18px;background:var(--color-surface);border-bottom:1px solid var(--color-divider);text-align:left;font-size:12px;line-height:1.5;letter-spacing:.05em;color:var(--color-text-muted)}
 .activity-audit-page .al-table td{padding:17px 18px;border-bottom:1px solid var(--color-divider);vertical-align:top;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
 .activity-audit-page .al-table th:first-child{width:20%}
 .activity-audit-page .al-table th:nth-child(2){width:29%}
 .activity-audit-page .al-table th:nth-child(3){width:31%}
 .activity-audit-page .al-table th:last-child{width:20%}
 .activity-audit-page .al-table tbody tr:last-child td{border-bottom:0}
 .activity-audit-page .al-table tbody tr:hover{background:var(--color-surface-raised)}
 .activity-audit-page .al-table tbody tr:focus-within{background:var(--color-surface-hover)}
 .activity-audit-page .al-table td strong{display:block;font-size:15px;font-weight:650;line-height:1.5;color:var(--color-text)}
 .activity-audit-page .al-table td small{display:block;margin-top:5px;font-size:13px;line-height:1.6;color:var(--color-text-muted)}
 .activity-audit-page .al-event-code{font-family:ui-monospace,Consolas,monospace;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
 .activity-audit-page .al-time{display:block;font-size:14px;font-weight:600;line-height:1.5;font-variant-numeric:tabular-nums;color:var(--color-text)}
 .activity-audit-page .al-time>small{font-weight:400}
 .activity-audit-page .al-entity{display:block;font-family:ui-monospace,Consolas,monospace;font-size:13px;line-height:1.7;padding:2px 0;max-width:100%;white-space:normal;overflow-wrap:anywhere;color:var(--color-text)}
 .activity-audit-page .al-actor{font-size:14px;font-weight:600;line-height:1.6;color:var(--color-text);overflow-wrap:anywhere}
 .activity-audit-page .al-mobile-label{display:none}
 .activity-audit-page .pagination{gap:12px;flex-wrap:wrap;padding:15px 22px;border-top:1px solid var(--color-divider);background:var(--color-surface-raised);font-size:14px;line-height:1.6;font-variant-numeric:tabular-nums;color:var(--color-text-muted)}
 .activity-audit-page .pagination .buttons{gap:8px}
 .activity-audit-page .pagination .button{min-height:44px;font-size:14px;white-space:normal}
 .activity-audit-page .al-empty{margin:18px 22px;padding:28px 18px;border:1px dashed var(--color-control-border);border-radius:8px;background:var(--color-surface-raised);text-align:center;overflow-wrap:anywhere}
}
@media screen and (max-width:900px) {
 .activity-audit-page .al-table-wrap{overflow:visible}
 .activity-audit-page .al-table,.activity-audit-page .al-table tbody{display:block;width:100%;min-width:0}
 .activity-audit-page .al-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .activity-audit-page .al-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px;padding:18px 20px;border-bottom:1px solid var(--color-divider)}
 .activity-audit-page .al-table tbody tr:last-child{border-bottom:0}
 .activity-audit-page .al-table td{display:block;min-width:0;width:auto;padding:0;border:0}
 .activity-audit-page .al-table td:nth-child(2){grid-column:1/-1;grid-row:1}
 .activity-audit-page .al-table td:nth-child(3){grid-column:1/-1;grid-row:3}
 .activity-audit-page .al-mobile-label{display:block;margin-bottom:5px;font-size:12px;font-weight:600;line-height:1.5;letter-spacing:.03em;color:var(--color-text-muted)}
 .activity-audit-page .al-table .al-event-code{margin-top:5px}
}
@media screen and (max-width:600px) {
 .activity-audit-page .al-list-heading{padding:17px 16px;gap:8px}
 .activity-audit-page .al-list-heading h2{font-size:20px}
 .activity-audit-page .al-table tbody tr{padding:18px 16px;gap:14px}
 .activity-audit-page .al-empty{margin:16px;padding:24px 14px}
 .activity-audit-page .pagination{padding:14px 16px;gap:10px}
 .activity-audit-page .pagination>.buttons{width:100%;display:flex}
 .activity-audit-page .pagination .button{flex:1 1 auto}
}

/* Settings presentation only. Personal preferences, integration commands,
   backup receipts and numbering remain in their existing guarded handlers. */
@media screen {
 .settings-page{min-width:0}
 .settings-page>.page-heading{align-items:flex-start;gap:20px}
 .settings-page .settings-grid{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:22px;align-items:start}
 .settings-page .panel,.settings-numbering-panel{overflow:hidden;border-radius:12px;box-shadow:0 1px 4px var(--color-shadow-soft);min-width:0}
 .settings-page .panel-head,.settings-numbering-panel .panel-head{padding:20px 22px;gap:14px;align-items:center;flex-wrap:wrap;background:var(--color-surface-raised);border-bottom:1px solid var(--color-divider)}
 .settings-page .panel-head h2,.settings-numbering-panel .panel-head h2{font-size:21px;line-height:1.4;margin:0;min-width:0;overflow-wrap:anywhere}
 .settings-page .panel-body,.settings-numbering-panel .panel-body{padding:22px;min-width:0}
 .settings-page .hint,.settings-numbering-panel .hint{font-size:14px;line-height:1.65;color:var(--color-text-muted);overflow-wrap:anywhere}
 .settings-page .settings-link-group{display:flex;align-items:flex-start;flex-wrap:wrap;gap:14px;padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid var(--color-divider);min-width:0}
 .settings-page .settings-link-group>.hint{flex:1 1 220px;margin:0}
 .settings-page .settings-link-group>.button{min-height:44px;font-size:14px;white-space:normal}
 .settings-page .settings-link-status{margin-left:auto}
 .settings-page .settings-link-status .badge{font-size:13px;font-weight:600;line-height:1.5;padding:3px 8px;border-radius:5px}
 .settings-page .settings-linked .badge{background:var(--color-success-bg);color:var(--color-success-text)}
 .settings-page .settings-unlinked .badge{background:var(--color-surface-subtle);color:var(--color-text-muted)}
 .settings-page .subheading{font-size:16px;line-height:1.5;font-weight:650;margin:0 0 14px;letter-spacing:0;color:var(--color-text)}
 .settings-page .settings-event-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .settings-page .settings-event-options>label{display:flex;align-items:flex-start;gap:9px;min-width:0;min-height:44px;padding:11px 12px;border:1px solid var(--color-divider);border-radius:7px;background:var(--color-surface);font-size:14px;line-height:1.6;color:var(--color-text);overflow-wrap:anywhere;cursor:pointer}
 .settings-page .settings-event-options>label:hover{background:var(--color-surface-raised)}
 .settings-page .settings-event-options>label:has(input:checked){background:var(--color-selected-bg);border-color:var(--color-selected-border)}
 .settings-page .settings-event-options>label:focus-within{outline:2px solid var(--color-focus);outline-offset:1px}
 .settings-page .settings-event-options>label:has(input:disabled){cursor:default}
 .settings-page .settings-event-options input{margin-top:2px;flex-shrink:0}
 .settings-page .settings-event-options span{min-width:0;overflow-wrap:anywhere}
 .settings-page .settings-form-footer{position:static;box-shadow:none;margin:20px 0 0;padding:16px 0 0;border-top:1px solid var(--color-divider);background:transparent;justify-content:flex-start;gap:10px}
 .settings-page .settings-form-footer .button{min-height:44px;font-size:14px}
 .settings-page #notification-form[inert] .settings-event-options>label,.settings-page #notification-form[inert] .settings-form-footer .button:disabled{cursor:wait}
 .settings-page .summary-list{display:grid;gap:0;margin:0;min-width:0}
 .settings-page .summary-list>div{padding:13px 0;border-bottom:1px solid var(--color-divider);gap:12px;align-items:flex-start;font-size:14px;line-height:1.6;min-width:0}
 .settings-page .summary-list>div:first-child{padding-top:0}
 .settings-page .summary-list>div:last-child{border-bottom:0;padding-bottom:0}
 .settings-page .summary-list>div>span{min-width:0;overflow-wrap:anywhere;color:var(--color-text-muted)}
 .settings-page .summary-list strong{font-size:14px;line-height:1.6;font-weight:600;max-width:60%;text-align:right;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
 .settings-page .summary-list .settings-configured{color:var(--color-success-text)}
 .settings-page .summary-list .settings-setup{color:var(--color-warning-text)}
 .settings-page .settings-config-note{font-size:13px;line-height:1.6;margin:16px 0 0;color:var(--color-text-muted)}
 .settings-page .settings-admin-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;margin-top:22px;padding-top:20px;border-top:1px solid var(--color-divider)}
 .settings-page .settings-action-block{padding:16px;border:1px solid var(--color-divider);border-radius:9px;background:var(--color-surface-raised);min-width:0}
 .settings-page .settings-action-block>h3{font-size:16px;font-weight:650;line-height:1.5;margin:0 0 12px;color:var(--color-text)}
 .settings-page .settings-action-block>.button{min-height:44px;white-space:normal;max-width:100%;font-size:14px}
 .settings-page .settings-action-block>.hint{margin:12px 0 0}
 .settings-page .settings-uncertain-note{padding:10px 12px;margin:14px 0 0;border-left:3px solid var(--color-warning-border);background:var(--color-warning-bg);color:var(--color-warning-text);font-size:14px;line-height:1.6;overflow-wrap:anywhere;border-radius:0 5px 5px 0}
 .settings-page .settings-deployment-hint{margin:18px 0 0}
 .settings-numbering-panel .field-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;max-width:860px}
 .settings-numbering-panel .field{min-width:0;margin:0}
 .settings-numbering-panel .field>label{font-size:14px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
 .settings-numbering-panel input,.settings-numbering-panel select{min-width:0;max-width:100%;width:100%;font-size:16px;line-height:1.5}
 .settings-numbering-panel #numbering-preview{font-size:17px;line-height:1.6;font-weight:600;letter-spacing:.02em;margin:0;padding:14px 16px;background:var(--color-surface-subtle);color:var(--color-text);border-left:3px solid var(--color-brand);border-radius:0 7px 7px 0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
 .settings-numbering-panel .field-grid>.hint{margin:0}
 .settings-numbering-panel button[type=submit]{min-height:44px;margin-top:18px;white-space:normal}
 .settings-numbering-panel .form-error{max-width:860px;line-height:1.65;overflow-wrap:anywhere}
 .settings-telegram-link{min-width:0;padding:16px;border-left:3px solid var(--color-brand);border-radius:0 8px 8px 0;background:var(--color-surface-raised)}
 .settings-telegram-link>p{font-size:15px;line-height:1.7;margin:0 0 16px;color:var(--color-text);overflow-wrap:anywhere}
 .settings-telegram-link>.button{min-height:44px;max-width:100%;white-space:normal}
}
@supports selector(:has(*)) {
 @media screen {
  .modal:has(.settings-telegram-link){width:580px;max-width:calc(100vw - 32px)}
  .modal:has(.settings-telegram-link) .modal-head h2{font-size:24px;line-height:1.35;overflow-wrap:anywhere}
 }
}
@media screen and (max-width:1100px) {
 .settings-page .settings-grid{grid-template-columns:minmax(0,1fr)}
}
@media screen and (max-width:600px) {
 .settings-page .panel-head,.settings-numbering-panel .panel-head{padding:17px 16px}
 .settings-page .panel-head h2,.settings-numbering-panel .panel-head h2{font-size:20px}
 .settings-page .panel-body,.settings-numbering-panel .panel-body{padding:18px 16px}
 .settings-page .settings-event-options{grid-template-columns:minmax(0,1fr)}
 .settings-page .settings-link-group{gap:12px;padding-bottom:18px;margin-bottom:18px}
 .settings-page .settings-link-group>.button{width:100%}
 .settings-page .settings-form-footer>.button{width:100%}
 .settings-page .summary-list strong{max-width:55%}
 .settings-page .settings-action-block{padding:14px}
 .settings-page .settings-action-block>.button{width:100%}
 .settings-numbering-panel .field-grid{grid-template-columns:minmax(0,1fr);gap:16px}
 .settings-numbering-panel button[type=submit]{width:100%}
}

/* Admin Data Tools presentation. Import mapping, retries and source evidence
   remain in the existing guarded handlers. Scoped to this page and its dialogs. */
@media screen {
 .data-tools-page{min-width:0}
 .data-tools-page>.page-heading{align-items:flex-start;gap:20px}
 .data-tools-page>.page-heading p{max-width:820px;line-height:1.65}
 .data-tools-page .panel{min-width:0;overflow:hidden;border-radius:12px;box-shadow:0 1px 4px var(--color-shadow-soft)}
 .data-tools-page .panel-head{padding:20px 22px;gap:12px;flex-wrap:wrap;background:var(--color-surface-raised);border-bottom:1px solid var(--color-divider);align-items:flex-start}
 .data-tools-page .panel-head h2{font-size:21px;line-height:1.4;margin:0;overflow-wrap:anywhere}
 .data-tools-page .panel-head p{font-size:14px;line-height:1.65;margin:0;max-width:650px;color:var(--color-text-muted)}
 .data-tools-page .panel-body{padding:22px}
 .data-tools-page .data-tools-privacy{margin:0 0 22px;padding:14px 16px;border-left:3px solid var(--color-warning-border);border-radius:0 7px 7px 0;background:var(--color-warning-bg);color:var(--color-warning-text);font-size:14px;line-height:1.65;overflow-wrap:anywhere}
 .data-tools-page .data-tools-privacy strong{display:block;margin-bottom:4px;font-size:14px;font-weight:650}
 .data-tools-page .data-tools-file{max-width:720px;margin-bottom:0}
 .data-tools-page .data-tools-file label{display:block;font-weight:600;font-size:14px;line-height:1.5;margin-bottom:9px}
 .data-tools-page input[type=file]{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:48px;padding:10px;background:var(--color-surface-raised);border:1px solid var(--color-control-border);border-radius:7px;font-size:14px;line-height:1.7;color:var(--color-text)}
 .data-tools-page input[type=file]::file-selector-button{padding:7px 12px;margin-right:12px;border:1px solid var(--color-control-border);border-radius:5px;background:var(--color-surface);color:var(--color-text);font:inherit;cursor:pointer}
 .data-tools-page input[type=file]:hover::file-selector-button{background:var(--color-surface-hover)}
 .data-tools-page input[type=file]:disabled,.data-tools-page input[type=file]:disabled::file-selector-button{cursor:wait;background:var(--color-disabled-bg);color:var(--color-disabled-text)}
 .data-tools-page .data-tools-file .hint{margin:8px 0 0;font-size:13px;line-height:1.6}
 .data-tools-page .data-tools-preview{max-width:960px}
 .data-tools-page .data-tools-preview:empty{display:none}
 .data-tools-page .data-tools-preview-title{font-size:16px;font-weight:650;line-height:1.5;margin:24px 0 12px;color:var(--color-text)}
 .data-tools-page .summary-list{margin:0;padding:0;min-width:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;border:1px solid var(--color-divider);border-radius:8px;background:var(--color-surface-raised);overflow:hidden}
 .data-tools-page .summary-list>div{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0;padding:13px 16px;border:0;border-top:1px solid var(--color-divider);font-size:14px;line-height:1.5}
 .data-tools-page .summary-list>div:first-child{grid-column:1/-1;border-top:0}
 .data-tools-page .summary-list>div>span{color:var(--color-text-muted);overflow-wrap:anywhere}
 .data-tools-page .summary-list strong{max-width:100%;font-size:20px;line-height:1.5;font-weight:600;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
 .data-tools-page .summary-list>div:first-child strong{font-size:15px}
 .data-tools-page .summary-list>div+div{border-left:1px solid var(--color-divider)}
 .data-tools-page .summary-list>div:nth-child(2){border-left:0}
 .data-tools-page .data-tools-mapping{margin:12px 0 0;font-size:13px;line-height:1.7;color:var(--color-text-muted);overflow-wrap:anywhere}
 .data-tools-page #import-progress-status:not(:empty){display:block;margin-top:20px;padding:13px 16px;border-left:3px solid var(--color-info-border);border-radius:0 6px 6px 0;background:var(--color-info-bg);color:var(--color-info-text);font-size:14px;line-height:1.65;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
 .data-tools-page .form-error:not(:empty){padding:12px 14px;margin-top:14px;border-left:3px solid var(--color-error-border);border-radius:0 6px 6px 0;background:var(--color-error-bg);color:var(--color-error-text);font-size:14px;line-height:1.65;overflow-wrap:anywhere}
 .data-tools-page .data-tools-submit{display:flex;flex-wrap:wrap;gap:12px;margin-top:20px;padding-top:18px;border-top:1px solid var(--color-divider)}
 .data-tools-page .data-tools-submit .button{min-height:44px;font-size:14px;white-space:normal}
 .data-tools-page .data-tools-runs-note{flex-basis:100%}
 .data-tools-page .data-tools-table{table-layout:fixed;width:100%;min-width:0;white-space:normal}
 .data-tools-page .data-tools-table th{font-size:12px;line-height:1.5;letter-spacing:.045em;color:var(--color-text-muted);padding:13px 16px}
 .data-tools-page .data-tools-table th:nth-child(1){width:30%}
 .data-tools-page .data-tools-table th:nth-child(2){width:13%}
 .data-tools-page .data-tools-table th:nth-child(3){width:13%}
 .data-tools-page .data-tools-table th:nth-child(4){width:13%}
 .data-tools-page .data-tools-table td{padding:16px;vertical-align:top;white-space:normal;line-height:1.6;font-size:14px;overflow-wrap:anywhere}
 .data-tools-page .data-tools-table td strong{font-size:14px;font-weight:650;line-height:1.6;color:var(--color-text)}
 .data-tools-page .data-tools-table td small{display:block;margin-top:4px;font-size:13px;line-height:1.55;color:var(--color-text-muted)}
 .data-tools-page .data-tools-number{font-variant-numeric:tabular-nums}
 .data-tools-page .data-tools-state .badge{border-radius:5px;font-size:12px;line-height:1.6;letter-spacing:0}
 .data-tools-page .data-tools-state.is-complete .badge{background:var(--color-success-bg);color:var(--color-success-text)}
 .data-tools-page .data-tools-state.is-loading .badge{background:var(--color-warning-bg);color:var(--color-warning-text)}
 .data-tools-page .data-tools-row-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-start}
 .data-tools-page .data-tools-row-actions .button{min-height:44px;max-width:100%;margin:0;padding:8px 12px;font-size:13px;line-height:1.5;white-space:normal}
 .data-tools-page .data-tools-table tbody tr:hover{background:var(--color-surface-raised)}
 .data-tools-page .data-tools-empty .empty{border:0;margin:0}
 .data-tools-page .button:focus-visible,.data-tools-page input:focus-visible,.data-tools-dialog .button:focus-visible{outline:2px solid var(--color-focus);outline-offset:3px}
 .data-tools-dialog{min-width:0;grid-column:1/-1}
 .data-tools-dialog>.data-tools-dialog-note{margin:0 0 18px;font-size:14px;line-height:1.7;color:var(--color-text-muted);overflow-wrap:anywhere}
 .data-tools-dialog .data-tools-review-list{margin:0;display:grid;gap:12px;min-width:0}
 .data-tools-dialog .data-tools-review-row{display:flex;align-items:flex-start;gap:16px;padding:16px;border:1px solid var(--color-divider);border-radius:8px;background:var(--color-surface-raised);min-width:0}
 .data-tools-dialog .data-tools-review-copy{flex:1;min-width:0}
 .data-tools-dialog .data-tools-review-copy strong{display:block;font-size:14px;font-weight:650;line-height:1.6;overflow-wrap:anywhere}
 .data-tools-dialog .data-tools-review-copy p{font-size:14px;line-height:1.7;margin:7px 0 0;color:var(--color-text-muted);overflow-wrap:anywhere}
 .data-tools-dialog .data-tools-review-row>.button{min-height:44px;flex-shrink:0;font-size:13px;white-space:normal;max-width:45%;margin:0}
 .data-tools-dialog .data-tools-pagination{display:flex;align-items:center;flex-wrap:wrap;gap:10px;border-top:1px solid var(--color-divider);margin-top:18px;padding-top:16px}
 .data-tools-dialog .data-tools-pagination .hint{flex:1;min-width:130px;margin:0;font-size:13px;line-height:1.6}
 .data-tools-dialog .data-tools-pagination .button{min-height:44px;margin:0;font-size:14px}
 .data-tools-dialog .data-tools-review-empty{padding:22px 18px;border:1px solid var(--color-divider);border-radius:8px;background:var(--color-surface-raised);margin:0;font-size:14px;line-height:1.7;color:var(--color-text-muted)}
 .data-tools-dialog .data-tools-source{box-sizing:border-box;max-width:100%;margin:0;padding:16px;border:1px solid var(--color-divider);border-radius:8px;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;font:13px/1.75 ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--color-text);background:var(--color-surface-raised)}
 @media(max-width:1100px){
  .data-tools-page .data-tools-table th,.data-tools-page .data-tools-table td{padding-left:12px;padding-right:12px}
  .data-tools-page .data-tools-row-actions .button{flex:1 1 100%}
 }
 @media(max-width:1100px){
  .data-tools-page .data-tools-table,.data-tools-page .data-tools-table tbody,.data-tools-page .data-tools-table tr,.data-tools-page .data-tools-table td{display:block;width:auto;min-width:0}
  .data-tools-page .data-tools-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .data-tools-page .data-tools-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;padding:18px;border-bottom:1px solid var(--color-divider)}
  .data-tools-page .data-tools-table tbody tr:last-child{border-bottom:0}
  .data-tools-page .data-tools-table td{padding:0;border:0;min-width:0}
  .data-tools-page .data-tools-table td:first-child,.data-tools-page .data-tools-table td:last-child{grid-column:1/-1}
  .data-tools-page .data-tools-table td[data-label]::before{content:attr(data-label);display:block;font-size:11px;line-height:1.5;font-weight:600;letter-spacing:.04em;text-transform:uppercase;margin-bottom:4px;color:var(--color-text-muted)}
  .data-tools-page .data-tools-row-actions{padding-top:6px}
  .data-tools-page .data-tools-row-actions .button{flex:1 1 160px;min-height:44px}
  .data-tools-page .table-wrap{overflow:visible}
 }
 @media(max-width:760px){
  .data-tools-page>.page-heading{margin-bottom:20px}
  .data-tools-page .panel-head,.data-tools-page .panel-body{padding:18px}
  .data-tools-page .panel-head h2{font-size:20px}
  .data-tools-page .summary-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .data-tools-page .summary-list>div:nth-child(4){border-left:0}
  .data-tools-page .summary-list strong{font-size:18px}
  .data-tools-dialog .data-tools-review-row{padding:14px;gap:10px;flex-wrap:wrap}
  .data-tools-dialog .data-tools-review-row>.button{max-width:100%}
  .data-tools-dialog .data-tools-review-copy{flex-basis:100%}
 }
 @media(max-width:420px){
  .data-tools-page .panel-head,.data-tools-page .panel-body{padding:16px}
  .data-tools-page .summary-list>div{padding:12px}
  .data-tools-page .data-tools-submit .button{width:100%}
  .data-tools-dialog .data-tools-pagination .hint{flex-basis:100%}
 }
}


/* Sign-in and workspace navigation presentation. Authentication and drawer
   behaviour stay in the existing guarded handlers; no route visibility changes. */
@media screen {
 .auth-shell{min-height:100vh;min-height:100dvh}
 .auth-art{padding:clamp(32px,5vw,72px);background:var(--color-brand-strong);color:var(--color-inverse-text)}
 .auth-art .brand{align-items:flex-start;position:relative;z-index:1;min-width:0}
 .auth-art .brand>div:last-child{min-width:0}
 .auth-art .brand strong{font-size:28px;line-height:1.2;letter-spacing:-.5px;overflow-wrap:anywhere}
 .auth-art .brand small{font-size:11px;line-height:1.6;letter-spacing:1.7px;margin-top:7px}
 .auth-art h1{line-height:1.18;letter-spacing:-1px;margin:22px 0}
 .auth-art .eyebrow{font-size:12px;line-height:1.6;letter-spacing:1.4px}
 .auth-art p{font-size:15px;line-height:1.85;max-width:360px;margin-top:0}
 .auth-art footer{position:relative;z-index:1;font-size:11px;line-height:1.6;letter-spacing:1.8px}
 .auth-main{background:var(--color-surface-raised);padding:48px 40px;min-width:0}
 .auth-stage{width:100%;max-width:380px;min-width:0}
 .auth-stage>#auth-progress:not(:empty){margin-top:18px;padding:12px 14px;border-left:3px solid var(--color-info-border);border-radius:0 6px 6px 0;background:var(--color-info-bg);color:var(--color-info-text);font-size:14px;line-height:1.65;overflow-wrap:anywhere}
 .auth-form{max-width:380px;min-width:0}
 .auth-form>.eyebrow{display:inline-flex;align-items:center;gap:7px;font-size:11px;line-height:1.5;letter-spacing:1.4px;color:var(--color-brand);margin:0 0 20px}
 .auth-form>.eyebrow svg{width:15px;height:15px}
 .auth-form h2{font-size:32px;line-height:1.25;letter-spacing:-.5px;margin-bottom:10px;color:var(--color-text)}
 .auth-form>p{font-size:14px;line-height:1.7;margin:0 0 26px;color:var(--color-text-muted);overflow-wrap:anywhere}
 .auth-form .field{margin:0 0 19px;min-width:0}
 .auth-form .field>label{display:block;font-size:14px;line-height:1.5;font-weight:600;margin-bottom:8px}
 .auth-form input{width:100%;min-width:0;min-height:48px;padding:12px 14px;border:1px solid var(--color-control-border);border-radius:7px;background:var(--color-surface);color:var(--color-text);font-size:16px}
 .auth-form input:hover{border-color:var(--color-brand)}
 .auth-form .button[type=submit]{min-height:48px;margin:5px 0 0;font-size:15px;font-weight:600;border-radius:7px;line-height:1.6}
 .auth-form .button[type=submit] svg{margin-left:4px}
 .auth-form .button[type=submit]:disabled{cursor:wait;background:var(--color-disabled-bg);border-color:var(--color-disabled-border);color:var(--color-disabled-text)}
 .auth-form .form-error:not(:empty){margin:2px 0 18px;padding:12px 14px;border-left:3px solid var(--color-error-border);border-radius:0 6px 6px 0;background:var(--color-error-bg);color:var(--color-error-text);font-size:14px;line-height:1.65;overflow-wrap:anywhere}
 .auth-form .hint{font-size:13px;line-height:1.7;overflow-wrap:anywhere}
 .auth-form>p.hint:last-child{padding-top:20px;margin:20px 0 0;border-top:1px solid var(--color-divider)}
 .auth-form .field+.hint{text-align:left;margin:0 0 20px}
 .auth-form [role=status]:not(:empty){font-size:14px;line-height:1.65;color:var(--color-text-muted);overflow-wrap:anywhere}
 .auth-recovery{display:grid;place-items:center;min-height:100vh;min-height:100dvh;padding:32px 20px;background:var(--color-canvas)}
 .auth-recovery>.auth-form{max-width:420px;width:100%;padding:28px;border:1px solid var(--color-divider);border-radius:12px;background:var(--color-surface);box-shadow:0 1px 4px var(--color-shadow-soft)}
 .auth-recovery .auth-form>p[role=alert]{padding:12px 14px;border-left:3px solid var(--color-error-border);border-radius:0 6px 6px 0;background:var(--color-error-bg);color:var(--color-error-text);font-size:14px;line-height:1.7;overflow-wrap:anywhere}
 .auth-recovery .button{min-height:48px;font-weight:600}
 .auth-form input:focus-visible,.auth-form .button:focus-visible{outline:3px solid var(--color-focus);outline-offset:3px}
 .shell .sidebar{padding-top:24px;padding-bottom:20px}
 .shell .sidebar-head{display:flex;align-items:flex-start;gap:8px;min-width:0}
 .shell .sidebar .brand{padding:0 8px 22px;align-items:flex-start;gap:10px;min-width:0}
 .shell .sidebar .brand>div:last-child{min-width:0}
 .shell .sidebar .brand strong{display:block;font-size:22px;line-height:1.15;letter-spacing:-.4px;overflow-wrap:anywhere}
 .shell .sidebar .brand small{font-size:11px;line-height:1.6;letter-spacing:1.1px;margin-top:7px;overflow-wrap:anywhere}
 .shell .sidebar .brand-mark{width:31px;height:35px;flex:0 0 31px;border-radius:7px}
 .shell .sidebar .brand-mark svg{width:21px;height:25px}
 .shell .sidebar .nav-label{padding:17px 12px 7px;font-size:11px;line-height:1.6;letter-spacing:1.25px;font-weight:650}
 .shell .sidebar .nav-item{font-size:14px;line-height:1.55;min-height:46px;padding:11px 12px;gap:11px;margin:3px 0;border-radius:7px;border:1px solid transparent;color:var(--color-text-muted);overflow-wrap:anywhere;min-width:0}
 .shell .sidebar .nav-item>svg{width:18px;height:18px}
 .shell .sidebar .nav-item:hover{background:var(--color-surface-hover);color:var(--color-text)}
 .shell .sidebar .nav-item.active{background:var(--color-selected-bg);color:var(--color-brand);border-color:var(--color-divider);font-weight:650}
 .shell .sidebar .nav-item.active>svg{stroke-width:1.9}
 .shell .sidebar .sidebar-foot{margin-top:auto;padding-top:22px;min-width:0}
 .shell .sidebar .private-label{margin:0 10px 14px;font-size:12px;line-height:1.7;color:var(--color-text-muted);overflow-wrap:anywhere}
 .shell .sidebar .private-label svg{width:13px;height:13px}
 .shell .sidebar .profile{gap:9px;padding:17px 5px 0;align-items:center;min-width:0}
 .shell .sidebar .profile>.avatar{width:33px;height:33px;flex:0 0 33px;font-size:12px}
 .shell .sidebar .profile>div:not(.avatar){flex:1;min-width:0}
 .shell .sidebar .profile strong{font-size:13px;line-height:1.55;font-weight:650;overflow-wrap:anywhere}
 .shell .sidebar .profile small{display:block;font-size:12px;line-height:1.55;margin-top:2px;overflow-wrap:anywhere}
 .shell .sidebar .profile>button{width:44px;height:44px;flex:0 0 44px;margin:0;border-radius:7px;color:var(--color-text-muted)}
 .shell .sidebar .profile>button:hover{background:var(--color-surface-hover);color:var(--color-brand)}
 .shell .sidebar a:focus-visible,.shell .sidebar button:focus-visible,.shell .topbar button:focus-visible,.shell .topbar select:focus-visible{outline:3px solid var(--color-focus);outline-offset:2px}
 .shell .topbar{min-width:0}
 .shell .breadcrumb{font-size:14px;line-height:1.6;color:var(--color-text-muted);min-width:0;overflow-wrap:anywhere}
 .shell .breadcrumb span{color:var(--color-text);margin-left:6px}
 .shell .top-actions{min-width:0;gap:10px}
 .shell .top-actions select{min-height:44px;max-width:200px;min-width:0;border:1px solid var(--color-control-border);border-radius:6px;background:var(--color-surface);font-size:14px!important;line-height:1.5;color:var(--color-text);padding:8px 26px 8px 10px}
 .shell .sidebar button[data-action=close-navigation]{display:none}
 #navigation-backdrop{display:none}
 @media(max-width:800px){
  body.navigation-open{overflow:hidden}
  .shell .sidebar{width:min(300px,calc(100vw - 48px));padding:calc(20px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));max-height:100dvh;overscroll-behavior:contain;box-shadow:none;transition:transform .18s ease;z-index:30}
  .shell .sidebar.open{box-shadow:6px 0 30px var(--color-shadow)}
  .shell .sidebar-head{align-items:flex-start}
  .shell .sidebar-head>.brand{flex:1;padding-bottom:16px}
  .shell .sidebar .brand strong{font-size:23px}
  .shell .sidebar button[data-action=close-navigation]{display:grid;place-items:center;width:44px;height:44px;flex:0 0 44px;border:1px solid var(--color-control-border);border-radius:7px;background:var(--color-surface);color:var(--color-text);padding:10px}
  .shell .sidebar button[data-action=close-navigation]:hover{background:var(--color-surface-hover)}
  #navigation-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:29;padding:0;min-width:0;background:var(--color-overlay);border:0;cursor:pointer;touch-action:manipulation}
  .shell .topbar{gap:8px 12px;padding:12px 16px}
  .production-mode .shell .topbar{padding-top:calc(10px + env(safe-area-inset-top))}
  .shell .mobile-menu{flex:0 0 44px;width:44px;height:44px;padding:10px;border:1px solid var(--color-control-border);border-radius:7px;align-items:center;justify-content:center;background:var(--color-surface)}
  .shell .mobile-menu:hover{background:var(--color-surface-hover);color:var(--color-brand)}
  .shell .breadcrumb{flex:1}
  .shell .top-actions{flex:1 0 100%;width:100%;min-width:0;gap:10px}
  .shell .top-actions select{flex:1;min-width:0;max-width:100%;width:auto;font-size:16px!important}
  .shell .top-actions .language{flex:0 1 120px;max-width:120px}
  .auth-art{min-height:220px;padding:28px 24px}
  .auth-art h1{font-size:32px;margin:28px 0 0}
  .auth-art .brand strong{font-size:25px}
  .auth-main{padding:32px 24px 40px;align-items:start}
 }
 @media(max-width:420px){
  .auth-art{padding:24px 20px;min-height:210px}
  .auth-art h1{font-size:30px;max-width:320px}
  .auth-main{padding:28px 20px 36px}
  .auth-form h2{font-size:30px}
  .shell .top-actions .language{flex-basis:105px;max-width:105px}
 }
 @media(prefers-reduced-motion:reduce){.shell .sidebar{transition:none}}
}
@media print{#navigation-backdrop{display:none!important}}


/* Opt-in searchable selects only. The original select remains the canonical
   named/validated form control; short unmarked native selects are unchanged. */
@media screen {
 .search-select{position:relative;display:block;width:100%;min-width:0;max-width:100%;isolation:isolate}
 .search-select-native{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;min-width:0!important;padding:0!important;margin:0!important;border:0!important;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
 .search-select .search-select-input{display:block;box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:46px;height:46px;margin:0;padding:8px 52px 8px 12px;border:1px solid var(--color-control-border);border-radius:6px;background:var(--color-surface);color:var(--color-text);font:inherit;font-size:16px!important;line-height:1.45;text-overflow:ellipsis;outline-offset:3px}
 .search-select .search-select-input::placeholder{color:var(--color-text-muted);opacity:1}
 .search-select .search-select-input:hover:not(:disabled){border-color:var(--color-brand)}
 .search-select .search-select-input[aria-expanded=true]{border-color:var(--color-brand)}
 .search-select .search-select-input:focus-visible{outline:3px solid var(--color-focus);outline-offset:3px}
 .search-select .search-select-input:disabled{background:var(--color-disabled-bg);color:var(--color-disabled-text);border-color:var(--color-disabled-border);cursor:not-allowed;opacity:1}
 .search-select .search-select-input[aria-invalid=true]{border-color:var(--color-error-border)}
 .search-select .search-select-toggle{position:absolute;inset-inline-end:1px;top:1px;width:44px;min-width:44px;height:44px;min-height:44px;display:grid;place-items:center;margin:0;padding:10px;border:0;border-radius:0 5px 5px 0;background:transparent;color:var(--color-text-muted);cursor:pointer;touch-action:manipulation}
 .search-select .search-select-toggle:hover:not(:disabled){background:var(--color-surface-hover);color:var(--color-brand)}
 .search-select .search-select-toggle:focus-visible{outline:3px solid var(--color-focus);outline-offset:2px}
 .search-select .search-select-toggle:disabled{color:var(--color-disabled-text);cursor:not-allowed}
 .search-select-toggle svg{width:18px;height:18px;pointer-events:none}
 .search-select-popup{position:fixed;display:block;box-sizing:border-box;z-index:100;min-width:0;min-height:0;max-width:calc(100vw - 16px);padding:4px;border:1px solid var(--color-control-border);border-radius:8px;background:var(--color-surface);color:var(--color-text);box-shadow:0 5px 20px var(--color-shadow);font-size:14px;line-height:1.5;overflow:hidden;white-space:normal}
 .search-select-popup[hidden]{display:none}
 .search-select-listbox{min-height:0;min-width:0;max-width:100%;max-height:min(320px,45dvh);overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-gutter:stable}
 .search-select-option{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:3px;min-width:0;min-height:44px;padding:10px 12px;border:1px solid transparent;border-radius:5px;cursor:pointer;overflow-wrap:anywhere;white-space:normal;color:var(--color-text)}
 .search-select-option+.search-select-option{margin-top:2px}
 .search-select-option:hover:not([aria-disabled=true]),.search-select-option.is-active{background:var(--color-surface-hover);border-color:var(--color-control-border)}
 .search-select-option[aria-selected=true]{background:var(--color-selected-bg);color:var(--color-brand);font-weight:600}
 .search-select-option[aria-selected=true]::after{content:'✓';position:absolute;right:12px;top:10px;font-size:15px;line-height:1.5;font-weight:700}
 .search-select-option[aria-selected=true]>.search-select-label,.search-select-option[aria-selected=true]>.search-select-detail{padding-right:22px}
 .search-select-option[aria-disabled=true]{color:var(--color-disabled-text);background:var(--color-disabled-bg);cursor:not-allowed}
 .search-select-label{display:block;min-width:0;max-width:100%;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
 .search-select-detail{display:block;min-width:0;max-width:100%;font-size:12px;line-height:1.65;font-weight:400;color:var(--color-text-muted);overflow-wrap:anywhere}
 .search-select-status{margin:0;padding:13px 12px;font-size:14px;line-height:1.65;color:var(--color-text-muted);overflow-wrap:anywhere;white-space:normal}
 .search-select-status[role=alert]{color:var(--color-error-text)}
 .search-select-validation:empty{display:none}
 .search-select-validation:not(:empty){margin-top:7px;font-size:14px;line-height:1.6;color:var(--color-error-text);overflow-wrap:anywhere}
 @media(max-width:800px){
  .search-select-popup{max-width:calc(100vw - 16px)}
  .search-select-listbox{max-height:min(280px,40dvh)}
  .search-select-option{padding:11px 12px;min-height:48px}
  .top-actions .search-select{flex:1;min-width:0}
  .top-actions .search-select .search-select-input{font-size:16px!important}
 }
}
@media print{
 .search-select-input,.search-select-toggle,.search-select-popup{display:none!important}
 .search-select-native{position:static!important;width:auto!important;height:auto!important;min-height:0!important;clip-path:none!important;overflow:visible!important}
}


/* Shared definitions and custody ledgers extend the existing Raw Materials views. */
.material-list-identity{display:flex;align-items:flex-start;gap:12px;min-width:0}
.material-list-identity>div{min-width:0;flex:1}
.material-thumbnail{display:block;position:relative;flex:0 0 48px;width:48px;height:56px;overflow:hidden;border:1px solid var(--color-divider);border-radius:6px;background:var(--color-surface-subtle)}
.material-thumbnail-large{flex-basis:80px;width:80px;height:94px}
.material-photo-placeholder{position:absolute;inset:0;display:grid;place-items:center;color:var(--color-text-muted)}
.material-photo-placeholder svg{width:23px;height:23px}
.material-photo-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:var(--color-surface-raised)}
.material-photo-image[hidden]{display:none}
.material-open{display:block;max-width:100%;padding:0;text-align:left;color:var(--color-text);background:transparent;white-space:normal;overflow-wrap:anywhere;border-radius:3px}
.material-open>strong{display:block;line-height:1.5;font-size:15px;font-weight:650}
.material-open>span{display:block;color:var(--color-brand);font-size:12px;font-weight:650;line-height:1.5;margin-top:3px}
.material-open:hover>strong{text-decoration:underline;text-underline-offset:3px}
.material-open:focus-visible{outline:2px solid var(--color-focus);outline-offset:4px}
.material-specifications{display:flex;flex-wrap:wrap;gap:5px 12px;margin:8px 0 0;font-size:12px;line-height:1.5}
.material-specifications>div{display:flex;flex-wrap:wrap;gap:3px;min-width:0;overflow-wrap:anywhere}
.material-specifications dt{color:var(--color-text-muted)}
.material-specifications dt:after{content:':'}.material-specifications dd{margin:0;font-weight:550;color:var(--color-text)}
.material-library-filters{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;padding:16px 20px;border-bottom:1px solid var(--color-divider)}
.material-library-filters>.field{flex:1 1 220px;max-width:500px;margin:0}
.material-detail{min-width:0}.material-detail-heading{display:flex;gap:16px;align-items:flex-start;min-width:0}
.material-detail-heading>div{min-width:0;flex:1}.material-detail-heading h3{font-size:19px;line-height:1.4;margin:0 0 7px;overflow-wrap:anywhere}
.material-detail-heading p{font-size:13px;line-height:1.6;margin:0;color:var(--color-text-muted);overflow-wrap:anywhere}
.material-detail>.material-specifications{margin:20px 0;gap:12px 24px;font-size:14px}
.material-detail-notes{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}
.material-photo-controls{display:flex;gap:18px;align-items:flex-start}.material-photo-controls>div:last-child{min-width:0;flex:1}
.material-photo-controls .button{max-width:100%;white-space:normal;margin:0 6px 8px 0}
.material-photo-file{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.material-photo-controls label.button{position:relative;overflow:hidden}.material-photo-controls label.button:focus-within{outline:2px solid var(--color-focus);outline-offset:3px}
.material-photo-controls p{margin:3px 0 8px}.material-upload-status{overflow-wrap:anywhere}
.material-custom-grid{min-width:0}.material-custom-grid>[data-material-value]{min-width:0}.material-custom-grid .field{margin:0}
.material-retained-specs{border-top:1px solid var(--color-divider);margin-top:18px;padding-top:14px}
.material-retained-specs summary{cursor:pointer;font-weight:600;font-size:13px}.material-retained-specs .hint{margin-top:10px}
.material-review-note{background:var(--color-warning-bg);color:var(--color-warning-text);border:1px solid var(--color-warning-border);font-size:13px;line-height:1.65;padding:12px;border-radius:6px}
.material-builder-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.material-builder-heading>h3{margin:0;font-size:15px}
.material-field-list{display:grid;gap:14px;margin-top:14px}.material-field-card{border:1px solid var(--color-divider);border-radius:8px;padding:14px;min-width:0;background:var(--color-surface-raised)}
.material-field-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px;min-width:0}.material-field-card-head>strong{overflow-wrap:anywhere;font-size:14px}
.material-field-card .field{margin:0}.material-field-card>.field-grid{gap:12px}
.material-field-card .inventory-check{margin:0}.material-number-settings{display:grid;gap:12px;grid-column:1/-1;grid-template-columns:2fr 1fr 1fr}
.material-setting-label{display:block;font-weight:600;font-size:13px;margin-bottom:8px}.material-choice-list{display:grid;gap:9px;margin-bottom:10px}
.material-choice-row{display:flex;gap:8px;align-items:flex-end;min-width:0}.material-choice-row>.field{flex:1;min-width:0}.material-choice-row>.button{flex-shrink:0;min-height:42px}
.material-field-card [hidden],.material-photo-editor [hidden]{display:none!important}
.modal:has(.material-ledger-form){width:min(1120px,96vw);max-width:1120px}
.material-ledger-form>.field-grid{display:block}.material-ledger-content{min-width:0;display:block}.material-ledger-content[aria-busy=true]{opacity:.7;pointer-events:none}
.material-ledger-balances{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0 14px}
.material-ledger-balances>div{padding:12px;border:1px solid var(--color-divider);border-radius:7px;background:var(--color-surface-raised);min-width:0}
.material-ledger-balances dt{font-size:12px;color:var(--color-text-muted);line-height:1.5;margin-bottom:5px}.material-ledger-balances dd{margin:0;font-size:18px;font-weight:650;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.material-ledger-summary>.hint{margin:12px 0 18px;line-height:1.6;font-size:12px}
.material-ledger-filters{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end;padding:14px 0;border-top:1px solid var(--color-divider);border-bottom:1px solid var(--color-divider)}
.material-ledger-filters>.field{flex:1 1 140px;min-width:0;margin:0}.material-ledger-filters select,.material-ledger-filters input{min-width:0;width:100%}
.material-ledger-context{font-size:12px;line-height:1.6}.material-ledger-table-wrap{min-width:0;max-width:100%}
.material-ledger-table{table-layout:fixed;white-space:normal;width:100%;min-width:0;max-width:100%;font-size:13px;line-height:1.55}
/* The shared enhancer inserts a .table-scroll wrapper and gives its child
   table a 620px minimum. Match through that wrapper with higher specificity. */
.material-ledger-form .material-ledger-table{min-width:0;max-width:100%}
.material-ledger-form .table-scroll{min-width:0;max-width:100%;width:100%}
.material-ledger-table th,.material-ledger-table td{white-space:normal;overflow-wrap:anywhere;vertical-align:top;padding:13px 9px;border-bottom:1px solid var(--color-divider)}
.material-ledger-table th{color:var(--color-text-muted);font-size:11px;font-weight:650;background:var(--color-surface-raised);text-align:left}
.material-ledger-table th:first-child{width:22%}.material-ledger-table th:nth-child(2){width:14%}.material-ledger-table th:nth-child(3),.material-ledger-table th:nth-child(4),.material-ledger-table th:nth-child(5){width:12%;text-align:right}
.material-ledger-table th:last-child{width:28%}.material-ledger-table small{display:block;color:var(--color-text-muted);font-size:11px;line-height:1.6;margin-top:5px}
.material-ledger-table tbody>tr:hover{background:var(--color-surface-raised)}.material-ledger-table .material-ledger-quantity{text-align:right;font-variant-numeric:tabular-nums}
.material-ledger-job{font-weight:600;color:var(--color-brand);font-size:13px}.material-ledger-reason{font-size:12px;line-height:1.6;white-space:pre-wrap;margin:8px 0 0}
.material-transaction-id{font-size:10px!important;word-break:break-all}.material-ledger-empty td{text-align:center;padding:30px 14px;color:var(--color-text-muted)}
.material-ledger-pagination{padding:14px 0 0;flex-wrap:wrap;gap:12px;font-size:13px}.material-ledger-pagination>.buttons{margin-left:auto}
@media screen and (max-width:720px){
 .inventory-library-table .inventory-material{grid-column:1/-1;grid-row:1;padding-right:54px!important}.inventory-library-table .inventory-actions{grid-column:2;grid-row:1;justify-self:end}
 .material-library-filters{padding:14px 16px;gap:8px}.material-library-filters>.field{flex-basis:100%;max-width:none}
 .material-thumbnail{flex-basis:46px;width:46px;height:54px}.material-thumbnail-large{flex-basis:68px;width:68px;height:80px}
 .material-list-identity{gap:10px}.material-specifications{gap:4px 10px}.material-detail-heading{gap:12px}.material-detail-heading h3{font-size:17px}
 .material-field-card{padding:12px}.material-field-card>.field-grid,.material-number-settings{grid-template-columns:minmax(0,1fr)}
 .material-field-card-head{flex-wrap:wrap}.material-field-card-head>.buttons{margin-left:auto}.material-field-card .button{min-height:42px}
 .material-choice-row{gap:6px}.material-choice-row>.button{padding:8px;min-width:40px}.material-photo-controls{gap:12px}
 .modal:has(.material-ledger-form){width:96vw}.material-ledger-balances{grid-template-columns:minmax(0,1fr);gap:8px;margin-top:16px}
 .material-ledger-balances>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:10px 12px}.material-ledger-balances dd{font-size:17px;text-align:right}
 .material-ledger-filters>.field{flex-basis:calc(50% - 5px)}.material-ledger-filters>.field:nth-child(3){flex-basis:100%}
 .material-ledger-table,.material-ledger-table tbody{display:block;width:100%;min-width:0;max-width:100%}.material-ledger-table thead{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
 .material-ledger-table tbody>tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 9px;border-bottom:1px solid var(--color-divider);padding:16px 0}
 .material-ledger-table td{display:block;padding:0;border:0;min-width:0}.material-ledger-table td[data-label]:before{display:block;content:attr(data-label);font-size:11px;color:var(--color-text-muted);font-weight:500;margin-bottom:5px}
 .material-ledger-table td:first-child{grid-column:1/3;grid-row:1}.material-ledger-table td:nth-child(2){grid-column:3;grid-row:1}
 .material-ledger-table td:nth-child(3){grid-column:1;grid-row:2;text-align:left}.material-ledger-table td:nth-child(4){grid-column:2;grid-row:2;text-align:left}.material-ledger-table td:nth-child(5){grid-column:3;grid-row:2;text-align:right}
 .material-ledger-table td:last-child{grid-column:1/-1;grid-row:3}.material-ledger-table .material-ledger-empty{display:block;padding:25px 0}.material-ledger-empty td:before{content:none!important}
}
@media print{
 .material-ledger-filters,.material-ledger-pagination{display:none!important}.material-ledger-table{font-size:10px}.material-ledger-table th,.material-ledger-table td{padding:7px 5px}.material-photo-controls{display:none}
}

.recovery-page>.panel,.recovery-page>.notice{margin-top:20px}.recovery-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:20px}.recovery-summary strong,.recovery-summary small{display:block}.recovery-summary strong{margin-top:8px;font-size:16px}.recovery-table{white-space:normal}.recovery-table td{white-space:normal;overflow-wrap:anywhere;vertical-align:top}.recovery-table small{display:block;color:var(--color-text-muted);margin-top:5px}.recovery-job{display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--color-divider);padding:14px 0}.recovery-job small{display:block;color:var(--color-text-muted)}.recovery-counts{display:flex;flex-wrap:wrap;gap:8px 18px;margin:18px 0}.recovery-preview:focus-visible{outline:2px solid var(--color-focus);outline-offset:4px}.recovery-record-table td{white-space:pre-wrap;overflow-wrap:anywhere;max-width:350px;font-size:12px}.recovery-preview .field-grid{margin:16px 0}.recovery-preview h3{margin-top:22px}@media(max-width:720px){.recovery-summary{grid-template-columns:minmax(0,1fr)}.recovery-job{align-items:flex-start;flex-wrap:wrap}.recovery-page .panel-head{align-items:flex-start;gap:12px;flex-wrap:wrap}.recovery-page .table-scroll>table.recovery-table{min-width:0}.recovery-table,.recovery-table tbody{display:block;width:100%;min-width:0}.recovery-table thead{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}.recovery-table tbody tr{display:grid;grid-template-columns:1fr 1fr;gap:12px;border-bottom:1px solid var(--color-divider);padding:16px}.recovery-table td{display:block;padding:0;border:0;min-width:0}.recovery-table td[data-label]:before{display:block;content:attr(data-label);font-size:11px;color:var(--color-text-muted);margin-bottom:5px}.recovery-table td:first-child,.recovery-table td:last-child{grid-column:1/-1}}
