/* SAMAMI ERP 2026 — five work areas, restrained functional interface.
   Strictly enterprise-scoped. Light/dark follow the current document theme. */
.samami-enterprise-shell .sam-erp-five{
  --sam-erp-bg:#ffffff;--sam-erp-ink:#152337;--sam-erp-muted:#526276;--sam-erp-line:#dce4ec;
  --sam-erp-focus:#2563eb;--sam-erp-accent:#1d57b5;--sam-erp-hover:#f0f5fb;
  box-sizing:border-box;min-width:0;margin:0 0 18px;padding:17px 18px 16px;
  border:1px solid var(--sam-erp-line);border-radius:18px;
  background:var(--sam-erp-bg);color:var(--sam-erp-ink);
  box-shadow:0 4px 28px rgba(13,39,72,.045);text-align:start;
}
html[data-theme="dark"] .samami-enterprise-shell .sam-erp-five,
html[data-samami-theme="dark"] .samami-enterprise-shell .sam-erp-five{
  --sam-erp-bg:#172231;--sam-erp-ink:#edf4fa;--sam-erp-muted:#b5c4d1;
  --sam-erp-line:#384759;--sam-erp-focus:#78a9ff;
  --sam-erp-accent:#83b0fc;--sam-erp-hover:#223348;
  box-shadow:none;
}
.samami-enterprise-shell .sam-erp-five-header{
 display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap;
}
.samami-enterprise-shell .sam-erp-five-name{display:grid;gap:3px;min-width:0}
.samami-enterprise-shell .sam-erp-five-tag{font-family:system-ui,sans-serif;font-size:10px;font-weight:750;letter-spacing:.08em;color:var(--sam-erp-muted)}
.samami-enterprise-shell .sam-erp-five-name strong{font-size:17px;line-height:1.5;color:var(--sam-erp-ink);font-weight:820}
.samami-enterprise-shell .sam-erp-five-controls{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.samami-enterprise-shell .sam-erp-five-button{
 display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;
 padding:7px 12px;border-radius:10px;border:1px solid var(--sam-erp-line);
 background:var(--sam-erp-bg);color:var(--sam-erp-ink);
 text-decoration:none;font:inherit;font-size:12px;font-weight:650;
 line-height:1.5;cursor:pointer;white-space:normal;text-align:center;
 transition:background .15s ease,border-color .15s ease;
}
.samami-enterprise-shell .sam-erp-five-button:hover{background:var(--sam-erp-hover);border-color:var(--sam-erp-accent)}
.samami-enterprise-shell .sam-erp-five-primary{
 background:#1854aa;color:#fff;border-color:#1854aa;
}
.samami-enterprise-shell .sam-erp-five-primary:hover{background:#0d438e;color:#fff}
.samami-enterprise-shell .sam-erp-five-button:focus-visible,
.samami-enterprise-shell .sam-erp-five-card:focus-visible,
.samami-enterprise-shell .sam-erp-five-pill:focus-visible{outline:2px solid var(--sam-erp-focus);outline-offset:3px}
.samami-enterprise-shell .sam-erp-five-pills{
 display:flex;flex-wrap:wrap;gap:6px;margin-top:13px;
 border-top:1px solid var(--sam-erp-line);padding-top:12px;
}
.samami-enterprise-shell .sam-erp-five-pill{
 display:inline-flex;align-items:center;min-height:32px;min-width:0;
 border:1px solid var(--sam-erp-line);border-radius:999px;padding:5px 10px;
 color:var(--sam-erp-muted);font-size:11px;line-height:1.5;font-weight:650;
 text-decoration:none;white-space:nowrap;
}
.samami-enterprise-shell .sam-erp-five-pill[aria-current="page"]{
 background:var(--sam-erp-hover);border-color:var(--sam-erp-accent);color:var(--sam-erp-accent);
}
.samami-enterprise-shell .sam-erp-five-home{display:grid;gap:13px;margin-top:15px;padding-top:15px;border-top:1px solid var(--sam-erp-line)}
.samami-enterprise-shell .sam-erp-five-intro strong{display:block;color:var(--sam-erp-ink);font-size:15px;font-weight:800}
.samami-enterprise-shell .sam-erp-five-intro p{margin:3px 0 0;font-size:12px;line-height:1.8;color:var(--sam-erp-muted)}
.samami-enterprise-shell .sam-erp-five-grid{
 display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;
}
.samami-enterprise-shell .sam-erp-five-card{
 display:flex;flex-direction:column;gap:12px;align-items:flex-start;justify-content:space-between;
 padding:13px;min-height:104px;min-width:0;overflow-wrap:anywhere;
 text-decoration:none;background:var(--sam-erp-hover);color:var(--sam-erp-ink);
 border:1px solid var(--sam-erp-line);border-radius:13px;font-size:12px;
 font-weight:750;line-height:1.75;transition:border-color .16s,transform .16s;
}
.samami-enterprise-shell .sam-erp-five-card:hover{border-color:var(--sam-erp-accent);transform:translateY(-2px)}
.samami-enterprise-shell .sam-erp-five-card>span{font-size:12px;font-weight:800;font-family:ui-monospace,Consolas,monospace;color:var(--sam-erp-accent)}
.samami-enterprise-shell .sam-erp-five-shortcuts{display:flex;gap:8px;flex-wrap:wrap}

.samami-enterprise-shell.sam-erp-merge-sales .samami-sidebar-nav .samami-workspace-rail-item[data-module-id="sales"],
.samami-enterprise-shell.sam-erp-merge-production .samami-sidebar-nav .samami-workspace-rail-item[data-module-id="production"],
.samami-enterprise-shell.sam-erp-merge-operations .samami-sidebar-nav .samami-workspace-rail-item[data-module-id="service"]{display:none!important}

/* preserve service context in project navigation; no actual route is removed */
.samami-enterprise-shell.sam-erp-service-merged[data-ecosystem-branch="service"] .samami-sidebar-nav .samami-workspace-rail-item[data-module-id="project"]{border-color:var(--os-accent,#7fa7dc)}
/* keep a single primary navigation in desktop: sidebar; pills are only a mobile or collapsed map */
@media(min-width:1024px){
 .samami-enterprise-shell:not(.is-sidebar-collapsed) .sam-erp-five-pills{display:none}
 .samami-enterprise-shell .sam-erp-five-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media(max-width:1023px){
 .samami-enterprise-shell .sam-erp-five-pills{flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:5px;scrollbar-width:thin}
 .samami-enterprise-shell .sam-erp-five-pill{flex:none}
 .samami-enterprise-shell .sam-erp-five-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
 .samami-enterprise-shell .sam-erp-five{padding:13px 12px;border-radius:13px;margin-bottom:12px}
 .samami-enterprise-shell .sam-erp-five-name strong{font-size:15px}
 .samami-enterprise-shell .sam-erp-five-button{min-height:34px;padding:6px 9px;font-size:11px}
 .samami-enterprise-shell .sam-erp-five-search{display:none}
 .samami-enterprise-shell .sam-erp-five-card{min-height:80px;padding:10px}
}
@media(prefers-reduced-motion:reduce){
 .samami-enterprise-shell .sam-erp-five-card,.samami-enterprise-shell .sam-erp-five-button{transition:none!important;transform:none!important}
}
/* contract dialog sits outside React's root, so auth/privacy stays with backend */
.sam-erp-contract-dialog{
 position:fixed;inset:0;margin:auto;box-sizing:border-box;width:min(720px,calc(100vw - 24px));
 max-height:min(88dvh,900px);overflow:auto;border:1px solid #cad7e6;border-radius:20px;
 background:#fff;color:#1b2c40;box-shadow:0 24px 95px rgba(5,21,38,.28);padding:0;
 direction:rtl;text-align:start;font-family:Vazirmatn,Tahoma,"Segoe UI",sans-serif;
}
.sam-erp-contract-dialog::backdrop{background:rgba(8,20,35,.72);backdrop-filter:blur(2px)}
html[lang="en"] .sam-erp-contract-dialog,html[lang="tr"] .sam-erp-contract-dialog{direction:ltr}
html[data-theme="dark"] .sam-erp-contract-dialog,
html[data-samami-theme="dark"] .sam-erp-contract-dialog{background:#182434;border-color:#3a4a5a;color:#f2f7fa}
.sam-erp-contract-form{padding:clamp(14px,2.8vw,25px);display:grid;gap:16px}
.sam-erp-contract-head h2{margin:0;font-size:20px;font-weight:800;line-height:1.5;color:inherit}
.sam-erp-contract-head p{margin:5px 0 0;color:inherit;opacity:.76;font-size:12px;line-height:1.8}
.sam-erp-contract-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.sam-erp-contract-field{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:12px;font-weight:650}
.sam-erp-contract-field[hidden]{display:none!important}
.sam-erp-contract-input{box-sizing:border-box;width:100%;min-width:0;min-height:39px;padding:8px 10px;font:inherit;font-size:13px;line-height:1.65;border:1px solid #bac7d6;border-radius:9px;background:#fff;color:#1b2c40}
html[data-theme="dark"] .sam-erp-contract-input,html[data-samami-theme="dark"] .sam-erp-contract-input{background:#233449;color:#edf5ff;border-color:#526276}
.sam-erp-contract-input:focus-visible{outline:2px solid #3d8bfa;outline-offset:1px}
.sam-erp-contract-field input[type="file"]{font-size:11px}
.sam-erp-contract-wide{grid-column:1/-1}
.sam-erp-contract-feedback{line-height:1.9;font-size:13px}
.sam-erp-contract-feedback.is-error{color:#b42318}
html[data-theme="dark"] .sam-erp-contract-feedback.is-error{color:#ffadad}
.sam-erp-contract-actions,.sam-erp-contract-next{display:flex;flex-wrap:wrap;gap:9px}
.sam-erp-contract-actions{justify-content:flex-end;align-items:center;padding-top:12px;border-top:1px solid #cbd5e1}
.sam-erp-contract-dialog .sam-erp-five-button{display:inline-flex;align-items:center;justify-content:center;min-height:37px;border-radius:9px;padding:8px 13px;border:1px solid #9eb0c5;background:transparent;color:inherit;font:inherit;font-size:12px;font-weight:650;text-decoration:none;cursor:pointer}
.sam-erp-contract-dialog .sam-erp-five-button.sam-erp-five-primary{background:#1854aa;border-color:#1854aa;color:#fff}
.sam-erp-contract-dialog .sam-erp-five-button:disabled{opacity:.5;cursor:wait}
.sam-erp-contract-saved{display:grid;gap:9px;padding:15px;border:1px solid #77ba94;border-radius:11px;background:rgba(22,142,79,.09)}
.sam-erp-contract-saved strong{font-size:14px}
.sam-erp-contract-saved p{margin:0;font-family:Vazirmatn,Consolas,sans-serif;font-weight:800}
.sam-erp-contract-saved small{display:block;line-height:1.8}
@media(max-width:600px){.sam-erp-contract-grid{grid-template-columns:minmax(0,1fr)}.sam-erp-contract-dialog{width:calc(100vw - 14px);max-height:94dvh;border-radius:12px}}

/* The five new start cards replace this exact duplicate old workspace list. */
.samami-enterprise-shell .sam-erp-legacy-branches{display:none!important}
.sam-erp-contract-partial{margin-top:12px;padding:12px 14px;border-radius:10px;border:1px solid #e4bd74;background:rgba(194,128,17,.12);color:inherit}
.sam-erp-contract-partial p{margin:3px 0;font-size:12px;line-height:1.8}
.sam-erp-contract-partial strong{display:block;font-size:13px}
.sam-erp-contract-partial{margin-top:12px;padding:12px 14px;border-radius:10px;border:1px solid #e4bd74;background:rgba(194,128,17,.12);color:inherit}
.sam-erp-contract-partial p{margin:3px 0;font-size:12px;line-height:1.8}
.sam-erp-contract-partial strong{display:block;font-size:13px}

.samami-enterprise-shell .sam-erp-retired-warning{margin-top:12px;border-radius:12px;padding:12px 14px;border:1px solid #d6a34a;background:rgba(231,168,56,.09);color:var(--sam-erp-ink)}
.samami-enterprise-shell .sam-erp-retired-warning strong{display:block;font-size:13px}
.samami-enterprise-shell .sam-erp-retired-warning p{font-size:12px;line-height:1.8;color:var(--sam-erp-muted);margin:4px 0 10px}
.samami-enterprise-shell .sam-erp-retired-actions{display:flex;gap:7px;flex-wrap:wrap}

/* V22+10: ERP one-header / one-navigation information architecture.
   The sidebar is the only primary area chooser. The existing role-gated
   contextual tabs are the only secondary area chooser.
   Preserve business forms, alerts and API writes. */
.samami-enterprise-shell .sam-erp-five.sam-erp-five-minimal{
  width:100%;max-width:none;min-height:0;margin:0 0 10px!important;
  padding:0!important;border:0!important;background:transparent!important;
  box-shadow:none!important;border-radius:0!important;
}
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-five-controls{
  display:flex;align-items:center;justify-content:flex-start;gap:6px;flex-wrap:wrap;
}
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-five-button{
  display:inline-flex;align-items:center;min-height:32px;padding:5px 10px!important;
  font-size:11px!important;line-height:1.5!important;border-radius:9px!important;
  border:1px solid var(--sam-erp-line)!important;
  background:var(--sam-erp-bg)!important;color:var(--sam-erp-ink)!important;
  white-space:normal;max-width:100%;
}
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-five-button:hover{
  background:var(--sam-erp-hover)!important;border-color:var(--sam-erp-accent)!important;
}
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-five-button.sam-erp-five-primary{
  background:#1854aa!important;border-color:#1854aa!important;color:#fff!important;
}
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-five-button.sam-erp-five-primary:hover{
  background:#103c77!important;
}
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-five-home-actions{display:flex;gap:7px;flex-wrap:wrap}
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-retired-warning{
 margin:8px 0 0;max-width:100%;padding:9px 12px;border-radius:10px;
}
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-retired-warning summary{
 cursor:pointer;font-weight:700;font-size:12px;line-height:1.6;
}
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-retired-warning:not([open])>*:not(summary){display:none}
/* Suppress duplicated eyebrow, page description and marketing walkthrough
   only where the real functional page title is present. */
.samami-enterprise-shell .erp-page-surface .samami-page-shell .samami-page-header .samami-page-context-line,
.samami-enterprise-shell .erp-page-surface .samami-page-shell .samami-page-header .samami-page-description,
.samami-enterprise-shell .erp-page-surface .sam-sales-family-nav__context{
 display:none!important;
}
.samami-enterprise-shell .erp-page-surface .samami-page-shell .samami-page-header{
  display:flex;flex-direction:column;gap:0!important;
  margin:0 0 12px!important;padding:0 0 10px!important;
  border-bottom:1px solid var(--sam-erp-line,#dde4ec)!important;
}
.samami-enterprise-shell .erp-page-surface .samami-page-shell .samami-page-header-row{
  display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;
  gap:8px!important;margin:0!important;
}
.samami-enterprise-shell .erp-page-surface .samami-page-shell .samami-page-header h1{
  font-size:clamp(17px,2vw,23px)!important;line-height:1.55!important;
  font-weight:800!important;letter-spacing:0!important;margin:0!important;
}
.samami-enterprise-shell .erp-page-surface .samami-page-shell .samami-page-actions{
  display:flex;flex-wrap:wrap;gap:6px;
}
/* Secondary navigation: the real permission-gated tabs already rendered by
   each business area, not another global breadcrumb/pill set. */
.samami-enterprise-shell .erp-page-surface .sam-sales-family-nav{
 min-width:0!important;max-width:100%!important;margin:0 0 13px!important;
 padding:0!important;border:0!important;background:transparent!important;
 box-shadow:none!important;
}
.samami-enterprise-shell .erp-page-surface .sam-world-section-nav{
 display:flex!important;align-items:center;gap:4px!important;
 min-width:0;max-width:100%;width:100%;
 overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;
 margin:0 0 12px!important;padding:0 0 7px!important;
 border:0!important;border-bottom:1px solid var(--sam-erp-line,#dde4ec)!important;
 border-radius:0!important;background:transparent!important;
 box-shadow:none!important;white-space:nowrap;
 -webkit-overflow-scrolling:touch;
}
.samami-enterprise-shell .erp-page-surface .sam-world-section-nav a,
.samami-enterprise-shell .erp-page-surface .sam-world-section-nav button{
 display:inline-flex!important;flex:none!important;justify-content:center;
 align-items:center;gap:5px;min-height:36px!important;padding:7px 13px!important;
 margin:0!important;border:1px solid transparent!important;border-radius:9px!important;
 background:transparent!important;color:var(--sam-erp-muted,#526276)!important;
 box-shadow:none!important;font-size:12px!important;font-weight:670!important;
 line-height:1.5!important;text-decoration:none!important;
}
.samami-enterprise-shell .erp-page-surface .sam-world-section-nav [aria-current="page"],
.samami-enterprise-shell .erp-page-surface .sam-world-section-nav .is-active{
 background:var(--sam-erp-hover,#edf4fb)!important;
 color:var(--sam-erp-accent,#1d57b5)!important;
 border-color:var(--sam-erp-line,#dce4ec)!important;
 font-weight:800!important;
}
.samami-enterprise-shell .erp-page-surface .sam-world-section-nav a:hover,
.samami-enterprise-shell .erp-page-surface .sam-world-section-nav button:hover{
 background:var(--sam-erp-hover,#edf4fb)!important;color:var(--sam-erp-ink,#152337)!important;
}
.samami-enterprise-shell .erp-page-surface .sam-world-section-nav a:focus-visible,
.samami-enterprise-shell .erp-page-surface .sam-world-section-nav button:focus-visible{
 outline:2px solid #2563eb!important;outline-offset:1px;
}
/* Customer list and product catalog are operational pages, not educational
   landing pages; remove only their duplicated explanatory microcopy. */
.samami-enterprise-shell .sam-customers-world .sam-customer-master .erp-section-description,
.samami-enterprise-shell .sam-customers-world .sam-customer-master .erp-section-label{
 display:none!important;
}
.samami-enterprise-shell .erp-page-surface .sam-world-page .samami-page-header-row,
.samami-enterprise-shell .erp-page-surface .sam-world-page .samami-page-title-row{
 min-width:0;max-width:100%;
}
.samami-enterprise-shell .erp-page-surface .sam-world-page{
 min-width:0!important;max-width:100%!important;
}
/* Keep end-user errors, success states, validation explanations, approvals,
   data tables, and contract metadata visible. Nothing here disables saving. */
@media(max-width:680px){
 .samami-enterprise-shell .sam-erp-five.sam-erp-five-minimal{margin-bottom:8px!important}
 .samami-enterprise-shell .erp-page-surface .samami-page-shell .samami-page-header-row{align-items:flex-start}
 .samami-enterprise-shell .erp-page-surface .sam-world-section-nav a,
 .samami-enterprise-shell .erp-page-surface .sam-world-section-nav button{
  min-height:36px!important;padding:7px 10px!important;font-size:11px!important;
 }
}

/* Shared colors must be defined on the whole shell, not only on the back
   toolbar; this prevents dark-on-dark labels in native contextual tabs. */
.samami-enterprise-shell{
 --sam-erp-bg:#fff;--sam-erp-ink:#182c43;--sam-erp-muted:#56677b;
 --sam-erp-line:#dbe3ec;--sam-erp-hover:#edf4fa;--sam-erp-accent:#1958b3;
}
html[data-theme="dark"] .samami-enterprise-shell,
html[data-samami-theme="dark"] .samami-enterprise-shell,
html.dark .samami-enterprise-shell{
 --sam-erp-bg:#192635;--sam-erp-ink:#f3f7fd;--sam-erp-muted:#afc1d3;
 --sam-erp-line:#3c4a5c;--sam-erp-hover:#25364b;--sam-erp-accent:#9fc5ff;
}
/* When the hidden specialized door is active, highlight its visible parent. */
.samami-enterprise-shell[data-sam-erp-active-area="sales"] .samami-sidebar-nav [data-module-id="customers"],
.samami-enterprise-shell[data-sam-erp-active-area="operation"] .samami-sidebar-nav [data-module-id="project"],
.samami-enterprise-shell[data-sam-erp-active-area="finance"] .samami-sidebar-nav [data-module-id="finance"],
.samami-enterprise-shell[data-sam-erp-active-area="management"] .samami-sidebar-nav [data-module-id="products"]{
 background:var(--sam-erp-hover)!important;color:var(--sam-erp-accent)!important;
 border-color:var(--sam-erp-line)!important;
}
.samami-enterprise-shell[data-sam-erp-active-area="sales"] .samami-sidebar-nav [data-module-id="customers"] .samami-workspace-rail-label,
.samami-enterprise-shell[data-sam-erp-active-area="operation"] .samami-sidebar-nav [data-module-id="project"] .samami-workspace-rail-label{
 color:inherit!important;
}
/* One contextual strip for older pages that have no built-in role-gated tabs.
   It is removed dynamically if the page later renders its native tab set. */
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-context-tabs{
 display:flex;align-items:center;gap:5px;max-width:100%;min-width:0;
 overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;
 padding:7px 0!important;margin:8px 0 0!important;
 border:0!important;border-bottom:1px solid var(--sam-erp-line)!important;
 background:transparent!important;-webkit-overflow-scrolling:touch;
}
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-context-tab{
 display:inline-flex;align-items:center;justify-content:center;flex:none;
 border:1px solid transparent!important;border-radius:9px!important;
 padding:7px 12px!important;min-height:34px!important;white-space:nowrap;
 text-decoration:none!important;background:transparent!important;
 font-size:12px!important;line-height:1.5!important;font-weight:650!important;
 color:var(--sam-erp-muted)!important;
}
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-context-tab:hover{
 color:var(--sam-erp-ink)!important;background:var(--sam-erp-hover)!important;
}
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-context-tab[aria-current="page"]{
 color:var(--sam-erp-accent)!important;background:var(--sam-erp-hover)!important;
 border-color:var(--sam-erp-line)!important;font-weight:800!important;
}
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-context-tab:focus-visible{
 outline:2px solid var(--sam-erp-accent)!important;outline-offset:2px;
}
@media(max-width:550px){
 .samami-enterprise-shell .sam-erp-five-minimal .sam-erp-context-tab{
  font-size:11px!important;min-height:33px!important;padding:6px 10px!important;
 }
}
/* Role/permission coherence with the deployed API. Never grant access
   client-side; only prevent unauthorized links and offer a clear next step. */
.samami-enterprise-shell[data-sam-erp-production-access="denied"] .samami-sidebar-workspaces [data-module-id="production"],
.samami-enterprise-shell[data-sam-erp-production-access="denied"] a[href="/production"],
.samami-enterprise-shell[data-sam-erp-office-access="denied"] .samami-sidebar-workspaces [data-module-id="customers"],
.samami-enterprise-shell[data-sam-erp-office-access="denied"] a[href="/customers"]{
 display:none!important;
}
.samami-enterprise-shell .sam-erp-permission-guide{
 display:grid;justify-items:start;gap:7px;margin:10px 0 0;padding:12px 15px;
 border:1px solid #d6a34a;border-radius:11px;color:var(--sam-erp-ink);
 background:rgba(231,168,56,.09);
}
.samami-enterprise-shell .sam-erp-permission-guide strong{font-size:13px;font-weight:800}
.samami-enterprise-shell .sam-erp-permission-guide p{
 margin:0;color:var(--sam-erp-muted);font-size:12px;line-height:1.8
}

/* v22+11 — collapse the full-width educational help banner. Accessible help
   remains one click away as a small question-mark action. No business
   messages, validation summaries or save actions are hidden. */
.samami-enterprise-shell main[data-qa="erp-main"]{
 position:relative;
}
.samami-enterprise-shell main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"]{
 position:absolute!important;
 z-index:12;
 top:5px!important;
 inset-inline-end:14px!important;
 inset-inline-start:auto!important;
 width:32px!important;
 min-height:32px!important;
 max-height:unset!important;
 margin:0!important;
 padding:0!important;
 border:0!important;
 border-radius:10px!important;
 background:transparent!important;
 box-shadow:none!important;
 overflow:visible!important;
}
.samami-enterprise-shell main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"] > summary{
 display:flex!important;
 align-items:center!important;
 justify-content:center!important;
 box-sizing:border-box!important;
 width:32px!important;
 height:32px!important;
 min-height:32px!important;
 padding:0!important;
 border:1px solid var(--sam-erp-line,#dce4ec)!important;
 border-radius:10px!important;
 background:var(--sam-erp-bg,#fff)!important;
 color:var(--sam-erp-ink,#152337)!important;
 font-size:0!important;
 line-height:1!important;
 list-style:none!important;
 cursor:pointer;
}
.samami-enterprise-shell main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"] > summary::-webkit-details-marker{display:none!important}
.samami-enterprise-shell main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"] > summary::after{
 content:"?"!important;
 display:inline-block!important;
 font-family:system-ui,sans-serif!important;
 font-size:16px!important;
 font-weight:750!important;
 line-height:1!important;
 color:inherit!important;
}
.samami-enterprise-shell main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"] > summary:focus-visible{
 outline:2px solid var(--sam-erp-accent,#1d57b5)!important;
 outline-offset:3px!important;
}
.samami-enterprise-shell main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"][open]{
 width:min(340px,calc(100vw - 28px))!important;
 padding:10px!important;
 background:var(--sam-erp-bg,#fff)!important;
 border:1px solid var(--sam-erp-line,#dce4ec)!important;
 border-radius:13px!important;
 box-shadow:0 8px 28px rgba(10,24,48,.15)!important;
}
.samami-enterprise-shell main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"][open] > summary{
 margin-inline-start:auto!important;
 margin-inline-end:0!important;
}
.samami-enterprise-shell main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"] > .sam-work-guide__text{
 padding:6px 3px 0!important;
 margin:0!important;
 font-size:12px!important;
 line-height:1.9!important;
 color:var(--sam-erp-muted,#56677b)!important;
 text-align:start!important;
}
@media(max-width:520px){
 .samami-enterprise-shell main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"]{
 top:4px!important;
 inset-inline-end:8px!important;
 }
}


/* 2026-11-21: ERP shell refinement. The native page heading owns the title;
   the single Back action is no longer presented as a second dashboard card.
   Existing native/role-scoped section tabs and contract action stay visible. */
.samami-enterprise-shell main[data-qa="erp-main"] > .sam-erp-five.sam-erp-five-minimal{
  box-sizing:border-box;display:grid;gap:6px;min-height:0!important;
  margin:0 0 7px!important;padding:0!important;border:0!important;
  background:transparent!important;box-shadow:none!important;border-radius:0!important;
}
.samami-enterprise-shell .sam-erp-five-minimal > .sam-erp-five-controls{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  margin:0;padding:0;min-height:28px;
}
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-five-back{
  min-height:28px!important;padding:2px 7px!important;
  border:0!important;box-shadow:none!important;border-radius:7px!important;
  background:transparent!important;color:var(--sam-erp-muted,#526276)!important;
  font-size:12px!important;font-weight:600!important;
}
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-five-back::before{
  content:"↩";display:inline-block;margin-inline-end:6px;font-size:15px;line-height:1;
}
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-five-back:hover{
  background:var(--sam-erp-hover,#f0f5fb)!important;color:var(--sam-erp-accent,#1d57b5)!important;
}
.samami-enterprise-shell .sam-erp-five-minimal .sam-erp-five-button.sam-erp-five-primary{
  margin-inline-start:auto;min-height:32px!important;padding:5px 12px!important;
}

/*
 * SAMAMI ERP shared layout policy (2026-11-21)
 * One page should take advantage of the main column even at zoom-out.
 * Keep real actions, validation messages, tables, status, workflows and
 * user-facing controls visible; this block changes SPACING ONLY.
 *
 * Source of truth: this existing ERP stylesheet, not new one-off styles.
 */
#root .samami-enterprise-shell {
  --sam-width-wide:100%;
  --sam-section-gap:12px;
  --sam-page-gutter:clamp(10px,1.25vw,20px);
}
#root .samami-enterprise-shell .samami-app-main,
#root .samami-enterprise-shell .erp-page-surface {
  box-sizing:border-box;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
}
#root .samami-enterprise-shell .erp-page-surface {
  padding:clamp(10px,1.25vw,20px)!important;
  gap:12px!important;
  margin-inline:0!important;
}
/* The old max widths (1280px world / 1440px PageShell) made zoom-out
 * create a narrow central column surrounded by unused space. */
#root .samami-enterprise-shell .samami-page-shell,
#root .samami-enterprise-shell .samami-page-shell.sam-world-page,
#root .samami-enterprise-shell .sam-world-page {
  box-sizing:border-box;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin-inline:0!important;
}
#root .samami-enterprise-shell .samami-page-shell {
  gap:12px!important;
}
#root .samami-enterprise-shell .sam-world-page > .samami-page-header {
  min-height:0!important;
  margin-block:0!important;
  padding-block:5px 8px!important;
}
#root .samami-enterprise-shell .sam-world-page > .samami-page-header h1 {
  font-size:clamp(19px,1.3vw,24px)!important;
  line-height:1.4!important;
}
#root .samami-enterprise-shell .sam-world-page > .sam-world-section-nav {
  margin-block:0!important;
  padding-block:3px 5px!important;
}
#root .samami-enterprise-shell .sam-world-page > .sam-metric-strip {
  margin-block:0!important;
}
#root .samami-enterprise-shell .sam-world-page > .sam-world-toolbar {
  min-height:0;
  margin-block:0!important;
  padding:8px 10px!important;
  gap:9px!important;
}
#root .samami-enterprise-shell .sam-world-page .sam-world-attention {
  gap:6px;
}
#root .samami-enterprise-shell .sam-world-page .sam-world-action-row {
  min-height:46px;
  padding-block:8px;
}
#root .samami-enterprise-shell .sam-world-page > .sam-pricing-mode-nav {
  margin:0;
}
#root .samami-enterprise-shell .sam-world-page > .erp-card {
  margin-block:0;
}
@media (max-width:680px){
  #root .samami-enterprise-shell {
    --sam-section-gap:10px;
    --sam-page-gutter:10px;
  }
  #root .samami-enterprise-shell .erp-page-surface {
    padding:10px!important;
    gap:10px!important;
  }
  #root .samami-enterprise-shell .samami-page-shell {
    gap:10px!important;
  }
  /* Touch-friendly targets are not scaled down on mobile. */
  #root .samami-enterprise-shell .sam-world-page .sam-world-action-row {
    min-height:44px;
  }
}

/* SAMAMI ERP — operator-first shared presentation (2026-11-21)
 * No second header/sidebar. One native page title, one native search/filter
 * toolbar, compact work items, role-aware quick actions on /workspace only.
 * Keep data/error/status messages, forms, dates and buttons fully operative.
 */
#root .samami-enterprise-shell{
  --sam-ops-gap:10px;
  --sam-ops-row:46px;
}
#root .samami-enterprise-shell .erp-page-surface>.samami-page-shell,
#root .samami-enterprise-shell .erp-page-surface>.sam-world-page{
  gap:var(--sam-ops-gap)!important;
}
#root .samami-enterprise-shell .sam-world-page .sam-world-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px!important;
  padding:8px 10px!important;
  margin:0!important;
  border-radius:10px!important;
  box-shadow:none!important;
}
#root .samami-enterprise-shell .sam-world-toolbar__search{
  flex:1 1 260px;
  max-width:560px;
  min-width:0;
  min-height:38px;
}
#root .samami-enterprise-shell .sam-world-toolbar__filters{
  flex:0 1 auto;
  min-width:0;
  gap:5px!important;
}
#root .samami-enterprise-shell .sam-world-filter-tabs{
  display:flex;align-items:center;gap:5px!important;
  margin:0!important;
  max-width:100%;
  overflow-x:auto;
  scrollbar-width:thin;
}
#root .samami-enterprise-shell .sam-world-filter-tabs button{
  min-height:34px!important;
  padding:5px 10px!important;
  font-size:12px!important;
  line-height:1.5!important;
}
#root .samami-enterprise-shell .sam-metric-strip{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(130px,1fr));
  gap:0!important;
  border-radius:10px!important;
  overflow:hidden;
  box-shadow:none!important;
}
#root .samami-enterprise-shell .sam-metric-strip>div{
  box-sizing:border-box;
  min-height:54px!important;
  padding:7px 12px!important;
  margin:0!important;
}
#root .samami-enterprise-shell .sam-metric-strip :is(dt,small){
  font-size:11px!important;
  line-height:1.5!important;
}
#root .samami-enterprise-shell .sam-metric-strip dd{
  font-size:16px!important;
  line-height:1.35!important;
  margin:3px 0 0!important;
}
#root .samami-enterprise-shell .sam-world-attention__rows,
#root .samami-enterprise-shell .sam-world-workstream,
#root .samami-enterprise-shell .sam-world-page .sam-world-attention{
  gap:5px!important;
}
#root .samami-enterprise-shell .sam-world-action-row{
  min-height:var(--sam-ops-row)!important;
  padding:6px 11px!important;
  gap:8px!important;
  border-radius:8px!important;
  box-shadow:none!important;
}
#root .samami-enterprise-shell .sam-world-action-row:hover{
  transform:none!important;
  background:var(--sam-erp-hover,#edf4fa)!important;
  border-color:var(--sam-erp-line,#dbe3ec)!important;
}
#root .samami-enterprise-shell .sam-world-action-row:focus-visible{
  outline:2px solid var(--sam-erp-accent,#1958b3)!important;
  outline-offset:2px!important;
}
#root .samami-enterprise-shell .sam-world-row__copy>b{
  font-size:13px!important;
  line-height:1.45!important;
}
#root .samami-enterprise-shell .sam-world-row__copy>small{
  font-size:11px!important;
  line-height:1.55!important;
}
#root .samami-enterprise-shell .sam-world-page > .erp-card{
  padding:clamp(12px,1vw,18px)!important;
  margin:0!important;
  border-radius:11px!important;
}
#root .samami-enterprise-shell .sam-world-page .erp-section-description{
  line-height:1.6;
}
/* Existing PageShell stays, but avoid 20px+ gaps between unrelated cards. */
#root .samami-enterprise-shell .sam-world-page>section{
  min-width:0;
}




