/* ============================================================
   ERPS X DOCUMENTATION — PUBLIC STYLES
   Premium documentation theme inspired by Stripe/GitBook
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --docs-primary: #6366f1;
  --docs-primary-light: #818cf8;
  --docs-primary-dark: #4f46e5;
  --docs-primary-bg: rgba(99, 102, 241, .06);
  --docs-primary-border: rgba(99, 102, 241, .15);
  --docs-bg: #ffffff;
  --docs-sidebar-bg: #f8fafc;
  --docs-sidebar-w: 280px;
  --docs-header-h: 64px;
  --docs-toc-w: 220px;
  --docs-text: #1e293b;
  --docs-text-secondary: #475569;
  --docs-text-muted: #94a3b8;
  --docs-border: #e2e8f0;
  --docs-border-light: #f1f5f9;
  --docs-success: #10b981;
  --docs-warning: #f59e0b;
  --docs-danger: #ef4444;
  --docs-info: #0ea5e9;
  --docs-radius: .75rem;
  --docs-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --docs-shadow-lg: 0 10px 40px rgba(0,0,0,.08);
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--docs-text-secondary);
  background: var(--docs-bg);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--docs-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--docs-primary-dark); }

img { max-width: 100%; height: auto; }

/* ---------- HEADER ---------- */
.docs-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--docs-header-h);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--docs-border);
  display: flex; align-items: center;
  padding: 0 1.5rem;
}

.docs-header-inner {
  display: flex; align-items: center; width: 100%;
  max-width: 100%; gap: 1rem;
}

.docs-logo {
  display: flex; align-items: center; gap: .75rem;
  text-decoration: none; flex-shrink: 0;
}
.docs-logo img { height: 28px; }
.docs-logo-text {
  font-size: 1.1rem; font-weight: 700; color: var(--docs-text);
  letter-spacing: -.02em;
}
.docs-logo-badge {
  font-size: .65rem; font-weight: 600; color: var(--docs-primary);
  background: var(--docs-primary-bg); border: 1px solid var(--docs-primary-border);
  padding: .15rem .5rem; border-radius: 1rem; text-transform: uppercase;
  letter-spacing: .04em;
}

