/* ============================================================
   DEPRIXA PLUS — DOCUMENTATION SITE
   Complete Design System CSS
   Dark corporate theme with electric coral accent (#FF6B35)
   ============================================================ */

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

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  /* Brand Colors */
  --color-primary: #FF6B35;
  --color-primary-hover: #e85a24;
  --color-primary-light: rgba(255, 107, 53, 0.12);
  --color-primary-border: rgba(255, 107, 53, 0.3);

  /* Background Layers */
  --bg-base: #0f1117;
  --bg-surface: #161b27;
  --bg-elevated: #1e2538;
  --bg-input: #1a2030;
  --bg-hover: #232b3e;
  --bg-active: rgba(255, 107, 53, 0.08);

  /* Borders */
  --border-color: #2a3045;
  --border-light: #222840;
  --border-focus: var(--color-primary);

  /* Text */
  --text-primary: #e2e8f0;
  --text-secondary: #a8b2c7;
  --text-muted: #8892a4;
  --text-disabled: #4a5568;
  --text-inverse: #0f1117;

  /* Status Colors */
  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.1);
  --color-warning: #f59e0b;
  --color-warning-bg: rgba(245, 158, 11, 0.1);
  --color-danger: #ef4444;
  --color-danger-bg: rgba(239, 68, 68, 0.1);
  --color-info: #3b82f6;
  --color-info-bg: rgba(59, 130, 246, 0.1);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  /* Spacing */
  --sidebar-width: 280px;
  --topnav-height: 60px;
  --content-max-width: 960px;
  --content-padding: 2.5rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(255, 107, 53, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ============================================================
   BASE RESET & GLOBAL
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--font-size-4xl); margin-bottom: 1.25rem; }
h2 { font-size: var(--font-size-3xl); margin-bottom: 1rem; margin-top: 2.5rem; }
h3 { font-size: var(--font-size-2xl); margin-bottom: 0.75rem; margin-top: 2rem; }
h4 { font-size: var(--font-size-xl); margin-bottom: 0.5rem; margin-top: 1.5rem; }
h5 { font-size: var(--font-size-lg); margin-bottom: 0.5rem; margin-top: 1.25rem; }
h6 { font-size: var(--font-size-base); margin-bottom: 0.5rem; margin-top: 1rem; font-weight: 600; }

p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

strong, b { font-weight: 600; color: var(--text-primary); }
em, i { font-style: italic; }
small { font-size: var(--font-size-sm); }

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

ul li, ol li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-elevated);
  color: var(--color-primary);
  padding: 0.15em 0.45em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

pre {
  margin: 0;
  white-space: pre;
  overflow-x: auto;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border: none;
  border-radius: 0;
  font-size: var(--font-size-sm);
}

hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2rem 0;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: var(--font-size-sm);
}

thead {
  background: var(--bg-elevated);
}

th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
}

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

tr:hover td {
  background: var(--bg-hover);
}

/* ============================================================
   TOP NAVBAR (.doc-topnav)
   ============================================================ */
.doc-topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topnav-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  z-index: 1000;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.topnav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}

.topnav-brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--color-primary), #ff8c5a);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

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

.topnav-brand-text {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.topnav-brand-name {
  font-size: var(--font-size-lg);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.topnav-brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--color-primary);
  color: white;
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.topnav-divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
  flex-shrink: 0;
}

.topnav-search-wrapper {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.topnav-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

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

#search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.5rem 1rem 0.5rem 2.4rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

#search-input::placeholder {
  color: var(--text-muted);
}

#search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.topnav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.topnav-version {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
}

.topnav-icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
  border: none;
  background: transparent;
  cursor: pointer;
}

.topnav-icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  text-decoration: none;
}

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

/* Hamburger */
.hamburger-btn {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.hamburger-btn svg {
  width: 20px;
  height: 20px;
}

.hamburger-btn:hover {
  background: var(--bg-hover);
}

/* ============================================================
   SIDEBAR (.doc-sidebar)
   ============================================================ */
.doc-sidebar {
  position: fixed;
  top: var(--topnav-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--topnav-height));
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 900;
  padding: 1rem 0 2rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.doc-sidebar::-webkit-scrollbar {
  width: 4px;
}

.doc-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.doc-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

/* Sidebar Section Labels */
.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-disabled);
  padding: 1.25rem 1.25rem 0.4rem 1.25rem;
  display: block;
}

