/* ============================================================
   API MOCK GENERATOR — Premium Dark UI
   Inspired by Linear / Vercel / Warp / Raycast
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300..800;1,14..32,300..800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap");

/* ============================================================
   1. TOKENS
   ============================================================ */
:root {
  --ink-0: #ffffff;
  --ink-1: #f4f4f5;
  --ink-2: #a1a1aa;
  --ink-3: #71717a;
  --ink-4: #3f3f46;
  --ink-5: #27272a;
  --ink-6: #18181b;
  --ink-7: #0f0f10;
  --ink-8: #09090b;

  --surface-0: rgba(255, 255, 255, 0.025);
  --surface-1: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.08);
  --surface-3: rgba(255, 255, 255, 0.12);

  --border-0: rgba(255, 255, 255, 0.06);
  --border-1: rgba(255, 255, 255, 0.10);
  --border-2: rgba(255, 255, 255, 0.16);

  --bg: #09090b;
  --bg-panel: #0f0f10;
  --text: #f4f4f5;
  --text-soft: #a1a1aa;
  --text-muted: #71717a;

  --accent: #2563eb;
  --accent-light: #3b82f6;
  --accent-dim: rgba(37, 99, 235, 0.14);
  --accent-glow: rgba(37, 99, 235, 0.28);

  --purple: #8b5cf6;
  --cyan: #06b6d4;
  --pink: #ec4899;
  --success: #22c55e;
  --success-dim: rgba(34, 197, 94, 0.14);
  --warning: #f59e0b;
  --warning-dim: rgba(245, 158, 11, 0.14);
  --error: #ef4444;
  --error-dim: rgba(239, 68, 68, 0.14);

  /* HTTP method colors */
  --m-get: #22c55e;
  --m-get-dim: rgba(34, 197, 94, 0.14);
  --m-post: #3b82f6;
  --m-post-dim: rgba(59, 130, 246, 0.14);
  --m-put: #f59e0b;
  --m-put-dim: rgba(245, 158, 11, 0.14);
  --m-patch: #8b5cf6;
  --m-patch-dim: rgba(139, 92, 246, 0.14);
  --m-delete: #ef4444;
  --m-delete-dim: rgba(239, 68, 68, 0.14);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Fira Code", monospace;

  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 14.5px;
  --text-md: 16px;
  --text-lg: 19px;
  --text-xl: 24px;
  --text-2xl: 32px;
  --text-3xl: 42px;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semi: 600;
  --weight-bold: 700;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 32px 80px rgba(0, 0, 0, 0.7), 0 12px 32px rgba(0, 0, 0, 0.5);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 320ms;

  --sidebar-w: 264px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 64px;
}

/* ============================================================
   2. RESET
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  color-scheme: dark;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
::selection {
  background: rgba(37, 99, 235, 0.35);
  color: #fff;
}
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-2);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.hidden {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ============================================================
   3. AMBIENT BACKGROUND
   ============================================================ */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 10%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 10%, black 20%, transparent 100%);
}
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform;
}
.bg-blob-1 {
  width: 700px;
  height: 700px;
  top: -300px;
  right: -150px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.10) 0%, transparent 70%);
  animation: blobDrift 22s ease-in-out infinite;
}
.bg-blob-2 {
  width: 550px;
  height: 550px;
  bottom: -200px;
  left: -100px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.07) 0%, transparent 70%);
  animation: blobDrift 28s ease-in-out infinite reverse;
}
.bg-blob-3 {
  width: 420px;
  height: 420px;
  top: 45%;
  left: 45%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.05) 0%, transparent 70%);
  animation: blobDrift 18s ease-in-out infinite 6s;
}
@keyframes blobDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.97); }
}
.shape-float {
  position: absolute;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-xl);
  opacity: 0.5;
  animation: shapeFloat 8s ease-in-out infinite;
}
.shape-1 { width: 64px; height: 64px; top: 14%; right: 8%; border-radius: 50%; animation-delay: 0s; }
.shape-2 { width: 40px; height: 40px; top: 62%; right: 4%; transform: rotate(20deg); animation-delay: 2.5s; }
.shape-3 { width: 26px; height: 26px; top: 30%; left: 6%; border-radius: 50%; animation-delay: 5s; }
@keyframes shapeFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(8deg); }
}

