/* ==========================================================================
   One-API Docs - Complete shadcn/ui Design System
   Engineered with HSL Tokens, Precision Typography, Radix Primitives Styling,
   and Responsive Modern Layouts (Dark & Light Theme).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

/* ==========================================================================
   1. shadcn/ui Design Tokens (HSL CSS Custom Properties)
   ========================================================================== */
:root {
  --font-sans: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* shadcn Zinc Light (Soft, eye-friendly neutral tones, prevents glare) */
  --background: 240 4.8% 96%;      /* #f4f4f5 - Calm neutral zinc background */
  --foreground: 240 5.9% 10%;      /* #18181b - Deep zinc text, easy on the eyes */

  --card: 0 0% 100%;               /* #ffffff - Crisp elevated card surface */
  --card-foreground: 240 5.9% 10%;

  --popover: 0 0% 100%;
  --popover-foreground: 240 5.9% 10%;

  --primary: 240 5.9% 10%;         /* #18181b - Solid dark zinc primary (classic shadcn) */
  --primary-foreground: 0 0% 98%;  /* #fafafa - Clean white text */

  --secondary: 240 4.8% 92%;       /* #e7e7eb - Subtle secondary surface */
  --secondary-foreground: 240 5.9% 10%;

  --muted: 240 4.8% 92%;
  --muted-foreground: 240 3.8% 46.1%; /* #71717a - Secondary/muted text */

  --accent: 240 4.8% 92%;
  --accent-foreground: 240 5.9% 10%;

  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;

  --border: 240 5.9% 88%;          /* #e0e0e4 - Soft subtle borders */
  --input: 240 5.9% 88%;
  --ring: 240 5.9% 10%;

  --radius: 0.625rem; /* 10px */

  /* Brand Accent (Subtle & Restrained) */
  --brand: 221.2 83.2% 53.3%;
  --brand-foreground: 210 40% 98%;
  --brand-subtle: 221.2 83.2% 53.3% / 0.08;

  /* Sidebar Tokens (Light) */
  --sidebar-background: 240 4.8% 94.5%; /* #f0f0f2 - Harmonious sidebar */
  --sidebar-foreground: 240 5.3% 26.1%;
  --sidebar-primary: 240 5.9% 10%;
  --sidebar-primary-foreground: 0 0% 98%;
  --sidebar-accent: 240 4.8% 90%;
  --sidebar-accent-foreground: 240 5.9% 10%;
  --sidebar-border: 240 5.9% 87%;
  --sidebar-ring: 240 5.9% 10%;

  /* Method Badges (Subtle, Muted, Refined shadcn micro-badges) */
  --method-get: 142.1 70% 32%;
  --method-get-bg: 142.1 70% 40% / 0.08;
  --method-get-border: 142.1 70% 40% / 0.22;

  --method-post: 221.2 75% 44%;
  --method-post-bg: 221.2 75% 48% / 0.08;
  --method-post-border: 221.2 75% 48% / 0.22;

  --method-put: 38 85% 40%;
  --method-put-bg: 38 85% 45% / 0.08;
  --method-put-border: 38 85% 45% / 0.22;

  --method-delete: 350 75% 46%;
  --method-delete-bg: 350 75% 50% / 0.08;
  --method-delete-border: 350 75% 50% / 0.22;

  --method-patch: 262.1 70% 46%;
  --method-patch-bg: 262.1 70% 50% / 0.08;
  --method-patch-border: 262.1 70% 50% / 0.22;

  /* Code & Terminal (Light Theme) */
  --code-bg: 240 5% 96%;
  --code-foreground: 240 6% 12%;
  --code-border: 240 5.9% 88%;
  --code-tab-bg: 240 4.8% 92%;
  --code-tab-active-bg: 0 0% 100%;
  --code-pre-bg: 0 0% 100%;

  /* Syntax Highlighting Tokens (Light Theme) */
  --json-key: #0284c7;
  --json-string: #16a34a;
  --json-number: #d97706;
  --json-bool: #db2777;
  --json-null: #64748b;

  /* Compatibility Aliases */
  --text-primary: hsl(var(--foreground));
  --text-secondary: hsl(var(--muted-foreground));
  --text-muted: hsl(var(--muted-foreground));
  --bg-surface: hsl(var(--card));
  --bg-surface-elevated: hsl(var(--secondary));
  --border-medium: hsl(var(--border));
  --border-subtle: hsl(var(--border) / 0.6);
  --accent-emerald: hsl(142.1 70% 32%);
  --accent-amber: hsl(38 85% 40%);
  --accent-rose: hsl(350 75% 46%);

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.16);

  --header-height: 64px;
  --sidebar-width: 290px;
}

