:root {
  --bg: #090d16;
  --surface: #101626;
  --surface-raised: #162035;
  --surface-hover: #1c2944;
  --border: #233152;
  --border-light: #2e406b;
  --text: #e8ecf8;
  --text-muted: #95a3c3;
  --text-dim: #67789e;
  --primary: #4285f4;
  --primary-glow: rgba(66, 133, 244, 0.25);
  --accent: #34a853;
  --accent-glow: rgba(52, 168, 83, 0.25);
  --warning: #fbbc05;
  --danger: #ea4335;
  --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.5;
  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: 700;
  font-size: 18px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.title-group h1 {
  font-size: 19px;
  font-weight: 600;
  color: #fff;
}

.title-group p {
  font-size: 13px;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-raised);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.progress-bar-wrap {
  width: 120px;
  height: 8px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4285f4, #34a853);
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Main Layout */
.layout-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 16px;
  display: grid;
  grid-template-columns: 280px 1fr 340px;
  gap: 24px;
  flex: 1;
  width: 100%;
}

/* Sidebar Stepper */
.stepper-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 14px;
  max-height: calc(100vh - 120px);
  position: sticky;
  top: 90px;
  overflow-y: auto;
}

.stepper-heading {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  margin-bottom: 14px;
  padding-left: 8px;
}

.lesson-nav-group {
  margin-bottom: 16px;
}

.lesson-nav-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.step-nav-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.step-nav-btn.active {
  background: var(--surface-raised);
  border-color: var(--primary);
  color: #fff;
  font-weight: 500;
}

.step-nav-btn.completed .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.step-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Step Content Panel */
.content-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
}

.step-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.step-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.badge.blue {
  background: rgba(66, 133, 244, 0.15);
  color: #70a5ff;
  border: 1px solid rgba(66, 133, 244, 0.3);
}

.badge.green {
  background: rgba(52, 168, 83, 0.15);
  color: #6ed188;
  border: 1px solid rgba(52, 168, 83, 0.3);
}

.step-title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

.step-desc {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Platform Switcher */
.platform-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.platform-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.platform-tab-btn:hover {
  color: var(--text);
}

.platform-tab-btn.active {
  background: var(--surface-raised);
  border-color: var(--border-light);
  color: var(--primary);
  font-weight: 500;
}

/* Code Snippet Box */
.code-box {
  background: #080c14;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #0c121f;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
}

.copy-btn {
  background: var(--surface-raised);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.copy-btn:hover {
  color: #fff;
  background: var(--surface-hover);
}

.code-content {
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: #a8d1ff;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Checkpoint Box */
.checkpoint-box {
  background: var(--surface-raised);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.checkpoint-checkbox {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkpoint-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.checkpoint-info p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Navigation Buttons */
.step-nav-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-secondary {
  background: var(--surface-raised);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--surface-hover);
}

.btn-primary {
  background: #1a73e8;
  color: #fff;
}

.btn-primary:hover {
  background: #1557b0;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* Right Assistant / Orbit Panel */
.assistant-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  max-height: calc(100vh - 120px);
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
}

.coach-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.coach-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285f4, #9b51e0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  color: #fff;
}

.coach-meta h3 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.coach-meta p {
  font-size: 11px;
  color: var(--text-dim);
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
  margin-bottom: 14px;
}

.chat-msg {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.45;
}

.chat-msg.coach {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text);
  border-left: 3px solid var(--primary);
}

.chat-msg.user {
  background: #182848;
  border: 1px solid #233e72;
  color: #e2edff;
  align-self: flex-end;
}

.suggested-prompts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.prompt-chip {
  background: #0d1424;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}

.prompt-chip:hover {
  background: var(--surface-raised);
  color: #fff;
  border-color: var(--primary);
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  background: #080c14;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.chat-input:focus {
  border-color: var(--primary);
}

.send-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 14px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
}

/* FAQ Accordion Section */
.faq-section {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.faq-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.faq-header-row h3 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.faq-search-input {
  background: #080c14;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 16px;
  color: #fff;
  font-size: 13px;
  width: 250px;
  outline: none;
}

.faq-search-input:focus {
  border-color: var(--primary);
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  background: var(--surface-raised);
  overflow: hidden;
}

.faq-question {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-question:hover {
  background: var(--surface-hover);
}

.faq-answer {
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  border-top: 1px solid var(--border);
  background: #0c121e;
  display: none;
}

.faq-answer.show {
  display: block;
}

/* Footer / Run It Later Card */
.run-later-card {
  background: linear-gradient(180deg, #10192e, #0c1220);
  border: 1px solid #28395f;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
}

.run-later-title {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.cheat-sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.cheat-item {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.cheat-item code {
  font-family: var(--font-mono);
  color: #70a5ff;
  font-size: 12.5px;
  display: block;
  margin-bottom: 4px;
}

.cheat-item span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1100px) {
  .layout-container {
    grid-template-columns: 240px 1fr;
  }
  .assistant-panel {
    display: none;
  }
}

@media (max-width: 768px) {
  .layout-container {
    grid-template-columns: 1fr;
  }
  .stepper-panel {
    display: none;
  }
}


/* Checkpoint Green Checkmark on Menu Items (Right-aligned) */
.nav-item a,
.step-nav-item,
.step-nav-btn,
.nav-item-btn,
.nav-link {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  position: relative !important;
}

.nav-item.completed a::after,
.step-nav-item.completed::after,
.step-nav-btn.completed::after,
.nav-item-btn.completed::after,
.nav-link.completed::after {
  content: " \2713" !important;
  margin-left: auto !important;
  color: #22c55e !important;
  font-weight: 800 !important;
  font-size: 1.15rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
}