@media(max-width:680px){
  #root .samami-enterprise-shell{--sam-ops-gap:8px;--sam-ops-row:46px}
  #root .samami-enterprise-shell .sam-world-page .sam-world-toolbar{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    padding:8px!important;
  }
  #root .samami-enterprise-shell .sam-world-toolbar__search{
    width:100%;
    flex:none;
    max-width:none;
  }
  #root .samami-enterprise-shell .sam-world-toolbar__filters{
    width:100%;
    flex-wrap:nowrap;
    overflow-x:auto;
    scrollbar-width:thin;
  }
  #root .samami-enterprise-shell .sam-metric-strip{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  #root .samami-enterprise-shell .sam-metric-strip>div{
    min-height:51px!important;
    padding:6px 9px!important;
  }
  
  
}

/* 2026-11-21: mobile workspace duplicate navigation / filter-height repair.
 * Workhome already includes a native, role-gated <details> linking to other
 * work areas. The duplicate injected shortcut strip was removed at source.
 * The native disclosure remains operable, in the document flow, and visible.
 */
#root .samami-enterprise-shell .sam-today-page .sam-workspace-related-paths{
  box-sizing:border-box;
  width:100%;
  margin:0 0 6px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
#root .samami-enterprise-shell .sam-today-page .sam-workspace-related-paths>summary{
  display:inline-flex!important;
  width:auto!important;
  max-width:100%;
  min-height:34px;
  align-items:center;
  gap:7px!important;
  box-sizing:border-box;
  margin:0!important;
  padding:5px 10px!important;
  border:1px solid var(--sam-erp-line,#dbe3ec)!important;
  border-radius:8px;
  background:var(--sam-erp-bg,#fff);
  color:var(--sam-erp-muted,#56677b)!important;
  font-size:11.5px!important;
  font-weight:700!important;
  line-height:1.5!important;
  white-space:normal;
}
#root .samami-enterprise-shell .sam-today-page .sam-workspace-related-paths>summary:focus-visible{
  outline:2px solid var(--sam-erp-accent,#1958b3);
  outline-offset:2px;
}
#root .samami-enterprise-shell .sam-today-page .sam-workspace-related-paths>summary span{
  width:auto;min-width:21px!important;height:21px;
  border-radius:5px;
}
#root .samami-enterprise-shell .sam-today-page .sam-workspace-related-paths[open]>.sam-workspace-shortcuts{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  grid-template-columns:none!important;
  align-items:center!important;
  gap:6px!important;
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  margin:0!important;
  padding:8px 0 2px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin;
  -webkit-overflow-scrolling:touch;
}
#root .samami-enterprise-shell .sam-today-page .sam-workspace-related-paths[open] .sam-workspace-shortcut{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:max-content!important;
  min-height:38px!important;
  max-width:none;
  box-sizing:border-box;
  margin:0!important;
  padding:6px 11px!important;
  border-radius:8px!important;
  background:var(--sam-erp-bg,#fff);
  color:var(--sam-erp-ink,#182c43)!important;
  font-size:11.5px!important;
  font-weight:700!important;
  line-height:1.5!important;
  white-space:nowrap!important;
  overflow-wrap:normal!important;
}
/* A search field is one input, not a nested bordered field within another. */
#root .samami-enterprise-shell .sam-today-page .sam-world-toolbar__search input{
  min-width:0!important;
  min-height:0!important;
  width:100%!important;
  height:36px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  outline:0!important;
}
#root .samami-enterprise-shell .sam-today-page .sam-world-toolbar__search:focus-within{
  border-color:var(--sam-erp-accent,#1958b3)!important;
  outline:2px solid color-mix(in srgb,var(--sam-erp-accent,#1958b3) 30%,transparent);
  outline-offset:1px;
}
@media(max-width:680px){
  /* The shipping CSS hard-coded a 2x2 grid; keep all 4 filters in one
   * horizontal scroll row with 38px touch targets and no hidden buttons. */
  #root .samami-enterprise-shell .sam-today-page .sam-world-toolbar{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:6px!important;
    min-height:0!important;
    margin:0!important;
    padding:8px!important;
  }
  #root .samami-enterprise-shell .sam-today-page .sam-world-toolbar__search{
    box-sizing:border-box;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:39px!important;
    flex:none!important;
    padding-inline:9px!important;
  }
  #root .samami-enterprise-shell .sam-today-page .sam-world-toolbar__filters{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:visible!important;
  }
  #root .samami-enterprise-shell .sam-today-page .sam-world-filter-tabs{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    grid-template-columns:none!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:5px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box;
    margin:0!important;
    padding:0 0 3px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scrollbar-width:thin!important;
    -webkit-overflow-scrolling:touch;
  }
  #root .samami-enterprise-shell .sam-today-page .sam-world-filter-tabs>button{
    display:inline-flex!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:max-content!important;
    min-height:38px!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    margin:0!important;
    padding:6px 10px!important;
    border-radius:8px!important;
    font-size:11.5px!important;
    line-height:1.5!important;
    white-space:nowrap!important;
    text-align:center!important;
  }
  #root .samami-enterprise-shell .sam-today-page .sam-world-toolbar__meta{
    margin:0!important;
    min-height:0!important;
    justify-self:start!important;
    font-size:10px!important;
    line-height:1.3!important;
  }
}

