:root {
  --erp-bg: #f3f0ea;
  --erp-surface: #fbf8f2;
  --erp-surface-2: #eef1f7;
  --erp-surface-3: #e4e7f2;
  --erp-line: rgba(78, 88, 120, .16);
  --erp-text: #2d3447;
  --erp-muted: #697187;
  --erp-green: #4f9b82;
  --erp-teal: #6394a6;
  --erp-gold: #bd9252;
  --erp-red: #c75f68;
  --erp-shadow: 0 12px 34px rgba(72, 78, 102, .10);
}

.login-screen {
  background: linear-gradient(145deg, #ece9e2, #f4f2ed 48%, #e7eaf2) !important;
  color: var(--erp-text) !important;
}

.login-card {
  border-color: var(--erp-line) !important;
  background: rgba(251, 248, 242, .94) !important;
  color: var(--erp-text) !important;
  box-shadow: var(--erp-shadow) !important;
}

.login-card .muted,
.login-card label {
  color: var(--erp-muted) !important;
}

.login-card input {
  border-color: var(--erp-line) !important;
  background: #f8f6f1 !important;
  color: var(--erp-text) !important;
}

body.erp-primary {
  background:
    linear-gradient(150deg, rgba(235, 229, 218, .8), transparent 42%),
    var(--erp-bg);
  color: var(--erp-text);
}

body.erp-primary #moduleTabs,
body.erp-primary .rate-strip,
body.erp-primary .top-savebar,
body.erp-primary #bottomNav,
body.erp-primary .action-fab,
body.erp-primary #actionSheet,
body.erp-primary .sheet-backdrop {
  display: none !important;
}

body.erp-primary .layout {
  grid-template-columns: 248px minmax(0, 1fr);
}

body.erp-primary aside {
  width: 248px;
  background: #e8eaf1;
  border-left: 1px solid var(--erp-line);
  padding: 20px 14px;
}

body.erp-primary aside .brand {
  padding: 4px 8px 20px;
  border-bottom: 1px solid var(--erp-line);
  margin-bottom: 14px;
}

body.erp-primary aside .brand h1 {
  font-size: 19px;
  margin: 0 0 5px;
}

body.erp-primary aside .brand p:first-of-type {
  display: none;
}

body.erp-primary aside .brand .cmd {
  width: 100%;
  margin-top: 12px;
}

body.erp-primary main {
  min-width: 0;
  padding: 0;
}

body.erp-primary main > .page:not(#erpApp) {
  display: none !important;
}

#erpApp {
  min-height: 100vh;
  padding: 20px clamp(14px, 2.4vw, 34px) 90px;
  direction: rtl;
  animation: none !important;
  transform: none !important;
}

#erpApp * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.erp-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -20px calc(clamp(14px, 2.4vw, 34px) * -1) 20px;
  padding: 13px clamp(14px, 2.4vw, 34px);
  background: rgba(243, 240, 234, .92);
  border-bottom: 1px solid var(--erp-line);
  backdrop-filter: blur(18px);
}

.erp-topbar h1 {
  margin: 0;
  font-size: 18px;
}

.erp-topbar p {
  margin: 3px 0 0;
  color: var(--erp-muted);
  font-size: 11px;
}

.erp-top-title {
  flex: 0 0 auto;
}

.erp-global-search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 420px) auto;
  flex: 1 1 420px;
  max-width: 520px;
  min-width: 220px;
}

.erp-global-search input,
.erp-global-search > button {
  min-height: 42px;
  border: 1px solid var(--erp-line);
  font: inherit;
}

.erp-global-search input {
  width: 100%;
  border-radius: 7px 0 0 7px;
  padding: 9px 12px;
  color: var(--erp-text);
  background: rgba(251, 248, 242, .96);
  outline: none;
}

.erp-global-search > button {
  border-right: 0;
  border-radius: 0 7px 7px 0;
  padding: 8px 13px;
  color: #f9f8f4;
  background: var(--erp-teal);
  font-weight: 800;
  cursor: pointer;
}

.erp-global-search input:focus {
  border-color: var(--erp-teal);
  box-shadow: 0 0 0 3px rgba(99, 148, 166, .12);
}

.erp-global-results {
  position: absolute;
  z-index: 160;
  inset: calc(100% + 7px) 0 auto;
  display: none;
  max-height: min(460px, 70vh);
  overflow: auto;
  padding: 7px;
  border: 1px solid var(--erp-line);
  border-radius: 8px;
  background: var(--erp-surface);
  box-shadow: 0 20px 52px rgba(55, 63, 84, .18);
}

.erp-global-results.open {
  display: grid;
  gap: 5px;
}

.erp-global-results button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  text-align: right;
  color: var(--erp-text);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.erp-global-results button:hover {
  border-color: var(--erp-line);
  background: var(--erp-surface-2);
}

.erp-global-results b,
.erp-global-results small {
  display: block;
}

.erp-global-results small {
  margin-top: 3px;
  color: var(--erp-muted);
}

.erp-global-results em {
  flex: 0 0 auto;
  color: var(--erp-teal);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.erp-global-empty {
  padding: 15px;
  text-align: center;
  color: var(--erp-muted);
}

.erp-top-actions,
.erp-actions,
.erp-segments {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.erp-btn {
  min-height: 40px;
  border: 1px solid var(--erp-line);
  border-radius: 7px;
  padding: 8px 13px;
  background: var(--erp-surface-2);
  color: var(--erp-text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.erp-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(53, 215, 154, .48);
  background: var(--erp-surface-3);
}

.erp-btn:active {
  transform: translateY(0);
}

.erp-inline-input {
  width: min(230px, 100%);
  min-height: 40px;
  border: 1px solid var(--erp-line);
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--erp-text);
  background: #f8f6f1;
  font: inherit;
}

.erp-btn.primary {
  color: #f9f8f4;
  border-color: transparent;
  background: linear-gradient(135deg, var(--erp-green), var(--erp-teal));
}

.erp-btn.gold {
  color: #fffaf1;
  border-color: transparent;
  background: var(--erp-gold);
}

.erp-btn.danger {
  color: #9f3d48;
  border-color: rgba(255, 116, 116, .35);
  background: rgba(255, 116, 116, .10);
}

.erp-icon-btn {
  width: 40px;
  padding: 0;
  font-size: 20px;
}

.erp-mobile-menu {
  display: none;
}

.erp-view {
  display: none;
  animation: erpEnter .25s ease both;
}

.erp-view.active {
  display: block;
}

@keyframes erpEnter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.erp-page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 16px;
}

.erp-page-head h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
}

.erp-page-head p {
  margin: 6px 0 0;
  color: var(--erp-muted);
  max-width: 760px;
}

.erp-grid {
  display: grid;
  gap: 12px;
}

.erp-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.erp-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.erp-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.erp-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.erp-kpi,
.erp-panel {
  border: 1px solid var(--erp-line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(251, 248, 242, .96), rgba(239, 242, 248, .94));
  box-shadow: var(--erp-shadow);
}

