/* Tippy Dashboard – White + Slate Modern Theme */

:root {
  --sidebar-bg: #ffffff;
  --chat-bg: #ffffff;
  --chat-msg-bg: #f1f5f9;
  --chat-msg-user-bg: #334155;
  --panel-bg: #f8fafc;

  --sidebar-text: #0f172a;
  --chat-text: #0f172a;
  --panel-text: #1e293b;

  --accent: #2563eb;
  --border-soft: #e2e8f0;
  --suggestion-bg: #eff6ff;
  --suggestion-hover: #dbeafe;
}

body {
  margin: 0;
  font-family: system-ui;
  background: #f1f5f9;
  color: var(--chat-text);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.landing-action {
  font-family: system-ui;
}

.dashboard-container {
  display: flex;
  height: 90vh;
  width: 95vw;
  max-width: 1600px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
  background: #ffffff;
  font-family: system-ui;
}

.tippyText {
  font-family: cursive;
}

.left-sidebar {
  width: 230px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-right: 1px solid var(--border-soft);
  font-family: system-ui;
}

.left-sidebar h2 {
  margin: 0;
  font-weight: 600;
}

.left-sidebar p {
  font-size: 13px;
  opacity: 0.7;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: system-ui;
}

.left-sidebar select,
.left-sidebar input {
  font-family: system-ui;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: #ffffff;
  color: #0f172a;
}

.left-sidebar select.locked {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid var(--border-soft);
  cursor: default;
  opacity: 1;
  font-weight: 600;
  pointer-events: none;
}

.left-sidebar button {
  padding: 9px;
  border-radius: 8px;
  border: none;
  background: #334155;
  color: #ffffff;
  cursor: pointer;
  transition: 0.2s ease;
}

.left-sidebar button:hover {
  background: #1e293b;
}

.status {
  margin-top: auto;
  font-size: 13px;
}

.status-dot {
  height: 8px;
  width: 8px;
  background: red;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.status-dot.connected {
  background: #22c55e;
}

.status-dot.auth-failed {
  background: #dc2626;
}

.left-sidebar input.auth-failed {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
}

.main-wrapper {
  flex: 1;
  display: flex;
  transition: all 0.3s ease;
  padding: 20px;
  gap: 20px;
  box-sizing: border-box;
}

.chat-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.chat-card {
  width: 100%;
  max-width: 850px;
  background: var(--chat-bg);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.chat-card.chat-disabled {
  pointer-events: none;
}

.chat-card.chat-disabled .chat-input {
  opacity: 0.35;
  filter: grayscale(40%);
}

.chat-header {
  display: inline-flex;
  justify-content: space-between;
  padding: 20px 30px;
  border-bottom: 1px solid var(--border-soft);
  font-weight: 600;
  font-size: 15px;
  align-items: center;
  font-family: sans-serif;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.subject-banner {
  display: none;
  font-size: 13px;
  font-weight: 500;
  color: #2563eb;
  background: #eff6ff;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.subject-banner.visible {
  display: inline-block;
}

/* Onboarding prompt card */
.onboarding-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 32px;
  height: 100%;
  color: #475569;
}

.onboarding-prompt .onboarding-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.onboarding-prompt h3 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.onboarding-prompt p {
  margin: 0 0 28px;
  font-size: 14px;
  color: #94a3b8;
}

.onboarding-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 340px;
}

.onboarding-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  text-align: left;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.onboarding-step.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  transition: background 0.3s ease, color 0.3s ease;
}

.onboarding-step.done .step-number {
  background: #22c55e;
  color: #fff;
}

.onboarding-step.auth-failed {
  background: #fef2f2;
  border-color: #fca5a5;
}

.onboarding-step.auth-failed .step-number {
  background: #dc2626;
  color: #fff;
}

.step-text {
  font-size: 14px;
  color: #334155;
  line-height: 1.4;
}

.chat-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  font-family: system-ui;
}

.backend-message,
.user-message {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 14px;
  max-width: 75%;
  font-size: 14px;
  line-height: 1.6;
}

.backend-message {
  background: var(--chat-msg-bg);
  color: #0f172a;
  position: relative;
  padding-right: 48px;
}

.backend-message.streaming {
  /* No animation or cursor - clean streaming */
  position: relative;
}

.backend-message.streaming::after {
  /* No cursor during streaming */
  display: none;
}

.backend-message.stream-complete {
  animation: none;
}

.backend-message.stream-complete::after {
  display: none;
}

.tts-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding: 4px 8px;
  font-size: 14px;
  background: transparent;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s, background 0.15s;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.tts-button:hover {
  opacity: 1;
  background: #e2e8f0;
}

.tts-button.tts-speaking {
  opacity: 1;
  background: #dbeafe;
  border-color: #93c5fd;
}

@keyframes pulse-subtle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.95;
  }
}

@keyframes blink-cursor {
  50% {
    opacity: 0;
  }
}

