/* SWOT PAM Client Documentation Portal - Modern Design System */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* Dark theme palette (Default) - Secure AI PAM Warm Carbon & Orange */
  --bg-primary: #0a0a0b;
  --bg-surface: #111113;
  --bg-card: #17171a;
  --bg-subtle: #1f1f23;
  --bg-hover: #26262b;
  
  --border-color: #26262a;
  --border-active: #3f3f46;
  
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --primary: #5B8DEF;
  --primary-glow: rgba(91, 141, 239, 0.15);
  --primary-hover: #4a7be0;
  --accent: #04B4FC;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #5B8DEF;

  --sidebar-width: 290px;
  --header-height: 68px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 4px 14px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #f8fafc;
  
  --border-color: #e2e8f0;
  --border-active: #cbd5e1;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --primary: #5B8DEF;
  --primary-glow: rgba(91, 141, 239, 0.15);
  --primary-hover: #4a7be0;
  --accent: #04B4FC;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.doc-header {
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 11, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  width: 100%;
}

[data-theme="light"] .doc-header {
  background: rgba(255, 255, 255, 0.94);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-icon {
  width: 44px;
  height: 44px;
  padding: 6px;
  object-fit: contain;
  flex: 0 0 auto;
  background: var(--primary);
  border-radius: var(--radius-md);
}

.brand-title {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  white-space: nowrap;
}

.brand-badge {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 600;
  padding: 2px 8px;
  background: var(--bg-subtle);
  color: var(--primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 155px;
  height: 36px;
  white-space: nowrap;
}

.search-trigger:hover {
  border-color: var(--primary);
  color: var(--text-secondary);
}

.search-kbd {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--bg-subtle);
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn {
  position: relative;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  height: 36px;
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
  white-space: nowrap;
}

.nav-btn::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: transparent;
}

.nav-btn:hover {
  color: var(--primary);
  border-color: transparent;
  background: transparent;
}

.nav-btn.active {
  background: transparent !important;
  color: var(--primary) !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
}

.nav-btn.active::after {
  background: var(--primary);
}

.nav-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
  background: var(--bg-hover);
}

/* Responsive adjustments to ensure all 7 header menu items remain static and fully visible */
@media (max-width: 1400px) {
  .doc-header {
    padding: 0 1rem;
  }
  .header-actions {
    gap: 6px;
  }
  .header-nav {
    gap: 4px;
  }
  .nav-btn {
    padding: 0 9px;
    font-size: 0.8rem;
  }
  .search-trigger {
    min-width: 135px;
    padding: 6px 10px;
  }
}

@media (max-width: 1220px) {
  .brand-badge {
    display: none;
  }
  .search-trigger {
    min-width: 120px;
  }
  .search-trigger .search-kbd {
    display: none;
  }
}

@media (max-width: 1060px) {
  .search-trigger span {
    display: none;
  }
  .search-trigger {
    min-width: 36px;
    width: 36px;
    padding: 0;
    justify-content: center;
  }
  .nav-btn {
    padding: 0 7px;
    font-size: 0.78rem;
  }
}

@media (max-width: 860px) {
  .doc-header {
    flex-wrap: wrap;
    height: auto;
    padding: 8px 12px;
    gap: 8px;
  }
  .header-actions {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .header-nav {
    flex-shrink: 0;
  }
}

/* Documentation Layout */
.doc-container {
  display: flex;
  flex: 1;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* Sidebar */
.doc-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
  background: var(--bg-surface);
  padding: 1.5rem 1.25rem;
}

.sidebar-nav-group {
  margin-bottom: 2rem;
}

.sidebar-group-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.sidebar-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.885rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
}

.sidebar-link svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.sidebar-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.sidebar-link.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  font-weight: 600;
}

.sidebar-link.active:hover {
  background: var(--primary) !important;
  color: #ffffff !important;
}

.sidebar-link.active svg {
  opacity: 1;
  color: #ffffff !important;
  stroke: #ffffff !important;
}

/* Main Content Area */
.doc-content {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 3.5rem 5rem 3.5rem;
  max-width: 980px;
}

/* Table of contents sticky right */
.doc-toc {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 2.5rem 1rem;
  display: none;
}