/* shadcn Dark Theme (Zinc deep modern aesthetic, soft on the eyes) */
[data-theme="dark"], .dark {
  /* shadcn Zinc Dark (Soft, eye-friendly deep neutral, no harsh pitch black) */
  --background: 240 6% 9%;        /* #16161a - Gentle deep zinc surface, comfortable on eyes */
  --foreground: 240 5% 90%;       /* #e4e4e7 - Soft light zinc text, prevents glare */

  --card: 240 5% 12.5%;           /* #1f1f23 - Clean elevated card surface */
  --card-foreground: 240 5% 92%;

  --popover: 240 5% 13.5%;        /* #222226 */
  --popover-foreground: 240 5% 92%;

  --primary: 0 0% 98%;            /* #fafafa - White/light primary button in dark mode (classic shadcn) */
  --primary-foreground: 240 5.9% 10%; /* #18181b - Dark text inside primary button */

  --secondary: 240 4% 17%;        /* #2a2a2f - Secondary neutral surface */
  --secondary-foreground: 240 5% 90%;

  --muted: 240 4% 17%;
  --muted-foreground: 240 5% 64%; /* #9ea0a8 - Muted, readable text */

  --accent: 240 4% 18%;           /* #2d2d33 */
  --accent-foreground: 0 0% 98%;

  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;

  --border: 240 4% 18%;           /* #2c2c31 - Soft border */
  --input: 240 4% 18%;
  --ring: 240 5% 85%;

  --brand: 217.2 91.2% 59.8%;
  --brand-foreground: 222.2 47.4% 11.2%;
  --brand-subtle: 217.2 91.2% 59.8% / 0.12;

  /* Sidebar Tokens (Dark) */
  --sidebar-background: 240 6% 7.5%; /* #121215 */
  --sidebar-foreground: 240 5% 80%;
  --sidebar-primary: 0 0% 98%;
  --sidebar-primary-foreground: 240 5.9% 10%;
  --sidebar-accent: 240 4% 15%;
  --sidebar-accent-foreground: 0 0% 98%;
  --sidebar-border: 240 4% 16%;
  --sidebar-ring: 240 5% 85%;

  /* Method Badges (Dark Mode - Soft muted micro-badges) */
  --method-get: 142.1 65% 50%;
  --method-get-bg: 142.1 65% 50% / 0.12;
  --method-get-border: 142.1 65% 50% / 0.28;

  --method-post: 217.2 75% 62%;
  --method-post-bg: 217.2 75% 62% / 0.12;
  --method-post-border: 217.2 75% 62% / 0.28;

  --method-put: 38 85% 55%;
  --method-put-bg: 38 85% 55% / 0.12;
  --method-put-border: 38 85% 55% / 0.28;

  --method-delete: 350 72% 58%;
  --method-delete-bg: 350 72% 58% / 0.12;
  --method-delete-border: 350 72% 58% / 0.28;

  --method-patch: 263.4 68% 62%;
  --method-patch-bg: 263.4 68% 62% / 0.12;
  --method-patch-border: 263.4 68% 62% / 0.28;

  /* Code & Terminal (Dark Theme) */
  --code-bg: 240 6% 7.5%;
  --code-foreground: 240 5% 90%;
  --code-border: 240 4% 16%;
  --code-tab-bg: 240 6% 6%;
  --code-tab-active-bg: 240 4% 14%;
  --code-pre-bg: 240 6% 7.5%;

  /* Syntax Highlighting Tokens (Dark Theme) */
  --json-key: #60a5fa;
  --json-string: #34d399;
  --json-number: #fbbf24;
  --json-bool: #f472b6;
  --json-null: #94a3b8;

  /* Compatibility Aliases */
  --text-primary: hsl(var(--foreground));
  --text-secondary: hsl(var(--muted-foreground));
  --text-muted: hsl(var(--muted-foreground));
  --bg-surface: hsl(var(--card));
  --bg-surface-elevated: hsl(var(--secondary));
  --border-medium: hsl(var(--border));
  --border-subtle: hsl(var(--border) / 0.6);
  --accent-emerald: hsl(142.1 65% 50%);
  --accent-amber: hsl(38 85% 55%);
  --accent-rose: hsl(350 72% 58%);

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.35), 0 1px 2px -1px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.35), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.25);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.45), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
}

/* ==========================================================================
   2. Reset & Base Typography
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

button {
  font-family: inherit;
  border: none;
  background: transparent;
  cursor: pointer;
  color: inherit;
  padding: 0;
}

input, textarea, select {
  font-family: inherit;
  color: inherit;
}

code, pre, kbd {
  font-family: var(--font-mono);
  direction: ltr;
  text-align: left;
}

/* Direction Utilities */
.text-ltr {
  direction: ltr !important;
  text-align: left !important;
}

.text-rtl {
  direction: rtl !important;
  text-align: right !important;
}

/* Sleek Minimalist Scrollbars (shadcn style) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--muted-foreground) / 0.25);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground) / 0.4);
}

/* ==========================================================================
   3. shadcn/ui Component Primitives
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  height: 2.375rem;
  padding: 0 1rem;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  border: 1px solid transparent;
  user-select: none;
  text-decoration: none;
}

.btn:focus-visible {
  ring: 2px solid hsl(var(--ring));
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.btn:active {
  transform: scale(0.98);
}

/* Button Variants */
.btn-default,
.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: var(--shadow-xs);
}

