:root{
  color-scheme:light;
  --bg:#eef1f0;
  --panel:#ffffff;
  --soft:#f5f7f7;
  --line:#dfe3e2;
  --line-strong:#cbd1cf;
  --muted:#6e7876;
  --text:#202523;
  --orange:#ff8056;
  --green:#247857;
  --accent:#787eea;
  --accent-soft:#eff0ff;
  --positive:#247857;
  --shadow:0 10px 24px rgba(30,38,35,.09);
  --ocean-light:#eef2ff;
  --ocean-dark:#dce2f5;
  --land:#ffffff;
  --land-border:#bfc7d1;
}
html[data-theme=dark]{
  color-scheme:dark;
  --bg:#151918;
  --panel:#202624;
  --soft:#282f2d;
  --line:#39413e;
  --line-strong:#4b5551;
  --muted:#a4aca9;
  --text:#f5f7f6;
  --orange:#ff956f;
  --green:#65c89e;
  --accent:#9ca1ff;
  --accent-soft:#2d3048;
  --positive:#65c89e;
  --shadow:0 12px 28px rgba(0,0,0,.26);
  --ocean-light:#27314d;
  --ocean-dark:#171d2d;
  --land:#333b3a;
  --land-border:#68716f;
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0;background:var(--bg);color:var(--text);font:16px/1.5 'DM Sans',system-ui,sans-serif;min-height:100vh}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
a{color:inherit;text-decoration:none}
button{cursor:pointer}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid color-mix(in srgb,var(--accent) 40%,transparent);outline-offset:2px}
button{min-height:40px;border:1px solid var(--line-strong);background:var(--panel);color:var(--text);border-radius:11px;padding:9px 14px}
button:hover{background:var(--soft);border-color:var(--muted)}
button.primary{background:var(--text);border-color:var(--text);color:var(--panel);font-weight:700}
button.primary:hover{opacity:.86}
button:disabled{opacity:.45;cursor:not-allowed}
small{display:block;color:var(--muted);font-size:.8125rem;margin-top:4px}

