/* ══════════════════════════════════════════════════
   FIVE MOVES — TRAININGS LAB
   Member Area · Login · Cockpit · Kurs-Karten

   Design-System:
   Fibonacci-Spacing: 8 · 13 · 21 · 34 · 55 · 89
   Font: Plus Jakarta Sans
   Brand: #C11D6F (Magenta)
   ══════════════════════════════════════════════════ */

:root {
  --tl-bg:        #FAFAF8;
  --tl-surface:   #FFFFFF;
  --tl-text:      #1A1A1A;
  --tl-text-2:    #4A4A4A;
  --tl-text-3:    #7A7A7A;
  --tl-brand:     #C11D6F;
  --tl-brand-h:   #9E1759;
  --tl-brand-t:   rgba(193,29,111,.06);
  --tl-sand:      #E8E6E3;
  --tl-warm:      #F5F3F0;
  --tl-radius:    16px;
  --tl-shadow:    0 4px 16px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.03);
  --tl-shadow-lg: 0 8px 32px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.03);
  --tl-ease:      cubic-bezier(0.16, 1, 0.3, 1);
  --tl-nav-h:     68px;
}

/* ── BASE / FONT ──────────────────────────────── */

html, body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── LOGIN PAGE ────────────────────────────────── */

.tl-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tl-bg);
  padding: 34px 21px;
}

.tl-login-card {
  max-width: 440px;
  width: 100%;
  padding: 55px 34px;
  text-align: center;
}

.tl-logo {
  font-size: 26px;
  font-weight: 600;
  color: var(--tl-text);
  letter-spacing: -0.5px;
  margin-bottom: 55px;
  text-decoration: none;
  display: block;
}
.tl-logo span { color: var(--tl-brand); }
.tl-logo sup {
  font-size: 10px;
  font-weight: 400;
  color: var(--tl-text-3);
}

.tl-login-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  background: var(--tl-brand-t);
  border-radius: 21px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--tl-brand);
  margin-bottom: 21px;
}

.tl-login-title {
  font-size: 21px;
  font-weight: 500;
  color: var(--tl-text);
  margin-bottom: 8px;
}

.tl-login-sub {
  font-size: 14px;
  color: var(--tl-text-3);
  margin-bottom: 34px;
  line-height: 1.6;
}

.tl-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.tl-input {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  padding: 13px 21px;
  border: 2px solid var(--tl-sand);
  border-radius: 8px;
  outline: none;
  background: var(--tl-surface);
  color: var(--tl-text);
  transition: border-color 0.3s var(--tl-ease);
}
.tl-input:focus {
  border-color: var(--tl-brand);
}
.tl-input::placeholder {
  color: var(--tl-text-3);
}

.tl-btn {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  padding: 13px 21px;
  background: var(--tl-brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s var(--tl-ease), transform 0.2s var(--tl-ease);
  margin-top: 8px;
}
.tl-btn:hover {
  background: var(--tl-brand-h);
  transform: translateY(-1px);
}

.tl-error {
  font-size: 13px;
  color: #dc2626;
  margin-top: 8px;
  padding: 8px 13px;
  background: #fef2f2;
  border-radius: 6px;
}

.tl-login-hint {
  font-size: 11px;
  color: var(--tl-text-3);
  margin-top: 34px;
  line-height: 1.6;
}

/* ── MAGIC LINK: Ghost Button ─────────────────── */

.tl-btn--ghost {
  background: transparent;
  color: var(--tl-brand);
  border: 2px solid var(--tl-brand);
}
.tl-btn--ghost:hover {
  background: var(--tl-brand-t);
  transform: translateY(-1px);
}

/* ── MAGIC LINK: Admin-Fallback ───────────────── */

.tl-admin-fallback {
  margin-top: 34px;
  text-align: center;
}

.tl-admin-toggle {
  font-size: 12px;
  color: var(--tl-text-3);
  cursor: pointer;
  list-style: none;
  user-select: none;
  padding: 8px 0;
  transition: color 0.2s ease;
}
.tl-admin-toggle::-webkit-details-marker { display: none; }
.tl-admin-toggle::before {
  content: '\25B8 ';
  font-size: 10px;
  margin-right: 4px;
}
.tl-admin-fallback[open] .tl-admin-toggle::before {
  content: '\25BE ';
}
.tl-admin-toggle:hover {
  color: var(--tl-text-2);
}

.tl-form--admin {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--tl-sand);
}

/* ── COCKPIT PAGE ──────────────────────────────── */

.tl-cockpit {
  min-height: 100vh;
  background: var(--tl-bg);
  padding-top: var(--tl-nav-h);
}