.erp-kpi {
  min-height: 112px;
  padding: 16px;
  overflow: hidden;
  position: relative;
}

.erp-kpi::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--erp-teal);
  opacity: .55;
}

.erp-kpi.good::after { background: var(--erp-green); }
.erp-kpi.gold::after { background: var(--erp-gold); }
.erp-kpi.danger::after { background: var(--erp-red); }

.erp-kpi span,
.erp-kpi small {
  display: block;
  color: var(--erp-muted);
}

.erp-kpi strong {
  display: block;
  margin: 9px 0 4px;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.15;
}

.erp-panel {
  padding: 17px;
  margin-bottom: 12px;
}

.erp-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.erp-panel h3 {
  margin: 0;
  font-size: 16px;
}

.erp-panel-head small,
.erp-muted {
  color: var(--erp-muted);
}

.erp-list {
  display: grid;
  gap: 7px;
}

.erp-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 11px;
  border: 1px solid var(--erp-line);
  border-radius: 6px;
  background: rgba(231, 234, 243, .42);
}

.erp-list-item b,
.erp-list-item small {
  display: block;
}

.erp-list-item small {
  color: var(--erp-muted);
  margin-top: 3px;
}

.erp-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--erp-muted);
  background: rgba(111, 116, 159, .08);
  border: 1px solid var(--erp-line);
  white-space: nowrap;
  font-size: 10px;
  font-weight: 800;
}

.erp-badge.good { color: #35765f; background: rgba(79, 155, 130, .12); }
.erp-badge.gold { color: #8f682f; background: rgba(189, 146, 82, .13); }
.erp-badge.danger { color: #a8404b; background: rgba(199, 95, 104, .11); }

.erp-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.erp-field {
  min-width: 0;
}

.erp-field.wide {
  grid-column: span 2;
}

.erp-field label {
  display: block;
  margin-bottom: 6px;
  color: #515a70;
  font-size: 11px;
  font-weight: 800;
}

.erp-field input,
.erp-field select,
.erp-field textarea,
.erp-search {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--erp-line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #f8f6f1;
  color: var(--erp-text);
  font: inherit;
  outline: none;
}

.erp-field textarea {
  min-height: 88px;
  resize: vertical;
}

.erp-file-picker {
  min-height: 42px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 9px 12px;
  border: 1px dashed var(--erp-line);
  border-radius: 6px;
  background: #f8f6f1;
  color: var(--erp-text) !important;
  cursor: pointer;
  text-align: center;
}

.erp-file-picker:hover {
  border-color: var(--erp-green);
  background: #f2f6f2;
}

.erp-file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.erp-file-picker span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  background: #e8f2ed;
  color: #176947;
  font-size: 11px;
  font-weight: 900;
}

.erp-field input:focus,
.erp-field select:focus,
.erp-field textarea:focus,
.erp-search:focus {
  border-color: var(--erp-green);
  box-shadow: 0 0 0 3px rgba(53, 215, 154, .09);
}

.erp-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  margin-bottom: 12px;
}

.erp-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--erp-line);
  border-radius: 7px;
}

.erp-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.erp-table th,
.erp-table td {
  padding: 10px;
  border-bottom: 1px solid var(--erp-line);
  text-align: right;
  vertical-align: middle;
}

.erp-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #3e465c;
  background: #e5e8f1;
  font-size: 10px;
}

.erp-table tr:last-child td {
  border-bottom: 0;
}

.erp-table tbody tr:hover {
  background: rgba(53, 215, 154, .035);
}

.erp-product-name {
  font-weight: 900;
}

.erp-product-name small {
  display: block;
  color: var(--erp-muted);
  font-weight: 500;
  margin-top: 3px;
}

.erp-mobile-cards {
  display: none;
}

.erp-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(91, 101, 133, .12);
}

.erp-progress span {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--erp-teal), var(--erp-green));
  transition: width .35s ease;
}

.erp-usage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 12px;
}

.erp-workflow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.erp-start-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.erp-start-flow button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 11px;
  border: 1px solid var(--erp-line);
  border-radius: 7px;
  text-align: right;
  color: var(--erp-text);
  background: var(--erp-surface);
  font: inherit;
  cursor: pointer;
}

.erp-start-flow button:hover {
  border-color: rgba(53, 215, 154, .4);
}

.erp-start-flow b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  color: #f9f8f4;
  background: var(--erp-green);
}

.erp-start-flow span,
.erp-start-flow small {
  display: block;
}

.erp-start-flow small {
  margin-top: 3px;
  color: var(--erp-muted);
}

.erp-workflow-strip > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 10px;
  border: 1px solid var(--erp-line);
  border-radius: 7px;
  color: var(--erp-muted);
  background: rgba(255, 255, 255, .025);
}

.erp-workflow-strip b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--erp-surface-3);
}

.erp-workflow-strip .active {
  color: var(--erp-text);
  border-color: rgba(228, 189, 98, .4);
}

.erp-workflow-strip .done {
  color: var(--erp-text);
  border-color: rgba(53, 215, 154, .28);
}

.erp-workflow-strip .done b {
  color: #f9f8f4;
  background: var(--erp-green);
}

.erp-plan-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.erp-compare-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--erp-line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .025);
}

.erp-compare-card.selected {
  border-color: rgba(53, 215, 154, .5);
  box-shadow: inset 0 0 0 1px rgba(53, 215, 154, .12);
}

.erp-compare-card.empty {
  color: var(--erp-muted);
}

.erp-compare-card > strong {
  font-size: 25px;
}

.erp-compare-head,
.erp-compare-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.erp-compare-metrics span {
  color: var(--erp-muted);
}

.erp-compare-metrics b {
  color: var(--erp-text);
}

.erp-usage-row {
  display: grid;
  gap: 7px;
}

.erp-note,
.erp-empty {
  border: 1px solid var(--erp-line);
  border-radius: 6px;
  padding: 11px;
  color: var(--erp-muted);
  background: rgba(255, 255, 255, .025);
}

.erp-note.good { border-color: rgba(79, 155, 130, .34); color: #2f7059; }
.erp-note.warn { border-color: rgba(189, 146, 82, .38); color: #825e29; }
.erp-note.danger { border-color: rgba(199, 95, 104, .36); color: #a23f4a; }

.erp-risk-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.erp-simulator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, .7fr);
  gap: 14px;
}

.erp-simulator-lines,
.erp-simulator-result {
  display: grid;
  gap: 8px;
}

.erp-simulator-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--erp-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .42);
}

.erp-simulator-row span,
.erp-simulator-row small {
  display: block;
}

.erp-simulator-row small {
  color: var(--erp-muted);
  margin-top: 3px;
}

.erp-simulator-row input {
  width: 100%;
  min-height: 42px;
}

