/* ─── Help / Knowledge Base styles ──────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8f8f8;
  color: #111;
  font-size: 15px;
  line-height: 1.6;
}

/* ── Top nav ── */
.help-topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 54px;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 200;
  box-shadow: 0 1px 0 rgba(255,255,255,.07);
}
.help-topnav .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.help-topnav .accent {
  width: 4px; height: 22px;
  background: #E85D04;
  border-radius: 2px;
}
.help-topnav .wordmark {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
}
.help-topnav .wordmark span {
  color: #E85D04;
}
.help-topnav .nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.help-topnav .nav-right a {
  font-size: 12px;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color .15s;
}
.help-topnav .nav-right a:hover { color: #fff; }
.help-topnav .nav-right a.btn-app {
  background: #E85D04;
  color: #fff;
  padding: 6px 14px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .5px;
}
.help-topnav .nav-right a.btn-app:hover { background: #c94e00; }

/* ── Layout ── */
.help-layout {
  display: flex;
  margin-top: 54px;
  min-height: calc(100vh - 54px);
}

/* ── Sidebar ── */
.help-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e8e8e8;
  position: sticky;
  top: 54px;
  height: calc(100vh - 54px);
  overflow-y: auto;
  padding: 24px 0 40px;
}
.sidebar-search {
  padding: 0 16px 16px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 8px;
}
.sidebar-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #e0e0e0;
  border-radius: 3px;
  font-size: 12px;
  outline: none;
  background: #f9f9f9;
}
.sidebar-search input:focus { border-color: #E85D04; background: #fff; }

.sidebar-section { margin-bottom: 4px; }
.sidebar-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #E85D04;
  padding: 12px 16px 4px;
  display: block;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  font-size: 13px;
  color: #444;
  text-decoration: none;
  border-radius: 0;
  transition: background .1s, color .1s;
  border-left: 3px solid transparent;
}
.sidebar-link:hover {
  background: #faf5f2;
  color: #E85D04;
}
.sidebar-link.active {
  background: #fdf3ee;
  color: #E85D04;
  border-left-color: #E85D04;
  font-weight: 600;
}
.sidebar-link .link-icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

/* ── Main content ── */
.help-main {
  flex: 1;
  min-width: 0;
  padding: 40px 48px 80px;
  max-width: 780px;
}

/* ── Article styles ── */
.help-breadcrumb {
  font-size: 11px;
  color: #999;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.help-breadcrumb a { color: #999; text-decoration: none; }
.help-breadcrumb a:hover { color: #E85D04; }
.help-breadcrumb .sep { color: #ccc; }

.help-article h1 {
  font-size: 28px;
  font-weight: 800;
  color: #111;
  margin: 0 0 8px;
  line-height: 1.2;
}
.help-article .lead {
  font-size: 16px;
  color: #555;
  margin: 0 0 32px;
  line-height: 1.6;
  padding-bottom: 24px;
  border-bottom: 1px solid #f0f0f0;
}
.help-article h2 {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin: 36px 0 12px;
  padding-top: 4px;
}
.help-article h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #E85D04;
  margin: 28px 0 10px;
}
.help-article p {
  margin: 0 0 14px;
  color: #333;
}
.help-article ul, .help-article ol {
  margin: 0 0 16px;
  padding-left: 22px;
  color: #333;
}
.help-article li { margin-bottom: 6px; }
.help-article strong { color: #111; }
.help-article a { color: #E85D04; text-decoration: none; }
.help-article a:hover { text-decoration: underline; }

/* Callout boxes */
.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 4px;
  margin: 20px 0;
  font-size: 13px;
  line-height: 1.5;
}
.callout-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.callout.info    { background: #f0f7ff; border-left: 3px solid #3b82f6; }
.callout.tip     { background: #f0faf0; border-left: 3px solid #22c55e; }
.callout.warning { background: #fffbf0; border-left: 3px solid #f59e0b; }
.callout.orange  { background: #fdf3ee; border-left: 3px solid #E85D04; }
.callout p { margin: 0; color: #333; }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 20px; }
.steps li {
  counter-increment: step;
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  align-items: flex-start;
}
.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 26px; height: 26px;
  background: #E85D04;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  margin-top: 1px;
}
.steps li .step-content { flex: 1; padding-top: 2px; }
.steps li .step-content strong { display: block; font-size: 14px; margin-bottom: 3px; }
.steps li .step-content p { margin: 0; font-size: 13px; color: #555; }

/* Role table */
.role-table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 13px; }
.role-table th {
  background: #111;
  color: #E85D04;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
}
.role-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
}
.role-table tr:last-child td { border-bottom: none; }
.role-table tr:hover td { background: #faf9f8; }
.check  { color: #22c55e; font-size: 15px; }
.cross  { color: #ccc; font-size: 15px; }

/* Quick-link cards on home page */
.help-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.help-card {
  display: block;
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 4px;
  padding: 18px 20px;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.help-card:hover {
  border-color: #E85D04;
  box-shadow: 0 2px 12px rgba(232,93,4,.1);
}
.help-card .card-icon { font-size: 22px; margin-bottom: 8px; }
.help-card .card-title { font-size: 13px; font-weight: 700; color: #111; margin-bottom: 4px; }
.help-card .card-desc  { font-size: 12px; color: #777; line-height: 1.4; }

/* Tags / badges inline */
.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1.5px solid;
  vertical-align: middle;
}
.tag.admin       { color: #E85D04; border-color: #E85D04; background: rgba(232,93,4,.07); }
.tag.super-admin { color: #7c3aed; border-color: #7c3aed; background: rgba(124,58,237,.07); }
.tag.member      { color: #666;    border-color: #ccc;    background: #f5f5f5; }

/* Page nav (prev / next) */
.help-page-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid #e8e8e8;
  gap: 16px;
}
.pn-link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
  flex: 1;
}
.pn-link.next { align-items: flex-end; }
.pn-label { font-size: 10px; color: #999; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.pn-title { font-size: 14px; font-weight: 700; color: #E85D04; }
.pn-link:hover .pn-title { text-decoration: underline; }

/* ── On-page TOC (optional right rail — hidden for now) ── */

/* ── Mobile ── */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
}

@media (max-width: 900px) {
  .help-sidebar {
    position: fixed;
    top: 54px; left: -260px;
    height: calc(100vh - 54px);
    transition: left .25s;
    z-index: 150;
    box-shadow: 2px 0 20px rgba(0,0,0,.15);
  }
  .help-sidebar.open { left: 0; }
  .help-main { padding: 28px 20px 60px; }
  .mobile-nav-toggle { display: block; }
  .mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 140;
  }
  .mobile-overlay.open { display: block; }
}

@media (max-width: 600px) {
  .help-cards { grid-template-columns: 1fr 1fr; }
  .help-article h1 { font-size: 22px; }
}
