:is(.erp-themed-desk, .erp-workspace-body, .erp-login-layout, .erp-package-page) {
  --erp-navy: #0d1c32;
  --erp-sidebar: #14253d;
  --erp-navy-hover: #213854;
  --erp-nav-text: #c3d0e2;
  --erp-background: #eff3f8;
  --erp-paper: #fff;
  --erp-tint: #f0f4fa;
  --erp-stripe: #f7f9fc;
  --erp-ink: #17283d;
  --erp-muted: #53647a;
  --erp-border: #d7e0ec;
  --erp-blue: #174eaf;
  --erp-blue-soft: #e8f0ff;
  --erp-action: #194fb5;
  --erp-action-hover: #123e91;
  --erp-focus: #3275dd;
  --erp-radius: 15px;
  --erp-radius-control: 8px;
  --erp-panel-shadow: 0 2px 8px rgb(20 42 68 / 7%);
  --erp-gutter: clamp(20px, 2.15vw, 34px);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--erp-ink);
}

.erp-workspace-body { margin: 0; background: var(--erp-background); font-size: 14px; }
.erp-native-workspace *, .erp-login-layout * { box-sizing: border-box; }
.erp-native-workspace a { color: inherit; text-decoration: none; }
.erp-native-workspace button, .erp-native-workspace input { font: inherit; }
.erp-native-workspace :is(a, button):focus-visible {
  outline: 2px solid var(--erp-focus);
  outline-offset: 2px;
}
.erp-native-workspace :is(h2, h3, p) { margin: 0; }
.erp-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.erp-native-workspace {
  margin-inline: auto;
  max-width: 1520px;
  padding: 8px var(--erp-gutter) 36px;
  min-width: 0;
}
.erp-panel {
  min-width: 0;
  background: var(--erp-paper);
  border-radius: var(--erp-radius);
  box-shadow: var(--erp-panel-shadow);
}
.erp-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 20px 13px;
  min-height: 56px;
}
.erp-panel-heading h2, .erp-register-controls h2 {
  color: var(--erp-ink);
  font-weight: 680;
  font-size: 17px;
}
.erp-date {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: var(--erp-muted);
  font-size: 12px;
  white-space: nowrap;
}
.erp-native-workspace .erp-date-alone { margin-bottom: 12px; }

.erp-summary { margin-bottom: 20px; }
.erp-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 12px;
  padding: 0 16px 16px;
}
.erp-native-workspace .erp-metric {
  display: grid;
  grid-template-areas: "icon label label" "count count open";
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px 9px;
  min-height: 103px;
  padding: 13px 14px 12px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--erp-metric-fill) 58%, var(--erp-paper));
  color: var(--erp-ink);
  transition: background-color .14s ease;
}
.erp-native-workspace .erp-metric:hover {
  background: color-mix(in srgb, var(--erp-metric-fill) 90%, var(--erp-paper));
}
.erp-metric-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--erp-radius-control);
  background: var(--erp-metric-fill);
  color: var(--erp-metric-ink);
}
.erp-metric-label { grid-area: label; color: var(--erp-muted); line-height: 1.35; font-weight: 570; }
.erp-metric strong {
  grid-area: count;
  font-size: clamp(27px, 2.55vw, 34px);
  line-height: 1;
  letter-spacing: -.035em;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}