.btn-default:hover,
.btn-primary:hover {
  background-color: hsl(var(--primary) / 0.9);
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
  background-color: hsl(var(--secondary) / 0.8);
}

.btn-outline {
  border-color: hsl(var(--border));
  background-color: transparent;
  color: hsl(var(--foreground));
}

.btn-outline:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.btn-ghost {
  background-color: transparent;
  color: hsl(var(--foreground));
}

.btn-ghost:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.btn-destructive {
  background-color: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.btn-destructive:hover {
  background-color: hsl(var(--destructive) / 0.9);
}

.btn-brand {
  background-color: hsl(var(--brand));
  color: hsl(var(--brand-foreground));
  box-shadow: var(--shadow-xs);
}

.btn-brand:hover {
  background-color: hsl(var(--brand) / 0.9);
}

/* Button Sizes */
.btn-sm {
  height: 2rem; /* 32px */
  padding: 0 0.75rem;
  font-size: 0.8125rem;
  border-radius: calc(var(--radius) - 2px);
}

.btn-md,
.btn-default-size {
  height: 2.375rem; /* 38px */
  padding: 0 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  height: 2.75rem; /* 44px */
  padding: 0 1.5rem;
  font-size: 0.9375rem;
}

.btn-icon {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: calc(var(--radius) - 1px);
}

.btn-icon-sm {
  width: 1.875rem;
  height: 1.875rem;
  padding: 0;
  border-radius: calc(var(--radius) - 2px);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--border));
  padding: 0.15rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.badge-default {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: transparent;
}

.badge-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-color: transparent;
}

.badge-outline {
  background-color: transparent;
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
}

.badge-brand {
  background-color: hsl(var(--brand-subtle));
  color: hsl(var(--brand));
  border-color: hsl(var(--brand) / 0.3);
}

.badge-destructive {
  background-color: hsl(var(--destructive) / 0.12);
  color: hsl(var(--destructive));
  border-color: hsl(var(--destructive) / 0.25);
}

.badge-success {
  background-color: hsl(142.1 76.2% 36.3% / 0.12);
  color: hsl(142.1 76.2% 36.3%);
  border-color: hsl(142.1 76.2% 36.3% / 0.25);
}

/* HTTP Method Badges (shadcn micro-badges) */
.method-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.5rem;
  border-radius: calc(var(--radius) - 3px);
  text-transform: uppercase;
  line-height: 1;
  border: 1px solid transparent;
  direction: ltr;
}

.method-tag.get {
  background-color: hsl(var(--method-get-bg));
  color: hsl(var(--method-get));
  border-color: hsl(var(--method-get-border));
}

.method-tag.post {
  background-color: hsl(var(--method-post-bg));
  color: hsl(var(--method-post));
  border-color: hsl(var(--method-post-border));
}

.method-tag.put {
  background-color: hsl(var(--method-put-bg));
  color: hsl(var(--method-put));
  border-color: hsl(var(--method-put-border));
}

.method-tag.delete {
  background-color: hsl(var(--method-delete-bg));
  color: hsl(var(--method-delete));
  border-color: hsl(var(--method-delete-border));
}

.method-tag.patch {
  background-color: hsl(var(--method-patch-bg));
  color: hsl(var(--method-patch));
  border-color: hsl(var(--method-patch-border));
}

/* Cards (shadcn Card Primitive) */
.card {
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: hsl(var(--border) / 0.8);
}

.card-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.25rem 0.75rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: hsl(var(--card-foreground));
}

.card-description {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

.card-content {
  padding: 1.25rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem 1.25rem;
}

/* Inputs, Selects, and Textareas */
.input,
.search-input,
.param-input-control {
  display: flex;
  width: 100%;
  height: 2.375rem; /* 38px */
  border-radius: var(--radius);
  border: 1px solid hsl(var(--input));
  background-color: transparent;
  padding: 0 0.875rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.input:focus,
.search-input:focus,
.param-input-control:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 1px hsl(var(--ring));
}

.input::placeholder,
.search-input::placeholder,
.param-input-control::placeholder {
  color: hsl(var(--muted-foreground));
  opacity: 0.7;
}

.param-select-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
  padding-left: 2.25rem !important;
  cursor: pointer;
}

[dir="rtl"] .param-select-control {
  background-position: left 0.75rem center;
}

.param-select-control option {
  background-color: hsl(var(--popover));
  color: hsl(var(--popover-foreground));
}

.textarea,
.json-body-textarea {
  display: flex;
  width: 100%;
  min-height: 100px;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--code-bg));
  color: hsl(var(--code-foreground));
  padding: 0.75rem 0.875rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.textarea:focus,
.json-body-textarea:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 1px hsl(var(--ring));
}

.param-input-invalid {
  border-color: hsl(var(--destructive)) !important;
}

.param-input-invalid:focus {
  box-shadow: 0 0 0 1px hsl(var(--destructive)) !important;
}

.param-type-error {
  font-size: 0.75rem;
  color: hsl(var(--destructive));
  margin-top: 0.35rem;
  font-weight: 500;
}