/* SAMAMI ERP shared nested-surface contracts: Odoo/ERPNext-inspired visual
   consistency without changing routes, records, permissions or workflow logic.
   All sections/tabs inherit these tokens rather than new per-page themes. */
#root .samami-enterprise-shell .erp-page-surface{
  --sam-consistent-surface:#ffffff;
  --sam-consistent-surface-alt:#f5f8fc;
  --sam-consistent-ink:#1b2c40;
  --sam-consistent-muted:#526477;
  --sam-consistent-border:#d9e2ec;
  --sam-consistent-focus:#2767c5;
  color-scheme:light;
}
html[data-theme="dark"] #root .samami-enterprise-shell .erp-page-surface,
html[data-samami-theme="dark"] #root .samami-enterprise-shell .erp-page-surface{
  --sam-consistent-surface:#192838;
  --sam-consistent-surface-alt:#223548;
  --sam-consistent-ink:#eff6fc;
  --sam-consistent-muted:#b9c9da;
  --sam-consistent-border:#3d5469;
  --sam-consistent-focus:#8cbcff;
  color-scheme:dark;
}
#root .samami-enterprise-shell .erp-page-surface :is(
  .erp-card,.sam-world-card,.sam-world-attention,.sam-world-workstream,
  .sam-world-toolbar,.sam-workspace-related-paths
){
  box-sizing:border-box;
  border-color:var(--sam-consistent-border)!important;
  background-color:var(--sam-consistent-surface)!important;
  color:var(--sam-consistent-ink)!important;
  border-radius:12px!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .sam-world-section-nav,.sam-sales-family-nav,.sam-erp-context-tabs
){
  box-sizing:border-box;
  background-color:var(--sam-consistent-surface-alt)!important;
  border-color:var(--sam-consistent-border)!important;
  color:var(--sam-consistent-ink)!important;
  border-radius:11px!important;
  max-width:100%;overflow-x:auto;overflow-y:hidden;
  scrollbar-width:thin;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .sam-world-section-nav a,.sam-world-section-nav button,
 .sam-sales-family-nav a,.sam-erp-context-tab
){
  box-sizing:border-box;min-height:36px;
  color:var(--sam-consistent-ink)!important;
  border-radius:8px!important;
  white-space:nowrap;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .sam-world-section-nav [aria-current="page"],
 .sam-world-section-nav .is-active,
 .sam-erp-context-tab[aria-current="page"]
){
  background-color:var(--sam-consistent-surface)!important;
  border-color:var(--sam-consistent-focus)!important;
  color:var(--sam-consistent-focus)!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
 textarea,select
){
  color:var(--sam-consistent-ink)!important;
  background-color:var(--sam-consistent-surface)!important;
  border-color:var(--sam-consistent-border)!important;
  max-width:100%;
}
#root .samami-enterprise-shell .erp-page-surface :is(input,select,textarea,button,a):focus-visible{
  outline:2px solid var(--sam-consistent-focus)!important;
  outline-offset:2px;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .sam-world-page,.samami-page-shell
){
  min-width:0;max-width:100%;box-sizing:border-box;
}
@media(max-width:680px){
 #root .samami-enterprise-shell .erp-page-surface :is(
  .sam-world-section-nav,.sam-sales-family-nav,.sam-erp-context-tabs
 ){
  flex-wrap:nowrap!important;
  -webkit-overflow-scrolling:touch;
 }
 #root .samami-enterprise-shell .erp-page-surface :is(
  .sam-world-section-nav a,.sam-world-section-nav button,.sam-erp-context-tab
 ){
  flex:0 0 auto!important;
 }
}


