@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

:root {
  --font-persian: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* Theme Colors - Dark (Default) */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 55, 0.85);
  --bg-code: #070a11;
  --border-color: #1f293d;
  --border-light: #2d3748;

  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-link: #38bdf8;
  --text-link-hover: #0ea5e9;

  --accent-primary: #0284c7;
  --accent-secondary: #0ea5e9;
  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #38bdf8 50%, #818cf8 100%);
  --accent-glow: rgba(56, 189, 248, 0.15);

  --badge-get: #10b981;
  --badge-post: #3b82f6;
  --badge-model: #8b5cf6;
  --badge-enum: #f59e0b;
  --badge-filter: #ec4899;

  --sidebar-width: 290px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #f8fafc;
  --bg-code: #0f172a;
  --border-color: #e2e8f0;
  --border-light: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-link: #0284c7;
  --text-link-hover: #0369a1;

  --accent-primary: #0284c7;
  --accent-secondary: #0ea5e9;
  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  --accent-glow: rgba(2, 132, 199, 0.1);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-persian);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

[data-theme="light"] .top-header {
  background-color: rgba(255, 255, 255, 0.85);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.brand-title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.12);
  color: var(--text-link);
  border: 1px solid rgba(56, 189, 248, 0.25);
  direction: ltr;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-persian);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 220px;
}

.search-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.search-btn kbd {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-right: auto;
  direction: ltr;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.menu-toggle {
  display: none;
}

/* Layout */
.app-container {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  position: fixed;
  top: var(--header-height);
  right: 0;
  background-color: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  overflow-y: auto;
  padding: 24px 16px 40px;
  z-index: 40;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-group {
  margin-bottom: 24px;
}

.sidebar-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  padding: 6px 12px;
  margin-bottom: 6px;
}

.sidebar-links {
  list-style: none;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-bottom: 2px;
}

.sidebar-link-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-link:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: rgba(2, 132, 199, 0.12);
  color: var(--text-link);
  font-weight: 600;
  border-right: 3px solid var(--accent-primary);
}

.sidebar-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-right: var(--sidebar-width);
  padding: 40px 48px 80px;
  max-width: 1100px;
}

/* Typography & Hero */
.hero-section {
  padding: 32px 0 48px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 9999px;
  color: var(--text-link);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero-title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 780px;
  line-height: 1.8;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-persian);
  border: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-light);
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 32px 0 48px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.25s ease;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.12);
  color: var(--text-link);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Documentation Content Sections */
.doc-section {
  padding-top: 32px;
  margin-bottom: 64px;
}

.section-header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.section-title svg {
  color: var(--text-link);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

h3.sub-heading {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 36px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

h4.sub-sub-heading {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text-link);
}

p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 0.98rem;
}

/* Callout / Alert Cards */
.alert-card {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin: 20px 0;
  font-size: 0.92rem;
  line-height: 1.6;
  border-right: 4px solid;
}

.alert-info {
  background: rgba(56, 189, 248, 0.08);
  border-color: #38bdf8;
  color: #bae6fd;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: #f59e0b;
  color: #fde68a;
}

.alert-success {
  background: rgba(16, 185, 129, 0.08);
  border-color: #10b981;
  color: #a7f3d0;
}

