:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #22263a;
  --border: #2e3250;
  --accent: #6c8cff;
  --accent2: #a78bfa;
  --accent3: #34d399;
  --accent4: #fbbf24;
  --accent5: #f87171;
  --text: #e2e8f0;
  --text-muted: #8892b0;
  --text-dim: #4a5568;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --info: #60a5fa;
  --channel-slack: #4a154b;
  --channel-whatsapp: #128c7e;
  --channel-facebook: #1877f2;
  --channel-instagram: #c13584;
  --channel-telegram: #0088cc;
  --channel-teams: #5558af;
  --channel-email: #f59e0b;
  --channel-sms: #10b981;
  --channel-discord: #5865f2;
  --channel-line: #06c755;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
}

.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 28px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.logo {
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.logo h2 { font-size: 0.75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.logo h1 { font-size: 1.05rem; font-weight: 700; color: var(--text); }

.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 14px 20px 6px;
}

.sidebar a {
  display: block;
  padding: 7px 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  border-left: 3px solid transparent;
  transition: all .15s;
}
.sidebar a:hover { color: var(--text); background: var(--surface2); }
.sidebar a.active { color: var(--accent); border-left-color: var(--accent); background: rgba(108,140,255,.08); }

.sidebar a.ch-slack    { border-left-color: transparent; }
.sidebar a.ch-slack.active    { border-left-color: #e01e5a; }
.sidebar a.ch-whatsapp.active { border-left-color: #25d366; }
.sidebar a.ch-facebook.active { border-left-color: #1877f2; }
.sidebar a.ch-instagram.active{ border-left-color: #e1306c; }
.sidebar a.ch-telegram.active { border-left-color: #0088cc; }
.sidebar a.ch-teams.active    { border-left-color: #5558af; }
.sidebar a.ch-email.active    { border-left-color: #f59e0b; }
.sidebar a.ch-sms.active      { border-left-color: #10b981; }
.sidebar a.ch-discord.active  { border-left-color: #5865f2; }
.sidebar a.ch-line.active     { border-left-color: #06c755; }

/* ── Main Content ── */
.content {
  flex: 1;
  max-width: 860px;
  padding: 52px 56px;
}

.page-header { margin-bottom: 40px; }
.page-header .tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(108,140,255,.15);
  color: var(--accent);
  margin-bottom: 12px;
}

.channel-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.ch-tag-slack    { background: rgba(224,30,90,.15);  color: #e01e5a; }
.ch-tag-whatsapp { background: rgba(37,211,102,.15); color: #25d366; }
.ch-tag-facebook { background: rgba(24,119,242,.15); color: #5b9ef4; }
.ch-tag-instagram{ background: rgba(225,48,108,.15); color: #e1306c; }
.ch-tag-telegram { background: rgba(0,136,204,.15);  color: #39b0de; }
.ch-tag-teams    { background: rgba(85,88,175,.15);  color: #8b8de8; }
.ch-tag-email    { background: rgba(245,158,11,.15); color: #f59e0b; }
.ch-tag-sms      { background: rgba(16,185,129,.15); color: #10b981; }
.ch-tag-discord  { background: rgba(88,101,242,.15); color: #8b96f7; }
.ch-tag-line     { background: rgba(6,199,85,.15);   color: #06c755; }

.page-header h1 { font-size: 2rem; font-weight: 700; color: var(--text); margin-bottom: 14px; line-height: 1.2; }
.lead { font-size: 1.05rem; color: var(--text-muted); line-height: 1.7; max-width: 640px; }

h2 { font-size: 1.25rem; font-weight: 700; color: var(--text); margin: 40px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
h3 { font-size: 1rem; font-weight: 700; color: var(--accent2); margin: 28px 0 10px; }
h4 { font-size: 0.9rem; font-weight: 700; color: var(--text); margin: 20px 0 8px; }

p { color: var(--text-muted); margin-bottom: 14px; }
ul, ol { color: var(--text-muted); padding-left: 22px; margin-bottom: 14px; }
li { margin-bottom: 5px; }
strong { color: var(--text); }
code { font-family: 'Cascadia Code', 'Fira Code', monospace; font-size: 0.84em; background: var(--surface2); color: #93c5fd; padding: 2px 5px; border-radius: 4px; }

pre {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 16px 0 24px;
}
pre code { background: none; padding: 0; font-size: 0.83rem; color: #a3b8cc; line-height: 1.7; }

/* ── Cards ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 20px 0 32px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.card h4 { margin-top: 0; font-size: 0.9rem; }

/* Channel cards */
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 20px 0 32px; }
.channel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-decoration: none;
  display: block;
  transition: all .15s;
  border-top: 3px solid transparent;
}
.channel-card:hover { background: var(--surface2); transform: translateY(-1px); }
.channel-card h4 { margin: 0 0 4px; font-size: 0.875rem; }
.channel-card p { font-size: 0.8rem; margin: 0; }

/* ── Pipeline Steps ── */
.pipeline { margin: 24px 0 32px; }
.pipeline-step { display: flex; gap: 16px; margin-bottom: 4px; }
.connector { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; flex-shrink: 0;
}
.dot.warn    { background: var(--warning); color: #000; }
.dot.success { background: var(--success); color: #000; }
.dot.info    { background: var(--info); }
.dot.muted   { background: var(--surface2); border: 1px solid var(--border); color: var(--text-muted); }
.line { width: 2px; background: var(--border); flex: 1; min-height: 16px; margin: 3px 0; }
.pipeline-step .body { padding-bottom: 24px; flex: 1; }
.pipeline-step .body h4 { margin-top: 6px; font-size: 0.9rem; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; margin: 16px 0 28px; font-size: 0.875rem; }
th { background: var(--surface2); color: var(--text); font-weight: 600; text-align: left; padding: 10px 14px; border-bottom: 2px solid var(--border); }
td { padding: 9px 14px; border-bottom: 1px solid var(--border); color: var(--text-muted); vertical-align: top; }
tr:hover td { background: rgba(255,255,255,.02); }

/* ── Callouts ── */
.callout { border-radius: 8px; padding: 14px 18px; margin: 20px 0; border-left: 4px solid; }
.callout p, .callout ul { margin-bottom: 0; }
.callout strong { display: block; margin-bottom: 4px; }
.callout.info    { background: rgba(96,165,250,.08); border-color: var(--info); }
.callout.success { background: rgba(52,211,153,.08); border-color: var(--success); }
.callout.warning { background: rgba(251,191,36,.08); border-color: var(--warning); }
.callout.danger  { background: rgba(248,113,113,.08); border-color: var(--danger); }
.callout.info    strong { color: var(--info); }
.callout.success strong { color: var(--success); }
.callout.warning strong { color: var(--warning); }
.callout.danger  strong { color: var(--danger); }

/* ── Steps ── */
.steps { counter-reset: step; margin: 20px 0 32px; }
.step { display: flex; gap: 16px; margin-bottom: 20px; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--surface2);
  border: 2px solid var(--accent); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; flex-shrink: 0; margin-top: 2px;
}
.step-body h4 { margin-top: 0; }

/* ── Page Nav ── */
.page-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.page-nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all .15s;
}
.page-nav a:hover { background: var(--surface2); }
.spacer { flex: 1; }

/* ── Highlight badge ── */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
}
.badge-green  { background: rgba(52,211,153,.2); color: var(--success); }
.badge-yellow { background: rgba(251,191,36,.2);  color: var(--warning); }
.badge-red    { background: rgba(248,113,113,.2); color: var(--danger); }
.badge-blue   { background: rgba(96,165,250,.2);  color: var(--info); }

/* Logo in sidebar */
.sidebar-logo {
  display: block;
  width: 110px;
  margin-bottom: 10px;
  background: #ffffff;
  padding: 5px 8px;
  border-radius: 6px;
}