/* Search Bar */
.docs-search {
  flex: 1; max-width: 480px; margin: 0 auto; position: relative;
}
.docs-search input {
  width: 100%; padding: .55rem 1rem .55rem 2.5rem;
  background: var(--docs-sidebar-bg);
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius);
  font-size: .875rem; color: var(--docs-text);
  transition: all .25s; outline: none;
  font-family: inherit;
}
.docs-search input::placeholder { color: var(--docs-text-muted); }
.docs-search input:focus {
  background: #fff;
  border-color: var(--docs-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}
.docs-search .search-icon {
  position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
  color: var(--docs-text-muted); font-size: 1rem; pointer-events: none;
}
.docs-search .search-shortcut {
  position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
  font-size: .68rem; font-family: monospace; color: var(--docs-text-muted);
  background: #fff; border: 1px solid var(--docs-border);
  padding: .1rem .4rem; border-radius: .3rem; pointer-events: none;
}

/* Header right */
.docs-header-right {
  display: flex; align-items: center; gap: .75rem; flex-shrink: 0;
}
.docs-header-link {
  font-size: .85rem; font-weight: 500; color: var(--docs-text-secondary);
  padding: .4rem .75rem; border-radius: .5rem; transition: all .2s;
  display: flex; align-items: center; gap: .4rem;
}
.docs-header-link:hover { background: var(--docs-sidebar-bg); color: var(--docs-text); }
.docs-header-link i { font-size: 1rem; }
.docs-header-cta {
  font-size: .82rem; font-weight: 600; color: #fff;
  background: var(--docs-primary); padding: .45rem 1rem;
  border-radius: .5rem; transition: all .25s;
}
.docs-header-cta:hover { background: var(--docs-primary-dark); color: #fff; transform: translateY(-1px); }

/* Mobile toggle */
.docs-sidebar-toggle {
  display: none; background: none; border: none;
  font-size: 1.35rem; color: var(--docs-text);
  cursor: pointer; padding: .4rem;
}

/* ---------- LAYOUT ---------- */
.docs-layout {
  display: flex;
  margin-top: var(--docs-header-h);
  min-height: calc(100vh - var(--docs-header-h));
}

/* ---------- SIDEBAR ---------- */
.docs-sidebar {
  width: var(--docs-sidebar-w);
  flex-shrink: 0;
  position: fixed;
  top: var(--docs-header-h);
  left: 0;
  bottom: 0;
  background: var(--docs-sidebar-bg);
  border-right: 1px solid var(--docs-border);
  overflow-y: auto;
  padding: 1.5rem 0;
  z-index: 900;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.docs-sidebar::-webkit-scrollbar { width: 5px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.sidebar-section { margin-bottom: .5rem; }

.sidebar-heading {
  display: flex; align-items: center; justify-content: space-between;
  padding: .55rem 1.5rem; cursor: pointer;
  font-size: .78rem; font-weight: 700; color: var(--docs-text);
  text-transform: uppercase; letter-spacing: .05em;
  transition: color .2s; user-select: none;
}
.sidebar-heading:hover { color: var(--docs-primary); }
.sidebar-heading .sidebar-chevron {
  font-size: .85rem; transition: transform .25s;
  color: var(--docs-text-muted);
}
.sidebar-section.open .sidebar-chevron { transform: rotate(90deg); }

.sidebar-children { display: none; }
.sidebar-section.open .sidebar-children { display: block; }

.sidebar-group-label {
  padding: .4rem 1.5rem .4rem 2rem;
  font-size: .75rem; font-weight: 600; color: var(--docs-text-muted);
  text-transform: uppercase; letter-spacing: .04em;
  margin-top: .5rem;
}

.sidebar-link {
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem 1.5rem .4rem 2.25rem;
  font-size: .84rem; font-weight: 450; color: var(--docs-text-secondary);
  transition: all .2s; border-left: 2px solid transparent;
  text-decoration: none;
}
.sidebar-link:hover {
  color: var(--docs-primary);
  background: rgba(99,102,241,.03);
}
.sidebar-link.active {
  color: var(--docs-primary);
  background: var(--docs-primary-bg);
  border-left-color: var(--docs-primary);
  font-weight: 600;
}
.sidebar-link i {
  font-size: .9rem; flex-shrink: 0;
  width: 1.1rem; text-align: center;
}

/* Sub-category links */
.sidebar-sublink {
  padding-left: 3rem;
  font-size: .82rem;
}

/* ---------- MAIN CONTENT ---------- */
.docs-main {
  flex: 1;
  margin-left: var(--docs-sidebar-w);
  padding: 2.5rem 3rem 4rem;
  max-width: calc(100% - var(--docs-sidebar-w));
  min-width: 0;
}

.docs-content {
  max-width: 780px;
}

/* ---------- BREADCRUMBS ---------- */
.docs-breadcrumbs {
  display: flex; align-items: center; gap: .4rem;
  font-size: .82rem; margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.docs-breadcrumbs a {
  color: var(--docs-text-muted); font-weight: 500;
  transition: color .2s;
}
.docs-breadcrumbs a:hover { color: var(--docs-primary); }
.docs-breadcrumbs .bc-sep {
  color: var(--docs-border); font-size: .7rem;
}
.docs-breadcrumbs .bc-current {
  color: var(--docs-text); font-weight: 600;
}

/* ---------- ARTICLE CONTENT ---------- */
.docs-article-header { margin-bottom: 2rem; }
.docs-article-header h1 {
  font-size: 2rem; font-weight: 800; color: var(--docs-text);
  line-height: 1.25; margin-bottom: .5rem;
  letter-spacing: -.02em;
}
.docs-article-meta {
  display: flex; align-items: center; gap: 1rem;
  font-size: .8rem; color: var(--docs-text-muted);
  flex-wrap: wrap;
}
.docs-article-meta span { display: flex; align-items: center; gap: .3rem; }

.docs-article-body h2 {
  font-size: 1.4rem; font-weight: 700; color: var(--docs-text);
  margin: 2.5rem 0 1rem; padding-bottom: .6rem;
  border-bottom: 1px solid var(--docs-border);
  scroll-margin-top: calc(var(--docs-header-h) + 1rem);
}
.docs-article-body h3 {
  font-size: 1.15rem; font-weight: 600; color: var(--docs-text);
  margin: 2rem 0 .75rem;
  scroll-margin-top: calc(var(--docs-header-h) + 1rem);
}
.docs-article-body h4 {
  font-size: 1rem; font-weight: 600; color: var(--docs-text);
  margin: 1.5rem 0 .5rem;
}
.docs-article-body p { margin-bottom: 1rem; }
.docs-article-body ul, .docs-article-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.docs-article-body li { margin-bottom: .4rem; }
.docs-article-body strong { color: var(--docs-text); font-weight: 600; }

/* Code */
.docs-article-body code {
  background: var(--docs-border-light);
  padding: .15rem .4rem; border-radius: .3rem;
  font-size: .85em; color: #e11d48; font-weight: 500;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}
.docs-article-body pre {
  background: #0f172a; color: #e2e8f0;
  border-radius: var(--docs-radius);
  padding: 1.25rem 1.5rem; margin: 1.25rem 0;
  overflow-x: auto; font-size: .85rem;
  line-height: 1.6; border: 1px solid #1e293b;
}
.docs-article-body pre code {
  background: none; padding: 0; color: inherit;
  font-size: inherit;
}

/* Tables */
.docs-article-body table {
  width: 100%; border-collapse: collapse;
  margin: 1.25rem 0; font-size: .88rem;
}
.docs-article-body th {
  text-align: left; padding: .75rem 1rem;
  background: var(--docs-sidebar-bg); color: var(--docs-text);
  font-weight: 600; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .03em;
  border-bottom: 2px solid var(--docs-border);
}
.docs-article-body td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--docs-border-light);
}
.docs-article-body tr:hover td { background: rgba(248,250,252,.5); }

/* Callouts */
.docs-callout {
  padding: 1rem 1.25rem; border-radius: var(--docs-radius);
  margin: 1.25rem 0; font-size: .88rem;
  border-left: 3px solid;
}
.docs-callout-info {
  background: rgba(14,165,233,.05); border-color: var(--docs-info);
  color: #0c4a6e;
}
.docs-callout-success {
  background: rgba(16,185,129,.05); border-color: var(--docs-success);
  color: #064e3b;
}
.docs-callout-warning {
  background: rgba(245,158,11,.05); border-color: var(--docs-warning);
  color: #78350f;
}
.docs-callout-danger {
  background: rgba(239,68,68,.05); border-color: var(--docs-danger);
  color: #7f1d1d;
}

/* Images in content */
.docs-article-body img {
  border-radius: var(--docs-radius);
  border: 1px solid var(--docs-border);
  margin: 1.25rem 0;
  max-width: 100%;
  height: auto;
  display: block;
  transition: all .3s ease;
  cursor: zoom-in;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.docs-article-body img:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,.08);
  transform: scale(1.005);
}

/* Centered images */
.docs-article-body p > img:only-child {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Full-width images (when wrapped in a <figure> or has specific width) */
.docs-article-body figure {
  margin: 1.75rem 0;
  padding: 0;
}
.docs-article-body figure img {
  margin: 0 0 .5rem;
  width: 100%;
}
.docs-article-body figcaption {
  text-align: center;
  font-size: .82rem;
  color: var(--docs-text-muted);
  font-style: italic;
  padding: .35rem .5rem;
}

/* Responsive Video / Iframe Container */
.docs-article-body iframe,
.docs-article-body video {
  max-width: 100%;
  border-radius: var(--docs-radius);
  border: 1px solid var(--docs-border);
  margin: 1.5rem 0;
  display: block;
  box-shadow: 0 4px 15px rgba(0,0,0,.06);
}

/* Auto aspect-ratio for iframes (YouTube, Vimeo, etc.) */
.docs-article-body iframe[src*="youtube"],
.docs-article-body iframe[src*="vimeo"],
.docs-article-body iframe[src*="dailymotion"],
.docs-article-body iframe[src*="loom"] {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
}

/* Video element */
.docs-article-body video {
  width: 100%;
  height: auto;
  background: #000;
}

/* Audio */
.docs-article-body audio {
  width: 100%;
  margin: 1rem 0;
  border-radius: var(--docs-radius);
}

/* Embedded content wrapper (for manual wrapping) */
.docs-article-body .embed-responsive,
.docs-article-body .video-container,
.docs-article-body .media-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 1.5rem 0;
  border-radius: var(--docs-radius);
  overflow: hidden;
  border: 1px solid var(--docs-border);
  box-shadow: 0 4px 15px rgba(0,0,0,.06);
}
.docs-article-body .embed-responsive iframe,
.docs-article-body .video-container iframe,
.docs-article-body .media-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none; margin: 0;
  box-shadow: none;
}

/* Image Gallery (side by side images) */
.docs-article-body .image-gallery,
.docs-article-body .img-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .75rem;
  margin: 1.5rem 0;
}
.docs-article-body .image-gallery img,
.docs-article-body .img-row img {
  margin: 0;
  width: 100%;
  object-fit: cover;
}

/* Blockquote (enhanced) */
.docs-article-body blockquote {
  border-left: 3px solid var(--docs-primary);
  padding: .85rem 1.25rem;
  margin: 1.5rem 0;
  background: rgba(99,102,241,.03);
  border-radius: 0 var(--docs-radius) var(--docs-radius) 0;
  font-style: italic;
  color: var(--docs-text-secondary);
}
.docs-article-body blockquote p:last-child { margin-bottom: 0; }

/* Image Lightbox */
.docs-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: lbFadeIn .25s ease;
  padding: 2rem;
}
@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }
.docs-lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: .5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  animation: lbZoomIn .3s cubic-bezier(.16,1,.3,1);
  border: none;
  cursor: default;
}
@keyframes lbZoomIn { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.docs-lightbox-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .2s;
}
.docs-lightbox-close:hover {
  background: rgba(255,255,255,.2);
}

