:root {
  --bg: #080a10;
  --surface: #0f131e;
  --surface-raised: #151b2a;
  --surface-hover: #1c253a;
  --border: #26334e;
  --border-light: #324367;
  --text: #eef3fc;
  --text-muted: #9aa9c7;
  --text-dim: #6b7b9e;
  --primary: #4285f4;
  --primary-glow: rgba(66, 133, 244, 0.25);
  --accent: #34a853;
  --accent-glow: rgba(52, 168, 83, 0.25);
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-badge {
  background: linear-gradient(135deg, #4285f4, #34a853);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.title-group h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.title-group p {
  font-size: 12px;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.progress-bar-bg {
  width: 140px;
  height: 8px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
}

.progress-percent {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  min-width: 32px;
}

/* Layout */
.app-container {
  display: flex;
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Sidebar */
.sidebar {
  width: 300px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nav-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  padding-left: 8px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-item a:hover {
  background: var(--surface-raised);
  color: var(--text);
}

.nav-item.active a {
  background: var(--surface-hover);
  color: #fff;
  border-left: 3px solid var(--primary);
}

.step-num {
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-dim);
}

.nav-item.active .step-num {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 40px 48px;
  max-width: 900px;
}

.lesson-section {
  display: none;
  flex-direction: column;
  gap: 28px;
}

.lesson-section.active {
  display: flex;
}

.lesson-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.lesson-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--primary);
  margin-bottom: 8px;
}

.lesson-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.lesson-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Content Blocks */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--border-light);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.code-block {
  background: #05070c;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s;
}

.copy-btn:hover {
  background: var(--surface-raised);
  color: var(--text);
  border-color: var(--border-light);
}

pre {
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #cfdbec;
}

/* Interactive Checkpoints */
.checkpoint-box {
  background: var(--surface-raised);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkpoint-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkpoint-desc {
  font-size: 14px;
  color: var(--text-muted);
}

.checkpoint-action {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Callout Alert */
.callout {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.5;
}

.callout-info {
  background: rgba(66, 133, 244, 0.08);
  border-color: rgba(66, 133, 244, 0.3);
  color: #bcd5ff;
}

.callout-warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fde68a;
}

.callout-success {
  background: rgba(52, 168, 83, 0.08);
  border-color: rgba(52, 168, 83, 0.3);
  color: #bbf7d0;
}

/* Button Navigation */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: #3b78e7;
}

.btn-secondary {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-light);
}

/* Bot Coach Widget */
.bot-coach {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
}

.coach-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.coach-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #4285f4, #9c27b0);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  color: #fff;
}

.coach-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.coach-subtitle {
  font-size: 12px;
  color: var(--text-dim);
}

.coach-body {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 900px) {
  .app-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .main-content {
    padding: 24px 16px;
  }
}


/* Checkpoint Green Checkmark on Menu Items */
.nav-item a {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px;
  position: relative;
}

.nav-item .menu-check {
  margin-left: auto;
  color: #22c55e !important;
  font-weight: 800 !important;
  font-size: 16px !important;
  line-height: 1 !important;
  display: none;
}

.nav-item.completed .menu-check {
  display: inline-block !important;
}

/* Step FAQ Drawer & Accordion */
.step-faq-drawer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 24px;
  margin-bottom: 24px;
}

.step-faq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.step-faq-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-accordion-item:hover {
  border-color: rgba(66, 133, 244, 0.4);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-question:hover {
  background: rgba(255, 255, 255, 0.02);
}

.faq-toggle-icon {
  font-size: 16px;
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

.faq-answer {
  padding: 0 16px 14px 16px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  display: none;
}

.faq-answer.show {
  display: block;
}

.faq-answer p {
  margin: 0;
}

/* Floating Ask Orbit Coach */
.orbit-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  border: 1px solid rgba(96, 165, 250, 0.4);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
  z-index: 999;
  transition: all 0.2s ease;
}

.orbit-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.6);
}

.orbit-fab-icon {
  font-size: 18px;
}

.orbit-panel {
  position: fixed;
  bottom: 84px;
  right: 24px;
  width: 400px;
  max-width: calc(100vw - 48px);
  max-height: 580px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
}

.orbit-header {
  padding: 14px 18px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.orbit-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.orbit-avatar {
  font-size: 22px;
}

.orbit-name {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
}

.orbit-sub {
  font-size: 11px;
  color: #94a3b8;
}

.orbit-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.orbit-close-btn:hover {
  color: #fff;
}

.orbit-chat-box {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  max-height: 300px;
  background: #0b1120;
}

.orbit-msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 90%;
}

.orbit-msg.bot {
  background: #1e293b;
  color: #e2e8f0;
  align-self: flex-start;
  border: 1px solid #334155;
}

.orbit-msg.user {
  background: #2563eb;
  color: #fff;
  align-self: flex-end;
}

.orbit-msg .msg-author {
  font-size: 11px;
  font-weight: 700;
  color: #60a5fa;
  margin-bottom: 4px;
}

.orbit-quick-section {
  padding: 10px 16px;
  background: #131c2e;
  border-top: 1px solid #1e293b;
  border-bottom: 1px solid #1e293b;
}

.quick-title {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.quick-qs-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-q-btn {
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #334155;
  border-radius: 6px;
  color: #cbd5e1;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.quick-q-btn:hover {
  background: rgba(37, 99, 235, 0.2);
  border-color: #3b82f6;
  color: #fff;
}

.orbit-input-row {
  padding: 12px 16px;
  background: #0f172a;
  display: flex;
  gap: 8px;
}

.orbit-input {
  flex: 1;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.orbit-input:focus {
  border-color: #3b82f6;
}

.orbit-send-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.orbit-send-btn:hover {
  background: #1d4ed8;
}

/* Modal Overlay & Dialog */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-content {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  width: 720px;
  max-width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.modal-header {
  padding: 18px 24px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-search-box {
  padding: 16px 24px;
  background: #131c2e;
  border-bottom: 1px solid #334155;
}

.modal-search-input {
  width: 100%;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.modal-search-input:focus {
  border-color: #3b82f6;
}

.modal-faqs-list {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