.erp-simulator-result {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

.erp-simulator-result > div {
  padding: 12px;
  border: 1px solid var(--erp-line);
  border-radius: 8px;
  background: var(--erp-surface);
}

.erp-simulator-result small,
.erp-simulator-result strong {
  display: block;
}

.erp-simulator-result strong {
  margin-top: 5px;
  font-size: 1.05rem;
}

.erp-simulator-result .positive { color: var(--erp-green); }
.erp-simulator-result .negative { color: var(--erp-red); }

.erp-modal-backdrop {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(37, 44, 61, .34);
  backdrop-filter: blur(8px);
}

.erp-modal {
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--erp-line);
  border-radius: 8px;
  background: var(--erp-surface);
  box-shadow: 0 28px 70px rgba(37, 44, 61, .24);
}

.erp-action-menu {
  position: relative;
}

.erp-action-menu summary {
  list-style: none;
  cursor: pointer;
}

.erp-action-menu summary::-webkit-details-marker {
  display: none;
}

.erp-action-menu > div {
  position: absolute;
  z-index: 80;
  inset: calc(100% + 6px) auto auto 0;
  min-width: 160px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--erp-line);
  border-radius: 8px;
  background: var(--erp-surface);
  box-shadow: var(--erp-shadow);
}

.erp-disclosure {
  border: 1px solid var(--erp-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .34);
}

.erp-disclosure > summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 800;
  color: var(--erp-text);
}

.erp-disclosure[open] > summary {
  border-bottom: 1px solid var(--erp-line);
}

.erp-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin: 12px 0 8px;
}

.erp-check-grid span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--erp-line);
  border-radius: 8px;
  background: var(--erp-surface);
  font-weight: 700;
}

.erp-check-grid .ok { color: var(--erp-green); }
.erp-check-grid .bad { color: var(--erp-red); }

.erp-manual-product {
  padding: 12px;
  border: 1px solid var(--erp-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .46);
}

.erp-manual-product > b {
  display: block;
  margin-bottom: 9px;
}

.erp-manual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.erp-planning-tools {
  display: grid;
  gap: 14px;
}

.erp-manual-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--erp-line);
  border-radius: 8px;
  background: var(--erp-surface);
}

.erp-manual-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.erp-manual-card header b,
.erp-manual-card header small {
  display: block;
}

.erp-manual-card header b {
  font-size: 17px;
}

.erp-manual-card header small {
  margin-top: 4px;
  color: var(--erp-muted);
}

.erp-manual-fields {
  display: grid;
  grid-template-columns: 1.2fr .8fr 1fr 1fr;
  gap: 10px;
}

.erp-manual-field {
  display: grid;
  gap: 6px;
}

.erp-manual-field span {
  color: var(--erp-muted);
  font-size: 12px;
  font-weight: 800;
}

.erp-manual-field input,
.erp-manual-field select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--erp-line);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--erp-text);
  background: var(--erp-surface-2);
  font: inherit;
  font-size: 17px;
  font-weight: 800;
}

.erp-manual-field.quantity input {
  border-color: #829ac9;
  background: #e8eef8;
  font-size: 20px;
}

.erp-gate-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.erp-gate-metrics span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--erp-line);
  border-radius: 7px;
}

.erp-warning-list {
  margin: 10px 0;
  padding-right: 20px;
}

.erp-warning-list li {
  margin: 6px 0;
}

.erp-invoice-shell {
  margin-top: 14px;
}

.erp-invoice-actions {
  margin-bottom: 10px;
}

.erp-invoice-report {
  overflow: hidden;
  border: 1px solid var(--erp-line);
  border-radius: 8px;
  background: var(--erp-surface);
}

.erp-invoice-report > header,
.erp-invoice-party {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--erp-line);
}

.erp-invoice-report h2 {
  margin: 4px 0 0;
}

.erp-invoice-report small,
.erp-invoice-report span {
  color: var(--erp-muted);
}

.erp-invoice-lines > div {
  display: grid;
  grid-template-columns: 1fr 130px 150px;
  gap: 12px;
  align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--erp-line);
}

.erp-invoice-lines b,
.erp-invoice-lines small {
  display: block;
}

.erp-invoice-totals {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 1px;
  background: var(--erp-line);
}

.erp-invoice-totals > div {
  display: grid;
  gap: 5px;
  padding: 14px;
  background: var(--erp-surface-2);
}

@media (max-width: 760px) {
  .erp-invoice-lines > div {
    grid-template-columns: 1fr auto;
  }

  .erp-invoice-lines > div > strong {
    grid-column: 1 / -1;
  }

  .erp-invoice-totals {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 430px) {
  .erp-invoice-report > header,
  .erp-invoice-party {
    align-items: flex-start;
    flex-direction: column;
  }

  .erp-invoice-actions .erp-btn {
    flex: 1 1 100%;
  }
}

@media print {
  body.erp-print-invoice {
    margin: 0;
    padding: 8mm;
    background: #eef2f7;
  }

  body.erp-print-invoice .erp-invoice-report {
    max-width: 100%;
  }
}

.erp-plan-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.erp-plan-summary > div {
  padding: 11px;
  border: 1px solid var(--erp-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .025);
}

.erp-plan-summary small,
.erp-plan-summary strong {
  display: block;
}

.erp-plan-summary small {
  color: var(--erp-muted);
}

.erp-plan-summary strong {
  margin-top: 5px;
  font-size: 16px;
}

.erp-timeline {
  display: grid;
  grid-template-columns: repeat(8, minmax(100px, 1fr));
  gap: 7px;
  overflow: auto;
}

.erp-stage {
  min-height: 94px;
  padding: 11px;
  border: 1px solid var(--erp-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .025);
}

.erp-stage b,
.erp-stage small {
  display: block;
}

.erp-stage small {
  margin-top: 7px;
  color: var(--erp-muted);
}

.erp-stage.active { border-color: var(--erp-green); }
.erp-stage.completed { border-color: rgba(53, 215, 154, .35); background: rgba(53, 215, 154, .07); }
.erp-stage.blocked { border-color: var(--erp-red); }

.erp-mobile-nav {
  display: none;
}

.erp-more-menu {
  display: none;
}

.erp-toast {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 300;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--erp-line);
  border-radius: 7px;
  background: #f7f4ed;
  color: var(--erp-text);
  box-shadow: var(--erp-shadow);
  animation: erpEnter .2s ease;
}

.erp-toast.error {
  border-color: rgba(255, 116, 116, .45);
}

.erp-nav {
  display: grid;
  gap: 5px;
}

