/* =========================================================================
   30A Content API – Tema bersama
   ========================================================================= */
:root {
  --bg: #07070A;
  --bg-elev: #0E0E12;
  --bg-elev-2: #14141A;
  --bg-input: #18181F;
  --border: #1F1F26;
  --border-strong: #2A2A33;
  --text: #F4F4F5;
  --text-muted: rgba(244, 244, 245, 0.55);
  --text-dim: rgba(244, 244, 245, 0.35);

  --brand: #6366F1;
  --brand-2: #8B5CF6;
  --accent: #22D3EE;
  --success: #34D399;
  --warning: #F59E0B;
  --danger: #F87171;
  --info: #60A5FA;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.05) inset;

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: radial-gradient(1200px 600px at 80% -10%, rgba(99, 102, 241, 0.12), transparent 60%),
              radial-gradient(900px 500px at -10% 10%, rgba(34, 211, 238, 0.08), transparent 55%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--info); text-decoration: none; }
a:hover { color: #93C5FD; }

code, pre { font-family: var(--font-mono); }

/* ---------- Layout ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.section { padding: 56px 0; border-bottom: 1px solid var(--border); }
.section:last-child { border-bottom: none; }
.section-title {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 8px;
  font-size: 22px; font-weight: 800; letter-spacing: -0.02em;
}
.section-title .muted {
  font-size: 12px; color: var(--text-dim); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.section-desc {
  font-size: 14px; color: var(--text-muted); max-width: 720px; margin-bottom: 24px;
}

/* ---------- Site header / navbar ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(18px) saturate(140%);
  background: rgba(7, 7, 10, 0.7);
  border-bottom: 1px solid var(--border);
}
.site-nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
}
.brand .brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset, 0 6px 20px rgba(99,102,241,0.35);
  font-weight: 900; font-size: 13px; letter-spacing: 0.06em;
}
.brand .brand-name { font-weight: 800; font-size: 14px; letter-spacing: -0.01em; }
.brand .brand-sub  { font-size: 11px; color: var(--text-dim); }

.site-nav .nav-links { display: flex; gap: 6px; align-items: center; }
.site-nav .nav-links a {
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  padding: 8px 12px; border-radius: 8px;
}
.site-nav .nav-links a:hover { color: var(--text); background: var(--bg-elev); }
.site-nav .nav-cta {
  font-size: 13px; font-weight: 700; color: var(--text);
  padding: 8px 14px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--border-strong);
}
.site-nav .nav-cta:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 56px;
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: clamp(32px, 4vw, 48px); font-weight: 900;
  letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 14px;
  background: linear-gradient(180deg, #FFFFFF 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { font-size: 16px; color: var(--text-muted); max-width: 640px; }
.hero .badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 9999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  border: 1px solid transparent;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-blue   { background: rgba(96,165,250,0.10); color: var(--info);    border-color: rgba(96,165,250,0.25); }
.badge-green  { background: rgba(52,211,153,0.10); color: var(--success); border-color: rgba(52,211,153,0.25); }
.badge-amber  { background: rgba(245,158,11,0.10); color: var(--warning); border-color: rgba(245,158,11,0.25); }
.badge-violet { background: rgba(139,92,246,0.10); color: #A78BFA;        border-color: rgba(139,92,246,0.25); }
.badge-cyan   { background: rgba(34,211,238,0.10); color: var(--accent);  border-color: rgba(34,211,238,0.25); }

/* ---------- Cards / surfaces ---------- */
.card {
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-elev-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card.padded { padding: 24px; }

.surface { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  padding: 10px 16px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; user-select: none;
  transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(180deg, var(--brand), #4F46E5);
  color: #fff; box-shadow: 0 8px 24px rgba(99,102,241,0.35), 0 1px 0 rgba(255,255,255,0.1) inset;
}
.btn-primary:hover { background: linear-gradient(180deg, #7B7DFB, #5448EA); }

.btn-ghost {
  background: var(--bg-input); color: var(--text-muted);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

.btn-success { background: rgba(52,211,153,0.12); color: var(--success); border-color: rgba(52,211,153,0.3); }
.btn-success:hover { background: rgba(52,211,153,0.22); }

.btn-warning { background: rgba(245,158,11,0.12); color: var(--warning); border-color: rgba(245,158,11,0.3); }
.btn-warning:hover { background: rgba(245,158,11,0.22); }

.btn-danger { background: rgba(248,113,113,0.12); color: var(--danger); border-color: rgba(248,113,113,0.3); }
.btn-danger:hover { background: rgba(248,113,113,0.22); }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

/* ---------- Inputs ---------- */
.input, select.input, textarea.input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px; color: var(--text);
  font-family: inherit; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, select.input:focus, textarea.input:focus {
  border-color: rgba(99,102,241,0.6);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.15);
}
.input.mono { font-family: var(--font-mono); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label {
  font-size: 11px; color: var(--text-dim); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.field-help { font-size: 11px; color: var(--text-dim); }

/* ---------- Tables ---------- */
.table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.table th, .table td {
  text-align: left; padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table th {
  color: var(--text-dim); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  background: rgba(255,255,255,0.02);
}
.table tr:last-child td { border-bottom: none; }

/* ---------- Pills/Chips ---------- */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 12px; color: var(--text-muted);
  cursor: pointer; transition: all 0.15s ease;
  font-family: inherit; font-weight: 500;
}
.chip:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }
.chip.active {
  background: linear-gradient(180deg, rgba(99,102,241,0.25), rgba(99,102,241,0.18));
  color: #fff; border-color: rgba(99,102,241,0.5);
}

/* ---------- Code blocks ---------- */
.code-block {
  background: #0A0A0F; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; overflow-x: auto;
}
.code-block code {
  font-size: 12px; color: rgba(255,255,255,0.78);
  white-space: pre; line-height: 1.7;
}

/* ---------- Method badges ---------- */
.method-badge {
  display: inline-block; padding: 2px 10px; border-radius: 6px;
  font-size: 10px; font-weight: 800; margin-right: 8px;
  letter-spacing: 0.04em;
}
.method-get    { background: rgba(52,211,153,0.14); color: var(--success); }
.method-post   { background: rgba(96,165,250,0.14); color: var(--info); }
.method-delete { background: rgba(248,113,113,0.14); color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 36px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}

/* ---------- Loading spinner ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.12);
  border-top-color: rgba(255,255,255,0.7);
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ---------- Status dot ---------- */
.status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 8px; vertical-align: middle;
}
.status-active   { background: var(--success); box-shadow: 0 0 0 3px rgba(52,211,153,0.18); }
.status-inactive { background: var(--danger);  box-shadow: 0 0 0 3px rgba(248,113,113,0.18); }

/* ---------- Toast ---------- */
.toast-host {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: rgba(20,20,26,0.96);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px; color: var(--text);
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  animation: slideUp 0.18s ease;
}
.toast.ok  { border-left: 3px solid var(--success); }
.toast.err { border-left: 3px solid var(--danger); }
.toast.warn { border-left: 3px solid var(--warning); }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hero { padding: 56px 0 36px; }
  .section { padding: 40px 0; }
  .site-nav .nav-links { display: none; }
}