.tl-cockpit-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 55px clamp(21px, 5vw, 55px) 89px;
}

/* Header */
.tl-cockpit-header {
  margin-bottom: 55px;
}

.tl-cockpit-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  background: var(--tl-brand-t);
  border-radius: 21px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--tl-brand);
  margin-bottom: 21px;
}

.tl-greeting {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 600;
  color: var(--tl-text);
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.tl-greeting-sub {
  font-size: 17px;
  color: var(--tl-text-2);
  line-height: 1.6;
}

/* Course Grid */
.tl-courses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 21px;
}

/* Course Card */
.tl-card {
  background: var(--tl-surface);
  border-radius: var(--tl-radius);
  overflow: hidden;
  box-shadow: var(--tl-shadow);
  transition: transform 0.4s var(--tl-ease), box-shadow 0.4s var(--tl-ease);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.tl-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tl-shadow-lg);
}

.tl-card-image {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
  background: var(--tl-warm);
}
.tl-card-image img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--tl-ease);
}
.tl-card:hover .tl-card-image img {
  transform: scale(1.04);
}

/* ── CARD PLACEHOLDERS · Visual Compositions ──── */

.tl-card-image-placeholder {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.tl-ph-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}
.tl-ph-label {
  position: absolute;
  bottom: 13px;
  left: 21px;
  z-index: 2;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

/* ·· V1 — Grundausbildung · Rosa + Organic Flow ·· */

.tl-ph-v1 {
  background: linear-gradient(145deg, #FADCE8 0%, #F0B8CF 50%, #E89AB8 100%);
}
.tl-ph-v1 .tl-ph-label {
  color: rgba(130,15,70,.35);
}

@keyframes tlLineReveal {
  to { stroke-dashoffset: 0; }
}

/* ·· V2 — Wunschgefühl Simulator · Magenta + Pulse ·· */

.tl-ph-v2 {
  background: linear-gradient(145deg, #C11D6F 0%, #8A1450 50%, #4A0A2A 100%);
}
.tl-ph-v2 .tl-ph-label {
  color: rgba(255,255,255,.55);
}
.tl-ph-v2::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 70%);
  filter: blur(15px);
  animation: tlGlowPulse 3s ease-in-out infinite;
  pointer-events: none;
}
.tl-ring {
  transform-origin: center;
  animation: tlRingPulse 4s ease-in-out infinite;
}
.tl-ring-2 { animation-delay: .5s; }
.tl-ring-3 { animation-delay: 1s; }
.tl-ring-4 { animation-delay: 1.5s; }
.tl-ring-5 { animation-delay: 2s; }

.tl-eq-bar {
  animation: tlEqBounce 1.2s ease-in-out infinite alternate;
}
.tl-eq-bar:nth-child(n+20) { animation-delay: .1s; }
.tl-eq-bar:nth-child(n+21) { animation-delay: .2s; }
.tl-eq-bar:nth-child(n+22) { animation-delay: .05s; }
.tl-eq-bar:nth-child(n+23) { animation-delay: .15s; }
.tl-eq-bar:nth-child(n+24) { animation-delay: .25s; }
.tl-eq-bar:nth-child(n+25) { animation-delay: .08s; }
.tl-eq-bar:nth-child(n+26) { animation-delay: .18s; }
.tl-eq-bar:nth-child(n+27) { animation-delay: .12s; }

@keyframes tlRingPulse {
  0%, 100% { opacity: .25; transform: scale(1); }
  50% { opacity: .8; transform: scale(1.04); }
}
@keyframes tlGlowPulse {
  0%, 100% { opacity: .4; transform: translate(-50%,-50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%,-50%) scale(1.3); }
}
@keyframes tlEqBounce {
  0% { transform: scaleY(.3); }
  100% { transform: scaleY(1); }
}

/* Particles float */
.tl-particle {
  animation: tlFloat 6s ease-in-out infinite;
}
.tl-particle:nth-child(n+14) { animation-delay: 1s; animation-duration: 8s; }
.tl-particle:nth-child(n+15) { animation-delay: 2s; animation-duration: 7s; }
.tl-particle:nth-child(n+16) { animation-delay: .5s; animation-duration: 9s; }
.tl-particle:nth-child(n+17) { animation-delay: 1.5s; animation-duration: 6s; }
.tl-particle:nth-child(n+18) { animation-delay: 3s; animation-duration: 10s; }

@keyframes tlFloat {
  0%, 100% { transform: translateY(0); opacity: .3; }
  50% { transform: translateY(-8px); opacity: .7; }
}

/* ·· V3 — Weibliche Intimität · Dark + 5 Energy Lines ·· */

.tl-ph-v3 {
  background: #1A1A1A;
}
.tl-ph-v3 .tl-ph-label {
  color: rgba(255,255,255,.35);
}
.tl-ph-v3::after {
  content: '';
  position: absolute;
  top: 10%;
  right: 5%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(193,29,111,.14) 0%, transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}
.tl-ph-v3 .tl-line {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: tlLineReveal 1.8s var(--tl-ease) forwards;
}
.tl-ph-v3 .tl-line:nth-child(3) { animation-delay: .1s; }
.tl-ph-v3 .tl-line:nth-child(4) { animation-delay: .2s; }
.tl-ph-v3 .tl-line:nth-child(5) { animation-delay: .3s; }
.tl-ph-v3 .tl-line:nth-child(6) { animation-delay: .4s; }
.tl-ph-v3 .tl-line:nth-child(7) { animation-delay: .5s; }
.tl-blob {
  animation: tlBlobFloat 8s ease-in-out infinite;
}
.tl-blob-2 {
  animation: tlBlobFloat2 10s ease-in-out infinite;
}
.tl-blob-3 {
  animation: tlBlobFloat3 12s ease-in-out infinite;
}

@keyframes tlBlobFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(12px,-8px) scale(1.06); }
  66% { transform: translate(-6px,4px) scale(.97); }
}
@keyframes tlBlobFloat2 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-14px,10px) scale(1.08); }
}
@keyframes tlBlobFloat3 {
  0%, 100% { transform: translate(0,0) scale(1) rotate(0deg); }
  50% { transform: translate(8px,-6px) scale(1.04) rotate(5deg); }
}

