/* Alpha Docs — Dark Theme */
:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-hover: #1a1a1a;
  --border: #262626;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --text: #e5e5e5;
  --text-muted: #a3a3a3;
  --text-dim: #737373;
  --online: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

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

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s;
}

.sidebar-logo {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.sidebar-logo h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.sidebar-logo span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all 0.2s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  color: var(--text);
  background: var(--bg-hover);
}

.sidebar nav a.active {
  border-right: 3px solid var(--accent);
  color: var(--accent);
}

.main {
  margin-left: 260px;
  flex: 1;
  max-width: 900px;
  padding: 3rem 2rem;
}

/* Mobile toggle */
.menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1.25rem;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* Typography */
h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Code */
code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg-hover);
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
  color: #c4b5fd;
}

pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  font-size: 0.85rem;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  color: var(--text-muted);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--accent);
}

.card h4 {
  margin-top: 0;
  color: var(--text);
}

.card p {
  font-size: 0.875rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.875rem;
}

th, td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-card);
}

td {
  color: var(--text);
}

tr:hover td {
  background: var(--bg-hover);
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2em 0.6em;
  border-radius: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-critical { background: #ef44441a; color: #ef4444; border: 1px solid #ef444430; }
.badge-high { background: #f97316/1a; color: #fb923c; border: 1px solid #f9731630; }
.badge-medium { background: #f59e0b1a; color: #fbbf24; border: 1px solid #f59e0b30; }
.badge-low { background: #3b82f61a; color: #60a5fa; border: 1px solid #3b82f630; }
.badge-ok { background: #22c55e1a; color: #4ade80; border: 1px solid #22c55e30; }
.badge-accent { background: #7c3aed1a; color: #a78bfa; border: 1px solid #7c3aed30; }

/* Lists */
ul, ol {
  margin: 0.5rem 0 1rem 1.5rem;
  color: var(--text-muted);
}

li { margin-bottom: 0.35rem; }
li strong { color: var(--text); }

/* Diagrams (ASCII boxes) */
.diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.4;
  overflow-x: auto;
  white-space: pre;
  color: var(--text-muted);
}

/* Flow arrows */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.flow-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text);
}

.flow-arrow {
  color: var(--accent);
  font-size: 1.25rem;
}

/* Alert boxes */
.alert {
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: 0.875rem;
}

.alert-info {
  background: #3b82f610;
  border: 1px solid #3b82f630;
  color: #93c5fd;
}

.alert-warning {
  background: #f59e0b10;
  border: 1px solid #f59e0b30;
  color: #fcd34d;
}

.alert-danger {
  background: #ef444410;
  border: 1px solid #ef444430;
  color: #fca5a5;
}

.alert-ok {
  background: #22c55e10;
  border: 1px solid #22c55e30;
  color: #86efac;
}

/* Footer */
.footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .overlay.open {
    display: block;
  }
  .menu-toggle {
    display: block;
  }
  .main {
    margin-left: 0;
    padding: 4rem 1rem 2rem;
  }
}
