/* ==========================================================================
   Doppelyar Component Styles
   ========================================================================== */

/* 1. App Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(14px, var(--safe-top)) 20px 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface-translucent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-lighter) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary);
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(22, 34, 63, 0.18);
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-name .sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold-darker);
  background: var(--gold-tint);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

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

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-primary);
  position: relative;
  transition: background 0.15s ease, transform 0.15s ease;
}

.icon-btn:hover {
  background: var(--bg-surface-soft);
  transform: translateY(-1px);
}

.icon-btn .badge-dot {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-primary);
  border: 2px solid var(--bg-surface);
}

.avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-darker) 100%);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

/* 2. Cards */
.card-large {
  background: var(--bg-surface);
  border-radius: var(--radius-lg); /* 22px */
  padding: 22px;
  box-shadow: var(--shadow-standard);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-small {
  background: var(--bg-surface);
  border-radius: var(--radius-md); /* 14-16px */
  padding: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  transition: transform 0.15s ease;
}

.card-interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-floating);
}

/* 3. Editorial Welcome Hero with German Language Character */
.hero-welcome-editorial {
  padding: 24px 20px 10px;
  position: relative;
}

.hero-editorial-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.kicker-german {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--gold-darker);
  background: var(--gold-tint);
  border: 1px solid rgba(239, 169, 64, 0.35);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
}

.kicker-umlaut-dots {
  color: var(--gold-primary);
  font-weight: 800;
  letter-spacing: 3px;
  font-size: 0.95rem;
}

.kicker-level-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy-primary);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.hero-editorial-heading {
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.hero-lead-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.hero-user-name {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--navy-primary);
  letter-spacing: -0.5px;
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* German Umlaut Graphic Signature */
.umlaut-signature-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-lighter) 100%);
  color: var(--gold-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 900;
  margin-right: 6px;
  box-shadow: 0 2px 8px rgba(22, 34, 63, 0.15);
  vertical-align: middle;
}

.hero-editorial-sub {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 440px;
}

/* 4. The 90-Day Challenge HERO Centerpiece (The singular bold focal point) */
.challenge-ring-card {
  margin: 14px 20px 16px;
  background: var(--bg-surface);
  border-radius: var(--radius-hero); /* 30px - Distinct organic shape */
  padding: 24px 22px;
  border: 1.5px solid rgba(239, 169, 64, 0.35); /* Subtle gold perimeter glow */
  box-shadow: var(--shadow-hero); /* The ONLY card with intentional deep warm shadow */
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* German Typography Watermark Signature (ä ö ü ß in background) */
.challenge-ring-card::after {
  content: "ä ö ü ß";
  font-family: var(--font-mono);
  font-weight: 900;
  letter-spacing: 16px;
  position: absolute;
  bottom: -20px;
  left: -10px;
  font-size: 4.8rem;
  color: rgba(22, 34, 63, 0.035);
  pointer-events: none;
  line-height: 1;
  z-index: 0;
  user-select: none;
}

[data-theme="dark"] .challenge-ring-card::after {
  color: rgba(255, 255, 255, 0.03);
}

.challenge-info {
  position: relative;
  z-index: 1;
  flex: 1;
}

.badge-streak-fire {
  background: linear-gradient(135deg, rgba(239, 169, 64, 0.2) 0%, rgba(245, 158, 11, 0.12) 100%);
  border: 1px solid rgba(239, 169, 64, 0.5);
  color: var(--gold-darker);
  font-weight: 800;
  font-size: 0.74rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 8px;
}

.challenge-info h2 {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--navy-primary);
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.challenge-info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.challenge-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface-soft);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  width: fit-content;
}

.challenge-stat-item {
  display: flex;
  flex-direction: column;
}

.challenge-stat-item .val {
  font-weight: 900;
  font-size: 0.96rem;
  color: var(--navy-primary);
}

.challenge-stat-item .lbl {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Hero Dial Center Styling */
.hero-progress-dial-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.hero-dial-center {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.hero-dial-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gold-darker);
  letter-spacing: 0.8px;
  line-height: 1;
}