.erp-nav button {
  min-height: 43px;
  border: 0;
  border-radius: 6px;
  padding: 10px 11px;
  text-align: right;
  color: var(--erp-muted);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.erp-nav button:hover,
.erp-nav button.active {
  color: var(--erp-text);
  background: rgba(53, 215, 154, .09);
}

.erp-nav button.active {
  box-shadow: inset -3px 0 var(--erp-green);
}

.erp-segments {
  padding: 4px;
  border: 1px solid var(--erp-line);
  border-radius: 7px;
  background: #e7e9f1;
}

.erp-segments button {
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  padding: 6px 11px;
  color: var(--erp-muted);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.erp-segments button.active {
  color: var(--erp-text);
  background: var(--erp-surface-3);
}

.erp-container-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: thin;
}

.erp-container-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid var(--erp-line);
  border-radius: 6px;
  padding: 7px 11px;
  color: var(--erp-muted);
  background: var(--erp-surface);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.erp-container-tabs button.active {
  color: #f9f8f4;
  border-color: transparent;
  background: var(--erp-green);
}

.erp-action-row {
  width: 100%;
  color: inherit;
  text-align: right;
  font: inherit;
  cursor: pointer;
}

.erp-action-row:hover {
  border-color: rgba(53, 215, 154, .4);
}

.erp-table input {
  width: 100px;
  min-height: 36px;
  border: 1px solid var(--erp-line);
  border-radius: 5px;
  padding: 6px;
  color: var(--erp-text);
  background: #f8f6f1;
}

.erp-decision-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.erp-decision-strip button {
  min-width: 0;
  min-height: 94px;
  padding: 13px;
  border: 1px solid var(--erp-line);
  border-radius: 8px;
  text-align: right;
  color: var(--erp-text);
  background: linear-gradient(145deg, rgba(251, 248, 242, .96), rgba(235, 239, 247, .94));
  font: inherit;
  cursor: pointer;
}

.erp-decision-strip small,
.erp-decision-strip strong,
.erp-decision-strip span {
  display: block;
}

.erp-decision-strip small,
.erp-decision-strip span {
  color: var(--erp-muted);
}

.erp-decision-strip strong {
  margin: 7px 0 5px;
  font-size: 18px;
}

.erp-decision-strip .positive { color: #35765f; }
.erp-decision-strip .negative { color: #a8404b; }

.erp-analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.erp-analytics-grid h4 {
  margin: 0 0 8px;
}

.erp-recommendation {
  align-items: flex-start;
}

.erp-monthly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.erp-monthly-grid article {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--erp-line);
  border-radius: 7px;
  background: rgba(231, 234, 243, .42);
}

.erp-monthly-grid span {
  color: var(--erp-muted);
  font-size: 11px;
}

@media (max-width: 1280px) {
  .erp-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .erp-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .erp-plan-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .erp-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
  body.erp-primary .layout { display: block; }
  body.erp-primary aside { display: none !important; }
  #erpApp { padding: 14px 12px 88px; }
  .erp-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    margin: -14px -12px 14px;
    padding: 11px 12px;
  }
  .erp-global-search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .erp-topbar .erp-top-actions .erp-btn:not(.erp-mobile-menu) { display: none; }
  .erp-mobile-menu { display: inline-flex; align-items: center; justify-content: center; }
  .erp-mobile-nav {
    position: fixed;
    z-index: 220;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 6px 7px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--erp-line);
    background: rgba(241, 239, 235, .97);
    backdrop-filter: blur(18px);
  }
  .erp-mobile-nav button {
    min-width: 0;
    min-height: 48px;
    border: 0;
    border-radius: 6px;
    color: var(--erp-muted);
    background: transparent;
    font: inherit;
    font-size: 9px;
    font-weight: 800;
  }
  .erp-mobile-nav button.active {
    color: var(--erp-green);
    background: rgba(53, 215, 154, .08);
  }
  .erp-more-menu {
    position: fixed;
    z-index: 230;
    left: 10px;
    right: 10px;
    bottom: calc(68px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 10px;
    border: 1px solid var(--erp-line);
    border-radius: 8px;
    background: rgba(246, 243, 237, .98);
    box-shadow: var(--erp-shadow);
    backdrop-filter: blur(18px);
  }
  .erp-more-menu.open {
    display: grid;
  }
  .erp-more-menu button {
    min-height: 44px;
    border: 1px solid var(--erp-line);
    border-radius: 6px;
    color: var(--erp-text);
    background: var(--erp-surface-2);
    font: inherit;
    font-weight: 800;
  }
}

@media (max-width: 760px) {
  .erp-manual-grid {
    grid-template-columns: 1fr;
  }

  .erp-manual-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .erp-gate-metrics {
    grid-template-columns: 1fr;
  }
  .erp-simulator-grid { grid-template-columns: 1fr; }
  .erp-simulator-row { grid-template-columns: minmax(0, 1fr) 105px; }
  .erp-simulator-result { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .erp-page-head { align-items: start; }
  .erp-page-head h2 { font-size: 23px; }
  .erp-page-head .erp-actions { display: none; }
  .erp-kpis,
  .erp-grid.two,
  .erp-grid.three,
  .erp-grid.four,
  .erp-form,
  .erp-plan-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .erp-kpi { min-height: 92px; padding: 12px; }
  .erp-kpi strong { font-size: 18px; }
  .erp-panel { padding: 13px; }
  .erp-field.wide { grid-column: span 2; }
  .erp-toolbar { grid-template-columns: 1fr; }
  .erp-table-wrap.desktop-only { display: none; }
  .erp-mobile-cards { display: grid; gap: 9px; }
.erp-mobile-card {
    padding: 13px;
    border: 1px solid var(--erp-line);
    border-radius: 7px;
    background: var(--erp-surface);
  }
  .erp-mobile-card-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 10px;
    margin-bottom: 10px;
  }
  .erp-mobile-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .erp-mobile-metrics div {
    padding: 8px;
    border-radius: 5px;
    background: rgba(225, 229, 239, .58);
  }
  .erp-mobile-metrics small,
  .erp-mobile-metrics strong {
    display: block;
  }
  .erp-mobile-metrics small { color: var(--erp-muted); }
  .erp-mobile-metrics strong { margin-top: 4px; font-size: 13px; }
  .erp-usage { grid-template-columns: 1fr; }
  .erp-workflow-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .erp-plan-compare {
    grid-template-columns: 1fr;
  }
  .erp-start-flow {
    grid-template-columns: 1fr;
  }
  .erp-decision-strip,
  .erp-analytics-grid {
    grid-template-columns: 1fr;
  }
  .erp-recommendation {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .erp-recommendation .erp-actions {
    width: 100%;
  }
}

.erp-focused-row {
  outline: 2px solid rgba(92, 104, 203, .48);
  outline-offset: -2px;
  background: rgba(92, 104, 203, .08) !important;
}

.erp-workflow-card {
  align-items: flex-start;
}

.erp-workflow-card .erp-actions {
  max-width: 620px;
}

.erp-customer-layout {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(420px, 1.2fr);
  gap: 16px;
}

.erp-customer-list,
.erp-customer-detail {
  min-width: 0;
}

.erp-customer-row.selected {
  border-color: #7c8fe8;
  background: #f1f3ff;
  box-shadow: 0 0 0 2px rgba(90, 109, 210, .1);
}

.erp-customer-row > div:last-child {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.erp-mini-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.erp-mini-kpis > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--erp-line);
  border-radius: 8px;
  background: #f6f8fc;
}

.erp-mini-kpis small,
.erp-mini-kpis strong {
  display: block;
}

.erp-mini-kpis strong {
  margin-top: 4px;
  font-size: 15px;
}

.erp-credit-meter {
  margin: 12px 0;
}

.erp-credit-meter > div {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #e7eaf0;
}

.erp-credit-meter span {
  display: block;
  height: 100%;
  background: #6777cf;
}

.erp-credit-meter small {
  display: block;
  margin-top: 6px;
}

.erp-subsection {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--erp-line);
}

