/* ==========================================================================
   CSS DESIGN SYSTEM & GENERAL RESETS
   ========================================================================== */
:root {
  /* Dynamic colors managed by theme.js */
  --primary-color: #01ABA8;
  --primary-hover: #008e8b;
  --accent-color: #e63946;
  --brand-gradient: linear-gradient(135deg, #01ABA8 0%, #007d7a 100%);
  --badge-gradient: radial-gradient(circle at top left, #01ABA8, #056664);

  /* Light theme variables (data-frugal, high readability) */
  --bg-color: #f6f8fb;
  --desktop-bg: #f0f4f8;
  --card-bg: #ffffff;
  --text-primary: #0f172a;
  --text-color: #0f172a;
  --text-muted: #64748b;
  --border-color: #cbd5e1;
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --border-radius-sm: 6px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.12);
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Component level background tokens */
  --input-bg: #fafbfc;
  --subtle-bg: #f8fafc;
  --hover-bg: #f1f5f9;
  
  /* Status colors */
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
}

/* Dark Theme Variables */
:root[data-color-mode="dark"] {
  --bg-color: #0b1120;
  --desktop-bg: #060a12;
  --card-bg: #1e293b;
  --text-primary: #f8fafc;
  --text-color: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.75);

  --input-bg: #0f172a;
  --subtle-bg: #131d31;
  --hover-bg: #26354a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

button, input, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.app-header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.header-brand {
  display: flex;
  align-items: center;
  height: 100%;
}

.brand-logo-img {
  max-height: 40px; /* Constrain max-height to fit perfectly in header */
  max-width: 180px;
  width: auto;
  object-fit: contain;
  transition: all 0.3s ease;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 32px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.btn-theme-toggle:hover {
  background: rgba(1, 171, 168, 0.1);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.lang-selector {
  display: flex;
  gap: 0.5rem;
}

.lang-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 0;
  width: 28px;
  height: 20px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.2s ease;
}

.lang-btn .flag-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lang-btn.active, .lang-btn:hover {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(1, 171, 168, 0.35);
  transform: scale(1.08);
}

/* Top Sticky Navigation Bar */
.app-nav {
  position: sticky;
  top: 60px; /* Right below header */
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  z-index: 99;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  padding: 0;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 20%;
  padding: 10px 0 6px 0;
  gap: 3px;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
}

.nav-link svg {
  stroke-width: 2.2;
  transition: transform 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
}

.nav-link.active {
  border-bottom-color: var(--primary-color);
}

.nav-link.active svg {
  transform: scale(1.05);
}

.app-main {
  flex: 1;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem 1rem; /* Normal padding, no bottom-bar space needed */
  position: relative;
}

.container {
  width: 100%;
}

.flex-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   VIEW SCREENS (TABS)
   ========================================================================== */
.view-screen {
  display: none;
  width: 100%;
}

.view-screen.active {
  display: block;
}

/* ==========================================================================
   CARDS & COMMON UI ELEMENTS
   ========================================================================== */
.card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.25rem;
  width: 100%;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: 0.875rem; }
.text-danger { color: var(--color-danger, #ef4444); }

.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50px;
  text-transform: uppercase;
}

.badge-primary {
  background-color: rgba(1, 171, 168, 0.1);
  color: var(--primary-color);
}

.badge-accent {
  background-color: rgba(230, 57, 70, 0.1);
  color: var(--accent-color);
}

.badge-neutral {
  background-color: #f1f5f9;
  color: var(--text-muted);
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
}


/* Inputs & Form Controls */
.input-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.input-group input {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: 0.95rem;
  background-color: #fafbfc;
  transition: all 0.2s ease;
  color: var(--text-primary);
}

.input-group input:focus {
  border-color: var(--primary-color);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(1, 171, 168, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  width: auto;
}

.btn-block {
  width: 100%;
  display: flex;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(1, 171, 168, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-dark {
  background-color: var(--text-primary);
  color: white;
}

.btn-dark:hover {
  background-color: #1e293b;
}

.btn-text {
  background: none;
  border: none;
  font-weight: 500;
  cursor: pointer;
}

/* Alerts and Messages */
.alert {
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  border-left: 4px solid transparent;
}

.alert-danger {
  background-color: #fee2e2;
  color: #991b1b;
  border-left-color: var(--color-danger);
}

.status-msg {
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.status-error {
  background-color: #fee2e2;
  color: #991b1b;
}

.status-success {
  background-color: #d1fae5;
  color: #065f46;
}

/* ==========================================================================
   VIEW: LOGIN SCREEN
   ========================================================================== */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}

.login-card {
  max-width: 420px;
}

.login-card h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   VIEW: WELCOME (START SEITE)
   ========================================================================== */
.welcome-banner {
  border-left: 6px solid var(--primary-color);
  background-color: var(--card-bg);
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 460px) {
  .guide-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.guide-item.card-link {
  color: var(--text-primary);
  display: block;
  text-decoration: none;
  cursor: pointer;
}

.guide-item.card {
  margin-bottom: 0;
  padding: 1.25rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.guide-item.card-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

/* ==========================================================================
   VIEW: DASHBOARD (WISSEN)
   ========================================================================== */
.dashboard-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
}

.dashboard-section {
  margin-bottom: 2rem;
}

.section-title {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  margin-bottom: 1rem;
  user-select: none;
  transition: all 0.2s ease;
}

.section-title:hover {
  background-color: #f1f5f9;
  border-color: var(--primary-color);
}

.section-title svg {
  transition: transform 0.25s ease;
  color: var(--text-muted);
}

.section-title.collapsed svg {
  transform: rotate(-90deg);
}

.dashboard-section.collapsed .dashboard-grid {
  display: none;
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.article-card h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.article-card p {
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #f1f5f9;
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.2s ease;
  width: max-content;
}

.btn-download:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.btn-download svg {
  transition: transform 0.2s ease;
}

.btn-download:hover svg {
  transform: translateY(2px);
}

/* ==========================================================================
   VIEW: QUIZ ENGINE
   ========================================================================== */
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.quiz-progress-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.quiz-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-icon-sound {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border-radius: 6px;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.1s ease;
}

.btn-icon-sound:hover {
  color: var(--text-color);
  background-color: rgba(0, 0, 0, 0.06);
}

.btn-icon-sound:active {
  transform: scale(0.92);
}

.btn-icon-sound.muted {
  color: var(--text-muted);
  opacity: 0.65;
}

.quiz-progress-track {
  width: 100%;
  height: 10px;
  background-color: var(--border-color, #e2e8f0);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.quiz-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-color, #10b981), #22c55e);
  border-radius: 9999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-card {
  margin-bottom: 1rem;
}

.quiz-question {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.quiz-image-container {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  position: relative;
  cursor: pointer;
  background-color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.zoom-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(15, 23, 42, 0.75);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  transition: transform 0.2s ease;
  z-index: 2;
}

.quiz-image-container:hover .zoom-badge {
  transform: scale(1.1);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Option Buttons & Checkboxes */
.option-btn {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-md);
  background-color: var(--card-bg);
  text-align: left;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--primary-color);
  background-color: rgba(1, 171, 168, 0.03);
}

.option-btn:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

.checkbox-label {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-md);
  background-color: var(--card-bg);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.checkbox-label:hover {
  border-color: var(--primary-color);
}

.checkbox-label input {
  margin-right: 12px;
  transform: scale(1.2);
  accent-color: var(--primary-color);
}

.checkbox-label.disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

.quiz-zahl-hint {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.number-input {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: 1.25rem;
  text-align: center;
  background-color: #fafbfc;
}

.number-input:focus {
  border-color: var(--primary-color);
  background-color: white;
}

/* Correct / Wrong Styles */
.correct, input.correct {
  background-color: #d1fae5 !important;
  border-color: var(--color-success) !important;
  color: #065f46 !important;
  font-weight: 600;
}

.wrong, input.wrong {
  background-color: #fee2e2 !important;
  border-color: var(--color-danger) !important;
  color: #991b1b !important;
  text-decoration: line-through;
}

.missed {
  border-color: var(--color-success) !important;
  border-style: dashed !important;
  background-color: #ecfdf5 !important;
}

/* Quiz Selector */
.quiz-btn-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-select-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.quiz-select-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.quiz-select-btn svg {
  transition: transform 0.2s ease;
}

.quiz-select-btn:hover svg {
  transform: translateX(4px);
}

/* Quiz Feedback Box */
.quiz-feedback {
  padding: 1.25rem;
  border-radius: var(--border-radius-md);
  border: 1px solid transparent;
  animation: slideInDown 0.3s ease;
}

.correct-feedback {
  background-color: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.wrong-feedback {
  background-color: #fff5f5;
  border-color: #fecaca;
  color: #991b1b;
}

/* ==========================================================================
   VIEW: ID BADGE (AUSWEIS) - THEME HIGHLIGHT
   ========================================================================== */
.badge-card-container {
  perspective: 1000px;
  margin: 1rem 0;
}

/* Holographic animated card */
.badge-card {
  width: 310px;
  height: 460px;
  border-radius: 24px;
  background: var(--badge-gradient);
  color: white;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  box-shadow: var(--shadow-lg), 
              0 0 30px rgba(0, 0, 0, 0.08), 
              inset 0 1px 1px rgba(255, 255, 255, 0.4);
  overflow: hidden;
  transition: transform 0.1s ease;
  /* Premium glassmorphic look */
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  animation: pulseGradual 8s infinite alternate;
}

/* Dynamic Shimmer/Reflection overlay */
.badge-shimmer {
  position: absolute;
  top: 0;
  left: -150%;
  width: 300%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.06) 40%,
    rgba(255, 255, 255, 0.2) 48%,
    rgba(255, 255, 255, 0.06) 55%,
    transparent 70%
  );
  transform: skewX(-15deg);
  animation: holographicSweep 6s infinite linear;
  pointer-events: none;
}

/* Chip/Security element on badge */
.badge-chip {
  width: 40px;
  height: 30px;
  background: linear-gradient(135deg, #ffd700 0%, #cca300 100%);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
  border: 1px solid rgba(0,0,0,0.1);
}

.badge-chip::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

.badge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge-logo {
  background: white;
  padding: 4px 10px;
  border-radius: var(--border-radius-sm);
  max-width: 140px;
  max-height: 44px;
  object-fit: contain;
}

.badge-body {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.badge-name-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.75);
}

.badge-user-name {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.15);
  line-height: 1.1;
}

.badge-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.badge-meta-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 4px;
}

.badge-meta-value {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pulsating level visual effect */
.badge-meta-value.glow-text {
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px var(--primary-color);
  animation: textPulse 2s infinite alternate;
}

.badge-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 14px;
}

.security-clock {
  display: flex;
  flex-direction: column;
  font-family: monospace;
}

.security-clock .date {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
}

.security-clock .time {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.security-seal {
  font-size: 0.6rem;
  font-weight: 700;
  background-color: rgba(255, 255, 255, 0.25);
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.shake {
  animation: shake 0.2s ease 2;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-15px); }
  60% { transform: translateY(-7px); }
}

@keyframes textPulse {
  from {
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.6), 0 0 10px var(--primary-color);
  }
  to {
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.9), 0 0 25px var(--primary-color), 0 0 35px var(--primary-color);
  }
}

@keyframes pulseGradual {
  from {
    box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 0, 0, 0.08);
  }
  to {
    box-shadow: var(--shadow-lg), 0 0 45px rgba(1, 171, 168, 0.25);
  }
}

@keyframes holographicSweep {
  0% {
    left: -150%;
  }
  50% {
    left: 150%;
  }
  100% {
    left: 150%;
  }
}

/* ==========================================================================
   DESKTOP MEDIA QUERIES (RESPONSIVENESS)
   ========================================================================== */
@media (min-width: 600px) {
  body {
    background-color: var(--desktop-bg);
  }
  
  .app-header {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    border-radius: 0;
  }

  .app-main {
    padding-bottom: 2rem;
  }

  /* Sticky top navigation header layout */
  .app-nav {
    max-width: 600px;
    margin: 0 auto;
  }
  
  .nav-link {
    font-size: 0.78rem;
    padding: 12px 0 8px 0;
  }

  .badge-card {
    width: 320px;
    height: 480px;
    padding: 28px;
  }
}

/* ==========================================================================
   LIGHTBOX OVERLAY FOR IMAGES
   ========================================================================== */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 200;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.2s ease;
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 95%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
  animation: zoomIn 0.25s ease-out;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.lightbox-close:hover {
  color: #cbd5e1;
}

@keyframes zoomIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   CHECKLISTS SECTION (Phase 1.1)
   ========================================================================== */
.section-sub-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.checklists-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.checklist-card {
  border-left: 5px solid var(--border-color);
  transition: all 0.3s ease;
}

.checklist-card.completed {
  border-left-color: var(--color-success);
  background-color: rgba(16, 185, 129, 0.01);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.04);
}

.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 10px;
}

.checklist-header h4 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.checklist-badge {
  background-color: #f1f5f9;
  color: var(--text-muted);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.checklist-badge.done {
  background-color: var(--color-success);
  color: white;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.checklist-items-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-item-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  background-color: #fafbfc;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.checklist-item-row:hover {
  background-color: #f1f5f9;
  border-color: var(--primary-color);
}

.checklist-item-row.active {
  background-color: rgba(16, 185, 129, 0.02);
}

.checklist-item-row input {
  margin-top: 3px;
  transform: scale(1.15);
  accent-color: var(--color-success);
  cursor: pointer;
}

.checklist-item-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.checklist-item-row input:checked + .checklist-item-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Vokabeltrainer Audio Player Styling */
.quiz-audio-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
}

.btn-audio-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.8rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(1, 171, 168, 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.btn-audio-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(1, 171, 168, 0.45);
}

.btn-audio-play:active {
  transform: translateY(1px);
}

.btn-audio-play.playing {
  background-color: #d93838;
  box-shadow: 0 4px 15px rgba(217, 56, 56, 0.3);
}

/* Pulsing effect to invite interaction */
.btn-audio-play:not(.playing) {
  animation: audio-btn-pulse 2s infinite;
}

@keyframes audio-btn-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(1, 171, 168, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(1, 171, 168, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(1, 171, 168, 0);
  }
}

/* Speech Recognition Trainer styles */
.quiz-speech-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--card-bg, #ffffff);
  border-radius: 12px;
  border: 1px dashed var(--border-color, rgba(0, 0, 0, 0.1));
}

.btn-speech-record {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background-color: var(--primary-color, #01aba8);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(1, 171, 168, 0.3);
  transition: all 0.3s ease;
}

.btn-speech-record:hover {
  transform: scale(1.05);
}

.btn-speech-record.recording {
  background-color: #d93838;
  box-shadow: 0 4px 20px rgba(217, 56, 56, 0.4);
  animation: speech-btn-recording-pulse 1.5s infinite;
}

@keyframes speech-btn-recording-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(217, 56, 56, 0.6);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(217, 56, 56, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(217, 56, 56, 0);
  }
}

.speech-status {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted, #777);
  transition: color 0.3s ease;
}

.speech-status.active {
  color: #d93838;
  font-weight: 600;
}

.speech-result-container {
  width: 100%;
  background: rgba(0, 0, 0, 0.03);
  padding: 0.75rem;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
}

.speech-result {
  font-weight: 600;
  color: var(--text-color, #333);
}

.speech-unsupported-alert {
  background-color: #fff2f2;
  border: 1px solid #ffcccc;
  color: #cc0000;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Modal styles for speech recognition info notice */
.speech-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  animation: modal-fade-in 0.25s ease-out;
}

.speech-modal {
  background: var(--card-bg, #ffffff);
  border-radius: 16px;
  max-width: 440px;
  width: 90%;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
}

.speech-modal-header {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-color, #333);
}

.speech-modal-body {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  color: var(--text-muted, #555);
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   FAHRLEHRER-COCKPIT & DIGITALE AUSBILDUNGSDIAGRAMMKARTE (REFORM 2027)
   ========================================================================== */

/* Responsive Container-Breite für das Cockpit auf Tablets und PCs */
body[data-active-route="fahrlehrer"] .app-header,
body[data-active-route="fahrlehrer"] .app-nav,
body[data-active-route="fahrlehrer"] .app-main,
.app-main:has(#view-fahrlehrer.active) {
  max-width: 1240px;
  width: 96%;
}

/* Im Fahrlehrer-Cockpit scrollt das obere Standardmenü weg (mehr Platz auf Tablets im Querformat) */
body[data-active-route="fahrlehrer"] .app-header,
body[data-active-route="fahrlehrer"] .app-nav {
  position: static;
  top: auto;
}

body[data-active-route="fahrlehrer"] .cockpit-sidebar-col {
  top: 76px;
}

.cockpit-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 0;
}

.cockpit-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
  position: sticky;
  top: 8px;
  z-index: 95;
}

.cockpit-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cockpit-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-color, #0f172a);
}

.cockpit-fl-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(1, 171, 168, 0.12);
  color: var(--primary-color, #01aba8);
  border: 1px solid rgba(1, 171, 168, 0.25);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  transition: all 0.15s ease;
}
.cockpit-fl-badge:hover {
  background: rgba(1, 171, 168, 0.22);
}

.sync-indicator {
  font-size: 0.95rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 38px;
  box-sizing: border-box;
  line-height: 1;
}
.sync-online {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
  border: 1px solid rgba(22, 163, 74, 0.25);
}
.sync-pending {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
}
.sync-offline {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.cockpit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fl-select {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color, #cbd5e1);
  background: var(--card-bg, #ffffff);
  color: var(--text-color, #0f172a);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
}

.btn-fl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-fl:hover { transform: translateY(-1px); }
.btn-fl:active { transform: translateY(1px); }
.btn-fl-icon-only {
  padding: 8px 12px;
  min-width: 38px;
  justify-content: center;
}
.btn-fl-lang-toggle {
  padding: 8px 10px;
  gap: 6px;
}
.btn-fl-lang-toggle .flag-icon {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.btn-fl-primary {
  background: var(--primary-color, #01aba8);
  color: #ffffff;
}
.btn-fl-amber {
  background: rgba(217, 119, 6, 0.15);
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.35);
}
.btn-fl-danger-outline {
  background: transparent;
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.35);
}
.btn-fl-danger-outline:hover {
  background: rgba(220, 38, 38, 0.08);
}
.btn-fl-outline {
  background: transparent;
  color: var(--text-muted, #64748b);
  border-color: var(--border-color, #cbd5e1);
}
.btn-fl-retro {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.4);
}
.btn-fl-retro:hover {
  background: rgba(245, 158, 11, 0.22);
}
.btn-fl-retro-active {
  background: #f59e0b;
  color: #ffffff;
  border-color: #d97706;
}

/* Retro / Nachtrags-Modus Banner */
.cockpit-retro-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
  position: sticky;
  top: 68px;
  z-index: 94;
  animation: retroPulse 2.5s ease-in-out infinite alternate;
}
@keyframes retroPulse {
  0% { box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15); }
  100% { box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35); }
}
.cockpit-retro-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.retro-banner-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.retro-banner-text {
  font-size: 0.95rem;
  color: #92400e;
  line-height: 1.4;
}
.retro-banner-text strong {
  color: #78350f;
}
.cockpit-retro-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-fl-complete-retro {
  background: #16a34a;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-fl-complete-retro:hover {
  background: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.4);
}
.btn-fl-complete-retro.btn-sm {
  font-size: 0.85rem;
  padding: 6px 12px;
}

/* Notes Drawer */
.notes-drawer {
  background: rgba(217, 119, 6, 0.06);
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 1.25rem;
}
.notes-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.notes-drawer-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #d97706;
}
.notes-confidential-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}
.notes-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  margin-bottom: 12px;
}
.notes-entry {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
}
.notes-entry-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted, #64748b);
  font-size: 0.75rem;
  margin-bottom: 4px;
}
.notes-input-box {
  display: flex;
  gap: 8px;
}
.notes-input-box textarea {
  flex: 1;
  border-radius: 8px;
  border: 1px solid var(--border-color, #cbd5e1);
  padding: 8px;
  font-size: 0.85rem;
  background: var(--card-bg, #ffffff);
  color: var(--text-color, #0f172a);
}

/* Cockpit Dashboard Grid (Querformat auf Tablet & Desktop) */
.cockpit-dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 900px) {
  .cockpit-dashboard-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 22px;
    align-items: start;
  }

  .cockpit-sidebar-col {
    position: sticky;
    top: 75px;
    z-index: 10;
  }

  .cockpit-main-col {
    min-width: 0;
  }

  .student-cockpit-card {
    margin-bottom: 0;
  }

  .student-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .btn-exam-hero {
    width: 100%;
    justify-content: center;
  }

  .meta-box-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .meta-box-controls > div {
    width: 100%;
  }

  .fl-select-sm,
  .btn-glasses-toggle {
    width: 100%;
    box-sizing: border-box;
  }

  .class-tabs-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .class-tab-btn {
    text-align: center;
    padding: 8px 10px;
    font-size: 0.85rem;
  }
}

/* Student Cockpit Card */
.student-cockpit-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
}
.student-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.student-display-name {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-color, #0f172a);
  letter-spacing: -0.015em;
}
.student-subtitle {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  margin-top: 3px;
}
.student-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.25);
}
.student-id-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}