/* ============================================================
   4. APP SHELL
   ============================================================ */
.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  background: rgba(9, 9, 11, 0.6);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-right: 1px solid var(--border-0);
  transition: width var(--dur-slow) var(--ease-spring), transform var(--dur-slow) var(--ease-spring);
  z-index: 60;
}
.sidebar.collapsed { width: var(--sidebar-w-collapsed); }
.sidebar.collapsed .sidebar-label,
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-section-label { opacity: 0; pointer-events: none; width: 0; }

.sidebar-head {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--topbar-h);
  padding: 0 20px;
  border-bottom: 1px solid var(--border-0);
  flex-shrink: 0;
}
.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
  animation: brandPulse 3s ease-in-out infinite;
}
@keyframes brandPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(37, 99, 235, 0.35); }
  50% { box-shadow: 0 0 28px rgba(37, 99, 235, 0.6); }
}
.brand-icon svg { width: 18px; height: 18px; stroke: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; overflow: hidden; white-space: nowrap; transition: opacity var(--dur-fast) var(--ease); }
.brand-name { font-size: 14px; font-weight: var(--weight-bold); color: var(--ink-0); letter-spacing: -0.01em; }
.brand-sub { font-size: 10.5px; color: var(--text-muted); }

.sidebar-nav {
  flex: 1;
  padding: 18px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-section-label {
  font-size: 10px;
  font-weight: var(--weight-semi);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 12px 6px;
  white-space: nowrap;
  transition: opacity var(--dur-fast) var(--ease);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease-spring);
  position: relative;
  white-space: nowrap;
  border: 1px solid transparent;
}
.nav-item svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.nav-item:hover { background: var(--surface-1); color: var(--text); }
.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent-light);
  border-color: rgba(37, 99, 235, 0.25);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px var(--accent-glow);
}
.sidebar-label { transition: opacity var(--dur-fast) var(--ease); flex: 1; }
.nav-badge {
  font-size: 9.5px;
  font-weight: var(--weight-semi);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.sidebar-foot {
  padding: 14px 16px 18px;
  border-top: 1px solid var(--border-0);
  flex-shrink: 0;
}
.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 34px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  background: var(--surface-0);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.sidebar-collapse-btn:hover { background: var(--surface-1); color: var(--text); }
.sidebar-collapse-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform var(--dur-base) var(--ease); }
.sidebar.collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow-xl);
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 55;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-base) var(--ease);
  }
  .sidebar-overlay.show { opacity: 1; pointer-events: all; }
}

/* ---- Main wrap ---- */
.main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ---- Topbar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: rgba(9, 9, 11, 0.7);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border-0);
}
.topbar-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  background: var(--surface-0);
  color: var(--text-soft);
  cursor: pointer;
  flex-shrink: 0;
}
.topbar-menu-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
@media (max-width: 900px) { .topbar-menu-btn { display: flex; } }

.topbar-search {
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  background: var(--surface-0);
  transition: border-color var(--dur-base) var(--ease), background var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.topbar-search:focus-within {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.05);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.topbar-search svg { width: 15px; height: 15px; stroke: var(--text-muted); fill: none; stroke-width: 1.75; flex-shrink: 0; }
.topbar-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}
.topbar-search input::placeholder { color: var(--text-muted); }
.topbar-search kbd {
  font-size: 10px;
  color: var(--text-muted);
  border: 1px solid var(--border-1);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 5px;
  background: var(--surface-1);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  background: var(--surface-0);
  color: var(--text-soft);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease-spring);
}
.icon-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: var(--surface-1); border-color: var(--border-2); color: var(--text); transform: translateY(-1px); }
.icon-btn:active { transform: translateY(0) scale(0.95); }
.notif-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--error);
  box-shadow: 0 0 0 2px rgba(9, 9, 11, 0.9);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5), 0 0 0 2px rgba(9,9,11,0.9); }
  50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0), 0 0 0 2px rgba(9,9,11,0.9); }
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 10px 0 4px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-pill);
  background: var(--surface-0);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.profile-chip:hover { background: var(--surface-1); border-color: var(--border-2); }
.profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: var(--weight-bold);
  color: #fff;
  flex-shrink: 0;
}
.profile-name { font-size: 12.5px; font-weight: var(--weight-medium); color: var(--text-soft); }
@media (max-width: 640px) { .profile-name, .topbar-search { display: none; } }

/* ---- Content ---- */
.content {
  flex: 1;
  padding: 28px 32px 60px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}
@media (max-width: 640px) { .content { padding: 20px 16px 48px; } }

.view { display: none; }
.view.active { display: block; animation: viewIn var(--dur-slow) var(--ease) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.page-eyebrow {
  font-size: 10.5px;
  font-weight: var(--weight-semi);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.page-eyebrow::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 8px var(--accent-light);
}
.page-title { font-size: 27px; font-weight: var(--weight-bold); letter-spacing: -0.02em; }
.page-sub { font-size: 13.5px; color: var(--text-muted); margin-top: 5px; max-width: 520px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   5. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: var(--weight-semi);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  position: relative;
  overflow: hidden;
}
.btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.btn:disabled { opacity: 0.45; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: rgba(37, 99, 235, 0.6);
  color: #fff;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.3), 0 1px 0 rgba(255,255,255,0.1) inset;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 200%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.45s ease;
}
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 32px rgba(37, 99, 235, 0.5), 0 4px 16px rgba(0,0,0,0.3); }
.btn-primary:active { transform: translateY(1px) scale(0.97); }

.btn-secondary {
  background: var(--surface-1);
  border-color: var(--border-1);
  color: var(--text);
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--border-2); transform: translateY(-1px); }
.btn-secondary:active { transform: translateY(0) scale(0.97); }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--surface-1); color: var(--text); }

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.2); transform: translateY(-1px); box-shadow: 0 0 20px rgba(239,68,68,0.2); }

.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-icon-only { width: 38px; padding: 0; }

.btn-loading { pointer-events: none; }
.btn-loading .btn-label { opacity: 0.6; }
.btn-spin {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-secondary .btn-spin, .btn-ghost .btn-spin { border-color: var(--border-1); border-top-color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

.fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 70;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 32px rgba(37, 99, 235, 0.45);
  transition: transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base) var(--ease);
}
.fab svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2; }
.fab:hover { transform: scale(1.08) translateY(-3px); box-shadow: 0 14px 40px rgba(37,99,235,0.55); }
@media (max-width: 900px) { .fab { display: flex; } }

/* ============================================================
   6. GLASS CARD / PANEL
   ============================================================ */
.glass-card {
  border: 1px solid var(--border-0);
  border-radius: var(--radius-xl);
  background: var(--surface-0);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  transition: background var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease), transform var(--dur-base) var(--ease-spring), box-shadow var(--dur-base) var(--ease);
}
.glass-card:hover { border-color: var(--border-1); }
.panel { padding: 22px; }

