/* Trang Hướng dẫn sử dụng — docs.vietpos.ai — độc lập, không phụ thuộc app chính */
:root {
  --hd-bg: #F6F4EE;
  --hd-surface: #FFFFFF;
  --hd-surface-sunk: #F0EDE4;
  --hd-ink: #23281E;
  --hd-ink-soft: #5B6152;
  --hd-ink-faint: #8B9080;
  --hd-accent: #2E7D32;
  --hd-accent-ink: #1E5722;
  --hd-accent-soft: #E4EEDF;
  --hd-line: #DEDACC;
}
@media (prefers-color-scheme: dark) {
  :root {
    --hd-bg: #1A1C16; --hd-surface: #232519; --hd-surface-sunk: #1F2116; --hd-ink: #ECE9DD;
    --hd-ink-soft: #B2AF9E; --hd-ink-faint: #7C7A6C; --hd-accent-ink: #8FDD8F; --hd-accent-soft: #2A3B22;
    --hd-line: #3A3C2F;
  }
}
* { box-sizing: border-box; }
body.hd-root {
  margin: 0; min-height: 100vh; background: var(--hd-bg); color: var(--hd-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
}
.hd-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px; border-bottom: 1px solid var(--hd-line); background: var(--hd-surface);
}
.hd-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(155deg, var(--hd-accent) 0%, var(--hd-accent-ink) 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
}
.hd-topbar-title { font-weight: 700; font-size: 1rem; }
.hd-topbar-sub { color: var(--hd-ink-faint); font-size: .82rem; }
.hd-shell { display: flex; max-width: 1180px; margin: 0 auto; align-items: flex-start; }
.hd-sidebar { flex: none; width: 240px; padding: 28px 16px; position: sticky; top: 0; }
.hd-cat-title {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--hd-ink-faint); margin: 18px 8px 8px;
}
.hd-cat-title:first-child { margin-top: 0; }
.hd-navlink {
  display: block; padding: 7px 10px; border-radius: 8px; font-size: .89rem; font-weight: 600;
  color: var(--hd-ink-soft); text-decoration: none; margin-bottom: 2px;
}
.hd-navlink:hover { background: var(--hd-surface-sunk); color: var(--hd-ink); }
.hd-navlink.active { background: var(--hd-accent-soft); color: var(--hd-accent-ink); }
.hd-content { flex: 1; min-width: 0; padding: 28px 24px 96px; }
.hd-article {
  background: var(--hd-surface); border: 1px solid var(--hd-line); border-radius: 12px;
  padding: 32px clamp(20px, 4vw, 44px);
  box-shadow: 0 1px 2px rgba(35,40,30,.06), 0 8px 24px -12px rgba(35,40,30,.18);
  max-width: 800px;
}
.hd-article h1 {
  font-family: ui-serif, Georgia, "Noto Serif", serif; font-weight: 600; font-size: 1.9rem;
  margin: 0 0 6px; text-wrap: balance;
}
.hd-article-updated { color: var(--hd-ink-faint); font-size: .8rem; margin: 0 0 28px; }
.hd-article h2 {
  font-family: ui-serif, Georgia, "Noto Serif", serif; font-weight: 600; font-size: 1.32rem;
  margin: 36px 0 12px;
}
.hd-article h2:first-of-type { margin-top: 8px; }
.hd-article h3 { font-size: 1.05rem; font-weight: 700; margin: 22px 0 8px; }
.hd-article p { margin: 0 0 14px; color: var(--hd-ink-soft); max-width: 68ch; }
.hd-article strong { color: var(--hd-ink); }
.hd-article code {
  background: var(--hd-surface-sunk); border: 1px solid var(--hd-line); border-radius: 5px;
  padding: 1px 6px; font-size: .86em;
}
.hd-article ul { margin: 0 0 16px; padding-left: 1.2em; color: var(--hd-ink-soft); }
.hd-article li + li { margin-top: 6px; }
.hd-article figure { margin: 0 0 22px; }
.hd-article img {
  display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--hd-line);
  box-shadow: 0 1px 2px rgba(35,40,30,.06), 0 8px 24px -12px rgba(35,40,30,.18);
}
.hd-article .md-tablewrap { overflow-x: auto; margin: 0 0 18px; }
.hd-article table { width: 100%; border-collapse: collapse; font-size: .89rem; }
.hd-article th, .hd-article td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--hd-line); }
.hd-article th { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--hd-ink-faint); }
@media (max-width: 820px) {
  .hd-shell { flex-direction: column; }
  .hd-sidebar { width: 100%; position: static; padding: 16px 20px 0; }
  .hd-content { padding: 16px 16px 72px; }
}
