/* SAMAMI ERP v78 — unified corporate navigation surface, role-aware,
   bilingual + quadrilingual search, theme-safe cards and nested destinations.
   Keep global project/service/finance business state and CRUD untouched. */
.samami-enterprise-shell .samami-sidebar-nav {
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:thin;
}
.samami-enterprise-shell .samami-rail-section,
.samami-enterprise-shell .samami-rail-sub-branch,
.samami-enterprise-shell .samami-rail-branch-items {
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
}
.samami-enterprise-shell .samami-rail-branch-items {
  padding-inline-start:6px;
  border-inline-start:1px solid rgba(164,203,239,.15);
}
.samami-enterprise-shell .samami-rail-branch-toggle,
.samami-enterprise-shell .samami-rail-sub-link {
  box-sizing:border-box;
  display:flex;
  align-items:center;
  width:100%;
  max-width:100%;
  min-height:40px;
  padding:9px 11px;
  gap:6px;
  white-space:normal;
  overflow-wrap:anywhere;
  border-radius:9px;
  line-height:1.45;
}
.samami-enterprise-shell .samami-rail-sub-link.is-active {
  border-inline-start:3px solid #65b8ff;
  background:rgba(57,130,198,.24);
  font-weight:800;
  color:#fff;
}
.samami-enterprise-shell .samami-rail-branch-toggle[aria-expanded="true"] {
  background:rgba(93,157,213,.12);
}
.samami-enterprise-shell .samami-rail-sub-link:focus-visible,
.samami-enterprise-shell .samami-rail-branch-toggle:focus-visible {
  outline:2px solid #8aceff;
  outline-offset:2px;
}
.samami-enterprise-shell .samami-rail-pending-v78 {
  display:flex;
  flex-wrap:wrap;
  align-items:start;
  justify-content:space-between;
  gap:4px 9px;
  padding:9px 11px;
  opacity:.75;
  cursor:not-allowed;
  border-radius:9px;
  color:#c2d6e8;
  font-size:12px;
  border:1px dashed rgba(169,195,216,.17);
}
.samami-enterprise-shell .samami-rail-pending-v78 small {
  font-size:10px;
  font-weight:700;
  color:#ffd59e;
}
.samami-enterprise-shell .samami-rail-status-v78 {
  display:inline-block;
  margin-inline-start:8px;
  padding:2px 5px;
  font-size:10px;
  font-weight:700;
  color:#ffe4ac;
  background:rgba(181,125,34,.16);
  border-radius:5px;
}
@media(max-width:720px){
.samami-enterprise-shell .samami-rail-sub-link {min-height:44px}
}
/* Dark/light-safe embedded data controls. Never recolor semantic status pills. */
.samami-enterprise-shell :is(.sam-world-browser,.erp-card,.fin49-panel,.supply54-page .rounded-2xl.border.bg-white) {
  min-width:0;
  box-sizing:border-box;
}
.samami-enterprise-shell :is(.sam-world-browser,.erp-card,.fin49-panel) :is(input,select,textarea) {
  max-width:100%;
  min-width:0;
}

/* v79: customer subviews have a single navigation owner: the sidebar. */
.samami-enterprise-shell .sam-customers-world .sam-customer-controls {
  min-width:0;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  margin-block:10px 14px;
}
.samami-enterprise-shell .sam-customers-world .sam-master-search {
  flex:1 1 230px;
  min-width:0;
  box-sizing:border-box;
}
.samami-enterprise-shell .sam-customers-world .sam-master-search input {
  box-sizing:border-box;
  min-width:0;
  width:100%;
  font:inherit;
}
.samami-enterprise-shell .sam-customer-editor .sam-customer-inline-error-v79,
.samami-enterprise-shell .sam-customer-inline-error-v79 {
  padding:12px 14px;
  border:1px solid #d77c7c;
  color:var(--sam-color-danger,#9d2727);
  background:rgba(219,72,72,.09);
  border-radius:10px;
  font-size:14px;
  line-height:1.65;
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
}
:root[data-samami-theme="dark"] .samami-enterprise-shell .sam-customer-inline-error-v79 {
  color:#ffcece;
  background:rgba(180,56,66,.19);
  border-color:#e88f95;
}
:root[data-samami-theme="light"] .samami-enterprise-shell .sam-customer-inline-error-v79 {
  color:#8d181e;
  background:#fff2f2;
}
.samami-enterprise-shell .sam-customer-editor input,
.samami-enterprise-shell .sam-customer-editor select {
  min-height:44px;
  max-width:100%;
}
@media(max-width:640px){
  .samami-enterprise-shell .sam-customers-world .sam-customer-controls {gap:8px;}
  .samami-enterprise-shell .sam-customers-world .sam-master-search {flex-basis:100%}
}
