/* ==============================================
   SCHWEIZER KODIER-LERN-TOOL – STYLESHEET
   Dark Mode, Glassmorphism, Premium Design
   ============================================== */

/* ---- Basis & Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base:        #0d1117;
  --bg-surface:     #161b22;
  --bg-elevated:    #1c2230;
  --bg-glass:       rgba(28, 34, 48, 0.85);
  --border:         rgba(255,255,255,0.08);
  --border-active:  rgba(255,255,255,0.18);

  --text-primary:   #e6edf3;
  --text-secondary: #8b949e;
  --text-muted:     #484f58;

  --accent:         #3b82f6;
  --accent-glow:    rgba(59,130,246,0.25);
  --accent-hover:   #60a5fa;
  --success:        #22c55e;
  --success-bg:     rgba(34,197,94,0.12);
  --error:          #ef4444;
  --error-bg:       rgba(239,68,68,0.12);
  --warning:        #f59e0b;
  --warning-bg:     rgba(245,158,11,0.12);

  --khb-color:      #a78bfa;
  --icd-color:      #34d399;
  --chop-color:     #fb923c;
  --drg-color:      #60a5fa;
  --reg-color:      #f472b6;

  --sidebar-w:      260px;
  --radius:         12px;
  --radius-sm:      8px;
  --radius-lg:      16px;
  --shadow:         0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:      0 8px 40px rgba(0,0,0,0.5);

  --transition:     all 0.2s ease;
  --font:           'Inter', system-ui, sans-serif;
  --font-mono:      'JetBrains Mono', monospace;
}

html { font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-active); border-radius: 99px; }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 16px var(--accent-glow);
}
.logo-title { display: block; font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.logo-sub   { display: block; font-size: 0.72rem; color: var(--text-secondary); }

.sidebar-toggle {
  background: none; border: none; color: var(--text-secondary);
  cursor: pointer; font-size: 1.1rem; padding: 4px;
  transition: var(--transition);
}
.sidebar-toggle:hover { color: var(--text-primary); }

.nav-list { list-style: none; padding: 12px 10px; flex: 1; overflow-y: auto; }
.nav-section-label {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 8px 6px;
}
.nav-item { margin-bottom: 2px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}
.nav-link:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.nav-link.active {
  background: var(--accent-glow);
  color: var(--accent-hover);
  box-shadow: inset 2px 0 0 var(--accent);
}
.nav-icon { font-size: 1rem; width: 20px; text-align: center; }
.nav-label { flex: 1; }
.nav-badge {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 99px;
  font-family: var(--font-mono);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}
.progress-label { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 6px; }
.progress-bar-wrap {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 4px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  border-radius: 99px;
  transition: width 0.5s ease;
}
.progress-text { font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-mono); }

/* ============================================
   MAIN CONTENT
   ============================================ */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  padding: 32px;
}

.view { max-width: 1100px; }
.view.hidden { display: none; }

.page-header { margin-bottom: 32px; }
.page-title { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; }
.page-subtitle { color: var(--text-secondary); margin-top: 6px; font-size: 1rem; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 28px rgba(96,165,250,0.4);
  transform: translateY(-1px);
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}
.btn-accent:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); border-color: var(--border-active); }
.btn-large { padding: 14px 28px; font-size: 1rem; }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; }

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.dash-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.dash-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(59,130,246,0.04));
  pointer-events: none;
}
.dash-card:hover { border-color: var(--border-active); transform: translateY(-2px); box-shadow: var(--shadow); }

.phase-card { cursor: pointer; }
.phase-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 8px;
  font-family: var(--font-mono);
}
.phase-icon { font-size: 2rem; margin-bottom: 12px; }
.phase-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }
.phase-desc { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.6; margin-bottom: 16px; }

.phase-progress { margin-bottom: 20px; }
.phase-progress-bar {
  height: 3px; background: var(--bg-elevated);
  border-radius: 99px; overflow: hidden; margin-bottom: 6px;
}
.phase-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), #10b981);
  transition: width 0.5s ease;
}

.phase-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tag {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
}

