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

:root {
  /* Dark Mode Variables (Default) */
  --bg: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #1c2128;
  --bg-card: #21262d;
  --border: #30363d;
  --border-light: #484f58;
  --text: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent: #58a6ff;
  --accent-green: #3fb950;
  --accent-purple: #bc8cff;
  --accent-orange: #d29922;
  --accent-red: #f85149;
  --accent-cyan: #39d2c0;
  --accent-pink: #f778ba;
  --code-bg: #161b22;
  --shadow: rgba(0, 0, 0, 0.4);
  --glass-bg: rgba(22, 27, 34, 0.8);
  
  --sidebar-w: 280px;
  --right-sidebar-w: 240px;
  --nav-h: 64px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

[data-theme="light"] {
  /* Light Mode Variables */
  --bg: #f6f8fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f3f4f6;
  --bg-card: #ffffff;
  --border: #d0d7de;
  --border-light: #afb8c1;
  --text: #24292f;
  --text-secondary: #57606a;
  --text-muted: #6e7781;
  --accent: #0969da;
  --accent-green: #1a7f37;
  --accent-purple: #8250df;
  --accent-orange: #9a6700;
  --accent-red: #cf222e;
  --accent-cyan: #05988a;
  --accent-pink: #bf3989;
  --code-bg: #f6f8fa;
  --shadow: rgba(0, 0, 0, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.85);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* ===== APP LOADER ===== */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  transition: opacity 0.5s, visibility 0.5s;
}
#loader.hidden {
  opacity: 0;
  visibility: hidden;
}
.loader-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loader-text {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== TOPNAV BAR ===== */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--glass-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 100;
  gap: 16px;
  backdrop-filter: blur(12px);
  transition: background 0.3s, border-color 0.3s;
}
.topnav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.topnav-logo svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent);
}
.topnav-tabs {
  display: flex;
  gap: 4px;
  margin-left: 24px;
}
.topnav-tab {
  padding: 6px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s;
}
.topnav-tab:hover {
  background: var(--bg-card);
  color: var(--text);
}
.topnav-tab.active {
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.topnav-search {
  position: relative;
  width: 280px;
  margin-left: auto;
}
.topnav-search input {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px 6px 32px;
  color: var(--text);
  font-size: 13px;
  width: 100%;
  outline: none;
  font-family: var(--font);
  transition: all 0.2s;
}
.topnav-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}
.topnav-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  fill: var(--text-muted);
}
.theme-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.theme-btn:hover {
  color: var(--text);
  background: var(--bg-card);
}
.theme-btn svg {
  width: 16px;
  height: 16px;
}

/* ===== APP LAYOUT FRAME ===== */
.layout {
  display: flex;
  margin-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
}

/* ===== LEFT NAVIGATION SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--nav-h));
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 24px 0;
  z-index: 50;
  transition: transform 0.3s, background 0.3s, border-color 0.3s;
}
.sidebar-group {
  margin-bottom: 20px;
}
.sidebar-group-title {
  padding: 0 24px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 24px 8px 32px;
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all 0.15s;
  cursor: pointer;
}
.sidebar-link:hover {
  color: var(--text);
  background: rgba(88, 166, 255, 0.05);
}
.sidebar-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(88, 166, 255, 0.08);
  font-weight: 600;
}
.sidebar-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.7;
}

/* ===== MAIN CONTENT AREA ===== */
.main {
  margin-left: var(--sidebar-w);
  margin-right: var(--right-sidebar-w);
  flex: 1;
  padding: 48px 64px 96px;
  max-width: 960px;
  min-width: 0;
}

/* ===== RIGHT METADATA SIDEBAR ===== */
.right-sidebar {
  position: fixed;
  top: var(--nav-h);
  right: 0;
  width: var(--right-sidebar-w);
  height: calc(100vh - var(--nav-h));
  padding: 32px 24px;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  background: var(--bg);
}
.right-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.right-link {
  display: block;
  padding: 6px 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 1px solid var(--border);
  padding-left: 12px;
  transition: all 0.15s;
}
.right-link:hover, .right-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
}
.right-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}
.right-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.right-meta span {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== GENERAL TYPOGRAPHY & BLOCKS ===== */
.section {
  display: none;
  animation: fadeIn 0.4s ease-out;
}
.section.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.75px;
  margin-bottom: 12px;
  line-height: 1.25;
}
.section h1 {
  background: linear-gradient(135deg, var(--text) 50%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 16px;
  line-height: 1.5;
}
.description {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 720px;
}
h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 40px 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 14px;
  color: var(--text);
}
p {
  font-size: 14.5px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

/* ===== ALERTS & CALLOUTS ===== */
.callout {
  border-left: 4px solid;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 14px;
}
.callout-info {
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.05);
  color: var(--text-secondary);
}
.callout-warn {
  border-color: var(--accent-orange);
  background: rgba(210, 153, 34, 0.05);
  color: var(--text-secondary);
}
.callout-danger {
  border-color: var(--accent-red);
  background: rgba(248, 81, 73, 0.05);
  color: var(--text-secondary);
}
.callout-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
}

