/* ==========================================================================
   QAS Documentação v2 — Design System & Folha de Estilos
   Responsivo, Moderno, Modo Claro/Escuro e Otimizado para Leitura
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Cores - Modo Claro */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  --accent-primary: #0284c7;       /* Sky/Blue profissional */
  --accent-primary-hover: #0369a1;
  --accent-subtle: #e0f2fe;

  --emerald-bg: #ecfdf5;
  --emerald-border: #a7f3d0;
  --emerald-text: #065f46;

  --blue-bg: #eff6ff;
  --blue-border: #bfdbfe;
  --blue-text: #1e40af;

  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
  --amber-text: #92400e;

  --rose-bg: #fff1f2;
  --rose-border: #fecdd3;
  --rose-text: #9f1239;

  --indigo-bg: #eef2ff;
  --indigo-border: #c7d2fe;
  --indigo-text: #3730a3;

  /* Dimensões */
  --header-height: 64px;
  --sidebar-width: 290px;
  --toc-width: 250px;
  --content-max-width: 880px;

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

[data-theme="dark"] {
  --bg-page: #0b0f19;
  --bg-surface: #111827;
  --bg-subtle: #1e293b;
  --bg-card: #141d2e;
  --border-color: #1f293d;
  --border-subtle: #334155;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --accent-primary: #38bdf8;
  --accent-primary-hover: #7dd3fc;
  --accent-subtle: #0c4a6e;

  --emerald-bg: rgba(6, 78, 59, 0.35);
  --emerald-border: #059669;
  --emerald-text: #6ee7b7;

  --blue-bg: rgba(30, 58, 138, 0.35);
  --blue-border: #2563eb;
  --blue-text: #93c5fd;

  --amber-bg: rgba(120, 53, 15, 0.35);
  --amber-border: #d97706;
  --amber-text: #fcd34d;

  --rose-bg: rgba(136, 19, 55, 0.35);
  --rose-border: #e11d48;
  --rose-text: #fda4af;

  --indigo-bg: rgba(55, 48, 163, 0.35);
  --indigo-border: #6366f1;
  --indigo-text: #c7d2fe;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   Reset Básico & Tipografia
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}

/* ==========================================================================
   Header Superior (Mobile & Desktop)
   ========================================================================== */
.top-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.brand-icon {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.3);
}

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

.brand-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-version {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

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

.search-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.search-trigger:hover {
  border-color: var(--accent-primary);
  background: var(--bg-surface);
  color: var(--text-primary);
}

.search-icon {
  width: 16px;
  height: 16px;
}

.search-label {
  font-weight: 500;
}

.search-kbd {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  color: var(--text-faint);
  margin-left: auto;
}

/* Theme Toggle Icons */
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; width: 18px; height: 18px; }
[data-theme="dark"] .theme-icon-sun { display: block; width: 18px; height: 18px; }
[data-theme="dark"] .theme-icon-moon { display: none; }

/* ==========================================================================
   Layout Principal (Sidebar + Conteúdo + TOC)
   ========================================================================== */
.layout-wrapper {
  display: flex;
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  flex: 1;
}

/* Sidebar Esquerda */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  height: calc(100vh - var(--header-height));
  position: sticky;
  top: var(--header-height);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 30;
}

.sidebar-header {
  padding: 1.25rem 1.25rem 0.75rem;
  display: none; /* Já está no header sticky */
}

.sidebar-search {
  padding: 1rem 1.25rem 0.5rem;
}

.sidebar-search .w-full {
  width: 100%;
}