.tl-card-body {
  padding: 21px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tl-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--tl-text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.tl-card-desc {
  font-size: 14px;
  color: var(--tl-text-2);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tl-card-footer {
  padding: 0 21px 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tl-card-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--tl-brand);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.3s var(--tl-ease);
}
.tl-card:hover .tl-card-cta {
  gap: 8px;
}

.tl-card-status {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 13px;
  background: var(--tl-brand-t);
  color: var(--tl-brand);
}

.tl-card-status--soon {
  background: #f5f5f5;
  color: var(--tl-text-3);
}

/* Empty State */
.tl-empty {
  text-align: center;
  padding: 89px 34px;
}

.tl-empty-icon {
  width: 55px;
  height: 55px;
  margin: 0 auto 21px;
  opacity: 0.3;
}

.tl-empty-text {
  font-size: 17px;
  color: var(--tl-text-3);
  line-height: 1.6;
}

/* Logout Bar */
.tl-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
}

.tl-logout-btn {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--tl-text-3);
  background: none;
  border: 1px solid var(--tl-sand);
  border-radius: 6px;
  padding: 6px 13px;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}
.tl-logout-btn:hover {
  color: var(--tl-text);
  border-color: var(--tl-text-3);
}

/* ── ACCESS DENIED ─────────────────────────────── */

.tl-access-denied {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 55px 21px;
}

.tl-access-denied-inner {
  max-width: 440px;
}

.tl-access-denied h2 {
  font-size: 21px;
  font-weight: 600;
  color: var(--tl-text);
  margin-bottom: 13px;
}

.tl-access-denied p {
  font-size: 15px;
  color: var(--tl-text-2);
  line-height: 1.6;
  margin-bottom: 21px;
}

.tl-access-denied a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--tl-brand);
  text-decoration: none;
}
.tl-access-denied a:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════════════════════
   MEIN FORTSCHRITT (FM-313b)
   Guide Performance Dashboard
   ══════════════════════════════════════════════════ */

.tl-back-link {
  font-size: 13px;
  font-weight: 400;
  color: var(--tl-text-3);
  text-decoration: none;
  transition: color 0.2s ease;
}
.tl-back-link:hover { color: var(--tl-text); }

/* ── Hero ──────────────────────────────────────── */

.tl-progress-hero {
  margin-bottom: 34px;
}

.tl-progress-greeting {
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 600;
  color: var(--tl-text);
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.tl-progress-sub {
  font-size: 16px;
  font-weight: 300;
  color: var(--tl-text-2);
  line-height: 1.618;
}

/* ── Stats-Leiste ──────────────────────────────── */

.tl-progress-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin-bottom: 21px;
}

.tl-progress-stat {
  text-align: center;
  padding: 21px 8px;
  background: var(--tl-surface);
  border-radius: 12px;
  box-shadow: var(--tl-shadow);
}

.tl-progress-stat-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--tl-text);
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 5px;
}

