/* ═══════════════════════════════════════════════════════
   Tactical Athlete – Strength · Design System
   ═══════════════════════════════════════════════════════ */

/* ─── Schrift: Inter (variabel 100–900, lokal, SIL OFL 1.1 → fonts/OFL-inter.txt) ─── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── CSS Custom Properties ─────────────────────────── */
:root {
  color-scheme: dark;
  --bg-primary:     #0A0A0A;
  --bg-surface:     #141414;
  --bg-elevated:    #1E1E1E;
  --accent:         #D4FF00;
  --accent-dark:    #BFEB00;
  --text-primary:   #FFFFFF;
  --text-secondary: #888888;
  --text-muted:     #9A9A9A;   /* Nebentext (Hinweise, Untertitel); vorher undefiniert → weiß */
  --text-disabled:  #5E5E5E;   /* Platzhalter / deaktiviert (vorher #444, kaum lesbar) */
  --text:           var(--text-primary);
  --bg-card:        var(--bg-surface);
  --danger:         #FF4444;
  --success:        #22C55E;
  --border:         #2A2A2A;
  --radius-sm:      8px;
  --radius-md:      12px;
  --spacing-xs:     4px;
  --spacing-sm:     8px;
  --spacing-md:     16px;
  --spacing-lg:     24px;
  --spacing-xl:     32px;
  --spacing-2xl:    48px;
  --bottom-nav-height: 64px;
}

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

/* ─── Base ───────────────────────────────────────────── */
html, body {
  height: 100%;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  height: 100%;
}

/* ─── App Shell ──────────────────────────────────────── */
/* position: fixed garantiert Viewport-Füllung auf ALLEN  */
/* iOS-Versionen — kein Fallthrough auf body-Scroll.      */
.app-shell {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
  padding-top: env(safe-area-inset-top);
  background: var(--bg-primary);
}

/* iOS 26 als installierte PWA: ein fixer Container mit top/bottom 0 endet um die
   obere Safe Area zu früh → Lücke unter der Bottom-Nav. Nur 100lvh liefert dort die
   volle Bildschirmhöhe (im Standalone-Modus ohne Browserleisten überall korrekt). */
@supports (height: 100lvh) {
  @media (display-mode: standalone) {
    html, body { height: 100lvh; }
    .app-shell { bottom: auto; height: 100lvh; }
  }
}

.app-content {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ─── Scrollbar (Webkit) ─────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-disabled);
}

/* ─── Typography ─────────────────────────────────────── */
.h1 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.h2 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.text-sm {
  font-size: 14px;
}

.text-xs {
  font-size: 12px;
  color: var(--text-secondary);
}

.text-accent {
  color: var(--accent);
}

.text-danger {
  color: var(--danger);
}

.text-success {
  color: var(--success);
}

/* ─── Layout: Page ───────────────────────────────────── */
.page {
  padding: var(--spacing-md);
}

.page-header {
  padding-top: var(--spacing-xl);
  padding-bottom: var(--spacing-lg);
}

.page-section {
  margin-bottom: var(--spacing-lg);
}

