/* Loaded after the retained workspace styles. Default light; explicit dark retains the original palette. */
:root{color-scheme:light;--paper:#f5f6f8;--surface:#fff;--raised:#eceef1;--hover:#e5e8ed;--ink:#22262b;--muted:#606872;--line:#d7dbe0;--silver:#454c57;--blue:#125fb1;--green:#24694f}
:root[data-theme=dark]{color-scheme:dark;--paper:#111214;--surface:#1b1d20;--raised:#272a2f;--hover:#34383e;--ink:#f1f2f4;--muted:#adb2ba;--line:#3a3e45;--silver:#d2d2d7;--blue:#0071e3;--green:#85d6b7}
.appearance-toggle{display:inline-grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink)}.appearance-toggle svg{width:21px;height:21px}.appearance-toggle:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
body,body :is(header,nav,main,section,article,aside,dialog,button,a,input,select,textarea,summary,th,td){transition:background-color 160ms ease,color 160ms ease,border-color 160ms ease}
:root:not([data-theme=dark]) body{background:var(--paper);color:var(--ink)}
:root:not([data-theme=dark]) :is(header,#adminnav,.notice,.panel,.dashpanel,.basket,.tile,.areatile,.brandtile,.product,.metrics,.tablewrap,dialog,.quick-sale,.stockpreview,.stock-result,.brand-workspace,.catalogue-card,.analytics-record,.customer-row,.variantcard,.variant-record,.settings-sections,.brand-update-text,.held-basket,.select-options,.popover,.auth){color-scheme:light;--ink:#22262b;--muted:#606872;background:var(--surface)!important;color:var(--ink);border-color:var(--line)!important;box-shadow:none!important}
:root:not([data-theme=dark]) :is(button,input,select,textarea,.select-menu summary,.directory-actions button,.form-actions button,.variant-actions button,.quick-sale a,.source-link){color-scheme:light;background:var(--raised);color:var(--ink);border-color:#c4cad2;box-shadow:none;caret-color:#125fb1}
:root:not([data-theme=dark]) :is(button:hover,.select-menu summary:hover,.settings-section>summary:hover,tbody tr:hover td){background:var(--hover)!important;color:var(--ink)}
:root:not([data-theme=dark]) :is(h1,h2,h3,h4,strong,label,summary,td,.rankrow,.attentionrow,.metric strong,.insight strong,.secondary-details>summary,.product-label,.settings-status,.source-evidence dd,.variant-actions .source-link){color:var(--ink)!important}
:root:not([data-theme=dark]) :is(p,small,.fine,.muted,.empty,.badge,.demo,#connection,.wordmark span,.brandlocation,.brandslot,.productlocation,.count,.currency,.money-currency,.variant-code,.variant-status,.variant-record-numbers small,.settings-label small,.settings-badge,.settings-savebar output,.source-evidence dt,.source-evidence summary,.customer-contact dt,.held-basket>span,.product .meta,.navicon,.navchevron,.order-steps,.summarystrip>span,.insight span,.rankrow>span:first-child,.rankrow[data-report]>span:last-child){color:var(--muted)!important}
:root:not([data-theme=dark]) :is(input::placeholder,textarea::placeholder){color:#68717d}
:root:not([data-theme=dark]) :is(th,.settings-savebar,.variant-size-badge,.size-label,.colour-label,#cashchange,.discard-warning,.chartbar,.mode-switch,.listtabs button[aria-pressed=true],.viewtabs button.active){background:var(--raised)!important;color:var(--ink)!important;border-color:var(--line)!important}
:root:not([data-theme=dark]) :is(td:last-child,th:last-child){background:var(--surface);box-shadow:-1px 0 var(--line)}
:root:not([data-theme=dark]) :is(.line,.ledger-row,.basketline,.metric,.reportinsights,.insight,.rankrow,.attentionrow,.connection,.secondary-details,.listtabs,.summarystrip,th,td,.settings-status,.settings-section,.operating-guide details,.source-evidence,.chart-empty){border-color:var(--line)!important}
:root:not([data-theme=dark]) #adminnav button{background:transparent;color:var(--muted)}
:root:not([data-theme=dark]) :is(#adminnav button.active,.mode-switch button.active){background:var(--raised)!important;color:var(--ink)!important;border-color:var(--line)}
:root:not([data-theme=dark]) :is(button.primary,button[data-report]){background:#303b49!important;color:#fff!important;border-color:#303b49!important}
:root:not([data-theme=dark]) :is(button.primary,button[data-report]):hover{background:#465467!important;color:#fff!important}
:root:not([data-theme=dark]) :is(a,.textbutton,.panel a,dialog a,.notice a,.order-steps li.complete){color:#125fb1}
:root:not([data-theme=dark]) :is(.danger,dialog .error){color:#9f2832;background:#fff0f1;border-color:#e9afb5}
:root:not([data-theme=dark]) :is(.tag,.stock){color:#235b44;background:#e4f0e8}
:root:not([data-theme=dark]) :is(.tag.draft,.unavailable,.connection>span){color:#785415;background:#f5ecd8}
:root:not([data-theme=dark]) .chartbars text{fill:#606872}:root:not([data-theme=dark]) .chartbar span{background:#74869b}
:root:not([data-theme=dark]) .product-label{background:transparent!important}
@media(prefers-reduced-motion:reduce){body,body *{transition:none!important}}
@media print{:root body, :root dialog{background:white!important;color:black!important}.appearance-toggle{display:none!important}}
body>header>.wordmark{font-family:Georgia,serif;font-size:26px;letter-spacing:-.6px;color:var(--ink)!important}body>header>.wordmark span{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.05em;font-size:11px}
body .manager-workspace-links a{color:var(--manager-muted)}body .manager-workspace-links a[aria-current=page]{color:var(--manager-ink)}
@media(min-width:851px){body[data-mode=manage] #adminnav{top:var(--workspace-nav-bottom,144px)}}
@media(max-width:600px){body>header>.wordmark{font-size:23px}}
body .manager-workspace-links a{color:var(--manager-muted)!important}body .manager-workspace-links a[aria-current=page]{color:var(--manager-ink)!important}
/* Sign-in has its own form rhythm; counter and checkout layouts stay unchanged. */
.auth{width:min(100%,460px);margin:clamp(32px,7vh,80px) auto;padding:32px;border-radius:18px}.auth h1{font-size:30px;letter-spacing:-.035em;line-height:1.18;margin:0 0 14px}.auth>p{line-height:1.6;margin:0 0 24px}.auth .badge{margin-bottom:16px}.auth #login{display:grid;gap:22px;margin:28px 0 24px}.auth #login label{display:grid;gap:9px;font-size:13px;font-weight:500;margin:0}.auth #login input{display:block;width:100%;min-height:48px;margin:0;font-size:16px;padding:12px 14px;border-radius:10px}.auth #login button{min-height:48px;margin-top:4px;border-radius:10px}.auth>p:last-child{margin-bottom:0}.auth.session-loading{max-width:460px}.auth.session-loading>p{margin-bottom:0}.auth.session-loading>button{margin:22px 0}.auth.session-loading h1{font-size:25px}.auth .error{padding:12px 14px;border:1px solid #cf9299;border-radius:10px;line-height:1.5}
@media(max-width:600px){.auth{margin:24px auto;padding:24px 20px;border-radius:16px}.auth h1{font-size:28px}.auth #login{gap:20px}}
/* Physical display navigation: six racks with two sides, eight whole tables. */
.display-entrance{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;margin:30px 0 22px;max-width:1000px}.display-entry{display:grid;grid-template-columns:1fr auto;align-items:center;gap:20px;text-align:left;padding:28px;border:1px solid var(--line);border-radius:18px;background:var(--surface);color:var(--ink);min-height:260px;box-shadow:inset 0 1px 0 #ffffff12;transform:none!important}.display-entry svg{grid-column:1/-1;width:100%;height:128px;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;color:var(--muted)}.display-entry strong{display:block;font-size:25px;letter-spacing:-.03em;font-weight:600}.display-entry small{display:block;font-size:13px;margin-top:7px;color:var(--muted)}.display-entry>b{font-size:25px;font-weight:400}.display-entry:hover{border-color:#8a949f;box-shadow:inset 0 1px 0 #ffffff24}.browse-all{display:flex;gap:24px;align-items:center;min-height:48px;padding:12px 18px;background:transparent;border:1px solid var(--line);border-radius:10px;font-size:14px}.display-racks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:28px}.display-rack{border:1px solid var(--line);border-radius:14px;padding:18px;background:var(--surface)}.display-rack h2{font-size:16px;margin:0 0 18px;letter-spacing:-.01em}.display-rack>div{display:grid;grid-template-columns:1fr 1fr;gap:10px}.display-position{display:grid;grid-template-columns:1fr auto;gap:8px;text-align:left;min-height:98px;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--raised);color:var(--ink);transform:none!important}.display-position strong{font-size:15px;font-weight:600;grid-column:1/-1}.display-position small{font-size:12px;color:var(--muted)}.display-position>span{font-size:17px;line-height:1}.display-tables{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:28px}.display-tables .display-position{min-height:130px;padding:22px}.display-entry:focus-visible,.display-position:focus-visible{outline:2px solid var(--ink);outline-offset:4px}body[data-staff-entry=true] :is(#management,#adminnav,.manager-workspace-nav){display:none!important}
@media(max-width:1100px){.display-racks{grid-template-columns:repeat(2,minmax(0,1fr))}.display-tables{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.display-entrance{gap:12px;margin-top:24px}.display-entry{min-height:220px;padding:18px;gap:12px}.display-entry svg{height:104px}.display-entry strong{font-size:22px}.display-entry small{font-size:12px;line-height:1.5}.display-racks{grid-template-columns:1fr;gap:14px}.display-tables{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.display-position{min-height:90px}.display-tables .display-position{padding:18px;min-height:115px}}
@media(max-width:370px){.display-entrance{grid-template-columns:1fr}.display-entry{min-height:190px}.display-entry svg{height:80px}}
/* Compact entry symbols identify the route without representing fixtures. */
.display-entry{min-height:172px;padding:24px;gap:20px}.display-entry svg{width:32px;height:32px;stroke-width:1.5}.display-entry strong{font-size:23px}@media(max-width:650px){.display-entry{min-height:160px;padding:20px;gap:18px}.display-entry svg{width:28px;height:28px}.display-entry strong{font-size:21px}}@media(max-width:370px){.display-entry{min-height:145px}.display-entry svg{height:28px}}
.brand-identity{position:relative;overflow:hidden}.brand-identity .brand-initials{display:grid;place-items:center;width:100%;height:100%;padding:4px}.brand-identity img{position:absolute;inset:0;background:#fff}.brand-identity img[hidden]{display:none}.brand-logo-editor{margin:24px 0;padding-block:20px;border-block:1px solid var(--line)}.brand-logo-editor label{display:grid;gap:8px;margin:16px 0}.brand-logo-editor #brand-logo-preview{width:64px;height:64px}.brand-logo-editor .brand-identity{margin:0}.brand-logo-editor #brand-logo-status{font-size:13px;margin:12px 0 0}.display-assigned{grid-column:1/-1;display:grid;gap:12px}.display-brand{display:flex;gap:10px;align-items:center;min-width:0}.display-brand .brand-identity{width:34px;height:34px;flex:0 0 34px;font-size:12px;margin:0}.display-brand>span:last-child{font-size:13px;line-height:1.4;overflow-wrap:anywhere}.display-position>span:last-child:not(.display-assigned){justify-self:end}.display-position{gap:14px}#staff-profile{display:flex;align-items:center;gap:10px;max-width:240px;min-width:0}#staff-profile .brand-identity{width:36px;height:36px;flex:0 0 36px;font-size:12px;margin:0}#staff-profile>span{font-size:13px;font-weight:500;overflow-wrap:anywhere}@media(max-width:650px){#staff-profile{max-width:180px}.display-rack>div{gap:8px}.display-position{padding:12px}.display-brand{align-items:flex-start;gap:8px}}

/* Receipts retain one layout while fresh data arrives. */
.receipt-status{min-height:20px;margin:0 0 12px;font-size:13px}.receipt-panel{min-height:120px}#refreshreceipts{min-width:145px}
/* One visual rhythm for the live sales workspace. */
body[data-mode=manage] main{padding:32px clamp(20px,3vw,48px) 56px;min-width:0}
body[data-mode=manage] #main>.grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}
body[data-mode=manage] :is(.panel,.tile,.tablewrap,.metrics){border-radius:18px;overflow:hidden}
body[data-mode=manage] .tile{padding:22px;min-width:0;align-items:stretch}
body[data-mode=manage] .tile>strong{margin-top:0;overflow-wrap:anywhere}
body[data-mode=manage] .tile>button{width:100%;margin-top:10px;border-radius:11px;min-height:44px}
body[data-mode=manage] .tile>button.section{margin-top:22px}
body[data-mode=manage] .brand-card{display:grid;grid-template-columns:52px minmax(0,1fr);column-gap:16px;text-align:left;align-content:center;min-height:118px}
body[data-mode=manage] .brand-card .brand-identity{grid-row:1/3;width:52px;height:52px;margin:0}
body[data-mode=manage] .brand-card strong{align-self:end;font-size:16px}
body[data-mode=manage] .brand-card small{grid-column:2;margin-top:5px;line-height:1.5}
body[data-mode=manage] .metrics{gap:0;border:1px solid var(--line);background:var(--surface)}
body[data-mode=manage] .metrics .panel{padding:24px;border-radius:0;border-inline-end:1px solid var(--line);font-size:13px}
body[data-mode=manage] .metrics .panel:last-child{border:0}
body[data-mode=manage] .metrics strong{font-size:clamp(24px,2.4vw,32px);font-variant-numeric:tabular-nums;line-height:1.2;white-space:nowrap}
body[data-mode=manage] .management-title{gap:24px;align-items:center;margin-bottom:28px}
body[data-mode=manage] .management-title h1{font-size:32px;margin-bottom:10px}
body[data-mode=manage] .management-title p{max-width:60ch;line-height:1.6}
body[data-mode=manage] .ledger-row{align-items:center;gap:18px;padding:18px 0}
body[data-mode=manage] .ledger-row:last-child{border-bottom:0}
body[data-mode=manage] .ledger-row>strong{white-space:nowrap;font-variant-numeric:tabular-nums}
body[data-mode=manage] .ledger-row .muted{display:block;margin-top:5px}
body[data-mode=manage] .unavailable{padding:12px 14px;border-radius:10px;font-size:12px;line-height:1.6}
body[data-mode=manage] .connection{padding:18px 0;border-bottom:1px solid var(--line)}
body[data-mode=manage] .connection:last-child{border-bottom:0;padding-bottom:0}
body[data-mode=manage] .connection p{margin:8px 0 12px}
body[data-mode=manage] .chartrow{grid-template-columns:minmax(120px,1fr) minmax(80px,2fr) minmax(100px,auto)}
body[data-mode=manage] .chartrow>strong{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
body[data-mode=manage] #management{display:none}
body[data-mode=manage] :is(button,input,select,textarea){border-radius:11px}
body[data-mode=manage] input:not([type=checkbox]){min-height:46px}
dialog{border-radius:20px;padding:28px;max-width:calc(100vw - 32px)}
dialog :is(input,select,textarea){width:100%;min-height:46px;margin-top:8px;border-radius:11px}
dialog .actions{gap:10px;justify-content:flex-end}
@media(max-width:850px){
 body>header{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:12px;padding:16px!important;min-height:0!important;height:auto!important}
 body>header>.wordmark{grid-column:1;grid-row:1}
 body>header>.appearance-toggle{grid-column:2;grid-row:1;justify-self:end}
 body>header>#staff-profile{grid-column:1;grid-row:2}
 body>header>#nav{grid-column:1/-1;width:100%;margin:0;gap:8px;flex-wrap:wrap}
 body>header>#nav button{min-height:40px;padding:9px 12px;font-size:12px}
 body[data-mode=manage] #adminnav:not([hidden]){grid-column:1/-1;width:100%;padding:8px 0 0;gap:6px;scrollbar-width:none}
 body[data-mode=manage] #adminnav button{padding:10px 14px;min-height:42px}
 body[data-mode=manage] main{padding:26px 20px 44px}
 body[data-mode=manage] .management-title{align-items:flex-start;gap:18px}
 body[data-mode=manage] .management-title h1{font-size:28px}
 body[data-mode=manage] .metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
 body[data-mode=manage] .metrics .panel{padding:20px 16px}
 body[data-mode=manage] .settings-summary{grid-template-columns:1fr}
}
@media(max-width:540px){
 body[data-mode=manage] #main>.grid{grid-template-columns:1fr;gap:14px}
 body[data-mode=manage] .panel{padding:20px}
 body[data-mode=manage] .metrics{grid-template-columns:1fr}
 body[data-mode=manage] .metrics .panel{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 20px;border-inline-end:0;border-bottom:1px solid var(--line)}
 body[data-mode=manage] .metrics strong{font-size:24px;margin:0}
 body[data-mode=manage] .management-title{flex-direction:column;margin-bottom:22px}
 body[data-mode=manage] .chartrow{grid-template-columns:minmax(0,1fr) auto;gap:10px;margin:22px 0}
 body[data-mode=manage] .chartrow .chartbar{grid-column:1/-1;grid-row:2}
 body[data-mode=manage] .ledger-row{grid-template-columns:minmax(0,1fr) auto;gap:12px}
 body[data-mode=manage] .ledger-row>div{min-width:0;overflow-wrap:anywhere}
 body[data-mode=manage] .tablewrap{border-radius:16px}
 dialog{padding:22px 20px;width:calc(100vw - 28px);max-height:calc(100dvh - 32px)}
}
@media(max-width:850px){body[data-mode=manage] #adminnav:not([hidden]){background:transparent!important}}
body[data-mode=manage] .tablewrap{overflow:auto}
/* Match the softer shared portal surfaces and controls. */
body[data-mode=manage] :is(.panel,.tile,.tablewrap,.metrics){border-radius:24px}
body[data-mode=manage] :is(button,.tile>button){border-radius:999px}
body[data-mode=manage] button.tile{border-radius:24px}
body[data-mode=manage] :is(input,select,textarea){border-radius:14px}
body[data-mode=manage] .management-title .badge{display:none}
body[data-mode=manage] .metrics .panel{border-radius:0}
body[data-mode=manage] #main button:not(.tile){border-radius:999px}
body[data-mode=manage] #main button.tile{border-radius:24px}

/* Match the approved portal preview throughout the working sales workspace. */
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-weight:400}
body[data-mode=manage] :is(h1,h2,h3,h4){font-weight:500;letter-spacing:-.025em;line-height:1.4}
body[data-mode=manage] .management-title h1{font-size:32px;font-weight:500;letter-spacing:-1px}
body[data-mode=manage] :is(.metrics strong,.ledger-row>strong,.tile strong){font-weight:500}
body[data-mode=manage] .settings-summary{align-items:start}
body[data-mode=manage] #adminnav button{border-radius:999px;font-weight:400;padding:12px 18px;line-height:1.4}
body[data-mode=manage] #adminnav button.active{font-weight:500}
body[data-mode=manage] .setup-item{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 0;border-bottom:1px solid var(--line)}
body[data-mode=manage] .setup-item p{margin:0;line-height:1.6}
body[data-mode=manage] .setup-item button{flex:none;min-height:44px}
body[data-mode=manage] .operation-note,body[data-mode=manage] .unavailable{background:var(--raised)!important;color:var(--muted)!important;border:1px solid var(--line);border-radius:16px;padding:16px 18px;margin:22px 0 0;line-height:1.7;font-size:13px}
body[data-mode=manage] .operation-note p{margin:0 0 10px}
body[data-mode=manage] .operation-note p:last-child{margin-bottom:0}
body[data-mode=manage] select,dialog select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23758089' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center;background-size:16px;padding-inline:16px 46px;line-height:1.5}
[dir=rtl] body[data-mode=manage] select,[dir=rtl] dialog select{background-position:left 16px center}
.display-entry>b,.display-position>span:last-child:not(.display-assigned){display:inline-flex;align-items:center;justify-content:center;align-self:center;line-height:1;min-width:20px}
@media(max-width:540px){body[data-mode=manage] .management-title h1{font-size:28px}body[data-mode=manage] .setup-item{gap:12px;flex-wrap:wrap}body[data-mode=manage] .operation-note{padding:16px}}
:root:is([data-theme=dark],[data-portal-theme=dark]) body .manager-workspace-links a[aria-current=page]{color:#19222b!important}
