/* InstantGPU Customer Guide - Design matching RunPod / Mintlify */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #ffffff;
  --bg-subtle: #f8fafc;
  --sidebar-bg: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.85);
  --text: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-hover-border: #cbd5e1;
  --card-hover-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
  --primary: #5f4cfe;
  --primary-hover: #4f3ce3;
  --primary-light: #7c6cfc;
  --primary-bg: rgba(95, 76, 254, 0.08);
  --tag-bg: rgba(95, 76, 254, 0.1);
  --tag-text: #5f4cfe;
  --accent-green: #00dc82;
  --code-bg: #0f172a;
  --code-text: #f8fafc;
  --code-border: #1e293b;
  --search-bg: #f8fafc;
  --search-border: #e2e8f0;
  --search-key-bg: #ffffff;
  --search-key-border: #cbd5e1;
  --floating-bar-bg: #ffffff;
  --floating-bar-border: #e2e8f0;
  --floating-bar-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  --modal-bg: #ffffff;
  --modal-backdrop: rgba(15, 23, 42, 0.5);
  --sidebar-width: 290px;
  --toc-width: 220px;
  --logo-display-light: block;
  --logo-display-dark: none;
}

html[data-theme="dark"] {
  --bg: #0c0c10;
  --bg-subtle: #111116;
  --sidebar-bg: #0c0c10;
  --header-bg: rgba(12, 12, 16, 0.88);
  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --border-subtle: #172033;
  --card-bg: #121218;
  --card-border: #1e293b;
  --card-hover-border: #334155;
  --card-hover-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  --primary: #8172fc;
  --primary-hover: #988bfc;
  --primary-light: #b0a6fe;
  --primary-bg: rgba(129, 114, 252, 0.12);
  --tag-bg: rgba(129, 114, 252, 0.15);
  --tag-text: #b0a6fe;
  --accent-green: #00dc82;
  --code-bg: #07070a;
  --code-text: #f1f5f9;
  --code-border: #1e293b;
  --search-bg: #14141c;
  --search-border: #262635;
  --search-key-bg: #1d1d28;
  --search-key-border: #333345;
  --floating-bar-bg: #14141c;
  --floating-bar-border: #262635;
  --floating-bar-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --modal-bg: #14141c;
  --modal-backdrop: rgba(0, 0, 0, 0.7);
  --logo-display-light: none;
  --logo-display-dark: block;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: inherit; text-decoration: none; }

.app-container { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  top: 0; bottom: 0; left: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform 0.25s ease, background 0.2s ease, border-color 0.2s ease;
}

.sidebar-header {
  padding: 20px 22px 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}


.logo-brand-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-decoration: none;
}

.logo-icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.logo-brand-text {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #09090b;
  white-space: nowrap;
  line-height: 1;
}

html[data-theme="dark"] .logo-brand-text {
  color: #fafafa;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  max-width: 145px;
  text-decoration: none;
}

.logo-img {
  height: 50px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.15s ease;
}

.logo-img-light {
  display: var(--logo-display-light, block);
}

.logo-img-dark {
  display: var(--logo-display-dark, none);
}

/* THEME SWITCH PILL */
.theme-switch-pill {
  display: flex;
  align-items: center;
  padding: 3px;
  border-radius: 9999px;
  background: var(--search-bg);
  border: 1px solid var(--border);
  gap: 2px;
}

.theme-btn {
  background: transparent;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.theme-btn svg { width: 14px; height: 14px; }
.theme-btn:hover { color: var(--text); }
.theme-btn svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.theme-btn.active {
  background: #ffffff;
  color: var(--primary) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
}

html[data-theme="dark"] .theme-btn.active {
  background: #2a2a3c;
  color: #a89bfd !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* SEARCH BUTTON */
.sidebar-search-box { padding: 0 20px 14px 20px; }

.search-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: var(--search-bg);
  border: 1px solid var(--search-border);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.search-trigger:hover {
  border-color: var(--card-hover-border);
  color: var(--text);
}

.search-left { display: flex; align-items: center; gap: 8px; }

.search-key-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--search-key-bg);
  border: 1px solid var(--search-key-border);
  color: var(--text-muted);
}

/* SIDEBAR NAVIGATION LIST */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 20px 16px;
  scrollbar-width: thin;
}

.nav-group { margin-bottom: 24px; }