.tl-progress-stat-value--glow {
  color: var(--tl-brand);
  font-size: 16px;
  font-weight: 600;
}

.tl-progress-stat-label {
  font-size: 11px;
  font-weight: 400;
  color: var(--tl-text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Chart Row (2 Spalten) ─────────────────────── */

.tl-progress-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 13px;
  margin-bottom: 0;
}

.tl-progress-card {
  background: var(--tl-surface);
  border-radius: 12px;
  box-shadow: var(--tl-shadow);
  padding: 21px;
}

.tl-progress-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--tl-text);
  margin-bottom: 13px;
  letter-spacing: 0.3px;
}

.tl-chart-wrap {
  position: relative;
  min-height: 200px;
}

.tl-chart-skeleton {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

@keyframes tlSkeletonPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

.tl-skeleton-pulse {
  background: var(--tl-sand);
  animation: tlSkeletonPulse 1.5s ease-in-out infinite;
}

/* ── Phasen-Balken ─────────────────────────────── */

.tl-phase-bar {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
}

.tl-phase-bar:last-child { margin-bottom: 0; }

.tl-phase-bar-label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.tl-phase-bar-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--tl-text);
  letter-spacing: 0.5px;
}

.tl-phase-bar-trend {
  font-size: 13px;
}
.tl-phase-bar-trend--up { color: #4ade80; }
.tl-phase-bar-trend--down { color: #C4705A; }
.tl-phase-bar-trend--stable { color: var(--tl-text-3); }
.tl-phase-bar-trend--new { color: #fbbf24; }

.tl-phase-bar-track {
  height: 8px;
  background: var(--tl-warm);
  border-radius: 4px;
  overflow: hidden;
}

.tl-phase-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.tl-phase-bar-fill--mastered { background: var(--tl-brand); }
.tl-phase-bar-fill--developing { background: var(--tl-sand); }
.tl-phase-bar-fill--growing { background: #C4705A; }

.tl-phase-bar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
  justify-content: flex-end;
}

.tl-phase-bar-score {
  font-size: 13px;
  font-weight: 200;
  color: var(--tl-text);
}

.tl-phase-bar-badge {
  font-size: 9px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 21px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tl-phase-bar-badge--mastered { background: rgba(193,29,111,0.1); color: var(--tl-brand); }
.tl-phase-bar-badge--developing { background: var(--tl-warm); color: var(--tl-text-3); }
.tl-phase-bar-badge--growing { background: rgba(196,112,90,0.1); color: #C4705A; }

/* ── Motivation ────────────────────────────────── */

.tl-progress-motivation {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 21px;
  padding: 21px;
  background: rgba(193,29,111,0.04);
  border-radius: 12px;
  border-left: 3px solid var(--tl-brand);
}

.tl-progress-motivation-icon {
  color: var(--tl-brand);
  flex-shrink: 0;
  margin-top: 2px;
}

.tl-progress-motivation-text {
  font-size: 14px;
  font-weight: 400;
  color: var(--tl-text);
  line-height: 1.618;
}

/* ── Consent-Status Footer ─────────────────────── */

.tl-progress-consent-status {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 34px;
  padding: 13px;
  font-size: 12px;
  font-weight: 300;
  color: var(--tl-text-3);
}

.tl-progress-consent-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 21px;
  background: var(--tl-warm);
  color: var(--tl-text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Consent-Block (KI nicht aktiviert) ────────── */

.tl-progress-consent {
  text-align: center;
  padding: 89px 34px;
}

.tl-progress-consent-icon {
  color: var(--tl-sand);
  margin-bottom: 21px;
}

.tl-progress-consent-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--tl-text);
  margin-bottom: 13px;
}

.tl-progress-consent-text {
  font-size: 15px;
  font-weight: 300;
  color: var(--tl-text-2);
  line-height: 1.618;
  max-width: 400px;
  margin: 0 auto;
}

.tl-progress-consent-hint {
  font-size: 13px;
  font-weight: 300;
  color: var(--tl-text-3);
  margin-top: 21px;
}

/* ── RESPONSIVE ────────────────────────────────── */

@media (max-width: 640px) {
  .tl-courses {
    grid-template-columns: 1fr;
  }

  .tl-cockpit-inner {
    padding: 34px 21px 55px;
  }

  .tl-login-card {
    padding: 34px 21px;
  }

  .tl-progress-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .tl-progress-row {
    grid-template-columns: 1fr;
  }

  .tl-phase-bar {
    grid-template-columns: 65px 1fr auto;
  }

  .tl-phase-bar-meta {
    min-width: 80px;
  }

  .tl-phase-bar-badge {
    display: none;
  }
}