/* ---------- TABLE OF CONTENTS (Right Sidebar) ---------- */
.docs-toc {
  position: fixed;
  right: 2rem;
  top: calc(var(--docs-header-h) + 2rem);
  width: var(--docs-toc-w);
  max-height: calc(100vh - var(--docs-header-h) - 4rem);
  overflow-y: auto;
}
.docs-toc-title {
  font-size: .72rem; font-weight: 700; color: var(--docs-text-muted);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: .75rem;
}
.docs-toc a {
  display: block; padding: .25rem 0 .25rem .75rem;
  font-size: .8rem; color: var(--docs-text-muted);
  border-left: 2px solid var(--docs-border-light);
  transition: all .2s; font-weight: 450;
}
.docs-toc a:hover { color: var(--docs-primary); border-color: var(--docs-primary-border); }
.docs-toc a.active { color: var(--docs-primary); border-color: var(--docs-primary); font-weight: 600; }
.docs-toc a.toc-h3 { padding-left: 1.5rem; font-size: .78rem; }

/* ---------- PREV / NEXT NAVIGATION ---------- */
.docs-nav-prev-next {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid var(--docs-border);
}
.docs-nav-card {
  padding: 1.25rem 1.5rem; border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius); transition: all .25s;
  text-decoration: none;
}
.docs-nav-card:hover {
  border-color: var(--docs-primary-border);
  box-shadow: var(--docs-shadow);
  transform: translateY(-2px);
}
.docs-nav-card .nav-label {
  font-size: .72rem; font-weight: 600; color: var(--docs-text-muted);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: .3rem;
  display: flex; align-items: center; gap: .3rem;
}
.docs-nav-card .nav-title {
  font-size: .92rem; font-weight: 600; color: var(--docs-text);
}
.docs-nav-card.nav-next { text-align: right; }
.docs-nav-card.nav-next .nav-label { justify-content: flex-end; }

