:root{--orange:#fe4703;--ink:#343434;--muted:#686868;--line:#dedede;--surface:#f4f4f4}*{box-sizing:border-box}body{margin:0;background:var(--surface);color:var(--ink);font:14px Arial,sans-serif}header{height:78px;background:white;display:flex;align-items:center;gap:22px;padding:16px 28px;border-bottom:1px solid var(--line)}header img{width:128px;height:auto}header span{letter-spacing:.12em;font-size:12px;font-weight:700;border-left:1px solid var(--line);padding-left:22px}header small{margin-left:auto;color:var(--muted)}.shell{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:calc(100vh - 78px)}aside{background:#e8e8e8;border-right:1px solid #ccc;padding:28px 14px}aside p{font-size:11px;font-weight:700;letter-spacing:.12em;color:var(--orange);padding:0 12px}nav{display:grid;gap:8px}button{font:inherit;border:1px solid var(--line);background:#fff;color:var(--ink);padding:12px 16px;border-radius:3px;cursor:pointer;min-height:44px}button:hover{border-color:var(--orange)}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--orange);outline-offset:3px}nav button{text-align:left;border:0;background:transparent}nav button.active{background:var(--orange);color:white}.aside-note{font-size:11px;color:var(--muted);line-height:1.7;margin:38px 12px}.hero{padding:28px 32px;background:linear-gradient(120deg,#242424,#3c3c3c);color:#fff}.hero>span{font-size:10px;letter-spacing:.12em}.hero h1{margin:8px 0 10px;color:var(--orange);font-size:29px}.hero p{margin:0;line-height:1.5;color:#f1f1f1}.content{padding:28px 32px}.toolbar{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:24px}.toolbar label{display:grid;gap:8px;max-width:480px;flex:1;color:var(--muted);font-size:12px}input,select{font:inherit;padding:12px;border:1px solid #ccc;border-radius:3px;background:#fff;min-height:44px;width:100%}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:24px}.card{padding:24px;background:#fff;border:1px solid var(--line);border-top:3px solid var(--orange)}.card strong{display:block;font-size:30px;margin:12px 0}.card span,.muted{color:var(--muted);font-size:12px}.panel{background:white;border:1px solid var(--line);padding:24px;margin-bottom:24px}.panel h2{margin:0 0 16px;font-size:18px}.panel p{line-height:1.7}.notice{background:#fff7ef;border-left:3px solid var(--orange);padding:15px 18px;line-height:1.6;margin-bottom:22px}.table-wrap{overflow:auto;border:1px solid var(--line);background:#fff}table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:15px 16px;border-bottom:1px solid var(--line);vertical-align:top;line-height:1.5}th{background:#ececec;font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:#555}tr:last-child td{border-bottom:0}.code{font-family:monospace;white-space:nowrap}.badge{display:inline-block;padding:4px 8px;border-radius:2px;background:#f1f1f1;font-size:11px;white-space:nowrap}.badge.warning{background:#fff0dc;color:#864200}details summary{cursor:pointer}details p{max-width:650px}.check-row{display:flex;align-items:center;gap:12px;min-height:54px;border-bottom:1px solid var(--line);padding:10px 0}.check-row input{width:22px;min-height:22px;height:22px;accent-color:var(--orange)}.check-row:last-child{border-bottom:0}.progress{height:7px;background:#eee;margin:18px 0}.progress div{height:100%;background:var(--orange)}.sim-controls{display:grid;grid-template-columns:1fr auto;gap:16px;margin-bottom:20px}.print-meta{display:none}
:root{--done:#218044;--pending:#b88a00;--issue:#d66a00;--urgent:#c92b32}.check-row input:checked{accent-color:var(--done)}
[hidden]{display:none!important}
.ops-actions{display:flex;flex-wrap:wrap;align-items:center;gap:16px}.ops-actions label{display:grid;gap:8px;min-width:200px}.ops-form{display:flex;flex-wrap:wrap;align-items:end;gap:16px;margin:20px 0}.ops-form label{display:grid;gap:8px;flex:1 1 180px;min-width:0;font-size:12px}.ops-form button{flex:0 1 auto}.ops-requirement{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:16px 0;border-bottom:1px solid var(--line)}.ops-requirement strong{flex:1 1 200px}.ops-requirement>span:last-of-type{flex:1 1 180px}.ops-root h3{line-height:1.5;overflow-wrap:anywhere}.ops-root .panel .panel{background:#fafafa}.ops-root li{margin:12px 0;line-height:1.6}.ops-root button:disabled{opacity:.55;cursor:default}
@media print{.ops-form,.ops-actions,.ops-root button{display:none}.ops-root.printing-order>*:not(.print-order-parent){display:none}.print-order-parent>*:not(.print-order-selected):not(h2){display:none}.ops-root .panel{border:0;background:white}.ops-requirement{display:block}.ops-requirement>span,.ops-requirement>strong{display:block}}
.status-legend{display:flex;flex-wrap:wrap;gap:12px 24px;padding:12px 0 18px;margin-bottom:14px;border-bottom:1px solid var(--line);font-size:12px}.status-legend>span,.status-badge{display:inline-flex;align-items:center;gap:8px}.status-dot{width:10px;height:10px;border-radius:50%;background:currentColor;flex:none;display:inline-block;border:1px solid rgba(0,0,0,.18);print-color-adjust:exact;-webkit-print-color-adjust:exact}.dot-done{color:var(--done)}.dot-pending{color:#e6b800}.dot-issue{color:var(--issue)}.dot-urgent{color:var(--urgent)}.status-badge{padding:5px 9px;border-radius:4px;font-size:12px;font-weight:600;line-height:1.5;white-space:normal;margin:4px 0}.status-done{color:#176035;background:#e9f5ed}.status-done .status-dot{background:var(--done)}.status-pending{color:#6c5400;background:#fff6cd}.status-pending .status-dot{background:#e6b800}.status-issue{color:#914000;background:#fff0df}.status-issue .status-dot{background:var(--issue)}.status-urgent{color:#9c1822;background:#ffeaec}.status-urgent .status-dot{background:var(--urgent)}.status-neutral{color:#565656;background:#eee}.state-panel{border-left-width:4px}.state-done{border-left-color:var(--done)}.state-pending{border-left-color:#e6b800}.state-issue{border-left-color:var(--issue)}.state-urgent{border-left-color:var(--urgent)}.progress .progress-done{background:var(--done)}.progress .progress-pending{background:#e6b800}
.bom-children{padding-left:16px;border-left:2px solid #ddd}.bom-line{padding:12px 0;border-bottom:1px solid var(--line)}.bom-line summary{line-height:1.7;overflow-wrap:anywhere}.bom-children li{margin-bottom:8px;line-height:1.5}
header img{background:#242424;padding:8px;border-radius:2px;width:144px;print-color-adjust:exact;-webkit-print-color-adjust:exact}
@media(max-width:900px){.cards{grid-template-columns:repeat(2,1fr)}header small{max-width:210px;text-align:right}.content{padding:24px}.hero{padding:24px}}
@media(max-width:620px){header{height:auto;padding:16px;gap:12px;flex-wrap:wrap}header img{width:100px}header span{padding-left:12px}header small{flex-basis:100%;max-width:none;text-align:left;margin:0}.shell{display:block}aside{padding:12px;border-right:0}aside p,.aside-note{display:none}nav{display:flex;overflow:auto;gap:6px}nav button{flex:none;font-size:12px;padding:10px}.hero h1{font-size:25px}.content{padding:20px 16px}.toolbar{align-items:stretch;flex-direction:column;gap:12px}.toolbar label{max-width:none}.cards{gap:12px}.card{padding:16px}.panel{padding:18px}.sim-controls{grid-template-columns:1fr}th,td{padding:12px}.hero{padding:24px 16px}}
@media print{@page{size:A4 landscape;margin:12mm}body{background:#fff;font-size:10pt}header{height:auto;padding:0 0 12px;border-bottom:1px solid #aaa}header small{font-size:9pt}.shell{display:block}aside,.toolbar,.sim-controls{display:none}.hero{background:white;color:#343434;padding:16px 0}.hero>span{display:none}.hero h1{color:#343434;font-size:20pt}.hero p{color:#555}.content{padding:0}.panel,.card{break-inside:avoid}.table-wrap{overflow:visible}table{font-size:9pt}thead{display:table-header-group}tr{break-inside:avoid}th,td{padding:7px}.notice{background:white}.cards{gap:10px}.print-meta{display:block}.progress{display:none}}
.order-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:24px}.order-metrics>div{background:white;border:1px solid var(--line);padding:20px;border-radius:5px}.order-metrics span{display:block;font-size:12px;color:var(--muted)}.order-metrics strong{display:block;font-size:28px;margin-top:10px}.order-list-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.order-list-heading h2{margin:0}.order-list-heading>span{font-size:12px;color:var(--muted)}.order-filters{display:grid;grid-template-columns:minmax(0,1fr) 200px;gap:16px;margin-bottom:22px}.order-filters label{display:grid;gap:8px;font-size:12px;color:var(--muted)}.order-rows{display:grid;gap:12px}.order-row{display:grid;grid-template-columns:minmax(140px,1fr) minmax(210px,1.5fr) minmax(100px,.7fr);gap:20px;text-align:left;width:100%;padding:20px;border:1px solid var(--line);border-radius:6px;align-items:start}.order-row:hover,.order-row.selected{border-color:var(--orange);background:#fffaf7}.order-identity,.order-stage,.order-payment{display:grid;gap:8px}.order-identity strong{font-size:16px}.order-identity>span{overflow-wrap:anywhere}.order-row small{font-size:11px;color:var(--muted);line-height:1.6}.order-payment{justify-items:end;text-align:right}.order-open{font-size:12px;color:var(--orange);font-weight:700;margin-top:4px}.order-mini-steps{display:flex;flex-wrap:wrap;gap:5px 10px;margin-top:6px}.order-mini-steps>span{font-size:10px;color:#777;padding-top:6px;border-top:3px solid #ddd}.order-mini-steps>.step-done{color:var(--done);border-color:var(--done)}.order-timeline{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:16px;padding:0!important;list-style:none;margin:0 0 20px}.ops-root .order-timeline li{display:flex;gap:10px;margin:0;border-top:3px solid #ddd;padding-top:14px}.order-timeline li.step-done{border-color:var(--done)}.step-number{display:flex;align-items:center;justify-content:center;width:26px;height:26px;flex:none;border-radius:50%;background:#eee;font-size:12px;font-weight:700}.step-done .step-number{color:var(--done);background:#e9f5ed}.order-timeline strong,.order-timeline small{display:block;font-size:12px;line-height:1.6}.order-timeline small{color:var(--muted);font-size:11px}.new-order>summary{font-weight:700;color:var(--orange)}.order-empty{padding:20px;text-align:center}.order-list .status-badge{margin:0;justify-self:start}.order-detail{scroll-margin-top:24px}
@media(max-width:1100px){.order-row{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr)}.order-payment{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;text-align:left}.order-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.order-filters,.order-row{grid-template-columns:1fr}.order-row{gap:16px;padding:16px}.order-payment{flex-wrap:wrap;gap:12px}.order-list-heading{align-items:start}.order-timeline{grid-template-columns:1fr 1fr}.order-metrics{gap:12px}.order-metrics>div{padding:16px}}
@media print{.order-filters,.new-order{display:none}.order-row{break-inside:avoid;color:var(--ink)}.order-metrics{grid-template-columns:repeat(4,1fr)}.order-open{display:none}.ops-root .order-row{display:grid}.ops-root.printing-order .order-actions{display:block}.ops-root.printing-order .order-actions article:not(.print-order-selected){display:none}}
.orders-page>.notice{font-size:12px;padding:12px 16px}.orders-page>.session-panel{padding:14px 16px}.orders-page>.session-panel .ops-actions{display:grid;grid-template-columns:minmax(120px,1fr) minmax(80px,1fr) auto;gap:12px}.orders-page>.session-panel label{min-width:0;font-size:11px;gap:5px}.orders-page>.session-panel p{margin:0;font-size:12px}.orders-page>.session-panel button{padding:10px}.orders-page .new-order{padding:16px}.orders-page .order-metrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.orders-page .order-metrics>div{padding:14px}.orders-page .order-metrics span{font-size:11px;line-height:1.5}.orders-page .order-metrics strong{font-size:25px}
@media(max-width:620px){.orders-page .order-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.orders-page>.session-panel .ops-actions{grid-template-columns:1fr auto}.orders-page>.session-panel label{grid-column:1/-1}}
.manual-order-lines{flex:1 1 100%;min-width:0;border-top:1px solid var(--line);padding-top:16px}.manual-order-line{display:grid;grid-template-columns:minmax(0,1fr) 110px auto;gap:12px;align-items:end;margin-bottom:16px}.manual-order-footer{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px;padding:16px 0;border-top:1px solid var(--line)}.manual-order-footer strong{font-size:14px}.ordered-products{padding:16px;background:#f4f4f4;border-radius:4px;margin:20px 0}.ordered-products h4{margin:0 0 12px}.ordered-products p{margin:8px 0}
@media(max-width:620px){.manual-order-line{grid-template-columns:1fr 90px}.manual-order-line>label:first-child{grid-column:1/-1}.manual-order-line>button{justify-self:end}}
.software-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}.software-heading h2{margin:0;font-size:18px}.software-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.software-card{margin:0;border-top:3px solid var(--orange);border-radius:5px}.software-card .software-heading{align-items:start}.software-channel{display:grid;gap:12px;padding:18px 0;border-top:1px solid var(--line)}.software-channel>div:first-child{display:grid;gap:6px}.software-channel>div:first-child>span{font-size:12px;color:var(--muted)}.software-channel .status-badge{justify-self:start}.software-version{display:grid;gap:6px}.software-version strong{font-size:21px;overflow-wrap:anywhere}.software-version small,.software-verification small{font-size:11px;color:var(--muted)}.software-verification{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}.software-verification a{color:var(--orange);font-weight:700;font-size:12px}.software-channel-form{margin:16px 0;border:1px solid var(--line);padding:16px;min-width:0}.software-channel-form legend{font-weight:700;padding:0 8px}.software-history{border-top:1px solid var(--line);padding-top:16px;margin-top:16px;font-size:12px}.software-root .ops-form label{display:grid;gap:8px;flex:1 1 180px;font-size:12px}.software-root button:disabled{opacity:.5;cursor:default}
@media(max-width:1000px){.software-cards{grid-template-columns:1fr}}
@media print{.software-root button,.software-root form{display:none}.software-cards{grid-template-columns:1fr 1fr}.software-verification a{color:var(--ink)}}
.access-root table{table-layout:auto;min-width:850px}.access-root th:first-child{width:28%}.access-root th:nth-child(2){width:16%}.access-root th:nth-child(3){width:22%}.access-root th:nth-child(4){width:22%}.access-root th:last-child{width:12%}.access-root td{overflow-wrap:anywhere;padding:14px 10px}.access-root td button{width:100%;padding:10px 6px;font-size:12px}
@media screen and (max-width:640px){.access-root .table-wrap{border:0;background:transparent}.access-root table{min-width:0}.access-root thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.access-root tbody,.access-root tr,.access-root td{display:block;width:100%}.access-root tr{border:1px solid var(--line);margin-bottom:16px;background:white}.access-root tbody td{padding:10px 12px;border-bottom:0;min-width:0}.access-root td::before{content:attr(data-label);display:block;margin-bottom:5px;color:var(--muted);font-size:11px;font-weight:700}.access-root td button{width:auto;max-width:100%;padding:10px 16px}.access-root td .status-badge{white-space:normal}.access-root td p{margin:8px 0 0}}
header #notificationBell{margin-left:auto;min-height:36px;padding:8px 12px;font-size:12px}header #notificationBell+small{margin-left:0}#notificationCount:not(:empty){display:inline-flex;justify-content:center;align-items:center;min-width:20px;height:20px;border-radius:50%;background:var(--orange);color:white;margin-left:5px}.notification-actions{margin-top:20px}.notification-events{list-style:none;padding:0;margin:0}.notification-events li{display:flex;align-items:start;gap:16px;padding:16px 0;border-bottom:1px solid var(--line)}.notification-events li:last-child{border-bottom:0}.notification-events strong,.notification-events small{display:block;line-height:1.6}.notification-events small{font-size:11px;color:var(--muted);margin-top:6px}.personal-notifications .check-row{align-items:start}.personal-notifications .check-row span{line-height:1.6}.personal-notifications button:disabled{opacity:.5;cursor:default}
@media print{#notificationBell,.personal-notifications form,.personal-notifications button{display:none}}
.mfa-secret-label{display:grid;gap:10px;margin:20px 0;font-size:12px}.mfa-secret{font-family:monospace;font-size:16px;letter-spacing:.04em}.recovery-codes{background:#f4f4f4;padding:20px;line-height:1.8;overflow:auto}.security-root li{line-height:1.8;margin:12px 0}.security-root button:disabled{opacity:.5}
@media print{.security-root .mfa-secret-label{display:none}.security-root form,.security-root button{display:none}}

.order-data-fields{grid-column:1/-1;border:1px solid var(--border,#ddd);border-radius:12px;padding:20px;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin:12px 0}.order-data-fields legend{font-weight:700;padding:0 8px}.order-data-fields p{grid-column:1/-1}.order-payment-detail,.order-customer{border-top:1px solid #e5e5e5;padding-top:18px;margin:22px 0}.payment-entry{background:#f7f7f7;border-radius:10px;padding:16px;margin:12px 0}.order-customer p{margin:6px 0;white-space:pre-wrap}
.code-link{background:#fff3ec;color:#9b350f;border:1px solid #f6d6c5;border-radius:6px;padding:6px 9px;cursor:pointer}.barcode-records{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin-top:20px}.barcode-records button{text-align:left;padding:16px;background:#fafafa;border:1px solid #ddd;border-radius:10px;display:grid;gap:8px;cursor:pointer;min-width:0}.barcode-records small{color:#666}.barcode-preview{background:white;border:1px solid #eee;padding:16px;margin:20px 0;overflow:auto}.barcode-preview svg{display:block;width:100%;max-width:650px;height:auto;margin-inline:auto}.barcode-root video{width:100%;max-height:420px;background:#111;border-radius:12px;margin-top:18px}.barcode-photo{display:grid;gap:6px;font-size:14px}.barcode-photo input{max-width:250px}.barcode-detail{scroll-margin:20px}@media print{.barcode-root form,.barcode-root .ops-actions,.barcode-root video,.barcode-records,.code-link{display:none}.barcode-preview{border:0}}

.barcode-download{display:inline-block;padding:12px 16px;background:#fff;border:1px solid #ddd;border-radius:8px;color:#343434;text-decoration:none}

.account-bar{display:flex;align-items:center;gap:12px;flex-shrink:0}.account-bar .account-name{margin:0;font-size:13px;font-weight:700;color:var(--ink)}.account-bar button{min-height:36px;padding:8px 12px;font-size:12px}
@media(max-width:620px){.account-bar{width:100%;justify-content:flex-end}.account-bar small{flex-basis:auto;text-align:right}header #notificationBell{margin-left:auto}}
@media print{.account-bar,header #notificationBell{display:none}}

.nav-group{border-top:1px solid #d2d2d2;padding-top:10px;margin-top:4px}.nav-group summary{font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;padding:8px 10px;color:#555;min-height:36px}.nav-children{display:grid;gap:4px;padding:4px 0 6px}.nav-children button{padding:10px 12px 10px 22px;font-size:13px;line-height:1.35;width:100%}.nav-group[hidden],nav button[hidden]{display:none!important}
@media(max-width:620px){nav{display:grid;grid-template-columns:1fr;overflow:visible}aside{padding:12px 16px}nav>.nav-group{margin:0}.nav-group summary{min-height:44px;padding:13px 10px}.nav-children{grid-template-columns:repeat(2,minmax(0,1fr))}.nav-children button{padding:10px;text-align:left}nav>button{width:100%}}

.edit-dialog{border:1px solid var(--line);border-radius:8px;padding:0;width:min(960px,calc(100vw - 32px));max-height:calc(100dvh - 32px);color:var(--ink);background:var(--surface);overflow:hidden}.edit-dialog::backdrop{background:rgba(0,0,0,.55)}.edit-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 24px;background:white;border-bottom:1px solid var(--line)}.edit-dialog-heading h2{margin:0;font-size:20px}.edit-dialog-content{padding:24px;overflow:auto;max-height:calc(100dvh - 120px);overscroll-behavior:contain}.edit-dialog-content .ops-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.edit-dialog-content .panel{margin-bottom:16px}.edit-dialog-content .order-detail #closeOrder{display:none}.edit-dialog-content [role="alert"]{margin-bottom:20px}
@media(max-width:620px){.edit-dialog-heading{padding:14px 16px}.edit-dialog-heading h2{font-size:17px}.edit-dialog-content{padding:16px}.edit-dialog-content .ops-form{display:grid;grid-template-columns:1fr}}
@media print{.edit-dialog{position:static;max-height:none;width:100%;border:0;overflow:visible}.edit-dialog-content{max-height:none;overflow:visible;padding:0}.edit-dialog-heading{display:none}.edit-dialog::backdrop{display:none}}

.software-root .edit-dialog-content>.panel>h2{display:none}
@media print{.ops-root.printing-order>.edit-dialog{display:block}.printing-order .edit-dialog-content>.order-detail{display:none}}

.menu-toggle{display:none}.mobile-menu{padding:0;border:0;margin:0;height:100dvh;max-height:100dvh;width:min(360px,calc(100vw - 32px));max-width:100vw;background:#e8e8e8;color:var(--ink);overflow:auto;overscroll-behavior:contain;box-shadow:8px 0 30px #0003}.mobile-menu::backdrop{background:#0008}.mobile-menu-heading{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px;background:white;border-bottom:1px solid var(--line)}.mobile-menu-heading strong{font-size:16px}.mobile-menu aside{border:0;padding:16px}.mobile-menu nav{display:grid;grid-template-columns:1fr;gap:8px;overflow:visible}.mobile-menu .nav-children{grid-template-columns:1fr;gap:4px}.mobile-menu nav button{width:100%;text-align:left;padding:12px 16px;white-space:normal}.mobile-menu .nav-children button{padding-left:24px}.mobile-menu summary{padding:14px 12px;min-height:44px}.mobile-menu .aside-note{display:block;margin:24px 12px}.mobile-menu .nav-group{margin:0}
@media(max-width:900px){.shell{display:block;min-width:0}.menu-toggle{display:block;min-height:40px;padding:8px 12px}header{height:auto;min-height:78px;padding:14px 20px;gap:12px;flex-wrap:wrap}header .brand-title{border:0;padding:0;font-size:10px}header #notificationBell{margin-left:auto}.account-bar{margin-left:auto;max-width:100%}.account-bar .account-name{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hero,.content{min-width:0}}
@media(max-width:620px){header{display:grid;grid-template-columns:1fr auto;padding:12px 16px;gap:10px 12px}header img{width:116px}header .brand-title{display:none}.menu-toggle{grid-column:2;grid-row:1}header #notificationBell{grid-column:1;grid-row:2;justify-self:start;margin:0}.account-bar{grid-column:2;grid-row:2;width:auto;gap:8px;margin:0;justify-content:flex-end}.account-bar .account-name{font-size:11px;max-width:110px}.account-bar button{padding:8px;font-size:11px}.mobile-menu .nav-children button{font-size:13px}.mobile-menu .aside-note{display:block}}
@media print{.menu-toggle,.mobile-menu{display:none!important}}

.export-dialog{border:1px solid var(--line);border-radius:8px;padding:0;width:min(1120px,calc(100vw - 24px));max-height:calc(100dvh - 24px);background:var(--surface);color:var(--ink);overflow:auto}.export-dialog::backdrop{background:#0009}.export-toolbar{display:flex;gap:16px;align-items:center;flex-wrap:wrap;padding:16px 24px;background:white}.export-toolbar label{display:grid;gap:6px;font-size:12px}.export-toolbar .export-cover{display:flex;align-items:center}.export-cover input{width:20px;min-height:20px}.export-status{margin:0;padding:12px 24px;font-size:12px;line-height:1.6}.export-dialog iframe{display:block;width:100%;height:65dvh;border:0;background:#e8e8e8}.export-dialog button:disabled{opacity:.5}@media(max-width:620px){.export-toolbar{padding:16px;gap:12px}.export-status{padding:12px 16px}}

/* Shared field geometry, including native Safari selects. */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]),select:not([multiple]){height:44px;min-height:44px;margin:0;padding:10px 12px;font-family:inherit;font-size:14px;line-height:20px;color:var(--ink);border:1px solid #ccc;border-radius:3px;background-color:#fff;box-sizing:border-box;min-width:0}
select:not([multiple]){appearance:none;-webkit-appearance:none;padding-right:36px;background-image:linear-gradient(45deg,transparent 50%,#686868 50%),linear-gradient(135deg,#686868 50%,transparent 50%);background-position:calc(100% - 19px) 19px,calc(100% - 14px) 19px;background-size:5px 5px;background-repeat:no-repeat;text-overflow:ellipsis}
select[multiple],textarea{font:inherit;font-size:14px;line-height:1.5;padding:10px 12px;border:1px solid #ccc;border-radius:3px;background:#fff;color:var(--ink);width:100%;min-width:0;min-height:88px;box-sizing:border-box}textarea{resize:vertical}
.ops-form label,.order-filters label,.order-data-fields label,.export-toolbar>label:not(.export-cover){gap:8px;font-size:12px;line-height:1.5;min-width:0}
#opsOrder{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:24px;margin-top:24px}
#opsOrder>label{width:auto;max-width:none}
#opsOrder .manual-order-lines{grid-column:1/-1;width:100%;padding-top:24px}
#opsOrder .order-data-fields{width:100%;min-width:0;margin:0;padding:24px;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:20px 24px;border-radius:6px}
#opsOrder .order-data-fields label{width:auto;max-width:none}
#opsOrder .order-data-fields p{margin:0;line-height:1.6}
#opsOrder>button{grid-column:1/-1;justify-self:end;background:var(--orange);border-color:var(--orange);color:white;padding-inline:28px}
@media(min-width:1200px){#opsOrder .order-data-fields{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){#opsOrder{grid-template-columns:minmax(0,1fr);gap:20px}#opsOrder .order-data-fields{grid-template-columns:minmax(0,1fr);padding:18px;gap:16px}#opsOrder .manual-order-line{grid-template-columns:minmax(0,1fr) auto;gap:12px}#opsOrder .manual-order-line>label:first-child{grid-column:1/-1}#opsOrder>button{width:100%;justify-self:stretch}}
.ops-form>button,.ops-form .ops-actions>button{min-height:44px;padding:10px 16px;line-height:22px;align-self:end}
input:disabled,select:disabled,textarea:disabled{color:#686868;background-color:#f1f1f1;opacity:1;cursor:not-allowed}input[readonly],textarea[readonly]{background-color:#f7f7f7}
textarea:focus-visible{outline:2px solid var(--orange);outline-offset:3px}
.notification-center{position:relative;margin-left:auto;flex-shrink:0}header .notification-center #notificationBell{margin:0;display:flex;align-items:center;gap:8px;min-height:38px;padding:8px 12px;font-size:13px;font-weight:500}header #notificationCount{border:0;padding:0;letter-spacing:normal;margin:0;font-size:11px;font-weight:700;line-height:20px;min-width:22px;height:22px;flex-shrink:0;border-radius:11px}header #notificationCount:not(:empty){padding:0 6px}.notification-dropdown{position:absolute;z-index:120;right:0;top:calc(100% + 10px);width:360px;max-width:calc(100vw - 32px);background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 28px #0002;overflow:hidden;text-align:left}.notification-dropdown[hidden]{display:none}.notification-dropdown-heading{padding:16px 18px;border-bottom:1px solid var(--line)}.notification-dropdown strong{display:block;font-size:13px;line-height:1.5;letter-spacing:normal}.notification-dropdown small{display:block;margin:5px 0 0!important;text-align:left!important;font-size:11px;line-height:1.5;max-width:none!important;color:var(--muted)}.notification-dropdown ul{list-style:none;margin:0;padding:0;max-height:min(52vh,420px);overflow-y:auto;overscroll-behavior:contain}.notification-dropdown li{padding:12px 18px;border-bottom:1px solid #eee;font-size:13px;line-height:1.5}.notification-dropdown .notification-unread{border-left:3px solid var(--orange);padding-left:15px;background:#fffaf7}.notification-dropdown>a{display:block;padding:15px 18px;border-top:1px solid var(--line);color:var(--orange);font-size:13px;font-weight:700;text-decoration:none}.notification-dropdown>a:hover{background:#fff5ee}.notification-dropdown>a:focus-visible{outline:2px solid var(--orange);outline-offset:-3px}@media(max-width:620px){header .notification-center{grid-column:1;grid-row:2;margin:0;justify-self:start}.notification-dropdown{position:fixed;left:16px;right:16px;top:124px;width:auto;max-width:none}.notification-dropdown ul{max-height:calc(100dvh - 250px)}}@media print{.notification-center{display:none}}
.order-filters{grid-template-columns:minmax(0,1fr) 160px 250px}.order-tags{display:flex;gap:6px;flex-wrap:wrap}.order-tags>span{padding:3px 8px;background:#fff0e8;color:#9b3c12;border:1px solid #f5cfb9;border-radius:4px;font-size:11px}.order-customer-name{padding-top:8px;border-top:1px solid #eee}.order-identity .order-customer-name strong{display:inline;font-size:12px;font-weight:600}.order-annotations{margin:20px 0;padding:18px;background:#fafafa;border:1px solid var(--line);border-radius:6px}.order-annotations .ops-form{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}.order-annotations label{width:100%;min-width:0}.order-annotations button{justify-self:end}.order-annotations textarea{width:100%;resize:vertical}@media(max-width:1100px){.order-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.order-filters>label:first-child{grid-column:1/-1}}@media(max-width:620px){.order-filters{grid-template-columns:minmax(0,1fr)}}

/* Scanner: full-width camera preview and a wide barcode alignment target. */
.scanner-panel[hidden]{display:none}.scanner-panel{margin-top:18px}.scanner-frame{position:relative;aspect-ratio:2.4/1;background:#171717;border-radius:10px;overflow:hidden}.barcode-root .scanner-frame video{display:block;width:100%;height:100%;max-height:none;object-fit:cover;object-position:center;margin:0;border-radius:0;position:absolute;inset:0}.scanner-target{position:absolute;inset:18% 7%;pointer-events:none}.scanner-target i{position:absolute;width:22px;height:22px;border-color:#fff;border-style:solid;border-width:0;filter:drop-shadow(0 1px 2px #000)}.scanner-target i:nth-child(1){top:0;left:0;border-top-width:3px;border-left-width:3px}.scanner-target i:nth-child(2){top:0;right:0;border-top-width:3px;border-right-width:3px}.scanner-target i:nth-child(3){bottom:0;left:0;border-bottom-width:3px;border-left-width:3px}.scanner-target i:nth-child(4){bottom:0;right:0;border-bottom-width:3px;border-right-width:3px}.barcode-photo{margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}.barcode-photo input{max-width:100%;min-width:0}.scanner-panel #scannerStatus{font-weight:700;font-size:13px;margin:12px 0 0}
@media(max-width:620px){header{grid-template-columns:1fr auto auto;gap:12px 8px;padding:12px 16px}header img{width:118px;grid-column:1;grid-row:1}.menu-toggle{grid-column:2;grid-row:1;padding:8px 10px}header .notification-center{grid-column:3;grid-row:1;justify-self:end}header .notification-center #notificationBell{padding:8px;font-size:12px;gap:5px}.account-bar{grid-column:1/-1;grid-row:2;width:100%;justify-content:space-between;border-top:1px solid var(--line);padding-top:10px}.account-bar .account-name{font-size:13px;max-width:calc(100% - 75px);text-align:left}.account-bar button{font-size:12px;padding:8px 12px}.notification-dropdown{top:116px}.barcode-records{grid-template-columns:1fr}.scanner-frame{aspect-ratio:2.2/1}}
@media(max-width:350px){header img{width:98px}header .notification-center #notificationBell{font-size:11px;padding:8px 5px}.menu-toggle{font-size:12px;padding:8px}}
@media print{.scanner-panel,.barcode-photo{display:none}}

.system-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:20px}.system-card{margin:0;min-width:0}.system-card h2{font-size:19px}.system-card dl>div{display:flex;justify-content:space-between;gap:16px;padding:8px 0;border-top:1px solid #eee}.system-card dt{color:#666}.system-card dd{margin:0;font-weight:600;text-align:right;overflow-wrap:anywhere}.system-state-track{height:6px;background:#eee;border-radius:6px;margin:16px 0;overflow:hidden}.system-state-track span{display:block;height:100%;width:100%;background:#e6b900}.system-state-track.done span{background:#218344}.system-state-track.warning span{background:#df7500}.system-state-track.issue span{background:#c82c38}

.nav-external{display:block;padding:10px 12px 10px 22px;font-size:13px;line-height:1.35;min-height:44px;color:var(--ink);text-decoration:none;border-radius:3px}.nav-external:hover{background:#fff;color:var(--orange)}.nav-external:focus-visible{outline:2px solid var(--orange);outline-offset:2px}.nav-external[hidden]{display:none!important}.mobile-menu .nav-external{padding:12px 16px 12px 24px}

.system-metric-bar{margin:16px 0}.system-metric-bar label{display:flex;gap:6px;align-items:center;margin-bottom:8px;font-size:13px}.system-progress{appearance:none;-webkit-appearance:none;display:block;width:100%;height:8px;border:0;border-radius:6px;overflow:hidden;background:#e4e4e4;color:#218344;accent-color:#218344}.system-progress::-webkit-progress-bar{background:#e4e4e4;border-radius:6px}.system-progress::-webkit-progress-value{background:#218344;border-radius:6px}.system-progress::-moz-progress-bar{background:#218344;border-radius:6px}.system-progress.warning::-webkit-progress-value{background:#df7500}.system-progress.warning::-moz-progress-bar{background:#df7500}.system-progress.issue::-webkit-progress-value{background:#c82c38}.system-progress.issue::-moz-progress-bar{background:#c82c38}

.toolbar{flex-wrap:wrap}.toolbar-export{display:flex;align-items:center;justify-content:flex-end;gap:20px;margin-left:auto;flex-wrap:wrap}.toolbar-export .status-legend{border:0;padding:0;margin:0;gap:12px;display:flex;align-items:center;flex-wrap:wrap;font-size:12px}.toolbar-export .status-legend[hidden]{display:none!important}.toolbar-export .status-legend>span{white-space:nowrap}.toolbar-export #print{flex-shrink:0}@media(max-width:620px){.toolbar-export{width:100%;margin:0;justify-content:space-between;gap:12px}.toolbar-export .status-legend{flex:1;min-width:180px;font-size:11px;gap:8px 12px}.toolbar-export #print{margin-left:auto}}

/* Table status labels stay readable without wrapping; narrow screens scroll the table. */
.table-wrap td .status-badge{white-space:nowrap;flex-shrink:0}.devices-table th:nth-child(4),.devices-table td:nth-child(4){min-width:175px;white-space:nowrap}.devices-table th:nth-child(5),.devices-table td:nth-child(5){min-width:240px}

/* Shared action row: creation/search at left, PDF at right; legend on its own row. */
.toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:20px}
.toolbar>[hidden],.toolbar .status-legend[hidden]{display:none!important}
.toolbar>label,.toolbar>#newManualOrder{grid-column:1;grid-row:1}
.toolbar>#newManualOrder{justify-self:start;color:var(--orange);font-weight:700}
.toolbar>.toolbar-export{grid-column:2;grid-row:1;width:auto;margin:0;justify-content:flex-end}
.toolbar>.status-legend{grid-column:1 / -1;border:0;padding:0;margin:0;display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:12px}
.toolbar>.status-legend>span{white-space:nowrap}
.orders-page .new-order:not([open]){display:none}
.orders-page .new-order>summary{display:none}
@media(max-width:620px){.toolbar{gap:12px}.toolbar>#newManualOrder,.toolbar #print{font-size:12px;padding:10px 8px}.toolbar>.status-legend{font-size:11px;gap:8px 12px}}
@media print{.toolbar,.new-order{display:none!important}}

.devices-table table{min-width:1100px}.devices-table th:first-child,.devices-table td:first-child{min-width:245px}.devices-table td:first-child button{white-space:nowrap}.devices-table th:nth-child(2),.devices-table td:nth-child(2){min-width:150px}.devices-table th:nth-child(3),.devices-table td:nth-child(3){min-width:140px}

.catalog-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:20px}.catalog-heading h2{margin:0}.catalog-row-actions{display:flex;gap:8px;flex-wrap:wrap}.catalog-root .table-wrap table{min-width:800px}.catalog-root .catalog-wide{grid-column:1/-1;min-width:0}.catalog-form textarea{width:100%;font:inherit;padding:12px;border:1px solid #ccc;border-radius:3px;resize:vertical}.catalog-lines{border:1px solid var(--line);padding:18px;background:white;border-radius:6px}.catalog-lines h3{margin-top:0}.catalog-component-row{display:grid;grid-template-columns:minmax(0,1fr) 110px auto;gap:12px;align-items:end;margin-bottom:14px}.catalog-operation-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end;margin-bottom:14px}.catalog-composition{padding:12px 0}.catalog-composition .catalog-heading>strong{flex:1;min-width:180px}.catalog-detail{scroll-margin-top:20px}.catalog-quantity{display:inline-block;margin-left:12px;font-weight:700}.catalog-root small{color:var(--muted)}.catalog-root .bom-children{padding-left:16px;border-left:2px solid var(--line)}@media(max-width:620px){.catalog-component-row{grid-template-columns:minmax(0,1fr) 90px}.catalog-component-row>button{grid-column:1/-1;justify-self:end}.catalog-operation-row{grid-template-columns:minmax(0,1fr)}.catalog-operation-row>button{justify-self:end}.catalog-lines{padding:12px}.catalog-composition .ops-actions{gap:8px}.catalog-composition .ops-actions button{font-size:12px;padding:8px}.catalog-heading{align-items:start}}

/* Article identity and composition: content on the left, actions on the right. */
.composition-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding-bottom:22px;border-bottom:1px solid var(--line);margin-bottom:22px}.composition-identity{flex:1;min-width:0}.composition-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap;color:var(--muted);font-size:12px;margin-bottom:10px}.article-code{display:inline-flex;align-items:center;width:fit-content;padding:4px 8px;background:#f1f2f3;border:1px solid #e2e3e5;border-radius:4px;font-size:12px;font-weight:700;letter-spacing:.035em;line-height:1.4;color:#41454b;white-space:nowrap}.composition-identity h2,.composition-identity h3{margin:0;font-size:24px;line-height:1.3;overflow-wrap:anywhere}.composition-state{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:14px}.composition-revision{font-size:12px;color:var(--muted)}.composition-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;max-width:340px}.composition-actions button,.catalog-row-actions button{font-size:12px;padding:9px 12px;min-height:38px;border-radius:5px;margin:0}.composition-actions .code-link{background:#fff;color:var(--ink);border-color:#ddd}.composition-actions .code-link:hover{border-color:var(--orange);color:var(--orange)}.composition-notes{background:#f6f7f8;border-radius:6px;padding:14px 16px;color:var(--muted);font-size:13px;line-height:1.6;margin-bottom:24px}.composition-notes p{margin:0}.composition-notes p+p{margin-top:8px}.composition-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:24px 0 12px}.composition-section-heading h3{font-size:16px;margin:0}.composition-section-heading>span{font-size:12px;color:var(--muted)}.catalog-root .bom-children{border-left:0;padding-left:0}.composition-line{padding:0;border:1px solid var(--line);border-radius:6px;margin-bottom:10px;overflow:hidden}.composition-line>summary{display:flex;align-items:center;gap:14px;padding:16px;list-style:none;cursor:pointer;min-width:0;background:#fafafa}.composition-line>summary::-webkit-details-marker{display:none}.composition-line>summary::before{content:'';width:7px;height:7px;border-right:2px solid #73777d;border-bottom:2px solid #73777d;transform:rotate(-45deg);flex-shrink:0;margin-right:3px}.composition-line[open]>summary::before{transform:rotate(45deg)}.composition-line-identity{display:flex;align-items:center;gap:12px;flex-wrap:wrap;flex:1;min-width:0}.composition-line-identity strong{font-size:14px;line-height:1.5}.composition-line-quantity{flex-shrink:0}.composition-line .status-badge{font-size:12px;white-space:nowrap}.catalog-quantity{margin:0;font-size:13px}.composition-line>.catalog-composition{padding:20px;border-top:1px solid var(--line)}.composition-line .composition-identity h3{font-size:19px}.composition-operations{padding-left:24px;line-height:1.7;font-size:14px}.composition-operations li{padding:4px 0}.composition-history{border-top:1px solid var(--line);padding-top:16px;margin-top:20px;font-size:12px;color:var(--muted)}.composition-history p{margin:0 0 12px}.composition-history summary{font-weight:600}.catalog-table-identity{display:grid;gap:8px;margin-bottom:8px}.catalog-table-identity strong{font-size:14px;line-height:1.5}.catalog-table-identity+.article-code{margin-top:8px}
@media(max-width:760px){.composition-header{flex-direction:column;gap:16px}.composition-actions{max-width:none;justify-content:flex-start}.composition-identity h2{font-size:21px}.composition-line>summary{display:grid;grid-template-columns:12px minmax(0,1fr);gap:10px;padding:14px}.composition-line-identity{align-items:flex-start;flex-direction:column;gap:8px}.composition-line-quantity{grid-column:2}.composition-line>.catalog-composition{padding:16px}.composition-line .composition-identity h3{font-size:18px}}
/* Keep the full title width even in a narrow desktop content column. */
.composition-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px 24px}.composition-identity{display:contents}.composition-meta{grid-column:1/-1;margin:0}.composition-identity h2,.composition-identity h3{grid-column:1/-1;margin:0}.composition-state{margin:0;align-self:center}.composition-actions{max-width:none;align-self:center}.composition-header .status-badge{white-space:nowrap}
@media(max-width:760px){.composition-header{grid-template-columns:minmax(0,1fr);gap:14px}.composition-actions{justify-content:flex-start}.composition-state,.composition-actions{grid-column:1}}

nav>.nav-direct{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;border-top:1px solid #d2d2d2;border-radius:3px;margin-top:4px;padding:14px 10px;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;min-height:44px}.sales-dot{display:block;width:9px;height:9px;flex:0 0 9px;background:#218447;border-radius:50%;box-shadow:0 0 0 3px #21844718}.sales-dot[hidden]{display:none!important}nav>.nav-direct.active .sales-dot{box-shadow:0 0 0 2px #fff;background:#218447}

.catalog-expand-row>td{padding:0;background:#f5f6f7}.catalog-expand-row .catalog-detail{padding:24px;border-top:2px solid var(--orange);margin:0}.catalog-expand-row .catalog-composition{padding-top:0}.catalog-row-actions [aria-expanded="true"]{border-color:var(--orange);color:#b43c0e;background:#fff3ec}@media(max-width:620px){.catalog-expand-row .catalog-detail{padding:16px}}
.catalog-group-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:24px 0}
.catalog-group-tabs button{border-radius:6px;font-weight:600}
.catalog-group-tabs button[aria-pressed="true"]{background:var(--orange);color:white;border-color:var(--orange)}
.catalog-group-tabs button span,.catalog-group-heading h3 span{font-size:12px;margin-left:8px;font-weight:500}
.catalog-group{margin-top:28px}.catalog-group-heading{margin-bottom:16px}.catalog-group-heading h3{margin:0 0 8px}.catalog-group-heading p{margin:0}
.notification-dropdown-footer{display:flex;flex-direction:column;gap:8px;padding:12px 16px;border-top:1px solid #e4e4e4}
.notification-dropdown-footer button{width:100%;font-size:13px;padding:10px 12px}
.notification-dropdown-footer a{border:0!important;padding:8px 0!important}
.job-list-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:16px}
.job-list-heading h2{margin:0}.job-list-heading label{display:flex;align-items:center;gap:12px;font-size:14px}.job-list-heading select{min-width:170px;padding:10px 12px;border:1px solid #d5d5d5;border-radius:6px;background:white;font:inherit}
.job-card{border:1px solid #e0e0e0;border-radius:8px;margin-top:10px;background:#fff;overflow:hidden}
.job-card>summary{display:flex;gap:20px;align-items:center;padding:16px 20px;cursor:pointer;list-style:none}
.job-card>summary::-webkit-details-marker{display:none}.job-card>summary:after{content:'›';font-size:24px;color:#777;transform:rotate(0deg)}.job-card[open]>summary:after{transform:rotate(90deg)}
.job-card-identity{display:flex;flex-direction:column;gap:5px;flex:1;min-width:0}.job-card-identity small{color:#777}.job-card-progress{font-size:13px;color:#666;white-space:nowrap}
.job-card-content{border-top:1px solid #e4e4e4;padding:20px}.job-card[open]>summary{background:#fafafa}
@media(max-width:620px){.job-list-heading{align-items:flex-start;flex-direction:column}.job-list-heading label{width:100%;justify-content:space-between}.job-card>summary{padding:14px;gap:10px;flex-wrap:wrap}.job-card-identity{flex-basis:calc(100% - 35px)}.job-card>summary:after{margin-left:auto}.job-card-content{padding:14px}}
/* Mobile notifications are anchored to the bell, above the account row. */
@media(max-width:620px){header .notification-center{position:relative;z-index:121}.notification-dropdown{position:absolute;top:calc(100% + 4px);left:auto;right:0;width:calc(100vw - 32px);max-width:calc(100vw - 32px)}}
/* Serialized devices and internal communication share the operational visual language. */
.internal-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}.internal-form>p,.internal-form>.ops-actions,.internal-form>fieldset,.internal-form>label:has(textarea){grid-column:1/-1}.internal-form label,.message-list-tools label,.message-composer label{display:flex;flex-direction:column;gap:8px;min-width:0}.internal-form input:not([type=checkbox]),.internal-form select,.internal-form textarea,.message-composer textarea,.message-list-tools input,.message-list-tools select{width:100%;min-height:44px;box-sizing:border-box}.form-error{color:#b42318}.device-register{display:grid;gap:8px}.device-register-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(120px,.4fr);align-items:center;text-align:left;gap:18px;padding:16px;width:100%;background:#fff}.device-register-row small{display:block;margin-top:5px;color:#666}.device-register-row.selected{border-color:#ff4c00;background:#fff8f3}.device-timeline{border-left:2px solid #e4e4e4;padding-left:22px;margin:24px 0}.device-timeline article{position:relative;padding:0 0 24px}.device-timeline article:before{content:'';position:absolute;left:-29px;top:5px;width:12px;height:12px;border-radius:50%;background:#ff4c00}.device-timeline article>div{display:flex;justify-content:space-between;gap:14px}.device-timeline time,.device-timeline small{font-size:13px;color:#666}.device-timeline p{margin:8px 0}.message-workspace{display:grid;grid-template-columns:320px minmax(0,1fr);border:1px solid #ddd;background:#fff;min-height:560px}.message-list{border-right:1px solid #ddd;background:#fafafa;min-width:0}.message-list-tools{display:grid;gap:14px;padding:20px}.conversation-row{display:block;width:100%;text-align:left;padding:18px;border:0;border-top:1px solid #ddd;border-radius:0;background:transparent}.conversation-row.selected{background:#fff0e6;border-left:3px solid #ff4c00}.conversation-row>span{display:flex;justify-content:space-between;gap:8px}.conversation-row small,.conversation-row time{font-size:12px;color:#666}.conversation-row p{margin:8px 0;color:#666;font-size:13px}.conversation-unread{font-style:normal;background:#ff4c00;color:white;border-radius:12px;min-width:22px;text-align:center;padding:2px 5px;font-size:12px}.message-thread{min-width:0;display:flex;flex-direction:column}.message-thread-heading{padding:24px;border-bottom:1px solid #ddd;display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.message-thread-heading h3{margin:0}.message-thread-heading p{margin:8px 0}.message-thread-heading small{color:#666}.message-history{padding:24px;display:flex;flex-direction:column;gap:16px;max-height:560px;overflow-y:auto;flex:1}.internal-message{background:#f5f5f5;border:1px solid #e6e6e6;border-radius:10px;padding:16px;max-width:85%;align-self:flex-start;min-width:180px}.internal-message.own{align-self:flex-end;background:#fff5ed;border-color:#ffdcc4}.internal-message>div{display:flex;justify-content:space-between;gap:18px;font-size:13px}.internal-message time{color:#666;font-size:12px}.internal-message p{white-space:pre-wrap;overflow-wrap:anywhere}.message-attachment{display:block;margin-top:10px;color:#a63700;overflow-wrap:anywhere}.message-composer{border-top:1px solid #ddd;padding:24px;display:grid;gap:16px}.message-composer .ops-actions{justify-content:space-between}.message-empty{padding:28px;color:#666}.message-recipients{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.message-recipients label{flex-direction:row;align-items:center}.global-message-button{position:fixed;bottom:18px;right:18px;z-index:70;background:#fff;border:1px solid #ff4c00;box-shadow:0 4px 20px #0001;font-size:13px;padding:10px 14px}.message-workspace .ops-actions button{font-size:13px;padding:8px 12px}
@media(max-width:900px){.message-workspace{grid-template-columns:260px minmax(0,1fr)}.message-thread-heading{flex-direction:column}.device-register-row{grid-template-columns:minmax(0,1fr) auto}.device-register-row>span:last-child{grid-column:1/-1}}
@media(max-width:620px){.message-workspace{grid-template-columns:1fr}.message-list{border-right:0;border-bottom:1px solid #ddd;max-height:330px;overflow:auto}.message-list-tools{grid-template-columns:1fr 1fr;padding:14px}.message-thread-heading,.message-composer,.message-history{padding:16px}.internal-message{max-width:100%;box-sizing:border-box;min-width:0}.internal-message>div,.device-timeline article>div{flex-direction:column;gap:5px}.internal-form,.message-recipients{grid-template-columns:1fr}.device-register-row{grid-template-columns:1fr;gap:10px}.global-message-button{bottom:10px;right:10px}.message-history{max-height:480px}}
@media print{.global-message-button,.message-list,.message-composer,.message-thread-heading .ops-actions{display:none!important}.message-workspace{display:block;border:0}.message-history{max-height:none;overflow:visible}.internal-message{break-inside:avoid}}
.device-workspace{display:grid;grid-template-columns:minmax(340px,.85fr) minmax(0,1.4fr);align-items:start;gap:24px}.device-workspace>.panel{min-width:0;margin-top:0}.device-workspace .device-register{max-height:600px;overflow:auto}.device-workspace .device-register-row{grid-template-columns:1fr;gap:10px}.device-workspace .composition-header{flex-wrap:wrap}.device-workspace .ops-form{grid-template-columns:1fr}.device-workspace .device-register-row .status-badge{justify-self:start}
@media(max-width:1000px){.device-workspace{grid-template-columns:1fr}.device-workspace .device-register{max-height:330px}}
.message-recipients input[type=checkbox]{width:18px;min-height:18px;height:18px;flex:0 0 18px}.message-list{padding:0}.conversation-row p{font-weight:400;letter-spacing:normal;text-transform:none;padding:0;line-height:1.5}

/* Keep toolbar actions in separate grid rows before they can compress each other. */
.toolbar{min-width:0;grid-template-columns:minmax(0,1fr) minmax(0,auto)}
.toolbar>label,.toolbar>.toolbar-export{min-width:0}
.toolbar>#newManualOrder,.toolbar #print{white-space:nowrap}
@media(max-width:1100px){
 .toolbar{grid-template-columns:minmax(0,1fr);align-items:stretch;gap:16px}
 .toolbar>label,.toolbar>#newManualOrder{grid-column:1;grid-row:auto}
 .toolbar>.toolbar-export{grid-column:1;grid-row:auto;width:100%;justify-content:space-between;gap:16px}
 .toolbar-export .status-legend{min-width:0;flex:1 1 280px}
}
@media(max-width:620px){
 .toolbar>#newManualOrder{justify-self:stretch;width:100%;font-size:14px;padding:12px 16px}
 .toolbar>.toolbar-export{display:flex;flex-direction:column;align-items:stretch;gap:16px}
 .toolbar-export .status-legend{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));flex:none;width:100%;min-width:0;gap:12px 16px;font-size:11px;line-height:1.5}
 .toolbar-export .status-legend>span{white-space:normal;align-items:flex-start;min-width:0}
 .toolbar-export .status-legend .status-dot{margin-top:3px}
 .toolbar-export #print{width:100%;margin:0;font-size:14px;padding:12px 16px}
}

/* Recipient dropdown: one or several active accounts. */
.recipient-field{min-width:0}
.recipient-picker{min-width:0;border:1px solid #d5d5d5;border-radius:8px;background:#fff}
.recipient-picker>summary{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:14px 16px;cursor:pointer;list-style:none;font-weight:600;min-height:48px}
.recipient-picker>summary::-webkit-details-marker{display:none}
.recipient-picker>summary:focus-visible{outline:2px solid #ff4b00;outline-offset:2px;border-radius:8px}
.recipient-picker[open]>summary{border-bottom:1px solid #e5e5e5}
.recipient-menu{padding:14px;display:grid;gap:12px}
.recipient-menu .message-recipients{display:grid;grid-template-columns:minmax(0,1fr);max-height:240px;overflow:auto;gap:4px}
.recipient-menu .message-recipients label{display:flex;flex-direction:row;gap:12px;padding:10px;border-radius:6px;cursor:pointer;align-items:center}
.recipient-menu .message-recipients label:hover,.recipient-menu .message-recipients label:has(input:checked){background:#fff2e9}
.recipient-menu .message-recipients label[hidden],.recipient-menu p[hidden]{display:none}
.recipient-menu .message-recipients span{min-width:0;overflow-wrap:anywhere}
.recipient-menu .message-recipients small{display:block;font-size:12px;color:#666;margin-top:3px}
.recipient-menu button{justify-self:end}
.recipient-selected{margin:10px 0 0;overflow-wrap:anywhere;font-size:13px}

/* Keep mobile forms at the viewport scale, including Safari focus. */
@media screen and (max-width:900px){
 html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
 body,.shell,main,.content,#view{min-width:0;max-width:100%}
 input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px!important;max-width:100%;min-width:0}
 .message-workspace{min-width:0;max-width:100%}
 .message-thread-heading>div,.conversation-row>span{min-width:0;overflow-wrap:anywhere}
}
@media screen and (max-width:620px){
 .message-list-tools{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .message-list-tools>label{min-width:0}
}
/* Correzioni tracciate: stessi popup e spaziature del gestionale. */
.correction-form{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.correction-form .correction-explanation,.correction-form label:has(textarea),.correction-form .check-row,.correction-form .ops-actions{grid-column:1/-1}
.correction-form .check-row{display:flex;align-items:flex-start;gap:12px}
.correction-form .check-row input{width:auto;min-height:0;margin-top:4px;flex:none}
.correction-danger{border-color:#c62828;color:#a51d24}
.order-returns{margin:24px 0;padding:20px;background:#fafafa;border:1px solid #ddd}
.order-returns article{padding:16px 0;border-bottom:1px solid #ddd}
.order-returns article:last-of-type{border-bottom:0}
@media(max-width:620px){.correction-form{grid-template-columns:1fr}.order-returns{padding:14px}.correction-form .ops-actions{display:flex;flex-direction:column;align-items:stretch}}

.warehouse-category-filter{display:flex;flex-direction:column;gap:8px;min-width:0;align-self:stretch;justify-content:flex-end}.warehouse-category-filter>button{text-align:left;width:100%;min-height:44px;overflow-wrap:anywhere}.warehouse-category-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 20px;max-height:50vh;overflow:auto;margin:20px 0}.warehouse-category-list>label{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid var(--line);border-radius:6px;min-width:0}.warehouse-category-list input{width:20px;height:20px;min-height:0;flex:none;margin:0;accent-color:var(--orange)}.warehouse-category-list span{overflow-wrap:anywhere}@media(max-width:600px){.warehouse-category-list{grid-template-columns:1fr}}

/* Warehouse confirmation shares the legend/export action row. */
.toolbar>.toolbar-status{grid-column:1;grid-row:1;align-self:center;min-width:0;margin:0}.toolbar-status .status-badge{max-width:100%;white-space:normal;line-height:1.5}.toolbar-status .status-dot{flex-shrink:0}@media(max-width:1100px){.toolbar>.toolbar-status{grid-column:1;grid-row:auto}}

.warehouse-barcode-col{width:72px;min-width:72px;text-align:center}.warehouse-barcode-button{display:inline-flex;align-items:center;justify-content:center;width:44px;padding:8px}.warehouse-item-name{border:0;padding:0;min-height:0;text-align:left;background:transparent;line-height:1.5}.warehouse-item-name:hover{color:var(--orange);text-decoration:underline}[data-warehouse-row]{cursor:pointer}[data-warehouse-row]:hover>td{background:#fffaf6}[data-warehouse-row]:focus-visible{outline:2px solid var(--orange);outline-offset:-2px}.article-edit-toggle{margin-left:auto;color:var(--orange);font-weight:700}.article-readonly input:disabled,.article-readonly select:disabled,.article-readonly textarea:disabled{opacity:1;color:var(--ink);-webkit-text-fill-color:var(--ink);background:#f8f8f8}.article-readonly .ops-actions[hidden]{display:none!important}
.movements-table .movement-date{white-space:nowrap}
.movements-table .movement-delta{white-space:nowrap;text-align:right}
.movements-table .movement-delta strong{font-weight:750;font-variant-numeric:tabular-nums}
.movements-table th:nth-child(4){text-align:right}
.device-detail-header{display:grid;gap:16px}
.device-detail-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.device-detail-header h2{margin:0;font-size:24px;line-height:1.3;overflow-wrap:anywhere}
.device-detail-specs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 24px;margin:0;padding:18px 0;border-top:1px solid var(--line)}
.device-detail-specs div{min-width:0}
.device-detail-specs dt{font-size:12px;color:var(--muted);margin-bottom:4px}
.device-detail-specs dd{margin:0;font-size:14px;font-weight:600;overflow-wrap:anywhere}
.device-detail .device-detail-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:0 0 22px;border-bottom:1px solid var(--line);margin:0 0 22px}
.device-detail-actions button{width:100%;margin:0;font-size:13px;padding:10px 12px;min-height:44px}
.device-detail>h3{margin-top:0}
@media(max-width:480px){.device-detail-header h2{font-size:21px}.device-detail .device-detail-actions{grid-template-columns:1fr}.device-detail-meta{align-items:flex-start;flex-direction:column}}
.device-workspace>.panel:first-child>.composition-header{display:flex;flex-direction:column;gap:16px}
.device-workspace>.panel:first-child>.composition-header>div{width:100%;min-width:0}
.device-workspace>.panel:first-child>.composition-header h2{margin-bottom:8px}
.device-workspace>.panel:first-child>.composition-header p{margin:0}
.device-workspace>.panel:first-child>.composition-header .ops-actions{gap:8px}
.device-workspace>.panel:first-child>.composition-header button{font-size:13px;padding:10px 12px}

.barcode-preview svg.article-qr{width:220px;max-width:100%;margin:auto;aspect-ratio:1}

.overview-card{text-align:left;border-radius:0;min-width:0;width:100%;transition:background-color .15s,border-color .15s}.overview-card:hover{background:#fff8f4;border-color:var(--orange)}.overview-card:focus-visible{outline:2px solid var(--orange);outline-offset:3px}@media print{button.overview-card{display:block;break-inside:avoid}}

.warehouse-stock-label{padding:0;border:0;background:transparent;text-align:left;display:inline-flex;flex-direction:column;align-items:flex-start;gap:8px;cursor:pointer}.warehouse-stock-label:hover{background:transparent}.warehouse-stock-label:hover .status-badge{box-shadow:0 0 0 1px currentColor}.warehouse-stock-label:focus-visible{outline:2px solid var(--orange);outline-offset:4px}.warehouse-stock-label .status-badge{white-space:nowrap}.warehouse-threshold-distance{font-size:12px;font-weight:600;padding:4px 8px;border-radius:4px;white-space:nowrap}

@media print{button.warehouse-stock-label{display:inline-flex}}

.notification-event-link{width:100%;display:flex;align-items:flex-start;gap:16px;text-align:left;background:transparent;border:0;border-radius:0;padding:0;color:var(--ink);cursor:pointer;font:inherit}.notification-dropdown .notification-event-link{display:block}.notification-event-link:hover{background:#fff3ea}.notification-event-link:focus-visible{outline:2px solid var(--orange);outline-offset:4px}.notification-events .notification-event-link>div{flex:1;min-width:0}

.home-logo{display:flex;align-items:center;flex:0 0 auto;padding:0;border:0;border-radius:0;background:transparent;min-height:44px;line-height:0}.home-logo:hover{background:transparent}.home-logo img{display:block}

.order-summary .overview-card[aria-pressed="true"]{background:#fff8f4;border-color:var(--orange)}

/* Order detail expands in the list and uses its full width. */
.order-expanded-detail{min-width:0;width:100%;padding:24px;background:#f8f9fa;border:1px solid var(--line);border-top:3px solid var(--orange);border-radius:0 0 6px 6px;margin-top:-12px;overflow-wrap:anywhere}.order-expanded-detail>.panel{margin:0 0 20px;width:100%;min-width:0}.order-expanded-detail>.panel:last-child{margin-bottom:0}.order-expanded-detail .ops-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.order-expanded-detail .ops-form>*{min-width:0}.order-expanded-detail .ops-form input,.order-expanded-detail .ops-form select{width:100%}.order-expanded-detail .order-actions article{min-width:0}.order-expanded-detail #closeOrder{flex-shrink:0}.order-row.selected{border-radius:6px 6px 0 0}
@media(max-width:620px){.order-expanded-detail{padding:12px}.order-expanded-detail .ops-form{grid-template-columns:1fr}.order-expanded-detail>.panel{padding:16px}}
@media print{.order-expanded-detail{padding:0;border:0;background:white}}

.ops-root button[data-command="pick"]:disabled{background:#eeeeee;border-color:#d8d8d8;color:#929292;opacity:1;cursor:not-allowed;box-shadow:none}

.order-preparation-phase,.order-fulfillment-phase{margin-top:32px;border:1px solid #d8dde1;border-radius:6px;background:white;overflow:hidden}
.order-phase-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 22px;background:#f1f3f4;border-bottom:1px solid #d8dde1;border-left:4px solid var(--orange)}
.order-phase-heading :is(h2,h4){margin:0;font-size:16px;line-height:1.5}.order-phase-heading>span{font-size:12px;color:var(--muted)}
.order-checklist-scroll{overflow-x:auto;max-width:100%}.order-checklist-table{width:100%;min-width:940px;border-collapse:collapse;font-size:12px}
.order-checklist-table th{padding:14px 12px;background:#fafafa;text-align:left;font-size:11px;letter-spacing:.04em;border-bottom:1px solid #d8dde1;white-space:nowrap}
.order-checklist-table td{padding:18px 12px;vertical-align:top;border-bottom:1px solid #e3e5e7}.order-checklist-table tbody tr:last-child td{border-bottom:0}
.order-checklist-table th:first-child{width:24%}.order-checklist-name{display:block;line-height:1.6;margin-top:5px}.order-checklist-number{font-weight:700;text-align:center;font-size:15px}
.order-checklist-table .status-badge{font-size:11px;padding:6px 8px;line-height:1.5;white-space:normal}.order-checklist-table details{margin-top:12px;font-size:11px}.order-checklist-table details summary{cursor:pointer}.order-checklist-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:125px}.order-checklist-actions button{padding:9px 10px;font-size:12px;min-height:38px}
.order-fulfillment-phase{padding:0 22px 22px}.order-fulfillment-phase>.order-phase-heading{margin:0 -22px 22px}.order-fulfillment-phase>.ops-form{padding-bottom:20px;border-bottom:1px solid var(--line)}
@media(max-width:620px){.order-phase-heading{padding:14px 12px;flex-wrap:wrap;gap:6px}.order-phase-heading :is(h2,h4){font-size:14px}.order-fulfillment-phase{padding:0 12px 16px}.order-fulfillment-phase>.order-phase-heading{margin:0 -12px 16px}.order-preparation-phase,.order-fulfillment-phase{margin-top:24px}}
@media print{.order-checklist-scroll{overflow:visible}.order-checklist-table{min-width:0;font-size:9px}.order-checklist-table th,.order-checklist-table td{padding:8px 6px}.order-checklist-actions{min-width:0}.order-preparation-phase,.order-fulfillment-phase{break-inside:auto}}
.order-checklist-table td:nth-child(2){min-width:115px}.order-checklist-table td:nth-child(2) .status-badge{white-space:nowrap}.order-checklist-table .status-badge{overflow-wrap:normal;word-break:normal}

/* One surface for an expanded order; stages are separated without nested cards. */
.order-expanded-detail{background:white;padding:24px;border-left:1px solid var(--line);border-right:1px solid var(--line)}
.order-expanded-detail>.order-detail,.order-expanded-detail>.order-actions{padding:0;border:0;border-radius:0;box-shadow:none;background:transparent;min-width:0;width:100%;margin:0}
.order-expanded-detail>.order-actions{margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}
.order-expanded-detail>.order-detail h2,.order-expanded-detail>.order-actions>h2{margin-top:0}
.order-operation-body{padding:0;margin:0;border:0;background:transparent;min-width:0}
.order-operation-body>h3{margin-top:0}.order-operation-body .order-annotations{padding:20px 0 0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent}
.order-expanded-detail .order-preparation-phase,.order-expanded-detail .order-fulfillment-phase{padding:0;border:0;border-radius:0;background:transparent;margin-top:28px}
.order-expanded-detail .order-phase-heading{margin:0 0 16px;padding:14px 16px;border-bottom:0;border-radius:3px;border-left-width:3px}
.order-expanded-detail .order-checklist-scroll{border:1px solid var(--line);border-radius:4px}
.order-expanded-detail .order-fulfillment-phase>.ops-form{margin-top:16px}
@media(max-width:620px){.orders-page>.order-list{padding:12px}.order-expanded-detail{padding:16px 10px}.order-expanded-detail>.order-actions{padding-top:20px;margin-top:24px}.order-expanded-detail .order-phase-heading{padding:12px;margin:0 0 12px}.order-expanded-detail .order-preparation-phase,.order-expanded-detail .order-fulfillment-phase{margin-top:24px}.order-operation-body .order-annotations{padding:16px 0 0}}
@media print{.order-expanded-detail{padding:0;border:0}.order-expanded-detail .order-checklist-scroll{border:0}}

.overview-system-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;margin:24px 0}.overview-system-card h2{font-size:16px;line-height:1.4;margin:0 0 14px}.overview-system-card>.status-badge{display:inline-flex;margin:0 0 14px}.overview-system-card>span:not(.status-badge){display:block;margin:0;font-size:13px;line-height:1.6}.overview-system-card>small{display:block;margin-top:14px;color:var(--muted);font-size:11px}@media(max-width:1100px){.overview-system-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.overview-system-cards{grid-template-columns:1fr}}
.overview-system-card .status-done,.overview-system-card .status-done span{color:#176035}.overview-system-card .status-issue,.overview-system-card .status-issue span{color:#914000}.overview-system-card .status-urgent,.overview-system-card .status-urgent span{color:#9c1822}.overview-system-card .status-neutral,.overview-system-card .status-neutral span{color:#565656}

/* Shared page export beside notifications. */
.header-actions{display:flex;align-items:center;gap:12px;margin-left:auto}.header-actions .notification-center{margin:0}header #print{min-height:38px;padding:8px 12px;font-size:13px;white-space:nowrap}.toolbar-export:has(.status-legend[hidden]){display:none}
@media(max-width:620px){header{grid-template-columns:1fr auto}.menu-toggle{grid-column:2;grid-row:1}.header-actions{grid-column:1/-1;grid-row:2;width:100%;margin:0;justify-content:flex-end;gap:10px}header .header-actions .notification-center{margin:0}header #print{font-size:12px;padding:8px 10px}.account-bar{grid-row:3}.notification-dropdown{top:164px}}
@media print{.header-actions{display:none}}

/* Compact mobile header: navigation above, account and export below. */
header .notification-label{border:0;padding:0;letter-spacing:normal;font-size:inherit;font-weight:inherit}
@media(max-width:900px){header .notification-label{display:none}header .notification-center #notificationBell{width:44px;min-height:44px;padding:0;border:0;background:transparent;justify-content:center}header #notificationCount{min-width:28px;height:28px;border-radius:14px;line-height:28px;padding:0 6px;background:var(--orange);color:#fff}header #notificationCount:not(:empty){min-width:28px;height:28px}header .menu-toggle{width:44px;min-height:44px;padding:0;font-size:22px;line-height:1}.header-actions{gap:8px}}
@media(max-width:620px){header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 8px;padding:12px 16px;align-items:center}.home-logo{grid-column:1;grid-row:1;justify-self:start}.header-actions{grid-column:2;grid-row:1;width:auto;margin:0;gap:8px}.header-actions .menu-toggle{margin:0}header .header-actions .notification-center{margin:0}header #print{grid-column:1;grid-row:2;justify-self:start;margin:0;font-size:12px;padding:8px 10px;min-height:40px}.account-bar{grid-column:2;grid-row:2;width:auto;border:0;padding:0;margin:0;gap:8px;justify-content:flex-end}.account-bar .account-name{font-size:11px;max-width:110px;text-align:right}.account-bar button{font-size:11px;padding:8px;min-height:40px}.notification-dropdown{top:116px}}
@media(max-width:360px){header{padding:12px}.account-bar .account-name{max-width:76px}header #print{font-size:11px;padding:8px}.account-bar{gap:6px}}

@media(max-width:900px){.header-actions .notification-center{order:1}.header-actions .menu-toggle{order:2}}

/* Contabilità: tabella unica, dettagli ampi e dati fiscali riservati. */
.accounting-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;margin-bottom:24px}.accounting-metrics button{text-align:left;border-top:3px solid var(--orange,#ff4b00);padding:24px;background:white;border-radius:0;display:grid;gap:12px}.accounting-metrics strong{font-size:32px}.accounting-metrics [aria-pressed=true]{outline:2px solid #ff4b00;outline-offset:-2px}.accounting-filters{display:flex;align-items:end;gap:16px}.accounting-filters label:first-child{flex:1}.accounting-filters label{display:grid;gap:8px}.accounting-scroll{overflow-x:auto}.accounting-table{width:100%;border-collapse:collapse}.accounting-table th,.accounting-table td{padding:16px;text-align:left;vertical-align:top;border-bottom:1px solid #ddd}.accounting-table th{background:#eee;font-size:13px;text-transform:uppercase}.accounting-table small{display:block;margin-top:8px;color:#666}.accounting-order,.accounting-invoice{border:0;background:transparent;padding:0;text-align:left}.accounting-order{font-weight:700;color:#333}.accounting-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;padding:8px 0}.accounting-detail{background:#fafafa}.accounting-detail dl div{margin-bottom:12px}.accounting-detail dt{color:#666}.accounting-detail dd{margin:4px 0;overflow-wrap:anywhere}.accounting-detail h3{font-size:16px}.accounting-dialog{width:min(760px,calc(100vw - 24px));max-height:90vh;overflow:auto;border:1px solid #ddd;padding:24px;border-radius:8px}.accounting-dialog::backdrop{background:#0008}.accounting-form{display:grid;grid-template-columns:1fr 1fr;gap:16px}.accounting-form label{display:grid;gap:8px}.accounting-form input,.accounting-form select,.accounting-form textarea{width:100%;min-width:0}.accounting-wide{grid-column:1/-1}.accounting-form .accounting-confirm{display:flex;align-items:start}.accounting-confirm input{width:auto}.accounting-table td:nth-child(3){white-space:nowrap}.accounting-table a{overflow-wrap:anywhere}@media(max-width:760px){.accounting-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.accounting-filters{align-items:stretch;flex-direction:column}.accounting-table{min-width:900px}.accounting-detail-grid{grid-template-columns:1fr}.accounting-form{grid-template-columns:1fr}.accounting-dialog{padding:16px}.accounting-metrics button{padding:16px}}@media print{.accounting-table{min-width:0}.accounting-scroll{overflow:visible}.accounting-metrics,.accounting-filters,.accounting-root .ops-actions{display:none}.accounting-detail-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

@media(max-width:760px){.accounting-detail-grid{max-width:calc(100vw - 90px)}}

.accounting-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}.accounting-detail-grid button{margin-bottom:12px}

/* OTA manager layout */

.ota-manager>.software-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;padding-bottom:22px;border-bottom:1px solid var(--line)}
.ota-manager>.software-heading h2{margin-bottom:8px}.ota-manager>.software-heading>div{min-width:0}.ota-manager>.software-heading>button{flex-shrink:0}
.ota-manager .ota-toolbar{display:grid;grid-template-columns:minmax(180px,320px) auto;justify-content:start;gap:14px;align-items:end;margin:22px 0 28px}
.ota-manager .ota-toolbar label{display:grid;gap:8px;min-width:0;font-size:12px;color:var(--muted)}.ota-manager .ota-toolbar button{height:44px;white-space:nowrap}.ota-manager .ota-toolbar select{height:44px}
.ota-manager .ota-upload{border:1px solid var(--line);padding:20px;margin:20px 0;background:#fafafa}.ota-manager summary{font-weight:600;min-height:44px;line-height:24px;padding:10px 0}
.ota-manager .ota-card{margin:16px 0;padding:22px;border-top:2px solid var(--orange)}.ota-manager .ota-card .software-heading{display:flex;align-items:start;justify-content:space-between;gap:16px}.ota-manager .ota-card h3{margin:8px 0}.ota-manager .ota-state{padding:6px 10px;border-radius:4px;font-weight:600;line-height:18px;flex-shrink:0}
.ota-manager .ota-state-published{background:#e3f2e7;color:#216b37}.ota-manager .ota-state-draft{background:#eceff2;color:#505a64}.ota-manager .ota-state-testing{background:#e6eef9;color:#31577e}.ota-manager .ota-state-suspended{background:#fff1d6;color:#875a08}.ota-manager .ota-state-withdrawn{background:#f8e7e7;color:#973939}
.ota-manager .ops-actions{margin-top:16px}.ota-manager .ota-history{border-top:1px solid var(--line);margin-top:24px;padding-top:12px}.ota-manager .ota-history .ota-card{border-top:1px solid var(--line)}.ota-manager [role=alert]{color:#a52a2a}.ota-manager [role=status]{padding:12px;background:#f0f6f0}.ota-manager .ota-device{padding:12px 0;border-bottom:1px solid var(--line)}
@media(max-width:620px){.ota-manager>.software-heading{align-items:start;gap:16px;flex-wrap:wrap}.ota-manager .ota-toolbar{grid-template-columns:minmax(0,1fr) auto;width:100%;gap:10px}.ota-manager .ota-toolbar button{padding:10px 12px}.ota-manager .ota-upload .ops-form{display:grid;grid-template-columns:1fr}.ota-manager .ota-card{padding:16px}}

/* OTA upload */
.ota-manager .ota-upload-heading h3{margin:0 0 8px}.ota-manager .ota-upload-heading p{margin:0 0 22px}.ota-manager .ota-upload label{display:grid;gap:10px;min-width:0}.ota-manager .ota-upload-product{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-bottom:20px}.ota-manager .ota-upload-files{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.ota-manager .ota-upload-files>label{padding:18px;background:white;border:1px solid var(--line);border-radius:4px}.ota-manager .ota-upload-files input{width:100%;font-size:12px}.ota-manager .ota-upload-footer{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:24px}.ota-manager [data-upload-progress]{margin-top:24px}.ota-manager .ota-progress-heading{display:flex;justify-content:space-between;gap:16px;margin-bottom:10px}.ota-manager progress{display:block;width:100%;height:10px;border:0;border-radius:5px;overflow:hidden;background:#e5e5e5;accent-color:var(--orange)}.ota-manager progress::-webkit-progress-bar{background:#e5e5e5;border-radius:5px}.ota-manager progress::-webkit-progress-value{background:var(--orange);border-radius:5px}.ota-manager progress::-moz-progress-bar{background:var(--orange)}
@media(max-width:620px){.ota-manager .ota-upload-product,.ota-manager .ota-upload-files{grid-template-columns:1fr}.ota-manager .ota-upload-footer{align-items:start;flex-direction:column}.ota-manager .ota-upload-footer button{width:100%}}

/* Device diagnostics: compact registry, consistent filters and export panel. */
.diagnostics-manager{margin:28px 0;padding:24px;border:1px solid var(--line);border-top:2px solid var(--orange);background:#fff;border-radius:4px}
.diag-heading{display:flex;justify-content:space-between;align-items:start;gap:20px}.diag-heading h2{margin:7px 0 8px}.diag-heading p{margin:0}.diag-eyebrow{font-size:11px;letter-spacing:.08em;color:var(--muted);font-weight:600}.diag-heading button{flex-shrink:0;min-height:44px}
.diag-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:24px 0 16px}.diag-filters label{display:grid;gap:8px;font-size:12px;color:var(--muted);min-width:0}.diag-filters select,.diag-filters input{height:44px;width:100%;min-width:0;background:#fafafa;border:1px solid var(--line);border-radius:4px;padding:8px 10px;font:inherit;color:#222}
.diag-toolbar,.diag-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0;color:var(--muted);font-size:12px}.diag-toolbar button,.diag-pagination button{min-height:40px}.diag-pagination>div{display:flex;gap:8px}
.diag-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:4px}.diag-table{width:100%;border-collapse:collapse;margin:0;min-width:850px;font-size:12px}.diag-table th{background:#f4f4f4;text-align:left;font-weight:600;padding:12px 14px;white-space:nowrap}.diag-table td{vertical-align:middle;padding:14px;border-top:1px solid var(--line);border-bottom:0}.diag-table td>span:not(.diag-severity){display:block;color:var(--muted);font-size:11px;margin-top:5px;overflow-wrap:anywhere}.diag-table strong{font-weight:500}.diag-table td button{min-height:40px}.diag-date{white-space:nowrap;font-variant-numeric:tabular-nums}.diag-table input[type=checkbox]{width:18px;height:18px;accent-color:var(--orange)}.diag-table .diag-empty{padding:36px;text-align:center;color:var(--muted)}
.diag-severity{display:inline-block;padding:5px 8px;border-radius:4px;white-space:nowrap;font-size:11px}.diag-info{background:#ededed;color:#454545}.diag-warning{background:#fff0ce;color:#805100}.diag-error,.diag-critical{background:#f9e5e2;color:#8e2c20}.diag-critical{font-weight:700}
.diag-export{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;align-items:center;padding:22px;background:#f7f7f7;border:1px solid var(--line);border-radius:4px;margin-top:24px}.diag-export h3{margin:0 0 10px}.diag-export p{margin:7px 0;max-width:650px;line-height:1.5;font-size:12px}.diag-export-actions{display:grid;gap:10px}.diag-export-actions button{min-height:44px}.diag-export-actions button:first-child{border-color:var(--orange)}
.diag-detail,.diag-fix{margin-top:20px;padding:22px;border:1px solid var(--line);border-radius:4px}.diag-detail h3{margin:0 0 8px}.diag-detail dl{display:grid;grid-template-columns:110px minmax(0,1fr);gap:10px;font-size:12px;margin:22px 0}.diag-detail dt{color:var(--muted)}.diag-detail dd{margin:0;overflow-wrap:anywhere}.diag-detail pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f7f7f7;padding:16px;border:1px solid var(--line);font-size:12px}.diag-detail-actions{display:flex;flex-wrap:wrap;gap:10px}.diag-detail-actions button{min-height:44px}.diag-fix label{display:grid;gap:8px;max-width:500px;margin:18px 0}.diag-fix select{min-height:44px;padding:10px;border:1px solid var(--line);border-radius:4px;background:white}.diag-fix button{margin-right:10px;min-height:44px}
.diagnostics-manager [role=alert]{color:#8e2c20;padding:12px;background:#f9e5e2}.diagnostics-manager [role=status]{padding:12px;background:#f3f3f3}
@media(max-width:950px){.diag-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.diag-export{grid-template-columns:1fr}.diag-export-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.diag-export-actions button:last-child{grid-column:1/-1}}
@media(max-width:620px){.diagnostics-manager{padding:16px}.diag-filters{gap:12px}.diag-heading{gap:10px}.diag-heading h2{font-size:20px}.diag-export{padding:16px}.diag-export-actions{grid-template-columns:1fr}.diag-pagination{align-items:start;flex-direction:column}.diag-toolbar{flex-wrap:wrap}}

.diag-toolbar-actions{display:flex;gap:10px;flex-wrap:wrap}.diag-toolbar-actions [data-export-top]{border-color:var(--orange)}
/* Keep the registry header independent of the application's global header. */
.diagnostics-manager .diag-heading{height:auto;min-height:0;background:transparent;padding:0;border:0;align-items:flex-start}
.diagnostics-manager .diag-heading h2{font-size:20px;line-height:1.3;padding:0;border:0}
.diagnostics-manager .diag-heading .diag-eyebrow{border:0;padding:0;letter-spacing:.08em}

/* Read-only device activation registry, separate from OTA installation results. */
.ota-activations{margin:24px 0 32px;padding:24px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.ota-activation-counts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:20px 0}.ota-activation-counts>div{padding:18px;background:#f4f4f4;border:1px solid var(--line);border-radius:4px;display:grid;gap:6px}.ota-activation-counts strong{font-size:28px;line-height:1.1}.ota-activation-counts span{color:var(--muted);font-size:13px}
.ota-activation-filters{display:flex;flex-wrap:wrap;gap:16px;margin-bottom:16px}.ota-activation-filters label{display:grid;gap:8px;min-width:200px;font-size:12px;color:var(--muted)}.ota-activation-filters select{height:44px}
.ota-activation-table{overflow-x:auto}.ota-activation-table table{width:100%;min-width:850px;border-collapse:collapse}.ota-activation-table th{text-align:left;color:var(--muted);font-size:12px;padding:12px}.ota-activation-table td{padding:16px 12px;vertical-align:middle;border-top:1px solid var(--line)}.ota-activation-table .muted{font-size:12px;line-height:1.6}.ota-activation-status{padding:6px 10px;border-radius:4px;background:#eee;color:#444;white-space:nowrap}.ota-activation-status.active{background:#e3f2e7;color:#216b37}.ota-activation-status.pending{background:#fff0e8;color:#bb3900}.ota-activation-status.revoked{background:#f8e7e7;color:#973939}.ota-activation-status.attention{background:#fff1d6;color:#875a08}
@media(max-width:700px){.ota-activation-counts{grid-template-columns:repeat(2,minmax(0,1fr))}.ota-activation-filters label{min-width:0;flex:1}}
/* Order workflow: clear phase headers, compact facts and aligned content. */
.order-expanded-detail .order-detail{padding:0;border:0;background:transparent;margin:0;min-width:0}
.order-workspace-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:24px 0 20px}
.order-workspace-header h2{margin:4px 0;font-size:1.35rem;line-height:1.4}
.order-workspace-header p{margin:8px 0;color:#61666a}
.eyebrow{text-transform:uppercase;letter-spacing:.1em;font-size:.75rem;color:#666}
.order-workspace{display:grid;gap:12px}
.pipeline-phase{border:1px solid #dce0e2;border-radius:6px;background:#fff;min-width:0;overflow:clip}
.pipeline-phase>summary{display:flex;align-items:center;gap:12px;padding:16px;cursor:pointer;list-style:none;background:#f5f6f7;min-height:66px}
.pipeline-phase>summary::-webkit-details-marker{display:none}
.pipeline-phase>summary::after{content:'+';margin-left:auto;display:grid;place-items:center;border:1px solid #d3d8dc;border-radius:3px;background:#fff;width:28px;height:28px;flex:none;color:#525e65;font-size:18px}
.pipeline-phase[open]>summary{border-bottom:1px solid #dce0e2;background:#eef1f3}
.pipeline-phase[open]>summary::after{content:'−'}
.pipeline-phase>summary strong{font-size:14px;line-height:1.4}
.pipeline-phase>summary small{color:#276843;background:#e6f2ea;border-radius:3px;padding:4px 8px;font-size:11px;line-height:1.4}
.pipeline-number{display:inline-grid;place-items:center;border-radius:50%;background:#e3e8eb;color:#44515c;width:30px;height:30px;flex:none;font-weight:700}
.phase-complete .pipeline-number{background:#e1eee5;color:#218044}
.current-phase{border-color:#d2b9ad}
.current-phase>summary{box-shadow:inset 3px 0 var(--orange)}
.current-phase:not(.phase-complete) .pipeline-number{background:var(--orange);color:#fff}
.pipeline-phase-body{padding:20px;min-width:0}
.pipeline-phase-body>p:first-child{margin-top:0}
.pipeline-phase-body h4{font-size:14px;margin:0 0 14px;line-height:1.4}
.pipeline-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:end;margin:16px 0}
.pipeline-form-grid label,.assembly-start-form>label{display:grid;gap:7px;min-width:0}
.pipeline-form-grid input,.pipeline-form-grid textarea,.pipeline-form-grid select,.assembly-start-form select{width:100%;box-sizing:border-box}
.wide-field{grid-column:1/-1}
.pipeline-phase .table-wrap{max-width:100%;overflow:auto;border-color:#e0e4e6;border-radius:4px}
.pipeline-phase table{width:100%;border-collapse:collapse}
.pipeline-phase th{white-space:normal;background:#f1f3f4;color:#52616a;font-size:11px}
.pipeline-phase td{vertical-align:top}
.pipeline-phase tbody tr:nth-child(even){background:#fafbfb}
.pipeline-phase button,.pipeline-phase select{max-width:100%}
.pipeline-phase .ops-actions{margin-top:18px;gap:10px}
.pipeline-phase-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:20px;padding-top:18px;border-top:1px solid #e0e4e6}
.pipeline-phase-footer>span{display:grid;gap:4px;font-size:11px;color:var(--muted)}
.pipeline-phase-footer>span strong{font-size:13px;color:var(--ink)}
.pipeline-phase .pipeline-primary{background:var(--orange);border-color:var(--orange);color:#fff;font-weight:600}
.pipeline-phase .pipeline-primary:hover{background:#dc3d00;border-color:#dc3d00}
.ops-actions>.pipeline-phase-footer{flex:1 1 100%;margin-top:6px}
.pipeline-blocker{color:#9d3900;background:#fff5eb;padding:10px 12px;border-left:3px solid #d66a00;border-radius:3px}
.pipeline-blockers{background:#fff5eb;color:#7e3300;padding:14px 14px 14px 32px;border-left:3px solid #d66a00;border-radius:3px}
.pipeline-blockers li+li{margin-top:6px}
.package-checks{margin:24px 0;padding-top:20px;border-top:1px solid #dde1e4}
.order-facts{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,.8fr) minmax(0,.8fr) minmax(0,1.2fr);gap:0;margin:0 0 24px;padding:16px 0;background:#f6f7f8;border-radius:4px}
.order-facts>div{display:flex;flex-direction:column;gap:7px;padding:0 16px;min-width:0}
.order-facts>div+div{border-left:1px solid #dce1e4}
.order-facts dt{font-size:11px;color:#626d74}
.order-facts dd{margin:0;line-height:1.45;font-weight:600;overflow-wrap:anywhere}
.order-fact-total dd{font-size:21px;line-height:1.2;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.order-fact-payment dd{display:grid;justify-items:start;gap:4px}
.order-fact-payment .status-badge{margin:0;padding:3px 7px;font-size:11px}
.order-fact-note{font-size:11px;color:#716044;font-weight:400}
.ordered-lines{margin:0 0 20px}
.pipeline-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.pipeline-section-heading h4{margin:0}
.pipeline-section-heading>span{font-size:11px;color:var(--muted)}
.ordered-lines-table th:last-child,.ordered-lines-table td:last-child{width:95px;text-align:center}
.ordered-lines-table td{vertical-align:middle;padding:14px 16px}
.ordered-lines-table td strong{display:block;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.ordered-lines-table td small{display:block;margin-top:4px;color:#6a7379;font:11px ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere}
.order-line-quantity{display:inline-grid;place-items:center;background:#edf0f2;color:#34444e;border-radius:4px;min-width:32px;min-height:30px;font-weight:700;font-variant-numeric:tabular-nums}
.order-secondary{border-top:1px solid #dde1e4;margin-top:18px}
.order-secondary>summary{padding:16px 0;cursor:pointer;font-weight:600;color:#4c5961;font-size:12px}
.order-secondary-body{padding:0 0 20px}
.production-need{padding:20px 0;border-bottom:1px solid #dde1e4}
.production-need:first-child{padding-top:0}
.pipeline-job{border:1px solid #d9dee1;border-radius:4px;margin:20px 0;background:#fff}
.pipeline-job>summary{padding:16px;cursor:pointer;display:flex;flex-wrap:wrap;gap:10px;align-items:center;background:#f5f6f7}
.pipeline-job>summary small{width:100%;color:#666}
.pipeline-job-body{padding:16px}
.job-unit{padding:16px 0;border-top:1px solid #dde1e4}
.selected-unit{margin-bottom:12px;overflow-wrap:anywhere}
.order-pick-list form{display:flex;flex-wrap:wrap;gap:8px;align-items:end}
.order-pick-list label{display:grid;gap:6px}
.order-pick-list input{max-width:110px}
.package-contents caption{text-align:left;font-weight:700;padding:14px 16px;background:#fafbfb}
.shipment-summary,.availability-breakdown{display:grid;grid-template-columns:minmax(110px,1fr) 2fr;gap:12px}
.shipment-summary dd,.availability-breakdown dd{margin:0;overflow-wrap:anywhere}
.pipeline-phase-body [hidden],.pipeline-form-grid [hidden]{display:none!important}
.order-expanded-detail{min-width:0}
.pipeline-phase button:disabled{background:#f0f1f2;color:#8b8f92;border-color:#e1e3e5;cursor:not-allowed}
.text-button{border:0;text-decoration:underline;background:transparent}
.pipeline-form-grid button{justify-self:start}
@media(max-width:1100px){
 .order-facts{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:18px}
 .order-facts>div:nth-child(3){border-left:0}
}
@media(max-width:760px){
 .order-expanded-detail{padding:10px!important}.order-list{padding:12px!important}
 .order-workspace-header{padding:16px 0;gap:10px}.order-workspace-header h2{font-size:1.1rem}.order-workspace-header>button{padding:10px;flex:none}
 .order-workspace{gap:10px}.pipeline-phase>summary{padding:12px;gap:9px;min-height:62px}
 .pipeline-phase>summary small{font-size:10px;padding:3px 5px}.pipeline-phase>summary strong{font-size:13px}
 .pipeline-phase-body{padding:16px 12px}.pipeline-form-grid{grid-template-columns:1fr}
 .order-facts{margin-bottom:20px}.order-facts>div{padding:0 12px}.order-fact-total dd{font-size:20px}
 .pipeline-job-body{padding:12px}.pipeline-job>summary{padding:12px}
 .pipeline-phase td,.pipeline-phase th{padding:12px 10px}.order-pick-list{min-width:600px}
 .ordered-lines-table th:last-child,.ordered-lines-table td:last-child{width:82px;white-space:nowrap}.ordered-lines-table td strong{font-size:13px}
 .order-secondary-body>.ops-form{padding:0;border:0}.pipeline-form-grid .wide-field{grid-column:auto}
 .pipeline-section-heading{align-items:baseline}.pipeline-phase-footer{gap:10px}.pipeline-phase-footer>span{display:none}.pipeline-phase-footer>.pipeline-primary{width:100%}
}
@media(max-width:480px){
 .order-fact-client{grid-column:1/-1}.order-facts>div:nth-child(2){border-left:0}.order-facts>div:nth-child(3){border-left:1px solid #dce1e4}
 .order-fact-payment{grid-column:1/-1;padding-top:14px!important;border-top:1px solid #dce1e4;border-left:0!important;margin:0 12px}
 .order-facts>.order-fact-payment{padding-left:0;padding-right:0}.order-fact-payment dd{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
 .pipeline-phase>summary{display:grid;grid-template-columns:30px minmax(0,1fr) 28px;gap:5px 8px}.pipeline-phase>summary>strong{grid-column:2;grid-row:1;min-width:0}.pipeline-phase>summary>.pipeline-number{grid-column:1;grid-row:1/3}.pipeline-phase>summary>small{grid-column:2;grid-row:2;justify-self:start;margin-left:0}.pipeline-phase>summary::after{grid-column:3;grid-row:1/3;margin-left:0}
 .pipeline-section-heading{flex-wrap:wrap;gap:5px}.pipeline-section-heading>span{white-space:nowrap}
}
@media print{.pipeline-phase{border-color:#aaa;overflow:visible}.pipeline-phase>summary{box-shadow:none}.pipeline-phase-body{display:block}.pipeline-phase:not([open])>*{display:block}.order-workspace-header>button,.pipeline-phase button,.pipeline-phase-footer{display:none}.order-workspace{display:block}.pipeline-phase{margin-bottom:12px}}

.nda-embedded-frame{display:block;width:100%;height:calc(100dvh - 210px);min-height:440px;border:0;min-width:0;background:transparent}

/* Operational tables share the existing state palette; text remains the primary cue. */
.table-quantity{display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:30px;padding:4px 8px;border-radius:4px;font-size:13px;line-height:1.4;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.state-row-done{--row-accent:#218044;--row-tint:#f4faf6}
.state-row-pending{--row-accent:#d0a500;--row-tint:#fffdf5}
.state-row-issue{--row-accent:#d66a00;--row-tint:#fff8f0}
.state-row-urgent{--row-accent:#c92b32;--row-tint:#fff2f3}
.state-row-neutral{--row-accent:#c8d0d5;--row-tint:#fafbfc}
.state-table tbody tr>td{background:var(--row-tint,#fff)}
.state-table tbody tr>td:first-child{box-shadow:inset 3px 0 var(--row-accent,#dce1e4)}
.state-table .status-badge{margin:0;font-size:12px}
.table-cell-note{display:block;margin-top:5px;font-size:11px;line-height:1.5;color:#666}
.order-availability td:nth-child(n+2):nth-child(-n+5),.assembly-needs td:not(:first-child){vertical-align:middle}
@media(max-width:760px){.table-quantity{font-size:12px;min-width:30px;padding:4px 7px}.state-table .status-badge{font-size:11px}}
@media print{.state-table tbody tr>td{print-color-adjust:exact;-webkit-print-color-adjust:exact}.table-quantity{print-color-adjust:exact;-webkit-print-color-adjust:exact}}
.state-table th,.state-table td{overflow-wrap:normal;word-break:normal}

/* Warehouse sheet: the physical count is the primary editable value. */
.warehouse-item-dialog{width:min(740px,calc(100vw - 24px))}
.warehouse-item-dialog .edit-dialog-content{background:#fff}
.warehouse-item-identity h3{font-size:22px;line-height:1.3;margin:12px 0 6px;overflow-wrap:anywhere}
.warehouse-item-identity p{margin:0;line-height:1.5}
.warehouse-quantity-section{margin-top:22px;padding:20px;background:#f5f6f7;border-top:3px solid var(--orange)}
.warehouse-quantity-section h3,.warehouse-item-data h3{font-size:16px;margin:0 0 16px}
.warehouse-quantity-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end}
.warehouse-quantity-form label{display:grid;gap:8px;font-weight:600;font-size:13px}
.warehouse-quantity-form input,.warehouse-quantity-form select{width:100%;min-width:0;background:#fff}
.warehouse-quantity-form input{font-size:22px;font-weight:600}
.warehouse-save-quantity{background:var(--orange);border-color:var(--orange);color:#fff;font-weight:600;min-height:47px}
.warehouse-save-quantity:hover{background:#dc3d00;border-color:#dc3d00}
.warehouse-quantity-section>.muted{font-size:12px;line-height:1.5;margin:12px 0}
.warehouse-quantity-facts,.warehouse-item-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:16px 0 0}
.warehouse-quantity-facts{padding-top:16px;border-top:1px solid #dce0e2}
.warehouse-quantity-facts dt,.warehouse-item-facts dt{font-size:12px;color:var(--muted);margin-bottom:7px}
.warehouse-quantity-facts dd,.warehouse-item-facts dd{margin:0;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
.warehouse-quantity-facts dd>.status-badge{max-width:100%;white-space:normal}
.warehouse-quantity-readout{font-size:28px}
.warehouse-item-message{color:#1e763c;font-weight:600;margin:14px 0;line-height:1.5}
.warehouse-item-message:empty{display:none}
.warehouse-item-message[role=alert]{color:#b21e26}
.warehouse-item-data{margin-top:22px;padding-top:20px;border-top:1px solid #dce0e2}
.warehouse-item-data-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.warehouse-item-data-heading h3{margin:0}
.warehouse-item-data-heading button{font-size:13px;text-align:left}
.warehouse-item-data .ops-form{gap:14px}
.warehouse-item-data .ops-actions{margin-top:0}
.warehouse-item-footer{margin-top:22px;padding-top:18px;border-top:1px solid #dce0e2}
.warehouse-item-footer button{font-size:13px}
@media(max-width:560px){
 .warehouse-item-dialog .edit-dialog-content{padding:16px}
 .warehouse-item-identity h3{font-size:20px}
 .warehouse-quantity-section{padding:16px}
 .warehouse-quantity-form{grid-template-columns:1fr}
 .warehouse-quantity-form button{width:100%}
 .warehouse-quantity-facts,.warehouse-item-facts{gap:14px;grid-template-columns:1fr}
 .warehouse-item-data .ops-form{grid-template-columns:1fr}
}

.warehouse-item-dialog [hidden]{display:none!important}

.shipping-documents iframe{display:block;width:100%;height:65dvh;border:1px solid var(--line);background:#e8e8e8}.shipping-documents>.ops-actions{margin:16px 0}.shipping-documents>[role="status"]{margin:12px 0}

/* Security: compact controls and guided access methods. */
.security-root .security-panel{padding:24px;margin-bottom:20px}
.security-root .security-panel h2{font-size:18px;line-height:1.35;margin:0}
.security-root .security-panel p{font-size:14px;line-height:1.6;margin:14px 0}
.security-root .security-panel .security-note{font-size:12px;line-height:1.55;color:var(--muted)}
.security-root .security-intro p:last-child{margin-bottom:0}
.security-root .security-methods{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:20px;margin-bottom:20px}
.security-root .security-methods>.security-method{margin:0;min-width:0;display:flex;flex-direction:column}
.security-root .security-method-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:2px}
.security-root .security-method-heading .status-badge{flex:0 0 auto;margin:0}
.security-root .security-eyebrow{display:block;font-size:10px;line-height:1.5;letter-spacing:.08em;color:var(--muted);font-weight:700;margin-bottom:8px}
.security-root .security-form{display:flex;flex-direction:column;align-items:stretch;gap:16px;max-width:440px;margin:20px 0 0}
.security-root .security-form>label,.security-root .security-optional>label{display:grid;gap:8px;font-size:12px;line-height:1.5}
.security-root .security-method-form{flex:1;max-width:none;margin-top:4px}
.security-root .security-method-footer{margin-top:auto;padding-top:20px;display:flex;flex-direction:column;align-items:flex-start;gap:16px}
.security-root .security-method-footer .security-note{margin:0}
.security-root .security-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:0}
.security-root .security-actions button,.security-root .security-items button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;height:auto;padding:10px 14px;font-size:13px;line-height:18px;max-width:100%;margin:0}
.security-root button.security-primary{background:var(--orange);border-color:var(--orange);color:#fff;font-weight:700}
.security-root button:disabled{opacity:.45;cursor:not-allowed}
.security-root .security-optional{font-size:12px;line-height:1.5;margin:4px 0 0}
.security-root .security-optional summary{color:var(--muted);cursor:pointer}
.security-root .security-optional summary span{font-size:11px}
.security-root .security-optional>label{margin-top:12px;max-width:360px}
.security-root .security-steps{padding-left:20px;line-height:1.6;margin:16px 0}
.security-root .security-steps li{margin:8px 0}
.security-root .security-qr{display:block;max-width:100%;height:auto;align-self:flex-start;margin:4px 0 12px}
.security-root .security-items{padding:0;list-style:none;margin:16px 0;display:grid;gap:12px}
.security-root .security-items li{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--line)}
.security-root .security-items small{display:block;margin-top:4px;color:var(--muted);font-size:12px}
.security-root .recovery-codes{font-size:14px;line-height:1.7;white-space:pre-wrap}
.security-root label.security-check,.ops-form label.security-check{display:flex;flex-direction:row;align-items:flex-start;gap:8px;flex:0 0 auto;min-width:0;margin:0;font-size:12px;line-height:1.5;color:var(--ink)}
.security-root label.security-check input[type=checkbox],.ops-form label.security-check input[type=checkbox]{appearance:auto;width:16px;min-width:16px;max-width:16px;height:16px;min-height:16px;max-height:16px;flex:0 0 16px;align-self:flex-start;margin:1px 0 0;padding:0;accent-color:var(--orange)}
.security-check small{display:block;color:var(--muted);font-size:11px;line-height:1.5;margin-top:2px}
@media(max-width:900px){.security-root .security-methods{grid-template-columns:1fr}.security-root .security-method-footer{padding-top:16px}}
@media(max-width:620px){.security-root .security-panel{padding:20px}.security-root .security-method-heading{gap:10px}.security-root .security-method-heading h2{font-size:17px}.security-root .security-actions{width:100%}.security-root .security-actions button{width:100%}.security-root .security-items{font-size:13px}}