/* Carry light/dark clarity from the main ERP workspaces down to reusable
   tables, nested tabs, drawers, and centered dialogs. No business APIs. */
#root .samami-enterprise-shell .erp-page-surface :is(
  .erp-table,table,.sam-world-table,.samami-table,
  .sam-erp-context-tabs,.sam-world-section-nav,
  .sam-sales-family-nav
){
  border-color:var(--sam-consistent-border)!important;
  color:var(--sam-consistent-ink)!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
  .erp-card,.sam-world-card,.sam-world-workstream,
  .sam-world-attention,.sam-world-toolbar
) :is(h1,h2,h3,h4,strong,label){
  color:var(--sam-consistent-ink)!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
  input:not([type="checkbox"]):not([type="radio"]),select,textarea
)::placeholder{
  color:var(--sam-consistent-muted)!important;opacity:1!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
  .sam-world-section-nav,.sam-sales-family-nav,.sam-erp-context-tabs
) :is(button,a)[aria-selected="true"]{
  color:var(--sam-consistent-focus)!important;
  background-color:var(--sam-consistent-surface)!important;
  border-color:var(--sam-consistent-focus)!important;
}
html[data-theme="dark"] #root .samami-enterprise-shell :is(
  .erp-page-surface dialog[open],.erp-page-surface [role="dialog"][aria-modal="true"]
),
html[data-samami-theme="dark"] #root .samami-enterprise-shell :is(
  .erp-page-surface dialog[open],.erp-page-surface [role="dialog"][aria-modal="true"]
){
  color:#edf5fc!important;background:#192c3e!important;
  border-color:#476076!important;color-scheme:dark;
}
html[data-theme="light"] #root .samami-enterprise-shell :is(
  .erp-page-surface dialog[open],.erp-page-surface [role="dialog"][aria-modal="true"]
),
html[data-samami-theme="light"] #root .samami-enterprise-shell :is(
  .erp-page-surface dialog[open],.erp-page-surface [role="dialog"][aria-modal="true"]
){
  color:#152d43!important;background:#fff!important;
  border-color:#cedae6!important;color-scheme:light;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 dialog[open],[role="dialog"][aria-modal="true"]
) :is(input,textarea,select){
  color:var(--sam-consistent-ink)!important;
  background-color:var(--sam-consistent-surface)!important;
  border-color:var(--sam-consistent-border)!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .sam-world-section-nav,.sam-sales-family-nav,.sam-erp-context-tabs
) :is(a,button):focus-visible{
  outline:2px solid var(--sam-consistent-focus)!important;
  outline-offset:2px!important;
}


/* SAMAMI 2026-11-22: ERP help is now part of normal layout flow instead of
   covering page titles, action buttons or the notification toolbar.
   Details/summary remain native keyboard-accessible and functional. */
#root .samami-enterprise-shell main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"]{
 position:relative!important;
 top:auto!important;bottom:auto!important;
 inset-inline-start:auto!important;inset-inline-end:auto!important;
 margin:0 0 8px auto!important;
 align-self:flex-end!important;
 transform:none!important;
 box-sizing:border-box!important;
 max-width:calc(100% - 12px)!important;
}
#root .samami-enterprise-shell main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"][open]{
 width:min(340px,calc(100% - 12px))!important;
}
#root .samami-enterprise-shell main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"] > summary{
 touch-action:manipulation;
}

/* SAMAMI ERP 2026-11-22: active header controls, not legacy floating classes.
   Existing SAMAMI AI, notifications and global preferences keep handlers. */