/* ============================================================
   7. STAT CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 1024px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stats-grid { grid-template-columns: 1fr; } }

.stat-card {
  padding: 20px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-0);
  background: var(--surface-0);
  position: relative;
  overflow: hidden;
  animation: cardIn var(--dur-slow) var(--ease) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.stat-card:nth-child(1) { animation-delay: 0ms; }
.stat-card:nth-child(2) { animation-delay: 60ms; }
.stat-card:nth-child(3) { animation-delay: 120ms; }
.stat-card:nth-child(4) { animation-delay: 180ms; }
.stat-card:hover { transform: translateY(-3px); border-color: var(--border-1); box-shadow: var(--shadow-md); }
.stat-card::after {
  content: '';
  position: absolute;
  top: -40%; right: -20%;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--stat-glow, rgba(37,99,235,0.18)) 0%, transparent 70%);
  pointer-events: none;
}
.stat-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--stat-bg, var(--accent-dim));
  color: var(--stat-color, var(--accent-light));
  margin-bottom: 14px;
}
.stat-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.stat-value { font-size: 30px; font-weight: var(--weight-bold); letter-spacing: -0.02em; line-height: 1; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12.5px; color: var(--text-muted); font-weight: var(--weight-medium); }
.stat-trend { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: var(--weight-semi); margin-top: 8px; }
.stat-trend.up { color: var(--success); }
.stat-trend svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2.5; }

.stat-card[data-tone="green"] { --stat-bg: var(--success-dim); --stat-color: var(--success); --stat-glow: rgba(34,197,94,0.16); }
.stat-card[data-tone="red"] { --stat-bg: var(--error-dim); --stat-color: #fca5a5; --stat-glow: rgba(239,68,68,0.16); }
.stat-card[data-tone="purple"] { --stat-bg: rgba(139,92,246,0.14); --stat-color: #a78bfa; --stat-glow: rgba(139,92,246,0.16); }

/* ============================================================
   8. TOOLBAR / SEARCH / FILTERS
   ============================================================ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar-search {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-1);
  background: var(--surface-0);
  transition: border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.toolbar-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.toolbar-search svg { width: 15px; height: 15px; stroke: var(--text-muted); fill: none; stroke-width: 1.75; }
.toolbar-search input { flex: 1; border: none; outline: none; background: transparent; font-size: 13px; }
.toolbar-search input::placeholder { color: var(--text-muted); }

.filter-select {
  height: 40px;
  padding: 0 32px 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-1);
  background: var(--surface-0)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2371717a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  color: var(--text);
  font-size: 12.5px;
  font-weight: var(--weight-medium);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--dur-fast) var(--ease);
}
.filter-select:hover { border-color: var(--border-2); }
.filter-select:focus { border-color: var(--accent); outline: none; }

/* ============================================================
   9. TABLE
   ============================================================ */
.table-wrap {
  border: 1px solid var(--border-0);
  border-radius: var(--radius-xl);
  background: var(--surface-0);
  overflow: hidden;
}
.table-scroll { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; min-width: 780px; }
.data-table thead th {
  text-align: left;
  font-size: 10.5px;
  font-weight: var(--weight-semi);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-0);
  background: rgba(255,255,255,0.015);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border-0);
  font-size: 13px;
  color: var(--text-soft);
  vertical-align: middle;
}
.data-table tbody tr { transition: background var(--dur-fast) var(--ease); animation: rowIn var(--dur-base) var(--ease) both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.data-table tbody tr:hover { background: var(--surface-1); }
.data-table tbody tr:last-child td { border-bottom: none; }

.cell-name { display: flex; flex-direction: column; gap: 2px; }
.cell-name .n-title { color: var(--text); font-weight: var(--weight-medium); font-size: 13.5px; }
.cell-name .n-sub { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }

.cell-endpoint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  max-width: 220px;
}
.cell-endpoint span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.row-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.row-action-btn {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  background: var(--surface-0);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease-spring);
}
.row-action-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.row-action-btn:hover { background: var(--surface-2); color: var(--text); transform: translateY(-1px); }
.row-action-btn.danger:hover { background: rgba(239,68,68,0.14); color: #fca5a5; border-color: rgba(239,68,68,0.3); }
.row-action-btn.success-flash { background: var(--success-dim); color: var(--success); border-color: rgba(34,197,94,0.3); }

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.badge-method { font-family: var(--font-mono); }
.badge-method.m-GET { background: var(--m-get-dim); color: var(--m-get); border-color: rgba(34,197,94,0.3); }
.badge-method.m-POST { background: var(--m-post-dim); color: var(--m-post); border-color: rgba(59,130,246,0.3); }
.badge-method.m-PUT { background: var(--m-put-dim); color: var(--m-put); border-color: rgba(245,158,11,0.3); }
.badge-method.m-PATCH { background: var(--m-patch-dim); color: var(--m-patch); border-color: rgba(139,92,246,0.3); }
.badge-method.m-DELETE { background: var(--m-delete-dim); color: var(--m-delete); border-color: rgba(239,68,68,0.3); }

.badge-status { font-family: var(--font-mono); }
.badge-status.s-2xx { background: var(--success-dim); color: var(--success); border-color: rgba(34,197,94,0.3); }
.badge-status.s-3xx { background: rgba(59,130,246,0.14); color: #60a5fa; border-color: rgba(59,130,246,0.3); }
.badge-status.s-4xx { background: var(--warning-dim); color: var(--warning); border-color: rgba(245,158,11,0.3); }
.badge-status.s-5xx { background: var(--error-dim); color: #fca5a5; border-color: rgba(239,68,68,0.3); }

.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: var(--weight-medium); color: var(--text-soft); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.status-dot.active { background: var(--success); box-shadow: 0 0 8px rgba(34,197,94,0.6); }
.status-dot.inactive { background: var(--text-muted); }

/* ---- Toggle switch ---- */
.switch { position: relative; display: inline-flex; align-items: center; width: 38px; height: 21px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  position: absolute; inset: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-spring), border-color var(--dur-base) var(--ease);
}
.switch-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform var(--dur-base) var(--ease-spring), background var(--dur-base) var(--ease);
}
.switch input:checked + .switch-track { background: rgba(34,197,94,0.25); border-color: rgba(34,197,94,0.45); }
.switch input:checked + .switch-track::after { transform: translateX(17px); background: var(--success); }
.switch input:disabled + .switch-track { opacity: 0.5; pointer-events: none; }

/* ============================================================
   10. EMPTY / LOADING / SKELETON STATES
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px 24px;
  text-align: center;
  gap: 14px;
}
.empty-illustration {
  width: 72px; height: 72px;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  color: var(--text-muted);
  animation: emptyFloat 4s ease-in-out infinite;
}
.empty-illustration svg { width: 30px; height: 30px; stroke: currentColor; fill: none; stroke-width: 1.5; }
@keyframes emptyFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.empty-title { font-size: 15px; font-weight: var(--weight-semi); color: var(--text); }
.empty-sub { font-size: 12.5px; color: var(--text-muted); max-width: 320px; }

.skeleton-row td { padding: 15px 18px; border-bottom: 1px solid var(--border-0); }
.sk-bar {
  height: 12px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--surface-1) 25%, var(--surface-2) 50%, var(--surface-1) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk-w-40 { width: 40%; } .sk-w-60 { width: 60%; } .sk-w-30 { width: 30%; } .sk-w-50 { width: 50%; } .sk-w-20 { width: 20%; }

.skeleton-card {
  height: 108px;
  border-radius: var(--radius-xl);
  background: linear-gradient(90deg, var(--surface-0) 25%, var(--surface-1) 50%, var(--surface-0) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border: 1px solid var(--border-0);
}

/* ============================================================
   11. FORM — CREATE / EDIT MOCK
   ============================================================ */
.form-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1100px) { .form-layout { grid-template-columns: 1fr; } }