/* ─── Auth-Page Layout ───────────────────────────────── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: var(--spacing-lg) var(--spacing-md);
}

.auth-container {
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.auth-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--accent);
  color: #000;
  font-size: 22px;
  font-weight: 700;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
  letter-spacing: -1px;
}

.auth-logo-img {
  display: block;
  width: 80px;
  height: 80px;
  border-radius: 18px;
  margin: 0 auto var(--spacing-sm);
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
}

.auth-subtitle {
  color: var(--text-secondary);
}

.auth-card {
  padding: var(--spacing-lg);
}

.auth-error {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--danger);
  font-size: 14px;
  margin-bottom: var(--spacing-md);
}

.pwa-hint {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  background: rgba(212, 255, 0, 0.06);
  border: 1px solid rgba(212, 255, 0, 0.3);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
  margin-bottom: var(--spacing-md);
  font-size: 13px;
  color: var(--text-secondary);
}

.pwa-hint-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.pwa-hint-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.4;
}

.pwa-hint-text strong {
  color: var(--text-primary);
  font-size: 14px;
}

.pwa-hint-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0 0 0 var(--spacing-xs);
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ─── Card ───────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
}

.card-elevated {
  background: var(--bg-elevated);
}

.card + .card {
  margin-top: var(--spacing-sm);
}

/* ─── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 12px var(--spacing-md);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-elevated);
  border-color: var(--text-secondary);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(255, 68, 68, 0.1);
}

.btn-sm {
  font-size: 13px;
  padding: 8px 12px;
}

.btn-icon {
  padding: 10px;
  aspect-ratio: 1;
}

/* ─── Form Elements ──────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-md);
}

.form-group:last-child {
  margin-bottom: 0;
}

.input,
.select {
  width: 100%;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px var(--spacing-md);
  font-family: inherit;
  font-size: 16px;   /* ab 16px kein iOS-Auto-Zoom beim Antippen */
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}

.input::placeholder {
  color: var(--text-disabled);
}

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 255, 0, 0.15);
}

.input:disabled,
.select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  color-scheme: dark;
}

.select option {
  background-color: #1e1e1e;
  color: #ffffff;
}

/* Gender Toggle */
.gender-toggle {
  display: flex;
  gap: var(--spacing-sm);
}

/* ─── Badge ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1;
}

.badge-accent {
  background: rgba(212, 255, 0, 0.15);
  color: var(--accent);
  border: 1px solid rgba(212, 255, 0, 0.3);
}

.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-danger {
  background: rgba(255, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(255, 68, 68, 0.3);
}

.badge-secondary {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ─── Tags (Muskelgruppen-Toggle) ────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-elevated);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  user-select: none;
}

.tag:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.tag.active {
  background: rgba(212, 255, 0, 0.12);
  border-color: var(--accent);
  color: var(--accent);
}

.tags-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

/* ─── SFR (Stimulus-Fatigue-Ratio) Scores ───────────── */
.sfr-high  { color: var(--success); }
.sfr-mid   { color: var(--accent); }
.sfr-low   { color: var(--danger); }

/* ─── Score Buttons (0–3 RIR / SFR) ─────────────────── */
.score-buttons {
  display: flex;
  gap: var(--spacing-xs);
}

.score-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}

.score-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.score-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

/* ─── Set Row (Satz-Zeile im WorkoutLogger) ──────────── */
.set-row {
  display: grid;
  grid-template-columns: 32px 1fr 1fr 1fr auto;
  gap: var(--spacing-sm);
  align-items: center;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border);
}

.set-row:last-child {
  border-bottom: none;
}

.set-number {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

.set-row .input {
  padding: 8px var(--spacing-sm);
  text-align: center;
  font-size: 15px;
}

/* ─── Wizard Steps ───────────────────────────────────── */
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.wizard-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0;
}

.wizard-step-dot.active {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(212, 255, 0, 0.5);
}

.wizard-step-dot.completed {
  background: var(--accent);
  opacity: 0.5;
}

.wizard-step-line {
  width: 32px;
  height: 2px;
  background: var(--border);
}

/* ─── Progress Bar ───────────────────────────────────── */
.progress-bar-container {
  background: var(--bg-elevated);
  border-radius: 4px;
  height: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-bar-indeterminate {
  width: 40%;
  animation: progressSlide 1.2s ease-in-out infinite;
}

@keyframes progressSlide {
  0%   { transform: translateX(-150%); }
  100% { transform: translateX(350%); }
}

/* ─── Loading Screen ─────────────────────────────────── */
.loading-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
}

.loading-logo {
  font-size: 24px;
}