.hero-dial-pct {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--navy-primary);
  line-height: 1.15;
}

.hero-dial-sub {
  font-size: 0.58rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
}

.progress-ring-svg {
  transform: rotate(-90deg);
}

/* 5. AI Conversation Practice Card (Cockpit console shape) */
.ai-practice-card {
  margin: 12px 20px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg); /* 20px */
  padding: 20px 22px;
  box-shadow: none; /* Flat and quiet, lets challenge card be the hero */
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.ai-practice-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy-primary) 0%, var(--gold-primary) 50%, var(--navy-primary) 100%);
}

.ai-practice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ai-practice-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-practice-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 16px;
}

.mic-button-wrapper {
  position: relative;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.mic-pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--gold-glow);
  opacity: 0.6;
  animation: micPulse 2.4s infinite ease-out;
}

.mic-pulse-ring-2 {
  animation-delay: 1.2s;
}

.mic-main-btn {
  position: relative;
  z-index: 2;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-primary) 0%, var(--gold-darker) 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px var(--gold-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mic-main-btn:hover {
  transform: scale(1.06);
}

.practice-chips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.practice-chip {
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.practice-chip:hover {
  background: var(--gold-tint);
  border-color: rgba(239, 169, 64, 0.3);
  transform: translateY(-1px);
}

.practice-chip-icon {
  font-size: 1.15rem;
  margin-bottom: 4px;
  display: block;
}

.practice-chip-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--navy-primary);
  display: block;
}

.practice-chip-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* 6. Quick Action Mini Cards Grid (Quiet & Disciplined) */
.quick-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 10px 20px;
}

.quick-card {
  background: var(--bg-surface);
  border-radius: var(--radius-sm); /* 10px - noticeably crisper */
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  box-shadow: none !important; /* STRICTLY FLAT - no generic shadows */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 98px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  text-decoration: none;
}

.quick-card:hover {
  border-color: var(--gold-primary);
  background: var(--bg-surface-soft);
  transform: translateY(-1px);
}

.quick-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quick-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.icon-blue { background: var(--info-bg); color: var(--info); }
.icon-gold { background: var(--gold-tint); color: var(--gold-darker); }
.icon-green { background: var(--success-bg); color: var(--success); }

.quick-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy-primary);
  margin-top: 10px;
}

.quick-card-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 7. Challenge Banner */
.challenge-banner {
  margin: 12px 20px;
  background: linear-gradient(135deg, var(--gold-light) 0%, #FFF8EE 100%);
  border: 1px solid rgba(239, 169, 64, 0.35);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .challenge-banner {
  background: linear-gradient(135deg, #241C12 0%, #1A1816 100%);
  border-color: rgba(239, 169, 64, 0.25);
}

.challenge-banner-content h3 {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--navy-primary);
  margin-bottom: 4px;
}

.challenge-banner-content p {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.btn-banner {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--gold-primary);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 12px var(--gold-glow);
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-banner:hover {
  background: var(--gold-darker);
  transform: translateY(-1px);
}

/* 8. Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  height: calc(var(--bottom-nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg-surface-translucent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-left: 6px;
  padding-right: 6px;
  z-index: 1000;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: var(--bottom-nav-height);
  color: var(--text-muted);
  transition: color 0.15s ease;
  text-decoration: none;
  position: relative;
}

.nav-item.active {
  color: var(--gold-darker);
}

.nav-item.active .nav-icon {
  transform: translateY(-2px);
  color: var(--gold-darker);
}

.nav-icon {
  font-size: 1.25rem;
  transition: transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.nav-label {
  font-size: 0.72rem;
  font-weight: 600;
}

.nav-indicator {
  position: absolute;
  top: 0;
  width: 24px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--gold-primary);
  display: none;
}

.nav-item.active .nav-indicator {
  display: block;
}

/* 9. Login & Auth Styles */
.auth-page-wrapper {
  padding: 30px 24px 40px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-lighter) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary);
  font-size: 2rem;
  font-weight: 900;
  box-shadow: var(--shadow-standard);
}

.auth-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--navy-primary);
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.returning-member-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-standard);
  text-align: center;
  margin-bottom: 24px;
}