/* ---------- HOME PAGE ---------- */
.docs-home { padding: 2.5rem 3rem 4rem; margin-left: var(--docs-sidebar-w); }
.docs-home-hero {
  text-align: center; padding: 3rem 0 3.5rem;
}
.docs-home-hero h1 {
  font-size: 2.5rem; font-weight: 800; color: var(--docs-text);
  line-height: 1.2; margin-bottom: .75rem;
  letter-spacing: -.03em;
}
.docs-home-hero p {
  color: var(--docs-text-muted); font-size: 1.05rem;
  max-width: 520px; margin: 0 auto 2rem;
}
.docs-home-search {
  max-width: 520px; margin: 0 auto; position: relative;
}
.docs-home-search input {
  width: 100%; padding: .9rem 1.25rem .9rem 3rem;
  background: var(--docs-sidebar-bg);
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius);
  font-size: .95rem; color: var(--docs-text);
  transition: all .25s; outline: none;
  font-family: inherit;
  box-shadow: var(--docs-shadow);
}
.docs-home-search input:focus {
  background: #fff;
  border-color: var(--docs-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1), var(--docs-shadow);
}
.docs-home-search .search-icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--docs-text-muted); font-size: 1.15rem;
}

/* Category Grid */
.docs-cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem; margin: 2rem 0;
}
.docs-cat-card {
  background: #fff; border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius); padding: 1.75rem;
  transition: all .3s; text-decoration: none;
  position: relative; overflow: hidden;
}
.docs-cat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--cat-accent, var(--docs-primary));
  opacity: 0; transition: opacity .3s;
}
.docs-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--docs-shadow-lg);
  border-color: transparent;
}
.docs-cat-card:hover::before { opacity: 1; }