.user-message {
  background: var(--chat-msg-user-bg);
  color: #ffffff;
  margin-left: auto;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.typing-indicator {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 10px 14px;
  background: #e2e8f0;
  border-radius: 12px;
  max-width: 75%;
  align-self: flex-start;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #475569;
  border-radius: 50%;
  animation: blink 1.4s infinite both;
}

.typing-indicator span:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {

  0%,
  80%,
  100% {
    opacity: 0;
  }

  40% {
    opacity: 1;
  }
}

.chat-input {
  display: flex;
  padding: 16px;
  border-top: 1px solid var(--border-soft);
  gap: 10px;
  font-family: system-ui;
}

.chat-input input {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: #ffffff;
  color: #0f172a;
  font-family: system-ui;
}

.chat-input button {
  padding: 12px 18px;
  border-radius: 10px;
  border: none;
  background: #334155;
  color: #ffffff;
  cursor: pointer;
  transition: 0.2s ease;
}

.chat-input button:hover:not(:disabled) {
  background: #1e293b;
}

.chat-input button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.record-button {
  padding: 12px 16px !important;
  font-size: 18px;
  background: #64748b !important;
  min-width: 48px;
}

.record-button:hover:not(:disabled) {
  background: #475569 !important;
}

.record-button.recording {
  background: #dc2626 !important;
  animation: pulse 1.5s infinite;
}

.record-button.recording:hover {
  background: #b91c1c !important;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.right-panel {
  width: 310px;
  background: #f8fafc;
  color: var(--panel-text);
  border-left: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 14px 20px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-soft);
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  font-size: 13px;
}

.panel-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-soft);
  background: #ffffff;
  flex-shrink: 0;
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  border-radius: 34px;
  transition: 0.3s;
}

.slider:before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked+.slider {
  background-color: #000000;
}

input:checked+.slider:before {
  transform: translateX(18px);
}

.landing-container {
  width: 95vw;
  max-width: 600px;
  height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.landing-card {
  width: 100%;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
  padding: 60px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.landing-card h2 {
  margin: 0;
  font-size: 32px;
  color: #0f172a;
}

.landing-card p {
  margin: 6px 0 0;
  font-size: 14px;
  opacity: 0.7;
}

.landing-card select {
  padding: 10px 40px 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  font-size: 15px;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
}

.backend-message p {
  margin: 0.4rem 0;
}

.backend-message ul,
.backend-message ol {
  padding-left: 1.5rem;
  margin: 0.4rem 0;
}

.backend-message li {
  margin: 0.25rem 0;
}

.backend-message h1,
.backend-message h2,
.backend-message h3 {
  color: #0f172a;
  margin: 0.6rem 0 0.3rem;
}

.backend-message blockquote {
  border-left: 3px solid #2563eb;
  padding-left: 0.75rem;
  color: #64748b;
  margin: 0.5rem 0;
}

/* MCQ Quiz Forms */

.mcq-form {
  width: 100%;
  max-width: 600px;
  margin: 0.75rem auto;
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 1.25rem;
}

.mcq-header {
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-soft);
}

.mcq-question {
  margin-bottom: 1.25rem;
}

.mcq-question-text {
  color: #0f172a;
  line-height: 1.6;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.mcq-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mcq-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.65rem 0.9rem;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s ease;
  font-size: 0.95rem;
}

.mcq-option:hover {
  border-color: var(--accent);
  background: #f1f5f9;
}

.mcq-option input[type='radio'],
.mcq-option input[type='checkbox'] {
  margin-top: 0.2rem;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.mcq-option.correct {
  border-color: #16a34a;
  background: #ecfdf5;
}

.mcq-option.incorrect {
  border-color: #dc2626;
  background: #fef2f2;
}

.submit-answers-btn {
  margin-top: 1rem;
  width: 100%;
  padding: 0.85rem;
  background: #3f4b5b;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.submit-answers-btn:hover:not(:disabled) {
  background: #2f3a48;
}

.submit-answers-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

/* ---------------------------------------------------------------------------
   Onboarding Forms (single combined form with all lesson plan fields)
   --------------------------------------------------------------------------- */

.onboarding-form {
  width: 100%;
  max-width: 600px;
  margin: 0.75rem auto;
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 1.5rem;
}

/* Compact form when inside the lesson plan panel */
.lesson-plan-outline .onboarding-form {
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.lesson-plan-outline .onboarding-form-header {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
}

.lesson-plan-outline .onboarding-section {
  margin-bottom: 1.25rem;
  padding-bottom: 0.9rem;
}

.lesson-plan-outline .onboarding-section-label {
  font-size: 0.85rem;
  gap: 0.5rem;
}

.lesson-plan-outline .onboarding-step-number {
  width: 1.3rem;
  height: 1.3rem;
  font-size: 0.7rem;
}

.lesson-plan-outline .onboarding-form-options {
  padding-left: 1.8rem;
  gap: 0.4rem;
}

.lesson-plan-outline .onboarding-option-btn {
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

.lesson-plan-outline .onboarding-other-section {
  padding-left: 1.8rem;
}

.lesson-plan-outline .onboarding-other-input {
  font-size: 0.8rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
}

.lesson-plan-outline .onboarding-submit-btn {
  font-size: 0.85rem;
  padding: 0.7rem;
  border-radius: 10px;
}

.onboarding-form.submitted {
  opacity: 0.75;
  pointer-events: none;
}

.onboarding-form-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-soft);
}

.onboarding-section {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.onboarding-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0.5rem;
  padding-bottom: 0;
}

.onboarding-section-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.65rem;
}

.onboarding-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--accent, #3b82f6);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.onboarding-form-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 2.2rem;
}

