/* Shared 1edge design tokens, v40. Layout and print workflows remain app-specific. */
:root{--ink:#202b3b;--muted:#718091;--paper:#f5f7fa;--line:#e0e7ed;--acid:#3b82f6;--green:#2563eb;--background:#f5f7fa;--foreground:#202b3b;--primary:#2563eb;--primary-foreground:#fff;--border:#e0e7ed;--ring:#2563eb}
body{font-family:'DM Sans',Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;background:#f5f7fa;color:#202b3b}h1,h2,h3{letter-spacing:-.5px}.primary{background:#2563eb;color:#fff;border-radius:7px;font-weight:600}.primary:hover{background:#1d4ed8}.secondary{border-color:#dfe5eb;color:#344559;border-radius:7px;font-weight:500}.primary:focus-visible,.secondary:focus-visible,a:focus-visible{outline:3px solid #60a5fa;outline-offset:3px}.sidebar{background:#111c30}.sidebar .nav{color:#a6b2c1;border-radius:7px}.sidebar .nav:hover{background:#1e2e3e;color:#fff}.sidebar .nav.active{background:#1e3556;color:#bfdbfe;box-shadow:inset 3px 0 #3b82f6}.sidebar .brand strong{color:#fff}.sidebar .brand span{color:#c1cad4}.sidebar-foot{border-color:#2b3946}.panel,.metric,.report-card,.stat{border-color:#e0e7ed;border-radius:10px;box-shadow:0 2px 6px #1b293104}.metric.dark,.stat-0{background:#152844;color:#fff}.metric.dark p,.metric.dark span{color:#c1d2eb}.metric.dark h2{color:#fff}.row-action{background:#eff6ff;color:#2563eb}.avatar{background:#dbeafe;color:#1e40af}input,select,textarea{border-color:#dce3e9;border-radius:6px}.report-icon{background:#eff6ff;color:#2563eb}.chart-group .bar-in{background:#2563eb}.chart-group .bar-out{background:#93b4ea}.shell .topbar{background:#111c30;border-color:#2b3946}.shell .topbar .product-wordmark strong{color:#fff}.shell .topbar .product-wordmark small{color:#c1cad4}.shell .profile-corner{background:#1e3556;color:#bfdbfe;border-color:#314869}.shell .master-table th{background:#f9fafc!important;color:#718091!important}.shell .tabbar [data-slot=tabs-trigger][data-state=active]{background:#eff6ff;color:#2563eb}.shell .stat{border-radius:10px}.shell .entry-dialog{border-radius:14px}.shell .primary{background:#2563eb}.shell .primary:hover{background:#1d4ed8}.shell .yarn-group-header{background:#f9fafc}.danger-button{background:#ac443c!important;color:#fff!important}button:disabled{cursor:not-allowed}button,a{touch-action:manipulation}
@media print{.shell .topbar{background:#fff;color:#000}}

@media(max-width:720px){.inventory-app main>header{display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px}.inventory-app main>header>.menu{grid-column:1;grid-row:1;margin:0}.inventory-app main>header>.header-actions{grid-column:2;grid-row:1;margin:0}.inventory-app main>header>.header-actions .avatar{display:grid}.inventory-app main>header>div:not(.header-actions){grid-column:1 / -1;grid-row:2}.inventory-app main>header>.header-actions .primary{font-size:0}}

/* One identity specification, shared by all three applications. */
.suite-brand{display:flex!important;align-items:center!important;gap:12px!important;text-decoration:none!important;letter-spacing:normal!important}
.suite-brand>img{width:40px!important;height:40px!important;min-width:40px!important;max-width:40px!important;flex:0 0 40px!important;object-fit:contain!important;border-radius:10px!important;padding:0!important;margin:0!important;background:transparent!important}
.suite-brand>.suite-wordmark{display:flex!important;flex-direction:column!important;gap:4px!important;margin:0!important;padding:0!important;line-height:1!important}
.suite-brand .suite-wordmark>strong{font-family:Arial,Helvetica,sans-serif!important;font-size:26px!important;font-weight:700!important;line-height:28px!important;letter-spacing:-.7px!important;color:#f8fafc!important;margin:0!important}
.suite-brand .suite-wordmark>span,.suite-brand .suite-wordmark>small{display:block!important;font-family:Arial,Helvetica,sans-serif!important;font-size:12px!important;font-weight:500!important;line-height:16px!important;letter-spacing:.5px!important;color:#bdc9db!important;margin:0!important;padding:0!important}
body,button,input,select,textarea{font-family:Arial,Helvetica,sans-serif}h1,h2,h3{font-family:Arial,Helvetica,sans-serif}.shell .action-icon,.shell .store-weight,.shell .balance-hint,.shell .usage-preview{background:#eff6ff;color:#1e40af}.shell .text-button, .shell .bulk-upload-button{color:#2563eb}.shell .primary{background:#2563eb}.shell .primary:hover{background:#1d4ed8}.shell .stat-0{background:#152844;border-color:#152844}.shell .stat-0 .stat-label,.shell .stat-0 p{color:#c1d2eb}.shell .tabbar [data-slot=tabs-trigger][data-state=active]{background:#eff6ff;color:#1d4ed8}.shell .profile-corner{color:#bfdbfe;background:#1e3556;border-color:#314869}.shell .yarn-group-header{background:#f8fafc}.shell .yarn-group-header .text-button{color:#2563eb}.shell .shade-table .store-weight{background:#eff6ff}.inventory-app .profit-result{background:#152844}.inventory-app .report-icon{background:#eff6ff;color:#2563eb}.inventory-app .profile-security-links .security-link{background:#f1f5f9;color:#334155;border-color:#dbe2eb}.inventory-app .metric.dark{background:#152844}.record-actions{display:inline-flex;gap:6px;align-items:center}.record-actions .icon-button{width:34px;height:34px;background:#f1f5f9;color:#475569;border:1px solid #e2e8f0}.record-actions .icon-button:hover{background:#dbeafe;color:#1d4ed8}.record-actions .delete-action:hover{background:#fef2f2;color:#b91c1c}.row-controls{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.document-card>.record-actions{border-top:0;margin:12px 0 0;padding:0;display:flex;justify-content:flex-end}.pin-confirm{display:flex;gap:8px;align-items:center;padding:12px;background:#eff6ff;border-radius:8px;color:#1e40af;font-size:13px;margin:16px 0}.delete-notice{background:#fff7ed;border:1px solid #fed7aa;padding:16px;border-radius:8px;color:#7c2d12;font-size:14px;line-height:1.6}.delete-notice p{margin-top:8px}.app .primary{background:#2563eb;color:white}.app .primary:hover{background:#1d4ed8}.app .text-button{color:#2563eb}.app .bar-pair i{background:#2563eb}.app .bar-pair i:nth-child(2){background:#93b4ea}.app .brand-dot{display:none}

.app .chart-legend span:first-child i{background:#2563eb}.app .chart-legend span:nth-child(2) i{background:#93b4ea}.inventory-app .legend .in{background:#2563eb}.inventory-app .legend .out{background:#93b4ea}.shell .page-heading>.text-button{color:#2563eb;border-color:#dbe2eb}

#flowChart .flow-selected{background:#eaf1fc;outline-color:#7898c7}#flowDetail{background:#eff4fc;color:#334e76}.inventory-app .sync-pill{background:#f1f5f9;color:#475569;border-color:#dbe2eb}
.brand-logo-settings{margin-top:24px;min-width:0}.brand-logo-settings p{font-size:14px;line-height:1.6;color:#64748b}.brand-logo-settings form>label{display:grid;gap:8px;margin:16px 0}.brand-logo-settings input{max-width:100%;width:100%}.brand-logo-preview{min-height:90px;padding:16px;background:#fff;border:1px dashed #cbd5e1;border-radius:8px;display:flex;align-items:center;color:#64748b;font-size:13px}.brand-logo-preview img{max-width:220px;max-height:90px;object-fit:contain}.brand-logo-actions{display:flex;gap:10px;flex-wrap:wrap}.document-brand{display:flex;gap:12px;align-items:center;margin:0 0 16px;font-size:16px;color:#172b4d}.document-brand img{max-width:100px;max-height:36px;object-fit:contain}.brand-logo-settings input[type=file]{padding:12px}

.barcode-brand-logo{display:block;max-width:70%;height:18px;object-fit:contain;margin:0 auto 2px}.avatar img{width:100%;height:100%;object-fit:contain;background:white;border-radius:50%;padding:3px}
[hidden]{display:none!important}
@media print{html,body,#root,.app,.shell,main,.print-document,.a4-output{background:white!important}.app-lock-shortcut,.app-lock-panel,.search-select-panel,.password-visibility,.design-pin,.brand-logo-settings{display:none!important}}

/* v43: consistent profile controls and shared brand settings. */
.suite-profile-button,.shell .suite-profile-button,.app .suite-profile-button{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 44px!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important;margin:0!important;border:1px solid #dbe2ed!important;border-radius:12px!important;background:#fff!important;color:#334155!important;box-shadow:0 1px 3px #172b4d08;text-decoration:none!important;line-height:1!important;cursor:pointer}
.suite-profile-button svg{width:20px!important;height:20px!important;flex-shrink:0}.suite-profile-button:hover{background:#eff6ff!important;color:#1d4ed8!important;border-color:#93b4ea!important}.shell .topbar .suite-profile-button{background:#1e3556!important;border-color:#314869!important;color:#dbeafe!important}.header-actions,.utility-actions{align-items:center}.brand-logo-settings{grid-column:1/-1;margin:0 0 6px;padding:24px;background:white;border:1px solid #e0e7ed;border-radius:12px;min-width:0}.brand-logo-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:20px}.brand-logo-heading h2{font-size:19px;line-height:1.3;margin:0}.brand-logo-settings p{max-width:none;margin:6px 0 0;line-height:1.5}.brand-logo-badge{font-size:11px;line-height:1.5;font-weight:600;color:#475569;background:#f1f5f9;border-radius:6px;padding:6px 9px;white-space:nowrap}.brand-logo-layout{display:grid;grid-template-columns:minmax(200px,.85fr) minmax(0,1.4fr);gap:24px;align-items:start}.brand-logo-preview{min-width:0;min-height:205px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;padding:20px;border:1px dashed #cbd5e1;background:#f8fafc;text-align:center;border-radius:10px}.brand-logo-preview img{max-width:100%;width:auto;max-height:125px;object-fit:contain}.brand-logo-preview svg{color:#94a3b8}.brand-logo-preview strong{font-size:14px;font-weight:600;color:#475569}.brand-logo-preview span{font-size:12px;line-height:1.5;color:#64748b}.brand-logo-layout form{min-width:0}.brand-logo-settings form>label{font-size:13px;color:#334155;font-weight:600;margin:0 0 8px;gap:8px}.brand-logo-settings form>label:not(:first-child){margin-top:18px}.brand-logo-settings input{box-sizing:border-box;width:100%;min-width:0;min-height:44px;padding:10px 12px;font:inherit;border:1px solid #dbe2ed;background:#fff;border-radius:8px}.brand-logo-settings input[type=file]{font-size:12px;padding:7px;overflow:hidden}.brand-logo-settings input::file-selector-button{font:600 12px Arial,sans-serif;background:#eff6ff;color:#1e40af;border:0;border-radius:5px;padding:8px 10px;margin-right:10px;cursor:pointer}.brand-logo-settings small{display:block;font-size:12px;font-weight:400;line-height:1.5;color:#64748b}.brand-logo-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:16px}.brand-logo-actions button,.brand-logo-feedback button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;margin:0!important;border-radius:8px;font:600 13px Arial,sans-serif;line-height:1.4}.brand-logo-actions .secondary,.brand-logo-feedback .secondary{border:1px solid #dbe2ed;background:#fff;color:#475569}.brand-logo-actions [data-remove]{color:#b42318}.brand-logo-actions button:disabled{opacity:.5;cursor:not-allowed}.brand-logo-feedback{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.brand-logo-feedback p{font-size:13px;overflow-wrap:anywhere;color:#365470}.brand-logo-feedback p:empty{display:none}.brand-logo-feedback p:not(:empty){margin-top:16px}.brand-logo-feedback .brand-logo-error{color:#b42318}.brand-logo-feedback [data-retry]{margin-top:12px!important}
[data-account-page] main>.brand-logo-settings{margin-top:24px}[data-account-page] .cards{align-items:stretch}[data-account-page] .cards .primary{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:12px 16px;margin-top:12px}[data-account-page] .product{min-width:0}[data-account-page] .product p{overflow-wrap:anywhere}[data-account-page] main{padding-top:32px}[data-account-page] h1{font-size:36px;letter-spacing:-1px}.profile-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.profile-grid>.panel,.profile-grid>.app-lock-panel{margin-top:0;margin-bottom:0;border-radius:12px;padding:24px;border-color:#e0e7ed}.profile-grid .panel h3,.app-lock-panel h3{font-size:18px;line-height:1.35;margin-top:0}.profile-grid .panel input:not([type=checkbox]){min-height:44px}.profile-grid .app-lock-panel button,[data-account-page] .app-lock-panel button{min-height:44px;border-color:#dbe2ed;background:#f1f5f9;color:#334155}.profile-grid .channel-tags span{background:#f8fafc;border-color:#e2e8f0}.profile-grid .channel-tags button{min-height:32px;color:#475569;border-color:#dbe2ed}.profile-label-preview{background:#f8fafc}.password-visibility{color:#64748b!important}.password-visibility:hover{color:#2563eb!important}.app .topbar:has(.save-state){justify-content:flex-end;height:72px}.app .topbar .top-right{margin-left:auto;gap:14px;display:flex;align-items:center}.save-state{font-size:12px;color:#64748b}.save-state:empty{display:none}
@media(max-width:760px){.profile-grid{grid-template-columns:minmax(0,1fr)}.brand-logo-heading{flex-direction:column;gap:8px}.brand-logo-layout{grid-template-columns:minmax(0,1fr);gap:18px}.brand-logo-settings,.profile-grid>.panel,.profile-grid>.app-lock-panel{padding:20px}.brand-logo-preview{min-height:150px}.brand-logo-preview img{max-height:95px}.brand-logo-actions{gap:8px}.brand-logo-actions button{flex:1 1 auto}.brand-logo-badge{white-space:normal}.app .topbar:has(.save-state){height:60px}[data-account-page] main{padding:24px 16px}.brand-logo-settings form>label{width:100%}}
[data-account-page] #invite{display:grid;grid-template-columns:minmax(240px,1fr) auto;align-items:end;gap:16px;margin-top:20px}[data-account-page] #invite label{min-width:0;font-size:13px;font-weight:600;color:#334155}[data-account-page] #invite input{min-height:44px;border-color:#dbe2ed;font-size:14px}[data-account-page] #invite .primary{margin:0;min-height:44px;justify-content:center}[data-account-page] #members p,[data-account-page] #invites p{max-width:none;flex-wrap:wrap;justify-content:flex-start;gap:10px}[data-account-page] #members p>span{flex:1 1 240px;min-width:0}[data-account-page] #members button,[data-account-page] #invites button{min-height:40px;border-color:#dbe2ed;color:#475569;font-size:13px}[data-account-page] #code{max-width:100%;font-size:13px;line-height:1.6;border-color:#dbe2ed}[data-account-page] main>.product,[data-account-page] .cards>.product{padding:24px;border-radius:12px;border-color:#e0e7ed}[data-account-page] .product h2{font-size:20px;margin:0 0 12px}[data-account-page] .app-lock-panel{padding:24px;border-color:#e0e7ed;border-radius:12px}
@media(max-width:700px){[data-account-page] #invite{grid-template-columns:minmax(0,1fr)}[data-account-page] #invite .primary{width:100%}[data-account-page] main>.product,[data-account-page] .cards>.product,[data-account-page] .app-lock-panel{padding:20px}}
.app .sidebar:has(.design-status) .suite-brand{margin-bottom:24px!important}@media(max-width:720px){.app .sidebar:has(.design-status) .suite-brand{margin-bottom:4px!important}}
.bulk-import-dialog{width:760px;max-width:calc(100vw - 24px);max-height:90dvh;overflow:auto}.bulk-import-dialog .modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.bulk-import-dialog .modal-body>.button{margin:16px 0}.bulk-file{display:grid;gap:8px;margin:12px 0}.bulk-file input{max-width:100%;width:100%;min-width:0;border:1px dashed #cbd5e1;padding:12px;border-radius:8px}.bulk-file-name{overflow-wrap:anywhere;font-size:13px}.bulk-preview{max-height:40vh;overflow:auto;margin-top:16px}.bulk-preview-row{display:grid;grid-template-columns:60px minmax(0,1fr) minmax(90px,.6fr);gap:12px;padding:14px 0;border-bottom:1px solid #e2e8f0;align-items:start;font-size:13px}.bulk-preview-row small{display:block;line-height:1.6;color:#64748b;margin-top:4px}.bulk-preview-row>*{overflow-wrap:anywhere;min-width:0}.bulk-preview-row.has-error{color:#b42318}.bulk-import-dialog .modal-actions{padding:16px 24px;gap:12px;flex-wrap:wrap}@media(max-width:600px){.bulk-preview-row{grid-template-columns:48px minmax(0,1fr)}.bulk-preview-row>span:last-child{grid-column:2}.bulk-import-dialog .modal-actions button{flex:1}.bulk-import-dialog .modal-head h2{font-size:20px}}
.bulk-import-dialog .modal-head{padding:20px 24px;border-bottom:1px solid #e2e8f0;color:#202b3b}.bulk-import-dialog .modal-head h2{margin:0;color:#202b3b}.bulk-import-dialog .modal-head .icon-button{flex-shrink:0}.bulk-import-dialog .bulk-file input{background:#f8fafc;border-color:#cbd5e1}.bulk-import-dialog .bulk-file input::file-selector-button{background:#eff6ff;color:#1e40af;border:0;border-radius:5px;padding:8px 10px;margin-right:8px}
/* v47: stable action sizing and compact purchase orders. */
button svg{flex-shrink:0}.actions,.dialog-actions,.row-controls{flex-wrap:wrap;gap:8px}.actions>button,.dialog-actions>button{min-height:36px;line-height:1.3;word-break:normal;overflow-wrap:normal}
#purchase .po-row-actions{flex-wrap:wrap;justify-content:flex-start;white-space:normal;gap:8px}#purchase .po-row-actions button{flex-shrink:0;max-width:none;white-space:nowrap;overflow-wrap:normal;word-break:normal;min-height:36px}#purchase thead th:first-child{width:25%}#purchase thead th:last-child{width:22%}#purchase td{vertical-align:top}#purchase .po-detail-list{max-height:320px;overflow-y:auto;overscroll-behavior:contain;padding-right:4px}#purchase .po-product-details summary{padding:7px 0;color:#1d4ed8}#purchase .po-detail-list .product-identity-card{flex-wrap:wrap;border-top:1px solid #e2e8f0;padding-top:8px}#purchase .po-detail-list .product-identity-card>div{flex:1;min-width:90px}#purchase .po-detail-list small{flex-basis:100%}#purchase .po-detail-list img,#purchase .po-detail-list .product-image-empty{width:42px;height:42px}
@media(max-width:900px){#poRows>tr>td:first-child,#poRows>tr>td:last-child{grid-column:1/-1}#purchase .po-row-actions{justify-content:flex-start}}
.app .variant-panel{background:white;border:1px solid #dbe2eb;border-radius:12px;margin:16px 0;padding:16px}.variant-heading,.variant-settings{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.variant-heading>span,.variant-settings>span{font-size:12px;color:#64748b;flex:1;min-width:140px}.variant-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.variant-tabs button{white-space:normal;overflow-wrap:anywhere;max-width:100%;min-height:38px}.variant-tabs button[aria-selected=true]{background:#eff6ff;color:#1d4ed8;border-color:#2563eb}.variant-settings{margin-top:14px;padding-top:14px;border-top:1px solid #e2e8f0}.variant-settings label{margin:0;flex:1;min-width:150px}.variant-settings input{width:100%}.variant-panel button svg{flex-shrink:0}.app .editorhead .actions{flex-wrap:wrap}.app .editorhead .actions button{white-space:nowrap}.app .variant-panel button{word-break:normal}.app .modal{max-height:90dvh;overflow-y:auto}
@media(max-width:600px){.variant-heading>strong{width:100%}.variant-settings>span{flex-basis:100%}.app .editorhead .actions{justify-content:flex-start}.app .editorhead .actions button{flex:1 1 auto}}
@media print{.variant-panel{display:none!important}}

@media(max-width:720px){.inventory-app .header-actions .primary:after{content:'+'}}
/* v55: touch forms fit the visible screen when the keyboard is open. */
@media screen and (max-width:1024px){dialog:not(.search-select-panel){max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain}.overlay .modal{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);box-sizing:border-box;overflow-y:auto}.documents-app [data-slot=select-item]{min-height:44px}.documents-app [data-slot=select-content]{max-height:min(320px,var(--radix-select-content-available-height,80dvh));overscroll-behavior:contain}}
@media screen and (pointer:coarse){input:not([type=checkbox]):not([type=radio]):not(.a4-sheet input),select:not(.a4-sheet select),textarea{font-size:16px!important}}
@media screen and (max-width:600px){[data-account-page] #members p,[data-account-page] #invites p{flex-wrap:wrap;justify-content:flex-start}[data-account-page] #members p>span{flex:1 1 100%;min-width:0;overflow-wrap:anywhere}body>header nav{flex-wrap:wrap;gap:10px}}