.sidebar-content {
  flex: 1;
  padding: 0.5rem 0.75rem 2rem;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.sidebar-footer-info {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Navegação Sidebar */
.nav-group {
  margin-bottom: 1.25rem;
}

.nav-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  margin-bottom: 0.25rem;
}

.nav-list {
  list-style: none;
}

.nav-item {
  margin-bottom: 0.15rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.nav-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-color);
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.nav-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-tag {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

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

.nav-link:hover .nav-bullet {
  background: var(--accent-primary);
}

.nav-link.active {
  background: var(--accent-subtle);
  color: var(--accent-primary);
  font-weight: 700;
}

.nav-link.active .nav-bullet {
  background: var(--accent-primary);
  box-shadow: 0 0 6px var(--accent-primary);
}

.nav-link.active .nav-tag {
  background: var(--accent-primary);
  color: #ffffff;
}

/* ==========================================================================
   Conteúdo Central (Artigo)
   ========================================================================== */
.main-content {
  flex: 1;
  min-width: 0; /* Previne estouro horizontal de flexbox */
  padding: 2rem 2.5rem 4rem;
}

.content-container {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb-item {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb-item:hover {
  color: var(--accent-primary);
}

.breadcrumb-separator {
  color: var(--text-faint);
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

/* Estilização Prose (Markdown Renderizado) */
.prose-content {
  color: var(--text-primary);
  font-size: 0.975rem;
  line-height: 1.75;
}

.prose-content h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.25;
}

.prose-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-top: 2.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
  line-height: 1.35;
}

.prose-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.prose-content p {
  margin-bottom: 1.15rem;
}

.prose-content ul, .prose-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose-content li {
  margin-bottom: 0.45rem;
}

.prose-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 8px 8px 0;
  box-shadow: var(--shadow-sm);
  color: var(--text-secondary);
  font-style: normal;
}

.prose-content hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--border-color);
}

/* Anchors nos Cabeçalhos */
.heading-anchor-group {
  position: relative;
}

.heading-anchor {
  opacity: 0;
  color: var(--text-faint);
  margin-left: 0.35rem;
  text-decoration: none !important;
  font-weight: 400;
  transition: opacity 0.15s ease;
}

.heading-anchor-group:hover .heading-anchor {
  opacity: 1;
}

.heading-anchor:hover {
  color: var(--accent-primary);
}

/* ==========================================================================
   Badges, IDs e Referências Cruzadas
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  vertical-align: middle;
  line-height: 1.2;
  margin: 0 0.2rem;
  white-space: nowrap;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-decided {
  background-color: var(--emerald-bg);
  border: 1px solid var(--emerald-border);
  color: var(--emerald-text);
}
.badge-decided .badge-dot { background-color: var(--emerald-text); }

.badge-decided-05 {
  background-color: var(--blue-bg);
  border: 1px solid var(--blue-border);
  color: var(--blue-text);
}
.badge-decided-05 .badge-dot { background-color: var(--blue-text); }

.badge-proposal {
  background-color: var(--amber-bg);
  border: 1px solid var(--amber-border);
  color: var(--amber-text);
}
.badge-proposal .badge-dot { background-color: var(--amber-text); }

.badge-open {
  background-color: var(--rose-bg);
  border: 1px solid var(--rose-border);
  color: var(--rose-text);
}
.badge-open .badge-dot { background-color: var(--rose-text); }

.section-anchor {
  display: block;
  position: relative;
  top: calc(-1 * var(--header-height) - 1rem);
  visibility: hidden;
  height: 0;
  margin: 0;
  padding: 0;
}

/* Requisitos (ex: GED-01, ORG-10) */
.req-tag {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  font-weight: 700;
  margin-right: 0.35rem;
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.req-anchor {
  color: var(--text-faint);
  text-decoration: none !important;
  margin-right: 0.2rem;
  font-weight: normal;
  opacity: 0.5;
}

.req-anchor:hover {
  opacity: 1;
  color: var(--accent-primary);
}

/* Badges de Referência Entre Documentos (`02`, `03` §2, etc) */
.ref-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: var(--indigo-bg);
  border: 1px solid var(--indigo-border);
  color: var(--indigo-text) !important;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.12rem 0.5rem;
  border-radius: 6px;
  text-decoration: none !important;
  transition: all 0.15s ease;
  vertical-align: baseline;
}

.ref-badge:hover {
  background: var(--indigo-text);
  color: #ffffff !important;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.ref-badge-num {
  font-family: var(--font-mono);
  font-weight: 700;
}