/* Tabs (shadcn Tabs Primitive) */
.tabs-list {
  display: inline-flex;
  height: 2.375rem;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--radius) - 1px);
  background-color: hsl(var(--muted));
  padding: 0.25rem;
  color: hsl(var(--muted-foreground));
  user-select: none;
}

.tabs-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: calc(var(--radius) - 3px);
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.15s ease;
  color: hsl(var(--muted-foreground));
  background: transparent;
  cursor: pointer;
}

.tabs-trigger:hover {
  color: hsl(var(--foreground));
}

.tabs-trigger.active,
.tabs-trigger[data-state="active"] {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  box-shadow: var(--shadow-xs);
  font-weight: 600;
}

/* ==========================================================================
   4. Top App Header & Navigation
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  height: var(--header-height);
  border-bottom: 1px solid hsl(var(--border));
  background-color: hsl(var(--background) / 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-container {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo-wrap {
  width: 2.375rem;
  height: 2.375rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--muted) / 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform 0.15s ease;
}

.brand-section:hover .brand-logo-wrap {
  transform: scale(1.04);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: hsl(var(--foreground));
  letter-spacing: -0.02em;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 9999px;
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border: 1px solid hsl(var(--border));
  font-family: var(--font-mono);
}

.brand-subtitle {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  font-family: var(--font-mono);
  direction: ltr;
  text-align: right;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.84rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: all 0.15s ease;
  text-decoration: none;
}

.nav-btn:hover {
  color: hsl(var(--foreground));
  background-color: hsl(var(--accent));
}

.nav-btn svg {
  flex-shrink: 0;
  opacity: 0.8;
}

/* API Token Setup Button */
.token-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.125rem;
  padding: 0 0.875rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--secondary) / 0.5);
  color: hsl(var(--secondary-foreground));
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.token-btn:hover {
  background-color: hsl(var(--secondary));
  border-color: hsl(var(--border) / 0.8);
}

.token-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: hsl(var(--muted-foreground) / 0.5);
  transition: all 0.2s ease;
}

.token-btn.has-token .token-dot {
  background-color: hsl(142.1 76.2% 36.3%);
  box-shadow: 0 0 8px hsl(142.1 76.2% 36.3% / 0.5);
}

.theme-toggle-btn,
.mobile-hamburger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background-color: transparent;
  color: hsl(var(--foreground));
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover,
.mobile-hamburger-btn:hover {
  background-color: hsl(var(--accent));
}

.mobile-hamburger-btn {
  display: none;
}

/* ==========================================================================
   5. Mobile Drawer / Sheet (shadcn Sheet Primitive)
   ========================================================================== */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 51;
  width: 300px;
  max-width: 85vw;
  background-color: hsl(var(--background));
  border-left: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-2xl);
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.mobile-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid hsl(var(--border));
}

.drawer-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  color: hsl(var(--muted-foreground));
  transition: color 0.15s ease, background-color 0.15s ease;
}

.drawer-close-btn:hover {
  color: hsl(var(--foreground));
  background-color: hsl(var(--accent));
}

.drawer-body {
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-y: auto;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: all 0.15s ease;
}

.drawer-link:hover {
  color: hsl(var(--foreground));
  background-color: hsl(var(--accent));
}

.drawer-divider {
  height: 1px;
  background-color: hsl(var(--border));
  margin: 0.75rem 0;
}

.drawer-token-btn {
  width: 100%;
  justify-content: center;
  height: 2.375rem;
}

/* ==========================================================================
   6. Main View Container & Dynamic Root
   ========================================================================== */
#app-root {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Loading Spinner */
.spinner {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   7. VIEW 1: Catalog (Hero & Services Grid)
   ========================================================================== */
.catalog-view {
  max-width: 1360px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  width: 100%;
}

/* Catalog Hero Section */
.catalog-hero {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.catalog-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.85rem;
  border-radius: 9999px;
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border: 1px solid hsl(var(--border));
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-xs);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.0625rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.7;
  margin-bottom: 2rem;
  font-weight: 400;
}

/* Search Container */
.search-container {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  right: 0.875rem;
  color: hsl(var(--muted-foreground));
  pointer-events: none;
  display: flex;
  align-items: center;
}

.search-input {
  height: 2.75rem;
  padding-right: 2.75rem;
  padding-left: 2.75rem;
  font-size: 0.9375rem;
  border-radius: var(--radius);
  background-color: hsl(var(--card));
  box-shadow: var(--shadow-sm);
}

.search-clear-btn {
  position: absolute;
  left: 0.75rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: hsl(var(--muted-foreground));
  transition: all 0.15s ease;
}

.search-clear-btn:hover {
  color: hsl(var(--foreground));
  background-color: hsl(var(--muted));
}

.catalog-count-badge {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  text-align: center;
  font-weight: 500;
}

/* Services Grid */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* Service Card (shadcn Card Primitive) */
.service-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  text-decoration: none;
}

.service-card:hover {
  border-color: hsl(var(--foreground) / 0.25);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.875rem;
}

.card-body {
  margin-bottom: 1.25rem;
}

.card-title-wrap {
  margin-bottom: 0.625rem;
}