.alert-card svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Code Blocks */
.code-container {
  position: relative;
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin: 20px 0 28px;
  overflow: hidden;
  direction: ltr;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.code-dots {
  display: flex;
  gap: 6px;
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.copy-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.copy-btn.copied {
  color: #10b981;
}

pre {
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.65;
  color: #e2e8f0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

p code, li code, td code {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  direction: ltr;
  display: inline-block;
  font-size: 0.84em;
  border: 1px solid rgba(56, 189, 248, 0.15);
}

/* Syntax Highlighting Simple Tokens */
.hl-kw { color: #f472b6; font-weight: 600; }
.hl-fn { color: #60a5fa; }
.hl-str { color: #34d399; }
.hl-num { color: #fbbf24; }
.hl-com { color: #64748b; font-style: italic; }
.hl-dec { color: #a78bfa; font-weight: 600; }
.hl-type { color: #38bdf8; }

/* API Parameter Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 20px 0 28px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

table.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: right;
}

table.doc-table th {
  background: var(--bg-tertiary);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

table.doc-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

table.doc-table tr:last-child td {
  border-bottom: none;
}

table.doc-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.badge-async { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-rpc { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.badge-req { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-opt { background: rgba(107, 114, 128, 0.15); color: #9ca3af; border: 1px solid rgba(107, 114, 128, 0.3); }

/* Search Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.modal-backdrop.open,
.modal-backdrop.active {
  display: flex;
}

.search-modal {
  width: 90%;
  max-width: 600px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.search-input-wrapper svg {
  color: var(--text-muted);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  font-family: var(--font-persian);
  font-size: 1.05rem;
  color: var(--text-primary);
  outline: none;
}

.search-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 10px 12px;
  list-style: none;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 4px;
}

.search-result-item:hover, .search-result-item.focused {
  background: var(--bg-tertiary);
  color: var(--text-link);
}

.search-result-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.search-result-category {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Footer */
.doc-footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text-link);
}


/* ==========================================================================
   Comprehensive Mobile & Responsive System
   ========================================================================== */

/* Mobile Backdrop Overlay */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body.sidebar-open {
  overflow: hidden !important;
  touch-action: none;
}

/* Tablet & Mobile Breakpoint (<= 960px) */
@media (max-width: 960px) {
  :root {
    --header-height: 60px;
  }

  .top-header {
    height: var(--header-height);
    padding: 0 16px;
    z-index: 100;
  }

  .menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: min(310px, 85vw);
    z-index: 99;
    padding: calc(var(--header-height) + 16px) 16px 40px;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-right: 0;
    padding: 32px 20px 80px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .search-btn {
    min-width: unset;
    padding: 8px 12px;
  }

  .search-btn span {
    display: none;
  }

  .search-btn kbd {
    display: none;
  }

  .hero-title {
    font-size: 2.25rem;
  }
}

/* Mobile Breakpoint (<= 640px) */
@media (max-width: 640px) {
  :root {
    --header-height: 56px;
  }

  .top-header {
    height: var(--header-height);
    padding: 0 12px;
  }

  .header-brand {
    gap: 8px;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
  }

  .brand-icon svg {
    width: 18px;
    height: 18px;
  }

  .brand-title {
    font-size: 1.1rem;
  }

  .brand-badge {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  .search-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: unset;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .main-content {
    padding: 20px 14px 60px;
  }

  .hero-section {
    padding: 16px 0 32px;
    margin-bottom: 32px;
  }

  .hero-badge {
    font-size: 0.78rem;
    padding: 5px 12px;
    margin-bottom: 14px;
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
  }

  .hero-title {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
  }

  .hero-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
    font-size: 0.92rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 24px;
  }

  .feature-card {
    padding: 16px 14px;
  }

  .feature-title {
    font-size: 1rem;
  }

  .feature-desc {
    font-size: 0.85rem;
  }

  .section-title {
    font-size: 1.35rem;
    gap: 8px;
  }

  .section-title svg {
    width: 20px;
    height: 20px;
  }

  .section-subtitle {
    font-size: 0.85rem;
  }

  .sub-heading {
    font-size: 1.15rem;
    margin-top: 28px;
    margin-bottom: 12px;
  }

  .code-container {
    margin: 14px 0 20px;
    border-radius: 10px;
    max-width: 100%;
  }

  .code-header {
    padding: 8px 12px;
    font-size: 0.72rem;
  }

  pre {
    padding: 14px 12px;
    font-size: 0.78rem;
    line-height: 1.55;
    max-width: 100%;
    overflow-x: auto;
  }

  .table-wrapper {
    margin: 14px 0 20px;
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table.doc-table {
    min-width: 480px;
    font-size: 0.82rem;
  }

  table.doc-table th, 
  table.doc-table td {
    padding: 8px 10px;
  }

  .alert-card {
    padding: 12px 14px;
    font-size: 0.86rem;
    gap: 10px;
    margin: 16px 0;
  }

  .search-modal {
    margin: 16px;
    max-height: 85vh;
    border-radius: var(--radius-lg);
  }

  .search-input-wrapper {
    padding: 12px 14px;
  }

  .search-input {
    font-size: 0.92rem;
  }

  .search-results {
    max-height: 320px;
  }

  .search-result-item {
    padding: 12px 14px;
  }

  .doc-footer {
    margin-top: 48px;
    padding-top: 24px;
    flex-direction: column;
    text-align: center;
    gap: 14px;
    font-size: 0.84rem;
  }

  .footer-links {
    justify-content: center;
    gap: 16px;
  }
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 9999px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Sidebar specific scrollbar */
.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
}

[data-theme="light"] .sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

/* Firefox Scrollbar Support */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}

.sidebar {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

[data-theme="light"] .sidebar {
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}