@media (min-width: 1380px) {
  .doc-toc {
    display: block;
  }
}

.toc-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.toc-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc-link {
  color: var(--text-muted);
  font-size: 0.815rem;
  text-decoration: none;
  transition: color 0.15s;
  display: block;
  padding-left: 8px;
  border-left: 2px solid transparent;
}

.toc-link:hover, .toc-link.active {
  color: var(--primary);
  border-left-color: var(--primary);
}

/* Typography & Elements */
.doc-article h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.doc-lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.doc-article h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.doc-article h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.doc-article p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.doc-article ul, .doc-article ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.doc-article li {
  margin-bottom: 0.5rem;
}

/* Alerts / Callouts */
.callout {
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-left: 4px solid;
  background: var(--bg-card);
  display: flex;
  gap: 14px;
}

.callout-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
}

.callout-body {
  flex: 1;
  font-size: 0.92rem;
}

.callout-title {
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.callout.info {
  border-left-color: var(--primary);
  background: var(--primary-glow);
}
.callout.info .callout-title { color: var(--primary); }

.callout.tip {
  border-left-color: var(--success);
  background: rgba(16, 185, 129, 0.08);
}
.callout.tip .callout-title { color: #34d399; }

.callout.warning {
  border-left-color: var(--warning);
  background: rgba(245, 158, 11, 0.08);
}
.callout.warning .callout-title { color: #fbbf24; }

.callout.danger {
  border-left-color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
}
.callout.danger .callout-title { color: #f87171; }

/* Image / Screenshot Display Card */
.screenshot-figure {
  margin: 2rem 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.screenshot-figure:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-lg);
}

.screenshot-container {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  background: #000;
}

.screenshot-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.screenshot-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
}

.screenshot-caption {
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Code Blocks */
.code-block-wrapper {
  position: relative;
  margin: 1.5rem 0;
  background: #0b1120;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.copy-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.copy-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

pre code {
  display: block;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.6;
  color: #e2e8f0;
}

p code, li code, td code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  color: var(--primary);
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

th {
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-weight: 600;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Developer Badges & Metadata Chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  letter-spacing: 0.03em;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}

[data-theme="dark"] .badge-blue {
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.28);
}
[data-theme="light"] .badge-blue {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}

[data-theme="dark"] .badge-orange {
  background: rgba(249, 115, 22, 0.12);
  color: #fb923c;
  border-color: rgba(249, 115, 22, 0.28);
}
[data-theme="light"] .badge-orange {
  background: #fff7ed;
  color: #4a7be0;
  border-color: #fed7aa;
}

[data-theme="dark"] .badge-green {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.28);
}
[data-theme="light"] .badge-green {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

[data-theme="dark"] .badge-purple {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.28);
}
[data-theme="light"] .badge-purple {
  background: #faf5ff;
  color: #7e22ce;
  border-color: #e9d5ff;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-img {
  max-width: 94vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

/* Search Modal */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.search-modal.active {
  display: flex;
}

.search-box {
  width: 100%;
  max-width: 640px;
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}

.search-result-item {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: block;
  text-decoration: none;
  transition: background 0.15s;
}

.search-result-item:hover, .search-result-item.selected {
  background: var(--bg-hover);
}

.search-result-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 2px;
}

.search-result-snippet {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Responsive layout and shared navigation alignment */
.doc-content {
  margin-inline: auto;
}

.doc-article,
.doc-content,
.callout-body,
.arch-card,
.portal-card,
.table-wrapper {
  min-width: 0;
}

.portal-grid,
.comparison-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

img,
video,
iframe {
  max-width: 100%;
}

@media (max-width: 1100px) {
  .doc-sidebar {
    width: 250px;
  }

  .doc-content {
    padding-inline: clamp(1.5rem, 4vw, 3rem);
  }

  .doc-toc {
    display: none;
  }
}

@media (max-width: 860px) {
  .doc-header {
    height: auto;
    min-height: var(--header-height);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 14px;
  }

  .brand-wrapper {
    min-height: 36px;
  }

  .header-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    min-width: 0;
    overflow: visible;
    padding: 0;
  }

  .header-nav {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
    gap: 6px;
    overflow: visible;
  }

  .nav-btn {
    flex: 0 0 auto;
  }

  .search-trigger,
  .theme-toggle {
    flex: 0 0 36px;
  }

  .doc-sidebar {
    display: none;
  }

  .doc-container {
    display: block;
    width: 100%;
  }

  .doc-content {
    width: 100%;
    max-width: 980px;
    padding: 2rem clamp(1rem, 4vw, 2rem) 4rem;
  }

  .hero-section {
    padding: 3rem clamp(1rem, 5vw, 2rem) 2rem;
  }
}

@media (max-width: 600px) {
  .doc-header {
    padding: 8px 12px;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 6px;
    align-items: start;
  }

  .search-trigger {
    grid-column: 1;
    grid-row: 1;
  }

  .header-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .theme-toggle {
    grid-column: 3;
    grid-row: 1;
  }

  .brand-wrapper {
    gap: 8px;
  }

  .brand-title {
    font-size: 1rem;
  }

  .doc-content {
    padding: 1.5rem 1rem 3rem;
  }

  .doc-article h1 {
    font-size: clamp(1.75rem, 8vw, 2.2rem);
    overflow-wrap: anywhere;
  }

  .doc-article h2 {
    font-size: 1.35rem;
    align-items: flex-start;
    overflow-wrap: anywhere;
  }

  .doc-article h3 {
    font-size: 1.1rem;
  }

  .doc-lead {
    font-size: 1rem;
  }

  .callout {
    gap: 10px;
    padding: 0.9rem;
  }

  .screenshot-caption {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .table-wrapper {
    overscroll-behavior-x: contain;
  }

  th,
  td {
    padding: 9px 10px;
  }

  pre code {
    padding: 0.9rem;
    font-size: 0.78rem;
  }
}

/* Print Stylesheet for clean PDF manual generation */
@media print {
  .doc-header, .doc-sidebar, .doc-toc, .search-modal, .lightbox-modal, .theme-toggle, .print-btn {
    display: none !important;
  }
  
  body, html {
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 11pt;
  }
  
  .doc-container {
    display: block;
    max-width: 100% !important;
    padding: 0 !important;
  }
  
  .doc-content {
    max-width: 100% !important;
    padding: 0 !important;
  }
  
  .screenshot-figure {
    break-inside: avoid;
    border: 1px solid #d1d5db !important;
    box-shadow: none !important;
  }
  
  .callout {
    break-inside: avoid;
    border: 1px solid #d1d5db !important;
  }
  
  h1, h2, h3 {
    break-after: avoid;
    color: #111827 !important;
  }
}


/* =========================================================================
   Inner Documentation Pages Layout (Sidebar + Main Content)
   ========================================================================= */

body {
  margin: 0;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
  background: var(--bg-primary, #0a0a0b);
  color: var(--text-primary, #f4f4f5);
  line-height: 1.6;
}

.docs-wrapper {
  display: flex;
  min-height: 100vh;
}

.docs-sidebar {
  width: var(--sidebar-width, 290px);
  background: var(--bg-surface, #111113);
  border-right: 1px solid var(--border-color, #26262a);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.docs-sidebar .docs-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 2rem;
}

.docs-sidebar .brand-icon {
  background: var(--primary, #5B8DEF);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
}

.docs-sidebar .docs-brand span {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.search-input {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.nav-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  margin: 1.5rem 0 0.5rem 0;
}

.nav-link {
  display: block;
  padding: 8px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  margin-bottom: 4px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--primary-glow);
  color: var(--primary);
  font-weight: 600;
}

.docs-main {
  flex: 1;
  padding: 3rem 4rem;
  max-width: 900px;
}

.docs-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.docs-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.docs-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin: 0;
}

.theme-toggle-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem 0;
}

section p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

section ul {
  list-style: none;
  padding: 0;
}

section ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

section ul li::before {
  content: "�";
  color: var(--primary);
  position: absolute;
  left: 0;
  font-weight: bold;
}

section ul li strong {
  color: var(--text-primary);
}



pre {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  color: var(--text-primary) !important;
  font-family: var(--font-mono, monospace);
  font-size: 0.9rem;
}
code {
  font-family: var(--font-mono, monospace);
  color: var(--primary);
  background: var(--bg-subtle);
  padding: 2px 4px;
  border-radius: 4px;
}
pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