.docs-cat-card .cat-icon {
  width: 3rem; height: 3rem; border-radius: .65rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 1rem; transition: all .3s;
  background: var(--cat-accent-bg, var(--docs-primary-bg));
  color: var(--cat-accent, var(--docs-primary));
}
.docs-cat-card:hover .cat-icon {
  background: var(--cat-accent, var(--docs-primary));
  color: #fff; transform: scale(1.05);
}
.docs-cat-card h3 {
  font-size: 1.05rem; font-weight: 700; color: var(--docs-text);
  margin-bottom: .35rem;
}
.docs-cat-card p {
  font-size: .84rem; color: var(--docs-text-muted);
  line-height: 1.55; margin-bottom: .75rem;
}
.docs-cat-card .cat-meta {
  font-size: .75rem; font-weight: 600; color: var(--cat-accent, var(--docs-primary));
  display: flex; align-items: center; gap: .3rem;
}

/* Featured Articles */
.docs-section-title {
  font-size: 1.3rem; font-weight: 700; color: var(--docs-text);
  margin: 3rem 0 1.25rem; display: flex; align-items: center; gap: .5rem;
}
.docs-section-title i { color: var(--docs-primary); }

.docs-article-list {
  list-style: none; padding: 0;
}
.docs-article-item {
  display: flex; align-items: center; gap: 1rem;
  padding: .85rem 1.25rem;
  border: 1px solid var(--docs-border-light);
  border-radius: var(--docs-radius);
  margin-bottom: .5rem; transition: all .25s;
  text-decoration: none;
}
.docs-article-item:hover {
  background: var(--docs-sidebar-bg);
  border-color: var(--docs-primary-border);
  transform: translateX(4px);
}
.docs-article-item .ai-icon {
  width: 2.25rem; height: 2.25rem; border-radius: .5rem;
  background: var(--docs-primary-bg); color: var(--docs-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.docs-article-item .ai-body { flex: 1; min-width: 0; }
.docs-article-item .ai-tag {
  font-size: .68rem; font-weight: 600; color: var(--docs-primary);
  text-transform: uppercase; letter-spacing: .03em;
}
.docs-article-item .ai-title {
  font-size: .9rem; font-weight: 600; color: var(--docs-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.docs-article-item .ai-meta {
  font-size: .75rem; color: var(--docs-text-muted);
  display: flex; align-items: center; gap: .3rem; flex-shrink: 0;
}

/* Category Page */
.docs-category-header {
  margin-bottom: 2.5rem;
}
.docs-category-header h1 {
  font-size: 1.8rem; font-weight: 800; color: var(--docs-text);
  margin-bottom: .4rem; letter-spacing: -.02em;
}
.docs-category-header p {
  color: var(--docs-text-muted); font-size: .95rem;
}
.docs-subcategory {
  margin-bottom: 2.5rem;
}
.docs-subcategory h3 {
  font-size: 1.1rem; font-weight: 700; color: var(--docs-text);
  margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem;
  padding-bottom: .5rem; border-bottom: 1px solid var(--docs-border-light);
}
.docs-subcategory h3 i { color: var(--docs-primary); font-size: 1.1rem; }

/* Search Results */
.docs-search-header h1 {
  font-size: 1.5rem; font-weight: 700; color: var(--docs-text);
  margin-bottom: .5rem;
}
.docs-search-header p {
  color: var(--docs-text-muted); font-size: .9rem;
  margin-bottom: 2rem;
}
.docs-search-result {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius);
  margin-bottom: .75rem; transition: all .25s;
}
.docs-search-result:hover {
  border-color: var(--docs-primary-border);
  box-shadow: var(--docs-shadow);
}
.docs-search-result h3 {
  font-size: 1rem; font-weight: 600; margin-bottom: .25rem;
}
.docs-search-result h3 a { color: var(--docs-text); }
.docs-search-result h3 a:hover { color: var(--docs-primary); }
.docs-search-result .sr-category {
  font-size: .72rem; font-weight: 600; color: var(--docs-primary);
  text-transform: uppercase; letter-spacing: .03em; margin-bottom: .3rem;
}
.docs-search-result .sr-excerpt {
  font-size: .85rem; color: var(--docs-text-secondary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.docs-search-result mark {
  background: rgba(99,102,241,.12); color: var(--docs-primary);
  border-radius: 2px; padding: 0 2px;
}

/* ---------- FOOTER ---------- */
.docs-footer {
  margin-left: var(--docs-sidebar-w);
  padding: 2rem 3rem;
  border-top: 1px solid var(--docs-border);
  background: var(--docs-sidebar-bg);
  font-size: .82rem; color: var(--docs-text-muted);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.docs-footer a { color: var(--docs-text-secondary); font-weight: 500; }
.docs-footer a:hover { color: var(--docs-primary); }

/* ---------- SEARCH RESULTS DROPDOWN ---------- */
.docs-search-dropdown {
  position: absolute; top: calc(100% + .5rem);
  left: 0; right: 0; z-index: 1100;
  background: #fff; border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius);
  box-shadow: var(--docs-shadow-lg);
  max-height: 400px; overflow-y: auto;
  display: none;
}
.docs-search-dropdown.show { display: block; }
.docs-search-dropdown .sd-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem; text-decoration: none;
  border-bottom: 1px solid var(--docs-border-light);
  transition: background .15s;
}
.docs-search-dropdown .sd-item:last-child { border-bottom: none; }
.docs-search-dropdown .sd-item:hover { background: var(--docs-primary-bg); }
.docs-search-dropdown .sd-icon {
  width: 1.75rem; height: 1.75rem; border-radius: .35rem;
  background: var(--docs-primary-bg); color: var(--docs-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; flex-shrink: 0;
}
.docs-search-dropdown .sd-title {
  font-size: .85rem; font-weight: 600; color: var(--docs-text);
}
.docs-search-dropdown .sd-cat {
  font-size: .7rem; color: var(--docs-text-muted);
}
.docs-search-dropdown .sd-empty {
  padding: 2rem; text-align: center; color: var(--docs-text-muted);
  font-size: .88rem;
}

/* ---------- EMPTY STATE ---------- */
.docs-empty {
  text-align: center; padding: 4rem 2rem;
  color: var(--docs-text-muted);
}
.docs-empty i { font-size: 3rem; margin-bottom: 1rem; display: block; opacity: .4; }
.docs-empty p { font-size: .95rem; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1200px) {
  .docs-toc { display: none; }
}

@media (max-width: 768px) {
  .docs-sidebar {
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 999;
    box-shadow: none;
  }
  .docs-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,.1);
  }
  .docs-sidebar-toggle { display: block; }
  .docs-main, .docs-home, .docs-footer { margin-left: 0; }
  .docs-main { padding: 1.5rem; max-width: 100%; }
  .docs-home { padding: 1.5rem; }
  .docs-footer { padding: 1.5rem; }
  .docs-home-hero h1 { font-size: 1.7rem; }
  .docs-home-hero p { font-size: .9rem; }
  .docs-article-header h1 { font-size: 1.5rem; }
  .docs-nav-prev-next { grid-template-columns: 1fr; }
  .docs-cat-grid { grid-template-columns: 1fr; }
  .docs-search { max-width: 200px; }
  .docs-header-link { display: none; }
  .docs-sidebar-overlay {
    position: fixed; inset: 0; z-index: 998;
    background: rgba(0,0,0,.3); display: none;
  }
  .docs-sidebar-overlay.show { display: block; }
}