.form-section { padding: 22px 24px; margin-bottom: 18px; }
.form-section:last-child { margin-bottom: 0; }
.form-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.form-section-icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim);
  color: var(--accent-light);
  flex-shrink: 0;
}
.form-section-icon svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.form-section-title { font-size: 14.5px; font-weight: var(--weight-semi); }
.form-section-desc { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }

.form-row { display: grid; gap: 16px; margin-bottom: 16px; }
.form-row:last-child { margin-bottom: 0; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 560px) { .form-row.cols-2, .form-row.cols-3 { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px;
  font-weight: var(--weight-semi);
  letter-spacing: 0.03em;
  color: var(--text-soft);
}
.form-label .required { color: var(--error); }
.form-label .optional-tag { font-size: 10px; font-weight: var(--weight-normal); color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.form-hint { font-size: 11px; color: var(--text-muted); }

.form-input, .form-select, .form-textarea {
  width: 100%;
  height: 40px;
  padding: 0 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-1);
  background: var(--surface-0);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color var(--dur-base) var(--ease), background var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-input:hover, .form-select:hover, .form-textarea:hover { border-color: var(--border-2); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  background: rgba(37,99,235,0.04);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-textarea { height: auto; padding: 10px 13px; resize: vertical; min-height: 80px; line-height: 1.6; }
.form-select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2371717a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}

.form-input.invalid, .form-select.invalid, .form-textarea.invalid {
  border-color: var(--error);
  background: rgba(239,68,68,0.04);
}
.field-error {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #fca5a5;
  margin-top: 2px;
}
.field-error svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.form-group.has-error .field-error { display: flex; }

/* Method select with colored dot */
.method-select-wrap { position: relative; }
.method-dot {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  pointer-events: none;
  transition: background var(--dur-fast) var(--ease);
}
#methodSelect { padding-left: 28px; }

/* ---- JSON Editor ---- */
.json-editor {
  display: flex;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.35);
  overflow: hidden;
  transition: border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.json-editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.json-editor.invalid { border-color: var(--error); }
.json-line-numbers {
  flex-shrink: 0;
  padding: 12px 10px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-4);
  background: rgba(255,255,255,0.015);
  border-right: 1px solid var(--border-0);
  user-select: none;
  white-space: pre;
  overflow: hidden;
}
.json-editor-inner { flex: 1; position: relative; min-width: 0; }
.json-highlight, .json-textarea {
  margin: 0;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre;
  tab-size: 2;
}
.json-highlight {
  position: absolute;
  inset: 0;
  overflow: auto;
  pointer-events: none;
  color: #e2e8f0;
}
.json-textarea {
  position: relative;
  width: 100%;
  min-height: 210px;
  border: none;
  outline: none;
  resize: vertical;
  background: transparent;
  color: transparent;
  caret-color: #f4f4f5;
  z-index: 1;
}
.json-textarea::selection { background: rgba(37,99,235,0.35); color: transparent; }
.tok-key { color: #ffcb6b; }
.tok-str { color: #c3e88d; }
.tok-num { color: #f78c6c; }
.tok-bool { color: #c792ea; }
.tok-null { color: #c792ea; }
.tok-punc { color: #89ddff; }

.json-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.json-toolbar-actions { display: flex; gap: 6px; }
.json-mini-btn {
  height: 26px;
  padding: 0 10px;
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  background: var(--surface-0);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.json-mini-btn svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; }
.json-mini-btn:hover { background: var(--surface-2); color: var(--text); }

/* ---- Header rows (key/value dynamic list) ---- */
.kv-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.kv-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  animation: kvIn var(--dur-base) var(--ease-spring) both;
}
@keyframes kvIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.kv-row .form-input { height: 36px; font-size: 12.5px; }
.kv-remove-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  background: var(--surface-0);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.kv-remove-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.kv-remove-btn:hover { background: rgba(239,68,68,0.14); color: #fca5a5; border-color: rgba(239,68,68,0.3); }
.kv-empty { font-size: 11.5px; color: var(--text-muted); padding: 8px 2px; }

.btn-dashed {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%;
  height: 36px;
  border: 1px dashed var(--border-2);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.btn-dashed svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.btn-dashed:hover { border-color: var(--accent); color: var(--accent-light); background: rgba(37,99,235,0.05); }

/* ---- Auth section ---- */
.auth-fields { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; overflow: hidden; }
.auth-fields[data-empty="true"] { display: none; }
.auth-field-anim { animation: authIn var(--dur-base) var(--ease-spring) both; }
@keyframes authIn { from { opacity: 0; transform: translateY(-8px); max-height: 0; } to { opacity: 1; transform: translateY(0); max-height: 200px; } }

.auth-type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 560px) { .auth-type-grid { grid-template-columns: repeat(2, 1fr); } }
.auth-type-option { position: relative; }
.auth-type-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.auth-type-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  background: var(--surface-0);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: var(--weight-semi);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-spring);
  text-align: center;
}
.auth-type-card svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.75; }
.auth-type-option input:checked + .auth-type-card {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.auth-type-card:hover { border-color: var(--border-2); color: var(--text-soft); }

.form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
}
.form-footer-left { margin-right: auto; font-size: 11.5px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }

/* ---- Live preview panel ---- */
.preview-panel { position: sticky; top: calc(var(--topbar-h) + 20px); }
.preview-request-line {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-0);
  font-family: var(--font-mono);
  font-size: 12px;
  margin-bottom: 14px;
  overflow-x: auto;
  white-space: nowrap;
}
.preview-json {
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border-0);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  max-height: 420px;
  overflow: auto;
  white-space: pre;
}
.preview-section-title {
  font-size: 10.5px; font-weight: var(--weight-semi); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 10px;
}

/* ============================================================
   12. MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn var(--dur-base) var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-overlay.closing { animation: fadeOut var(--dur-fast) var(--ease) forwards; }
@keyframes fadeOut { to { opacity: 0; } }

.modal-box {
  width: min(460px, 100%);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-xl);
  background: rgba(14, 14, 16, 0.98);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: modalIn var(--dur-base) var(--ease-spring);
}
.modal-box.modal-lg { width: min(600px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: scale(0.94) translateY(-10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border-0); }
.modal-head h3 { font-size: 15px; font-weight: var(--weight-semi); }
.modal-close {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease-spring), color var(--dur-fast) var(--ease);
}
.modal-close svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.modal-close:hover { background: var(--surface-1); color: var(--text); transform: rotate(90deg); }
.modal-body { padding: 20px 22px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border-0); }

/* Delete confirm modal */
.confirm-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--error-dim);
  color: #fca5a5;
  margin-bottom: 16px;
  animation: shakeIn 0.5s var(--ease-spring);
}
@keyframes shakeIn { 0% { transform: scale(0.6) rotate(0deg); opacity: 0; } 60% { transform: scale(1.05) rotate(-4deg); } 100% { transform: scale(1) rotate(0deg); opacity: 1; } }
.confirm-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.75; }
.confirm-title { font-size: 15px; font-weight: var(--weight-semi); margin-bottom: 6px; }
.confirm-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.confirm-target { color: var(--text); font-weight: var(--weight-semi); }