/* ===== CHIPS, BADGES, AND LABELS ===== */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.badge-accent {
  background: rgba(88, 166, 255, 0.1);
  border-color: rgba(88, 166, 255, 0.3);
  color: var(--accent);
}
.badge-green {
  background: rgba(63, 185, 80, 0.1);
  border-color: rgba(63, 185, 80, 0.3);
  color: var(--accent-green);
}
.badge-orange {
  background: rgba(210, 153, 34, 0.1);
  border-color: rgba(210, 153, 34, 0.3);
  color: var(--accent-orange);
}
.badge-purple {
  background: rgba(188, 140, 255, 0.1);
  border-color: rgba(188, 140, 255, 0.3);
  color: var(--accent-purple);
}
.badge-red {
  background: rgba(248, 81, 73, 0.1);
  border-color: rgba(248, 81, 73, 0.3);
  color: var(--accent-red);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(63, 185, 80, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(63, 185, 80, 0.2);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(1.1); }
}

.progress-bar {
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
  margin: 6px 0;
  border: 1px solid var(--border);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
  transition: width 1.5s ease;
}

/* ===== INTERACTIVE UI MOCKUPS (CSS EMBEDDED) ===== */
.mockup-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin: 28px 0;
  box-shadow: 0 10px 30px var(--shadow);
}
.mockup-header {
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mockup-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.mockup-dot.red { background: #ff5f56; }
.mockup-dot.yellow { background: #ffbd2e; }
.mockup-dot.green { background: #27c93f; }
.mockup-title {
  margin-left: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* --- MOCKUP: CHATBOT UI --- */
.chat-window {
  height: 480px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.chat-banner {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-msg {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  animation: slideUp 0.3s ease-out;
}
.chat-msg.bot {
  background: var(--bg-card);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  border: 1px solid var(--border);
}
.chat-msg.user {
  background: var(--accent);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}
.chat-citations {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.citation-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11.5px;
  cursor: help;
  position: relative;
  transition: all 0.2s;
}
.citation-card:hover {
  border-color: var(--accent);
  background: var(--bg-card);
}
.citation-excerpt {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-secondary);
  box-shadow: 0 4px 12px var(--shadow);
  z-index: 10;
  margin-bottom: 6px;
}
.citation-card:hover .citation-excerpt {
  display: block;
}
.feedback-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
}
.feedback-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.feedback-btn:hover {
  background: var(--bg-card);
  color: var(--text);
}
.feedback-btn.active {
  background: rgba(88, 166, 255, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}
.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}
.chat-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.chat-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(88, 166, 255, 0.05);
}
.chat-input-bar {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  display: flex;
  gap: 12px;
}
.chat-input-bar input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text);
  outline: none;
  font-size: 13.5px;
}
.chat-input-bar input:focus {
  border-color: var(--accent);
}
.chat-send-btn {
  background: var(--accent);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: opacity 0.2s;
}
.chat-send-btn:hover {
  opacity: 0.9;
}
.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 20px;
  padding-left: 4px;
}
.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing-bounce 1s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* --- MOCKUP: ADMIN PANEL / LOGIN --- */
.login-gate-mock {
  padding: 40px;
  background: var(--bg-secondary);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 380px;
}
.login-card {
  width: 100%;
  max-width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 8px 24px var(--shadow);
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-group input, .form-group select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text);
  outline: none;
  font-family: var(--font);
  font-size: 13.5px;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--accent);
}
.btn-primary {
  width: 100%;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 9px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13.5px;
  transition: opacity 0.2s;
}
.btn-primary:hover {
  opacity: 0.9;
}

/* --- MOCKUP: ADMIN DASHBOARD --- */
.admin-dashboard-layout {
  display: flex;
  height: 520px;
}
.admin-sidebar {
  width: 160px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
}
.admin-sidebar-link {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  border-left: 2px solid transparent;
}
.admin-sidebar-link:hover {
  background: rgba(88, 166, 255, 0.05);
  color: var(--text);
}
.admin-sidebar-link.active {
  background: rgba(88, 166, 255, 0.08);
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}
.admin-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: var(--bg);
}
.grid-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat-mini-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.stat-mini-label {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}
.stat-mini-val {
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
  color: var(--text);
}
.mizen-model-pipeline {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}
.mizen-model-row {
  margin-bottom: 12px;
}
.mizen-model-row:last-child {
  margin-bottom: 0;
}
.mizen-model-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}
.file-upload-zone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-card);
  transition: all 0.2s;
}
.file-upload-zone:hover {
  border-color: var(--accent);
}
.checklist-status {
  margin-top: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  margin-bottom: 6px;
}
.checklist-item:last-child {
  margin-bottom: 0;
}
.checklist-icon {
  font-size: 14px;
}
.checklist-icon.pass { color: var(--accent-green); }
.checklist-icon.fail { color: var(--accent-red); }