.info-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 16px; }
.standard-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.standard-list li { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--text-secondary); }
.std-badge {
  font-size: 0.7rem; font-weight: 700;
  padding: 2px 8px; border-radius: 4px;
  font-family: var(--font-mono);
}
.std-badge.khb  { background: rgba(167,139,250,0.2); color: var(--khb-color); }
.std-badge.icd  { background: rgba(52,211,153,0.2);  color: var(--icd-color); }
.std-badge.chop { background: rgba(251,146,60,0.2);  color: var(--chop-color); }
.std-badge.drg  { background: rgba(96,165,250,0.2);  color: var(--drg-color); }

/* ============================================
   QUIZ
   ============================================ */
.topic-grid, .exercise-grid, .cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.topic-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.topic-card:hover { border-color: var(--border-active); transform: translateY(-2px); box-shadow: var(--shadow); }
.topic-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.topic-name { font-size: 1rem; font-weight: 600; }
.topic-count { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-secondary); }
.topic-source { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 16px; }
.topic-progress { height: 3px; background: var(--bg-elevated); border-radius: 99px; overflow: hidden; margin-bottom: 6px; }
.topic-progress-fill { height: 100%; background: var(--success); transition: width 0.4s; }
.topic-progress-text { font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-mono); }
.topic-color-bar { position: absolute; top: 0; left: 0; right: 0; height: 3px; }

.loading-placeholder {
  opacity: 0.5;
  font-style: italic;
  color: var(--text-muted);
  padding: 20px;
}

.quiz-actions { margin-top: 8px; }

/* Quiz Header */
.quiz-header, .assistant-header, .case-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.quiz-meta, .assistant-meta { display: flex; align-items: center; gap: 10px; flex: 1; }
.quiz-topic-label {
  font-size: 0.72rem; font-weight: 700;
  padding: 3px 10px; border-radius: 4px;
  font-family: var(--font-mono);
  background: rgba(59,130,246,0.2); color: var(--drg-color);
}
.quiz-counter, .step-counter, .exercise-title-label {
  font-size: 0.85rem; color: var(--text-secondary);
}
.quiz-score-display { display: flex; align-items: baseline; gap: 3px; }
.score-correct { font-size: 1.3rem; font-weight: 700; color: var(--success); font-family: var(--font-mono); }
.score-sep { color: var(--text-muted); }
.score-total { font-size: 0.9rem; color: var(--text-muted); font-family: var(--font-mono); }

/* Progress strip */
.progress-strip {
  height: 3px;
  background: var(--bg-elevated);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 28px;
}
.progress-strip-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  transition: width 0.4s ease;
}

/* Question card */
.question-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.question-meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.question-id { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }
.question-thema { font-size: 0.8rem; color: var(--text-secondary); }
.difficulty-badge {
  font-size: 0.7rem; font-weight: 600; padding: 2px 8px;
  border-radius: 4px; font-family: var(--font-mono); margin-left: auto;
}
.difficulty-badge.leicht  { background: var(--success-bg); color: var(--success); }
.difficulty-badge.mittel  { background: var(--warning-bg); color: var(--warning); }
.difficulty-badge.schwer  { background: var(--error-bg);   color: var(--error); }

.question-text {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 28px;
}

.options-grid { display: flex; flex-direction: column; gap: 10px; }
.option-btn {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: var(--transition);
  width: 100%;
}
.option-btn:hover { border-color: var(--border-active); background: rgba(255,255,255,0.04); }
.option-btn.selected { border-color: var(--accent); background: var(--accent-glow); }
.option-btn.correct { border-color: var(--success); background: var(--success-bg); }
.option-btn.wrong   { border-color: var(--error); background: var(--error-bg); }
.option-btn.disabled { pointer-events: none; }
.option-letter {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700;
  background: var(--bg-surface); border-radius: 4px;
  padding: 2px 7px; flex-shrink: 0; margin-top: 1px;
  color: var(--text-secondary);
}
.option-btn.selected .option-letter { background: var(--accent); color: #fff; }
.option-btn.correct .option-letter  { background: var(--success); color: #fff; }
.option-btn.wrong   .option-letter  { background: var(--error);   color: #fff; }

/* Feedback panel */
.feedback-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.feedback-panel.correct { border-color: var(--success); background: var(--success-bg); }
.feedback-panel.wrong   { border-color: var(--error);   background: var(--error-bg); }
.feedback-icon {
  font-size: 2rem; width: 48px; height: 48px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--bg-surface); flex-shrink: 0;
}
.feedback-content { flex: 1; }
.feedback-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feedback-explanation { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 8px; }
.feedback-richtlinie { font-size: 0.75rem; color: var(--text-muted); font-style: italic; }

/* Result card */
.result-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  max-width: 500px;
  margin: 40px auto;
  box-shadow: var(--shadow-lg);
}
.result-emoji { font-size: 3.5rem; margin-bottom: 16px; }
.result-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 16px; }
.result-score { font-size: 3rem; font-weight: 800; font-family: var(--font-mono); color: var(--accent); }
.result-percentage { font-size: 1.1rem; color: var(--text-secondary); margin: 6px 0 16px; }
.result-message { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; margin-bottom: 24px; }
.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================================
   ASSISTENT
   ============================================ */