/* Success modal */
.success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--success-dim);
  color: var(--success);
  margin: 4px auto 18px;
  animation: successPop 0.55s var(--ease-spring);
  position: relative;
}
@keyframes successPop { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
.success-icon::after {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(34,197,94,0.35);
  animation: successRing 1s var(--ease) 0.2s both;
}
@keyframes successRing { from { transform: scale(0.7); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }
.success-icon svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 2; }
.success-title { text-align: center; font-size: 16px; font-weight: var(--weight-bold); margin-bottom: 4px; }
.success-sub { text-align: center; font-size: 12.5px; color: var(--text-muted); margin-bottom: 20px; }

.endpoint-box {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border-1);
  margin-bottom: 12px;
}
.endpoint-box input {
  flex: 1; border: none; outline: none; background: transparent;
  color: var(--text); font-family: var(--font-mono); font-size: 12px;
  min-width: 0;
}
.endpoint-meta { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
/* ============================================================
   WHY SECTION — Mock API Gen
   All classes prefixed with .mag-why to avoid collisions.
   Drop this into your existing stylesheet.
   ============================================================ */

.mag-why {
  width: 100%;
  max-width: 960px;
  margin: 3.5rem auto 2rem;
  padding: 0 1.25rem;
}

.mag-why-heading {
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  text-align: center;
  margin: 0 0 0.55rem;
  letter-spacing: -0.022em;
}

.mag-why-subheading {
  font-size: 0.9rem;
  color: var(--text-muted, rgba(255, 255, 255, 0.45));
  text-align: center;
  max-width: 480px;
  margin: 0 auto 2.25rem;
  line-height: 1.65;
}

/* 3-col grid → 2-col → 1-col */
.mag-why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 780px) {
  .mag-why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .mag-why-grid {
    grid-template-columns: 1fr;
  }
}

