.erp-help-trigger {
  min-height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #c9d6ee;
  border-radius: 9px;
  background: rgba(255, 255, 255, .92);
  color: #315076;
  font-size: 13px;
  font-weight: 680;
  box-shadow: 0 3px 10px rgba(30, 55, 95, .06);
  cursor: pointer;
}

.erp-help-trigger:hover {
  border-color: #8dabff;
  background: #f5f8ff;
  color: var(--erp-primary, #165dff);
}

.erp-help-trigger i {
  font-size: 17px;
}

.erp-help-inline {
  width: 16px;
  height: 16px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8e2f2;
  border-radius: 999px;
  background: #f7faff;
  color: #7b8ba6;
  font-size: 10px;
  font-weight: 720;
  line-height: 1;
  cursor: pointer;
  vertical-align: 1px;
  box-shadow: none;
}

.erp-help-inline:hover {
  border-color: #9ab5ff;
  color: var(--erp-primary, #165dff);
  background: #eef4ff;
}

.erp-help-backdrop {
  position: fixed;
  inset: 0;
  z-index: 170;
  display: none;
  background: rgba(15, 23, 42, .26);
}

.erp-help-backdrop.is-open {
  display: block;
}

.erp-help-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 180;
  width: min(440px, calc(100vw - 28px));
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border-left: 1px solid rgba(198, 210, 229, .9);
  background:
    linear-gradient(180deg, rgba(246, 249, 255, .96), rgba(255, 255, 255, .98)),
    #fff;
  box-shadow: -18px 0 48px rgba(26, 42, 70, .18);
  transform: translateX(105%);
  transition: transform .2s ease;
}

.erp-help-drawer.is-open {
  transform: translateX(0);
}

.erp-help-head {
  padding: 18px 18px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border-bottom: 1px solid #e5ebf5;
}

.erp-help-kicker {
  margin: 0 0 4px;
  color: #6680a7;
  font-size: 12px;
  font-weight: 680;
}

.erp-help-title {
  margin: 0;
  color: #17243f;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 780;
}

.erp-help-summary {
  margin: 7px 0 0;
  color: #5f6e86;
  font-size: 13px;
  line-height: 1.6;
}

.erp-help-close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d6deeb;
  border-radius: 9px;
  background: #fff;
  color: #657489;
  font-size: 18px;
  cursor: pointer;
}

.erp-help-search {
  padding: 12px 18px;
  border-bottom: 1px solid #e8eef7;
}

.erp-help-search input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d7e0ef;
  border-radius: 10px;
  background: #fff;
  color: #17243f;
  font-size: 13px;
}

.erp-help-body {
  min-height: 0;
  padding: 16px 18px 22px;
  overflow: auto;
}

.erp-help-section {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #e2e9f5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(40, 58, 92, .045);
}

.erp-help-section h4 {
  margin: 0 0 10px;
  color: #182640;
  font-size: 14px;
  font-weight: 760;
}

.erp-help-section ul,
.erp-help-section ol {
  margin: 0;
  padding-left: 18px;
  color: #4c5c73;
  font-size: 13px;
  line-height: 1.68;
}

.erp-help-section li + li {
  margin-top: 5px;
}

.erp-help-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.erp-help-tag {
  min-height: 26px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #edf3ff;
  color: #2757b7;
  font-size: 12px;
  font-weight: 650;
}

.erp-help-related {
  display: grid;
  gap: 8px;
}

.erp-help-related button {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #d8e2f1;
  border-radius: 9px;
  background: #f8fbff;
  color: #2b4669;
  text-align: left;
  cursor: pointer;
}

.erp-help-manual-link {
  min-height: 36px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  border: 1px solid #b9cdf4;
  border-radius: 9px;
  background: #edf3ff;
  color: #2455b4;
  font-size: 13px;
  font-weight: 680;
  text-decoration: none;
}

.erp-help-manual-link:hover {
  border-color: #86a8ee;
  background: #e3ecff;
}

.erp-help-empty {
  padding: 22px;
  border: 1px dashed #cbd8ea;
  border-radius: 14px;
  background: #f8fbff;
  color: #66758d;
  font-size: 13px;
  line-height: 1.6;
}

.erp-help-slimmed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #63708a;
  max-width: 100%;
}

.erp-help-slimmed > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-help-slimmed button {
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid #ccd9ee;
  border-radius: 999px;
  background: #f7faff;
  color: #2757b7;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}

body.erp-help-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .erp-help-drawer {
    top: auto;
    bottom: 0;
    width: 100vw;
    height: min(86vh, 720px);
    border-top: 1px solid rgba(198, 210, 229, .9);
    border-left: 0;
    border-radius: 18px 18px 0 0;
    transform: translateY(105%);
  }

  .erp-help-drawer.is-open {
    transform: translateY(0);
  }

  .erp-help-trigger {
    min-height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .erp-help-drawer {
    transition: none;
  }
}
