*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #09090b;
  --sidebar-bg: #0d0d10;
  --border: #1c1c26;
  --text: #f4f4f5;
  --muted: #71717a;
  --muted2: #3f3f46;
  --accent: #5865f2;
  --accent-dim: #1e2048;
  --green: #2ecc71;
  --red: #e74c3c;
  --sidebar-w: 248px;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
}

/* ── LAYOUT ─────────────────────────────────── */

.layout {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ─────────────────────────────────── */

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.sidebar-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.sidebar-logo-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.sidebar-logo-sub {
  font-size: 11px;
  color: var(--muted);
}

.sidebar-search {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
}

.sidebar-search input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--muted);
  outline: none;
  transition: border-color 0.15s;
}

.sidebar-search input::placeholder { color: var(--muted2); }
.sidebar-search input:focus { border-color: var(--accent); color: var(--text); }

.sidebar-nav {
  flex: 1;
  padding: 14px 0;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
  padding: 12px 18px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 18px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 0;
  transition: color 0.12s, background 0.12s;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.nav-link.active {
  color: var(--text);
  background: rgba(88,101,242,0.1);
  border-right: 2px solid var(--accent);
}

.nav-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-link:hover svg, .nav-link.active svg { opacity: 1; }

.sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.12s;
}

.sidebar-footer a:hover { color: var(--text); }

/* ── MAIN ─────────────────────────────────── */

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 56px 64px;
  max-width: 900px;
}

/* ── HOME PAGE ─────────────────────────────── */

.home-hero {
  text-align: center;
  margin-bottom: 60px;
}

.home-hero h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.home-hero p {
  font-size: 16px;
  color: var(--accent);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.5;
}

.doc-section {
  margin-bottom: 48px;
}

.doc-section-header {
  margin-bottom: 8px;
}

.doc-section-header h2 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.doc-section-header p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.doc-cards {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.doc-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: #111118;
  text-decoration: none;
  transition: background 0.12s;
}

.doc-card:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.doc-card:hover { background: #16161e; }

.doc-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--accent-dim);
}

.doc-card-icon svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.doc-card-icon.green { background: #0f2118; }
.doc-card-icon.green svg { color: var(--green); }
.doc-card-icon.red { background: #1f0f0f; }
.doc-card-icon.red svg { color: var(--red); }

.doc-card-body { flex: 1; }
.doc-card-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.doc-card-desc { font-size: 13px; color: var(--muted); }

.doc-card-arrow {
  color: var(--muted2);
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.12s, color 0.12s;
}

.doc-card:hover .doc-card-arrow { transform: translateX(3px); color: var(--muted); }

/* ── ARTICLE PAGES ─────────────────────────── */

.article-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.article-header h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.article-header p {
  font-size: 15px;
  color: var(--muted);
  max-width: 540px;
}

.article-body h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 36px 0 12px;
  color: var(--text);
}

.article-body h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 8px;
  color: var(--text);
}

.article-body p {
  color: #aaaaaa;
  margin-bottom: 14px;
  line-height: 1.75;
}

.article-body ul, .article-body ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.article-body li {
  color: #aaaaaa;
  margin-bottom: 6px;
  line-height: 1.7;
}

.article-body a { color: var(--accent); text-decoration: none; }
.article-body a:hover { text-decoration: underline; }

.article-body strong { color: var(--text); }

.info-box {
  background: var(--accent-dim);
  border: 1px solid rgba(88,101,242,0.25);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 20px 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.info-box svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.info-box p { color: #9ba4f5; margin: 0; font-size: 13px; }

.step {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  align-items: flex-start;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(88,101,242,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.step-body h3 { margin-top: 0; }
.step-body p { margin-bottom: 0; }

.kbd {
  display: inline-block;
  background: #1c1c26;
  border: 1px solid #2a2a3a;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 12px;
  font-family: Consolas, monospace;
  color: var(--text);
}

.article-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 16px;
}

.article-nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  background: #111118;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  flex: 1;
  transition: border-color 0.12s;
}

.article-nav a:hover { border-color: var(--accent); }

.article-nav .nav-hint {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.article-nav .nav-title { font-size: 14px; font-weight: 600; color: var(--text); }
.article-nav .next { text-align: right; }

/* ── RESPONSIVE ─────────────────────────────── */

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 32px 24px; }
}