/* Card — matches the .glass-card style in Mock API Gen */
.mag-why-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  padding: 1.35rem 1.2rem 1.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.mag-why-card:hover {
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.13);
  transform: translateY(-2px);
}

/* Icon box — matches .form-section-icon sizing */
.mag-why-icon {
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.3rem;
  flex-shrink: 0;
}

.mag-why-icon svg {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.72);
}

/* Label — matches .form-section-title / nav-section-label uppercase style */
.mag-why-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-primary, rgba(255, 255, 255, 0.92));
  margin: 0;
}

/* Description */
.mag-why-desc {
  font-size: 0.86rem;
  color: var(--text-muted, rgba(255, 255, 255, 0.45));
  line-height: 1.65;
  margin: 0;
}
/* ============================================================
   13. TOASTS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
}
@media (max-width: 520px) { .toast-container { left: 16px; right: 16px; bottom: 16px; } }

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  max-width: 380px;
  padding: 13px 16px;
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  background: rgba(15, 15, 16, 0.97);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-xl);
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: var(--text);
  pointer-events: all;
  animation: toastIn 0.3s var(--ease-spring) both;
  position: relative;
  overflow: hidden;
}
@media (max-width: 520px) { .toast { max-width: 100%; } }
.toast::after {
  content: '';
  position: absolute; bottom: 0; left: 0; height: 2px; width: 100%;
  background: var(--accent);
  animation: toastProgress 4s linear forwards;
  transform-origin: left;
}
.toast.toast-success::after { background: var(--success); }
.toast.toast-error::after { background: var(--error); }
.toast.toast-warning::after { background: var(--warning); }
@keyframes toastProgress { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px) scale(0.95); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0) scale(1); } to { opacity: 0; transform: translateX(30px) scale(0.95); } }
.toast.removing { animation: toastOut 0.22s var(--ease) both; }

.toast-icon { width: 17px; height: 17px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.toast.toast-success .toast-icon { color: var(--success); }
.toast.toast-error .toast-icon { color: var(--error); }
.toast.toast-warning .toast-icon { color: var(--warning); }
.toast.toast-info .toast-icon { color: var(--accent-light); }
.toast-msg { flex: 1; }
.toast-close {
  width: 18px; height: 18px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: var(--surface-1); color: var(--text-muted);
  cursor: pointer; font-size: 11px;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.toast-close:hover { background: var(--surface-2); color: var(--text); }

/* ============================================================
   14. PLACEHOLDER VIEWS (Analytics / Settings)
   ============================================================ */