.returning-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-tint);
  color: var(--gold-darker);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.divider-or {
  display: flex;
  align-items: center;
  margin: 16px 0 24px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.divider-or::before,
.divider-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.divider-or span {
  padding: 0 14px;
}

.form-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}

.form-group {
  margin-bottom: 16px;
  text-align: right;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy-primary);
  margin-bottom: 6px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.15s ease;
}

.form-input:focus {
  background: var(--bg-surface);
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--gold-tint);
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.btn-primary {
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-lighter) 100%);
  color: #FFFFFF;
  font-size: 0.98rem;
  font-weight: 700;
  box-shadow: var(--shadow-standard);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-floating);
}

.btn-secondary {
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-soft);
  color: var(--navy-primary);
  font-size: 0.92rem;
  font-weight: 700;
  border: 1px solid var(--border-light);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

/* 10. Classroom & Learning Elements */
.deutschcenter-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 20px 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #16223F 0%, #0F172A 100%);
  border-radius: var(--radius-md);
  color: #FFFFFF;
  border: 1px solid rgba(239, 169, 64, 0.3);
}

.dc-badge-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dc-crest {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold-primary);
  color: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
}

.dc-badge-name {
  font-size: 0.9rem;
  font-weight: 800;
}

.dc-badge-sub {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
}

.dc-status-active {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.next-class-card {
  margin: 12px 20px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-standard);
  position: relative;
  overflow: hidden;
}

.next-class-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 5px;
  background: var(--gold-primary);
}

.class-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.class-type-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--navy-tint);
  color: var(--navy-primary);
}

.class-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-darker);
}

.class-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--navy-primary);
  margin-bottom: 6px;
}

.class-teacher {
  font-size: 0.84rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

/* CEFR Progress Steps */
.cefr-road-card {
  margin: 12px 20px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}

.cefr-road-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cefr-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin: 10px 0 6px;
}

.cefr-steps::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 10px; right: 10px;
  height: 3px;
  background: var(--bg-surface-soft);
  transform: translateY(-50%);
  z-index: 1;
}

.cefr-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cefr-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface-soft);
  border: 2px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.cefr-step.completed .cefr-dot {
  background: var(--navy-primary);
  border-color: var(--navy-primary);
  color: #FFFFFF;
}

.cefr-step.current .cefr-dot {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  color: #FFFFFF;
  box-shadow: 0 0 0 4px var(--gold-glow);
  transform: scale(1.15);
}

.cefr-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 6px;
}

.quote-card {
  margin: 12px 20px;
  background: linear-gradient(135deg, rgba(22, 34, 63, 0.04) 0%, rgba(239, 169, 64, 0.06) 100%);
  border: 1px dashed rgba(22, 34, 63, 0.15);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  text-align: center;
}

.quote-german {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--navy-primary);
  font-style: italic;
  margin-bottom: 6px;
  direction: ltr;
}

.quote-persian {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* 11. Placement Test Styles */
.test-progress-header {
  padding: 16px 20px 10px;
}

.test-steps-indicator {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.step-bar-segment {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-surface-soft);
  transition: background 0.3s ease;
}

.step-bar-segment.active {
  background: var(--gold-primary);
}

.step-bar-segment.completed {
  background: var(--navy-primary);
}

.test-card {
  margin: 10px 20px 20px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-standard);
}

.test-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}

.test-option-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--navy-primary);
  transition: all 0.15s ease;
  text-align: right;
}

.test-option-btn:hover {
  background: var(--gold-tint);
  border-color: rgba(239, 169, 64, 0.4);
}

.test-option-btn.selected {
  background: var(--navy-primary);
  color: #FFFFFF;
  border-color: var(--navy-primary);
}

/* 12. Assignment Viewer Mock */
.pdf-viewer-mock {
  background: #2D3748;
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.submission-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
}