.card-main-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: hsl(var(--card-foreground));
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.card-slug-mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  direction: ltr;
  text-align: left;
  margin-top: 0.2rem;
}

.card-description {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 0.875rem;
  border-top: 1px solid hsl(var(--border) / 0.6);
}

.card-footer-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  transition: all 0.15s ease;
}

.service-card:hover .card-footer-action {
  gap: 0.6rem;
  color: hsl(var(--foreground));
}

.card-footer-action svg {
  transition: transform 0.15s ease;
}

.service-card:hover .card-footer-action svg {
  transform: translateX(-3px);
}

/* ==========================================================================
   8. VIEW 2: Interactive Docs Workspace (Sidebar + Content Stack)
   ========================================================================== */
.docs-workspace {
  display: flex;
  min-height: calc(100vh - var(--header-height));
  width: 100%;
  position: relative;
}

.docs-workspace.sidebar-collapsed {
  justify-content: center;
}

/* Sidebar (shadcn Sidebar Primitive) */
.docs-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background-color: hsl(var(--sidebar-background));
  border-left: 1px solid hsl(var(--sidebar-border));
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 30;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.docs-workspace.sidebar-collapsed .docs-sidebar {
  width: 0;
  overflow: hidden;
  border-left-color: transparent;
}

/* Sidebar Edge Toggle Button (Centered vertically on the menu height) */
.sidebar-edge-toggle-btn {
  position: fixed;
  top: calc(var(--header-height) + (100vh - var(--header-height)) / 2);
  right: calc(var(--sidebar-width) - 16px);
  transform: translateY(-50%);
  z-index: 45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  height: 2.25rem;
  padding: 0 0.55rem;
  border-radius: 9999px;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: right 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-edge-toggle-btn:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  box-shadow: var(--shadow-lg);
  transform: translateY(-50%) scale(1.05);
}

.sidebar-edge-toggle-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.sidebar-chevron-collapse {
  display: block;
}

.sidebar-chevron-expand {
  display: none;
}

.docs-workspace.sidebar-collapsed .sidebar-edge-toggle-btn {
  right: 0.75rem;
}

.docs-workspace.sidebar-collapsed .sidebar-chevron-collapse {
  display: none;
}

.docs-workspace.sidebar-collapsed .sidebar-chevron-expand {
  display: block;
}

/* Sidebar Header & Search */
.sidebar-header {
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid hsl(var(--sidebar-border));
}

.sidebar-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sidebar-search-input {
  height: 2rem;
  font-size: 0.8125rem;
  padding-right: 2.25rem;
  padding-left: 0.75rem;
  background-color: hsl(var(--background));
  border: 1px solid hsl(var(--sidebar-border));
  border-radius: calc(var(--radius) - 2px);
  width: 100%;
  color: hsl(var(--foreground));
  outline: none;
  transition: border-color 0.15s ease;
}

.sidebar-search-input:focus {
  border-color: hsl(var(--ring));
}

.sidebar-search-icon {
  position: absolute;
  right: 0.65rem;
  color: hsl(var(--muted-foreground));
  pointer-events: none;
  display: flex;
  align-items: center;
}

/* Sidebar Nav Tree */
.sidebar-nav {
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
}

.nav-tag-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-tag-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--muted-foreground));
  user-select: none;
}

.nav-tag-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 9999px;
  background-color: hsl(var(--sidebar-accent));
  color: hsl(var(--muted-foreground));
  font-size: 0.6875rem;
  font-family: var(--font-mono);
}

.nav-endpoint-item {
  display: flex;
  align-items: center;
  justify-content: flex-start !important;
  direction: ltr !important;
  text-align: left !important;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.8125rem;
  color: hsl(var(--sidebar-foreground));
  transition: all 0.15s ease;
  text-decoration: none;
  width: 100%;
}

.nav-endpoint-item:hover {
  background-color: hsl(var(--sidebar-accent));
  color: hsl(var(--sidebar-accent-foreground));
}

.nav-endpoint-item.active {
  background-color: hsl(var(--sidebar-accent));
  color: hsl(var(--foreground));
  font-weight: 600;
}

.nav-endpoint-name {
  font-family: var(--font-mono);
  direction: ltr !important;
  text-align: left !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* Sidebar Backdrop on Mobile */
.sidebar-mobile-backdrop {
  display: none;
}

/* Main Content Area */
.docs-content-area {
  flex: 1;
  min-width: 0;
  padding: 2rem 2.5rem 6rem;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.docs-workspace.sidebar-collapsed .docs-content-area {
  margin: 0 auto;
  max-width: 1100px;
}

/* Header Banner of Service */
.doc-header-banner {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-xs);
  margin-bottom: 2.5rem;
}

.doc-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.25rem;
}

.breadcrumb-link {
  color: hsl(var(--muted-foreground));
  transition: color 0.15s ease;
}

.breadcrumb-link:hover {
  color: hsl(var(--foreground));
}

.doc-hero-meta {
  margin-bottom: 1.5rem;
}

.doc-title-h1 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: hsl(var(--foreground));
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.doc-version-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  direction: ltr;
}