.method-explainer {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.method-step { display: flex; align-items: center; gap: 10px; }
.method-num {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.method-text { font-size: 0.85rem; color: var(--text-secondary); }
.method-arrow { color: var(--text-muted); font-size: 1.2rem; }

.exercise-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: var(--transition);
}
.exercise-card:hover { border-color: var(--border-active); transform: translateY(-2px); box-shadow: var(--shadow); }
.exercise-klass-badge {
  display: inline-block;
  font-size: 0.7rem; font-weight: 700;
  padding: 2px 8px; border-radius: 4px;
  font-family: var(--font-mono);
  margin-bottom: 10px;
}
.exercise-klass-badge.ICD     { background: rgba(52,211,153,0.2);  color: var(--icd-color); }
.exercise-klass-badge.CHOP    { background: rgba(251,146,60,0.2);  color: var(--chop-color); }
.exercise-klass-badge.ICDCHOP { background: rgba(167,139,250,0.2); color: var(--khb-color); }
.exercise-title { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.exercise-lernziel { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }

/* Assistent Layout */
.assistant-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}

.context-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 0;
}
.context-title { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.context-text  { font-size: 0.875rem; line-height: 1.7; color: var(--text-primary); margin-bottom: 16px; }
.context-lernziel { background: var(--bg-elevated); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 0.8rem; }
.lernziel-label { font-weight: 600; color: var(--text-secondary); margin-right: 6px; }

.dialog-panel { display: flex; flex-direction: column; gap: 16px; }
.dialog-messages { display: flex; flex-direction: column; gap: 12px; }

.dialog-msg {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.875rem;
  animation: slideUp 0.25s ease;
}
.dialog-msg.user-msg {
  background: var(--accent-glow);
  border-color: rgba(59,130,246,0.3);
  text-align: right;
}
.dialog-msg.correct-msg { background: var(--success-bg); border-color: rgba(34,197,94,0.3); }
.dialog-msg.hint-msg { background: var(--warning-bg); border-color: rgba(245,158,11,0.3); font-style: italic; }

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.step-description { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 14px; }
.leitfrage-box {
  display: flex; gap: 12px;
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 18px;
}
.leitfrage-icon { font-size: 1.2rem; flex-shrink: 0; }
.leitfrage-text { font-size: 0.95rem; font-weight: 500; color: var(--text-primary); line-height: 1.6; }

.input-row { display: flex; gap: 10px; margin-bottom: 12px; }
.answer-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: var(--transition);
}
.answer-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.hint-btn { font-size: 0.8rem; padding: 7px 14px; }
.hint-box {
  margin-top: 12px;
  background: var(--warning-bg);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--warning);
  line-height: 1.6;
}

/* ============================================
   FALLSTUDIEN
   ============================================ */
.cases-info-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.info-icon { font-size: 1.2rem; flex-shrink: 0; }