.nav-group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: -0.01em;
}

.nav-links { list-style: none; margin-top: 4px; }

.nav-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  font-size: 13.5px;
  color: var(--text-secondary);
  border-radius: 8px;
  margin-bottom: 2px;
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
}

.nav-item a:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.nav-item.active a {
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-bg);
  border-left: 3px solid var(--primary);
  padding-left: 10px;
}

.badge-new {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--tag-bg);
  color: var(--tag-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.footer-link:hover { color: var(--text); }

/* MAIN CONTENT */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.top-navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
}

.top-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.top-tab-item a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 14px 2px;
  position: relative;
  display: inline-block;
  transition: color 0.15s ease;
}

.top-tab-item a:hover { color: var(--text); }

.top-tab-item.active a {
  color: var(--text);
  font-weight: 600;
}

.top-tab-item.active a::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

.top-cta-btn {
  background: var(--primary);
  color: #ffffff !important;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.top-cta-btn:hover { background: var(--primary-hover); }

.content-body {
  display: flex;
  justify-content: center;
  padding: 40px 48px 450px 48px;
  gap: 48px;
}

.article-content {
  flex: 1;
  max-width: 820px;
  min-width: 0;
}

.toc-sidebar {
  width: var(--toc-width);
  position: sticky;
  top: 80px;
  height: fit-content;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  display: block;
}

.toc-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.toc-list {
  list-style: none;
  border-left: 1px solid var(--border);
}

.toc-item a {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  padding: 5px 0 5px 14px;
  line-height: 1.4;
  transition: all 0.15s ease;
}

.toc-item a:hover { color: var(--text); }

.toc-item.active a {
  color: var(--primary) !important;
  font-weight: 700 !important;
  border-left: 2px solid var(--primary) !important;
  margin-left: -1px;
}

/* ARTICLE TYPOGRAPHY */
.category-pill {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.article-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.article-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
}

.url-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 16px;
}

.copy-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.copy-page-btn:hover {
  border-color: var(--card-hover-border);
  color: var(--text);
}

.lead-text {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.body-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.tooltip-term {
  border-bottom: 1.5px dotted var(--text-muted);
  cursor: help;
  position: relative;
  font-weight: 500;
  color: var(--text);
}

.tooltip-card {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 260px;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.4;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--code-border);
  z-index: 50;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.tooltip-term:hover .tooltip-card {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 40px 0 20px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-anchor {
  opacity: 0;
  color: var(--text-muted);
  font-size: 16px;
  transition: opacity 0.15s ease;
}
.section-title:hover .header-anchor { opacity: 1; }

/* 3-CARD GET STARTED GRID */
.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.doc-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  cursor: pointer;
}

.doc-card:hover {
  border-color: var(--primary);
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-2px);
}

.card-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.card-icon-box svg { width: 20px; height: 20px; }

.doc-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.doc-card-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-ext-icon {
  width: 14px; height: 14px;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}
.doc-card:hover .card-ext-icon {
  transform: translate(2px, -2px);
  color: var(--primary);
}

/* 2x2 & 4-GRID CARDS */
.cards-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.cards-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  transition: all 0.2s ease;
}

.feature-card:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--card-hover-shadow);
}

.feature-bullet {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 7px;
  flex-shrink: 0;
}

.feature-content h4 {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.feature-content p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* NUMBERED STEP CARDS */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 36px;
}

.step-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 22px 24px;
  transition: border-color 0.2s ease;
}

.step-card:hover { border-color: var(--card-hover-border); }