.version-badge {
  padding: 0.12rem 0.5rem;
  border-radius: calc(var(--radius) - 3px);
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border: 1px solid hsl(var(--border));
  font-size: 0.75rem;
  font-weight: 600;
}

.doc-description-text {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.7;
  margin-top: 0.875rem;
}

.doc-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid hsl(var(--border));
}

.doc-server-url-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  background-color: hsl(var(--muted) / 0.5);
  border: 1px solid hsl(var(--border));
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: hsl(var(--foreground));
  direction: ltr;
}

.server-url-text {
  user-select: all;
}

.copy-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: calc(var(--radius) - 3px);
  color: hsl(var(--muted-foreground));
  transition: all 0.15s ease;
}

.copy-mini-btn:hover {
  color: hsl(var(--foreground));
  background-color: hsl(var(--accent));
}

/* ==========================================================================
   9. Endpoints List & Cards (Vertical Stack)
   ========================================================================== */
.endpoints-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.endpoint-section {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.endpoint-section:hover {
  border-color: hsl(var(--border) / 0.9);
}

.endpoint-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start !important;
  border-bottom: 1px solid hsl(var(--border));
  background-color: hsl(var(--secondary) / 0.55);
  direction: ltr !important;
  text-align: left !important;
}

.endpoint-title-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start !important;
  gap: 0.75rem;
  flex-wrap: wrap;
  direction: ltr !important;
  text-align: left !important;
  width: 100%;
}

.endpoint-path-url {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  direction: ltr !important;
  text-align: left !important;
}

.endpoint-description-box {
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
  border-bottom: 1px solid hsl(var(--border) / 0.6);
}

/* Parameters Block */
.endpoint-params-block {
  padding: 1.5rem;
}

.section-subheading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 1.25rem;
}

.params-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.param-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--background));
}

.param-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.param-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
}

.param-name {
  font-weight: 700;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
}

.param-badge-type {
  font-size: 0.6875rem;
  padding: 0.1rem 0.4rem;
  border-radius: calc(var(--radius) - 3px);
  background-color: hsl(var(--secondary));
  color: hsl(var(--muted-foreground));
  border: 1px solid hsl(var(--border));
}

.param-in-badge {
  font-size: 0.6875rem;
  color: hsl(var(--muted-foreground));
}

.param-badge-required {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background-color: hsl(var(--destructive) / 0.1);
  color: hsl(var(--destructive));
  border: 1px solid hsl(var(--destructive) / 0.2);
}

.param-badge-optional {
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background-color: hsl(var(--secondary));
  color: hsl(var(--muted-foreground));
}

.param-desc {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

/* Multipart & File Dropzone */
.endpoint-multipart-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid hsl(var(--border));
}

.multipart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.multipart-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.multipart-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 0.15rem 0.5rem;
  border-radius: calc(var(--radius) - 3px);
  background-color: hsl(var(--secondary));
  color: hsl(var(--muted-foreground));
  border: 1px solid hsl(var(--border));
}

.file-dropzone {
  border: 2px dashed hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  background-color: hsl(var(--muted) / 0.2);
  cursor: pointer;
  transition: all 0.15s ease;
}

.file-dropzone:hover,
.file-dropzone.drag-over {
  border-color: hsl(var(--ring));
  background-color: hsl(var(--muted) / 0.4);
}

.dropzone-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.dropzone-icon {
  color: hsl(var(--muted-foreground));
}

.dropzone-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8125rem;
}

.dropzone-prompt {
  color: hsl(var(--foreground));
}

.dropzone-subtext {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

.dropzone-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background-color: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
}

.selected-file-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.selected-file-icon {
  color: hsl(var(--brand));
}

.selected-file-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.selected-file-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  font-family: var(--font-mono);
}

.selected-file-size {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  font-family: var(--font-mono);
}

.btn-remove-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: calc(var(--radius) - 3px);
  color: hsl(var(--destructive));
  transition: all 0.15s ease;
}

.btn-remove-file:hover {
  background-color: hsl(var(--destructive) / 0.1);
}

/* Try-It-Out Action Button */
.try-btn-wrapper {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.btn-send-request {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.6875rem 1.75rem;
  min-height: 2.625rem;
  border-radius: var(--radius);
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground)) !important;
  border: 1px solid hsl(var(--primary));
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}

.btn-send-request svg {
  fill: currentColor;
  color: inherit;
  transition: transform 0.15s ease;
}