/* ==========================================================================
   Tabelas Responsivas
   ========================================================================== */
.table-container {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  background: var(--bg-surface);
}

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

th {
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: top;
}

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

tr:hover td {
  background: rgba(2, 132, 199, 0.03);
}

/* ==========================================================================
   Código e Blocos Pré-formatados
   ========================================================================== */
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

pre {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  box-shadow: var(--shadow-sm);
}

pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
}

/* ==========================================================================
   Paginação Anterior / Próximo
   ========================================================================== */
.docs-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-color);
}

.pagination-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-surface);
  text-decoration: none !important;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

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

.pagination-prev {
  text-align: left;
}

.pagination-next {
  text-align: right;
  margin-left: auto;
}

.pagination-sub {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
  margin-bottom: 0.35rem;
}

.pagination-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   Footer da Documentação
   ========================================================================== */
.docs-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

.footer-left {
  color: var(--text-secondary);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--accent-primary);
}

.footer-dot {
  color: var(--text-faint);
}

.text-muted { color: var(--text-muted); }
.text-xs { font-size: 0.75rem; }

/* ==========================================================================
   Right Sidebar (Table of Contents / Nesta Página)
   ========================================================================== */
.right-sidebar {
  width: var(--toc-width);
  flex-shrink: 0;
  height: calc(100vh - var(--header-height));
  position: sticky;
  top: var(--header-height);
  padding: 2rem 1rem;
  overflow-y: auto;
  display: none; /* Ativado no desktop grande */
}

.toc-wrapper {
  display: flex;
  flex-direction: column;
}

.toc-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.toc-icon {
  width: 14px;
  height: 14px;
}

.toc-list {
  list-style: none;
  border-left: 1px solid var(--border-color);
}

.toc-main a, .toc-sub a {
  display: block;
  padding: 0.3rem 0 0.3rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.825rem;
  text-decoration: none !important;
  transition: all 0.15s ease;
  line-height: 1.35;
  border-left: 2px solid transparent;
  margin-left: -1px;
}

.toc-sub a {
  padding-left: 1.45rem;
  font-size: 0.775rem;
}

.toc-main a:hover, .toc-sub a:hover {
  color: var(--text-primary);
}

.toc-main a.active, .toc-sub a.active {
  color: var(--accent-primary);
  font-weight: 700;
  border-left-color: var(--accent-primary);
}

/* ==========================================================================
   Modal de Busca Instantânea
   ========================================================================== */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 1rem 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.search-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.search-modal-container {
  width: 100%;
  max-width: 640px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 80vh;
  transform: translateY(-10px);
  transition: transform 0.2s ease;
}

.search-modal-backdrop.open .search-modal-container {
  transform: translateY(0);
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.search-modal-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}

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

.search-close-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
}

.search-modal-results {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.search-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-result-item {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  text-decoration: none !important;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  transition: background 0.15s ease;
}

.search-result-item:hover, .search-result-item.selected {
  background: var(--bg-subtle);
}

.search-result-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-result-group {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
}

.search-result-snippet {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.search-modal-footer {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.65rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-subtle);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-modal-footer kbd {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-family: var(--font-mono);
}

/* ==========================================================================
   Backdrop Mobile Drawer
   ========================================================================== */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

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

/* ==========================================================================
   Breakpoints Responsivos
   ========================================================================== */
@media (min-width: 1280px) {
  .right-sidebar {
    display: block;
  }
}

@media (max-width: 1024px) {
  .main-content {
    padding: 1.5rem 1.25rem 3rem;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lg);
  }

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

  .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
  }
}

@media (max-width: 640px) {
  .search-label, .search-kbd {
    display: none;
  }

  .docs-pagination {
    grid-template-columns: 1fr;
  }

  .pagination-next {
    margin-left: 0;
    text-align: left;
  }

  .prose-content h1 {
    font-size: 1.6rem;
  }

  .prose-content h2 {
    font-size: 1.25rem;
  }
}
