/* ============================================================
   docs.css — Layout dạng tài liệu (sidebar + nội dung), dùng ở
   tai-lieu.html: sidebar liệt kê module, bấm vào xem hướng dẫn sử dụng.
   ============================================================ */

.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--gap-2xl);
  align-items: start;
}

.docs-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: var(--gap-lg);
}

.docs-nav-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: var(--hairline) solid var(--line);
  background: #fff;
  border-radius: 10px;
  font: inherit;
  font-size: var(--fs-md);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.docs-nav-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  border-radius: 8px;
  background: var(--bg);
}

.docs-nav-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding-top: 5px;
}

.docs-nav-text { white-space: normal; line-height: 1.3; }
.docs-nav-body .badge { font-size: 11px; }

.docs-nav-item:hover  { border-color: rgba(24,116,95,.35); }
.docs-nav-item.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.docs-nav-item.active .docs-nav-icon { background: #fff; }

.docs-content {
  min-width: 0;
  background: #fff;
  border: var(--hairline) solid var(--line);
  border-radius: 12px;
  padding: var(--gap-xl);
}

.docs-content h2 { margin-bottom: var(--gap-sm); }
.docs-content h3 { margin-top: var(--gap-lg); margin-bottom: var(--gap-sm); }
.docs-content .docs-lead { color: var(--muted); margin-bottom: 0; }
.docs-content strong { color: var(--ink); }
.docs-content ol { padding-left: 20px; color: var(--muted); }
.docs-content li { margin-bottom: 6px; }
.docs-content .docs-placeholder { color: var(--muted); margin-bottom: 0; }

.docs-content ul {
  list-style: none;
  padding-left: 0;
  color: var(--muted);
}
.docs-content ul li {
  position: relative;
  padding-left: 18px;
}
.docs-content ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 700;
}

@media (max-width: 768px) {
  .docs-layout   { grid-template-columns: 1fr; }
  .docs-sidebar  { position: static; flex-direction: row; flex-wrap: wrap; }
  .docs-nav-item { width: auto; }
}