/* Sidebar Nav Links */
.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin: 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.25rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 450;
  border-left: 3px solid transparent;
  transition: all var(--transition-fast);
  line-height: 1.4;
}

.sidebar-nav a svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  text-decoration: none;
}

.sidebar-nav a:hover svg {
  opacity: 1;
}

.sidebar-nav a.active {
  color: var(--color-primary);
  background: var(--bg-active);
  border-left-color: var(--color-primary);
  font-weight: 600;
}

.sidebar-nav a.active svg {
  opacity: 1;
  color: var(--color-primary);
}

/* Sidebar search results highlight */
.sidebar-nav li.hidden {
  display: none;
}

/* Overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 850;
  backdrop-filter: blur(2px);
}

/* ============================================================
   MAIN CONTENT (.doc-content)
   ============================================================ */
.doc-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--topnav-height);
  min-height: calc(100vh - var(--topnav-height));
  padding: var(--content-padding);
  max-width: calc(var(--sidebar-width) + var(--content-max-width) + 2 * var(--content-padding));
}

.doc-content-inner {
  max-width: var(--content-max-width);
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumb-sep {
  color: var(--text-disabled);
  font-size: 0.75rem;
}

.breadcrumb-current {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  margin-bottom: 0.75rem;
}

.page-header .subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--font-size-xs);
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  line-height: 1.4;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge svg {
  width: 11px;
  height: 11px;
}

.badge-default {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.badge-primary {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid var(--color-primary-border);
}

.badge-success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
  background: var(--color-info-bg);
  color: var(--color-info);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-tech {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  font-family: var(--font-mono);
}

/* ============================================================
   CALLOUT BOXES
   ============================================================ */
.callout {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid;
  margin: 1.5rem 0;
}

.callout-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 0.1rem;
}

.callout-icon svg {
  width: 20px;
  height: 20px;
}

.callout-body {
  flex: 1;
  min-width: 0;
}

.callout-title {
  font-weight: 700;
  font-size: var(--font-size-sm);
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}

.callout-body p {
  font-size: var(--font-size-sm);
  margin: 0;
  line-height: 1.7;
}

.callout-body code {
  font-size: 0.8em;
}