/* ─── Bottom Navigation ──────────────────────────────── */
.bottom-nav {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  align-items: flex-start;
  height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.bottom-nav-item {
  flex: 1;
  height: var(--bottom-nav-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: var(--spacing-sm);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item.active,
.bottom-nav-item.router-link-active {
  color: var(--accent);
}

.bottom-nav-icon {
  width: 22px;
  height: 22px;
}

.bottom-nav-label {
  font-size: 11px;
  font-weight: 500;
}

/* ─── Admin am Desktop: Seitenleiste statt Bottom-Nav ── */
.side-nav-brand,
.side-nav-sub,
.side-nav-toggle {
  display: none;
}

@media (min-width: 1024px) {
  .app-shell--admin {
    max-width: none;
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .app-shell--admin > .offline-banner {
    grid-column: 1 / -1;
  }

  .app-shell--admin > .app-content {
    grid-column: 2;
    grid-row: 2;
  }

  .app-shell--admin > .bottom-nav {
    grid-column: 1;
    grid-row: 2;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    height: auto;
    padding: var(--spacing-md) var(--spacing-sm);
    border-top: none;
    border-right: 1px solid var(--border);
    overflow-y: auto;
  }

  .app-shell--admin .side-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.25rem 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
  }

  .app-shell--admin .side-nav-brand img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
  }

  .app-shell--admin .bottom-nav-item {
    flex: none;
    height: 40px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0 0.75rem;
    border-radius: 8px;
  }

  .app-shell--admin .bottom-nav-item:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
  }

  .app-shell--admin .bottom-nav-item.active,
  .app-shell--admin .bottom-nav-item.router-link-active {
    background: rgba(212, 255, 0, 0.08);
  }

  .app-shell--admin .bottom-nav-icon {
    width: 18px;
    height: 18px;
  }

  .app-shell--admin .bottom-nav-label {
    font-size: 0.875rem;
  }

  /* Admin-Tabs unter dem Admin-Eintrag; Account/Hilfe ans Ende */
  .app-shell--admin .side-nav-sub {
    display: block;
    margin: 2px 0 6px 1.6rem;
    padding-left: 0.5rem;
    border-left: 1px solid var(--border);
  }

  .app-shell--admin .side-nav-sub:empty {
    display: none;
  }

  /* Ein-/Ausklappen (unten in der Leiste) */
  .app-shell--admin .side-nav-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 40px;
    margin-top: auto;
    padding: 0 0.75rem;
    border: none;
    border-radius: 8px;
    background: none;
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    flex-shrink: 0;
  }
  .app-shell--admin .side-nav-toggle:hover { background: var(--bg-elevated); color: var(--text-primary); }

  /* Eingeklappt: schmale Symbolleiste, Beschriftungen nur für Screenreader (Tooltip über title) */
  .app-shell--admin.app-shell--nav-collapsed { grid-template-columns: 64px minmax(0, 1fr); }
  .app-shell--nav-collapsed > .bottom-nav { padding-left: 0.5rem; padding-right: 0.5rem; }
  .app-shell--nav-collapsed .side-nav-brand { justify-content: center; padding: 0.25rem 0 1rem; }
  .app-shell--nav-collapsed .side-nav-brand span,
  .app-shell--nav-collapsed .bottom-nav-label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  .app-shell--nav-collapsed .bottom-nav-item,
  .app-shell--nav-collapsed .side-nav-toggle { justify-content: center; padding: 0; }
  .app-shell--nav-collapsed .side-nav-sub { display: none; }
}

/* ─── Modal ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--spacing-md);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  max-width: 400px;
  width: 90%;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;   /* Seite darunter scrollt nicht mit */
}

/* Dialoge innerhalb der App mit unterer Navigation: Platz für Navigation + Home-Indikator freihalten.
   Safari legt die Navigation (backdrop-filter) sonst teils über den Dialog – der unterste Knopf
   verschwand darunter. Der Dialog nutzt die Fläche darüber und scrollt innen. */
.bottom-nav { position: relative; z-index: 1; }
.app-shell:has(> .bottom-nav) .modal-overlay {
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + var(--spacing-sm));
}
.modal-overlay > .modal { max-height: 100% !important; }
@media (min-width: 1024px) {
  .app-shell--admin:has(> .bottom-nav) .modal-overlay { padding-bottom: var(--spacing-md); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--border);
}