.placeholder-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 90px 24px;
  gap: 16px;
  border: 1px dashed var(--border-1);
  border-radius: var(--radius-xl);
  background: var(--surface-0);
}
.placeholder-icon {
  width: 76px; height: 76px;
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-dim), rgba(139,92,246,0.14));
  color: var(--accent-light);
  animation: emptyFloat 4.5s ease-in-out infinite;
}
.placeholder-icon svg { width: 32px; height: 32px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.placeholder-view h2 { font-size: 18px; font-weight: var(--weight-semi); }
.placeholder-view p { font-size: 13px; color: var(--text-muted); max-width: 380px; }
.coming-soon-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-dim);
  color: var(--accent-light);
  font-size: 10.5px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.settings-grid { display: grid; gap: 18px; max-width: 640px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border-0); }
.settings-row:last-child { border-bottom: none; }
.settings-row-info h4 { font-size: 13.5px; font-weight: var(--weight-semi); margin-bottom: 3px; }
.settings-row-info p { font-size: 11.5px; color: var(--text-muted); }
.settings-input-row { display: flex; gap: 10px; align-items: center; }
.settings-input-row .form-input { max-width: 320px; }

/* ============================================================
   15. UTILITY / GENERIC ANIMATIONS
   ============================================================ */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in-up { animation: fadeInUp var(--dur-slow) var(--ease) both; }

.copy-flash { animation: copyFlash 0.5s ease; }
@keyframes copyFlash { 0% { background: rgba(34,197,94,0.25); } 100% { background: transparent; } }

.pulse-ring { position: relative; }
.pulse-ring::before {
  content: '';
  position: absolute; inset: -4px;
  border-radius: inherit;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: pulseRing 1.6s ease-out infinite;
}
@keyframes pulseRing { 0% { opacity: 0.6; transform: scale(0.9); } 100% { opacity: 0; transform: scale(1.3); } }

.spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--border-1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.center-spinner { display: flex; align-items: center; justify-content: center; padding: 60px 0; }

/* ============================================================
   16. RESPONSIVE FINE-TUNING
   ============================================================ */
@media (max-width: 640px) {
  .page-title { font-size: 22px; }
  .modal-box { width: 100%; }
  .auth-type-grid { grid-template-columns: repeat(2, 1fr); }
  .row-action-btn span { display: none; }
  .form-section { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── BOOKMARK BUTTON ── */
#bookmarkMockBtn.bookmark-saved {
    color: var(--text);
    border-color: var(--border-2);
    background: var(--surface-2);
}

#bookmarkMockBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}