#root .samami-enterprise-shell .samami-app-header .samami-header-inner{
  box-sizing:border-box!important;
  min-width:0!important;
  max-width:100%!important;
  gap:8px!important;
  padding-inline:clamp(8px,1.4vw,20px)!important;
}
#root .samami-enterprise-shell .samami-app-header .samami-header-account{
  display:flex!important;align-items:center!important;justify-content:flex-end!important;
  flex:0 1 auto!important;min-width:0!important;max-width:100%!important;
  gap:8px!important;flex-wrap:nowrap!important;
}
#root .samami-enterprise-shell .samami-app-header .samami-header-alert{
  position:relative!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
  box-sizing:border-box!important;flex:0 0 40px!important;
  width:40px!important;min-width:40px!important;max-width:40px!important;
  height:40px!important;min-height:40px!important;
  padding:0!important;margin:0!important;
  border:1px solid var(--sam-shell-border,var(--erp-line-strong,#91a5ba))!important;
  border-radius:10px!important;background:var(--sam-shell-surface-2,var(--erp-surface-2,#f3f6fa))!important;
  color:var(--sam-shell-text,var(--erp-text,#20364b))!important;
  overflow:visible!important;cursor:pointer;
}
#root .samami-enterprise-shell .samami-app-header .samami-header-alert>svg{
  width:18px!important;height:18px!important;display:block!important;flex:none!important;
}
#root .samami-enterprise-shell .samami-app-header .samami-header-alert .samami-header-alert-count{
  position:absolute!important;top:-6px!important;inset-inline-end:-5px!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  box-sizing:border-box!important;width:max-content!important;max-width:50px!important;min-width:18px!important;height:18px!important;
  padding:0 4px!important;border-radius:999px!important;
  font:800 10px/1 system-ui,Arial,sans-serif!important;
  background:#bd2f33!important;color:#fff!important;border:2px solid var(--sam-shell-surface,#fff)!important;
  white-space:nowrap!important;z-index:2!important;
}
#root .samami-enterprise-shell .samami-app-header .samami-header-alert:focus-visible,
#root .samami-enterprise-shell .samami-app-header .samami-header-ai-wordmark:focus-visible{
  outline:2px solid var(--sam-erp-accent,#2d68c6)!important;outline-offset:2px!important;
}
#root .samami-enterprise-shell .samami-app-header .sam-global-preferences{
  flex:0 0 auto!important;min-width:0!important;
}
#root .samami-enterprise-shell .samami-app-header .sam-pref-popover.is-unified{
  box-sizing:border-box!important;max-width:min(360px,calc(100vw - 20px))!important;
}
@media(max-width:480px){
  #root .samami-enterprise-shell .samami-app-header .samami-header-inner{
    gap:5px!important;padding-inline:8px!important;
  }
  #root .samami-enterprise-shell .samami-app-header .samami-header-account{gap:5px!important;}
  #root .samami-enterprise-shell .samami-app-header .samami-header-account .samami-header-ai-wordmark{
    box-sizing:border-box!important;min-width:88px!important;max-width:100px!important;
    height:40px!important;min-height:40px!important;padding:5px 7px!important;
  }
  #root .samami-enterprise-shell .samami-app-header .samami-header-ai-wordmark .samami-ai-wordmark{
    font-size:12px!important;letter-spacing:-.45px!important;
  }
  #root .samami-enterprise-shell .samami-app-header .samami-header-alert{
    flex-basis:40px!important;width:40px!important;min-width:40px!important;max-width:40px!important;
  }
}

/* ERP mobile drawers: contain the real portal drawer within the viewport.
   Keep the modal's native focus trap, scrolling, role and buttons unchanged. */
@media(max-width:620px){
  #samami-overlay-root .erp-drawer-layer{
    box-sizing:border-box!important;
    min-width:0!important;max-width:100vw!important;
    padding-inline:10px!important;
    overflow-x:hidden!important;
  }
  #samami-overlay-root .erp-drawer-layer > .erp-drawer{
    box-sizing:border-box!important;
    width:100%!important;
    max-width:100%!important;
    justify-self:center!important;
    min-width:0!important;
    margin-inline:auto!important;
    overflow-x:hidden!important;
  }
  #samami-overlay-root .erp-drawer-layer > .erp-drawer .erp-modal-body{
    box-sizing:border-box!important;min-width:0!important;max-width:100%!important;
    overflow-x:hidden!important;
  }
  #samami-overlay-root .erp-drawer-layer > .erp-drawer :is(input,select,textarea){
    box-sizing:border-box!important;
    max-width:100%!important;
  }
}


/* 2026-11-23 — compact ERP header actions & navigation. */
#root .samami-enterprise-shell .samami-app-header .samami-header-global-start{
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  gap:6px!important;min-width:0!important;flex:1 1 auto!important;
}
#root .samami-enterprise-shell .sam-erp-header-actions{
  display:inline-flex!important;align-items:center!important;justify-content:flex-start!important;
  gap:5px!important;min-width:0!important;flex:0 0 auto!important;
}
#root .samami-enterprise-shell .sam-erp-header-icon{
  position:relative!important;display:inline-flex!important;flex:0 0 36px!important;
  align-items:center!important;justify-content:center!important;box-sizing:border-box!important;
  width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;
  padding:0!important;margin:0!important;border-radius:9px!important;
  border:1px solid var(--sam-shell-border,#adc0d3)!important;
  background:var(--sam-shell-surface-2,#eef4fa)!important;
  color:var(--sam-shell-text,#18314c)!important;cursor:pointer!important;
  font-size:0!important;line-height:1!important;
}
#root .samami-enterprise-shell .sam-erp-header-icon > svg{display:block!important;width:18px!important;height:18px!important;flex:none!important}
#root .samami-enterprise-shell .sam-erp-header-icon:hover,
#root .samami-enterprise-shell .sam-erp-header-icon[aria-expanded="true"]{
  background:var(--sam-shell-hover,#e1edf9)!important;
  border-color:var(--sam-shell-muted,#4f789f)!important;
}
#root .samami-enterprise-shell .sam-erp-header-icon:focus-visible{
  outline:2px solid #3586e5!important;outline-offset:2px!important;
}
#root .samami-enterprise-shell .sam-erp-header-icon:disabled{opacity:.4!important;cursor:not-allowed!important}
#root .samami-enterprise-shell main[data-qa="erp-main"] .sam-erp-five-minimal .sam-erp-five-controls:empty{
  display:none!important;
}
#root .samami-enterprise-shell.sam-erp-header-help-ready main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"]{
  position:absolute!important;top:0!important;left:0!important;right:auto!important;
  width:0!important;min-height:0!important;height:0!important;overflow:hidden!important;
  padding:0!important;margin:0!important;border:0!important;box-shadow:none!important;
  visibility:hidden!important;pointer-events:none!important;z-index:-1!important;
}
#root .samami-enterprise-shell.sam-erp-header-help-ready main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"][open]{
  position:fixed!important;top:70px!important;left:auto!important;right:12px!important;
  width:min(360px,calc(100vw - 24px))!important;max-height:calc(100dvh - 84px)!important;
  height:auto!important;overflow-y:auto!important;visibility:visible!important;
  pointer-events:auto!important;z-index:1001!important;box-sizing:border-box!important;
  padding:14px!important;border:1px solid var(--sam-shell-border,#b4c3d4)!important;
  border-radius:13px!important;background:var(--sam-shell-surface,#fff)!important;
  color:var(--sam-shell-text,#142f4b)!important;box-shadow:0 12px 36px rgba(3,17,36,.24)!important;
}
#root .samami-enterprise-shell.sam-erp-header-help-ready main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"] > summary{
  display:none!important;
}
#root .samami-enterprise-shell .sam-erp-header-fallback{
  position:absolute!important;top:calc(100% + 7px)!important;inset-inline-start:0!important;
  width:min(320px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;
  box-sizing:border-box!important;padding:14px!important;border-radius:12px!important;
  border:1px solid var(--sam-shell-border,#b4c3d4)!important;
  background:var(--sam-shell-surface,#fff)!important;color:var(--sam-shell-text,#142f4b)!important;
  box-shadow:0 12px 36px rgba(3,17,36,.2)!important;z-index:1001!important;
  font-size:12px!important;line-height:1.9!important;
}
#root .samami-enterprise-shell .sam-erp-header-fallback[hidden]{display:none!important}
#root .samami-enterprise-shell .sam-erp-header-fallback > strong{display:block!important;font-size:13px!important}
#root .samami-enterprise-shell .sam-erp-header-fallback > p{margin:5px 0 0!important}
@media(max-width:600px){
  #root .samami-enterprise-shell .samami-app-header .samami-header-inner{gap:4px!important;padding-inline:7px!important}
  #root .samami-enterprise-shell .samami-app-header .samami-header-global-start{gap:3px!important}
  #root .samami-enterprise-shell .sam-erp-header-actions{gap:3px!important}
  #root .samami-enterprise-shell .sam-erp-header-icon{flex-basis:33px!important;width:33px!important;min-width:33px!important;height:36px!important;min-height:36px!important}
  #root .samami-enterprise-shell .samami-app-header .samami-mobile-menu-trigger{width:36px!important;min-width:36px!important;max-width:36px!important;padding:0!important}
  #root .samami-enterprise-shell .samami-app-header .samami-header-account{gap:4px!important}
  #root .samami-enterprise-shell .samami-app-header .samami-header-account .samami-header-ai-wordmark{
    flex:0 0 35px!important;width:35px!important;min-width:35px!important;max-width:35px!important;
    height:36px!important;min-height:36px!important;padding:0!important;
  }
  #root .samami-enterprise-shell .samami-app-header .samami-header-account .samami-header-ai-wordmark .samami-ai-wordmark{display:none!important}
  #root .samami-enterprise-shell .samami-app-header .samami-header-account .samami-header-ai-wordmark::after{
    content:"✦"!important;display:block!important;font:800 19px/1 system-ui!important;color:inherit!important;
  }
  #root .samami-enterprise-shell .samami-app-header .samami-header-account .samami-header-alert{
    flex-basis:36px!important;width:36px!important;min-width:36px!important;max-width:36px!important;height:36px!important;min-height:36px!important;
  }
}
/* Collapsed sidebar is a vertically aligned icon rail — no staggered rows. */
@media(min-width:1024px){
 #root .samami-enterprise-shell.is-sidebar-collapsed .samami-sidebar-nav.samami-sidebar-workspaces{
   display:grid!important;grid-template-columns:minmax(0,1fr)!important;
   grid-auto-rows:42px!important;align-content:start!important;justify-items:stretch!important;
   row-gap:5px!important;padding:5px 5px 11px!important;
 }
 #root .samami-enterprise-shell.is-sidebar-collapsed .samami-sidebar-workspaces .samami-workspace-rail-item{
   display:flex!important;align-items:center!important;justify-content:center!important;
   box-sizing:border-box!important;width:100%!important;min-width:0!important;
   height:42px!important;min-height:42px!important;max-height:42px!important;
   padding:0!important;margin:0!important;gap:0!important;
 }
 #root .samami-enterprise-shell.is-sidebar-collapsed .samami-sidebar-workspaces .samami-workspace-rail-icon{
   box-sizing:border-box!important;display:grid!important;place-items:center!important;
   flex:0 0 28px!important;width:28px!important;min-width:28px!important;
   height:28px!important;min-height:28px!important;margin:0!important;padding:0!important;
   transform:none!important;
 }
 #root .samami-enterprise-shell.is-sidebar-collapsed .samami-sidebar-workspaces .samami-workspace-rail-icon svg{
   display:block!important;flex:none!important;width:19px!important;height:19px!important;margin:0!important;
 }
}
/* Compact, single-row family / pricing navigation without hiding any permitted actions. */
#root .samami-enterprise-shell .erp-page-surface :is(.sam-pricing-mode-nav,.sam-sales-family-nav,.sam-world-section-nav){
 display:flex!important;flex-wrap:nowrap!important;align-items:center!important;
 min-width:0!important;max-width:100%!important;
 column-gap:5px!important;overflow-x:auto!important;overflow-y:hidden!important;
 padding-block:4px!important;margin-block:0 8px!important;scrollbar-width:thin!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(.sam-pricing-mode,.sam-sales-family-nav a,.sam-sales-family-nav button,.sam-world-section-nav a,.sam-world-section-nav button){
 flex:0 0 auto!important;min-height:31px!important;
 padding:5px 10px!important;font-size:11px!important;line-height:1.5!important;
 border-radius:8px!important;white-space:nowrap!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(.sam-product-family-grid,.sam-pricing-family-grid){
 gap:8px!important;margin-block:8px!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(.sam-product-family-card,.sam-pricing-family-card){
 padding:10px!important;min-height:0!important;
}
#root .samami-enterprise-shell .erp-page-surface .samami-page-shell .samami-page-header{
 margin-bottom:8px!important;padding-bottom:6px!important;
}


/* 2026-11-23 v22+37 — ERP header help is an inline card, NOT a fixed overlay.
   The React-owned details element stays in main; the header button toggles it.
   This keeps help beneath the application bar, right-aligned to content in
   RTL and before the page's own tabs; subsequent controls move down naturally. */
#root .samami-enterprise-shell.sam-erp-header-help-ready main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"]{
  display:none!important;
  position:static!important;
  inset:auto!important;
  top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
  inset-inline-start:auto!important;inset-inline-end:auto!important;
  width:auto!important;min-width:0!important;max-width:100%!important;
  min-height:0!important;height:auto!important;max-height:none!important;
  margin:0!important;padding:0!important;border:0!important;
  box-shadow:none!important;transform:none!important;
  visibility:hidden!important;pointer-events:none!important;
  overflow:hidden!important;z-index:auto!important;
}
#root .samami-enterprise-shell.sam-erp-header-help-ready main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"][open]{
  display:block!important;position:relative!important;
  inset:auto!important;
  top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
  inset-inline-start:auto!important;inset-inline-end:auto!important;
  box-sizing:border-box!important;
  width:min(440px,100%)!important;max-width:100%!important;min-width:0!important;
  min-height:0!important;height:auto!important;max-height:min(42dvh,340px)!important;
  margin-block:0 12px!important;
  margin-inline:0 auto!important;
  padding:12px 14px!important;
  border:1px solid var(--sam-shell-border,#c5d3e2)!important;
  border-radius:11px!important;
  background:var(--sam-shell-surface,#fff)!important;
  color:var(--sam-shell-text,#162c41)!important;
  box-shadow:0 4px 16px rgba(7,28,49,.08)!important;
  visibility:visible!important;pointer-events:auto!important;
  overflow-x:hidden!important;overflow-y:auto!important;z-index:1!important;
  text-align:start!important;white-space:normal!important;
  justify-self:start!important;align-self:flex-start!important;
}
#root .samami-enterprise-shell.sam-erp-header-help-ready main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"][open] > .sam-work-guide__text{
  display:block!important;margin:0!important;padding:0!important;
  max-width:100%!important;overflow-wrap:anywhere!important;
  color:inherit!important;line-height:1.8!important;
  font-size:12px!important;font-weight:500!important;
}
#root .samami-enterprise-shell.sam-erp-header-help-ready main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"] > summary{
  display:none!important;
}
@media(max-width:600px){
  #root .samami-enterprise-shell.sam-erp-header-help-ready main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"][open]{
    width:min(100%,440px)!important;padding:10px 12px!important;
    margin-block-end:9px!important;border-radius:9px!important;
  }
}