/* ─── Offline Banner ─────────────────────────────────── */
.offline-banner {
  flex-shrink: 0;
  width: 100%;
  background: var(--danger);
  color: #fff;
  text-align: center;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 13px;
  font-weight: 500;
  z-index: 10;
}

/* ─── Hinweis: alte Installation / veraltete Seite ───── */
.legacy-banner {
  flex-shrink: 0;
  margin: var(--spacing-sm) var(--spacing-md) 0;
  padding: var(--spacing-md);
  background: rgba(212, 255, 0, 0.07);
  border: 1px solid rgba(212, 255, 0, 0.35);
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  z-index: 10;
}
.legacy-banner__title { font-weight: 700; color: var(--accent); margin-bottom: 0.25rem; }
.legacy-banner p { margin: 0 0 0.5rem; color: var(--text-secondary); }
.legacy-banner ol { margin: 0 0 0.5rem; padding-left: 1.25rem; }
.legacy-banner li { margin-bottom: 0.25rem; }
.legacy-banner__note { font-size: 12px; }
.legacy-banner__actions { display: flex; justify-content: flex-end; gap: var(--spacing-sm); }
.app-shell--admin > .legacy-banner { grid-column: 1 / -1; }

/* ─── Stat Cards ─────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-sm);
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: var(--spacing-xs);
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ─── List Items ─────────────────────────────────────── */
.list-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ─── Divider ────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--spacing-md) 0;
}

/* ─── Empty State ────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-lg);
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: var(--spacing-md);
  opacity: 0.5;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

/* ─── Utility Classes ────────────────────────────────── */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-xs       { gap: var(--spacing-xs); }
.gap-sm       { gap: var(--spacing-sm); }
.gap-md       { gap: var(--spacing-md); }
.w-full       { width: 100%; }
.text-center  { text-align: center; }
.mt-sm        { margin-top: var(--spacing-sm); }
.mt-md        { margin-top: var(--spacing-md); }
.mt-lg        { margin-top: var(--spacing-lg); }
.mb-sm        { margin-bottom: var(--spacing-sm); }
.mb-md        { margin-bottom: var(--spacing-md); }
.mb-lg        { margin-bottom: var(--spacing-lg); }

