/* ENL API Platform — styles */

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

:root {
  --bg: #0f1117;
  --bg2: #1a1d27;
  --bg3: #22263a;
  --border: #2e3352;
  --text: #c9d1d9;
  --text-muted: #6e7d9e;
  --accent: #4f8ef7;
  --accent-dim: #2a4a8a;
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --code-bg: #161b22;
  --radius: 6px;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ── */
header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: 700;
  font-size: 1rem;
  color: #e6edf3;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

nav { display: flex; gap: 1.5rem; margin-left: auto; }
nav a { color: var(--text-muted); font-size: 0.875rem; }
nav a:hover { color: var(--text); text-decoration: none; }
nav a.active { color: var(--text); }

/* ── Layout ── */
.container { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Hero ── */
.hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 1.5rem;
}

.badge-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.75rem; }

.badge {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.2em 0.6em;
  border-radius: 20px;
  border: 1px solid;
}

.badge-blue  { color: #79c0ff; border-color: #1f4068; background: #0d1f3a; }
.badge-green { color: #56d364; border-color: #1a3d25; background: #0a2015; }
.badge-grey  { color: var(--text-muted); border-color: var(--border); background: var(--bg2); }

.btn {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn:hover { opacity: 0.85; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-outline { border: 1px solid var(--border); color: var(--text); background: transparent; }

.btn-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ── Cards ── */
.section { padding: 2.5rem 0; border-bottom: 1px solid var(--border); }
.section h2 { font-size: 1.25rem; font-weight: 600; color: #e6edf3; margin-bottom: 1.25rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }

.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.15s;
}

.card:hover { border-color: var(--accent-dim); }
.card h3 { font-size: 0.95rem; font-weight: 600; color: #e6edf3; margin-bottom: 0.4rem; }
.card p  { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.card .endpoint { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); margin-top: 0.5rem; display: block; }

/* ── Code block ── */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #c9d1d9;
  overflow-x: auto;
  line-height: 1.7;
}

.code-block .c  { color: #6e7d9e; }  /* comment */
.code-block .k  { color: #ff7b72; }  /* keyword */
.code-block .s  { color: #a5d6ff; }  /* string */
.code-block .n  { color: #79c0ff; }  /* name */
.code-block .m  { color: #f2cc60; }  /* number */

/* ── Status indicators ── */
.status-row { display: flex; flex-direction: column; gap: 0.6rem; }

.status-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

.status-name { flex: 1; color: #e6edf3; }
.status-latency { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.8rem; margin-right: 0.5rem; }

.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-green  { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot-yellow { background: var(--yellow); }
.dot-red    { background: var(--red); }

.uptime-bar {
  display: flex;
  gap: 2px;
  margin-top: 1rem;
}

.uptime-bar span {
  flex: 1;
  height: 28px;
  border-radius: 2px;
  background: var(--green);
  opacity: 0.7;
}

.uptime-bar span.down { background: var(--red); opacity: 0.8; }

/* ── Table ── */
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
tbody td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg2); }

.method {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15em 0.5em;
  border-radius: 3px;
}
.GET    { color: #56d364; background: #0a2015; }
.POST   { color: #79c0ff; background: #0d1f3a; }
.DELETE { color: #f85149; background: #3d0f0f; }

code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--code-bg);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  color: #e6edf3;
}

/* ── Footer ── */
footer {
  padding: 2rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ── Docs sidebar layout ── */
.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 72px;
}

.sidebar-section { margin-bottom: 1.25rem; }
.sidebar-section h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.sidebar-section a {
  display: block;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}

.sidebar-section a:hover { background: var(--bg2); color: var(--text); text-decoration: none; }
.sidebar-section a.active { background: var(--accent-dim); color: var(--accent); }

.docs-content h2 { font-size: 1.4rem; color: #e6edf3; margin: 0 0 0.75rem; }
.docs-content h3 { font-size: 1rem; color: #e6edf3; margin: 1.75rem 0 0.6rem; }
.docs-content p  { color: var(--text-muted); margin-bottom: 1rem; font-size: 0.9rem; }
.docs-content .code-block { margin-bottom: 1rem; }

.alert {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

@media (max-width: 680px) {
  .docs-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .hero h1 { font-size: 1.5rem; }
  nav { display: none; }
}