/* --- GRID LAYOUT TABLES --- */
.mock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.mock-table th {
  background: var(--bg-tertiary);
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--text-muted);
}
.mock-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.mock-table tr:hover td {
  background: rgba(88, 166, 255, 0.02);
}

/* ===== REUSABLE DESIGN SYSTEMS ===== */
/* --- GRID PATTERNS --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  transition: all 0.25s;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-green));
  opacity: 0;
  transition: opacity 0.25s;
}
.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
}
.feature-card:hover::before {
  opacity: 1;
}
.feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
}
.feature-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* --- TABS SYSTEM --- */
.tab-container {
  margin: 24px 0;
}
.tab-header {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.tab-btn {
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.tab-btn:hover {
  color: var(--text);
}
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.tab-content {
  display: none;
  padding: 20px 0;
}
.tab-content.active {
  display: block;
}

/* --- COLLAPSIBLE ACCORDIONS --- */
.accordion {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.accordion:hover {
  border-color: var(--border-light);
}
.accordion-header {
  padding: 16px 20px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  user-select: none;
}
.accordion-arrow {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.25s;
}
.accordion.open .accordion-arrow {
  transform: rotate(180deg);
}
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: var(--bg-card);
}
.accordion.open .accordion-body {
  max-height: 500px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

/* --- TIMELINES --- */
.timeline {
  display: flex;
  flex-direction: column;
  margin: 24px 0;
}
.timeline-item {
  display: flex;
  gap: 16px;
  position: relative;
}
.timeline-marker {
  width: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
  z-index: 1;
}
.timeline-dot.green { border-color: var(--accent-green); }
.timeline-dot.purple { border-color: var(--accent-purple); }
.timeline-dot.orange { border-color: var(--accent-orange); }
.timeline-dot.red { border-color: var(--accent-red); }
.timeline-line {
  width: 2px;
  flex: 1;
  background: var(--border);
  min-height: 36px;
}
.timeline-item:last-child .timeline-line {
  background: transparent;
}
.timeline-content {
  padding-bottom: 24px;
  flex: 1;
}
.timeline-content h4 {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}
.timeline-content p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
}

/* --- CODE BLOCKS & SYNTAX HIGHLIGHT --- */
.code-block {
  position: relative;
  margin: 20px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}
.code-header .lang {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.copy-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 10px;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}
.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.copy-btn.copied {
  color: var(--accent-green);
  border-color: var(--accent-green);
}
pre {
  background: var(--code-bg);
  padding: 16px;
  overflow-x: auto;
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
}
pre .comment { color: var(--text-muted); }
pre .cmd { color: var(--accent-green); }
pre .flag { color: var(--accent-cyan); }
pre .url { color: var(--accent-orange); }
pre .string { color: var(--accent-cyan); }
pre .keyword { color: var(--accent-purple); }

.inline-code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-cyan);
}

/* --- API REFERENCE TABLE --- */
.api-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin: 20px 0;
}
.api-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.api-table td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  vertical-align: top;
}
.api-table tr:hover td {
  background: rgba(88, 166, 255, 0.02);
}
.method {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}
.method-get { background: rgba(63, 185, 80, 0.15); color: var(--accent-green); }
.method-post { background: rgba(88, 166, 255, 0.15); color: var(--accent); }
.method-put { background: rgba(210, 153, 34, 0.15); color: var(--accent-orange); }
.method-delete { background: rgba(248, 81, 73, 0.15); color: var(--accent-red); }
.api-path {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

/* ===== FOOTER BAR ===== */
.footer {
  margin-left: var(--sidebar-w);
  margin-right: var(--right-sidebar-w);
  padding: 32px 64px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--bg);
}
.footer a {
  color: var(--text-secondary);
  text-decoration: none;
}
.footer a:hover {
  color: var(--accent);
}

/* ===== MOBILE MOBILE CONTROLS ===== */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */
@media (max-width: 1160px) {
  .right-sidebar {
    display: none;
  }
  .main {
    margin-right: 0;
  }
  .footer {
    margin-right: 0;
  }
}
@media (max-width: 800px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main {
    margin-left: 0;
    padding: 32px 24px 64px;
  }
  .footer {
    margin-left: 0;
    padding: 24px 20px;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .topnav-tabs {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
}