.btn-exam-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
  transition: all 0.2s ease;
}
.btn-exam-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.4);
}

/* Stammdaten & Edit-Lock Box */
.instructor-meta-box {
  background: rgba(241, 245, 249, 0.6);
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  transition: all 0.25s ease;
}
.instructor-meta-box.unlocked {
  background: var(--card-bg, #ffffff);
  border-color: var(--primary-color, #01aba8);
  box-shadow: 0 0 0 2px rgba(1, 171, 168, 0.2);
}
.meta-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.meta-lock-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
}
.meta-lock-badge.locked {
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted, #64748b);
  border-color: var(--border-color, #cbd5e1);
}
.meta-lock-badge.unlocked {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.35);
}
.btn-lock-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid var(--primary-color, #01aba8);
  background: rgba(1, 171, 168, 0.1);
  color: var(--primary-color, #01aba8);
  transition: all 0.2s ease;
}
.btn-lock-toggle.active {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}
.meta-box-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.meta-label {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  display: block;
  margin-bottom: 4px;
}
.fl-select-sm {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color, #cbd5e1);
  font-size: 0.85rem;
  background: var(--card-bg, #ffffff);
  color: var(--text-color, #0f172a);
}
.btn-glasses-toggle {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid var(--border-color, #cbd5e1);
  background: var(--card-bg, #ffffff);
  color: var(--text-muted, #64748b);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-glasses-toggle.active {
  background: rgba(217, 119, 6, 0.15);
  color: #d97706;
  border-color: rgba(217, 119, 6, 0.4);
}

/* Class Tabs */
.class-tabs-bar {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border-color, #e2e8f0);
  padding-top: 12px;
}
.class-tab-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid var(--border-color, #cbd5e1);
  background: var(--card-bg, #ffffff);
  color: var(--text-muted, #64748b);
  cursor: pointer;
  transition: all 0.2s;
}
.class-tab-btn.active {
  background: var(--primary-color, #01aba8);
  color: #ffffff;
  border-color: var(--primary-color, #01aba8);
  box-shadow: 0 2px 8px rgba(1, 171, 168, 0.3);
}

/* Blocks & Accordion (Rolladeneffekt) */
.blocks-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.block-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
  transition: box-shadow 0.2s ease;
}
.block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  background: rgba(248, 250, 252, 0.8);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  transition: background 0.15s ease;
}
.block-header:hover {
  background: rgba(241, 245, 249, 0.9);
}
.block-card.collapsed .block-header {
  border-bottom: none;
}
.block-card.collapsed .task-list-wrapper {
  display: none;
}
.block-title-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-color, #0f172a);
  flex-wrap: wrap;
}
.color-indicator {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}
.block-accordion-arrow {
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  transition: transform 0.2s ease;
}
.block-card.collapsed .block-accordion-arrow {
  transform: rotate(-90deg);
}
.block-progress-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
}
.pill-complete {
  background: rgba(22, 163, 74, 0.15);
  color: #16a34a;
}
.pill-pending {
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted, #64748b);
}
.btn-quick-approve {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(22, 163, 74, 0.3);
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-quick-approve:hover {
  background: #16a34a;
  color: #ffffff;
}

/* Tasks */
.task-list {
  display: flex;
  flex-direction: column;
}
.task-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color, #f1f5f9);
  gap: 12px;
  transition: background 0.15s ease;
}
.task-row:last-child {
  border-bottom: none;
}
.task-row:hover {
  background: rgba(248, 250, 252, 0.5);
}
.task-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.task-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-color, #0f172a);
}
.task-desc {
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
  line-height: 1.35;
}
.task-hint-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.3;
  transition: all 0.15s ease;
}
.task-hint-chip.hint-link {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.25);
}
.task-hint-chip.hint-link:hover {
  background: #2563eb;
  color: #ffffff;
}
.task-hint-chip.hint-image {
  background: rgba(147, 51, 234, 0.1);
  color: #7e22ce;
  border-color: rgba(147, 51, 234, 0.25);
}
.task-hint-chip.hint-image:hover {
  background: #7e22ce;
  color: #ffffff;
}
.task-hint-chip.hint-video {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.25);
}
.task-hint-chip.hint-video:hover {
  background: #dc2626;
  color: #ffffff;
}

/* 4-Stufen Klick-Button (TÜV-ePP Farben) */
.task-state-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  border: 2px solid transparent;
  min-width: 135px;
  justify-content: center;
  transition: all 0.15s ease;
}
.task-state-btn:active {
  transform: scale(0.96);
}

.task-state-btn.state-0 {
  background: var(--card-bg, #ffffff);
  border-color: var(--border-color, #cbd5e1);
  color: var(--text-muted, #64748b);
}
.task-state-btn.state-1 {
  background: rgba(22, 163, 74, 0.15);
  border-color: #16a34a;
  color: #15803d;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.2);
}
.task-state-btn.state-2 {
  background: rgba(217, 119, 6, 0.15);
  border-color: #d97706;
  color: #b45309;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.2);
}
.task-state-btn.state-3 {
  background: rgba(220, 38, 38, 0.15);
  border-color: #dc2626;
  color: #b91c1c;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.state-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-0 { background: #94a3b8; }
.dot-1 { background: #16a34a; }
.dot-2 { background: #d97706; }
.dot-3 { background: #dc2626; }

/* Vorprüfung Modal (Reform 2027) */
.exam-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}
.exam-modal-box {
  background: var(--card-bg, #ffffff);
  border-radius: 14px;
  max-width: 1120px;
  width: 96vw;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  padding: 12px 18px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  border: 1px solid var(--border-color, #e2e8f0);
}
.assign-modal-box {
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
}
.exam-modal-scrollable-body {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 4px;
}
.exam-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.exam-header-sub {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted, #64748b);
}
.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted, #64748b);
  padding: 4px 8px;
  border-radius: 6px;
}
.modal-close-btn:hover {
  background: rgba(0,0,0,0.05);
}

.exam-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(241, 245, 249, 0.7);
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 8px;
  padding: 5px 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}
@media (min-width: 768px) {
  .exam-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
}
.exam-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  border: 1.5px solid var(--border-color, #cbd5e1);
  background: var(--card-bg, #ffffff);
  min-height: 48px;
  box-sizing: border-box;
  transition: all 0.12s ease;
  overflow: hidden;
}
.exam-card:active { transform: scale(0.97); }
.exam-card-head {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.exam-card-icon {
  font-size: 1.05rem;
  flex-shrink: 0;
  line-height: 1;
}
.exam-card-title {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-color, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.exam-nr {
  color: var(--text-muted, #64748b);
  font-weight: 600;
  font-size: 0.72rem;
}
.exam-card-status {
  margin-top: 3px;
  display: flex;
  align-items: center;
}

.exam-card.state-1 {
  background: rgba(22, 163, 74, 0.12);
  border-color: #16a34a;
}
.exam-card.state-2 {
  background: rgba(217, 119, 6, 0.12);
  border-color: #d97706;
}
.exam-card.state-3 {
  background: rgba(220, 38, 38, 0.14);
  border-color: #dc2626;
}

.badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  line-height: 1.3;
}
.badge-green { background: #16a34a; color: #fff; }
.badge-amber { background: #d97706; color: #fff; }
.badge-red { background: #dc2626; color: #fff; }
.badge-grey { background: #94a3b8; color: #fff; }

.exam-warning-box {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid #dc2626;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  color: #b91c1c;
  margin-bottom: 8px;
  animation: fadeIn 0.2s ease;
}

.exam-bottom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.exam-result-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(241, 245, 249, 0.7);
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 8px;
  padding: 4px 10px;
  flex-shrink: 0;
}
.exam-result-label {
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--text-color, #0f172a);
  white-space: nowrap;
}
.result-switch-group {
  display: flex;
  gap: 6px;
}
.btn-result-switch {
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.82rem;
  border: 1.5px solid var(--border-color, #cbd5e1);
  background: var(--card-bg, #ffffff);
  color: var(--text-muted, #64748b);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-result-switch.active-pass {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}
.btn-result-switch.active-fail {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.exam-remark-wrap {
  flex: 1;
  min-width: 220px;
}
.fl-remark-input {
  width: 100%;
  height: 36px;
  padding: 6px 10px;
  font-size: 0.82rem;
  border-radius: 8px;
  border: 1px solid var(--border-color, #cbd5e1);
  background: var(--card-bg, #ffffff);
  color: var(--text-color, #0f172a);
  box-sizing: border-box;
}

.fl-textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-color, #cbd5e1);
  padding: 8px;
  font-size: 0.85rem;
  background: var(--card-bg, #ffffff);
  color: var(--text-color, #0f172a);
}

.exam-modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  border-top: 1px solid var(--border-color, #e2e8f0);
  padding-top: 8px;
}
.exam-modal-footer .btn-fl {
  padding: 8px 16px;
  font-size: 0.88rem;
}
.btn-fl-hero-save {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #ffffff;
  padding: 8px 18px;
  font-size: 0.88rem;
}

/* Student Search List */
.student-search-list {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.search-user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid var(--border-color, #e2e8f0);
}
.fl-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color, #cbd5e1);
  font-size: 0.92rem;
}
.btn-sm {
  padding: 5px 10px;
  font-size: 0.8rem;
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast-msg {
  background: #0f172a;
  color: #f8fafc;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  border: 1px solid #334155;
  animation: slideInToast 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: auto;
}
@keyframes slideInToast {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Evaluation History Chips & Timeline --- */
.task-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.prev-eval-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #cbd5e1);
  color: var(--text-color, #0f172a);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}
.prev-eval-chip:hover {
  background: var(--hover-bg, #f1f5f9);
  border-color: #94a3b8;
}
.prev-eval-chip.prev-eval-none {
  opacity: 0.85;
  border-style: dashed;
  color: var(--text-muted, #64748b);
}
.prev-eval-text.prev-eval-none {
  color: var(--text-muted, #64748b);
}
.eval-count-badge {
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-color, #0f172a);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 1px 5px;
  border-radius: 6px;
}
.prev-eval-chip .expand-arrow {
  font-size: 0.65rem;
  color: var(--text-muted, #64748b);
  transition: transform 0.2s ease;
}

/* Timeline Info Help Box */
.task-timeline-help {
  font-size: 0.8rem;
  color: var(--text-muted, #475569);
  background: rgba(241, 245, 249, 0.7);
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  border-left: 3px solid #3b82f6;
  line-height: 1.4;
}

/* Noten-Farben für Historien-Chips */
.eval-status-gut { color: #16a34a; font-weight: 700; font-size: 0.78rem; }
.eval-status-maengel { color: #d97706; font-weight: 700; font-size: 0.78rem; }
.eval-status-fehler { color: #dc2626; font-weight: 700; font-size: 0.78rem; }

/* History Timeline under Task Row */
.history-timeline {
  background: #f8fafc;
  border-left: 3px solid var(--primary-color, #01aba8);
  margin: 0 18px 8px 18px;
  padding: 8px 14px;
  border-radius: 0 8px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--text-color, #334155);
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 3px;
}
.history-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Card Create Prompt Box */
.card-create-prompt-box {
  background: var(--card-bg, #ffffff);
  border: 2px dashed #94a3b8;
  border-radius: 14px;
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
  margin: 12px 0;
}
.btn-hero-create-card {
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(1, 171, 168, 0.3);
}
.tab-badge-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: #ef4444;
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
  margin-left: 4px;
  line-height: 1;
}

/* --- Ausbildungsdiagrammkarten Section in Sticky-Sidebar --- */
.class-cards-section {
  border-top: 1px solid var(--border-color, #e2e8f0);
  padding-top: 14px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.class-cards-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.class-cards-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-color, #0f172a);
}
.btn-add-card-plus {
  background: rgba(1, 171, 168, 0.12);
  border: 1px solid rgba(1, 171, 168, 0.3);
  color: var(--primary-color, #01aba8);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-add-card-plus:hover {
  background: var(--primary-color, #01aba8);
  color: #ffffff;
  transform: scale(1.06);
}
.class-cards-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.class-tab-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid var(--border-color, #cbd5e1);
  background: var(--card-bg, #ffffff);
  color: var(--text-color, #334155);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}
.class-tab-chip:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.class-tab-chip.active {
  background: var(--primary-color, #01aba8);
  color: #ffffff;
  border-color: var(--primary-color, #01aba8);
  box-shadow: 0 3px 10px rgba(1, 171, 168, 0.3);
}
.no-cards-hint {
  background: #f8fafc;
  border: 1px dashed var(--border-color, #cbd5e1);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.btn-xs {
  padding: 4px 8px;
  font-size: 0.76rem;
}

.btn-add-another-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(1, 171, 168, 0.5);
  background: rgba(1, 171, 168, 0.05);
  color: var(--primary-color, #01aba8);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.2s ease;
}
.btn-add-another-card:hover {
  background: rgba(1, 171, 168, 0.14);
  border-color: var(--primary-color, #01aba8);
  transform: translateY(-1px);
}
[data-color-mode="dark"] .btn-add-another-card {
  background: rgba(1, 171, 168, 0.08);
  border-color: rgba(1, 171, 168, 0.4);
}

/* Modal: Neue Ausbildungsdiagrammkarte anlegen */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-card {
  background: var(--card-bg, #ffffff);
  border-radius: 14px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 18px 20px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  border: 1px solid var(--border-color, #e2e8f0);
}
[data-color-mode="dark"] .modal-card {
  background: var(--card-bg, #1e293b);
  border-color: var(--border-color, #334155);
}
.create-class-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.create-class-radio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color, #cbd5e1);
  background: var(--card-bg, #ffffff);
  cursor: pointer;
  transition: all 0.2s;
}
.create-class-radio-card:hover:not(.is-disabled) {
  border-color: var(--primary-color, #01aba8);
  background: #f0fdfa;
}
.create-class-radio-card input[type="radio"] {
  accent-color: var(--primary-color, #01aba8);
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.create-class-radio-card.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f8fafc;
}
.class-radio-icon {
  font-size: 1.6rem;
}
.class-radio-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.class-radio-info strong {
  font-size: 0.92rem;
  color: var(--text-color, #0f172a);
}
.class-radio-info small {
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
}
.class-badge-already {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
  padding: 3px 8px;
  border-radius: 6px;
}
.class-badge-soon {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
  padding: 3px 8px;
  border-radius: 6px;
}

/* ==========================================================================
   STUFE 3: SCHÜLERANSICHT FÜR AUSBIILUNGS-DIAGRAMMKARTE
   ========================================================================== */

.student-ausbildung-view {
  max-width: 780px;
  margin: 0 auto;
  padding: 12px 12px 60px 12px;
}

/* Schüleransicht Live-Sync Status & Aktualisieren-Knopf */
.student-sync-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 2px 4px;
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
}

.student-sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.student-sync-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.student-sync-dot.is-offline {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.btn-student-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--subtle-bg, #f1f5f9);
  color: var(--primary-color, #01aba8);
  border: 1px solid var(--border-color, #cbd5e1);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-student-refresh:hover {
  background: rgba(1, 171, 168, 0.1);
  border-color: var(--primary-color, #01aba8);
}

.btn-student-refresh:active {
  transform: scale(0.96);
}

.btn-student-refresh.is-refreshing .refresh-icon {
  display: inline-block;
  animation: dkSpin 0.75s linear infinite;
}

@keyframes dkSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.student-hero-card {
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
}

.student-hero-title {
  margin: 2px 0 0 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-color, #0f172a);
}

.student-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  color: #334155;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.student-pill.pill-green {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.student-pill.pill-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.student-progress-track {
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}

.student-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color, #01aba8), #10b981);
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.student-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.student-stat-item {
  text-align: center;
  padding: 10px 6px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}

.student-stat-item .stat-num {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.student-stat-item .stat-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}

.student-stat-item.stat-gut .stat-num {
  color: #059669;
}

.student-stat-item.stat-mangel .stat-num {
  color: #d97706;
}

.student-stat-item.stat-offen .stat-num {
  color: #64748b;
}

.student-task-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.student-task-badge.badge-gut {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.student-task-badge.badge-mangel {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.student-task-badge.badge-offen {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

.student-block-header:hover {
  background-color: #f8fafc !important;
}

@media (max-width: 480px) {
  .student-ausbildung-view {
    padding: 8px 6px 60px 6px;
  }
  .student-stats-grid {
    gap: 6px;
  }
  .student-stat-item {
    padding: 8px 4px;
  }
  .student-stat-item .stat-num {
    font-size: 1rem;
  }
}

/* ==========================================================================
   DARK MODE COMPONENT STYLES ([data-color-mode="dark"])
   ========================================================================== */

/* 1. Brand Logo Contrast Framing in Dark Header */
[data-color-mode="dark"] .brand-logo-img {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 3px 8px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* 2. Form Inputs & Text Fields */
[data-color-mode="dark"] .input-group input,
[data-color-mode="dark"] .number-input,
[data-color-mode="dark"] .fl-select,
[data-color-mode="dark"] .fl-select-sm,
[data-color-mode="dark"] .notes-input-box textarea {
  background-color: var(--input-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-color-mode="dark"] .input-group input:focus,
[data-color-mode="dark"] .number-input:focus,
[data-color-mode="dark"] .notes-input-box textarea:focus {
  background-color: var(--card-bg);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(1, 171, 168, 0.25);
}

/* 3. Buttons */
[data-color-mode="dark"] .btn-dark {
  background-color: #334155;
  color: #f8fafc;
  border: 1px solid #475569;
}

[data-color-mode="dark"] .btn-dark:hover {
  background-color: #475569;
}

[data-color-mode="dark"] .btn-download {
  background-color: var(--subtle-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-color-mode="dark"] .btn-download:hover {
  background-color: var(--primary-color);
  color: #ffffff;
}

/* 4. Dashboard & Knowledge Navigation */
[data-color-mode="dark"] .section-title:hover {
  background-color: var(--hover-bg);
  border-color: var(--primary-color);
}

/* 5. Badges & Alerts */
[data-color-mode="dark"] .badge-neutral {
  background-color: #334155;
  color: #cbd5e1;
}

[data-color-mode="dark"] .alert-danger,
[data-color-mode="dark"] .status-error {
  background-color: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border-left-color: var(--color-danger);
}

[data-color-mode="dark"] .status-success {
  background-color: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

[data-color-mode="dark"] .text-danger {
  color: #f87171 !important;
}

/* 6. Quiz Engine & Verification States */
[data-color-mode="dark"] .quiz-progress-track {
  background-color: #334155;
}

[data-color-mode="dark"] .quiz-image-container {
  background-color: #0f172a;
  border-color: var(--border-color);
}

[data-color-mode="dark"] .btn-icon-sound:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

[data-color-mode="dark"] .option-btn:hover:not(:disabled) {
  background-color: rgba(1, 171, 168, 0.12);
  border-color: var(--primary-color);
}

[data-color-mode="dark"] .correct,
[data-color-mode="dark"] input.correct {
  background-color: rgba(16, 185, 129, 0.2) !important;
  border-color: #10b981 !important;
  color: #6ee7b7 !important;
}

[data-color-mode="dark"] .wrong,
[data-color-mode="dark"] input.wrong {
  background-color: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}

[data-color-mode="dark"] .missed {
  background-color: rgba(16, 185, 129, 0.12) !important;
  border-color: #10b981 !important;
}

[data-color-mode="dark"] .correct-feedback {
  background-color: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

[data-color-mode="dark"] .wrong-feedback {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

/* 7. Checklists */
[data-color-mode="dark"] .checklist-item-row {
  background-color: var(--subtle-bg);
  border-color: var(--border-color);
}

[data-color-mode="dark"] .checklist-item-row:hover {
  background-color: var(--hover-bg);
}

[data-color-mode="dark"] .checklist-badge {
  background-color: #334155;
  color: #cbd5e1;
}

/* 8. Audio & Speech Trainers */
[data-color-mode="dark"] .quiz-audio-container {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-color);
}

[data-color-mode="dark"] .quiz-speech-container {
  background: var(--card-bg);
  border-color: var(--border-color);
}

[data-color-mode="dark"] .speech-result-container {
  background: rgba(255, 255, 255, 0.05);
}

[data-color-mode="dark"] .speech-result {
  color: var(--text-primary);
}

[data-color-mode="dark"] .speech-modal {
  background: var(--card-bg);
  border-color: var(--border-color);
}

[data-color-mode="dark"] .speech-modal-header {
  color: var(--text-primary);
}

[data-color-mode="dark"] .speech-modal-body {
  color: var(--text-muted);
}

[data-color-mode="dark"] .speech-unsupported-alert {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* 9. Fahrlehrer Cockpit & Ausbildungsdiagrammkarte */
[data-color-mode="dark"] .cockpit-top-bar,
[data-color-mode="dark"] .block-card,
[data-color-mode="dark"] .student-cockpit-card {
  background: var(--card-bg);
  border-color: var(--border-color);
}

[data-color-mode="dark"] .cockpit-retro-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(180, 83, 9, 0.25) 100%);
  border-color: #f59e0b;
}
[data-color-mode="dark"] .retro-banner-text {
  color: #fde68a;
}
[data-color-mode="dark"] .retro-banner-text strong {
  color: #fef3c7;
}

[data-color-mode="dark"] .cockpit-title {
  color: var(--text-primary);
}

[data-color-mode="dark"] .cockpit-fl-badge {
  background: rgba(1, 171, 168, 0.2);
  color: #2dd4bf;
  border-color: rgba(45, 212, 191, 0.35);
}

[data-color-mode="dark"] .sync-online {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.35);
}
[data-color-mode="dark"] .sync-pending {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}
[data-color-mode="dark"] .sync-offline {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

/* Kategorieüberpunkte (Stufenblöcke) im Darkmodus */
[data-color-mode="dark"] .block-header {
  background-color: var(--subtle-bg, #131d31);
  border-bottom-color: var(--border-color, #334155);
}

[data-color-mode="dark"] .block-header:hover,
[data-color-mode="dark"] .student-block-header:hover {
  background-color: var(--hover-bg, #26354a) !important;
}

[data-color-mode="dark"] .btn-quick-approve {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.35);
  color: #4ade80;
}
[data-color-mode="dark"] .btn-quick-approve:hover {
  background: #16a34a;
  color: #ffffff;
}

[data-color-mode="dark"] .pill-pending {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted, #94a3b8);
}

[data-color-mode="dark"] .task-row:hover {
  background-color: var(--hover-bg);
}

/* Noten-Chips & Bewertungshistorie im Darkmodus */
[data-color-mode="dark"] .prev-eval-chip {
  background: var(--subtle-bg, #131d31);
  border-color: var(--border-color, #334155);
  color: var(--text-primary, #f8fafc);
}
[data-color-mode="dark"] .prev-eval-chip:hover {
  background: var(--hover-bg, #26354a);
  border-color: #475569;
}
[data-color-mode="dark"] .prev-eval-chip.prev-eval-none {
  background: rgba(19, 29, 49, 0.55);
  border-color: var(--border-color, #334155);
  color: var(--text-muted, #94a3b8);
}
[data-color-mode="dark"] .prev-eval-text.prev-eval-none {
  color: var(--text-muted, #94a3b8);
}

[data-color-mode="dark"] .eval-count-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

[data-color-mode="dark"] .eval-status-gut { color: #4ade80; }
[data-color-mode="dark"] .eval-status-maengel { color: #fbbf24; }
[data-color-mode="dark"] .eval-status-fehler { color: #f87171; }

/* 4-Stufen Buttons Dark Mode Kontrast */
[data-color-mode="dark"] .task-state-btn.state-1 {
  background: rgba(34, 197, 94, 0.18);
  border-color: #22c55e;
  color: #4ade80;
}
[data-color-mode="dark"] .task-state-btn.state-2 {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  color: #fbbf24;
}
[data-color-mode="dark"] .task-state-btn.state-3 {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #f87171;
}

/* Ausgeklappte Erklärungs- und Timeline-Boxen im Darkmodus */
[data-color-mode="dark"] .history-timeline {
  background: var(--subtle-bg, #131d31);
  border-left-color: var(--primary-color, #01aba8);
}
[data-color-mode="dark"] .history-item {
  color: var(--text-primary, #f8fafc);
  border-bottom-color: var(--border-color, #334155);
}
[data-color-mode="dark"] .task-timeline-help {
  background: rgba(30, 41, 59, 0.75);
  color: #cbd5e1;
  border-left-color: #60a5fa;
}
[data-color-mode="dark"] .history-item-current {
  background: rgba(59, 130, 246, 0.16) !important;
}

/* Schüleransicht Dark Mode */
[data-color-mode="dark"] .student-sync-bar {
  color: #94a3b8;
}

[data-color-mode="dark"] .btn-student-refresh {
  background: #1e293b;
  color: #38bdf8;
  border-color: #334155;
}

[data-color-mode="dark"] .btn-student-refresh:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
}

[data-color-mode="dark"] .student-hero-card {
  background: var(--card-bg, #1e293b);
  border-color: var(--border-color, #334155);
}

[data-color-mode="dark"] .student-hero-title {
  color: var(--text-primary, #f8fafc);
}

[data-color-mode="dark"] .student-pill {
  background: var(--subtle-bg, #131d31);
  color: var(--text-primary, #f8fafc);
  border: 1px solid var(--border-color, #334155);
}

[data-color-mode="dark"] .student-pill.pill-green {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

[data-color-mode="dark"] .student-pill.pill-amber {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

[data-color-mode="dark"] .student-progress-track {
  background: rgba(255, 255, 255, 0.1);
}

[data-color-mode="dark"] .student-stat-item {
  background: var(--subtle-bg);
  border-color: var(--border-color);
}

[data-color-mode="dark"] .student-stat-item .stat-lbl {
  color: var(--text-muted);
}

[data-color-mode="dark"] .student-task-badge.badge-offen {
  background: #334155;
  color: #cbd5e1;
  border-color: #475569;
}

[data-color-mode="dark"] .student-task-card {
  background: var(--card-bg, #1e293b) !important;
  border-color: var(--border-color, #334155) !important;
}

[data-color-mode="dark"] .student-task-desc {
  background: rgba(15, 23, 42, 0.6) !important;
  color: #cbd5e1 !important;
  border: 1px solid var(--border-color, #334155);
}

[data-color-mode="dark"] .student-block-card {
  background: var(--card-bg, #1e293b);
  border-color: var(--border-color, #334155);
}

[data-color-mode="dark"] .student-block-header {
  background-color: var(--card-bg, #1e293b) !important;
  color: var(--text-primary, #f8fafc);
}

[data-color-mode="dark"] .student-block-body {
  background: var(--subtle-bg, #131d31) !important;
  border-top-color: var(--border-color, #334155) !important;
}

[data-color-mode="dark"] .notes-entry {
  background-color: var(--subtle-bg);
  border-color: var(--border-color);
}

[data-color-mode="dark"] .instructor-meta-box {
  background-color: var(--subtle-bg);
  border-color: var(--border-color);
}

/* ==========================================================================
   ERSTE HILFE KOFFER (VIP)
   ========================================================================== */
.erstehilfe-container {
  max-width: 680px;
  margin: 0 auto;
}

.erstehilfe-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.erstehilfe-vip-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.vip-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
  margin-left: 6px;
  vertical-align: middle;
}

.erstehilfe-tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.erstehilfe-tab-btn {
  flex: 1;
  min-width: 110px;
  padding: 10px 14px;
  border-radius: var(--border-radius-md);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.erstehilfe-tab-btn:hover {
  background: var(--hover-bg);
  border-color: var(--primary-color);
}

.erstehilfe-tab-btn.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(1, 171, 168, 0.25);
}

.erstehilfe-tab-pane {
  display: block;
}

.erstehilfe-card {
  padding: 0;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.erstehilfe-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0b1120;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.erstehilfe-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.erstehilfe-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(1, 171, 168, 0.88);
  backdrop-filter: blur(6px);
  border: 3px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 5;
}

.erstehilfe-play-overlay:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--primary-hover);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.erstehilfe-play-overlay.playing {
  background: rgba(239, 68, 68, 0.88);
}

.erstehilfe-play-overlay.playing:hover {
  background: #dc2626;
}

.erstehilfe-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.erstehilfe-hint-box {
  background: rgba(1, 171, 168, 0.08);
  border-left: 4px solid var(--primary-color);
  padding: 10px 14px;
  border-radius: 6px;
  color: var(--text-color);
}

.erstehilfe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 580px) {
  .erstehilfe-grid {
    grid-template-columns: 1fr;
  }
  .erstehilfe-body {
    padding: 1rem 1.15rem 1.25rem;
  }
}

.erstehilfe-grid-item {
  background: var(--subtle-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
}

.grid-span-full {
  grid-column: 1 / -1;
}

.item-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-color);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-text {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-color);
  margin: 0;
}

.erstehilfe-warning-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-left: 4px solid var(--color-danger);
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
}

.warning-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-danger);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.warning-text {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-danger);
  margin: 0;
}

[data-color-mode="dark"] .erstehilfe-hint-box {
  background: rgba(1, 171, 168, 0.15);
}

[data-color-mode="dark"] .erstehilfe-warning-box {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}