.onboarding-option-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 1rem;
  background: #ffffff;
  border: 2px solid var(--border-soft);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  color: #334155;
  font-family: inherit;
  line-height: 1.4;
}

.onboarding-option-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: #eef4ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.onboarding-option-btn.selected {
  border-color: var(--accent);
  background: #dbeafe;
  color: #1e40af;
  font-weight: 600;
}

.onboarding-option-btn:disabled {
  cursor: default;
  opacity: 0.7;
}

.onboarding-other-section {
  margin-top: 0.5rem;
  padding-left: 2.2rem;
}

.onboarding-other-label {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.onboarding-other-input {
  width: 100%;
  padding: 0.55rem 0.9rem;
  border: 2px solid var(--border-soft);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #334155;
  background: #ffffff;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.onboarding-other-input:focus {
  outline: none;
  border-color: var(--accent);
}

.onboarding-submit-btn {
  margin-top: 0.75rem;
  width: 100%;
  padding: 0.85rem;
  background: #3f4b5b;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  font-family: inherit;
}

.onboarding-submit-btn:hover:not(:disabled) {
  background: #2f3a48;
}

.onboarding-submit-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.onboarding-section.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* ---------------------------------------------------------------------------
   Suggestions Tray (above input, below messages)
   --------------------------------------------------------------------------- */

.suggestions-tray {
  padding: 8px 16px 4px;
  border-top: 1px solid var(--border-soft);
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  background: #ffffff;
}

.tray-suggestion-btn {
  padding: 5px 13px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  font-family: system-ui;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  line-height: 1.4;
}

.tray-suggestion-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* ---------------------------------------------------------------------------
   Lesson Plan Outline (right panel — timeline style)
   --------------------------------------------------------------------------- */

.lesson-plan-outline {
  padding: 20px 16px 24px;
  overflow-y: auto;
  height: 100%;
  box-sizing: border-box;
}

.lesson-plan-placeholder {
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
  margin-top: 48px;
  line-height: 1.7;
  padding: 0 12px;
}

/* Header card */
.lesson-plan-header-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 22px;
  color: #ffffff;
}

.lesson-plan-topic {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  margin-bottom: 5px;
}

.lesson-plan-goal {
  font-size: 12px;
  opacity: 0.8;
  line-height: 1.5;
  margin-bottom: 10px;
}

.lesson-plan-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.lesson-plan-badge {
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: capitalize;
}

/* Progress bar */
.lesson-progress-bar-wrap {
  margin-bottom: 20px;
}

.lesson-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lesson-progress-bar {
  height: 5px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.lesson-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Timeline */
.lesson-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

/* Vertical connector line */
.lesson-steps::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: #e2e8f0;
  border-radius: 2px;
}

.lesson-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0 0 16px 0;
  position: relative;
  transition: opacity 0.3s ease;
}

.lesson-step:last-child {
  padding-bottom: 0;
}

/* Step node (circle on timeline) */
.step-node {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.step-card {
  flex: 1;
  min-width: 0;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 13px;
  transition: all 0.3s ease;
}

.step-type-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 1px 8px;
  margin-bottom: 4px;
}

.step-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.4;
}

.step-duration {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 3px;
}

/* ── Completed ─────────────────────────────── */
.step-completed .step-node {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.step-completed .step-card {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.step-completed .step-title {
  color: #6b7280;
  text-decoration: line-through;
}

/* ── Current (active) ──────────────────────── */
.step-current .step-node {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
  animation: pulse-node 2.2s ease-in-out infinite;
}

.step-current .step-card {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
}

.step-current .step-title {
  color: #1e3a8a;
  font-weight: 700;
}

/* ── Upcoming ──────────────────────────────── */
.step-upcoming {
  opacity: 0.45;
}

.step-upcoming .step-node {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
}

@keyframes pulse-node {
  0%, 100% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2); }
  50%       { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.0); }
}

/* Step type colour tokens */
.tag-explanation  { background: #ede9fe; color: #6d28d9; }
.tag-guided_practice { background: #fef3c7; color: #92400e; }
.tag-check_understanding { background: #dcfce7; color: #15803d; }
.tag-default { background: #f1f5f9; color: #475569; }

/* ── New Lesson Plan button ────────────────── */
.new-lesson-plan-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.new-lesson-plan-btn:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #2563eb;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.12);
}

.new-lesson-plan-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.retrieval-debug {
  font-family: monospace;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #475569;
}