/* Alara API chrome — portal + docs
   Same charcoal family as chat. Rail stays. No purple haze. */

:root {
  --bg-body: #121214;
  --bg-rail: #0e0e11;
  --surface-1: #19191c;
  --surface-2: #202024;
  --surface-3: #2a2a30;
  --hover: rgba(255, 244, 240, 0.055);
  --hover-strong: rgba(255, 244, 240, 0.09);

  --text: #eceae8;
  --muted: rgba(236, 234, 232, 0.58);
  --muted2: rgba(236, 234, 232, 0.36);

  --stroke: rgba(255, 236, 230, 0.11);
  --stroke2: rgba(255, 236, 230, 0.07);

  --pink: #ec4899;
  --pink-light: #f472b6;
  --pink-soft: rgba(236, 72, 153, 0.12);

  --good: #4ade80;
  --bad: #f87171;

  --shadow: 0 12px 40px rgba(6, 4, 8, 0.55);
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 10px;

  --sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --bg0: var(--bg-body);
  --bg1: var(--bg-body);
  --card: var(--surface-1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 48% at 50% -8%, rgba(236, 72, 153, 0.05), transparent 58%),
    var(--bg-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--pink-light); text-decoration: none; }
a:hover { color: var(--pink); text-decoration: underline; }
button { font: inherit; }
svg { display: block; }
code, pre { font-family: var(--mono); }
pre {
  margin: 12px 0 0;
  border-radius: var(--r-md);
  border: 1px solid var(--stroke2);
  background: #101014;
  padding: 14px;
  color: rgba(236, 234, 232, 0.86);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.55;
}

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

.rail {
  width: 72px;
  padding: 16px 12px;
  border-right: 1px solid var(--stroke2);
  background: var(--bg-rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.brand {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  user-select: none;
}
.brand img { width: 34px; height: 34px; display: block; }
.railBtn {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.railBtn:hover {
  color: var(--text);
  background: var(--hover);
  text-decoration: none;
}
.railBtn.active {
  color: var(--pink-light);
  background: var(--pink-soft);
  border-color: rgba(236, 72, 153, 0.32);
}
.railBtn.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 99px;
  background: var(--pink);
}
.railBtn .tip {
  position: absolute;
  left: 56px;
  top: 50%;
  transform: translateY(-50%);
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--stroke);
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 30;
}
.railBtn:hover .tip { opacity: 1; }
.railSep {
  height: 1px;
  width: 36px;
  background: var(--stroke2);
  margin: 6px 0;
}
.railFoot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.main {
  flex: 1;
  display: flex;
  min-width: 0;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid var(--stroke2);
  background: var(--bg-rail);
  padding: 20px 14px;
}
.sidebar h1 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
}
.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  text-decoration: none;
}
.nav a:hover {
  background: var(--hover);
  text-decoration: none;
}
.nav a.active {
  background: var(--surface-1);
  border-color: var(--stroke2);
}
.nav small {
  color: var(--muted2);
  font-size: 11px;
}

.content {
  flex: 1;
  padding: 22px 26px 30px;
  overflow: auto;
}
.content::-webkit-scrollbar { width: 8px; }
.content::-webkit-scrollbar-thumb {
  background: rgba(255, 236, 230, 0.1);
  border-radius: 99px;
}

.card {
  border: 1px solid var(--stroke2);
  background: var(--surface-1);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 14px;
}
.card > h2 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.card .desc,
.muted {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0;
}
.small { font-size: 11.5px; color: var(--muted2); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.tag:hover { color: var(--text); text-decoration: none; }
.kpi { display: flex; gap: 10px; flex-wrap: wrap; }
.kpi .pill {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--stroke2);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
}
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
