/* ═══════════════════════════════════════════════
   ECM Central — Help Center Panel
   ═══════════════════════════════════════════════ */

/* ── Panel container ── */
.help-panel {
  position: fixed;
  top: 0;
  right: -380px;
  width: 380px;
  height: 100vh;
  background: #fff;
  border-left: 1px solid #e2e8f0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  transition: right .3s ease;
  box-shadow: -4px 0 32px rgba(0,0,0,.13);
}
.help-panel.help-open { right: 0; }

/* ── Header ── */
.help-header {
  background: #1e293b;
  padding: 14px 16px 12px;
  flex-shrink: 0;
}
.help-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.help-header h2 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.help-close {
  width: 26px; height: 26px;
  border-radius: 5px;
  background: rgba(255,255,255,.1);
  border: none;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.help-close:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ── Search ── */
.help-search { position: relative; }
.help-search input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.09);
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: background .15s, border-color .15s;
}
.help-search input::placeholder { color: rgba(255,255,255,.4); }
.help-search input:focus {
  background: rgba(255,255,255,.14);
  border-color: rgba(13,110,253,.6);
}
.help-search .help-search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.4);
  font-size: 11px;
  pointer-events: none;
}

/* ── Breadcrumb ── */
.help-bc {
  padding: 7px 14px;
  font-size: 12px;
  color: #6c757d;
  border-bottom: 1px solid #f1f5f9;
  background: #fafbfc;
  display: none;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.help-bc.show { display: flex; }
.help-bc a {
  color: #0d6efd;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
}
.help-bc a:hover { text-decoration: underline; }
.help-bc .help-bc-sep { font-size: 8px; color: #cbd5e1; }

/* ── Scrollable body ── */
.help-body { flex: 1; overflow-y: auto; }

/* ── Home view ── */
.help-home { padding: 12px 12px 20px; }

.help-section-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: #94a3b8;
  margin: 14px 2px 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.help-section-lbl:first-child { margin-top: 4px; }

/* Article list card */
.help-art-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  margin-bottom: 5px;
  text-decoration: none;
}
.help-art-card:hover {
  border-color: #0d6efd;
  box-shadow: 0 2px 8px rgba(13,110,253,.1);
}
.help-art-card:hover .help-art-icon { background: #0d6efd; color: #fff; border-color: #0d6efd; }
.help-art-card:hover .help-art-icon.admin { background: #7c3aed; border-color: #7c3aed; }
.help-art-card:hover .help-art-arrow { color: #0d6efd; }

.help-art-icon {
  width: 34px; height: 34px;
  border-radius: 7px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: #475569;
  flex-shrink: 0;
  transition: all .15s;
}
.help-art-icon.admin { background: #f5f3ff; border-color: #e9d5ff; color: #7c3aed; }

.help-art-body { flex: 1; min-width: 0; }
.help-art-title { font-size: 13px; font-weight: 600; color: #212529; }
.help-art-desc {
  font-size: 11px; color: #6c757d;
  margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.help-art-arrow { color: #cbd5e1; font-size: 10px; flex-shrink: 0; transition: color .15s; }

/* ── Article view ── */
.help-article { padding: 14px; display: none; }
.help-article.help-active { display: block; }

.help-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #0d6efd; cursor: pointer;
  font-weight: 600; margin-bottom: 13px;
  padding: 4px 8px; border-radius: 5px;
  border: none; background: none;
  transition: background .15s;
}
.help-back:hover { background: #e7f0ff; }

.help-article h3 {
  font-size: 15px; font-weight: 700; color: #1e293b;
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
  line-height: 1.35;
}
.help-art-meta {
  font-size: 11px; color: #94a3b8;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.help-badge-admin {
  background: #f5f3ff; color: #7c3aed;
  border: 1px solid #e9d5ff;
  border-radius: 4px; padding: 2px 7px;
  font-size: 10px; font-weight: 600;
}
.help-article p { font-size: 13px; color: #475569; line-height: 1.6; margin-bottom: 11px; }

.help-sub {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: #6c757d;
  margin: 14px 0 9px;
  display: flex; align-items: center; gap: 6px;
}
.help-sub::after { content:''; flex:1; height:1px; background:#f1f5f9; }

/* Steps */
.help-steps { list-style: none; padding: 0; margin-bottom: 14px; }
.help-step { display: flex; gap: 11px; margin-bottom: 12px; }
.help-step-n {
  width: 22px; height: 22px; border-radius: 50%;
  background: #0d6efd; color: #fff;
  font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.help-step-c strong { font-size: 13px; color: #1e293b; display: block; margin-bottom: 2px; }
.help-step-c span { font-size: 12px; color: #64748b; line-height: 1.55; }

/* Inline chip */
.help-chip {
  display: inline-block;
  background: #f1f5f9; border: 1px solid #e2e8f0;
  border-radius: 4px; padding: 1px 6px;
  font-size: 11px; color: #334155; font-weight: 500;
}

/* Callout notes */
.help-note {
  border-radius: 7px; padding: 10px 12px; margin-bottom: 12px;
  font-size: 12px; line-height: 1.55;
  display: flex; gap: 9px; align-items: flex-start;
}
.help-note i { flex-shrink: 0; margin-top: 1px; }
.help-note-info  { background: #eff6ff; border-left: 3px solid #0d6efd; color: #1e40af; }
.help-note-warn  { background: #fffbeb; border-left: 3px solid #f59e0b; color: #78350f; }
.help-note-admin { background: #f5f3ff; border-left: 3px solid #7c3aed; color: #5b21b6; }

/* Related links */
.help-related { margin-top: 14px; border-top: 1px solid #f1f5f9; padding-top: 12px; }
.help-related-lbl {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: #94a3b8; margin-bottom: 6px;
}
.help-rel-link {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px; border-radius: 6px;
  cursor: pointer; font-size: 12px;
  color: #0d6efd; font-weight: 500;
  border: none; background: none; width: 100%; text-align: left;
  transition: background .15s;
}
.help-rel-link:hover { background: #e7f0ff; }

/* ── Footer ── */
.help-footer {
  padding: 9px 14px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: #94a3b8;
  flex-shrink: 0;
}
.help-footer a { color: #0d6efd; text-decoration: none; font-weight: 500; cursor: pointer; }
.help-footer a:hover { text-decoration: underline; }

/* ── Dark mode ── */
html.dark-mode .help-panel { background: #0f172a; border-color: #2a2a45; }
html.dark-mode .help-header { background: #0a0f1e; }
html.dark-mode .help-bc { background: #0f172a; border-color: #1e293b; color: #94a3b8; }
html.dark-mode .help-art-card { background: #1e293b; border-color: #2d3f55; }
html.dark-mode .help-art-card:hover { border-color: #0d6efd; background: #1e293b; }
html.dark-mode .help-art-icon { background: #0f172a; border-color: #2d3f55; color: #94a3b8; }
html.dark-mode .help-art-title { color: #e2e8f0; }
html.dark-mode .help-art-desc { color: #64748b; }
html.dark-mode .help-article h3 { color: #e2e8f0; }
html.dark-mode .help-article p { color: #94a3b8; }
html.dark-mode .help-step-c strong { color: #e2e8f0; }
html.dark-mode .help-step-c span { color: #94a3b8; }
html.dark-mode .help-chip { background: #1e293b; border-color: #2d3f55; color: #cbd5e1; }
html.dark-mode .help-note-info { background: #172554; color: #93c5fd; }
html.dark-mode .help-note-warn { background: #1c1407; color: #fcd34d; }
html.dark-mode .help-note-admin { background: #1e1033; color: #c4b5fd; }
html.dark-mode .help-footer { background: #0a0f1e; border-color: #1e293b; }
html.dark-mode .help-sub::after { background: #1e293b; }
html.dark-mode .help-related { border-color: #1e293b; }

/* ── Page navigation link ── */
a.help-page-link {
  display: inline-flex; align-items: center; gap: 4px;
  background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: 4px; padding: 1px 6px;
  font-size: 11px; color: #1d4ed8; font-weight: 500;
  text-decoration: none;
  transition: background .12s;
}
a.help-page-link:hover { background: #dbeafe; text-decoration: none; }
a.help-page-link i { font-size: 9px; opacity: .75; }
html.dark-mode a.help-page-link { background: #1e3a5f; border-color: #2563eb; color: #93c5fd; }
html.dark-mode a.help-page-link:hover { background: #1e40af; }
