/* ERP / CRM shell contract v1. Ship this pure stylesheet in each product.
   Component geometry belongs here; organization colors remain theme variables.
   Deliberately loaded after legacy feature sheets; no form/print overrides. */
@media screen {
  :root { --erp-sidebar:140px; }
  .erp-body .module-rail { width:var(--erp-sidebar);line-height:1.7; }
  .erp-body .module-rail__brand { min-height:50px;gap:7px;line-height:1.7;color:#3c424e; }
  .erp-body .module-rail__brand>span { width:31px;height:31px;border-radius:9px;font-size:.9rem; }
  .erp-body .module-rail__brand small { font-size:.52rem;font-weight:900;line-height:1.7;letter-spacing:.12em; }
  .erp-body .module-rail__nav { gap:1px;padding:6px;overflow-x:hidden; }
  .erp-body .module-rail__item { width:100%;min-height:38px;gap:7px;padding:5px 8px;border:1px solid transparent;border-radius:9px;color:#727a89;background:transparent;font-size:.78rem!important;font-weight:800;line-height:1.2;box-shadow:none;transform:none; }
  .erp-body .module-rail__item>i { width:19px;flex:0 0 19px;font-size:.92rem;line-height:1.2;color:#9299a6; }
  .erp-body .module-rail__item>span { min-width:0;white-space:normal;overflow-wrap:anywhere; }
  .erp-body .module-rail__item:hover { color:#353b46;border-color:#e8eaf0;background:#f7f8fa; }
  .erp-body .module-rail__item:hover>i { color:var(--org-accent,#dc9700); }
  .erp-body .module-rail__item:focus-visible { outline:2px solid var(--org-accent,#2878c8);outline-offset:-3px; }
  .erp-body .module-rail__item:is(.is-current,.is-active) { color:var(--org-accent-hover,#644a00);border-color:color-mix(in srgb,var(--org-accent,#f1ad00) 35%,#e4e7ec);background:var(--org-accent-soft,#fff8d9); }
  .erp-body .module-rail__item:is(.is-current,.is-active)>i { color:var(--org-accent,#d58f00); }
  .erp-body .module-rail__item.is-current::after { inset-block:6px;inset-inline-start:-6px; }
  .erp-body .module-rail__footer { gap:8px;padding:6px; }
  .erp-body .module-rail__utility { width:32px;height:32px;border-radius:9px; }
  .erp-body .module-rail__avatar { width:34px;height:34px;border-radius:10px;font-size:.72rem; }
  .erp-body .erp-topbar { line-height:1.7; }
  .erp-body .workspace-context strong,.erp-body .account-copy strong { font-size:14px;font-weight:850;line-height:1.7; }
  .erp-body .workspace-context span,.erp-body .account-copy small { font-size:12px;line-height:1.7; }
  .erp-body .account-trigger { gap:9px;line-height:1.7; }
  .erp-body .account-copy strong { line-height:1.45; }
  .erp-body .account-copy small { line-height:1.2; }
  .erp-body .account-avatar { width:38px;height:38px;border-radius:11px; }
  .erp-body :is(.page-heading,.page-head,[data-ui-page-heading]) { display:flex;align-items:center;justify-content:space-between;min-width:0;min-height:68px!important;margin:0 0 12px;padding:11px 14px!important;gap:14px!important;border:1px solid #dde5ee!important;border-radius:14px!important;background:#fff!important;box-shadow:0 3px 12px rgba(28,48,76,.035)!important;text-align:start; }
  .erp-body :is(.page-heading__main,.page-head__main) { display:flex;align-items:center;gap:10px;min-width:0;flex:1 1 auto; }
  .erp-body :is(.page-heading,.page-head,[data-ui-page-heading]) :is(.page-heading__icon,.page-head__icon) { position:static;display:grid;place-items:center;width:42px!important;height:42px!important;flex:0 0 42px!important;border:1px solid color-mix(in srgb,var(--org-accent,#2563eb) 18%,#e4eaf1)!important;border-radius:11px!important;color:var(--org-accent,#2563eb)!important;background:color-mix(in srgb,var(--org-accent,#2563eb) 8%,#fff)!important;box-shadow:none!important;font-size:1rem!important; }
  .erp-body :is(.page-heading,.page-head,[data-ui-page-heading]) h1 { margin:1px 0 0!important;color:#18243a!important;font-size:1.24rem!important;font-weight:900!important;line-height:1.35!important;letter-spacing:-.015em;white-space:normal;overflow:visible;overflow-wrap:anywhere; }
  .erp-body :is(.page-heading .eyebrow,.page-head small) { margin:0;color:var(--org-accent,#2563eb);font-size:.6rem!important;font-weight:850;line-height:1.3; }
  .erp-body :is(.page-heading,.page-head,[data-ui-page-heading]) p { display:block!important;margin:2px 0 0!important;color:#738095!important;font-size:.68rem!important;line-height:1.55!important; }
  .erp-body :is(.page-heading__actions,.page-head .page-actions) { display:flex;flex-wrap:wrap;gap:6px; }
  .erp-body :is(.page-heading__actions .btn,.page-head .page-actions a,.page-head .page-actions button,.page-head>a) { min-height:36px!important;padding-inline:12px!important;border-radius:9px!important;font-size:.75rem!important; }
  .erp-body :is(.page-head__copy,.page-head__main>div) { min-width:0; }
}
@media screen and (min-width:993px) {
  html[lang="en"] { --erp-sidebar:190px; }
  html[lang="hy"] { --erp-sidebar:224px; }
  .erp-body .account-trigger { width:190px;min-width:190px;padding:4px 7px; }
  .erp-body .erp-topbar { min-height:72px;padding-inline:25px; }
}
@media screen and (min-width:1101px) {
  .erp-body .module-context-bar { min-height:64px;padding-inline:24px;gap:14px;line-height:1.7; }
  .erp-body .module-context-bar__module { min-width:176px;padding-inline-end:15px; }
  .erp-body .module-context-bar__module strong { margin-block-start:3px;font-size:14px;font-weight:900;line-height:1.7; }
  .erp-body .module-context-bar__module small { font-size:12px;font-weight:850;line-height:1.7; }
  .erp-body .module-context-bar__links>a,.erp-body .module-context-group__trigger,.erp-body .crm-context-menu>summary { min-height:63px;height:100%;padding:8px 12px;gap:7px;font-size:14px!important;font-weight:800;line-height:1.7; }
  .erp-body .crm-context-menu.is-current>summary { font-weight:900; }
}
@media screen and (max-height:720px) and (min-width:769px) {
  .erp-body .module-rail__brand { min-height:46px; }
  .erp-body .module-rail__item { min-height:35px;padding-block:3px;font-size:.73rem!important; }
  .erp-body .module-rail__footer { padding-block:5px; }
  .erp-body .module-rail__utility { width:30px;height:30px; }
  .erp-body .module-rail__avatar { width:32px;height:32px; }
}
@media screen and (max-width:768px) {
  .erp-body :is(.page-heading,.page-head,[data-ui-page-heading]) { min-height:0!important;padding:10px!important;gap:9px!important;flex-wrap:wrap; }
  .erp-body :is(.page-heading,.page-head,[data-ui-page-heading]) h1 { font-size:1.05rem!important; }
  .erp-body :is(.page-heading,.page-head,[data-ui-page-heading]) :is(.page-heading__icon,.page-head__icon) { width:36px!important;height:36px!important;flex-basis:36px!important; }
}
@media screen and (min-width:993px) {
  html[lang="hy"] .erp-body .module-rail__item { min-height:44px;line-height:1.55; }
}

/* Compact launcher: CRM uses its own permission-filtered navigation source. */
.product-module-launcher{position:relative;flex:0 0 auto}
.product-module-launcher__trigger{display:flex;min-height:38px;align-items:center;gap:8px;padding:8px 12px;border:1px solid #ffffff2e;border-radius:10px;color:#fff;background:#ffffff14;cursor:pointer;white-space:nowrap}
.product-module-launcher__trigger>i{font-size:.92rem}
.product-module-launcher__trigger>span{font-size:.7rem;font-weight:850;line-height:1}
.product-module-launcher__trigger kbd{padding:3px 5px;border:1px solid #ffffff2e;border-radius:4px;color:#e1e4eb;background:#ffffff0d;font-size:.45rem;line-height:1}
.product-module-launcher__menu{position:absolute;inset-inline-start:0;inset-block-start:calc(100% + 10px);z-index:4100;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:360px;max-width:calc(100vw - 32px);gap:4px;padding:8px;border:1px solid #e3e6eb;border-radius:12px;background:#fff;box-shadow:0 16px 40px #172b4826}
.product-module-launcher__menu a{display:flex;min-height:42px;align-items:center;gap:8px;padding:8px;border:1px solid transparent;border-radius:8px;color:#596172;font-size:.78rem;font-weight:700;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
.product-module-launcher__menu a>i{color:var(--org-accent,#2878c8)}
.product-module-launcher__menu a:is(:hover,.is-current){color:var(--org-accent-hover,#1e62a8);background:var(--org-accent-soft,#eaf4ff)}
.product-module-launcher__trigger:focus-visible,.product-module-launcher__menu a:focus-visible{outline:2px solid var(--org-accent,#2878c8);outline-offset:2px}
@media(max-width:992px){.product-module-launcher{display:none}}

/* Compact rail labels; full destination names stay in titles and section bars. */
.erp-body .module-rail__item>span,.crm-body .module-rail__item>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;word-break:normal}

/* Explicit full module names wrap naturally when their locale needs more room. */
.erp-body .module-rail__item.module-rail__item--full-label>span{white-space:normal}

/* Icon-only module launcher, including Armenian and mobile headers. */
:is(.erp-body,.crm-body) .erp-topbar .menu-launcher-icon{width:40px;min-width:40px;max-width:40px;height:40px;min-height:40px;padding:0;justify-content:center;align-items:center;flex:0 0 40px;box-sizing:border-box}

/* A wrapped organization name can change header height in every locale. */
@media screen and (min-width:701px){.erp-body .module-context-bar,.crm-body .module-context-bar{top:var(--product-topbar-height,72px)}}