/* 2026-11-23: align actual project-documents & more-modules SVGs to
   the exact same axis as the collapsed navigation rail icons. */
@media (min-width:1100px){
  #root .samami-enterprise-shell.is-sidebar-collapsed .samami-sidebar-explore[data-qa="erp-more-modules"]{
    box-sizing:border-box!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-auto-rows:42px!important;
    align-content:start!important;
    align-items:center!important;
    justify-items:stretch!important;
    gap:5px!important;
    width:100%!important;
    min-width:0!important;
    padding:5px!important;
    margin:0!important;
  }
  #root .samami-enterprise-shell.is-sidebar-collapsed .samami-sidebar-explore[data-qa="erp-more-modules"] > :is(a.samami-sidebar-quick-document,button){
    box-sizing:border-box!important;
    display:grid!important;
    place-items:center!important;
    justify-content:center!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:42px!important;
    min-height:42px!important;
    max-height:42px!important;
    padding:0!important;
    margin:0!important;
    gap:0!important;
    text-align:center!important;
  }
  #root .samami-enterprise-shell.is-sidebar-collapsed .samami-sidebar-explore[data-qa="erp-more-modules"] > :is(a.samami-sidebar-quick-document,button) > svg{
    display:block!important;
    position:static!important;
    inset:auto!important;
    place-self:center!important;
    width:19px!important;
    min-width:19px!important;
    height:19px!important;
    min-height:19px!important;
    margin:0!important;
    padding:0!important;
    transform:none!important;
    flex:none!important;
  }
}
#root .samami-enterprise-shell .sam-erp-header-icon[hidden]{display:none!important}


/* 2026-11-25 ERP inverse-navigation surface: desktop and mobile share
   one continuous background; the official gold logo is never filtered. */
html[data-samami-theme="light"] #root .samami-enterprise-shell{
  --sam-nav-inverse-bg:#0b2236;
  --sam-nav-inverse-ink:#ecf4fc;
  --sam-nav-inverse-muted:#b8cbdc;
  --sam-nav-inverse-edge:#2e4b63;
  --sam-nav-inverse-control:#18354e;
  --sam-nav-inverse-selected:#22486d;
  --sam-nav-inverse-active:#ffffff;
  --sam-nav-inverse-focus:#edba52;
}
html[data-samami-theme="dark"] #root .samami-enterprise-shell{
  --sam-nav-inverse-bg:#f3f7fc;
  --sam-nav-inverse-ink:#17314a;
  --sam-nav-inverse-muted:#526e86;
  --sam-nav-inverse-edge:#d1dfec;
  --sam-nav-inverse-control:#e6eff9;
  --sam-nav-inverse-selected:#d6e7fa;
  --sam-nav-inverse-active:#114e91;
  --sam-nav-inverse-focus:#1c65b5;
}
/* More specificity than the compiled legacy gradient, and the separate
   mobile light-theme brand strip in erp-nav-v4.css. */
html[data-samami-theme] #root .samami-enterprise-shell
:is(
  aside.samami-app-sidebar,
  .samami-mobile-sidebar-layer > aside[role="dialog"],
  .samami-sidebar-content.samami-sidebar-glass,
  .samami-sidebar-brand,
  .samami-sidebar-brand-row,
  .samami-sidebar-official-brand,
  .samami-sidebar-nav.samami-sidebar-workspaces,
  .samami-sidebar-explore,
  .samami-sidebar-footer.samami-sidebar-profile-zone,
  .samami-sidebar-profile-menu-wrap,
  .samami-sidebar-utility-stack
){
  background:var(--sam-nav-inverse-bg)!important;
  background-image:none!important;
  color:var(--sam-nav-inverse-ink)!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html[data-samami-theme] #root .samami-enterprise-shell .samami-sidebar-content.samami-sidebar-glass{
  border:0!important;
  border-inline-end:1px solid var(--sam-nav-inverse-edge)!important;
  border-radius:0!important;
  height:100%!important;
  min-height:100%!important;
}
html[data-samami-theme] #root .samami-enterprise-shell .samami-mobile-sidebar-layer > aside[role="dialog"]{
  border:0!important;
  box-shadow:0 16px 48px #07162949!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-sidebar-glass::before,.samami-sidebar-glass::after){
  display:none!important;
  content:none!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-sidebar-brand,.samami-sidebar-explore,.samami-sidebar-footer){
  border-color:var(--sam-nav-inverse-edge)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell .samami-sidebar-brand-row{
  width:100%!important;
  min-width:0!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-sidebar-official-brand .sam-brand-lockup,.samami-sidebar-official-brand .sam-brand-logo){
  background:transparent!important;
  filter:none!important;
  opacity:1!important;
  mix-blend-mode:normal!important;
}
html[data-samami-theme="dark"] #root .samami-enterprise-shell .samami-sidebar-official-brand .sam-brand-logo{
  /* Official light-surface lockup: the gold brand mark stays gold;
     only the original subtitle's contrast variant differs. */
  content:url("/brand/samami-logo-on-light.svg")!important;
}
html[data-samami-theme="light"] #root .samami-enterprise-shell .samami-sidebar-official-brand .sam-brand-logo{
  content:normal!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-sidebar-nav,.samami-sidebar-explore,.samami-sidebar-footer,
    .samami-sidebar-utility-stack,.samami-sidebar-profile-zone){
  color:var(--sam-nav-inverse-ink)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-sidebar-workspaces .samami-workspace-rail-item,
    .samami-sidebar-explore > a,
    .samami-sidebar-explore > button,
    .samami-sidebar-brand-toggle,
    .samami-sidebar-mobile-close,
    .samami-sidebar-logout-row){
  color:var(--sam-nav-inverse-ink)!important;
  border-color:transparent!important;
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-sidebar-workspaces .samami-workspace-rail-item,
    .samami-sidebar-explore > a,
    .samami-sidebar-explore > button,
    .samami-sidebar-brand-toggle,
    .samami-sidebar-mobile-close,
    .samami-sidebar-logout-row) :is(svg,span){
  color:inherit!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-sidebar-workspaces .samami-workspace-rail-label{
  color:inherit!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-sidebar-workspaces .samami-workspace-rail-item:is([aria-current="page"],.is-active){
  background:var(--sam-nav-inverse-selected)!important;
  border:1px solid var(--sam-nav-inverse-edge)!important;
  color:var(--sam-nav-inverse-active)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-sidebar-workspaces .samami-workspace-rail-item,
    .samami-sidebar-explore > a,
    .samami-sidebar-explore > button,
    .samami-sidebar-brand-toggle,
    .samami-sidebar-mobile-close):hover{
  background:var(--sam-nav-inverse-control)!important;
  color:var(--sam-nav-inverse-active)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-sidebar-search,.samami-sidebar-notifications,
    .samami-sidebar-profile-card,.samami-sidebar-profile-menu,
    .samami-sidebar-profile-menu button){
  background:var(--sam-nav-inverse-control)!important;
  background-image:none!important;
  color:var(--sam-nav-inverse-ink)!important;
  border-color:var(--sam-nav-inverse-edge)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-sidebar-search,.samami-sidebar-notifications,
    .samami-sidebar-profile-card,.samami-sidebar-profile-menu)
:is(svg,span,p,small,strong){
  color:var(--sam-nav-inverse-ink)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-sidebar-user > span,.samami-sidebar-erp-tag){
  color:var(--sam-nav-inverse-muted)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-sidebar-brand-toggle,.samami-sidebar-mobile-close,
    .samami-sidebar-explore > button,
    .samami-sidebar-explore > a):focus-visible{
  outline:2px solid var(--sam-nav-inverse-focus)!important;
  outline-offset:2px!important;
}
/* Mobile drawer is a copy of the same rail, not a differently themed second sidebar. */
@media (max-width:1099px){
  html[data-samami-theme] #root .samami-enterprise-shell
  .samami-mobile-sidebar-layer .samami-sidebar-content.samami-sidebar-glass{
    width:100%!important;
    background:var(--sam-nav-inverse-bg)!important;
    color:var(--sam-nav-inverse-ink)!important;
    border-color:var(--sam-nav-inverse-edge)!important;
  }
  html[data-samami-theme] #root .samami-enterprise-shell
  .samami-mobile-sidebar-layer .samami-sidebar-brand{
    background:var(--sam-nav-inverse-bg)!important;
    color:var(--sam-nav-inverse-ink)!important;
    border-bottom:1px solid var(--sam-nav-inverse-edge)!important;
  }
  html[data-samami-theme] #root .samami-enterprise-shell
  .samami-mobile-sidebar-layer .samami-sidebar-brand :is(button,span){
    color:var(--sam-nav-inverse-ink)!important;
  }
}

/* The old mobile-light selector had higher specificity than shared rail links. */
@media(max-width:1099px){
  html[data-samami-theme] #root .samami-enterprise-shell
  .samami-mobile-sidebar-layer .samami-sidebar-workspaces .samami-workspace-rail-item{
    color:var(--sam-nav-inverse-ink)!important;
    background:transparent!important;
    border:1px solid transparent!important;
  }
  html[data-samami-theme] #root .samami-enterprise-shell
  .samami-mobile-sidebar-layer .samami-sidebar-workspaces
  .samami-workspace-rail-item:is(:hover,[aria-current="page"],.is-active){
    color:var(--sam-nav-inverse-active)!important;
    background:var(--sam-nav-inverse-selected)!important;
    border-color:var(--sam-nav-inverse-edge)!important;
  }
  html[data-samami-theme] #root .samami-enterprise-shell
  .samami-mobile-sidebar-layer .samami-sidebar-workspaces
  .samami-workspace-rail-item :is(.samami-workspace-rail-icon,.samami-workspace-rail-label,svg){
    color:inherit!important;
  }
  html[data-samami-theme] #root .samami-enterprise-shell
  .samami-mobile-sidebar-layer :is(.samami-sidebar-explore,.samami-sidebar-footer)
  :is(a,button,span,p,svg){
    color:var(--sam-nav-inverse-ink)!important;
  }
  html[data-samami-theme] #root .samami-enterprise-shell
  .samami-mobile-sidebar-layer .samami-sidebar-profile-card{
    color:var(--sam-nav-inverse-ink)!important;
    background:var(--sam-nav-inverse-control)!important;
  }
}


/* 2026-11-25 ERP hover/active visibility hotfix: override legacy dark tiles. */
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-app-sidebar,.samami-mobile-sidebar-layer)
.samami-sidebar-workspaces .samami-workspace-rail-item{
  background:transparent!important;
  background-image:none!important;
  border:1px solid transparent!important;
  box-shadow:none!important;
  color:var(--sam-nav-inverse-ink)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-app-sidebar,.samami-mobile-sidebar-layer)
.samami-sidebar-workspaces .samami-workspace-rail-item:is(:hover,:focus-visible){
  background:var(--sam-nav-inverse-control)!important;
  background-image:none!important;
  border-color:var(--sam-nav-inverse-edge)!important;
  box-shadow:none!important;
  color:var(--sam-nav-inverse-active)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-app-sidebar,.samami-mobile-sidebar-layer)
.samami-sidebar-workspaces .samami-workspace-rail-item:is(.is-active,[aria-current="page"],[data-active="true"],[data-state="active"]),
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-app-sidebar,.samami-mobile-sidebar-layer)
.samami-sidebar-workspaces .samami-workspace-rail-item:is(.is-active,[aria-current="page"],[data-active="true"],[data-state="active"]):is(:hover,:focus-visible){
  background:var(--sam-nav-inverse-selected)!important;
  background-image:none!important;
  border-color:var(--sam-nav-inverse-edge)!important;
  box-shadow:inset -2px 0 var(--sam-nav-inverse-focus)!important;
  color:var(--sam-nav-inverse-active)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-app-sidebar,.samami-mobile-sidebar-layer)
