/* VortexPay Developer Portal */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #0a0a0a;
  --muted: #525252;
  --border: #e5e5e5;
  --accent: #635bff;
  --accent-hover: #4f46e5;
  --green: #16a34a;
  --orange: #ea580c;
  --red: #dc2626;
  --blue: #2563eb;
  --sidebar-w: 280px;
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 14px;
}

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

/* Header */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 56px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 1.5rem; z-index: 100;
  gap: 1rem;
}
.topbar-nav { display: flex; gap: 0.5rem; margin-left: 2rem; }
.topbar-nav a {
  padding: 0.35rem 0.75rem; border-radius: 6px; text-decoration: none;
  color: var(--muted); font-size: 0.875rem;
}
.topbar-nav a:hover { background: var(--bg); color: var(--text); }
.topbar-right { margin-left: auto; display: flex; gap: 0.75rem; align-items: center; }
.env-pill {
  font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 999px;
  background: #fef3c7; color: #92400e; font-weight: 600;
}

/* Sidebar */
.sidebar {
  position: fixed; top: 56px; left: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--border);
  overflow-y: auto; padding: 1rem 0;
}
.nav-group { margin-bottom: 1rem; }
.nav-group-title {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); padding: 0 1rem; margin-bottom: 0.35rem; font-weight: 600;
}
.nav-link {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 1rem; text-decoration: none; color: var(--muted);
  font-size: 0.8rem; font-family: var(--mono); border-left: 3px solid transparent;
}
.nav-link:hover { background: var(--bg); color: var(--text); }
.nav-link.active { background: #f5f3ff; color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
.method {
  font-size: 0.65rem; font-weight: 700; padding: 0.1rem 0.35rem; border-radius: 3px;
  font-family: var(--font); min-width: 42px; text-align: center;
}
.method-get { background: #dbeafe; color: var(--blue); }
.method-post { background: #dcfce7; color: var(--green); }
.method-delete { background: #fee2e2; color: var(--red); }

/* Main */
.main {
  margin-left: var(--sidebar-w); margin-top: 56px;
  flex: 1; padding: 2rem 2.5rem 4rem; max-width: 1100px;
}

.main-tabs { display: flex; gap: 0.25rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.main-tab {
  padding: 0.65rem 1.25rem; border: none; background: none; cursor: pointer;
  font-size: 0.9rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.main-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.panel { display: none; }
.panel.active { display: block; }

h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.25rem; margin: 1.5rem 0 0.75rem; }
h4 { font-size: 1rem; margin-bottom: 0.35rem; }
.lead { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.5rem; max-width: 640px; }
.muted { color: var(--muted); font-size: 0.875rem; }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 1.25rem; margin-bottom: 1rem;
}
.card-title { font-weight: 600; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } .sidebar { display: none; } .main { margin-left: 0; } }

label { display: block; font-size: 0.8rem; font-weight: 500; margin-bottom: 0.75rem; color: var(--muted); }
input, select, textarea {
  display: block; width: 100%; margin-top: 0.25rem; padding: 0.5rem 0.65rem;
  border: 1px solid var(--border); border-radius: 6px; font-size: 0.875rem;
  font-family: inherit;
}
textarea { font-family: var(--mono); font-size: 0.8rem; min-height: 160px; resize: vertical; }

.badge {
  display: inline-block; font-size: 0.7rem; padding: 0.15rem 0.5rem;
  border-radius: 4px; background: var(--bg); border: 1px solid var(--border); margin-right: 0.35rem;
}
.badge-warn { background: #fef3c7; border-color: #fcd34d; }
.badge-info { background: #dbeafe; border-color: #93c5fd; }

/* Code panel */
.code-panel { background: #1e1e1e; border-radius: 8px; overflow: hidden; margin-top: 0.75rem; }
.code-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0.75rem; background: #2d2d2d; border-bottom: 1px solid #404040;
}
.lang-tabs { display: flex; gap: 0.25rem; }
.lang-tab {
  padding: 0.25rem 0.6rem; border: none; background: transparent; color: #aaa;
  font-size: 0.75rem; cursor: pointer; border-radius: 4px;
}
.lang-tab.active { background: #404040; color: #fff; }
.code-header button {
  padding: 0.25rem 0.65rem; border: 1px solid #555; background: #333; color: #eee;
  border-radius: 4px; cursor: pointer; font-size: 0.75rem;
}
.code-header button:hover { background: #444; }
#code-output, #try-output, #response-sample {
  padding: 1rem; color: #d4d4d4; font-family: var(--mono); font-size: 0.78rem;
  line-height: 1.5; overflow-x: auto; white-space: pre-wrap; max-height: 360px; overflow-y: auto;
}
#response-sample { background: #f8f8f8; color: #333; border-radius: 6px; border: 1px solid var(--border); }

.btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.55rem 1rem; border-radius: 6px; border: none; cursor: pointer;
  font-size: 0.875rem; font-weight: 500;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn-row { display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; }

/* Integration guide */
.progress-wrap { margin-bottom: 1.5rem; }
.progress-bar-bg { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--accent); width: 0; transition: width 0.3s; }
#progress-label { font-size: 0.8rem; color: var(--muted); margin-top: 0.35rem; }
.step-card {
  border: 1px solid var(--border); border-radius: 8px; padding: 1rem; margin-bottom: 0.75rem;
  background: var(--surface); transition: border-color 0.2s;
}
.step-card.done { border-color: var(--green); background: #f0fdf4; }
.step-check { font-size: 0.8rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.step-tag { font-size: 0.75rem; color: var(--accent); font-weight: 500; }

/* Auth docs */
.auth-block { margin-bottom: 1.5rem; }
.auth-block pre {
  background: #f5f5f5; border: 1px solid var(--border); padding: 0.85rem;
  border-radius: 6px; font-size: 0.8rem; overflow-x: auto; font-family: var(--mono);
}
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 0.75rem 0; }
th, td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
th { background: #f5f5f5; }

.hero-stats { display: flex; gap: 2rem; margin: 1.5rem 0; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.75rem; color: var(--muted); }