.step-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.step-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.step-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.step-option-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.step-option-box h5 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.step-option-box p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.workflow-pipeline {
  background: linear-gradient(135deg, rgba(95, 76, 254, 0.08) 0%, rgba(0, 220, 130, 0.08) 100%);
  border: 1px solid rgba(95, 76, 254, 0.2);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0;
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.pipeline-step-circle {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.pipeline-arrow { color: var(--text-muted); font-size: 14px; }

/* CODE BLOCKS */
.code-block-wrapper {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 12px;
  overflow: hidden;
  margin: 24px 0 32px 0;
}

.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(--code-border);
}

.code-tabs { display: flex; gap: 8px; }

.code-tab-btn {
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.code-tab-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.copy-code-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.copy-code-btn:hover { color: #ffffff; background: rgba(255, 255, 255, 0.06); }

.code-content { padding: 18px 20px; overflow-x: auto; }

.code-content pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--code-text);
}

.syn-kw { color: #f43f5e; font-weight: 600; }
.syn-str { color: #10b981; }
.syn-fn { color: #38bdf8; }
.syn-cmt { color: #64748b; font-style: italic; }
.syn-var { color: #fbbf24; }

/* FLOATING BOTTOM AI BAR */
.floating-ai-bar-container {
  position: fixed;
  bottom: 24px;
  left: calc(var(--sidebar-width) + (100% - var(--sidebar-width)) / 2);
  transform: translateX(-50%);
  z-index: 45;
  width: 100%;
  max-width: 460px;
  padding: 0 16px;
  pointer-events: none;
}

.floating-ai-pill {
  pointer-events: auto;
  background: var(--floating-bar-bg);
  border: 1px solid var(--floating-bar-border);
  box-shadow: var(--floating-bar-shadow);
  border-radius: 9999px;
  padding: 6px 8px 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.floating-ai-pill:hover {
  border-color: var(--primary);
  box-shadow: 0 14px 36px rgba(95, 76, 254, 0.18);
  transform: translateY(-2px);
}

.floating-ai-left { display: flex; align-items: center; gap: 10px; flex: 1; }
.floating-ai-icon { color: var(--primary); width: 16px; height: 16px; flex-shrink: 0; }
.floating-ai-text { font-size: 13.5px; color: var(--text-muted); }
.floating-ai-right { display: flex; align-items: center; gap: 8px; }

.floating-ai-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--search-bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.floating-ai-send-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.floating-ai-send-btn:hover { background: var(--primary-hover); }

/* MODALS */
.modal-backdrop {
  position: fixed; inset: 0;
  background: var(--modal-backdrop);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.modal-backdrop.open { display: flex; }

.search-modal {
  width: 100%; max-width: 580px;
  background: var(--modal-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.search-modal-input-box {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.search-modal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
}

.search-results-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 10px;
  list-style: none;
}

.search-result-item {
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.1s ease;
}

.search-result-item:hover, .search-result-item.selected {
  background: var(--primary-bg);
}

.search-result-title { font-size: 14px; font-weight: 600; color: var(--text); }
.search-result-snippet { font-size: 12.5px; color: var(--text-muted); }

.search-modal-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

/* AI DRAWER */
.ai-drawer {
  width: 100%; max-width: 520px;
  background: var(--modal-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 480px;
}

.ai-drawer-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}

.ai-drawer-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--text);
}

.ai-drawer-close {
  background: transparent; border: none;
  color: var(--text-muted); cursor: pointer; font-size: 20px;
}

.ai-drawer-messages {
  flex: 1; padding: 18px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
}

.ai-msg {
  font-size: 13.5px; line-height: 1.5;
  padding: 10px 14px; border-radius: 10px; max-width: 88%;
}

.ai-msg.bot {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text);
  align-self: flex-start;
}

.ai-msg.user {
  background: var(--primary);
  color: #ffffff;
  align-self: flex-end;
}

.ai-drawer-input-box {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px;
}

.ai-drawer-input {
  flex: 1;
  background: var(--search-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
}

.ai-drawer-send-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}

/* TOAST */
.toast-msg {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  opacity: 0; pointer-events: none;
  transition: all 0.25s ease;
  z-index: 200;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1180px) {
  .toc-sidebar { display: none; }
}

@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .mobile-menu-btn { display: block; }
  .top-tabs { display: none; }
  .content-body { padding: 30px 24px 100px 24px; }
  .cards-grid-3 { grid-template-columns: 1fr; }
  .cards-grid-2, .cards-grid-4 { grid-template-columns: 1fr; }
  .step-options-grid { grid-template-columns: 1fr; }
  .floating-ai-bar-container { left: 50%; }
}

.section-title, h2[id], h3[id] {
  scroll-margin-top: 85px;
}

/* Responsive System Theme Icon: Desktop on PC, Mobile Phone on Mobile */
.theme-btn .icon-desktop { display: block; }
.theme-btn .icon-mobile { display: none; }

@media (max-width: 768px) {
  .theme-btn .icon-desktop { display: none !important; }
  .theme-btn .icon-mobile { display: block !important; }
}
