:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #D82058;
  --brand2: #0f172a;
  --sidebar: #0f172a;
  --sidebar2: #111827;
  --sideText: #cbd5e1;
  --sideActive: #eff6ff;
  --code: #0b1220;
  --warn: #fff7ed;
  --warnLine: #fed7aa;
  --tip: #ecfdf5;
  --tipLine: #a7f3d0;
  --danger: #fef2f2;
  --dangerLine: #fecaca;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}
[data-theme="dark"] {
  --bg: #0b1020;
  --panel: #111827;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --line: #253047;
  --brand: #60a5fa;
  --brand2: #e5e7eb;
  --sidebar: #060b16;
  --sidebar2: #0b1020;
  --sideText: #cbd5e1;
  --sideActive: #172554;
  --code: #030712;
  --warn: #3a260f;
  --warnLine: #9a5b13;
  --tip: #082f23;
  --tipLine: #047857;
  --danger: #3b1111;
  --dangerLine: #991b1b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family:
    Inter,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
}
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  box-shadow: var(--shadow);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 310px;
}
.logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #D82058, #7c3aed);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
}
.brand h1 {
  font-size: 18px;
  margin: 0;
  line-height: 1.2;
}
.brand span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.top-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}
.search {
  width: min(420px, 34vw);
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}
.btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  height: 38px;
  border-radius: 10px;
  padding: 0 12px;
  cursor: pointer;
}
.layout {
  display: flex;
  padding-top: 68px;
}
.sidebar {
  position: fixed;
  top: 68px;
  bottom: 0;
  left: 0;
  width: 310px;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar2));
  color: var(--sideText);
  overflow: auto;
  padding: 18px 14px 28px;
  z-index: 40;
}
.side-section {
  margin: 12px 0;
}
.side-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 12px 12px 6px;
  font-weight: 800;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--sideText);
  text-decoration: none;
  font-size: 14px;
  margin: 2px 0;
}
.nav-link:hover {
  background: rgba(148, 163, 184, 0.13);
  color: white;
}
.nav-link.active {
  background: var(--sideActive);
  color: #000000;
  font-weight: 700;
}
.nav-link .num {
  font-size: 11px;
  background: rgba(148, 163, 184, 0.16);
  padding: 2px 6px;
  border-radius: 999px;
}
.content {
  margin-left: 310px;
  min-height: calc(100vh - 68px);
  width: calc(100% - 310px);
  padding: 34px;
}
.doc-shell {
  max-width: 1120px;
  margin: 0 auto;
}
.page {
  display: none;
}
.page.active {
  display: block;
}
.hero {
  background: linear-gradient(135deg, #eff6ff, #fff, #f5f3ff);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #111827, #0f172a, #172554);
}
.crumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.page h1 {
  font-size: 38px;
  line-height: 1.15;
  margin: 0 0 12px;
}
.page h2 {
  font-size: 24px;
  margin: 32px 0 12px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.page h3 {
  font-size: 18px;
  margin: 22px 0 8px;
}
.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 850px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.card h3 {
  margin-top: 0;
}
.card p {
  color: var(--muted);
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 12px;
  margin: 4px 6px 4px 0;
}
[data-theme="dark"] .badge {
  background: #172554;
  color: #bfdbfe;
}
.callout {
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  background: var(--panel);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 16px 0;
}
.callout.tip {
  background: var(--tip);
  border-color: var(--tipLine);
  border-left-color: #10b981;
}
.callout.warn {
  background: var(--warn);
  border-color: var(--warnLine);
  border-left-color: #f97316;
}
.callout.danger {
  background: var(--danger);
  border-color: var(--dangerLine);
  border-left-color: #ef4444;
}
.steps {
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 18px 60px;
  margin: 12px 0;
}
.step:before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.code-wrap {
  position: relative;
  margin: 14px 0;
}
.copy {
  position: absolute;
  right: 10px;
  top: 10px;
  border: 0;
  border-radius: 8px;
  background: #1f2937;
  color: white;
  padding: 5px 9px;
  cursor: pointer;
}
pre {
  background: var(--code);
  color: #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  overflow: auto;
  border: 1px solid #1f2937;
}
code {
  font-family: Consolas, Monaco, ui-monospace, monospace;
}
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 16px 0;
}
.table th,
.table td {
  padding: 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.table th {
  background: rgba(148, 163, 184, 0.12);
}
.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 34px 0;
}
.pager a {
  flex: 1;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 16px;
  padding: 14px;
  color: var(--text);
}
.pager a:last-child {
  text-align: right;
}
.footer {
  color: var(--muted);
  text-align: center;
  padding: 20px;
}
.mobile-menu {
  display: none;
}
.highlight {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  border-radius: 8px;
}
@media (max-width: 920px) {
  .mobile-menu {
    display: inline-flex;
  }
  .brand {
    min-width: auto;
  }
  .brand h1 {
    font-size: 15px;
  }
  .search {
    width: 44vw;
  }
  .sidebar {
    transform: translateX(-100%);
    transition: 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .content {
    margin-left: 0;
    width: 100%;
    padding: 22px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .page h1 {
    font-size: 30px;
  }
  .topbar {
    padding: 0 12px;
  }
  .top-actions {
    gap: 6px;
  }
  .btn.print {
    display: none;
  }
}
@media print {
  .topbar,
  .sidebar,
  .pager {
    display: none;
  }
  .content {
    margin: 0;
    width: 100%;
    padding: 0;
  }
  .page {
    display: block;
    break-after: page;
  }
  .page:not(.active) {
    display: none;
  }
  body {
    background: white;
    color: black;
  }
  .card,
  .hero {
    box-shadow: none;
  }
}