/* ─── Fehlermeldung (global; einzelne Komponenten haben eigene) ── */
.alert-danger {
  background: rgba(255, 68, 68, 0.12);
  border: 1px solid rgba(255, 68, 68, 0.4);
  color: #ff6b6b;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ─── Fokus (Tastatur) ───────────────────────────────── */
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── Zahlen ohne Springen (Gewicht, Wdh., Timer) ────── */
input[type="number"],
.tabular {
  font-variant-numeric: tabular-nums;
}

/* ─── Weniger Bewegung, wenn im System gewünscht ─────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── Vue Transitions ────────────────────────────────── */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.2s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.slide-up-enter-active,
.slide-up-leave-active {
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.slide-up-enter-from {
  transform: translateY(20px);
  opacity: 0;
}

.slide-up-leave-to {
  transform: translateY(-10px);
  opacity: 0;
}

.slide-down-enter-active,
.slide-down-leave-active {
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.slide-down-enter-from {
  transform: translateY(-20px);
  opacity: 0;
}

.slide-down-leave-to {
  transform: translateY(10px);
  opacity: 0;
}

.scale-enter-active,
.scale-leave-active {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.scale-enter-from,
.scale-leave-to {
  transform: scale(0.95);
  opacity: 0;
}

/* Nur für Screenreader sichtbar */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ═══════════════════════════════════════════════════════
   Individuelles Programming (components/programming/)
   Gemeinsam für Admin-Kalender und „Mein Plan“
   ═══════════════════════════════════════════════════════ */
.ip-admin { display: flex; flex-direction: column; gap: 1rem; }
.ip-input { padding: 10px 12px; }
.ip-modal .label, .ip-admin .label, .ip-plan .label { display: block; margin-bottom: 0.35rem; }
.ip-textarea { resize: vertical; line-height: 1.5; }
.ip-check { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.9rem; cursor: pointer; min-height: 32px; }
.ip-check input { accent-color: var(--accent); width: 18px; height: 18px; margin-top: 0.1rem; flex-shrink: 0; }
.ip-hint { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; margin: 0; }
.ip-hint-inline { display: block; font-size: 0.72rem; color: var(--text-muted); }
.ip-hint-block { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.1rem; }
.ip-muted { color: var(--text-muted); }
.ip-accent { color: var(--accent); }
.ip-grow { flex: 1; min-width: 0; }
.ip-stack { display: flex; flex-direction: column; gap: 0.6rem; }
.ip-row-wrap { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ip-error { color: #ff6b6b; font-size: 0.875rem; margin: 0; }
.ip-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px;
  background: none; border: none; color: var(--text-secondary); cursor: pointer; border-radius: var(--radius-sm); flex-shrink: 0;
}
.ip-icon-btn:hover { color: var(--text-primary); background: var(--bg-elevated); }
.ip-icon-btn--danger:hover { color: var(--danger); }
.ip-add-btn { display: inline-flex; align-items: center; gap: 0.35rem; align-self: flex-start; }
.ip-subtab { background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 0.55rem 0.9rem;
  font-size: 0.875rem; color: var(--text-secondary); cursor: pointer; white-space: nowrap; font-family: inherit; }
.ip-subtab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.ip-toggle-on { background: rgba(212, 255, 0, 0.12) !important; border-color: var(--accent) !important; color: var(--accent) !important; }

/* Typfarben (wie Abstatt: WU blau, CD cyan, TE amber, ST Akzent, WOD grün, CN lila) */
.ip-type-warmup    { --ip-c: 96, 165, 250; }
.ip-type-cooldown  { --ip-c: 34, 211, 238; }
.ip-type-technique { --ip-c: 251, 191, 36; }
.ip-type-strength  { --ip-c: 212, 255, 0; }
.ip-type-wod       { --ip-c: 74, 222, 128; }
.ip-type-note      { --ip-c: 192, 132, 252; }
.ip-dot-warmup { background: rgb(96, 165, 250) !important; }
.ip-dot-cooldown { background: rgb(34, 211, 238) !important; }
.ip-dot-technique { background: rgb(251, 191, 36) !important; }
.ip-dot-strength { background: rgb(212, 255, 0) !important; }
.ip-dot-wod { background: rgb(74, 222, 128) !important; }
.ip-dot-note { background: rgb(192, 132, 252) !important; }

.ip-form { display: flex; flex-direction: column; gap: 1.1rem; }
.ip-foot-actions { display: flex; justify-content: flex-end; gap: 0.75rem; }
.ip-pill { font-size: 0.7rem; font-weight: 500; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-secondary); border-radius: 20px; padding: 0.05rem 0.5rem; }
.ip-pill--accent { border-color: rgba(212, 255, 0, 0.35); background: rgba(212, 255, 0, 0.1); color: var(--accent); }
.ip-box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.ip-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.5rem; }
.ip-chip { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 20px; padding: 0.2rem 0.3rem 0.2rem 0.65rem; }
.ip-chip-x { background: none; border: none; color: var(--text-muted); cursor: pointer; display: flex; padding: 0.2rem; border-radius: 50%; }
.ip-chip-x:hover { color: var(--danger); }
.ip-alt-row { display: flex; align-items: center; gap: 0.5rem; }
.ip-weeknav { display: flex; align-items: center; gap: 0.25rem; }
.ip-subtitle { font-size: 0.9rem; font-weight: 700; }
.bottom-nav-iconwrap { position: relative; display: inline-flex; }
.nav-badge { position: absolute; top: -5px; right: -9px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--accent); color: #000; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; }
.nav-badge.ip-inbox-badge { position: static; display: inline-block; margin-left: 0.3rem; vertical-align: middle; }