.sub-tab-btn {
  flex: 1;
  padding: 10px 8px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.sub-tab-btn.active {
  color: var(--gold-darker);
  border-bottom-color: var(--gold-primary);
}

/* 13. Admin & Teacher Panel */
.admin-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  gap: 8px;
  padding: 6px 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x pan-y;
}
.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tab-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy-primary);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.admin-tab-btn.active {
  background: var(--navy-primary);
  color: #FFFFFF;
  border-color: var(--navy-primary);
}

.student-row-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 8px 20px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 14. Global Toast Notifications */
.toast-container {
  position: fixed;
  top: max(16px, var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 400px;
}

.toast {
  background: var(--navy-primary);
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-floating);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.toast.toast-success { background: #065F46; border-right: 4px solid #10B981; }
.toast.toast-warning { background: #78350F; border-right: 4px solid #F59E0B; }
.toast.toast-danger { background: #7F1D1D; border-right: 4px solid #EF4444; }
.toast.toast-info { background: #1E293B; border-right: 4px solid #3B82F6; }

/* 15. Task Source Badges */
.badge-source-internal {
  background: var(--gold-tint);
  color: var(--gold-darker);
  border: 1px solid rgba(239, 169, 64, 0.35);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-source-lms {
  background: rgba(59, 130, 246, 0.12);
  color: #2563EB;
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

[data-theme="dark"] .badge-source-lms {
  background: rgba(59, 130, 246, 0.2);
  color: #60A5FA;
}

/* 16. Challenge Null State (Onboarding Card) */
.challenge-join-card {
  margin: 10px 20px 18px;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-soft) 100%);
  border: 1.5px dashed rgba(239, 169, 64, 0.5);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.3s ease;
}

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

.challenge-join-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-darker) 100%);
  color: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px var(--gold-glow);
}

.challenge-join-card h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy-primary);
  margin-bottom: 4px;
}

.challenge-join-card p {
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.challenge-perks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.challenge-perk-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 600;
}

.challenge-perk-item span.icon {
  font-size: 1rem;
}

/* 17. LMS Connection State Cards */
.lms-state-card {
  margin: 10px 20px 16px;
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  animation: fadeIn 0.3s ease;
}

.lms-state-not-linked {
  background: var(--bg-surface);
  border-right: 5px solid var(--warning);
}

.lms-state-unavailable {
  background: var(--bg-surface);
  border-right: 5px solid var(--danger);
}

.lms-state-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.lms-state-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.lms-state-not-linked .lms-state-icon-box {
  background: var(--warning-bg);
  color: var(--warning);
}

.lms-state-unavailable .lms-state-icon-box {
  background: var(--danger-bg);
  color: var(--danger);
}

.lms-state-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--navy-primary);
  margin-bottom: 4px;
}

.lms-state-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
}

.lms-action-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* 18. Dev Switcher Bar */
.dev-state-switcher {
  margin: 6px 20px 14px;
  padding: 8px 12px;
  background: var(--bg-surface-soft);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
}

.dev-state-switcher .label {
  font-weight: 700;
  color: var(--navy-primary);
  white-space: nowrap;
}

.dev-chips-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.dev-chip {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.dev-chip:hover {
  background: var(--gold-tint);
  color: var(--navy-primary);
  border-color: var(--gold-primary);
}

.dev-chip.active {
  background: var(--navy-primary);
  color: #FFFFFF;
  border-color: var(--navy-primary);
}

/* 19. Access Restricted Card */
.access-restricted-card {
  margin: 24px 20px;
  padding: 32px 20px;
  text-align: center;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--danger);
  box-shadow: var(--shadow-card);
}

.access-restricted-card .icon-lock {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.access-restricted-card h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy-primary);
  margin-bottom: 8px;
}

.access-restricted-card p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* 20. Conversations Tab Styling (Student Voice AI Analysis) */
.conversation-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 10px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.conversation-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

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

.conv-scores {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.score-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.score-pill-grammar {
  background: rgba(10, 25, 47, 0.08);
  color: var(--navy-primary);
  border: 1px solid rgba(10, 25, 47, 0.15);
}

.score-pill-pronunciation {
  background: rgba(212, 160, 23, 0.12);
  color: #92400e;
  border: 1px solid rgba(212, 160, 23, 0.3);
}

[data-theme="dark"] .score-pill-grammar {
  background: rgba(147, 197, 253, 0.12);
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.25);
}