.erp-subsection h4 {
  margin: 0 0 10px;
}

.erp-link-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #8b3d3d;
  padding: 6px 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.erp-form.compact {
  grid-template-columns: minmax(150px, .55fr) minmax(160px, .65fr) minmax(260px, 1.8fr);
}

.erp-mini-field {
  display: grid;
  gap: 4px;
  min-width: 130px;
  color: var(--erp-muted);
  font-size: 11px;
  font-weight: 700;
}

.erp-mini-field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--erp-line);
  border-radius: 7px;
  background: var(--erp-surface);
  color: var(--erp-text);
  padding: 7px 9px;
  font: inherit;
}

@media (max-width: 700px) {
  .erp-customer-layout {
    grid-template-columns: 1fr;
  }

  .erp-mini-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .erp-form.compact {
    grid-template-columns: 1fr;
  }

  .erp-customer-row {
    align-items: flex-start;
  }

  .erp-customer-row > div:last-child {
    justify-items: start;
  }

  .erp-workflow-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .erp-workflow-card > div:first-child,
  .erp-workflow-card .erp-actions {
    width: 100%;
  }

  .erp-workflow-card .erp-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .erp-workflow-card .erp-actions .erp-badge,
  .erp-workflow-card .erp-actions .erp-btn {
    min-height: 42px;
  }
}

@media (max-width: 430px) {
  .erp-manual-card {
    padding: 13px;
  }

  .erp-manual-card header {
    display: grid;
  }

  .erp-manual-fields {
    grid-template-columns: 1fr;
  }

  .erp-manual-field input,
  .erp-manual-field select {
    min-height: 56px;
    font-size: 18px;
  }
  #erpApp { padding-inline: 9px; }
  .erp-topbar { margin-inline: -9px; }
  .erp-topbar h1 { font-size: 15px; }
  .erp-topbar p { display: none; }
  .erp-kpis { gap: 7px; }
  .erp-kpi { min-height: 86px; padding: 10px; }
  .erp-kpi strong { font-size: 15px; overflow-wrap: anywhere; }
  .erp-kpi span,
  .erp-kpi small { font-size: 9px; }
  .erp-form { grid-template-columns: 1fr; }
  .erp-field.wide { grid-column: auto; }
  .erp-panel-head { align-items: start; }
  .erp-plan-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .erp-btn { min-height: 42px; }
}

@media print {
  body.erp-primary aside,
  .erp-topbar,
  .erp-mobile-nav,
  .erp-actions,
  .erp-toolbar {
    display: none !important;
  }
  #erpApp {
    padding: 0;
    color: #17211d;
    background: #faf8f2;
  }
  .erp-view:not(.active) { display: none !important; }
  .erp-panel,
  .erp-kpi {
    box-shadow: none;
    color: #17211d;
    background: #faf8f2;
    border-color: #d7dfdb;
    break-inside: avoid;
  }
  .erp-muted,
  .erp-kpi span,
  .erp-kpi small {
    color: #53645c !important;
  }
}
.erp-export-sheet {
  position: fixed;
  z-index: 999999;
  top: 0;
  left: -20000px;
  padding: 24px;
  background: #f3f0ea;
  color: #2d3447;
  direction: rtl;
}

.erp-export-sheet > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  color: #7a659f;
}

.erp-report-tabs {
  margin-bottom: 12px;
  overflow-x: auto;
  flex-wrap: nowrap;
}

.erp-report-tabs button {
  flex: 0 0 auto;
}

.erp-report-sheet {
  padding: 16px;
  border: 1px solid var(--erp-line);
  border-radius: 8px;
  color: var(--erp-text);
  background: linear-gradient(145deg, #fbf8f2, #eef1f7);
}

.erp-report-sheet > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 2px solid rgba(99, 148, 166, .28);
}

.erp-report-sheet h3,
.erp-report-sheet h4 {
  margin: 0;
}

.erp-report-sheet header small,
.erp-report-sheet header span {
  color: var(--erp-muted);
}

.erp-report-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.erp-report-kpis > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--erp-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .5);
}

.erp-report-kpis small,
.erp-report-kpis strong {
  display: block;
}

.erp-report-kpis small {
  color: var(--erp-muted);
}

.erp-report-kpis strong {
  margin-top: 5px;
  font-size: 15px;
}

.erp-report-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.erp-report-columns > div {
  padding: 11px;
  border: 1px solid var(--erp-line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .42);
}

.erp-report-columns p,
.erp-report-table p {
  display: grid;
  grid-template-columns: minmax(150px, 1.4fr) repeat(4, minmax(90px, .7fr));
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--erp-line);
}

.erp-report-columns p {
  grid-template-columns: minmax(130px, 1fr) auto;
}

.erp-report-columns p:last-child,
.erp-report-table p:last-child {
  border-bottom: 0;
}

.erp-report-columns span,
.erp-report-table span {
  color: var(--erp-muted);
  font-size: 11px;
}

.erp-export-sheet .erp-report-sheet {
  box-shadow: none;
}

.erp-export-sheet .erp-actions,
.erp-export-sheet button {
  display: none !important;
}

.erp-component-summary {
  display: grid;
  gap: 4px;
  margin-top: 7px;
  padding: 8px 10px;
  border: 1px solid #d8e2ee;
  border-radius: 6px;
  background: #f1f5fa;
  color: #4e5c70;
  font-size: 11px;
}

.erp-component-summary b {
  color: #315b66;
}

.erp-component-summary span {
  display: block;
  white-space: normal;
}