.case-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: var(--transition);
}
.case-card:hover { border-color: var(--border-active); transform: translateY(-2px); box-shadow: var(--shadow); }
.case-card-title { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.case-card-desc  { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.5; }
.case-card-tags  { display: flex; flex-wrap: wrap; gap: 6px; }

.case-title-label { font-size: 1.1rem; font-weight: 600; flex: 1; }
.case-badges { display: flex; gap: 8px; }

.case-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.pdf-panel, .coding-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.pdf-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.pdf-header h3 { font-size: 0.9rem; font-weight: 600; }

.pdf-embed-wrap { position: relative; }
.pdf-embed {
  display: block;
  width: 100%;
  height: 600px;
  border: none;
}
.pdf-fallback {
  display: none;
  padding: 40px;
  text-align: center;
}
.pdf-fallback.show { display: block; }
.pdf-fallback p { color: var(--text-secondary); margin-bottom: 16px; }

.coding-panel { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.hints-section h4, .aufgabe-box h4, .coding-panel h4 {
  font-size: 0.85rem; font-weight: 600; margin-bottom: 10px; color: var(--text-secondary);
}
.hints-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.hints-list li {
  font-size: 0.83rem; color: var(--text-secondary);
  padding-left: 18px; position: relative;
}
.hints-list li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }

.aufgabe-box {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.aufgabe-box p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }

.case-textarea {
  width: 100%;
  min-height: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  resize: vertical;
  transition: var(--transition);
  line-height: 1.6;
}
.case-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.submit-row { margin-top: 14px; }

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.compare-col { display: flex; flex-direction: column; gap: 8px; }
.compare-col h4 { font-size: 0.8rem; font-weight: 600; }
.your-answer h4 { color: var(--accent-hover); }
.solution   h4 { color: var(--success); }
.compare-text {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 120px;
  border: 1px solid var(--border);
}
.solution-pending {
  display: flex; align-items: center; justify-content: center;
  min-height: 120px;
  color: var(--text-muted); font-size: 0.85rem; font-style: italic;
}

/* ============================================
   INFO
   ============================================ */
.info-content { max-width: 700px; display: flex; flex-direction: column; gap: 28px; }
.info-section h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 12px; }
.info-section p  { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 10px; }
.info-section ol, .info-section ul { padding-left: 20px; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.8; }
code {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8em;
  color: var(--chop-color);
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden { display: none !important; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  :root { --sidebar-w: 64px; }
  .nav-label, .nav-badge, .logo-text, .nav-section-label, .sidebar-footer { display: none; }
  .nav-icon { margin: 0 auto; }
  .nav-link { justify-content: center; padding: 12px 0; }
  .main { padding: 20px; }
  .assistant-layout { grid-template-columns: 1fr; }
  .case-layout { grid-template-columns: 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .page-title { font-size: 1.4rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .quiz-header { flex-wrap: wrap; }
}

/* ============================================
   USER OVERLAY
   ============================================ */
.user-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-overlay.hidden {
  display: none !important;
}
.user-overlay-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.user-overlay-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}
.user-overlay-card h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.user-overlay-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 30px;
  line-height: 1.5;
}
.user-select-group {
  margin-bottom: 30px;
}
.user-select {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 15px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 1rem;
  cursor: pointer;
  appearance: none;
}
.user-select:focus {
  outline: none;
  border-color: var(--accent);
}
.user-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 1rem;
}
.user-input:focus {
  outline: none;
  border-color: var(--accent);
}
.login-error {
  color: #ef4444;
  margin-bottom: 15px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ============================================================
   PROFIL-WECHSEL PANEL
   ============================================================ */
.profile-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 0 12px 12px;
  overflow: hidden;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.profile-panel-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 12px 6px;
}
.profile-current {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  padding: 4px 12px 10px;
  border-bottom: 1px solid var(--border);
}
.profile-list {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
  max-height: 260px;
  overflow-y: auto;
}
.profile-item {
  background: none;
  border: none;
  text-align: left;
  padding: 8px 14px;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.profile-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.profile-item.active {
  color: var(--accent);
  font-weight: 600;
  background: rgba(139, 92, 246, 0.08);
}

/* ============================================================
   ERLEDIGT-HÄKCHEN & KARTEN-STATES
   ============================================================ */
.done-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  white-space: nowrap;
}
.exercise-card-header,
.case-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.exercise-done,
.case-done {
  border-color: rgba(52, 211, 153, 0.3) !important;
  background: rgba(52, 211, 153, 0.04) !important;
}

/* Falsche-Antwort-Feedback in Fallstudien */
.case-wrong-feedback {
  text-align: center;
  padding: 40px 24px;
}
.case-wrong-feedback h3 {
  margin: 12px 0 8px;
  color: var(--text-primary);
  font-size: 1.2rem;
}
.case-wrong-feedback p {
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0 auto;
}
.copyright {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 0 4px;
  opacity: 0.6;
}