.samami-sidebar-workspaces .samami-workspace-rail-item
:is(.samami-workspace-rail-icon,.samami-workspace-rail-label){
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  border-color:transparent!important;
  color:inherit!important;
  opacity:1!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-app-sidebar,.samami-mobile-sidebar-layer)
.samami-sidebar-workspaces .samami-workspace-rail-item
.samami-workspace-rail-icon :is(svg,path,circle,rect,line,polyline,polygon){
  color:inherit!important;
  opacity:1!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-app-sidebar,.samami-mobile-sidebar-layer)
.samami-sidebar-workspaces .samami-workspace-rail-item
.samami-workspace-rail-icon svg{
  stroke:currentColor!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-app-sidebar,.samami-mobile-sidebar-layer)
.samami-sidebar-workspaces .samami-workspace-rail-item:is(:hover,.is-active,[aria-current="page"])
:is(.samami-workspace-rail-icon,.samami-workspace-rail-label,svg){
  color:inherit!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-app-sidebar,.samami-mobile-sidebar-layer)
.samami-sidebar-explore > :is(a,button):is(:hover,:focus-visible){
  color:var(--sam-nav-inverse-active)!important;
  background:var(--sam-nav-inverse-control)!important;
  background-image:none!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-app-sidebar,.samami-mobile-sidebar-layer)
.samami-sidebar-explore > :is(a,button):is(:hover,:focus-visible)
:is(span,svg){
  color:inherit!important;
}


/* 2026-11-25 — shared nested ERP spacing baseline.
   Do not reorder forms or mutate CRUD controls; remove inherited empty heights. */
#root .samami-enterprise-shell .sam-customers-world .sam-responsive-workspace__detail {
  min-height:0!important;
  align-self:start!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(.sam-erp4-toolbar,.sam-world-section-nav) {
  min-width:0!important;
  align-items:center!important;
  gap:8px!important;
}
#root .samami-enterprise-shell .erp-page-surface
:is(.sam-erp4-toolbar,.sam-world-section-nav,.sam-erp-context-tabs)
:is(a,button){
  box-sizing:border-box!important;
  vertical-align:middle!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:36px!important;
  line-height:1.4!important;
}
#root .samami-enterprise-shell .erp-page-surface
:is(.sam-erp4-card,.sam-erp4-card .sam-erp4-title){
  min-width:0!important;
}
#root .samami-enterprise-shell .erp-page-surface
:is(.sam-erp4-card .sam-erp4-title,.samami-page-header){
  align-items:center!important;
  gap:8px!important;
}
#root .samami-enterprise-shell .erp-page-surface .sam-erp4-card
:is(h2,h3,p,small){
  overflow-wrap:anywhere!important;
}
#root .samami-enterprise-shell .erp-page-surface
:is(.sam-world-section-nav,.sam-erp-context-tabs){
  margin-block:0 8px!important;
}
@media(max-width:700px){
  #root .samami-enterprise-shell .erp-page-surface
  :is(.sam-erp4-toolbar,.sam-world-section-nav,.sam-erp-context-tabs){
    gap:6px!important;
    min-width:0!important;
  }
  #root .samami-enterprise-shell .sam-customers-world
  .sam-responsive-workspace__detail{
    padding:8px!important;
  }
}