[data-theme="dark"] .score-pill-pronunciation {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.conv-transcript {
  background: var(--bg-surface-soft);
  border-right: 3px solid var(--gold-primary);
  border-radius: var(--radius-xs);
  padding: 8px 12px;
  font-size: 0.78rem;
  font-family: 'DM Mono', monospace;
  color: var(--text-secondary);
  direction: ltr;
  text-align: left;
  margin-bottom: 10px;
}

.conv-feedback {
  background: rgba(16, 185, 129, 0.08);
  border: 1px dashed rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-xs);
  padding: 8px 12px;
  font-size: 0.76rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.conv-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.audio-mock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--navy-primary);
  color: #FFFFFF;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.audio-mock-btn:hover {
  background: var(--navy-light);
}

/* 21. Advanced KPI Section & Sub-tabs */
.kpi-subtabs-wrap {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  gap: 8px;
  padding: 6px 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x pan-y;
  background: var(--bg-surface-soft);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 58px;
  z-index: 10;
}

.kpi-subtabs-wrap::-webkit-scrollbar {
  display: none;
}

.kpi-subtab-pill {
  flex-shrink: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.kpi-subtab-pill:hover {
  border-color: var(--gold-primary);
  color: var(--navy-primary);
}

.kpi-subtab-pill.active {
  background: var(--navy-primary);
  color: #FFFFFF;
  border-color: var(--navy-primary);
  box-shadow: 0 2px 6px rgba(10, 25, 47, 0.15);
}

[data-theme="dark"] .kpi-subtab-pill.active {
  background: var(--gold-primary);
  color: var(--navy-deep);
  border-color: var(--gold-primary);
}

.kpi-container {
  padding: 14px 20px 28px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.kpi-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-stat-card {
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
}

.kpi-stat-value {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--navy-primary);
  font-family: 'DM Mono', monospace;
  margin-bottom: 2px;
}

.kpi-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Retention Cohort Table */
.cohort-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
}

.cohort-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  text-align: center;
}

.cohort-table th,
.cohort-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.cohort-table th {
  background: var(--bg-surface-soft);
  font-weight: 700;
  color: var(--text-primary);
}

.cohort-cell-high {
  background: rgba(16, 185, 129, 0.18);
  color: #065f46;
  font-weight: 700;
}

.cohort-cell-mid {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
  font-weight: 700;
}

.cohort-cell-low {
  background: rgba(239, 68, 68, 0.14);
  color: #991b1b;
  font-weight: 700;
}

[data-theme="dark"] .cohort-cell-high {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

[data-theme="dark"] .cohort-cell-mid {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

[data-theme="dark"] .cohort-cell-low {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

/* Heat Map Bars */
.heatmap-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.heatmap-label {
  width: 70px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.heatmap-bar-bg {
  flex: 1;
  height: 20px;
  background: var(--bg-surface-soft);
  border-radius: var(--radius-xs);
  overflow: hidden;
  position: relative;
}

.heatmap-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy-lighter) 0%, var(--gold-primary) 100%);
  border-radius: var(--radius-xs);
  transition: width 0.4s ease;
}

.heatmap-value {
  width: 42px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  color: var(--navy-primary);
  text-align: left;
}

/* Funnel Steps */
.funnel-step {
  margin-bottom: 12px;
  background: var(--bg-surface-soft);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  border-right: 4px solid var(--gold-primary);
}

.funnel-step-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 700;
}

.funnel-progress {
  height: 10px;
  background: rgba(0,0,0,0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.funnel-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-primary), var(--navy-primary));
  border-radius: var(--radius-full);
}

/* Early Warning Card */
.warning-student-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.warning-badge-high {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.warning-badge-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}



/* Header Brand Logo Image */
.brand-logo-header {
  height: 38px;
  width: auto;
  max-width: 48px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}