.callout-tip {
  background: var(--color-success-bg);
  border-color: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

.callout-tip .callout-title { color: var(--color-success); }
.callout-tip .callout-icon { color: var(--color-success); }
.callout-tip .callout-body p { color: #a7f3d0; }

.callout-warning {
  background: var(--color-warning-bg);
  border-color: rgba(245, 158, 11, 0.25);
}

.callout-warning .callout-title { color: var(--color-warning); }
.callout-warning .callout-icon { color: var(--color-warning); }
.callout-warning .callout-body p { color: #fcd34d; }

.callout-danger {
  background: var(--color-danger-bg);
  border-color: rgba(239, 68, 68, 0.25);
}

.callout-danger .callout-title { color: var(--color-danger); }
.callout-danger .callout-icon { color: var(--color-danger); }
.callout-danger .callout-body p { color: #fca5a5; }

.callout-info {
  background: var(--color-info-bg);
  border-color: rgba(59, 130, 246, 0.25);
}

.callout-info .callout-title { color: var(--color-info); }
.callout-info .callout-icon { color: var(--color-info); }
.callout-info .callout-body p { color: #93c5fd; }

/* ============================================================
   CODE BLOCKS (.code-block)
   ============================================================ */
.code-block {
  position: relative;
  margin: 1.5rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-elevated);
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.code-block-lang {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

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

.code-block-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-block-dot:nth-child(1) { background: #ef4444; }
.code-block-dot:nth-child(2) { background: #f59e0b; }
.code-block-dot:nth-child(3) { background: #10b981; }

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

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

.copy-btn svg {
  width: 12px;
  height: 12px;
}

.code-block pre {
  background: #0d1117;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 0;
}

.code-block pre code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  background: transparent;
  color: #e6edf3;
  padding: 0;
  border: none;
  border-radius: 0;
}

/* Override highlight.js for our dark theme */
.hljs {
  background: #0d1117 !important;
  color: #e6edf3 !important;
}

.hljs-keyword { color: #ff7b72 !important; }
.hljs-string { color: #a5d6ff !important; }
.hljs-comment { color: #8b949e !important; font-style: italic; }
.hljs-number { color: #79c0ff !important; }
.hljs-function { color: #d2a8ff !important; }
.hljs-variable { color: #ffa657 !important; }
.hljs-built_in { color: #ffa657 !important; }
.hljs-attr { color: #79c0ff !important; }
.hljs-name { color: #7ee787 !important; }
.hljs-tag { color: #7ee787 !important; }
.hljs-title { color: #d2a8ff !important; }
.hljs-params { color: #e6edf3 !important; }
.hljs-literal { color: #79c0ff !important; }
.hljs-operator { color: #ff7b72 !important; }
.hljs-class { color: #ffa657 !important; }
.hljs-property { color: #79c0ff !important; }
.hljs-punctuation { color: #8b949e !important; }

/* ============================================================
   FEATURE CARDS GRID (.feature-card)
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.feature-grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

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

.feature-card:hover::before {
  opacity: 1;
}

.feature-card-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-active);
  border: 1px solid var(--color-primary-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.feature-card-icon svg {
  width: 20px;
  height: 20px;
}

.feature-card h3 {
  font-size: var(--font-size-base);
  font-weight: 700;
  margin: 0 0 0.4rem 0;
  color: var(--text-primary);
}

.feature-card p {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* ============================================================
   PERMISSION MATRIX TABLE (.perm-table)
   ============================================================ */
.perm-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.perm-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  margin: 0;
}

.perm-table thead {
  background: var(--bg-elevated);
}

.perm-table th {
  padding: 0.75rem 0.875rem;
  text-align: center;
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
}

.perm-table th:first-child {
  text-align: left;
  min-width: 200px;
}

.perm-table td {
  padding: 0.6rem 0.875rem;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.perm-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--text-primary);
}

.perm-table tr:hover td {
  background: var(--bg-hover);
}

.perm-check {
  color: var(--color-success);
  font-size: 1rem;
}

.perm-x {
  color: var(--text-disabled);
  font-size: 1rem;
}

.perm-partial {
  color: var(--color-warning);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ============================================================
   SCREENSHOT PLACEHOLDER (.screenshot-placeholder)
   ============================================================ */
.screenshot-placeholder {
  background: var(--bg-elevated);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-disabled);
}

.screenshot-placeholder svg {
  width: 40px;
  height: 40px;
  margin: 0 auto 0.75rem auto;
  display: block;
  opacity: 0.4;
}

.screenshot-placeholder p {
  font-size: var(--font-size-sm);
  margin: 0;
  color: var(--text-disabled);
}

/* ============================================================
   STEP CARDS (.step-card)
   ============================================================ */
.step-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  counter-reset: step-counter;
}

.step-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-light);
  counter-increment: step-counter;
  position: relative;
}

.step-card:last-child {
  border-bottom: none;
}

.step-number {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(255, 107, 53, 0.35);
  margin-top: 0.1rem;
}

.step-body {
  flex: 1;
}

.step-body h4 {
  margin: 0 0 0.5rem 0;
  font-size: var(--font-size-base);
  color: var(--text-primary);
}

.step-body p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.step-body .code-block {
  margin: 0.75rem 0 0 0;
}

/* ============================================================
   INFO GRID / QUICK LINKS
   ============================================================ */
.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.quick-link-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.quick-link-card svg {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.quick-link-card:hover {
  border-color: var(--color-primary-border);
  color: var(--text-primary);
  background: var(--bg-elevated);
  text-decoration: none;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  padding: 3rem 0 2.5rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 3rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-primary);
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.04em;
}

.hero-title span {
  color: var(--color-primary);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 650px;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-primary);
  color: white;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--font-size-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn-primary svg {
  width: 16px;
  height: 16px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text-secondary);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--font-size-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--color-primary-border);
  color: var(--text-primary);
  background: var(--bg-elevated);
  text-decoration: none;
}

.btn-secondary svg {
  width: 16px;
  height: 16px;
}

/* ============================================================
   SECTION CONTAINERS
   ============================================================ */
.doc-section {
  margin-bottom: 3rem;
}

.doc-section h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.doc-section h2 svg {
  width: 22px;
  height: 22px;
  color: var(--color-primary);
}

/* ============================================================
   TWO-COLUMN LAYOUT
   ============================================================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

/* ============================================================
   INFO BOX / STAT CARDS
   ============================================================ */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.stat-card-label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stat-card-value {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

/* ============================================================
   ROLE CARD
   ============================================================ */
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.role-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
}

.role-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.role-badge {
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.role-super-admin { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.role-admin { background: rgba(255, 107, 53, 0.15); color: #ffb08a; }
.role-manager { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }
.role-dispatcher { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.role-courier { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }
.role-accountant { background: rgba(139, 92, 246, 0.15); color: #c4b5fd; }
.role-customer { background: rgba(107, 114, 128, 0.15); color: #d1d5db; }

.role-card h4 {
  margin: 0;
  font-size: var(--font-size-base);
  color: var(--text-primary);
}

.role-card ul {
  margin: 0;
  padding-left: 1.25rem;
}

.role-card ul li {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

/* ============================================================
   SHIPMENT STATUS BADGES
   ============================================================ */
.status-created { background: rgba(107, 114, 128, 0.15); color: #9ca3af; border: 1px solid rgba(107, 114, 128, 0.3); }
.status-picked-up { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.status-in-transit { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-out-delivery { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.status-delivered { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-exception { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.status-returned { background: rgba(255, 107, 53, 0.15); color: #fb923c; border: 1px solid rgba(255, 107, 53, 0.3); }
.status-on-hold { background: rgba(234, 179, 8, 0.15); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.3); }

/* ============================================================
   API REFERENCE
   ============================================================ */
.endpoint-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin: 1.25rem 0;
  overflow: hidden;
}

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

.method-badge {
  font-size: var(--font-size-xs);
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  min-width: 50px;
  text-align: center;
}

.method-get { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.method-post { background: rgba(59, 130, 246, 0.15); color: var(--color-info); }
.method-put { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }
.method-patch { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }
.method-delete { background: rgba(239, 68, 68, 0.15); color: var(--color-danger); }

.endpoint-path {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  font-weight: 500;
}

.endpoint-desc {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-left: auto;
}

.endpoint-body {
  padding: 1.25rem;
}

.endpoint-body p {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.endpoint-body h5 {
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 1rem 0 0.5rem 0;
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.param-table th {
  padding: 0.5rem 0.75rem;
  background: var(--bg-elevated);
  text-align: left;
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.param-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: middle;
}

.param-required {
  color: var(--color-danger);
  font-size: 0.75em;
  font-weight: 700;
  margin-left: 0.2rem;
}

.param-optional {
  color: var(--text-disabled);
  font-size: 0.75em;
  margin-left: 0.2rem;
}

/* ============================================================
   CHANGELOG
   ============================================================ */
.changelog-entry {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-light);
}

.changelog-version {
  text-align: right;
}

.changelog-version-number {
  font-size: var(--font-size-lg);
  font-weight: 800;
  color: var(--color-primary);
  font-family: var(--font-mono);
}

.changelog-version-date {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.changelog-content h3 {
  font-size: var(--font-size-lg);
  margin: 0 0 1rem 0;
  color: var(--text-primary);
}

.changelog-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.changelog-items li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.4rem 0;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  border-bottom: none;
  margin: 0;
}

.changelog-items li::before {
  content: '✦';
  color: var(--color-primary);
  font-size: 0.6rem;
  flex-shrink: 0;
  margin-top: 0.35rem;
}

/* ============================================================
   FOOTER (.doc-footer)
   ============================================================ */
.doc-footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.doc-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.doc-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.doc-footer-brand span {
  color: var(--color-primary);
}

.doc-footer-links {
  display: flex;
  gap: 1.25rem;
}

.doc-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.doc-footer-links a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* ============================================================
   SETTINGS PAGE SPECIFIC
   ============================================================ */
.settings-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  overflow: hidden;
}

.settings-section-header {
  padding: 1.1rem 1.5rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.settings-section-header svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}

.settings-section-header h3 {
  margin: 0;
  font-size: var(--font-size-base);
  color: var(--text-primary);
}

.settings-section-body {
  padding: 1.5rem;
}

.setting-item {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
  align-items: start;
}

.setting-item:last-child {
  border-bottom: none;
}

.setting-label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.setting-path {
  font-size: var(--font-size-xs);
  font-family: var(--font-mono);
  color: var(--color-primary);
  margin-top: 0.2rem;
  background: var(--color-primary-light);
  display: inline-block;
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
}

.setting-desc {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   ENV TABLE
   ============================================================ */
.env-table th:first-child,
.env-table td:first-child {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  color: var(--color-primary);
  white-space: nowrap;
}

.env-table td:nth-child(2) {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* ============================================================
   ARCHITECTURE DIAGRAM
   ============================================================ */
.arch-diagram {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 1.5rem 0;
  overflow-x: auto;
}

.arch-diagram svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

/* ============================================================
   FOLDER TREE
   ============================================================ */
.folder-tree {
  background: #0d1117;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
}

.folder-tree pre {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: #e6edf3;
  line-height: 1.8;
  margin: 0;
}

.folder-tree .dir { color: #79c0ff; }
.folder-tree .file { color: #e6edf3; }
.folder-tree .comment { color: #8b949e; }

/* ============================================================
   LIFECYCLE FLOW
   ============================================================ */
.lifecycle-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin: 1.5rem 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.lifecycle-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.75rem 1rem;
}

.lifecycle-step-dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: 700;
  margin-bottom: 0.5rem;
  border: 2px solid;
}

.lifecycle-step-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
}

.lifecycle-arrow {
  color: var(--text-disabled);
  font-size: 1.2rem;
  padding: 0 0.25rem;
  margin-bottom: 1.5rem;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --content-padding: 1.75rem;
  }

  .doc-content {
    max-width: 100%;
  }

  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }

  .changelog-entry {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .changelog-version {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  :root {
    --content-padding: 1.25rem;
    --topnav-height: 56px;
  }

  /* Hide sidebar by default on mobile */
  .doc-sidebar {
    left: calc(-1 * var(--sidebar-width));
    transition: left var(--transition-base);
    z-index: 950;
    box-shadow: none;
  }

  /* Show sidebar when body has sidebar-open class */
  body.sidebar-open .doc-sidebar {
    left: 0;
    box-shadow: var(--shadow-lg);
  }

  body.sidebar-open .sidebar-overlay {
    display: block;
  }

  .doc-content {
    margin-left: 0;
  }

  .hamburger-btn {
    display: flex;
  }

  .topnav-search-wrapper {
    display: none;
  }

  .topnav-divider {
    display: none;
  }

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

  .hero-subtitle {
    font-size: 1rem;
  }

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

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

  .setting-item {
    grid-template-columns: 1fr;
  }

  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }

  .endpoint-desc { display: none; }
  .endpoint-header { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .feature-grid { grid-template-columns: 1fr; }
  .quick-links-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}

/* ============================================================
   SCROLLBAR GLOBAL
   ============================================================ */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

*::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--text-disabled);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.text-muted { color: var(--text-muted) !important; }
.text-primary-color { color: var(--color-primary) !important; }
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-sm { font-size: var(--font-size-sm) !important; }
.text-xs { font-size: var(--font-size-xs) !important; }
.font-mono { font-family: var(--font-mono) !important; }
.font-bold { font-weight: 700 !important; }
.d-flex { display: flex !important; }
.align-center { align-items: center !important; }
.gap-1 { gap: 0.5rem !important; }
.gap-2 { gap: 1rem !important; }
.w-100 { width: 100% !important; }

/* ============================================================
   TRANSITIONS & ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.doc-content {
  animation: fadeIn 0.3s ease forwards;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .doc-topnav,
  .doc-sidebar,
  .hamburger-btn {
    display: none !important;
  }

  .doc-content {
    margin-left: 0;
    margin-top: 0;
    padding: 1rem;
  }

  body {
    background: white;
    color: #000;
  }

  a {
    color: #000;
  }
}