.btn-send-request:hover {
  background-color: hsl(var(--primary) / 0.9);
  border-color: hsl(var(--primary) / 0.9);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-send-request:hover svg {
  transform: scale(1.08);
}

.btn-send-request:active {
  transform: translateY(0) scale(0.98);
}

.btn-send-request:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

/* Explicit Light Mode (Dark button with white text) */
:root .btn-send-request,
[data-theme="light"] .btn-send-request {
  background-color: #18181b;
  color: #fafafa !important;
  border-color: #18181b;
}

:root .btn-send-request:hover,
[data-theme="light"] .btn-send-request:hover {
  background-color: #27272a;
  border-color: #27272a;
}

/* Explicit Dark Mode (White button with dark text) */
[data-theme="dark"] .btn-send-request,
.dark .btn-send-request {
  background-color: #fafafa;
  color: #18181b !important;
  border-color: #fafafa;
}

[data-theme="dark"] .btn-send-request:hover,
.dark .btn-send-request:hover {
  background-color: #f4f4f5;
  border-color: #f4f4f5;
}

/* ==========================================================================
   10. Code Snippets & Response Console (Terminal Block)
   ========================================================================== */
.endpoint-code-block {
  border-top: 1px solid hsl(var(--border));
  background-color: hsl(var(--code-bg));
  color: hsl(var(--code-foreground));
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  overflow: hidden;
}

/* Code Tabs Header */
.code-tabs-header {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid hsl(var(--code-border));
  background-color: hsl(var(--code-tab-bg));
  overflow-x: auto;
}

.lang-tab-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: calc(var(--radius) - 3px);
  font-size: 0.75rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  background: transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: var(--font-mono);
  border: 1px solid transparent;
  cursor: pointer;
}

.lang-tab-btn:hover {
  color: hsl(var(--code-foreground));
  background-color: hsl(var(--muted) / 0.4);
}

.lang-tab-btn.active {
  color: hsl(var(--code-foreground));
  background-color: hsl(var(--code-tab-active-bg));
  border-color: hsl(var(--code-border));
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

/* Code Preview Block */
.code-block-wrapper {
  position: relative;
  padding: 1.25rem 1.5rem;
  background-color: hsl(var(--code-pre-bg));
}

.code-copy-btn {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: calc(var(--radius) - 3px);
  border: 1px solid hsl(var(--code-border));
  background-color: hsl(var(--card));
  color: hsl(var(--code-foreground));
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
}

.code-copy-btn:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  border-color: hsl(var(--border));
}

.code-pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  overflow-x: auto;
  color: hsl(var(--code-foreground));
  white-space: pre-wrap;
  word-break: break-all;
}

/* Response Console Viewer */
.response-console {
  border-top: 1px solid hsl(var(--code-border));
  background-color: hsl(var(--code-pre-bg));
}

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1.5rem;
  border-bottom: 1px solid hsl(var(--code-border));
  background-color: hsl(var(--code-tab-bg));
}

.console-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.response-time-badge,
.response-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: calc(var(--radius) - 3px);
  font-size: 0.6875rem;
  font-weight: 600;
  font-family: var(--font-mono);
  border: 1px solid transparent;
}

.response-status-badge.status-2xx {
  background-color: hsl(142.1 76.2% 36.3% / 0.15);
  color: hsl(142.1 76.2% 36.3%);
  border-color: hsl(142.1 76.2% 36.3% / 0.3);
}

.response-status-badge.status-4xx {
  background-color: hsl(38 92% 50% / 0.15);
  color: hsl(38 92% 50%);
  border-color: hsl(38 92% 50% / 0.3);
}

.response-status-badge.status-5xx {
  background-color: hsl(0 84.2% 60.2% / 0.15);
  color: hsl(0 84.2% 60.2%);
  border-color: hsl(0 84.2% 60.2% / 0.3);
}

.console-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: calc(var(--radius) - 3px);
  border: 1px solid hsl(var(--code-border));
  background-color: hsl(var(--card));
  color: hsl(var(--muted-foreground));
  font-size: 0.6875rem;
  transition: all 0.15s ease;
  cursor: pointer;
}

.console-copy-btn:hover {
  color: hsl(var(--code-foreground));
  background-color: hsl(var(--accent));
  border-color: hsl(var(--border));
}

.console-body {
  padding: 1.25rem 1.5rem;
  min-height: 80px;
  max-height: 480px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  background-color: hsl(var(--code-pre-bg));
  color: hsl(var(--code-foreground));
}

.console-placeholder {
  color: hsl(var(--muted-foreground));
  font-style: italic;
  font-size: 0.8125rem;
}