.erp-metric-open { grid-area: open; align-self: end; color: var(--erp-metric-ink); }
.erp-metric-blue { --erp-metric-fill: #e7efff; --erp-metric-ink: #1851b5; }
.erp-metric-amber { --erp-metric-fill: #fff1db; --erp-metric-ink: #8a550c; }
.erp-metric-teal { --erp-metric-fill: #e1f3ec; --erp-metric-ink: #17674e; }
.erp-metric-violet { --erp-metric-fill: #eeebfa; --erp-metric-ink: #5a489c; }

.erp-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(198px, 228px);
  align-items: start;
  gap: 18px;
}
.erp-text-action { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.erp-panel a.erp-text-action, .erp-panel a.erp-record-name { color: var(--erp-blue); }
.erp-record-name:hover, .erp-text-action:hover { text-decoration: underline; text-underline-offset: 3px; }
.erp-quick-items { display: grid; gap: 2px; padding: 0 13px 13px; }
.erp-quick-items > a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 41px;
  padding: 4px 8px;
  border-radius: var(--erp-radius-control);
}
.erp-quick-items > a:hover, .erp-row-action:hover { background: var(--erp-blue-soft); }
.erp-quick-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--erp-radius-control);
  background: var(--erp-tint);
  color: var(--erp-blue);
}
.erp-quick-items > a > svg { color: var(--erp-muted); }

.erp-table-scroll { overflow-x: auto; margin-inline: 12px; padding-bottom: 12px; }
.erp-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; }
.erp-table :is(th, td) { padding: 9px 8px; text-align: start; }
.erp-table th { color: var(--erp-muted); background: var(--erp-tint); font-weight: 620; height: 38px; }
.erp-table th:first-child { border-start-start-radius: var(--erp-radius-control); }
.erp-table th:last-child { border-start-end-radius: var(--erp-radius-control); }
.erp-table td { height: 44px; }
.erp-table tbody tr:nth-child(even) td { background: var(--erp-stripe); }
.erp-table tbody tr:is(:hover, :focus-within) td { background: var(--erp-blue-soft); }
.erp-table th:first-child, .erp-table td:first-child { padding-inline-start: 12px; width: 26%; }
.erp-table th:last-child, .erp-table td:last-child { width: 38px; padding-inline-end: 8px; }
.erp-table .erp-time-column { width: 106px; white-space: nowrap; color: var(--erp-muted); font-variant-numeric: tabular-nums; }
.erp-table td span, .erp-table a.erp-record-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.erp-table a.erp-record-name { font-weight: 590; font-variant-numeric: tabular-nums; }
.erp-table th.erp-detail-column { width: 25%; }
.erp-table td .erp-status { display: inline-block; max-width: 100%; border-radius: 999px; padding: 4px 8px; font-size: 12px; line-height: 1.3; }
.erp-state-neutral { color: #49596d; background: #eaf0f6; }
.erp-state-blue { color: #174eaf; background: #e5edfc; }
.erp-state-amber { color: #7c4a10; background: #faedd7; }
.erp-state-teal { color: #17634f; background: #dff1e9; }
.erp-state-red { color: #992e3d; background: #fae4e9; }
.erp-row-action { width: 29px; height: 29px; display: inline-grid; place-items: center; border-radius: 6px; }
.erp-table td .erp-inline-detail { display: none; }
.erp-empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 40px 20px; color: var(--erp-muted); }
.erp-empty > svg { color: var(--erp-blue); }
.erp-empty h3 { font-size: 15px; color: var(--erp-ink); }

.erp-register-actions { justify-content: flex-end; margin-block: 0 14px; flex-wrap: wrap; }
.erp-register-tabs { display: flex; gap: 5px; padding: 10px 12px 2px; overflow: auto; }
.erp-register-tabs a {
  display: flex;
  align-items: center;
  min-height: 37px;
  padding-inline: 12px;
  border-radius: var(--erp-radius-control);
  white-space: nowrap;
  color: var(--erp-muted);
}
.erp-register-tabs a:hover, .erp-register-tabs a[aria-current] { color: var(--erp-blue); background: var(--erp-blue-soft); }
.erp-register-tabs a[aria-current] { font-weight: 650; }
.erp-register-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 12px 16px; }
.erp-register-controls h2 { margin-inline-end: auto; }
.erp-actions, .erp-search { display: flex; align-items: center; gap: 8px; }
.erp-search-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 40px;
  padding-inline: 11px;
  border-radius: var(--erp-radius-control);
  background: var(--erp-tint);
  color: var(--erp-muted);
}
.erp-search-control input { min-width: 0; width: 174px; padding: 0; color: var(--erp-ink); background: transparent; outline: none; border: 0; }
.erp-search-control input::placeholder { color: var(--erp-muted); }
.erp-search-control:focus-within { box-shadow: inset 0 0 0 2px var(--erp-focus); }
.erp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  padding: 7px 13px;
  border: 0;
  border-radius: var(--erp-radius-control);
  white-space: nowrap;
  font-weight: 620;
  cursor: pointer;
}
.erp-button.erp-button-primary { color: #fff; background: var(--erp-action); }
.erp-button.erp-button-primary:hover { background: var(--erp-action-hover); }
.erp-button.erp-button-secondary { color: var(--erp-ink); background: var(--erp-tint); }
.erp-button.erp-button-secondary:hover, .erp-filter[aria-current] { color: var(--erp-blue); background: var(--erp-blue-soft); }
.erp-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; color: var(--erp-muted); padding: 0 16px 13px; }
.erp-pagination a { color: var(--erp-blue); }

.erp-guide { display: grid; gap: 13px; max-width: 960px; }
.erp-guide > section { padding: 18px 22px; display: grid; gap: 8px; }
.erp-guide h2 { font-size: 17px; }
.erp-guide h2 a, .erp-guide > a { color: var(--erp-blue); }
.erp-native-workspace .erp-label-view {
  padding: 21px;
  max-width: 565px;
  background: var(--erp-paper);
  border-radius: var(--erp-radius);
  box-shadow: var(--erp-panel-shadow);
}
.erp-native-workspace .erp-label-view form { display: grid; gap: 9px; }
.erp-native-workspace .erp-label-view :is(input, select) {
  min-height: 44px;
  padding: 8px 11px;
  background: var(--erp-tint);
  color: var(--erp-ink);
  border: 0;
  border-radius: var(--erp-radius-control);
  max-width: 100%;
}
.erp-native-workspace .erp-label-view :is(input, select):focus-visible { outline: 2px solid var(--erp-focus); }
.erp-native-workspace .erp-label-view output { display: block; margin-block: 12px; }
.erp-scan-links { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 12px; }
.erp-scan-links a { color: var(--erp-blue); }

/* The split login keeps the native inputs, errors and account actions. */
body:has(.erp-login-layout) { margin: 0; background: #f7f9fc; }
body:has(.erp-login-layout) .page-content-wrapper,
body:has(.erp-login-layout) .page-content-wrapper > .container,
body:has(.erp-login-layout) main.container,
body:has(.erp-login-layout) .web-page-content > .container { width: 100%; max-width: none; padding: 0; margin: 0; }
body:has(.erp-login-layout) .page_content { padding: 0; }
.erp-login-layout {
  min-height: 100svh;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  background: #f7f9fc;
}
.erp-login-brand {
  min-width: 0;
  display: grid;
  align-items: center;
  color: #fff;
  background: radial-gradient(ellipse at 17% 23%, #244a78 0%, #162e4b 42%, #0d1c32 100%);
}
.erp-login-brand-copy { padding: clamp(34px, 7.25vw, 112px); }
.erp-login-brand-copy img { display: block; max-width: 100%; height: auto; margin-bottom: 36px; }
.erp-login-brand-name { font-size: clamp(29px, 4.1vw, 57px); font-weight: 720; line-height: 1.16; letter-spacing: -.025em; }
.erp-login-brand-copy p { margin: 17px 0 0; color: #c8d5e8; font-size: clamp(13px, 1.4vw, 17px); }
.erp-login-auth { display: grid; grid-template-columns: minmax(0, 452px); align-items: center; justify-content: center; min-width: 0; padding: 32px; }
.erp-login-panel { min-width: 0; padding: 32px; border-radius: 20px; background: var(--erp-paper); box-shadow: 0 10px 32px rgb(16 34 62 / 8%); }
.erp-login-title { color: var(--erp-ink); margin: 0 0 25px; font-size: 30px; font-weight: 720; letter-spacing: -.025em; }
.erp-login-mobile-brand { display: none; }
.erp-login-auth .login-content.page-card { background: transparent; padding: 0; box-shadow: none; width: 100%; max-width: none; margin: 0; border: 0; }
.erp-login-auth .for-login, .erp-login-auth .for-forgot { padding: 0; margin: 0; }
.erp-login-auth .for-login .page-card-head { display: none; }
.erp-login-auth:has(.for-login[style*="display: none"]) .erp-login-title { display: none; }
.erp-login-auth input.form-control {
  min-height: 46px;
  background: var(--erp-tint);
  color: var(--erp-ink);
  border: 1px solid #dbe3ee;
  border-radius: var(--erp-radius-control);
}
.erp-login-auth input.form-control:focus { border-color: var(--erp-focus); box-shadow: 0 0 0 3px var(--erp-blue-soft); }
.erp-login-auth .es-button[data-variant="solid"] {
  min-height: 46px;
  background: var(--erp-action);
  border-radius: var(--erp-radius-control);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
}
.erp-login-auth .es-button[data-variant="solid"]:hover { background: var(--erp-action-hover); }

@media (max-width: 1120px) {
  .erp-table .erp-time-column { display: none; }
}
@media (max-width: 840px) {
  .erp-native-workspace { padding: 7px var(--erp-gutter) 26px; }
  .erp-overview { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .erp-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-inline: 11px; }
  .erp-summary { margin-bottom: 14px; }
  .erp-native-workspace .erp-metric { min-height: 93px; }
}
@media (max-width: 760px) {
  .erp-login-layout { display: block; }
  .erp-login-brand { display: none; }
  .erp-login-auth { padding: clamp(19px, 6vw, 36px); }
  .erp-login-panel { padding: clamp(17px, 5vw, 26px); margin-block: 8px; }
  .erp-login-mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    font-weight: 700;
    color: var(--erp-ink);
  }
}
@media (max-width: 520px) {
  .erp-panel-heading { padding-inline: 15px; min-height: 50px; }
  .erp-panel-heading h2, .erp-register-controls h2 { font-size: 16px; }
  .erp-date { font-size: 11px; gap: 4px; }
  .erp-date svg { width: 14px; height: 14px; }
  .erp-native-workspace .erp-metric { min-height: 90px; padding: 8px; gap: 8px 6px; }
  .erp-metric-icon { width: 28px; height: 28px; }
  .erp-metric-icon svg { width: 16px; height: 16px; }
  .erp-metric-label { font-size: 12px; }
  .erp-metric strong { font-size: 25px; }
  .erp-register-actions { justify-content: flex-start; }
  .erp-table-scroll { margin-inline: 8px; padding-bottom: 8px; }
  .erp-table :is(.erp-detail-column, .erp-type-column) { display: none; }
  .erp-table td .erp-inline-detail { display: block; margin-top: 4px; font-size: 11px; color: var(--erp-muted); }
  .erp-table :is(th, td):first-child { padding-inline-start: 9px; width: 59%; }
  .erp-table td a.erp-record-name { white-space: normal; overflow-wrap: anywhere; }
  .erp-table :is(th, td) { padding-inline: 5px; }
  .erp-table .erp-status { padding-inline: 6px; }
  .erp-register-controls { gap: 8px; padding: 10px 11px; }
  .erp-register-controls h2 { width: 100%; }
  .erp-search { flex: 1 1 100%; }
  .erp-search-control { flex: 1 1 auto; }
  .erp-search-control input { width: 100%; }
  .erp-register-tabs { padding-inline: 8px; }
  .erp-register-tabs a { padding-inline: 9px; min-height: 40px; }
}
@media (max-width: 360px) {
  .erp-metric-icon { width: 22px; height: 22px; }
  .erp-metric-icon svg { width: 14px; height: 14px; }
  .erp-metric-label { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .erp-native-workspace .erp-metric { transition: none; }
}

/* Project summary in the native form and on both workspaces. */
.erp-project-brief {
  padding: 16px clamp(12px, 2vw, 26px) 20px;
  color: var(--erp-ink);
}
.erp-project-brief h2, .erp-project-brief h3, .erp-project-portfolio h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 680;
}
.erp-project-brief h3, .erp-project-portfolio h3 { font-size: 14px; }
.erp-project-facts, .erp-project-indicators {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr));
  gap: 9px;
  margin: 0 0 18px;
}
.erp-project-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.erp-project-cards {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.tab-pane:has(.erp-project-cards) .dj-project-metrics { display: none; }
.erp-project-facts > div, .erp-project-indicator {
  min-width: 0;
  padding: 9px 12px;
  border-radius: var(--erp-radius-control);
  background: var(--erp-tint);
}
.erp-project-facts dt, .erp-project-indicator > span {
  color: var(--erp-muted);
  font-size: 12px;
  font-weight: 500;
}
.erp-project-facts dd {
  margin: 4px 0 0;
  font-weight: 650;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.erp-project-cards dd a { color: var(--erp-blue); }
.erp-project-sales a { display: block; }
.erp-project-cards .erp-project-next {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
  max-height: 4.2em;
}
.erp-project-book { margin: 0 0 9px; }
.erp-project-book-row { margin-bottom: 9px; }
.erp-project-book-row > div { padding-inline: 10px; }
.erp-project-book-row:last-of-type { margin-bottom: 18px; }
.erp-project-card-notes { display: block; margin-top: 4px; }
.erp-project-book-row small {
  display: block;
  color: var(--erp-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -.1px;
  line-height: 1.4;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.erp-project-book-row .erp-project-note-formula { font-size: 10px; line-height: 15.4px; }
.erp-project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
:is(.erp-project-brief, .erp-project-portfolio) .erp-project-actions :is(a, button),
.erp-project-brief button.erp-project-task-toggle {
  color: var(--erp-blue);
  border: 0;
  background: transparent;
  padding: 4px 0;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
}
:is(.erp-project-brief, .erp-project-portfolio) .erp-project-actions :is(a, button):hover,
.erp-project-brief button.erp-project-task-toggle:hover { text-decoration: underline; }
.erp-project-brief button.erp-project-task-toggle { margin-top: 12px; }
.erp-project-native-hidden { display: none !important; }
.erp-project-muted { color: var(--erp-muted); margin: 0 0 12px; }
.erp-project-portfolio { margin-bottom: 16px; padding-bottom: 12px; }
.erp-project-portfolio h3, .erp-project-portfolio .erp-project-muted { margin: 0 18px 9px; }
.erp-project-indicators { padding: 0 16px; margin-bottom: 5px; }
.erp-project-portfolio h3 { margin-top: 13px; }
.erp-project-indicator {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 8px;
  text-decoration: none;
}
.erp-project-indicator strong {
  color: var(--erp-ink);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}
.erp-project-indicator:hover { background: var(--erp-blue-soft); text-decoration: none; }
.erp-project-overdue, .erp-project-overdue > :is(span, strong) { color: var(--red-600, #a52d28); }
.erp-project-recent {
  margin: 0;
  padding: 0 16px;
  list-style: none;
}
.erp-project-recent li {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(max-content, 1fr) minmax(80px, auto);
  align-items: baseline;
  gap: 8px 16px;
  padding: 7px 3px;
  border-top: 1px solid var(--erp-border);
}
.erp-project-recent li > a { color: var(--erp-blue); overflow-wrap: anywhere; }
.erp-project-recent li > a > span { margin-inline-start: 9px; }
.erp-project-recent li span { color: var(--erp-muted); font-size: 12px; }
.erp-project-recent li span.erp-project-overdue { color: var(--red-600, #a52d28); }
.erp-register-scope { padding: 0 20px 10px; }
.erp-register-scope a { margin-inline-start: 8px; }
@media (max-width: 650px) {
  .erp-project-indicators, .erp-project-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .erp-project-recent li { grid-template-columns: 1fr auto; gap: 2px 8px; }
  .erp-project-recent li > a { grid-column: 1 / -1; }
}
@media (min-width: 651px) and (max-width: 1150px) {
  .erp-project-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 340px) {
  .erp-project-cards { grid-template-columns: minmax(0, 1fr); }
}
