:root { --help-bg: rgba(255,255,255,0.9); }
/* Self-contained variables so the same stylesheet works inside the admin/portal layouts and the public site. */
.help-hero, .help-layout { --panel-bg: rgba(255,255,255,0.92); --panel-border: rgba(15,23,42,0.10); --text-primary: #0f172a; --text-secondary: #64748b; --primary: #3b82f6; --accent: #8b5cf6; }
.help-layout, .help-hero { font-family: inherit; color: #0f172a; }

/* ───────── Help / documentation pages ───────── */
.help-hero { padding: 26px 30px; border-radius: 16px; margin-bottom: 24px; background: linear-gradient(135deg, rgba(59,130,246,0.10), rgba(139,92,246,0.10)); border: 1px solid rgba(59,130,246,0.18); }
.help-hero h2 { font-size: 22px; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.02em; }
.help-hero p { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.6; max-width: 880px; }
.help-hero .help-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.help-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,0.8); border: 1px solid var(--panel-border); color: var(--text-secondary); }

.help-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 26px; align-items: start; }
.help-toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 16px; border-radius: 16px; background: var(--panel-bg); border: 1px solid var(--panel-border); scrollbar-width: thin; }
.help-search { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--panel-border); background: #fff; font: inherit; font-size: 13px; margin-bottom: 12px; }
.help-toc-group { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-secondary); margin: 14px 6px 6px; }
.help-toc a { display: block; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--text-primary); text-decoration: none; line-height: 1.35; }
.help-toc a:hover { background: rgba(15,23,42,0.05); }
.help-toc a.active { background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(139,92,246,0.12)); color: var(--primary); font-weight: 700; }
.help-toc-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--panel-border); }
.help-toc-tools button { font: inherit; font-size: 12px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--panel-border); background: #fff; cursor: pointer; }
.help-empty { display: none; padding: 20px; text-align: center; color: var(--text-secondary); }

.help-content { min-width: 0; }
.help-section { padding: 26px 30px; margin-bottom: 18px; border-radius: 16px; background: var(--panel-bg); border: 1px solid var(--panel-border); scroll-margin-top: 16px; }
.help-section h2 { font-size: 20px; font-weight: 800; margin: 0 0 12px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.help-section h2 i { color: var(--primary); font-size: 17px; }
.help-section h3 { font-size: 15px; font-weight: 800; margin: 22px 0 8px; color: var(--text-primary); }
.help-section p, .help-section li { font-size: 14px; line-height: 1.7; color: #334155; }
.help-section p { margin: 0 0 10px; }
.help-section ul, .help-section ol { margin: 6px 0 12px 22px; padding: 0; }
.help-section li { margin-bottom: 5px; }
.help-steps { counter-reset: step; list-style: none; margin-left: 0 !important; }
.help-steps > li { counter-increment: step; position: relative; padding: 2px 0 2px 38px; margin-bottom: 10px; }
.help-steps > li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.help-tip, .help-warn, .help-note { padding: 12px 16px; border-radius: 12px; font-size: 13.5px; line-height: 1.65; margin: 12px 0; }
.help-tip { background: rgba(16,185,129,0.09); border: 1px solid rgba(16,185,129,0.28); color: #065f46; }
.help-warn { background: rgba(245,158,11,0.10); border: 1px solid rgba(245,158,11,0.35); color: #92400e; }
.help-note { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.25); color: #1e3a8a; }
.help-tip b, .help-warn b, .help-note b { margin-right: 4px; }
.help-table { width: 100%; border-collapse: collapse; margin: 10px 0 16px; font-size: 13.5px; }
.help-table th, .help-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--panel-border); vertical-align: top; line-height: 1.55; }
.help-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); background: rgba(15,23,42,0.03); }
.help-table-wrap { overflow-x: auto; }
.help-kbd { display: inline-block; padding: 1px 8px; border-radius: 6px; background: #fff; border: 1px solid var(--panel-border); font-size: 12px; font-weight: 700; box-shadow: 0 1px 0 rgba(15,23,42,0.08); }
.help-badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(59,130,246,0.12); color: #1d4ed8; white-space: nowrap; }
.help-badge.admin { background: rgba(139,92,246,0.14); color: #6d28d9; }
.help-badge.ok { background: rgba(16,185,129,0.14); color: #047857; }
.help-badge.warn { background: rgba(245,158,11,0.16); color: #b45309; }
.help-badge.bad { background: rgba(239,68,68,0.13); color: #b91c1c; }
.help-faq { border: 1px solid var(--panel-border); border-radius: 12px; margin: 8px 0; background: #fff; }
.help-faq summary { cursor: pointer; padding: 12px 16px; font-weight: 700; font-size: 14px; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.help-faq summary::after { content: "+"; color: var(--primary); font-weight: 800; }
.help-faq[open] summary::after { content: "–"; }
.help-faq > div { padding: 0 16px 14px; font-size: 14px; line-height: 1.7; color: #334155; }
.help-section mark { background: rgba(250,204,21,0.45); padding: 0 2px; border-radius: 3px; }
.help-lang { display: flex; gap: 6px; }
.help-lang button { font: inherit; font-size: 13px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--panel-border); background: #fff; cursor: pointer; font-weight: 600; }
.help-lang button.active { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-color: transparent; }
@media (max-width: 1000px) { .help-layout { grid-template-columns: 1fr; } .help-toc { position: static; max-height: none; } }
@media print {
  .admin-sidebar, .content-header, .help-toc, .no-print { display: none !important; }
  .admin-content { margin-left: 0 !important; padding: 0 !important; }
  .help-layout { display: block; }
  .help-section { break-inside: avoid-page; box-shadow: none; border: 1px solid #ddd; }
  .help-faq > div { display: block; }
}