/* Syntax Highlighting in Response */
.json-key { color: var(--json-key, #0369a1); font-weight: 600; }
.json-string { color: var(--json-string, #15803d); }
.json-number { color: var(--json-number, #b45309); }
.json-bool { color: var(--json-bool, #be185d); font-weight: 600; }
.json-null { color: var(--json-null, #64748b); font-style: italic; }

/* Media Response Viewers (Audio, Image, Video, PDF) */
.media-response-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.25rem;
}

.media-response-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.media-type-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.media-icon-badge {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: calc(var(--radius) - 2px);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: hsl(var(--secondary));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
}

.media-meta-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.media-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.media-badges-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.media-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 0.1rem 0.4rem;
  border-radius: calc(var(--radius) - 4px);
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.media-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-media-download,
.btn-media-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2rem;
  padding: 0 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.15s ease;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.btn-media-download:hover,
.btn-media-secondary:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.audio-player-element {
  width: 100%;
  height: 38px;
  outline: none;
}

.image-preview-element,
.video-preview-element {
  max-width: 100%;
  max-height: 420px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border));
  object-fit: contain;
  background-color: #000;
}

/* ==========================================================================
   11. Expected Responses & Schema Accordion (shadcn Accordion Primitive)
   ========================================================================== */
.endpoint-responses-tab {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid hsl(var(--border));
}

.schema-accordion-item {
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  margin-bottom: 0.625rem;
  overflow: hidden;
}

.schema-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: hsl(var(--muted) / 0.3);
  cursor: pointer;
  user-select: none;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background-color 0.15s ease;
}

.schema-accordion-header:hover {
  background-color: hsl(var(--muted) / 0.6);
}

.schema-accordion-header svg {
  transition: transform 0.2s ease;
  color: hsl(var(--muted-foreground));
}

.schema-accordion-content {
  padding: 1rem;
  background-color: hsl(var(--background));
  border-top: 1px solid hsl(var(--border));
}

/* ==========================================================================
   12. Token Management Dialog (shadcn Dialog Primitive)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 500px;
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-2xl);
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid hsl(var(--border));
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.modal-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: calc(var(--radius) - 2px);
  color: hsl(var(--muted-foreground));
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  color: hsl(var(--foreground));
  background-color: hsl(var(--accent));
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-input-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.modal-input {
  width: 100%;
  height: 2.375rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--input));
  background-color: transparent;
  padding: 0 0.875rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
  direction: ltr;
  font-family: var(--font-mono);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modal-input:focus {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 1px hsl(var(--ring));
}

.modal-hint {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}

.modal-footer {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  border-top: 1px solid hsl(var(--border));
  background-color: hsl(var(--muted) / 0.2);
}

/* ==========================================================================
   13. Toast Notifications (shadcn Sonner Primitive)
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 500;
  animation: toast-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   14. Floating Back to Top Button
   ========================================================================== */
.back-to-top-btn {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 35;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.back-to-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top-btn:hover {
  background-color: hsl(var(--accent));
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* ==========================================================================
   15. App Footer
   ========================================================================== */
.app-footer {
  border-top: 1px solid hsl(var(--border));
  background-color: hsl(var(--background));
  padding: 2rem 1.5rem;
  margin-top: auto;
}

.footer-content {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.84rem;
  color: hsl(var(--muted-foreground));
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-links a:hover {
  color: hsl(var(--foreground));
  text-decoration: underline;
}

/* ==========================================================================
   16. VIEW 3: 404 Not Found
   ========================================================================== */
.not-found-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  min-height: calc(100vh - var(--header-height));
  width: 100%;
}

body > .not-found-view {
  min-height: 100vh;
}

.not-found-code {
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  color: hsl(var(--muted-foreground) / 0.3);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.not-found-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
  margin-bottom: 0.75rem;
}

.not-found-desc {
  font-size: 0.9375rem;
  color: hsl(var(--muted-foreground));
  max-width: 480px;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.not-found-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.not-found-actions .btn {
  height: 2.625rem;
  padding: 0 1.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.not-found-actions .btn-default {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground)) !important;
  border: 1px solid hsl(var(--primary));
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}

.not-found-actions .btn-default:hover {
  background-color: hsl(var(--primary) / 0.9);
  border-color: hsl(var(--primary) / 0.9);
  transform: translateY(-1px);
}

/* ==========================================================================
   17. Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 260px;
  }

  .docs-content-area {
    padding: 1.5rem 1.5rem 5rem;
  }
}

@media (max-width: 992px) {
  .header-nav-links {
    display: none;
  }

  .mobile-hamburger-btn {
    display: inline-flex;
  }

  .docs-sidebar {
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    right: 0;
    width: 290px;
    max-width: 85vw;
    transform: translateX(100%);
    box-shadow: var(--shadow-2xl);
    z-index: 50;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .docs-workspace.sidebar-mobile-open .docs-sidebar {
    transform: translateX(0);
  }

  .sidebar-edge-toggle-btn {
    display: inline-flex;
    position: fixed;
    top: calc(var(--header-height) + (100vh - var(--header-height)) / 2);
    transform: translateY(-50%);
    right: 0.5rem;
    left: auto;
    z-index: 55;
    transition: right 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  }

  /* Default on mobile: sidebar is closed -> show expand chevron */
  .sidebar-chevron-collapse {
    display: none;
  }

  .sidebar-chevron-expand {
    display: block;
  }

  /* When open on mobile: attach button to sidebar edge and show collapse chevron */
  .docs-workspace.sidebar-mobile-open .sidebar-edge-toggle-btn {
    right: calc(min(290px, 85vw) - 16px);
  }

  .docs-workspace.sidebar-mobile-open .sidebar-chevron-collapse {
    display: block;
  }

  .docs-workspace.sidebar-mobile-open .sidebar-chevron-expand {
    display: none;
  }

  .sidebar-mobile-backdrop {
    position: fixed;
    inset: 0;
    top: var(--header-height);
    z-index: 45;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .docs-workspace.sidebar-mobile-open .sidebar-mobile-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 1.875rem;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .doc-title-h1 {
    font-size: 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