/* 2026-11-25 hierarchical ERP navigation: reuse role-filtered explorer tree. */
html[data-samami-theme] #root .samami-enterprise-shell
.samami-sidebar-workspaces{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:var(--sam-nav-inverse-edge) transparent;
  gap:3px!important;
  padding-block:10px!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-rail-section{
  width:100%;
  min-width:0;
  display:block;
  flex:0 0 auto;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-rail-section-toggle{
  box-sizing:border-box;
  display:flex!important;
  width:100%!important;
  min-width:0!important;
  align-items:center!important;
  justify-content:flex-start!important;
  text-align:start!important;
  gap:9px!important;
  border-radius:10px!important;
  cursor:pointer;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-rail-section-toggle .samami-workspace-rail-label{
  flex:1 1 auto!important;
  min-width:0!important;
  text-align:start!important;
  font-weight:680!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-rail-chevron{
  width:15px;
  height:15px;
  flex:0 0 15px;
  opacity:.75;
  color:inherit!important;
  transition:transform .15s ease;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-rail-section.is-expanded > .samami-rail-section-toggle > .samami-rail-chevron,
html[data-samami-theme] #root .samami-enterprise-shell
.samami-rail-branch-toggle[aria-expanded=true] > .samami-rail-chevron{
  transform:rotate(90deg);
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-rail-children{
  min-width:0;
  margin:1px 14px 7px 8px;
  padding-inline-start:10px;
  border-inline-start:1px solid var(--sam-nav-inverse-edge);
  display:flex;
  flex-direction:column;
  gap:2px;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-rail-sub-link,.samami-rail-branch-toggle){
  box-sizing:border-box;
  width:100%;
  min-height:34px;
  min-width:0;
  display:flex!important;
  justify-content:flex-start!important;
  align-items:center!important;
  gap:8px!important;
  padding:7px 9px!important;
  border:1px solid transparent!important;
  border-radius:8px!important;
  background:transparent!important;
  background-image:none!important;
  text-align:start!important;
  text-decoration:none!important;
  box-shadow:none!important;
  color:var(--sam-nav-inverse-ink)!important;
  font-size:12.5px!important;
  line-height:1.55!important;
  cursor:pointer;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-rail-sub-link::before{
  content:"";
  inline-size:5px;
  block-size:5px;
  flex:0 0 5px;
  border-radius:50%;
  background:var(--sam-nav-inverse-muted);
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-rail-sub-link,.samami-rail-branch-toggle)>span:first-child{
  flex:1 1 auto;
  min-width:0;
  overflow-wrap:anywhere;
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-rail-sub-link,.samami-rail-branch-toggle):is(:hover,:focus-visible){
  background:var(--sam-nav-inverse-control)!important;
  color:var(--sam-nav-inverse-active)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-rail-sub-link.is-active{
  background:var(--sam-nav-inverse-selected)!important;
  border-color:var(--sam-nav-inverse-edge)!important;
  color:var(--sam-nav-inverse-active)!important;
  font-weight:760!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-rail-branch-items{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding-inline-start:12px;
  border-inline-start:1px dashed var(--sam-nav-inverse-edge);
}
html[data-samami-theme] #root .samami-enterprise-shell
:is(.samami-rail-sub-link,.samami-rail-branch-toggle):focus-visible{
  outline:2px solid var(--sam-nav-inverse-focus)!important;
  outline-offset:1px!important;
}
/* Profile and logout occupy the same RTL-aligned rail column. */
html[data-samami-theme] #root .samami-enterprise-shell
.samami-sidebar-profile-card{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  width:100%!important;
  min-width:0!important;
  text-align:start!important;
  background:var(--sam-nav-inverse-control)!important;
  border-color:var(--sam-nav-inverse-edge)!important;
  color:var(--sam-nav-inverse-ink)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-sidebar-avatar{
  flex:0 0 38px!important;
  width:38px!important;
  height:38px!important;
  background:var(--sam-nav-inverse-selected)!important;
  border:1px solid var(--sam-nav-inverse-edge)!important;
  color:var(--sam-nav-inverse-active)!important;
  box-shadow:none!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-sidebar-avatar > span{
  color:var(--sam-nav-inverse-active)!important;
  -webkit-text-fill-color:var(--sam-nav-inverse-active)!important;
  font-weight:800!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-sidebar-user{
  min-width:0!important;
  flex:1 1 auto!important;
  text-align:start!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-sidebar-user p{
  color:var(--sam-nav-inverse-ink)!important;
  -webkit-text-fill-color:var(--sam-nav-inverse-ink)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-sidebar-user span{
  color:var(--sam-nav-inverse-muted)!important;
  -webkit-text-fill-color:var(--sam-nav-inverse-muted)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-sidebar-logout-row{
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-start!important;
  width:100%!important;
  min-height:40px!important;
  gap:10px!important;
  margin-top:4px!important;
  padding:8px 12px!important;
  text-align:start!important;
  border-radius:8px!important;
  color:var(--sam-nav-inverse-ink)!important;
  background:transparent!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-sidebar-logout-row > svg{
  flex:0 0 19px!important;
  width:19px!important;
  height:19px!important;
  margin:0!important;
  color:inherit!important;
  stroke:currentColor!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-sidebar-logout-row > span{
  min-width:0!important;
  color:inherit!important;
  -webkit-text-fill-color:currentColor!important;
  text-align:start!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-sidebar-logout-row:hover{
  background:var(--sam-nav-inverse-control)!important;
  color:var(--sam-nav-inverse-active)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-sidebar-profile-menu{
  background:var(--sam-nav-inverse-control)!important;
  color:var(--sam-nav-inverse-ink)!important;
  border-color:var(--sam-nav-inverse-edge)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-sidebar-profile-menu button{
  color:var(--sam-nav-inverse-ink)!important;
  background:transparent!important;
}
html[data-samami-theme] #root .samami-enterprise-shell
.samami-sidebar-profile-menu button:hover{
  color:var(--sam-nav-inverse-active)!important;
  background:var(--sam-nav-inverse-selected)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell.is-sidebar-collapsed
.samami-sidebar-logout-row{
  justify-content:center!important;
  padding-inline:0!important;
}
@media(max-width:1099px){
 html[data-samami-theme] #root .samami-enterprise-shell .samami-mobile-sidebar-layer
 .samami-sidebar-workspaces{
   padding-inline:8px!important;
 }
 html[data-samami-theme] #root .samami-enterprise-shell .samami-mobile-sidebar-layer
 .samami-rail-children{
   margin-inline:11px 4px;
   padding-inline-start:8px;
 }
}

/* v45: remove duplicate legacy rail, explicitly restore inner-text contrast. */
html[data-samami-theme] #root .samami-enterprise-shell .samami-sidebar-explore[data-qa="erp-more-modules"]{display:none!important}
html[data-samami-theme] #root .samami-enterprise-shell :is(.samami-rail-sub-link,.samami-rail-branch-toggle){
 color:var(--sam-nav-inverse-ink)!important;
 -webkit-text-fill-color:var(--sam-nav-inverse-ink)!important;
 opacity:1!important;
}
html[data-samami-theme] #root .samami-enterprise-shell :is(.samami-rail-sub-link,.samami-rail-branch-toggle) :is(span,b,strong,small){
 color:inherit!important;-webkit-text-fill-color:currentColor!important;opacity:1!important;filter:none!important
}
html[data-samami-theme] #root .samami-enterprise-shell :is(.samami-rail-sub-link,.samami-rail-branch-toggle):is(:hover,:focus-visible){
 color:var(--sam-nav-inverse-active)!important;
 -webkit-text-fill-color:var(--sam-nav-inverse-active)!important;
 background:var(--sam-nav-inverse-control)!important;
}
html[data-samami-theme] #root .samami-enterprise-shell .samami-rail-sub-link.is-active{
 color:var(--sam-nav-inverse-active)!important;-webkit-text-fill-color:var(--sam-nav-inverse-active)!important;
 background:var(--sam-nav-inverse-selected)!important;opacity:1!important
}
html[data-samami-theme] #root .samami-enterprise-shell .samami-rail-sub-link::before{
 background:var(--sam-nav-inverse-muted)!important;opacity:1!important
}
/* Only a help icon remains. Its text is inside a header-owned floating panel. */
#root .samami-enterprise-shell .sam-erp-header-actions{position:relative!important;isolation:isolate!important;z-index:95!important}
#root .samami-enterprise-shell .sam-erp-header-actions [data-sam-erp-header-back]{display:none!important}
#root .samami-enterprise-shell .sam-erp-header-fallback{
 position:absolute!important;top:calc(100% + 9px)!important;
 inset-inline-start:0!important;inset-inline-end:auto!important;
 width:min(340px,calc(100vw - 22px))!important;max-width:calc(100vw - 22px)!important;
 max-height:min(45dvh,330px)!important;overflow-y:auto!important;
 box-sizing:border-box!important;z-index:110!important;
 padding:13px 15px!important;border:1px solid var(--sam-shell-border,#adc0d3)!important;
 border-radius:12px!important;background:var(--sam-shell-surface,#fff)!important;
 color:var(--sam-shell-text,#18314c)!important;
 box-shadow:0 12px 24px rgba(7,26,45,.18)!important;
 direction:inherit!important;text-align:start!important;overflow-wrap:anywhere!important;
}
#root .samami-enterprise-shell .sam-erp-header-fallback > strong{color:inherit!important;font-size:12.5px!important;font-weight:800!important}
#root .samami-enterprise-shell .sam-erp-header-fallback > p{color:inherit!important;font-size:12px!important;line-height:1.75!important;margin:5px 0 0!important}
#root .samami-enterprise-shell .sam-erp-header-fallback[hidden]{display:none!important}
#root .samami-enterprise-shell.sam-erp-header-help-ready main[data-qa="erp-main"] > details.sam-work-guide[data-sam-work-guide="erp"]{display:none!important}
@media(max-width:600px){
 #root .samami-enterprise-shell .sam-erp-header-fallback{top:calc(100% + 7px)!important;width:min(320px,calc(100vw - 16px))!important}
}

/* ERP v46 — one visual grammar for every real workspace, not a second nav. */
#root .samami-enterprise-shell .erp-page-surface{
 --sam-erp-unified-gap:10px;
 --sam-erp-unified-radius:11px;
 --sam-erp-unified-pad:12px;
 color:var(--sam-consistent-ink)!important;
 font-size:14px;
 line-height:1.65;
 min-width:0!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .sam-world-page,.samami-page-shell,.sam-today-page,
 .sam-sales-world-route,.sam-customers-world
){
 box-sizing:border-box!important;
 width:100%!important;
 max-width:100%!important;
 min-width:0!important;
 text-align:start!important;
 color:var(--sam-consistent-ink)!important;
 gap:var(--sam-erp-unified-gap)!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .samami-page-header,.sam-world-header,.sam-world-hero,
 .sam-page-header,.erp-page-header,.sam-workspace-hero
){
 box-sizing:border-box!important;
 max-width:100%!important;
 min-width:0!important;
 min-height:0!important;
 padding:12px 14px!important;
 margin:0 0 9px!important;
 border:1px solid var(--sam-consistent-border)!important;
 border-radius:var(--sam-erp-unified-radius)!important;
 background:var(--sam-consistent-surface)!important;
 background-image:none!important;
 color:var(--sam-consistent-ink)!important;
 box-shadow:none!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .samami-page-header,.sam-world-header,.sam-world-hero,
 .sam-page-header,.erp-page-header,.sam-workspace-hero
) :is(h1,h2){
 font-size:clamp(18px,1.5vw,23px)!important;
 font-weight:800!important;
 line-height:1.4!important;
 margin:0!important;
 color:var(--sam-consistent-ink)!important;
 -webkit-text-fill-color:var(--sam-consistent-ink)!important;
 overflow-wrap:anywhere!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .samami-page-header,.sam-world-header,.sam-world-hero,
 .sam-page-header,.erp-page-header,.sam-workspace-hero
) :is(p,small,.samami-page-description,.erp-section-description){
 margin:3px 0 0!important;
 color:var(--sam-consistent-muted)!important;
 -webkit-text-fill-color:var(--sam-consistent-muted)!important;
 font-size:12.5px!important;
 line-height:1.6!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .sam-operational-section,.sam-world-card,.erp-card,.sam-erp4-card,
 .sam-world-attention,.sam-world-workstream,.sam-world-toolbar,
 .sam-customer-master,.sam-customer-workspace-detail,.sam-workspace-related-paths,
 .sam-customer-master-detail,.sam-workspace-panel,.erp-workspace-panel
){
 box-sizing:border-box!important;
 min-width:0!important;
 max-width:100%!important;
 border:1px solid var(--sam-consistent-border)!important;
 border-radius:var(--sam-erp-unified-radius)!important;
 background:var(--sam-consistent-surface)!important;
 background-image:none!important;
 color:var(--sam-consistent-ink)!important;
 box-shadow:none!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .sam-operational-section,.sam-world-card,.erp-card,.sam-erp4-card,
 .sam-world-attention,.sam-world-workstream,.sam-workspace-panel,.erp-workspace-panel
){
 padding:var(--sam-erp-unified-pad)!important;
 margin-block:0!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .sam-operational-section,.sam-world-card,.erp-card,.sam-erp4-card,
 .sam-world-attention,.sam-world-workstream,.sam-customer-master,
 .sam-customer-workspace-detail,.sam-workspace-panel,.erp-workspace-panel
) :is(h2,h3,h4,.erp-section-title){
 color:var(--sam-consistent-ink)!important;
 -webkit-text-fill-color:var(--sam-consistent-ink)!important;
 font-size:clamp(14px,1.2vw,17px)!important;
 font-weight:750!important;
 line-height:1.5!important;
 overflow-wrap:anywhere!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .sam-operational-section,.sam-world-card,.erp-card,.sam-erp4-card,
 .sam-world-attention,.sam-world-workstream,.sam-customer-master,
 .sam-customer-workspace-detail,.sam-workspace-panel,.erp-workspace-panel
) :is(.erp-section-description,.sam-world-muted,.sam-workspace-muted){
 color:var(--sam-consistent-muted)!important;
 -webkit-text-fill-color:var(--sam-consistent-muted)!important;
 font-size:12px!important;
 line-height:1.6!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .erp-section-heading,.erp-section-header,.sam-world-section-header,
 .sam-operational-section > header
){
 box-sizing:border-box!important;
 min-width:0!important;
 margin:0 0 7px!important;
 padding:0!important;
 border:0!important;
 background:none!important;
 color:var(--sam-consistent-ink)!important;
}
/* Sidebar is the only cross-work-area navigation. Preserve data-view
   tabs and actions inside the actual customer/project record. */
#root .samami-enterprise-shell .erp-page-surface .sam-customers-world .sam-sales-integrated-nav,
#root .samami-enterprise-shell .erp-page-surface .sam-today-page .sam-workspace-related-paths{
 display:none!important;
}
#root .samami-enterprise-shell .erp-page-surface .sam-customers-world
.sam-customer-master-detail{
 gap:0!important;
 overflow:hidden!important;
 padding:0!important;
 background:var(--sam-consistent-surface)!important;
}
#root .samami-enterprise-shell .erp-page-surface .sam-customers-world
:is(.sam-customer-master,.sam-customer-workspace-detail){
 border:0!important;
 box-shadow:none!important;
 border-radius:0!important;
 background:var(--sam-consistent-surface)!important;
}
#root .samami-enterprise-shell .erp-page-surface .sam-customers-world
.sam-customer-master{
 border-inline-end:1px solid var(--sam-consistent-border)!important;
}
#root .samami-enterprise-shell .erp-page-surface .sam-customers-world
.sam-customer-master-row{
 min-height:54px!important;
 padding:9px 11px!important;
 color:var(--sam-consistent-ink)!important;
 border-color:var(--sam-consistent-border)!important;
}
#root .samami-enterprise-shell .erp-page-surface .sam-customers-world
.sam-customer-master-row .sam-customer-master-row__identity :is(b,small){
 -webkit-text-fill-color:currentColor!important;
}
#root .samami-enterprise-shell .erp-page-surface .sam-customers-world
.sam-customer-master-row.is-selected{
 background:var(--sam-consistent-surface-alt)!important;
 border-color:var(--sam-consistent-focus)!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .sam-world-toolbar,.sam-customer-controls,.sam-erp4-toolbar,.erp-toolbar,
 .sam-workspace-toolbar
){
 box-sizing:border-box!important;
 align-items:center!important;
 gap:7px!important;
 padding:7px 9px!important;
 margin:0 0 8px!important;
 max-width:100%!important;
 min-height:0!important;
 background:var(--sam-consistent-surface)!important;
 border:1px solid var(--sam-consistent-border)!important;
 border-radius:9px!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .sam-world-toolbar,.sam-customer-controls,.sam-erp4-toolbar,.erp-toolbar,
 .sam-workspace-toolbar
) :is(input,select,button){
 min-height:36px!important;
 max-width:100%!important;
 box-sizing:border-box!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .sam-world-section-nav,.sam-sales-family-nav,.sam-erp-context-tabs
){
 margin:0 0 8px!important;
 padding:5px!important;
 border-radius:9px!important;
 border-color:var(--sam-consistent-border)!important;
 background:var(--sam-consistent-surface-alt)!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .sam-world-section-nav,.sam-sales-family-nav,.sam-erp-context-tabs
) :is(button,a){
 min-height:34px!important;
 line-height:1.45!important;
 padding:6px 10px!important;
 border-radius:7px!important;
}
/* Forms and status/data tables remain operational; use the same accessible
   sizes and focus outlines without restyling status badge meaning. */
#root .samami-enterprise-shell .erp-page-surface :is(
 .erp-form-stack,.sam-operational-form,.sam-detail-form
){
 gap:10px!important;
}
#root .samami-enterprise-shell .erp-page-surface :is(
 .erp-form-stack,.sam-operational-form,.sam-detail-form
) :is(input,select,textarea){
 box-sizing:border-box!important;
 min-height:40px!important;
 max-width:100%!important;
 border-radius:8px!important;
}
#root .samami-enterprise-shell .erp-page-surface
:is(button,a,input,select,textarea):focus-visible{
 outline:2px solid var(--sam-consistent-focus)!important;
 outline-offset:2px!important;
}
@media(max-width:850px){
 #root .samami-enterprise-shell .erp-page-surface{
  --sam-erp-unified-gap:8px;
  --sam-erp-unified-pad:10px;
 }
 #root .samami-enterprise-shell .erp-page-surface :is(
  .samami-page-header,.sam-world-header,.sam-world-hero,
  .sam-page-header,.erp-page-header,.sam-workspace-hero
 ){
  padding:10px!important;
 }
 #root .samami-enterprise-shell .erp-page-surface .sam-customers-world
 .sam-customer-master{
  border-inline-end:0!important;
  border-block-end:1px solid var(--sam-consistent-border)!important;
 }
 #root .samami-enterprise-shell .erp-page-surface :is(
  .sam-world-toolbar,.sam-customer-controls,.sam-erp4-toolbar,.erp-toolbar,
  .sam-workspace-toolbar
 ){
  padding:6px!important;
  gap:6px!important;
 }
}