@media print {
  body.erp-print-single > *:not(.erp-export-sheet) {
    display: none !important;
  }

  body.erp-print-single .erp-export-sheet {
    display: block !important;
    position: static;
    width: 100% !important;
    min-height: 0;
    padding: 8mm;
    color-adjust: exact;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

@media (max-width: 760px) {
  .erp-report-kpis,
  .erp-report-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .erp-report-table p {
    grid-template-columns: 1fr 1fr;
  }
  .erp-report-table p b {
    grid-column: 1 / -1;
  }
}

@media (max-width: 430px) {
  .erp-report-kpis,
  .erp-report-columns {
    grid-template-columns: 1fr;
  }
}

/* V51 light owner workspace: opaque, calm and high-contrast on laptop and iPhone. */
:root {
  color-scheme: light;
  --erp-bg: #e9eef6;
  --erp-surface: #f3f0f8;
  --erp-surface-2: #e4ebf5;
  --erp-surface-3: #d8e2f0;
  --erp-line: #c7d1e1;
  --erp-text: #243047;
  --erp-muted: #5d6b82;
  --erp-green: #3f8f78;
  --erp-teal: #557fc1;
  --erp-gold: #b78342;
  --erp-red: #bd5966;
  --erp-shadow: 0 12px 30px #c7cfdd;
}

html,
body,
body.erp-primary {
  background: #e9eef6 !important;
  color: var(--erp-text) !important;
}

#erpApp,
#erpApp h1,
#erpApp h2,
#erpApp h3,
#erpApp h4,
#erpApp h5,
#erpApp strong,
#erpApp b,
.erp-topbar h1,
.erp-topbar h2,
body.erp-primary aside .brand h1,
body.erp-primary aside .brand p {
  color: #243047 !important;
}

.erp-muted,
#erpApp small,
#erpApp .muted,
.erp-topbar p {
  color: #5d6b82 !important;
}

.login-screen {
  background: #dfe7f2 !important;
}

.login-card {
  background: #f0edf6 !important;
  border-color: #bcc8dc !important;
  box-shadow: 0 18px 45px #b8c2d2 !important;
}

.login-card .field {
  background: #e5eaf4 !important;
  border: 1px solid #c1ccde !important;
  border-radius: 8px !important;
  padding: 10px !important;
  margin-bottom: 10px !important;
}

.login-card .field label {
  color: #52617a !important;
}

.login-card input,
body.erp-primary input,
body.erp-primary select,
body.erp-primary textarea,
.erp-mini-field input {
  background: #f2f4f9 !important;
  border-color: #bcc8da !important;
  color: #243047 !important;
}

.login-card .cmd {
  background: #e0e7f2 !important;
  border-color: #b8c5d9 !important;
  color: #33425d !important;
}

.login-card .cmd.primary {
  background: #557fc1 !important;
  border-color: #557fc1 !important;
  color: #f3f5fa !important;
}

body.erp-primary aside {
  background: #dce4f2 !important;
  border-color: #bec9dc !important;
}

body.erp-primary aside .brand {
  background: #d3ddef;
  border: 1px solid #bac7dc;
  border-radius: 8px;
  padding: 14px;
}

body.erp-primary aside button {
  color: #33435f !important;
  background: #e6ebf4 !important;
  border-color: #c6d0df !important;
}

body.erp-primary aside button:hover {
  color: #27344d !important;
  background: #d3dded !important;
  border-color: #9eafd0 !important;
}

body.erp-primary aside button.active,
body.erp-primary aside button[aria-current="page"] {
  color: #27334a !important;
  background: #c6d4ed !important;
  border-color: #829ac9 !important;
  box-shadow: inset 4px 0 0 #557fc1;
}

.erp-topbar {
  background: #e4eaf3 !important;
  border-color: #c4cede !important;
  backdrop-filter: none !important;
}

.erp-global-search input,
.erp-global-results,
.erp-panel,
.erp-kpi,
.erp-mobile-card,
.erp-list-item,
.erp-manual-product,
.erp-plan-card,
.erp-stage,
.erp-note,
.erp-report-sheet,
.erp-report-kpis > div,
.erp-report-columns > div,
.erp-export-sheet {
  background: #f1eef6 !important;
  border-color: #c4cedf !important;
  color: #243047 !important;
}

.erp-kpi {
  background: #e8edf7 !important;
}

.erp-panel:nth-of-type(3n + 1),
.erp-mobile-card:nth-of-type(3n + 1),
.erp-list-item:nth-of-type(3n + 1) {
  background: #edf1f8 !important;
}

.erp-panel:nth-of-type(3n + 2),
.erp-mobile-card:nth-of-type(3n + 2),
.erp-list-item:nth-of-type(3n + 2) {
  background: #eef3ee !important;
}

.erp-panel:nth-of-type(3n),
.erp-mobile-card:nth-of-type(3n),
.erp-list-item:nth-of-type(3n) {
  background: #f2edf5 !important;
}

.erp-btn,
.erp-segments button,
.erp-tabs button,
.erp-report-tabs button,
.erp-global-results button {
  background: #e2e9f4 !important;
  border-color: #bdc9dc !important;
  color: #2d3a54 !important;
}

.erp-btn:hover,
.erp-segments button:hover,
.erp-tabs button:hover,
.erp-report-tabs button:hover,
.erp-global-results button:hover {
  background: #d3def0 !important;
  border-color: #8da3cc !important;
}

.erp-btn.primary,
.erp-segments button.active,
.erp-tabs button.active,
.erp-report-tabs button.active,
.erp-global-search > button {
  background: #557fc1 !important;
  border-color: #557fc1 !important;
  color: #f3f5fa !important;
  box-shadow: 0 7px 17px #c3cede !important;
}

.erp-btn.gold {
  background: #c69a5d !important;
  border-color: #b78342 !important;
  color: #2d3447 !important;
}

.erp-btn.danger {
  color: #873743 !important;
  background: #f2dfe3 !important;
  border-color: #d8a9b1 !important;
}

.erp-table-wrap {
  background: #edf1f7 !important;
  border-color: #c1ccdc !important;
}

.erp-table th {
  background: #d9e2ef !important;
  color: #33415c !important;
}

.erp-table td {
  background: #f0f2f7 !important;
  border-color: #ccd5e2 !important;
}

.erp-table tbody tr:hover td {
  background: #e1e9f4 !important;
}

.erp-badge {
  background: #dbe3ef !important;
  color: #43536e !important;
}

.erp-badge.good,
.erp-note.good,
.erp-stage.completed {
  background: #dcece5 !important;
  color: #2e6d58 !important;
  border-color: #9fc8b7 !important;
}

.erp-badge.gold,
.erp-note.warn {
  background: #f0e5d2 !important;
  color: #7d5927 !important;
  border-color: #d4b581 !important;
}

.erp-badge.danger,
.erp-note.danger {
  background: #f2dfe3 !important;
  color: #923e4a !important;
  border-color: #d8a7af !important;
}

.erp-export-sheet {
  background: #e9eef6 !important;
}

.erp-report-sheet {
  background: #eef1f7 !important;
}

.erp-component-summary {
  background: #e2eaf4 !important;
  border-color: #bdcadc !important;
  color: #4d5c73 !important;
}

@media (max-width: 1000px) {
  body.erp-primary aside {
    background: #dce4f2 !important;
    box-shadow: 0 15px 38px #b9c4d5 !important;
  }

  .erp-mobile-nav {
    background: #dbe4f1 !important;
    border-color: #bac7d9 !important;
    box-shadow: 0 -8px 25px #c4cedd !important;
  }

  .erp-mobile-nav button {
    background: #e8edf5 !important;
    color: #34435d !important;
    border-color: #c4cede !important;
  }

  .erp-mobile-nav button.active {
    background: #c9d7ee !important;
    color: #293a59 !important;
    border-color: #879dcc !important;
  }
}

@media (max-width: 600px) {
  .erp-grid.two,
  .erp-grid.three {
    grid-template-columns: 1fr !important;
  }

  .erp-dashboard-main,
  .erp-money-map {
    min-height: auto !important;
  }

  .erp-money-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media print {
  #erpApp,
  .erp-export-sheet,
  .erp-panel,
  .erp-kpi,
  .erp-report-sheet,
  .erp-report-kpis > div,
  .erp-report-columns > div,
  .erp-table td,
  .erp-table th {
    color: #243047 !important;
    background: #edf1f7 !important;
    border-color: #bac6d7 !important;
  }
}

/* CEO Dashboard V2 */
body.erp-primary {
  background: #f4f6f8 !important;
}

body.erp-primary aside {
  color: #edf5f1 !important;
  background: #10251f !important;
  border-color: #29463d !important;
}

body.erp-primary aside .brand {
  color: #f4f8f6 !important;
  background: #17382f !important;
  border-color: #315247 !important;
}

body.erp-primary aside .brand h1,
body.erp-primary aside .brand p {
  color: #f4f8f6 !important;
}

body.erp-primary aside button {
  color: #cbdad4 !important;
  background: transparent !important;
  border-color: transparent !important;
}

body.erp-primary aside button:hover {
  color: #ffffff !important;
  background: #1b3f35 !important;
  border-color: #315247 !important;
}

body.erp-primary aside button.active,
body.erp-primary aside button[aria-current="page"] {
  color: #ffffff !important;
  background: #245044 !important;
  border-color: #3e6c5e !important;
  box-shadow: inset 4px 0 0 #8bc9b2;
}

#erpView-overview {
  color: #24332e;
}

.erp-command-head {
  align-items: center;
  margin-bottom: 22px;
}

.erp-command-head h2 {
  margin-bottom: 7px;
  color: #1e302a;
  font-size: clamp(24px, 2.3vw, 34px);
}

.erp-command-head p {
  max-width: 680px;
  color: #687570;
}

.erp-command-eyebrow {
  display: inline-flex;
  margin-bottom: 7px;
  color: #397765;
  font-size: 11px;
  font-weight: 900;
}

.erp-command-primary,
.erp-command-diagnostics,
.erp-command-rankings {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.erp-command-primary {
  grid-template-columns: minmax(0, 7fr) minmax(340px, 5fr);
  align-items: stretch;
}

.erp-command-diagnostics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.erp-command-rankings {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.erp-command-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid #d7dee4;
  border-radius: 8px;
  color: #293731;
  background: #fbfcfe !important;
  box-shadow: 0 10px 26px rgba(31, 52, 45, .07);
}

.erp-command-card[role="button"] {
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.erp-command-card[role="button"]:hover,
.erp-command-card[role="button"]:focus-visible {
  border-color: #a7beb5;
  box-shadow: 0 14px 30px rgba(31, 52, 45, .11);
  transform: translateY(-2px);
  outline: none;
}

.erp-value-engine {
  min-height: 360px;
  padding: clamp(22px, 2.6vw, 34px);
  background: #eef3f0 !important;
  border-color: #c9d8d2;
}

.erp-money-radar {
  min-height: 360px;
  background: #f3f5f8 !important;
}

.erp-decision-engine {
  min-height: 250px;
  margin-bottom: 16px;
  padding: 22px;
  background: #f1f0f8 !important;
  border-color: #d8d4e7;
}

.erp-profit-leaks {
  background: #f8f3f1 !important;
  border-color: #e5d7d1;
}

.erp-capital-killer-card {
  background: #f8f6ef !important;
  border-color: #e7dfc9;
}

.erp-forecast-card {
  min-height: 190px;
  margin-bottom: 16px;
  background: #eef4f7 !important;
  border-color: #cedce3;
}

.erp-command-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.erp-command-title > span {
  color: #23342e;
  font-size: 17px;
  font-weight: 900;
}

.erp-command-title > em {
  max-width: 52%;
  color: #6b7773;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  text-align: left;
}

.erp-value-label {
  display: block;
  color: #607069 !important;
  font-size: 11px;
  font-weight: 900;
}

.erp-command-main-value {
  display: block;
  margin: 10px 0 9px;
  overflow-wrap: anywhere;
  color: #245c4d;
  font-size: clamp(42px, 5vw, 74px);
  font-weight: 900;
  line-height: .96;
}

.erp-command-card > small,
.erp-command-card > p {
  color: #6b7773;
}

.erp-command-metrics,
.erp-continuity-grid {
  display: grid;
  gap: 9px;
}

.erp-command-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
}

.erp-command-metrics > div,
.erp-continuity-grid > div {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(72, 105, 93, .13);
  border-radius: 7px;
  background: rgba(251, 252, 254, .72);
}

.erp-command-metrics span,
.erp-command-metrics b,
.erp-continuity-grid small,
.erp-continuity-grid strong {
  display: block;
}

.erp-command-metrics span,
.erp-continuity-grid small {
  color: #728079;
  font-size: 10px;
}

.erp-command-metrics b,
.erp-continuity-grid strong {
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: #2b3a35;
  font-size: 14px;
}

.erp-money-allocation {
  display: flex;
  gap: 3px;
  height: 20px;
  margin: 8px 0 18px;
  overflow: hidden;
  border-radius: 7px;
  background: #dfe5e8;
}

.erp-money-allocation i {
  display: block;
  min-width: 0;
  height: 100%;
}

.erp-money-allocation .inventory,
.erp-radar-ledger i.inventory { background: #4f8b78; }
.erp-money-allocation .containers,
.erp-radar-ledger i.containers { background: #6385ad; }
.erp-money-allocation .customers,
.erp-radar-ledger i.customers { background: #8a77ad; }
.erp-money-allocation .banks,
.erp-radar-ledger i.banks { background: #c19452; }
.erp-money-allocation .cash,
.erp-radar-ledger i.cash { background: #8b9b73; }

.erp-radar-ledger {
  display: grid;
  gap: 7px;
}

.erp-radar-ledger button {
  display: grid;
  grid-template-columns: 9px minmax(90px, 1fr) auto 45px;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 5px 0;
  border: 0;
  color: #3d4d47;
  background: transparent;
  font: inherit;
  text-align: right;
  cursor: pointer;
}

.erp-radar-ledger button > i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.erp-radar-ledger button > span {
  font-size: 11px;
  font-weight: 800;
}

.erp-radar-ledger button > strong {
  color: #2c3b36;
  font-size: 12px;
  white-space: nowrap;
}

.erp-radar-ledger button > em {
  color: #74817c;
  font-size: 10px;
  font-style: normal;
  text-align: left;
}

.erp-radar-highlight {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #cbdad4;
  border-radius: 7px;
  background: #e7efeb;
}

.erp-radar-highlight small,
.erp-radar-highlight strong {
  display: block;
}

.erp-radar-highlight small {
  color: #65756e;
  font-size: 10px;
}

.erp-radar-highlight strong {
  margin-top: 5px;
  color: #285848;
  font-size: 14px;
}

.erp-command-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid rgba(83, 108, 99, .14);
  color: #6d7974;
  font-size: 10px;
}

.erp-decision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.erp-decision-grid > :only-child {
  grid-column: 1 / -1;
}

.erp-decision-item {
  min-width: 0;
  min-height: 184px;
  padding: 15px;
  border: 1px solid #d7d5e4;
  border-top: 4px solid #7080aa;
  border-radius: 8px;
  color: #303845;
  background: #fbfbfd;
  font: inherit;
  text-align: right;
  cursor: pointer;
}

.erp-decision-item.import { border-top-color: #4f8b78; }
.erp-decision-item.stop { border-top-color: #c56c70; }
.erp-decision-item.increase { border-top-color: #6385ad; }
.erp-decision-item.delay { border-top-color: #c19452; }

.erp-decision-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.erp-decision-label span {
  color: #435d54;
  font-size: 11px;
  font-weight: 900;
}

.erp-decision-label em {
  color: #73798a;
  font-size: 10px;
  font-style: normal;
}

.erp-decision-item h3 {
  margin: 14px 0 7px;
  color: #28342f;
  font-size: 15px;
  line-height: 1.45;
}

.erp-decision-item p {
  min-height: 48px;
  margin: 0;
  color: #6a746f;
  font-size: 11px;
  line-height: 1.65;
}

.erp-decision-numbers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 13px;
}

.erp-decision-numbers span {
  min-width: 0;
  padding: 8px;
  border-radius: 6px;
  background: #f0f2f5;
}

.erp-decision-numbers small,
.erp-decision-numbers b {
  display: block;
}

.erp-decision-numbers small {
  color: #7b837f;
  font-size: 9px;
}

.erp-decision-numbers b {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #34423d;
  font-size: 11px;
}

.erp-capital-killers,
.erp-cash-forecast {
  display: grid;
  gap: 8px;
}

.erp-capital-killers > button,
.erp-cash-forecast > button,
.erp-command-rank {
  width: 100%;
  border: 1px solid #d8dee2;
  border-radius: 7px;
  color: #303d38;
  background: #fbfcfd;
  font: inherit;
  text-align: right;
  cursor: pointer;
}

.erp-capital-killers b,
.erp-capital-killers small,
.erp-cash-forecast small,
.erp-cash-forecast strong,
.erp-command-rank b,
.erp-command-rank small {
  display: block;
}

.erp-capital-killers small,
.erp-cash-forecast small,
.erp-command-rank small {
  margin-top: 3px;
  color: #737f7a;
  font-size: 10px;
}

.erp-capital-killers > button {
  display: grid;
  grid-template-columns: minmax(130px, 1.2fr) minmax(130px, .9fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 12px;
}

.erp-capital-killers em {
  color: #966433;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.erp-cash-forecast {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.erp-cash-forecast > button {
  min-height: 118px;
  padding: 14px;
}

.erp-cash-forecast > button.shortage {
  border-color: #dfb8b9;
  background: #fbf1f1;
}

.erp-cash-forecast > button > small {
  color: #56655f;
  font-size: 12px;
  font-weight: 900;
}

.erp-cash-forecast > button > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 13px 0;
}

.erp-cash-forecast > button > div span {
  padding: 7px;
  border-radius: 6px;
  background: #eef2f3;
}

.erp-cash-forecast > button > div em,
.erp-cash-forecast > button > div b {
  display: block;
}

.erp-cash-forecast > button > div em {
  color: #76817d;
  font-size: 9px;
  font-style: normal;
}

.erp-cash-forecast > button > div b {
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.erp-cash-forecast strong {
  font-size: 16px;
}

.erp-cash-forecast .positive { color: #39765f; }
.erp-cash-forecast .negative { color: #a54d52; }

.erp-command-rank {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  margin-top: 8px;
  padding: 9px 10px;
}

.erp-command-rank strong {
  color: #40594f;
  font-size: 12px;
  white-space: nowrap;
}

.erp-command-rank.good { border-right: 3px solid #5a9d82; }
.erp-command-rank.warn { border-right: 3px solid #bd9252; }
.erp-command-rank.danger { border-right: 3px solid #c75f68; }

.erp-command-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 126px;
  padding: 18px;
  border: 1px dashed #bcc8c3;
  border-radius: 7px;
  color: #6d7974;
  text-align: center;
  background: #f4f7f6;
}

.erp-command-empty button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #adc2ba;
  border-radius: 6px;
  color: #2f5749;
  background: #e4eeea;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.erp-continuity-card {
  margin-bottom: 16px;
  background: #eef3ef !important;
  border-color: #ccd9d3;
}

.erp-continuity-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (max-width: 1380px) {
  .erp-command-primary {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr);
  }

  .erp-command-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .erp-command-rankings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1050px) {
  .erp-command-primary,
  .erp-command-diagnostics {
    grid-template-columns: 1fr;
  }

  .erp-continuity-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .erp-command-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .erp-command-head > div {
    order: 1;
    width: 100%;
  }

  .erp-command-head .erp-btn {
    order: 2;
    width: 100%;
    min-height: 46px;
  }

  .erp-command-primary,
  .erp-command-diagnostics,
  .erp-command-rankings,
  .erp-decision-grid,
  .erp-cash-forecast {
    grid-template-columns: 1fr;
  }

  .erp-command-card,
  .erp-decision-engine {
    padding: 15px;
  }

  .erp-value-engine,
  .erp-money-radar {
    min-height: auto;
  }

  .erp-command-card[role="button"]:hover {
    transform: none;
  }

  .erp-command-main-value {
    font-size: clamp(40px, 13vw, 58px);
  }

  .erp-capital-killers > button {
    grid-template-columns: 1fr 1fr;
  }

  .erp-capital-killers em {
    grid-column: 1 / -1;
  }

  .erp-decision-item {
    min-height: auto;
  }
}

@media (max-width: 430px) {
  .erp-command-head h2 {
    font-size: 25px;
  }

  .erp-command-title {
    align-items: flex-start;
  }

  .erp-command-title > em {
    max-width: 46%;
  }

  .erp-command-metrics,
  .erp-continuity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .erp-radar-ledger button {
    grid-template-columns: 9px minmax(72px, 1fr) auto;
    min-height: 44px;
  }

  .erp-radar-ledger button > em {
    display: none;
  }

  .erp-capital-killers > button {
    grid-template-columns: 1fr;
    min-height: 44px;
  }

  .erp-capital-killers em {
    grid-column: auto;
  }

  .erp-decision-numbers {
    grid-template-columns: 1fr 1fr;
  }

  .erp-command-rank {
    min-height: 62px;
  }
}