#live-sidebar{position:fixed;inset:0 auto 0 0;width:246px;background:var(--bg);border:0;padding:15px 14px 18px;display:flex;flex-direction:column;z-index:30;overflow-y:auto;transition:width .22s,transform .22s}
.sidebar-head{height:50px;display:flex;align-items:center;justify-content:space-between;padding:0 5px 0 8px}
.sidebar-head .brand{display:flex;align-items:center;gap:9px;font:800 21px/1 Manrope,sans-serif;letter-spacing:-.8px}
.sidebar-head .brand img{border-radius:9px}
#navigation{display:block;margin:22px 0 18px}
.nav-group{margin:0 0 8px}
.nav-group>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;padding:9px 11px;color:var(--muted);font-size:.75rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;cursor:pointer}
.nav-group>summary::-webkit-details-marker{display:none}
.nav-group>summary span{font-size:13px;transition:transform .2s}
.nav-group[open]>summary span{transform:rotate(180deg)}
.nav-group>a{display:flex;align-items:center;gap:11px;min-height:42px;margin:2px 0;padding:8px 11px;border-radius:10px;color:#4e5855;font-size:.9rem}
html[data-theme=dark] .nav-group>a{color:#c4cbc8}
.nav-group>a>span{width:21px;text-align:center;color:#7a8581;font-size:17px}
.nav-group>a>b{font-weight:600}
.nav-group>a:hover{background:color-mix(in srgb,var(--panel) 62%,transparent);color:var(--text)}
.nav-group>a.active{background:var(--panel);box-shadow:0 1px 3px rgba(30,40,36,.06);color:var(--text)}
.nav-group>a.active>span{color:var(--accent)}
.sidebar-bottom{margin-top:auto;padding:12px 4px 0;display:grid;gap:3px}
.sidebar-bottom>a{display:flex;gap:11px;align-items:center;padding:10px;color:var(--muted);font-size:.875rem;border-radius:9px}
.sidebar-bottom>a:hover{background:var(--panel);color:var(--text)}
.sidebar-bottom>small{padding:13px 10px 0;font-size:.7rem;letter-spacing:.08em}

.shell{margin-left:246px;padding:12px 14px 14px 0;transition:margin-left .22s}
.shell>header{height:54px;border:0;padding:0 14px 10px 0;display:flex;align-items:center;justify-content:space-between}
#mobile-menu{display:none}
.workspace-switcher{display:flex;align-items:center;gap:10px;background:var(--panel);border:1px solid var(--line);border-radius:999px;padding:7px 13px 7px 8px;min-width:190px}
.workspace-avatar{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#ffd7e2;color:#964660;font-weight:800;font-size:.78rem}
.workspace-switcher div{min-width:0;flex:1}
.workspace-switcher b{display:block;font-size:.9rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.workspace-switcher small{font-size:.68rem;margin:0;line-height:1.1}
.header-actions{display:flex;gap:8px}
.header-actions button{width:38px;height:38px;min-height:38px;padding:0;border-radius:50%;background:transparent;color:var(--muted)}
.header-actions button:hover{background:var(--panel);color:var(--text)}
.help-button{font-weight:800}

#live-main{max-width:none;min-height:calc(100vh - 80px);background:var(--panel);border:1px solid color-mix(in srgb,var(--line) 70%,transparent);border-radius:18px;padding:28px 30px 42px;overflow:hidden}
.live-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:22px}
.live-heading h1{font:750 1.8rem/1.2 Manrope,sans-serif;letter-spacing:-.045em;margin:0;color:var(--text)}
.live-heading p{color:var(--muted);font-size:.92rem;line-height:1.55;max-width:760px;margin:7px 0 0}
.live-heading>a,.live-heading .button-link{border:1px solid var(--line-strong);border-radius:999px;padding:9px 14px;font-size:.875rem;white-space:nowrap}
.period-picker{display:flex!important;flex-direction:row!important;align-items:center;gap:8px!important;margin:0!important;padding:0 0 0 12px;border:1px solid var(--line-strong);border-radius:999px;color:var(--text)!important;white-space:nowrap;background:var(--panel)}
.period-picker span{font-size:.82rem;color:var(--muted)}
.period-picker select{border:0!important;background:transparent!important;box-shadow:none!important;padding:9px 12px 9px 2px!important}
.custom-period{display:flex;align-items:end;justify-content:flex-end;gap:10px;margin:-10px 0 18px}
.custom-period[hidden]{display:none}
.custom-period label{margin:0!important;max-width:180px}

.quick-ai{display:grid;grid-template-columns:34px 1fr;gap:12px;border:1px solid var(--line-strong);border-radius:22px;padding:14px 16px;margin-bottom:28px;box-shadow:var(--shadow);background:var(--panel)}
.quick-ai-mark{font-size:26px;padding-top:4px;color:var(--text)}
.quick-ai form{min-width:0}
.ai-suggestions{display:flex;gap:9px;overflow-x:auto;padding-bottom:10px;scrollbar-width:thin}
.ai-suggestions button{min-height:38px;border-radius:12px;white-space:nowrap;text-align:left;font-size:.84rem;padding:8px 13px}
.quick-ai-input{display:flex;align-items:center;border-top:1px solid var(--line);padding-top:10px}
.quick-ai-input input{flex:1;border:0!important;background:transparent!important;padding:7px 5px!important;box-shadow:none!important;min-width:100px}
.quick-ai-input button{border-radius:50%;width:38px;height:38px;min-height:38px;padding:0;background:var(--text);color:var(--panel)}

.live-panel{background:var(--panel);border:1px solid var(--line);border-radius:15px;padding:22px;margin-bottom:18px;box-shadow:none}
.live-panel h2{font:700 1.05rem Manrope,sans-serif;margin:0 0 17px;letter-spacing:-.02em}
.live-panel p{color:var(--muted);line-height:1.65}
.live-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.live-panel label,.custom-period label{display:flex;flex-direction:column;gap:7px;margin-bottom:14px;font-size:.84rem;font-weight:600;color:var(--muted)}
.live-panel input,.live-panel select,.live-panel textarea,.custom-period input{width:100%;min-width:0;background:var(--soft);border:1px solid var(--line);color:var(--text);border-radius:10px;padding:11px 12px}
.live-panel input:focus,.live-panel select:focus,.live-panel textarea:focus{background:var(--panel);border-color:var(--accent)}
.live-panel textarea{resize:vertical;min-height:110px}
.live-panel label.check{flex-direction:row;align-items:center;font-weight:500}
.live-panel label.check input{width:18px;height:18px}
.live-panel .actions{margin-top:16px}
.live-panel .big{font:750 1.8rem Manrope,sans-serif;display:block;margin-top:10px;color:var(--text)}
.live-panel.net{border-color:color-mix(in srgb,var(--accent) 40%,var(--line));background:var(--accent-soft)}
.actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}

.revenue-hero{border:1px solid var(--line);border-radius:15px;padding:23px 20px;margin-bottom:18px}
.metric-label{font-weight:700;font-size:.92rem}
.metric-label small{display:inline;font-weight:500;margin-left:5px}
.revenue-hero>strong{display:block;font:500 clamp(2.8rem,6vw,4.8rem)/1.08 Manrope,sans-serif;letter-spacing:-.065em;margin:9px 0 18px}
.revenue-bar{height:54px;border-radius:10px;overflow:hidden;display:flex;background:var(--soft)}
.revenue-bar i:nth-child(1){background:#e4e6ff}
.revenue-bar i:nth-child(2){background:#bec2ff}
.revenue-bar i:nth-child(3){background:#9298f3;flex:none}
html[data-theme=dark] .revenue-bar i:nth-child(1){background:#40446d}
html[data-theme=dark] .revenue-bar i:nth-child(2){background:#585d94}
html[data-theme=dark] .revenue-bar i:nth-child(3){background:#787eea}
.revenue-legend{display:flex;gap:24px;flex-wrap:wrap;margin-top:14px;font-size:.84rem;font-weight:600}
.revenue-legend span{display:flex;align-items:center;gap:7px}
.revenue-legend i{width:10px;height:10px;border-radius:50%;background:#e4e6ff}
.revenue-legend span:nth-child(2) i{background:#bec2ff}
.revenue-legend span:nth-child(3) i{background:#9298f3}
.overview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-bottom:22px}
.metric-card{min-height:160px;border:1px solid var(--line);border-radius:15px;padding:20px;display:flex;flex-direction:column}
.metric-card>span{font-weight:700;font-size:.9rem;display:flex;justify-content:space-between}
.metric-card>span b{display:grid;place-items:center;width:18px;height:18px;border:1px solid var(--muted);border-radius:50%;font-size:.68rem;color:var(--muted)}
.metric-card>strong{font:500 clamp(2rem,4vw,3.2rem)/1 Manrope,sans-serif;letter-spacing:-.055em;margin:auto 0 5px}
.metric-card>small{font-size:.78rem}

.line-editor{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:10px;align-items:end;border-bottom:1px solid var(--line);padding:12px 0}
.line-editor label{margin:0}
.line-dimensions{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.material-library{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:14px}
.material-choice{min-height:230px;padding:13px;text-align:left;border-radius:14px;display:flex;flex-direction:column;align-items:stretch;background:var(--panel)}
.material-choice:hover{border-color:var(--accent);transform:translateY(-2px);box-shadow:0 8px 18px rgba(35,42,39,.08)}
.material-picture{display:grid;place-items:center;width:100%;aspect-ratio:1.45;border-radius:10px;margin-bottom:12px;background-color:var(--soft);background-image:url('/assets/material-atlas-transparent.png');background-repeat:no-repeat;background-size:400% 400%;background-position:var(--mx,0) var(--my,0);font-size:2rem;color:var(--accent)}
.material-picture.has-image{background-image:none;overflow:hidden}
.material-picture img{width:100%;height:100%;object-fit:contain}
.material-choice b{font-size:.9rem}
.material-choice small{flex:1}
.material-choice>span:last-child{margin-top:10px;color:var(--accent);font-size:.76rem;font-weight:700}
.custom-material .material-picture{background-image:none;border:1px dashed var(--line-strong)}
.quick-material-form{margin-top:20px;padding-top:20px;border-top:1px solid var(--line)}
.quick-material-form[hidden]{display:none}
.tax-country-select{width:min(360px,100%);margin:0 0 20px}
.tax-country-select label{display:flex;flex-direction:column;gap:7px;color:var(--muted);font-size:.84rem;font-weight:700}
.tax-country-select select{width:100%;background:var(--soft);border:1px solid var(--line);color:var(--text);border-radius:10px;padding:11px 12px}
.tax-country-select option{background:var(--panel);color:var(--text)}
.marketplace-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:20px}
.overview-actions{display:flex;align-items:flex-end;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.sample-data-banner{display:flex;align-items:center;gap:14px;margin:0 0 18px;padding:12px 14px;border:1px solid color-mix(in srgb,var(--accent) 28%,var(--line));border-radius:12px;background:color-mix(in srgb,var(--accent) 7%,var(--panel))}
.sample-data-banner span{flex:0 0 auto;padding:5px 8px;border-radius:7px;background:var(--accent);color:#fff;font-size:.69rem;font-weight:800;letter-spacing:.08em}
.sample-data-banner p{margin:0;color:var(--muted);font-size:.86rem;line-height:1.45}
.marketplace-card{display:flex;flex-direction:column;min-height:290px;border:1px solid var(--line);border-radius:16px;background:var(--panel);padding:20px}
.market-logo{height:64px;display:flex;align-items:center;margin-bottom:22px;font-weight:800}
.marketplace-body{display:flex;flex:1;flex-direction:column}
.marketplace-title{display:flex;align-items:center;justify-content:space-between;gap:10px}
.marketplace-title h2{font:750 1.1rem Manrope,sans-serif;margin:0}
.marketplace-body p{color:var(--muted);font-size:.88rem;line-height:1.55;flex:1}
.connection-status{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:5px 9px;font-size:.73rem;font-weight:700;white-space:nowrap}
.connection-status:before{content:'';width:7px;height:7px;border-radius:50%;background:currentColor}
.connection-status.connected{background:#e8f6ef;color:#247857}
.connection-status.waiting{background:#f1f2f2;color:#697370}
html[data-theme=dark] .connection-status.connected{background:#244338;color:#78d3ad}
html[data-theme=dark] .connection-status.waiting{background:#343b38;color:#b4bdb9}
.live-empty,.empty{border:1px dashed var(--line-strong);border-radius:14px;padding:34px;color:var(--muted);line-height:1.7;text-align:center}
.chip{display:inline-block;border:1px solid var(--line);padding:5px 10px;border-radius:20px;font-size:.78rem;color:var(--muted);background:var(--soft)}
.chat-area{max-width:1000px;margin:auto}
.assistant-mark{color:var(--accent);font-size:35px}
.chat-prompt{position:sticky;bottom:14px;box-shadow:var(--shadow)}
.live-panel .message{white-space:pre-wrap}
.error-box{border:1px solid #d79582;background:#fff1ec;padding:13px;border-radius:10px;color:#783b2b;margin:14px 0;line-height:1.55}
html[data-theme=dark] .error-box{background:#492c25;color:#ffd7ca}
.success-box{padding:14px;border:1px solid #75b99e;border-radius:10px;color:var(--green);background:#edf9f4}
#live-toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);padding:13px 20px;background:var(--text);color:var(--panel);border-radius:999px;z-index:100;display:none;max-width:90vw}
.compact-order{display:flex;align-items:center;gap:15px;justify-content:space-between;padding:13px 0;border-bottom:1px solid var(--line)}
.compact-order:last-child{border-bottom:0}
.compact-order small{font-size:.78rem}
.role-permissions{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px}
.role-permissions label{margin:0;font-size:.8rem}
.muted{color:var(--muted)}
details:not(.nav-group)>summary{cursor:pointer;padding:11px 0;font-weight:650;list-style-position:inside}
pre{white-space:pre-wrap;word-break:break-word;font-size:.8rem}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px}
table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap}
th{background:var(--soft);color:var(--muted);font-size:.74rem;text-transform:uppercase;letter-spacing:.04em;font-weight:700;padding:12px 15px}
td{padding:15px;border-bottom:1px solid var(--line);font-size:.875rem}
td small{font-size:.75rem}
tbody tr:hover{background:var(--soft)}
.invoice-line.live-panel{background:var(--soft)}


#mobile-menu{display:none}
.globe-panel,.destination-panel,.panel{background:var(--panel)!important;border-color:var(--line)!important}
.globe-stage{background:var(--soft)!important}
.globe-stage .country-shape{fill:var(--land);stroke:var(--land-border);stroke-width:.6;stroke-linejoin:round}
.globe-stage #graticule{fill:none;stroke:color-mix(in srgb,var(--land-border) 55%,transparent);stroke-width:.65}
.globe-stage #globe-borders{fill:none;stroke:var(--land-border);stroke-width:.55}

@media(max-width:900px){
  #live-sidebar{transform:translateX(-100%);width:246px;box-shadow:var(--shadow)}
  #live-sidebar.open{transform:translateX(0)}
  .shell{margin-left:0;padding:8px}
  .shell>header{padding:0 6px 8px}
  #mobile-menu{display:block;width:38px;height:38px;min-height:38px;padding:0;border:0;background:transparent}
  #live-main{padding:22px 18px 34px;border-radius:16px}
  .overview-grid{grid-template-columns:1fr}
  .marketplace-grid{grid-template-columns:1fr}
}
@media(max-width:640px){
  .workspace-switcher{min-width:0;max-width:210px}
  .header-actions button:not(#theme){display:none}
  .live-heading{flex-direction:column}
  .live-heading .period-picker{width:100%;justify-content:space-between}
  .quick-ai{grid-template-columns:1fr}
  .quick-ai-mark{display:none}
  .ai-suggestions button{font-size:.78rem}
  .revenue-hero{padding:18px 15px}
  .revenue-hero>strong{font-size:2.7rem}
  .revenue-bar{height:42px}
  .revenue-legend{gap:10px 17px}
  .metric-card{min-height:135px;padding:17px}
  .line-editor{grid-template-columns:1fr 1fr}
  .line-dimensions{grid-template-columns:1fr 1fr}
  .live-grid{grid-template-columns:1fr}
  .custom-period{display:grid;grid-template-columns:1fr 1fr}
  .custom-period button{grid-column:1/-1}
  .compact-order{align-items:flex-start;flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation-duration:.01ms!important}}

/* Overview keeps the complete financial summary above secondary tools. */
#live-main[data-page=overview]{display:flex;flex-direction:column}
[data-page=overview]>.live-heading{order:0;margin-bottom:12px}
[data-page=overview]>.sample-data-banner{order:1;margin-bottom:10px;padding:7px 10px}
[data-page=overview]>.custom-period{order:2}
[data-page=overview]>#metrics{order:3}
[data-page=overview]>#market-sales{order:4}
[data-page=overview]>#market-detail{order:5}
[data-page=overview]>.quick-ai{order:6;margin-top:18px}
[data-page=overview]>#missing{order:7}
[data-page=overview] .revenue-hero{padding:14px 18px;margin-bottom:12px}
[data-page=overview] .revenue-hero>strong{font-size:2.7rem;margin:5px 0 9px}
[data-page=overview] .revenue-bar{height:12px}
[data-page=overview] .revenue-legend{margin-top:8px;gap:16px}
[data-page=overview] .overview-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}
[data-page=overview] .metric-card{min-height:105px;padding:12px 14px}
[data-page=overview] .metric-card>strong{font-size:1.9rem;margin:10px 0 3px}
#market-sales h2{font-size:1rem;margin:0 0 10px}
.sales-market-grid,.product-card-grid,.variant-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.sales-market-card{text-align:left;padding:14px;display:flex;flex-direction:column;gap:4px}
.sales-market-card strong{font-size:1.55rem;font-weight:650}
.market-name{font-weight:700}
.market-open{font-size:.8rem;color:var(--accent);margin-top:6px}
.sales-market-card[aria-pressed=true],.product-select-card[aria-expanded=true]{border-color:var(--accent);background:var(--accent-soft)}
#market-detail:not(:empty){margin-top:16px}
.product-select-card{display:flex;align-items:center;gap:12px;text-align:left;min-height:92px;padding:14px}
.product-select-card>span:nth-last-child(2){flex:1;min-width:0}
.product-select-card b{font-size:.9rem;line-height:1.4}
.product-select-card img,.product-symbol{width:44px;height:44px;flex-shrink:0;object-fit:contain;border-radius:8px;background:var(--soft)}
.product-symbol{display:grid;place-items:center;color:var(--accent);font-size:1.7rem}
#variant-cards{border-top:1px solid var(--line);margin-top:18px;padding-top:14px}
#variant-cards h3{font-size:.95rem;margin:0 0 12px}
.variant-select-card{display:block;border:1px solid var(--line);border-radius:10px;padding:14px;background:var(--soft)}
.variant-select-card:hover{border-color:var(--accent)}
.variant-select-card b{font-size:.9rem}
.material-picture{width:128px;height:128px;aspect-ratio:1;align-self:center;flex-shrink:0}
.material-picture img{display:block;max-width:100%;max-height:100%;object-fit:contain}
.material-placeholder{background-image:none}
.material-choice{min-height:220px}
@media(max-width:1000px){.product-card-grid,.variant-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
 [data-page=overview] .overview-grid,.sales-market-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .product-card-grid,.variant-card-grid{grid-template-columns:1fr}
 [data-page=overview] .metric-card>strong{font-size:1.5rem}
 .sample-data-banner{flex-wrap:wrap;gap:4px}
}

/* A single portrait card size across catalog, recipes, stock and returns. */
.catalog-grid,.product-card-grid,.variant-card-grid{display:grid;grid-template-columns:repeat(auto-fill,154px);gap:12px;align-items:start}
.catalog-card,.product-select-card.catalog-card,.variant-select-card.catalog-card{width:154px;height:220px;min-height:220px;padding:12px;border:1px solid var(--line);border-radius:14px;display:flex;flex-direction:column;align-items:stretch;gap:7px;text-align:left;background:var(--panel);overflow:hidden}
.catalog-card:hover{border-color:var(--accent);background:var(--accent-soft)}
.catalog-card[aria-pressed=true],.catalog-card[aria-expanded=true]{border:2px solid var(--accent);padding:11px;background:var(--accent-soft)}
.catalog-image,.catalog-card .product-symbol,.catalog-card>img{width:128px;height:92px;min-height:92px;object-fit:contain;border-radius:9px;background:var(--soft);align-self:center}
.catalog-placeholder{display:grid;place-items:center;font-size:2rem;color:var(--accent)}
.catalog-card b{font-size:14px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.catalog-card small{font-size:12px;line-height:1.35;margin:0}
.catalog-card .material-picture{width:100px;height:100px;margin:0 auto}
.catalog-card>span:last-child,.catalog-card .stock-count{margin-top:auto;font-size:13px}
.catalog-card .stock-count{color:var(--positive)}
.product-select-card>span:nth-last-child(2){flex:initial}
.picker-variants:not(:empty){border-top:1px solid var(--line);padding-top:14px;margin:16px 0}
.card-picker{grid-column:1/-1;margin-bottom:18px}
#return-picker-slot{grid-column:1/-1}
#recipe-line-editor:not(:empty){background:var(--soft);border-radius:12px;padding:18px;margin-top:18px}
#variant-box-form{margin-bottom:16px}
[data-page=products]>.quick-ai,[data-page=orders]>.quick-ai,[data-page=finished]>.quick-ai,[data-page=returns]>.quick-ai{display:none}
.order-status-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:14px}
.status-tile{text-align:left;padding:16px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.status-tile strong{font-size:1.8rem}
.status-new{background:#fff0ed;color:#983e35}
.status-preparing{background:#fff7dc;color:#806013}
.status-shipped{background:#eaf7ef;color:#246544}
html[data-theme=dark] .status-new{background:#412b29;color:#ffb3a6}
html[data-theme=dark] .status-preparing{background:#403922;color:#efcf74}
html[data-theme=dark] .status-shipped{background:#203d30;color:#87d6a9}
.status-tile[aria-pressed=true]{border:2px solid currentColor}
.order-filter-bar{display:flex;align-items:center;gap:14px;margin-bottom:14px}
.order-record{border:1px solid var(--line);border-radius:12px;margin-bottom:12px;padding:14px}
.order-record-head{display:flex;align-items:center;flex-wrap:wrap;gap:14px;font-size:13px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.order-record-head>span:first-child{margin-right:auto}
.status-label{padding:4px 8px;border-radius:6px;font-size:12px}
.channel-mark{display:inline-grid;place-items:center;width:23px;height:23px;border-radius:5px;background:var(--soft);font-weight:800}
.order-item{display:flex;justify-content:space-between;gap:16px;padding:12px 0}
.order-item p{font-size:13px;margin:5px 0}
.order-item a,.order-record-head a{text-decoration:underline;text-underline-offset:3px}
.order-record-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.customer-open{border:0;padding:5px 0;color:var(--accent);background:transparent}
.customer-drawer{position:fixed;right:0;top:0;bottom:0;width:min(380px,100vw);background:var(--panel);z-index:60;padding:26px;box-shadow:-16px 0 48px #0002;overflow:auto;border-left:1px solid var(--line)}
.customer-drawer[hidden]{display:none}
#close-customer{float:right}
.customer-drawer h2{margin-top:58px}
.customer-drawer dt{font-weight:700;margin-top:22px;color:var(--muted)}
.customer-drawer dd{margin:7px 0;overflow-wrap:anywhere}
[data-page=globe] .globe-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:18px}
[data-page=globe] .globe-heading{display:flex;justify-content:space-between;align-items:center;padding:16px 18px 0;gap:10px}
[data-page=globe] .globe-heading h2{font-size:18px;margin:6px 0}
[data-page=globe] .globe-stage{height:clamp(240px,calc(100dvh - 335px),440px);min-height:0;display:flex;justify-content:center;overflow:hidden}
[data-page=globe] .globe-stage svg{display:block;width:100%;height:100%;touch-action:none;cursor:grab}
[data-page=globe] .globe-controls{padding:8px 14px;display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}
[data-page=globe] .globe-controls button{font-size:12px;padding:6px 9px;min-height:32px}
[data-page=globe] .globe-hint,[data-page=globe] .map-credit{font-size:12px;text-align:center;margin:6px 10px;color:var(--muted)}
[data-page=globe] .destination-panel{padding:16px;align-self:stretch}
[data-page=globe] .destination-panel h2{font-size:18px;margin:0}
[data-page=globe] .destination-panel p{font-size:13px;color:var(--muted)}
[data-page=globe] .location-detail{background:var(--soft);padding:12px;border-radius:10px;margin:12px 0}
[data-page=globe] .location-detail strong{display:block;font-size:21px}
[data-page=globe] .location-detail>span{font-size:11px}
[data-page=globe] .destination-list{max-height:280px;overflow:auto}
[data-page=globe] .destination{display:flex;align-items:center;gap:9px;width:100%;border:0;border-bottom:1px solid var(--line);border-radius:0;text-align:left;padding:9px 3px}
[data-page=globe] .destination-value{margin-left:auto}
[data-page=globe] .destination b{font-size:13px}
[data-page=globe] .destination small{font-size:12px}
[data-page=globe]>.live-panel{margin-top:14px;padding:12px 16px}
[data-page=globe]>.live-panel h2{margin:0 0 6px}
[data-page=globe]>.live-panel p{font-size:12px;margin:4px 0}
@media(max-width:700px){[data-page=globe] .globe-layout{grid-template-columns:1fr}[data-page=globe] .globe-stage{height:300px}[data-page=globe] .destination-list{max-height:180px}.status-tile{padding:10px;flex-direction:column;gap:4px}.status-tile span{font-size:12px}.catalog-grid,.product-card-grid,.variant-card-grid{grid-template-columns:repeat(auto-fill,154px);gap:8px}}
[data-page=globe] .globe-stage{height:clamp(190px,calc(100dvh - 465px),300px)}
[data-page=globe] .destination-list{max-height:210px}
[data-page=globe] .globe-heading{padding-top:12px}
[data-page=globe] .panel-head{padding:0}
[data-page=globe] .globe-level-bar{padding:10px 18px 0}
#customer-drawer{left:auto;right:0;transform:none;display:block}
#customer-drawer[hidden]{display:none}
#customer-drawer #close-customer{width:36px;height:36px;min-height:36px;padding:0;display:block;float:right}
.extra-material-picture{background-image:url('/assets/material-atlas-expanded.png')}
#new-carton-form[hidden]{display:none}
#new-carton-form{margin-top:18px;border-top:1px solid var(--line);padding-top:16px}
#variant-cards{grid-column:1/-1;width:100%;margin:4px 0 14px}
.order-record{padding:9px 12px;margin-bottom:8px}
.order-record-head{padding-bottom:6px;gap:10px}
.order-item{padding:6px 0;gap:10px}
.order-item p{margin:2px 0;line-height:1.35}
.order-item small{margin-top:2px;line-height:1.35}
.order-record-footer{gap:8px}
.order-record-footer button{min-height:29px;padding:4px 9px;font-size:13px}
.order-record-footer details>summary{padding:3px 0;font-size:13px}
[data-page=globe] .globe-stage{height:clamp(260px,calc(100dvh - 405px),370px)}

/* Dense fulfillment queue */
.order-record{display:grid;grid-template-columns:minmax(160px,.8fr) minmax(240px,1.8fr) minmax(155px,.8fr);gap:12px;align-items:center;border-radius:0;border-width:0 0 1px;margin:0;padding:8px 0}
.order-record-head{display:grid;grid-template-columns:1fr auto;border:0;padding:0;gap:3px 8px;font-size:12px}
.order-record-head>span:first-child{grid-column:1/-1;margin:0;font-size:13px}
.order-record-head .status-label{justify-self:start;padding:2px 5px}
.order-record-head>b{font-size:12px;overflow-wrap:anywhere}
.order-items{min-width:0}.order-item{padding:2px 0}.order-item b{font-size:14px;line-height:1.3}.order-item small,.order-item p{font-size:12px;line-height:1.3;margin:2px 0 0}.order-item>strong{font-size:14px}
.order-record-footer{align-items:flex-start;justify-content:flex-start;gap:3px 8px}.order-record-footer .customer-open{width:100%;text-align:left;padding:0;min-height:24px;font-size:14px}.order-record-footer details{width:100%}.order-record-footer details[open]{background:var(--soft);padding:8px;border-radius:8px}
.order-filter-bar{flex-wrap:wrap;align-items:end}.order-filter-bar>label{min-width:230px;margin:0}.order-filter-bar>span{padding-bottom:9px;font-size:14px}.order-filter-bar select{padding:7px 10px;min-height:36px}
.image-upload{grid-column:1/-1;min-width:0}.image-drop{border:2px dashed var(--line);border-radius:12px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:9px;padding:18px;cursor:pointer;background:var(--soft);text-align:center}.image-drop.dragging{border-color:var(--accent);background:var(--panel)}.image-drop img{width:100px;height:100px;object-fit:contain}.image-drop input{max-width:100%;width:auto;min-height:32px}.image-drop small,.image-file-status{font-size:13px}.image-file-status:empty{display:none}
@media(max-width:850px){.order-record{grid-template-columns:minmax(130px,.7fr) minmax(190px,1.3fr)}.order-record-footer{grid-column:1/-1;align-items:center}.order-record-footer .customer-open,.order-record-footer details{width:auto}}
@media(max-width:520px){.order-record{grid-template-columns:1fr;gap:5px}.order-record-head{display:flex;flex-wrap:wrap}.order-record-head>span:first-child{width:100%}.order-record-footer{grid-column:auto}.order-filter-bar>label{width:100%}}
.order-filter-bar select{background:var(--panel);color:var(--text);border:1px solid var(--line-strong);border-radius:8px;color-scheme:light}
html[data-theme=dark] .order-filter-bar select{color-scheme:dark}
.order-filter-bar label{display:flex;flex-direction:column;align-items:stretch;gap:4px;font-size:14px}
.nav-section{margin:8px 0 18px}.nav-section h2{font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);margin:12px 16px 6px}.nav-section>a{display:flex;align-items:center;gap:10px;padding:9px 13px;margin:2px 0;border-radius:9px;font-size:13px;color:var(--muted)}.nav-section>a b{font-weight:500}.nav-section>a.active{background:var(--panel);color:var(--text)}.nav-section>a:hover{background:var(--soft)}.nav-section>a span{width:18px;text-align:center}
.page-tabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid var(--line);margin-bottom:20px;padding-bottom:12px}.page-tabs a{padding:9px 13px;border-radius:8px;font-size:14px}.page-tabs a.active{background:var(--text);color:var(--panel)}.guest-notice{font-size:12px;color:var(--muted);padding:0 0 10px}
.horizontal-order.order-record{display:flex;align-items:stretch;gap:5px;padding:7px 0;min-width:1150px}.horizontal-order .order-cell{border:1px solid var(--line);border-radius:5px;padding:6px 7px;background:var(--soft);font-size:12px;line-height:1.35;min-width:90px;flex:1;overflow-wrap:anywhere}.horizontal-order .order-cell small{display:block;color:var(--muted);font-size:11px;margin:0 0 3px}.horizontal-order .channel-cell{min-width:34px;max-width:38px;display:grid;place-items:center;padding:3px}.horizontal-items{flex:5;min-width:540px}.horizontal-item{display:flex;gap:5px;margin-bottom:4px}.horizontal-item:last-child{margin-bottom:0}.horizontal-item .order-cell:first-child{flex:1.8;min-width:145px}.horizontal-item .quantity-cell{min-width:36px;max-width:40px;text-align:center}.horizontal-order .order-record-footer{min-width:120px;max-width:140px;display:flex;flex-direction:column;gap:3px}.horizontal-order .customer-open{font-size:12px;text-align:left;padding:0;min-height:0}.horizontal-order .order-record-footer button{font-size:12px;padding:3px 6px;min-height:26px}.horizontal-order .order-record-footer details{width:100%}[data-page=orders]>.live-panel:has(.order-record){overflow-x:auto;padding:16px}.horizontal-order .fulfill{min-width:240px}
.public-mode>#live-sidebar,.public-mode>.shell{display:none}.public-mode{display:block!important;background:var(--bg)}.public-site{max-width:1240px;margin:auto;padding:0 32px}.public-nav{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:26px 0}.public-nav>div{display:flex;gap:24px;font-size:14px}.public-cta{display:inline-block;background:var(--text);color:var(--panel);padding:13px 20px;border-radius:10px;font-weight:600;font-size:14px}.public-hero{padding:68px 40px;background:var(--panel);border-radius:24px;margin:16px 0 24px}.public-kicker{font-size:12px;letter-spacing:.12em;color:var(--muted)}.public-hero h1{font-size:clamp(36px,5vw,68px);letter-spacing:-.045em;line-height:1.05;margin:22px 0}.public-hero p{font-size:18px;line-height:1.65;max-width:610px;color:var(--muted)}.public-hero>small{display:block;color:var(--muted);margin-top:15px;font-size:13px}.public-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.public-cards article,.public-price{border:1px solid var(--line);border-radius:16px;padding:28px;background:var(--panel)}.public-cards article>span{font-size:12px;color:var(--muted)}.public-cards h2{font-size:23px;line-height:1.2}.public-cards p,.public-price p,.public-price li{color:var(--muted);font-size:16px;line-height:1.6}.public-price{max-width:560px;margin:0 auto}.public-site footer{display:flex;justify-content:space-between;padding:36px 0;color:var(--muted);font-size:13px}.public-mode .brand{display:flex;align-items:center;gap:9px;font-size:26px;font-weight:800;color:var(--text)}
@media(max-width:700px){.public-site{padding:0 16px}.public-nav{flex-wrap:wrap;gap:15px}.public-nav>div{order:3;width:100%;justify-content:space-between;gap:8px}.public-nav>.public-cta{font-size:12px;padding:10px}.public-hero{padding:38px 24px}.public-cards{grid-template-columns:1fr}.public-site footer{flex-direction:column;gap:14px}}

/* Stable columns keep every order aligned, including multi-item orders. */
.horizontal-order.order-record{display:grid;grid-template-columns:38px minmax(104px,1fr) minmax(132px,1.15fr) minmax(580px,5.2fr) minmax(110px,1fr) 152px;gap:6px;min-width:1180px;padding:8px 0;align-items:stretch}
.horizontal-order .order-cell{min-width:0;max-width:none;padding:8px;overflow-wrap:break-word;line-height:1.4}
.horizontal-order .order-cell small{white-space:nowrap;line-height:16px;margin:0 0 4px;font-size:11px}
.horizontal-order .channel-cell{min-width:0;max-width:none;padding:3px}
.horizontal-items{min-width:0;display:grid;gap:6px;align-content:start}
.horizontal-item{display:grid;grid-template-columns:minmax(160px,1.5fr) minmax(100px,1fr) 52px minmax(85px,.85fr) minmax(140px,1.3fr);gap:6px;margin:0;align-items:stretch}
.horizontal-item .order-cell:first-child{min-width:0}
.horizontal-item .quantity-cell{min-width:0;max-width:none;text-align:center;font-variant-numeric:tabular-nums}
.horizontal-order .order-record-footer{min-width:0;max-width:none;width:100%;display:flex;align-items:stretch;gap:5px;grid-column:auto;flex-wrap:nowrap;justify-content:flex-start}
.horizontal-order .order-record-footer .status-label{width:100%;text-align:center;font-family:inherit;font-weight:500;font-size:12px;line-height:18px;padding:4px 6px}
.horizontal-order .order-record-footer button,.horizontal-order .order-record-footer details>summary{box-sizing:border-box;width:100%;min-height:32px;margin:0;padding:7px 8px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--text);font-family:inherit;font-size:12px;font-weight:600;line-height:16px;text-align:center;white-space:nowrap;display:flex;align-items:center;justify-content:center;cursor:pointer;list-style:none}
.horizontal-order .order-record-footer details>summary::-webkit-details-marker{display:none}
.horizontal-order .order-record-footer button:hover,.horizontal-order .order-record-footer details>summary:hover{background:var(--soft);border-color:var(--muted)}
.horizontal-order .order-record-footer details[open]{padding:0;background:none;border:0}
.horizontal-order .fulfill{min-width:0;margin-top:8px;display:grid;gap:8px}
.horizontal-order .fulfill select{min-width:0;width:100%;font-size:12px}
.horizontal-order .fulfill button{white-space:normal}
.filling-section{border-top:1px solid var(--line);padding-top:24px;margin-top:24px}
.filling-picture{background-image:url('/assets/filling-materials.png');background-size:200% 200%;background-position:var(--fx) var(--fy);background-repeat:no-repeat;background-color:var(--soft)}
.filling-option{width:164px}.filling-option .catalog-card{width:100%}.filling-quantity{display:grid;grid-template-columns:1fr auto;gap:6px;font-size:12px;margin-top:10px}.filling-quantity input{width:100%;min-width:0;grid-column:1;font-size:14px}.filling-quantity small{align-self:center}.filling-quantity[hidden]{display:none}
.public-site{max-width:1280px}.public-nav{padding:24px 0}.public-nav a[aria-current=page]{color:var(--accent);font-weight:700}.public-cta{display:inline-flex;align-items:center;justify-content:center;gap:16px;white-space:nowrap}.public-cta:hover{opacity:.88}.public-hero{padding:64px 48px}.public-hero em{font-style:normal;color:var(--accent)}.home-hero,.register-hero{display:grid;grid-template-columns:1.2fr 1fr;gap:46px;align-items:center}.home-hero h1,.register-hero h1{font-size:clamp(36px,4.8vw,62px)}.hero-actions{display:flex;align-items:center;gap:24px;margin-top:28px}.hero-actions>a:not(.public-cta){font-size:14px;font-weight:600}.hero-preview{background:var(--soft);border:1px solid var(--line);border-radius:20px;padding:24px;transform:rotate(2deg)}.preview-top,.preview-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px}.preview-top>span{color:var(--muted)}.preview-total{padding:30px 0}.preview-total small{color:var(--muted)}.preview-total strong{display:block;font-size:35px;line-height:1.15;letter-spacing:-.04em;margin-top:10px}.preview-flow{display:grid;gap:8px}.preview-flow>span{display:grid;grid-template-columns:28px 1fr;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:12px;font-size:12px;color:var(--accent)}.preview-flow b{color:var(--text);font-size:14px}.preview-flow small{grid-column:2;color:var(--muted);font-size:12px}.preview-foot{margin-top:20px;color:var(--muted)}.preview-foot>span{font-weight:800;color:var(--text)}.public-section{padding:60px 0}.section-intro{margin-bottom:30px}.section-intro h2,.public-banner h2{font-size:clamp(26px,3vw,38px);line-height:1.2;letter-spacing:-.035em;margin:14px 0}.public-cards h3{font-size:22px;letter-spacing:-.02em;line-height:1.2;margin:24px 0 12px}.public-cards article{padding:30px}.public-cards article>small{display:block;color:var(--accent);font-size:12px;font-weight:600;margin-top:24px}.feature-number{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:var(--soft);font-size:13px;color:var(--muted)}.centered-hero{text-align:center;background:transparent;padding:48px 20px 54px}.centered-hero p{margin:0 auto 24px;max-width:640px}.centered-hero h1{font-size:clamp(36px,4.5vw,58px)}.feature-cards{grid-template-columns:repeat(3,1fr)}.public-banner{display:flex;align-items:center;justify-content:space-between;gap:36px;background:var(--soft);border:1px solid var(--line);border-radius:20px;padding:44px;margin:36px 0}.public-banner p{color:var(--muted);max-width:620px;line-height:1.6}.public-steps ol{display:grid;grid-template-columns:repeat(3,1fr);gap:40px;padding-left:24px}.public-steps li::marker{color:var(--accent);font-size:20px;font-weight:700}.public-steps b{font-size:20px}.public-steps p{color:var(--muted);line-height:1.6}.public-faq{max-width:860px}.public-faq details{border-bottom:1px solid var(--line);padding:20px 0}.public-faq summary{display:flex;justify-content:space-between;gap:20px;font-weight:600;font-size:16px;cursor:pointer;list-style:none}.public-faq details p{color:var(--muted);line-height:1.7;margin-bottom:0;max-width:760px}.public-faq details[open] summary>span{transform:rotate(45deg)}.pricing-hero{padding-bottom:20px}.billing-toggle{display:flex;justify-content:center;gap:6px;border:0;margin:0 auto 46px;padding:6px;background:var(--soft);border-radius:40px;width:max-content}.billing-toggle legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.billing-toggle label{position:relative;cursor:pointer;display:block}.billing-toggle input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}.billing-toggle span{display:block;padding:11px 21px;border-radius:30px;font-size:14px}.billing-toggle input:checked+span{background:var(--text);color:var(--panel)}.billing-toggle input:focus-visible+span{outline:2px solid var(--accent);outline-offset:3px}.pricing-grid{display:grid;grid-template-columns:1fr 1.08fr 1fr;gap:20px;align-items:stretch;padding:12px 0}.plan-card{position:relative;border:1px solid var(--line);border-radius:20px;background:var(--panel);padding:34px 28px;display:flex;flex-direction:column}.plan-card h2{font-size:27px;letter-spacing:-.04em;margin:18px 0 10px}.plan-card>p{color:var(--muted);line-height:1.6;min-height:52px;font-size:15px}.plan-price{display:flex;align-items:baseline;gap:10px;margin:20px 0 8px}.plan-price strong{font-size:46px;letter-spacing:-.05em}.plan-price>span{font-size:13px;color:var(--muted)}.plan-billing{font-size:12px;color:var(--muted);margin-bottom:26px;min-height:30px}.plan-card .public-cta{width:100%;background:var(--soft);color:var(--text);border:1px solid var(--line)}.plan-card ul{list-style:none;padding:22px 0 0;margin:0;display:grid;gap:16px;border-top:1px solid var(--line);margin-top:28px}.plan-card li{display:flex;gap:12px;font-size:14px;line-height:1.5}.plan-card li>span{color:var(--accent)}.featured-plan{border:2px solid var(--accent);margin:-14px 0;box-shadow:0 12px 36px color-mix(in srgb,var(--accent) 12%,transparent);padding-top:46px;padding-bottom:46px}.featured-plan .public-cta{background:var(--accent);color:#fff;border-color:var(--accent)}.plan-badge{position:absolute;top:-15px;left:50%;transform:translateX(-50%);background:var(--accent);color:white;border-radius:30px;padding:8px 18px;font-size:11px;font-weight:700;letter-spacing:.07em;white-space:nowrap}.annual-price{display:none}.pricing-section:has(input[value=annual]:checked) .monthly-price{display:none}.pricing-section:has(input[value=annual]:checked) .annual-price{display:flex}.pricing-note{font-size:13px;line-height:1.7;color:var(--muted);max-width:820px;margin:38px auto 0;text-align:center}.register-card{background:var(--soft);border:1px solid var(--line);padding:32px;border-radius:18px}.register-card h2{font-size:28px;letter-spacing:-.04em}.register-card>p{font-size:16px}.register-card>label{display:grid;gap:8px;font-size:14px;margin:24px 0 18px}.register-card select{width:100%;background:var(--panel);color:var(--text)}.register-card .public-cta{width:100%}.register-card>small{display:block;line-height:1.7;font-size:12px;color:var(--muted);margin-top:20px}.register-benefits{list-style:none;padding:0;display:grid;gap:16px;font-size:15px;margin-top:28px}.public-site footer{align-items:flex-start;border-top:1px solid var(--line);margin-top:50px;gap:30px}.public-site footer b{font-size:24px;letter-spacing:-1px;color:var(--text)}.public-site footer p{line-height:1.6}.public-site footer>div:nth-child(2){display:flex;gap:24px}.public-site footer>small{font-size:12px}
@media(max-width:1000px){.home-hero,.register-hero{gap:24px;padding:40px 28px}.hero-preview{padding:18px}.hero-actions{align-items:flex-start;flex-direction:column;gap:15px}.plan-card{padding:28px 20px}.plan-price strong{font-size:36px}.featured-plan{padding-top:40px;padding-bottom:40px}.plan-price{gap:6px}.plan-price>span{font-size:12px}}
@media(max-width:760px){.public-site{padding:0 20px}.public-nav{flex-wrap:wrap;gap:18px}.public-nav>div{order:3;width:100%;justify-content:space-between;gap:10px;font-size:13px}.public-nav>.public-cta{padding:11px 14px;font-size:12px}.home-hero,.register-hero{grid-template-columns:1fr}.hero-preview{transform:none}.hero-actions{flex-direction:row;align-items:center}.feature-cards,.public-cards,.public-steps ol,.pricing-grid{grid-template-columns:1fr}.public-hero h1{font-size:38px}.public-section{padding:36px 0}.public-banner{flex-direction:column;align-items:flex-start;padding:28px}.pricing-grid{gap:32px}.featured-plan{margin:0;padding:42px 28px}.plan-card{padding:32px 28px}.plan-card>p{min-height:0}.plan-price strong{font-size:46px}.plan-billing{min-height:0}.public-site footer{flex-direction:column}.public-steps ol{gap:20px}.billing-toggle span{padding:10px 16px}.filling-option{width:100%}}

.filling-quantity>span{grid-column:1/-1}.filling-quantity>small{grid-column:2;grid-row:2;margin:0}

/* Connected store rows include an extra provider total: use a wrapping card
   instead of forcing them into the six-column manual-order table. */
.connected-store-workspace .horizontal-order.order-record{min-width:0;grid-template-columns:40px repeat(3,minmax(0,1fr));gap:14px;padding:22px;margin:16px 0;border:1px solid var(--line);border-radius:16px;background:var(--panel)}
.connected-store-workspace .horizontal-order .horizontal-items{grid-column:1/-1;padding:14px;background:var(--soft);border-radius:10px}
.connected-store-workspace .horizontal-order .horizontal-item{grid-template-columns:2fr 1.5fr 60px 1fr 1.5fr}
.connected-store-workspace .horizontal-order .order-record-footer{grid-column:1/-1;flex-direction:row;flex-wrap:wrap;align-items:center;gap:12px;border-top:1px solid var(--line);padding-top:16px}
.connected-store-workspace .horizontal-order .order-record-footer .status-label{width:auto;padding:7px 14px}
.connected-store-workspace .horizontal-order .order-record-footer>small{flex-basis:100%;line-height:1.6;color:var(--muted)}
.connected-store-workspace .horizontal-order .order-record-footer details{flex-basis:100%}
.connected-store-workspace .horizontal-order .order-cell small{white-space:normal}
.connected-store-workspace [data-page=orders]>.live-panel:has(.order-record){overflow:visible}
@media(max-width:850px){.connected-store-workspace .horizontal-order.order-record{grid-template-columns:40px 1fr;gap:10px;padding:16px}.connected-store-workspace .horizontal-order .horizontal-item{grid-template-columns:1fr 1fr}.connected-store-workspace .horizontal-item .quantity-cell{text-align:left}}

.connected-store-workspace .horizontal-order .horizontal-items+.order-cell{grid-column:1/-1;display:flex;align-items:center;gap:12px}.connected-store-workspace .horizontal-order .horizontal-items+.order-cell small{margin:0}

/* Keep subscription labels inside their own cards. */
.billing-plans>.live-panel{position:relative;min-width:0}
.billing-plans .plan-badge{position:static;transform:none;display:inline-block;margin:0 0 8px;padding:5px 12px;white-space:normal}
#billing-refresh{margin-right:8px;margin-bottom:12px}

/* Marketplace entry points are separate from existing store management. */
.store-connect-toolbar{border:1px solid var(--line);border-radius:22px;background:var(--panel);padding:24px;margin-bottom:22px}
.store-connect-heading h2{font-size:1.05rem;margin:0 0 6px;color:var(--text)}
.store-connect-heading p{font-size:.86rem;color:var(--muted);margin:0 0 20px;line-height:1.5}
.store-connect-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.store-connect-options .store-provider{display:flex;align-items:center;gap:12px;text-align:left;min-width:0;padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--panel);color:var(--text);font-size:1rem;font-weight:700;transition:background .15s,border-color .15s}
.store-provider>span:nth-child(2){flex:1}
.store-provider small{display:block;font-size:.72rem;font-weight:400;color:var(--muted);margin-top:5px;line-height:1.4}
.store-provider-mark{display:grid;place-items:center;width:36px;height:36px;flex-shrink:0;border-radius:10px;background:var(--soft);font-size:1.25rem}
.store-connect-options .store-provider:not(:disabled):hover{border-color:var(--accent);background:var(--soft)}
.store-connect-options .store-provider:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.store-connect-options .store-provider:disabled{cursor:not-allowed;opacity:.6}
@media(max-width:950px){.store-connect-options{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.store-connect-toolbar{padding:16px}.store-connect-options{grid-template-columns:1fr}}

/* Overview: expandable totals and tall, responsive store cards. */
.metric-card summary{list-style:none;cursor:pointer}.metric-card summary::-webkit-details-marker{display:none}.metric-card summary>span{display:flex;justify-content:space-between}.metric-card summary>strong,.metric-card summary>small{display:block}.metric-card summary>strong{font-size:2rem;margin:14px 0}.metric-card summary:after{content:'Details +';display:block;font-size:.8rem;margin-top:14px;color:#626b69}.metric-card[open] summary:after{content:'Details −'}.metric-breakdown{border-top:1px solid #e5e8e7;margin-top:16px;padding-top:12px}.metric-breakdown dl,.store-performance-card dl{display:grid;grid-template-columns:1fr auto;gap:14px 20px}.metric-breakdown dd,.store-performance-card dd{margin:0;text-align:right;font-weight:600}.store-performance-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:20px;align-items:start}.store-performance-card{border:1px solid #e0e5e3;border-radius:24px;padding:26px;background:var(--panel,#fff);box-shadow:0 6px 22px #17292308;display:flex;flex-direction:column;gap:10px;min-width:0}.store-performance-card h3{margin:0 0 8px}.store-profit{font-size:2.2rem;overflow-wrap:anywhere}.store-performance-card dl{border-top:1px solid #e5e8e7;padding-top:22px;font-size:.9rem}.store-performance-card small{color:#67736f}.store-performance-card button{margin-top:12px}.order-pagination{display:flex;gap:16px;align-items:center;justify-content:center;margin:24px 0}.metric-card summary:focus-visible{outline:2px solid #7d78df;outline-offset:5px}@media(max-width:600px){.store-performance-grid{grid-template-columns:1fr}.order-pagination{flex-wrap:wrap}}

.overview-grid{align-items:start}
/* Overview display controls stay grouped at the top right and wrap on mobile. */
.overview-actions{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:10px}.overview-actions .period-picker{display:flex;align-items:center;gap:8px}.overview-actions select{max-width:185px}.overview-fx-note{font-size:.8rem;color:var(--muted,#67736d);margin:0 0 16px}.store-performance-card dd small{display:block;font-size:.75rem;font-weight:400}@media(max-width:700px){.overview-actions{justify-content:flex-start;width:100%}.overview-actions .period-picker{flex:1 1 145px}.overview-actions select{max-width:100%}}

/* Saved stores: compact rows, retaining the existing card/navigation design. */
.store-connection-card{padding:16px 20px!important;margin-block:12px!important}
.store-connection-card h2{margin:0 0 10px!important;font-size:18px}
.store-connection-card p{margin:6px 0!important;font-size:14px;line-height:1.45}
.store-connection-card p:empty{display:none}
.store-connection-card .compact-order{padding:10px 0!important;gap:12px;min-height:0;align-items:center}
.store-connection-card .compact-order>div:first-child{flex:1}
.store-connection-card button{padding:8px 14px;min-height:36px;white-space:nowrap}
.store-history-request{display:flex!important;align-items:end;gap:12px;padding-top:10px;margin-top:8px;flex-wrap:wrap}
.store-history-request label{flex:0 1 260px;margin:0}
.store-history-request input{padding:8px 12px;min-height:36px;margin-top:4px}
.store-history-request [role=alert]:empty{display:none}
@media(max-width:640px){.store-connection-card{padding:14px!important}.store-connection-card .compact-order{flex-wrap:wrap}.store-connection-card .compact-order>div:first-child{flex-basis:100%}.store-history-request label{flex:1 1 180px}}
/* Shared connected-store presentation, retaining the workspace layout. */
.store-provider.is-connected{border:2px solid #278451;box-shadow:0 0 0 1px #27845114}
.store-provider.is-connected small{color:#247749}
.store-connection-card .store-row{display:flex;align-items:center;justify-content:space-between;gap:20px}
.store-row-info{min-width:0;flex:1}.store-row-info p{overflow-wrap:anywhere}
.store-row-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.store-history-details{border-top:1px solid var(--line,#e4e7e8);padding-top:10px;margin-top:10px}
.store-history-details summary{cursor:pointer;color:#657477;font-size:14px}
.store-connection-card>h2{margin-bottom:10px}
@media(max-width:640px){.store-connection-card .store-row{align-items:flex-start;flex-direction:column;gap:10px}.store-row-actions{width:100%}}

/* Main-listing matching: independent from recipes and cost records. */
.matching-note{color:var(--muted,#74807e);max-width:900px;margin:0 0 24px}.matching-search{display:block;max-width:380px;margin-bottom:18px}.matching-search input{width:100%}.matching-scroll{overflow:auto;border:1px solid var(--line,#e4e8e6);border-radius:22px;padding:18px;background:var(--panel,#fff)}.matching-grid{display:grid;grid-template-columns:repeat(var(--match-columns),minmax(230px,1fr));gap:18px;min-width:calc(var(--match-columns)*248px)}.matching-store{position:sticky;top:0;display:flex;flex-direction:column;gap:5px;padding:12px 8px;background:var(--panel,#fff);z-index:1}.matching-store strong{font-size:21px}.matching-store span,.matching-store small{color:var(--muted,#74807e);overflow-wrap:anywhere}.match-card{position:relative;min-width:0;border:1px solid var(--line,#e4e8e6);border-radius:16px;overflow:hidden;display:flex;flex-direction:column}.match-photo{height:180px;display:grid;place-items:center;background:#f5f6f4}.match-photo img{height:100%;width:100%;object-fit:contain}.match-photo>span{font-size:40px;color:#b6bfbc}.match-copy{padding:16px 44px 36px 16px;display:flex;flex-direction:column;gap:8px}.match-copy strong{font-size:15px;line-height:1.4;overflow-wrap:anywhere}.match-copy small,.match-method{font-size:12px;color:var(--muted,#74807e)}.match-method{margin-top:4px}.match-edit{position:absolute;bottom:12px;right:12px;width:34px;height:34px;padding:0;border-radius:10px;font-size:20px}.match-empty{border-style:dashed;opacity:.8}.match-empty .match-photo{background:transparent}.matching-pages{display:flex;align-items:center;justify-content:center;gap:20px;margin:20px 0}.matching-dialog{width:min(680px,90vw);max-height:85vh;border:1px solid #dfe5e1;border-radius:22px;padding:26px;color:inherit;background:var(--panel,#fff)}.matching-dialog::backdrop{background:#17221f66}.matching-close{float:right;padding:4px 12px;font-size:24px}.matching-dialog label{display:block;margin:16px 0}.matching-dialog input{width:100%}.matching-choices{max-height:45vh;overflow:auto;display:grid;gap:9px}.matching-choice{display:flex;text-align:left;align-items:center;gap:15px;padding:10px}.matching-choice img{width:58px;height:58px;object-fit:contain;border-radius:8px}.matching-choice span{flex:1}.matching-choice small{display:block;color:var(--muted,#74807e);margin-top:5px}.matching-error{color:#a63d2e}.matching-unlink{margin-top:18px}
.matching-grid>.matching-store{position:relative;top:auto;height:auto;min-height:0;margin:0;align-items:flex-start;justify-content:flex-start;text-align:left}.matching-search input,.matching-dialog input{background:var(--panel,#fff);color:inherit}
/* Compact product groups: open covers above a framed details panel. */
.matching-grid{gap:14px;grid-template-columns:repeat(var(--match-columns),minmax(225px,1fr))}
.match-card{border:0;border-radius:0;background:transparent;box-shadow:none;align-self:stretch;overflow:visible;width:min(100%,190px);justify-self:center}
.match-details{display:flex;flex-direction:column;flex:1;min-width:0;border:1px solid var(--line,#d9dedb);border-radius:0 0 14px 14px;background:var(--panel,#fff);overflow:hidden;box-shadow:0 2px 5px #182d2310}
.match-card-top{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:8px 10px 4px;min-height:20px}
.match-card .match-method{display:inline-flex;align-items:center;border-radius:6px;padding:4px 7px;font-size:11px;line-height:1.2;background:#edf0ef;color:#56635d;font-weight:500}
.match-card .match-method.is-suggested{background:#e8f2ec;color:#356448}.match-card .match-method.is-manual{background:#eeecfa;color:#655590}
.match-count{font-size:11px;color:var(--muted,#75817b);white-space:nowrap}
.match-card .match-photo{height:auto;margin:0;border-radius:14px 14px 0 0;background:transparent;overflow:hidden}.match-card .match-photo:has(>span){height:144px}
.match-card .match-photo img{display:block;max-height:none;height:auto;width:100%;object-fit:contain;border-radius:14px 14px 0 0}
.match-card .match-copy{padding:8px 10px;gap:6px;flex:1;min-height:64px}
.match-card .match-copy>strong{font-size:12px;line-height:1.45;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:35px;overflow-wrap:anywhere}
.match-meta{display:flex;flex-wrap:wrap;gap:4px 10px;min-height:16px}.match-meta small{font-size:11px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.match-card-footer{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:6px 10px;border-top:1px solid var(--line,#e4e8e5);margin-top:auto;background:var(--bg,#f8faf9)}
.match-card-footer>small{font-size:10px;color:var(--muted,#75817b)}.match-card .match-edit{position:static;width:30px;height:30px;padding:0;flex-shrink:0;border-radius:8px}
.match-card.match-group .match-details{border-color:#9cb8a9}.match-related{padding:0 14px 12px}.match-related>span{display:block;font-size:10px;font-weight:500;color:var(--muted,#75817b);margin:0 0 7px}
.match-thumbnails{display:flex;gap:7px;flex-wrap:wrap}.match-thumbnail{width:48px;height:48px;padding:3px;border:1px solid var(--line,#d9dedb);border-radius:8px;background:var(--panel,#fff);cursor:pointer}.match-thumbnail:hover,.match-thumbnail:focus-visible{border-color:#56866c;outline:2px solid #56866c33}.match-thumbnail img{width:100%;height:100%;object-fit:contain;border-radius:5px}
.match-card.match-empty{opacity:1;box-shadow:none;background:transparent}.match-empty .match-details{border-style:dashed;box-shadow:none;background:var(--bg,#f8faf9)}.match-empty .match-photo{height:124px;background:transparent;color:#b3bdb7}.match-empty .match-copy>strong{color:var(--muted,#75817b);font-weight:400}.match-empty .match-method{background:transparent;padding-left:0;color:var(--muted,#75817b)}
.matching-picker-tabs{display:flex;gap:8px;margin:16px 0 8px}.matching-picker-tabs button{font-size:13px;padding:9px 12px}.matching-picker-tabs [aria-pressed=true]{background:#e8f2ec;border-color:#739e84;color:#315b41}.matching-picker-help{font-size:13px;color:var(--muted,#75817b)}
.matching-group-save:not([hidden]){position:sticky;bottom:0;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;background:var(--panel,#fff);border-top:1px solid var(--line,#ddd)}.matching-group-save span{font-size:13px}.matching-choice.is-selected{border-color:#739e84;background:#f0f7f2}.matching-choice .matching-check{width:20px;flex:0 0 20px;color:#427653;font-weight:600}.matching-choice>span:last-child{min-width:0;overflow-wrap:anywhere}
/* Overview cards share stable summary slots and equal-height store panels. */
[data-page=overview] .overview-grid{grid-template-columns:repeat(6,minmax(0,1fr));align-items:stretch;gap:14px}
[data-page=overview] .overview-grid>.metric-card{grid-column:span 2;min-width:0;padding:16px 18px;display:block}
[data-page=overview] .overview-grid>.metric-card:nth-last-child(-n+2){grid-column:span 3}
[data-page=overview] .metric-card summary{display:grid;grid-template-rows:24px 48px 40px 20px;gap:8px;min-width:0}
[data-page=overview] .metric-card summary>span{font-weight:650;font-size:14px;align-items:center;gap:12px}
[data-page=overview] .metric-card summary>span b{display:grid;place-items:center;flex-shrink:0;width:18px;height:18px;border:1px solid var(--line-strong);border-radius:50%;font-size:11px;color:var(--muted)}
[data-page=overview] .metric-card summary>strong{font-size:clamp(1.6rem,3vw,2rem);line-height:1.2;margin:0;align-self:center;overflow-wrap:anywhere}
[data-page=overview] .metric-card summary>small{font-size:12px;line-height:1.6;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
[data-page=overview] .metric-card summary:after{margin:0;align-self:end;color:var(--accent);font-size:12px}
[data-page=overview] .metric-breakdown{border-color:var(--line);padding-top:14px;margin-top:16px}
[data-page=overview] .metric-breakdown dl{grid-template-columns:minmax(0,1fr) auto;gap:12px 18px;font-size:13px}
[data-page=overview] .metric-breakdown p{font-size:12px;color:var(--muted)}
[data-page=overview] .store-performance-grid{grid-template-columns:repeat(auto-fit,minmax(260px,1fr));align-items:stretch;grid-auto-rows:1fr;gap:16px}
[data-page=overview] .store-performance-card{height:100%;padding:20px;border-radius:18px;border-color:var(--line);gap:14px}
.store-performance-head{display:grid;grid-template-rows:44px 36px 54px 36px;gap:6px;min-width:0}
.store-performance-head h3{font-size:17px;line-height:1.4;margin:0;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.store-performance-head>small{line-height:1.5;font-size:12px}.store-performance-head .store-profit{font-size:clamp(1.5rem,2.8vw,2rem);line-height:1.15;align-self:center;display:block}
[data-page=overview] .store-performance-card dl{margin:0;padding-top:16px;border-color:var(--line);grid-template-columns:minmax(0,1fr) minmax(90px,1fr);gap:0 14px;font-size:13px;line-height:1.5}
.store-performance-card dt,.store-performance-card dd{padding:10px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere;min-width:0}
.store-performance-card dt:last-of-type,.store-performance-card dd:last-of-type{border-bottom:0}
.store-performance-card dt{color:var(--muted)}.store-performance-card dd{font-variant-numeric:tabular-nums}
.store-performance-notes{margin-top:auto;display:flex;flex-direction:column;gap:8px;min-height:108px}.store-performance-notes small{font-size:11px;line-height:1.55}
[data-page=overview] .store-performance-card>button{margin-top:0;width:100%;min-height:40px}
@media(max-width:700px){[data-page=overview] .overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}[data-page=overview] .overview-grid>.metric-card{grid-column:span 1}[data-page=overview] .overview-grid>.metric-card:nth-last-child(2){grid-column:span 1}[data-page=overview] .overview-grid>.metric-card:last-child{grid-column:span 2}}
@media(max-width:430px){[data-page=overview] .overview-grid{grid-template-columns:1fr}[data-page=overview] .overview-grid>.metric-card,[data-page=overview] .overview-grid>.metric-card:nth-last-child(-n+2){grid-column:span 1}}

.shipment-date{display:flex;align-items:center;gap:5px;max-width:220px;grid-column:1/-1}.shipment-date small{font-size:11px;color:var(--muted)}.shipment-date .shipment-edit{padding:2px 5px;min-height:24px;border:0;background:transparent;font-size:16px;cursor:pointer}

/* Public login starts the existing same-origin identity flow directly. */
.public-nav>.public-login{margin:0;flex:0 0 auto;width:auto}.public-nav>.public-login>.public-cta{margin:0;cursor:pointer}
@media(max-width:760px){.public-nav>.public-login>.public-cta{padding:11px 14px;font-size:12px}}
/* Product-centered costs: compact catalog, one active definition per variant. */
.products-costs-page .product-cost-table{padding:0;overflow:hidden}
.product-cost-toolbar{display:flex;align-items:center;gap:20px;padding:18px 22px;border-bottom:1px solid var(--border,#ecebf2);color:var(--muted,#85828f);font-size:13px}
.product-cost-search{flex:1;max-width:420px}.product-cost-search input{margin:0!important;width:100%}
.product-cost-filter{display:flex!important;flex-direction:row!important;margin:0!important;align-items:center;gap:8px;white-space:nowrap}.product-cost-filter input,.product-cost-apply input{width:16px!important;height:16px!important;margin:0!important;accent-color:#8050ef}
.product-cost-dialog{box-sizing:border-box;width:min(680px,calc(100vw - 32px));max-height:calc(100dvh - 48px);padding:0;border:1px solid #e9e5f0;border-radius:20px;background:#fff;color:#24232c;box-shadow:0 20px 80px #20123a33;font-family:inherit;overflow:auto}
.product-cost-dialog::backdrop{background:#21193655;backdrop-filter:blur(3px)}
.product-cost-dialog form{margin:0}.product-cost-dialog header,.product-cost-dialog footer{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:20px 24px;background:#fff;position:sticky;z-index:1}
.product-cost-dialog header{top:0;border-bottom:1px solid #eeedf4}.product-cost-dialog footer{bottom:0;border-top:1px solid #eeedf4}
.product-cost-dialog h2{font-size:19px;line-height:1.4;margin:0;max-width:540px}.product-cost-dialog header p{margin:4px 0 0;color:#85828f;font-size:13px}
.product-cost-dialog header button{flex-shrink:0;width:34px;height:34px;padding:0;font-size:22px;background:#f4f2f8;border:0;border-radius:10px;color:#85828f}
.product-cost-editor{padding:22px 24px;display:grid;gap:18px}.product-cost-editor h3{font-size:14px;margin:20px 0 12px}.product-cost-editor h3:first-child{margin-top:0}
.product-cost-dialog label{display:grid;gap:7px;color:#605d6c;font-size:13px;font-weight:500}
.product-cost-dialog input,.product-cost-dialog select{box-sizing:border-box;min-width:0;width:100%;height:40px;padding:8px 12px;background:#fff;color:#24232c;border:1px solid #e2dfea;border-radius:10px;font:inherit;font-size:14px;margin:0}
.product-cost-dialog input:focus,.product-cost-dialog select:focus{outline:2px solid #bba3f3;outline-offset:1px}
.product-cost-dialog button{font:inherit;cursor:pointer}.product-cost-dialog button:disabled{opacity:.5;cursor:wait}
.product-cost-dialog button.primary{background:#8050ef;color:#fff;border:0;border-radius:10px;padding:11px 20px;font-weight:600;font-size:14px}
.product-usage-line{display:grid;grid-template-columns:minmax(0,1fr) 90px 35px 32px;gap:8px;align-items:center;margin:8px 0;font-size:12px;color:#85828f}
.product-usage-line button{border:0;background:#f4f2f8;border-radius:8px;height:32px;color:#85828f;font-size:19px}
.product-cost-editor [data-add-line]{justify-self:start;text-align:left;color:#8050ef;border:0;background:none;padding:8px 0;font-size:13px}.product-cost-editor [data-inventory]{display:block;font-size:12px;color:#8050ef;margin-top:10px}
.product-cost-editor [data-packaging]{display:grid;gap:6px;margin-top:12px}
.product-cost-optional{border-top:1px solid #eeedf4;padding-top:14px}.product-cost-optional summary{cursor:pointer;font-size:14px;font-weight:600}.product-cost-optional summary span{color:#85828f;font-size:12px;font-weight:400;margin-left:6px}
.product-cost-inputs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0}
.product-cost-dialog small{font-size:12px;color:#85828f}.product-cost-dialog .product-cost-apply{display:flex;flex-direction:row;align-items:center;gap:9px;font-size:12px;background:#f7f4fd;padding:12px;border-radius:10px}
.product-cost-error{color:#ac3c44;font-size:13px;margin:0}.product-cost-error:empty{display:none}.product-cost-editor [hidden]{display:none!important}
.product-cost-create{max-width:480px}
.products-costs-page .product-cost-toolbar{padding:0 0 20px;border:0}
.product-cost-workbench{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,1fr);gap:24px;align-items:start}
.product-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:20px;min-width:0;padding:4px}
.products-costs-page .product-select-card{display:flex;flex-direction:column;align-items:stretch;text-align:left;white-space:normal;min-width:0;padding:0;border:1px solid #e7e4ee;border-radius:16px;background:#fff;color:#24232c;overflow:hidden;font:inherit;cursor:pointer;box-shadow:0 3px 12px #21193604;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
.products-costs-page .product-select-card:hover{border-color:#bca3f4;box-shadow:0 5px 20px #8050ef0d}
.products-costs-page .product-select-card.is-selected{border-color:#8050ef;box-shadow:0 0 0 2px #8050ef20;transform:scale(1.015)}
.product-select-card:focus-visible,.product-variant-card:focus-visible{outline:3px solid #bca3f4;outline-offset:3px}
.product-card-cover{position:relative;display:grid;place-items:center;aspect-ratio:4/3;width:100%;background:#f4f2f8;overflow:hidden}
.product-card-cover>img{width:100%;height:100%;object-fit:contain}.product-card-placeholder{font-size:38px;color:#b09bdb;display:grid;place-items:center;width:100%;height:100%}
.product-card-platforms{position:absolute;right:10px;bottom:10px;display:flex;gap:4px}.product-card-platforms .marketplace-mark{width:25px;height:25px;background:#fff;border-radius:8px}
.product-card-body{display:flex;flex-direction:column;padding:16px;flex:1;gap:6px}
.product-card-name{font-size:14px;line-height:1.5;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:42px;overflow-wrap:anywhere}
.product-card-count,.product-card-average small{font-size:12px;color:#85828f;font-weight:400;line-height:1.5}
.product-card-average{display:grid;gap:4px;border-top:1px solid #eeedf4;margin-top:8px;padding-top:12px}.product-card-average strong{font-size:20px;line-height:1.3;font-weight:600;font-variant-numeric:tabular-nums}
.product-variant-panel{background:#fff;border:1px solid #e7e4ee;border-radius:16px;padding:22px;position:sticky;top:100px;min-width:0;scroll-margin-top:100px}
.product-selection-empty{padding:50px 10px;text-align:center;color:#85828f}.product-selection-empty>span{font-size:32px;color:#8050ef}.product-selection-empty h2{font-size:17px;color:#24232c;margin:18px 0 8px}.product-selection-empty p{font-size:13px;line-height:1.6;margin:0}
.product-variant-heading small,.product-variant-next small{display:block;font-size:12px;color:#85828f}.product-variant-heading h2{font-size:19px;line-height:1.4;margin:6px 0;overflow-wrap:anywhere}.product-variant-heading p{font-size:13px;color:#85828f;margin:8px 0 20px}
.products-costs-page .product-variant-heading{display:block;padding:0;border:0;background:none;position:static;min-height:0;height:auto;width:auto}
.product-variant-grid{display:grid;gap:10px;max-height:48vh;overflow:auto;padding:3px}
.products-costs-page .product-variant-card{display:grid;grid-template-columns:54px minmax(0,1fr) 20px;align-items:center;gap:12px;padding:12px;text-align:left;white-space:normal;border:1px solid #e7e4ee;border-radius:12px;background:#fff;color:#24232c;font:inherit;cursor:pointer;min-width:0}
.products-costs-page .product-variant-card.is-selected{background:#f7f3ff;border-color:#a17af1}
.product-variant-cover{width:54px;height:60px;border-radius:8px;overflow:hidden;background:#f4f2f8}.product-variant-cover img{width:100%;height:100%;object-fit:contain}.product-variant-cover .product-card-placeholder{font-size:24px}
.product-variant-card strong{display:block;font-size:14px;line-height:1.4;overflow-wrap:anywhere}.product-variant-card small{display:block;color:#85828f;font-size:11px;line-height:1.5;margin-top:3px}.product-variant-card b{display:block;font-size:16px;margin-top:8px;font-variant-numeric:tabular-nums}.product-variant-check{color:#8050ef}
.product-variant-next{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #eeedf4;margin-top:20px;padding-top:18px}.product-variant-next strong{display:block;font-size:13px;margin-top:4px;overflow-wrap:anywhere}.product-variant-next>span{min-width:0}.product-variant-next button{flex-shrink:0;font-size:13px!important;padding:11px 14px!important;border-radius:10px!important}
.products-costs-page .product-add-variant{font:inherit;font-size:13px;color:#8050ef;background:none;border:0;padding:14px 0 0;cursor:pointer}
@media(max-width:760px){.product-cost-workbench{grid-template-columns:1fr;gap:18px}.product-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.product-variant-panel{position:static;padding:18px}.product-card-body{padding:12px}.product-card-name{font-size:13px;min-height:39px}.product-card-average strong{font-size:18px}.product-variant-next{flex-wrap:wrap}.product-cost-toolbar>span{font-size:12px}}
@media(prefers-reduced-motion:reduce){.products-costs-page .product-select-card{transition:none}.products-costs-page .product-select-card.is-selected{transform:none}}
@media(max-width:680px){.product-cost-toolbar{flex-wrap:wrap;padding:14px;gap:12px}.product-cost-search{max-width:none;flex-basis:100%}.product-cost-row>summary{padding:14px;gap:10px;grid-template-columns:minmax(0,1fr) 94px 12px}.product-cost-platforms{display:none}.product-cost-identity img,.product-cost-placeholder{width:38px;height:38px}.product-cost-variants{padding:0 14px 14px}.product-cost-variant{grid-template-columns:minmax(0,1fr) 100px;gap:10px}.product-cost-variant button{grid-column:2}.product-cost-inputs{grid-template-columns:1fr}.product-cost-dialog header,.product-cost-dialog footer,.product-cost-editor{padding:16px}.product-usage-line{grid-template-columns:minmax(0,1fr) 65px 25px 28px}.product-cost-dialog footer small{max-width:45%}}
.products-costs-page .product-sample-note{font-size:12px;color:var(--muted,#85818f);margin:0 0 16px;line-height:1.5}
/* Keep the variant panel beside lower gallery rows as the page scrolls. */
#live-main:has(>.products-costs-page){overflow:visible}
/* Adjacent production-cost page: keep the product browser in place during the slide. */
.product-cost-flow{overflow:clip;scroll-margin-top:100px}
.product-cost-track{display:grid;grid-template-columns:100% 100%;align-items:start;transition:transform .36s cubic-bezier(.22,.68,0,1)}
.product-cost-flow.is-editing .product-cost-track{transform:translateX(-100%)}
.product-cost-slide{min-width:0;visibility:hidden}
.product-cost-flow.is-editing .product-cost-slide{visibility:visible}
.product-cost-flow.is-editing [data-cost-browse]{visibility:hidden;transition:visibility 0s .36s}
.product-cost-flow:not(.is-editing) .product-cost-slide{max-height:1px;overflow:hidden}
.product-cost-inline.product-cost-dialog{width:100%;max-height:none;max-width:none;box-shadow:none;overflow:visible}
.product-cost-inline header{justify-content:flex-start;position:static}.product-cost-inline header>div{min-width:0}.product-cost-inline h2{max-width:none}
.product-cost-inline footer{position:static}.product-cost-inline .product-cost-editor{padding:24px;gap:20px}
.product-material-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px;margin:12px 0}
.product-cost-inline .product-material-choice,.product-material-usage{border:1px solid #e7e4ee;border-radius:14px;padding:14px;background:#fff;display:flex;flex-direction:column;gap:10px;align-items:stretch;text-align:left;white-space:normal;min-width:0;color:#24232c}
.product-cost-inline .product-material-choice:hover,.product-cost-inline .product-material-choice.is-selected{border-color:#8050ef;background:#f8f5ff}
.product-cost-inline .material-picture{width:100%;height:100px;max-width:140px;align-self:center;flex-shrink:0;aspect-ratio:1}
.product-cost-inline .material-picture img{width:100%;height:100%;object-fit:contain}
.product-material-choice strong,.product-material-usage strong{font-size:13px;line-height:1.4;overflow-wrap:anywhere}
.product-material-choice>span:last-child{color:#8050ef;font-size:12px}
.product-material-quantity{display:flex;gap:8px;align-items:center}.product-material-quantity input{flex:1;width:0}.product-material-quantity>span{font-size:12px;color:#85828f;min-width:25px}
.product-cost-inline [data-remove-line]{border:0;background:#f4f2f8;color:#605d6c;border-radius:8px;padding:7px;font-size:12px}
.product-material-library{padding:12px 0}.product-material-library>summary{color:#8050ef;font-size:13px;font-weight:600;cursor:pointer}
.product-cost-conflict{background:#fff8e6;border-radius:10px;padding:12px;font-size:13px;line-height:1.6}
@media(max-width:600px){.product-cost-inline .product-cost-editor{padding:16px}.product-material-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.product-material-usage,.product-cost-inline .product-material-choice{padding:10px}.product-cost-inline footer{flex-wrap:wrap}.product-cost-inline footer small{max-width:none}}
@media(prefers-reduced-motion:reduce){.product-cost-track{transition:none}.product-cost-flow.is-editing [data-cost-browse]{transition:none}}
.product-cost-inline [data-physical]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}
.product-cost-inline [data-physical]>div{min-width:0;background:#faf9fc;border:1px solid #eeedf4;border-radius:14px;padding:18px}
.product-cost-inline [data-physical]>a{grid-column:1/-1;margin:0}
.product-cost-inline .material-picture{width:100px;height:100px;margin:0 auto}
@media(max-width:760px){.product-cost-inline [data-physical]{grid-template-columns:1fr;gap:16px}.product-cost-inline [data-physical]>div{padding:14px}}
/* Viewport-contained production studio. Only the track animates; page position stays put. */
.product-cost-flow.is-studio{position:fixed;top:var(--studio-top);left:var(--studio-left);width:var(--studio-width);height:calc(100dvh - var(--studio-top) - 18px);z-index:24;background:var(--page-bg,#f6f5f9);overflow:hidden;overflow-anchor:none}
.product-cost-flow.is-studio .product-cost-track{height:100%;align-items:stretch}
.product-cost-flow.is-studio .product-cost-slide{height:100%;min-height:0;max-height:none;overflow:hidden}
.production-studio.product-cost-inline{height:100%;min-height:0;border:1px solid #e4e1ed;border-radius:20px;background:#fff;overflow:hidden}
.production-studio>form{height:100%;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:0;margin:0;overflow:hidden}
.production-studio.product-cost-inline header{display:flex;justify-content:flex-start;align-items:center;gap:14px;padding:14px 20px;border:0;min-height:0;background:#fff;position:static}
.production-studio header>button{flex:0 0 36px;width:36px;height:36px;border-radius:12px;padding:0}
.production-studio header>div{min-width:0}.production-studio header h2{font-size:18px;line-height:1.3;margin:2px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.production-studio header p,.production-studio header small{font-size:12px;color:#85818f;margin:0}
.production-type{padding:8px 20px 14px;display:flex;align-items:center;gap:20px;border-bottom:1px solid #efedf4;font-size:13px;font-weight:600}.production-type>div{display:flex;gap:8px}.production-type button{min-height:36px;padding:8px 16px;border:1px solid #e7e3ee;border-radius:12px;background:#faf9fc;color:#777281;font-size:13px}.production-type button[aria-pressed=true]{background:#eee7ff;border-color:#966aff;color:#7542d7}
.production-studio-body{min-height:0;display:grid;grid-template-columns:minmax(0,1.7fr) minmax(260px,1fr);gap:18px;padding:16px 20px;overflow:hidden}
.production-studio-body>[hidden]{display:none!important}.production-studio-body h3{font-size:14px;margin:0;font-weight:650}.production-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.production-section-heading>button{font-size:12px;color:#8350e9;padding:5px 8px;border:0;background:transparent;white-space:nowrap}
.production-materials{display:flex;flex-direction:column;min-height:0;overflow:hidden}.production-material-search{width:100%;min-height:34px!important;padding:7px 12px!important;font-size:12px!important;margin-bottom:10px}.production-material-scroll{overflow:auto;min-height:0;overscroll-behavior:contain;padding-right:6px;scrollbar-width:thin}
.production-catalog{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:8px}.production-catalog>button{min-width:0;display:flex;flex-direction:column;align-items:stretch;padding:7px;background:#faf9fc;border:1px solid #eeeaf5;border-radius:12px;text-align:left;gap:4px}.production-catalog>button[aria-pressed=true]{border-color:#9264f2;background:#f0eaff}.production-catalog strong{font-size:12px;line-height:1.3;font-weight:600}.production-catalog small{font-size:10px;color:#8a8594}.production-catalog .material-picture{height:90px;width:100%;border-radius:9px;flex:none}
.material-picture.production-material-art{background-image:url('/assets/material-production-v1.png');background-size:400% 500%;background-position:var(--art-x) var(--art-y);background-color:#f6f5f9}
.production-selected{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:8px;margin-bottom:10px}.production-usage{display:flex;gap:8px;align-items:center;padding:8px;border:1px solid #dcd0f5;border-radius:12px;min-width:0;background:#faf8ff}.production-usage .material-picture{width:44px;height:54px;flex:0 0 44px;border-radius:8px}.production-usage>div{min-width:0;flex:1}.production-usage strong{font-size:12px;display:block}.production-usage label{display:flex;align-items:center;gap:4px;font-size:10px;color:#817b8d;margin:3px 0}.production-usage input{width:65px!important;min-height:28px!important;height:28px;padding:3px 6px!important;font-size:12px!important}.production-usage>button{border:0;padding:2px;background:transparent;color:#8a7a9b;width:20px;flex:0 0 20px}
.cost-studio-side{min-height:0;overflow:auto;overscroll-behavior:contain;border-left:1px solid #efedf4;padding-left:18px;scrollbar-width:thin}.cost-studio-side section+section{margin-top:14px;padding-top:14px;border-top:1px solid #efedf4}.production-studio label:not(.production-check){font-size:12px;gap:6px}.cost-studio-side input:not([type=checkbox]),.cost-studio-side select,.production-purchase input{min-height:34px;padding:7px 10px;font-size:13px;border-radius:10px}.cost-studio-side small,.production-purchase small,.production-purchase p,.production-digital p{display:block;color:#898391;font-size:11px;line-height:1.5;margin:6px 0}.cost-studio-side h3{margin-bottom:8px}.production-check{display:flex!important;flex-direction:row!important;align-items:center;gap:6px;font-size:12px!important;font-weight:400!important;margin:0}.production-studio input[type=checkbox]{width:15px;height:15px;min-height:0;accent-color:#8950f5}.production-employee-list{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}.production-employee-list label{display:flex;align-items:center;padding:6px 8px;background:#f7f5fa;border-radius:9px;border:1px solid #ebe6f2}.production-employee-list label:has(:checked){background:#eee6ff;border-color:#b49ae9}.production-employee-list small{font-size:10px;margin:0}.cost-studio-side a{font-size:11px;color:#8250dc}.production-purchase,.production-digital{overflow:auto;min-height:0}.production-purchase-fields{display:grid;gap:14px;margin:20px 0;max-width:430px}.production-digital{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:20px}.production-digital>span{font-size:38px;color:#8954e8}.production-digital p{max-width:320px}
.production-studio.product-cost-inline footer{display:flex;position:static;align-items:center;justify-content:space-between;gap:16px;padding:12px 100px 12px 20px;border-top:1px solid #eeebf4;background:#fff;margin:0}.production-studio footer>div{min-width:0}.production-studio footer small{font-size:11px;color:#898391}.production-studio footer .primary{width:auto;min-width:120px;padding:10px 18px;min-height:38px;border-radius:12px;white-space:nowrap}.production-studio .product-cost-error{font-size:12px;max-height:48px;overflow:auto;margin:2px 0;color:#ad3647}
@media(max-width:760px){.product-cost-flow.is-studio{left:12px;width:calc(100% - 24px);top:90px;height:calc(100dvh - 104px)}.production-studio-body{grid-template-columns:1fr;overflow:auto;padding:12px}.production-materials{min-height:240px;max-height:45dvh}.cost-studio-side{overflow:visible;border-left:0;padding-left:0}.production-type{align-items:flex-start;flex-direction:column;gap:6px;padding:8px 12px}.production-type>div{width:100%;gap:5px}.production-type button{flex:1;font-size:11px;padding:7px}.production-studio.product-cost-inline header{padding:10px 12px}.production-studio header h2{font-size:15px}.production-studio.product-cost-inline footer{padding:10px 72px 10px 12px}.production-studio footer small{display:none}.production-studio footer .primary{min-width:95px}}
@media(prefers-reduced-motion:reduce){.product-cost-track{transition:none!important}}
.product-cost-flow.is-studio .product-cost-track{grid-template-rows:minmax(0,1fr);min-height:0}
.product-cost-flow.is-studio [data-cost-browse]{min-height:0;overflow:hidden}
.production-studio [data-packaging]{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.production-studio [data-filling-lines]{grid-column:1 / -1;grid-row:2}
.production-studio [data-filling-lines]:empty{display:none}
.cost-studio-side .production-employees>label{display:grid;grid-template-columns:minmax(0,1fr) 90px;align-items:center}
.cost-studio-side section:last-child>label{display:grid;grid-template-columns:minmax(0,1fr) 120px;align-items:center}
.production-studio .cost-studio-side{padding-bottom:6px}
.production-studio .cost-studio-side label{margin:0}
.production-studio [data-packaging]>label{display:flex;flex-direction:column}
.production-studio.product-cost-inline header{padding:10px 20px}
.production-studio header small{display:none}
.production-type{padding-top:6px;padding-bottom:8px}
.production-studio.product-cost-inline footer{padding-top:10px;padding-bottom:10px}
.production-selected{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.production-usage label{white-space:nowrap}
.products-costs-page [data-cost-browse]>.live-heading{margin-bottom:12px;gap:12px;align-items:center}
.products-costs-page [data-cost-browse]>.live-heading h1{font-size:26px;line-height:1.2;margin:0}
.products-costs-page [data-cost-browse]>.live-heading p{font-size:12px;line-height:1.4;margin:5px 0 0}
.products-costs-page .product-cost-toolbar{gap:16px;padding-bottom:12px;font-size:12px}
.products-costs-page .product-cost-search input{min-height:36px;height:36px;padding:8px 12px;font-size:13px}
.products-costs-page .product-cost-search{max-width:420px}
.material-picture.has-image{background:#f6f5fa!important;overflow:hidden;aspect-ratio:1}
.material-picture.has-image img{width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important;display:block}
.production-material-scroll,.cost-studio-side{overscroll-behavior:contain}
.business-preferences-grid{display:grid;gap:18px;max-width:520px}
.material-inventory-toolbar{max-width:440px;margin:12px 0 20px}
.material-inventory-section{margin:22px 0}
.material-inventory-section h2{display:flex;align-items:center;gap:10px;font-size:17px}
.material-inventory-section h2 small{color:var(--muted,#85828f);font-size:12px;font-weight:400}
/* Shared cards keep inventory and the product material picker visually identical. */
.material-catalog-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:8px}
.material-catalog-card{min-width:0;display:flex;flex-direction:column;align-items:stretch;padding:7px;background:#faf9fc;border:1px solid #eeeaf5;border-radius:12px;text-align:left;gap:4px}
.material-catalog-card>.material-picture{width:100%;height:auto;aspect-ratio:1;flex:none;border-radius:9px;margin:0 0 4px}
.material-inventory-card>div{min-width:0;display:flex;flex:1;flex-direction:column;gap:4px}
.material-catalog-card strong{font-size:12px;line-height:1.3;font-weight:600;overflow-wrap:anywhere}
.material-catalog-card small{font-size:10px;color:#8a8594;overflow-wrap:anywhere}
.material-inventory-card button,.material-inventory-card a{font-size:12px;color:#8250df;padding:4px 0;background:transparent;border:0;text-align:center;margin-top:auto}
.production-studio.product-cost-inline header{padding:8px 18px}
.production-studio .production-type{padding:4px 18px 8px}
.production-studio .production-studio-body{padding:12px 18px;gap:16px}
.production-studio .cost-studio-side section+section{margin-top:10px;padding-top:10px}
.production-studio .cost-studio-side h3{margin-bottom:5px}
.production-studio .cost-studio-side small{margin:4px 0;line-height:1.35}
.production-studio .production-employee-list{margin:5px 0;max-height:72px;overflow:auto;overscroll-behavior:contain}
.production-studio .production-employee-list label{padding:4px 6px}
.production-studio.product-cost-inline footer{padding-right:118px}
@media(max-height:780px) and (min-width:761px){.production-studio .production-type button{min-height:30px;padding:6px 10px}.production-studio header h2{font-size:16px}.production-studio .cost-studio-side input:not([type=checkbox]),.production-studio .cost-studio-side select{min-height:30px;height:30px;padding:4px 8px}.production-studio .production-section-heading{margin-bottom:6px}}
/* One shared material workspace for production and packaging; rings stay inside inputs. */
.production-workspace{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;padding:3px}
.material-workspace-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #efedf4;margin-bottom:12px;flex-wrap:wrap}
.material-purpose-tabs{display:flex;gap:18px;background:transparent;padding:0;margin:0}
.material-purpose-tabs button{padding:8px 2px;min-height:34px;border:0;border-bottom:2px solid transparent;background:transparent;color:#817b8c;font-size:12px;border-radius:0;box-shadow:none}
.material-purpose-tabs button[aria-pressed=true]{background:transparent;color:#7543d6;border-bottom-color:#966aff}
.material-workspace-toolbar>.production-check{font-size:11px!important;padding-bottom:6px}
.production-studio .production-type{gap:12px;align-items:center}
.production-type>span{font-size:11px;color:#817b8c;white-space:nowrap}
.production-workspace>section{flex:1;min-height:0}
.production-workspace [hidden],.production-usage [hidden],.production-studio [data-material-section][hidden]{display:none!important}
.production-workspace .production-material-scroll{padding:3px 8px 6px 3px}
.production-workspace .production-purchase{padding:4px 8px 8px 4px}
.production-studio input:focus,.production-studio select:focus{outline:2px solid #a984f5!important;outline-offset:-2px!important;box-shadow:none!important}
.production-studio .production-usage{align-items:flex-start}
.production-usage .material-entry-mode{display:flex;gap:3px;margin:6px 0}
.production-usage .material-entry-mode button{border:1px solid #e4deed;border-radius:7px;padding:4px 7px;min-height:24px;background:#fff;color:#847b92;font-size:10px;width:auto}
.production-usage .material-entry-mode button[aria-pressed=true]{background:#eee5ff;color:#7844d7;border-color:#c7a9f9}
.production-usage .material-dimension-inputs{display:grid;grid-template-columns:minmax(0,1fr) 10px minmax(0,1fr) 48px;gap:4px;align-items:end}
.production-usage .material-dimension-inputs label{display:flex;flex-direction:column;align-items:stretch;font-size:10px;min-width:0;white-space:normal}
.production-usage .material-dimension-inputs input{width:100%!important;min-width:0}
.production-usage .material-dimension-inputs>span{line-height:30px;text-align:center;color:#918699}
.material-area-total{font-size:10px;color:#81768d;display:block;margin-top:3px}
.production-studio .packaging-catalog-link{font-size:12px;padding:8px 10px;border-radius:10px;border:1px solid #e5daF5;background:#f8f5fd;color:#8150dd;text-align:left}
.production-studio .production-catalog .material-picture.has-image{width:100%;height:auto;aspect-ratio:1;align-self:stretch;margin:0 0 4px;display:flex;padding:0;background-image:none!important}
.material-picture.has-image{position:relative;box-sizing:border-box;background-image:none!important}
.material-picture.has-image img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;transform:none!important;margin:0!important;padding:0!important;object-fit:contain!important;object-position:center!important}
.production-studio .production-selected{grid-template-columns:repeat(auto-fill,minmax(285px,1fr))}
@media(max-width:760px){.production-workspace{min-height:280px;max-height:48dvh}.production-workspace .production-materials{max-height:none;min-height:0}.production-studio .production-selected{grid-template-columns:1fr}}
/* Shared finance period and compact, image-led order entry. */
.finance-shared-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 16px;min-height:40px}
.finance-display-note{font-size:12px;color:var(--muted,#858392)}.finance-display-note small{display:block;font-size:10px;margin-top:3px}.finance-calendar{position:relative;margin-left:auto}.finance-calendar summary{cursor:pointer;list-style:none}.finance-calendar summary::-webkit-details-marker{display:none}.finance-calendar .overview-calendar-menu{position:absolute;right:0;top:calc(100% + 8px);width:280px;z-index:30;background:var(--panel,#fff);border:1px solid var(--line,#e9e7f0);border-radius:16px;padding:16px;box-shadow:0 12px 32px #24212e16}.finance-calendar form{display:grid;grid-template-columns:1fr 1fr;gap:10px}.finance-calendar label{min-width:0;font-size:12px}.finance-calendar input{width:100%;min-width:0;padding:8px}.finance-calendar button,.finance-calendar [role=alert]{grid-column:1/-1}.finance-calendar [role=alert]:empty{display:none}
.monthly-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.monthly-summary article{background:var(--panel,#fff);border:1px solid var(--line,#e9e7f0);border-radius:16px;padding:18px;display:flex;flex-direction:column;gap:8px;min-width:0}.monthly-summary article:first-child{background:#f0e9ff}.monthly-summary small{font-size:12px;color:var(--muted,#858392)}.monthly-summary strong{font-size:clamp(20px,2vw,30px);line-height:1.2;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.monthly-summary span{font-size:11px;color:var(--muted,#858392)}.monthly-review-strip{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:12px;padding:14px 4px}.monthly-divider{margin:0 8px}.monthly-breakdown>header{display:flex;align-items:center;justify-content:space-between}.monthly-breakdown>header h2{margin:0}.monthly-breakdown>header small{color:var(--muted,#858392)}.monthly-ledgers{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:20px;margin-top:16px}.monthly-ledgers h3{font-size:12px;color:var(--muted,#858392);margin:0 0 10px}.monthly-ledgers dl{margin:0}.monthly-ledgers dl>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;padding:9px 0;border-bottom:1px solid var(--line,#eeedf4);font-size:12px;align-items:center}.monthly-ledgers dd{margin:0;text-align:right;font-weight:600;font-variant-numeric:tabular-nums}.monthly-ledgers dt{color:var(--muted,#858392)}.monthly-result{display:flex;justify-content:space-between;gap:12px;background:#f1ebff;border-radius:10px;padding:12px;margin-top:10px;font-size:13px}.monthly-basis{margin:12px 0}
.manual-order-dialog{width:min(720px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:22px;border:1px solid #e7e3ef;border-radius:24px;background:var(--panel,#fff);color:var(--text,#24232b);box-shadow:0 24px 90px #24212e33;overflow:auto;font:inherit}.manual-order-dialog::backdrop{background:#25213666;backdrop-filter:blur(3px)}.manual-order-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.manual-order-dialog h2{font-size:20px;margin:0 0 4px}.manual-order-dialog header small{color:var(--muted,#858392);font-size:12px}.manual-order-dialog [data-close-manual]{width:34px;height:34px;border:0;background:#f4f2f8;border-radius:12px;padding:0;font-size:22px}.manual-order-form{display:grid;gap:12px}.manual-order-form label{display:flex;flex-direction:column;gap:5px;font-size:12px;min-width:0}.manual-order-form input,.manual-order-form select{width:100%;height:40px;padding:8px 12px;border:1px solid #e6e3ed;border-radius:12px;font:inherit;background:var(--panel,#fff);color:inherit;box-sizing:border-box}.manual-order-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.manual-product-mode{display:flex;gap:4px;background:#f4f2f8;border-radius:12px;padding:4px;width:fit-content}.manual-product-mode button{border:0;background:transparent;font-size:12px;padding:8px 14px;border-radius:9px}.manual-product-mode [aria-pressed=true]{color:#7b49ed;background:white;box-shadow:0 2px 5px #24212e0b}.manual-product-options{height:148px;overflow:auto;margin-top:8px;border:1px solid #e6e3ed;border-radius:12px;padding:4px;overscroll-behavior:contain}.manual-product-options>button{display:flex;align-items:center;gap:10px;text-align:left;width:100%;border:1px solid transparent;border-radius:9px;padding:6px;background:transparent;min-height:48px}.manual-product-options>button[aria-pressed=true]{background:#f0e9ff;border-color:#ba9fff}.manual-product-options img,.manual-product-options>button>span:first-child{width:36px;height:36px;border-radius:8px;object-fit:cover;flex-shrink:0}.manual-product-options>button>span{font-size:12px;flex:1;min-width:0}.manual-product-options small{font-size:10px;color:var(--muted,#858392);white-space:nowrap}.manual-product-options>p{font-size:12px;padding:8px;color:var(--muted,#858392)}.manual-order-price-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.manual-order-note:empty{display:none}.manual-order-note{font-size:11px;color:var(--muted,#858392);margin:0}.manual-order-address>summary{font-size:12px;cursor:pointer;color:var(--muted,#858392)}.manual-order-address[open]>div{margin-top:8px}.manual-order-bottom{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #eae7f1;padding-top:14px;gap:12px}.manual-order-bottom small{display:block;font-size:11px;color:var(--muted,#858392)}.manual-order-bottom strong{display:block;font-size:20px;margin-top:3px}.manual-order-bottom button{padding:10px 22px}.manual-order-form [hidden]{display:none!important}.manual-order-form .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(max-width:800px){.monthly-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.finance-shared-toolbar{gap:8px}.finance-display-note small{max-width:140px}.finance-calendar summary{font-size:11px;padding:10px!important}.manual-order-dialog{padding:16px}.manual-order-price-grid{gap:8px}.manual-product-options small{display:none}}
/* Report layout owns its rows; legacy monthly grid must not split metric cards. */
#live-main[data-finance-view=monthly] #monthly-results{display:flex;flex-direction:column;gap:12px}
#live-main[data-finance-view=monthly] .monthly-breakdown{padding:18px!important}
#live-main[data-finance-view=monthly] .monthly-breakdown>header{position:static;padding:0 0 12px;margin:0;border-bottom:1px solid var(--line,#e9e7f0);min-height:0;background:none;border-radius:0;box-shadow:none}
#live-main[data-finance-view=monthly] .monthly-review-strip{padding:0 4px 4px}
.monthly-ledgers>article>dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 30px}
@media(max-width:700px){.monthly-ledgers>article>dl{grid-template-columns:1fr}.monthly-summary article{padding:14px}.monthly-summary strong{font-size:22px}}
.manual-order-dialog>header{position:static!important;min-height:0!important;height:auto!important;padding:0!important;border:0!important;margin:0 0 14px!important;background:none!important;box-shadow:none!important}
.manual-order-dialog .manual-order-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px}
.manual-order-dialog .manual-order-product-grid{display:block}
.manual-order-dialog .manual-order-product-grid:has(>[hidden]):not(:has(>label:not([hidden]))){display:none}
.manual-order-dialog .manual-order-price-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0}
.manual-order-dialog .manual-order-form label{gap:4px;font-size:12px;margin:0}
.manual-order-dialog .manual-order-form input,.manual-order-dialog .manual-order-form select{height:38px}
.manual-order-dialog .manual-order-bottom{margin:0;padding-top:12px}
.manual-order-dialog .manual-product-options{height:120px}
.manual-order-dialog .manual-product-options>button{justify-content:flex-start;text-align:left}
.manual-order-dialog .manual-product-options>button>span{width:auto;height:auto;text-align:left}
.manual-order-dialog .manual-product-options>button>span:first-child{width:36px;height:36px;flex:0 0 36px;display:grid;place-items:center}
#live-main[data-finance-view=monthly] .monthly-breakdown>header{height:auto!important;min-height:0!important;padding:0 0 12px!important}
.manual-order-dialog .manual-order-price-grid{align-items:end}

/* Finance navigation stays mounted while report data refreshes. */
#finance-navigation .page-tabs{margin-bottom:10px} .finance-shared-toolbar{justify-content:flex-end;min-width:0;margin-bottom:12px}
.finance-calendar{flex:0 1 auto;max-width:100%}.finance-calendar>.store-period{width:auto;max-width:none;min-width:0;white-space:nowrap;display:flex;gap:8px;padding:10px 14px;font-size:12px;line-height:1.4}.finance-calendar>.store-period svg{width:16px;height:16px;flex-shrink:0}
.ct-change-hint{display:block;font-size:10px;font-weight:400;color:var(--muted,#85818f);text-transform:none;letter-spacing:0}.payment-period-empty{padding:12px 16px;border-radius:14px;background:#f5f2fc;margin-bottom:12px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
@media(max-width:480px){.finance-calendar>.store-period{font-size:11px;padding:9px 10px}.finance-calendar .overview-calendar-menu{max-width:calc(100vw - 40px)}}

.refund-products{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:16px;align-items:start}.refund-product-card{border:1px solid #e9e5f3;border-radius:18px;background:white;overflow:hidden;max-width:300px}.refund-product-photo{aspect-ratio:1;background:#f5f4f8}.refund-product-photo .order-product-cover{display:block;width:100%;height:100%;border:0;border-radius:0}.refund-product-photo img{width:100%;height:100%;object-fit:cover}.refund-product-body{padding:14px;display:grid;gap:9px}.refund-product-body h2{font-size:14px;line-height:1.4;margin:0}.refund-product-body p{font-size:12px;line-height:1.5;margin:0;color:#777281}.refund-order{display:flex;align-items:center;gap:7px;font-size:11px;min-width:0}.refund-order>span{overflow-wrap:anywhere}.refund-financial-status{font-size:11px;color:#7450be}.refund-product-body>small{font-size:11px;color:#817c8c}.refund-receive{font-size:12px;padding:8px 10px;background:#f0eafa;color:#7745d5;border:0;border-radius:11px}.refund-history{margin-top:18px}.refund-receipt-dialog,.manual-return-dialog{width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow:auto;border:1px solid #e9e5f3;border-radius:22px;padding:24px}.refund-receipt-dialog::backdrop,.manual-return-dialog::backdrop{background:#25233270;backdrop-filter:blur(3px)}.refund-receipt-form{display:grid;gap:14px}.refund-receipt-form header{display:flex;justify-content:space-between;gap:16px}.refund-receipt-form h2{font-size:18px;margin:0 0 6px}.refund-receipt-form p,.refund-receipt-form small{color:#817c8c;font-size:12px;line-height:1.5;margin:0}.refund-receipt-form [role=alert]{color:#ad3434}.refund-receipt-form .return-fields{display:grid;grid-template-columns:1fr 2fr;gap:12px}.manual-return-dialog .returns-workbench{display:block}.manual-return-dialog .return-entry{border:0;padding:0}.manual-return-dialog .returns-toolbar{justify-content:flex-end}.refund-products>.empty{grid-column:1/-1}

#live-main[data-page="finance"] .finance-calendar>.store-period{padding:10px 14px;min-height:38px;width:auto;max-width:100%;gap:8px;white-space:nowrap}

.refund-product-photo .order-product-cover{display:grid;place-items:center}.refund-product-photo .order-product-cover>svg{width:32px;height:32px;color:var(--muted)}
.refund-receipt-form>header{position:static!important;min-height:0!important;height:auto!important;padding:0!important;margin:0!important;box-shadow:none!important;border:0!important;background:none!important}
.refund-receipt-form [data-close]{width:32px;height:32px;min-width:32px;padding:0;border:0;border-radius:10px;background:var(--soft,#f4f2f8);font-size:20px}
#finance-navigation .page-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;max-width:100%}#finance-navigation .page-tabs>a{flex:none}
.refund-receipt-dialog .refund-receipt-form>.return-fields{display:grid;grid-template-columns:110px minmax(0,1fr);gap:12px}.refund-receipt-dialog .return-fields>label{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:12px;margin:0}.refund-receipt-dialog .return-fields input,.refund-receipt-dialog .return-fields select{box-sizing:border-box;width:100%;height:40px;min-width:0;padding:8px 10px;font:inherit}.refund-order .marketplace-mark{width:22px;height:22px;flex:0 0 22px}.refund-order .marketplace-mark img{width:100%;height:100%;object-fit:contain}
@media(max-width:480px){.refund-receipt-dialog{padding:18px}.refund-receipt-dialog .refund-receipt-form>.return-fields{grid-template-columns:80px minmax(0,1fr)}}
.refund-receipt-dialog .return-fields>label{grid-column:auto!important}
