/* ============================================================
   FitSation – Hauptstylesheet
   Design-Sprache aus der Wartungsseite übernommen + erweitert
   ============================================================ */

/* ── CSS-Variablen ──────────────────────────────────────── */
:root {
  --fs-dark:        #1a1a1a;
  --fs-mid:         #3d3d3d;
  --fs-muted:       #888;
  --fs-light:       #f5f5f5;
  --fs-border:      #e0e0e0;
  --fs-white:       #ffffff;
  --fs-accent:      #22c55e;   /* Fitness-Grün */
  --fs-accent-dark: #16a34a;
  --fs-accent-bg:   #f0fdf4;
  --fs-danger:      #ef4444;
  --fs-warning:     #f59e0b;
  --fs-radius:      14px;
  --fs-radius-sm:   8px;
  --fs-shadow:      0 4px 24px rgba(0,0,0,0.07);
  --fs-shadow-lg:   0 8px 40px rgba(0,0,0,0.12);
}

/* ── Basis ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--fs-white);
  color: var(--fs-dark);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
  background: var(--fs-dark);
  color: #aaa;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 0;
}
.topbar .dot-live {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--fs-accent);
  margin-right: 0.45rem;
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ── Navbar ─────────────────────────────────────────────── */
.fs-navbar {
  background: var(--fs-white);
  border-bottom: 1px solid var(--fs-border);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.navbar-left {
  display: flex;
  align-items: center;
}
.navbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.navbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.fs-navbar .navbar-brand {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--fs-dark);
}
.fs-navbar .navbar-brand span {
  color: var(--fs-accent);
}
.fs-navbar .nav-link {
  color: var(--fs-mid);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--fs-radius-sm);
  transition: color 0.15s, background 0.15s;
}
.fs-navbar .nav-link:hover {
  color: var(--fs-dark);
  background: var(--fs-light);
}
.fs-navbar .nav-link.active {
  color: var(--fs-accent-dark);
  background: var(--fs-accent-bg);
}
.fs-navbar .navbar-logo {
  height: 40px;
  width: auto;
}
/* Avatar Dropdown */
.nav-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--fs-accent);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-fs-primary {
  background: var(--fs-accent);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.75rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.18s, transform 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-fs-primary:hover {
  background: var(--fs-accent-dark);
  color: white;
  transform: translateY(-1px);
}
.btn-fs-outline {
  background: transparent;
  color: var(--fs-dark);
  border: 1.5px solid var(--fs-border);
  border-radius: 999px;
  padding: 0.65rem 1.75rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color 0.18s, background 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-fs-outline:hover {
  border-color: var(--fs-mid);
  background: var(--fs-light);
  color: var(--fs-dark);
}
.btn-fs-sm {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
}

/* ── Hero (Startseite) ───────────────────────────────────── */
.hero-landing {
  background: linear-gradient(160deg, #f9fafb 0%, #f0fdf4 60%, #dcfce7 100%);
  border-bottom: 1px solid var(--fs-border);
  padding: 5.5rem 0 4.5rem;
  overflow: hidden;
  position: relative;
}
.hero-landing::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,197,94,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--fs-accent-bg);
  color: var(--fs-accent-dark);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-landing h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--fs-dark);
}
.hero-landing h1 .accent { color: var(--fs-accent); }
.hero-landing .lead {
  font-size: 1.05rem;
  color: var(--fs-muted);
  line-height: 1.8;
  max-width: 520px;
  margin: 1.25rem 0 2rem;
}
.hero-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2.25rem;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: white;
  border: 1px solid var(--fs-border);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fs-mid);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.hero-pill i { color: var(--fs-accent); }

/* Hero Visual (rechte Seite) */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-mockup {
  background: white;
  border-radius: 20px;
  border: 1px solid var(--fs-border);
  box-shadow: var(--fs-shadow-lg);
  padding: 1.75rem;
  max-width: 320px;
  width: 100%;
}
.mockup-header {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fs-muted);
  margin-bottom: 1rem;
}
.mockup-calories {
  text-align: center;
  margin-bottom: 1.25rem;
}
.mockup-calories .big-num {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--fs-dark);
  line-height: 1;
}
.mockup-calories .sub {
  font-size: 0.75rem;
  color: var(--fs-muted);
  margin-top: 0.25rem;
}
.mockup-ring {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: conic-gradient(var(--fs-accent) 0% 68%, var(--fs-border) 68% 100%);
  margin: 0 auto 0.5rem;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.mockup-ring::before {
  content: '';
  position: absolute;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: white;
}
.mockup-ring .ring-label {
  position: relative;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--fs-dark);
  z-index: 1;
  text-align: center;
  line-height: 1.2;
}
.mockup-macros {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.macro-chip {
  background: var(--fs-light);
  border-radius: var(--fs-radius-sm);
  padding: 0.5rem;
  text-align: center;
}
.macro-chip .val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--fs-dark);
  display: block;
}
.macro-chip .lbl {
  font-size: 0.65rem;
  color: var(--fs-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.macro-chip.protein .val { color: #3b82f6; }
.macro-chip.carbs   .val { color: #f59e0b; }
.macro-chip.fat     .val { color: var(--fs-accent); }

/* ── Stats Bar ───────────────────────────────────────────── */
.stats-bar {
  background: var(--fs-dark);
  padding: 1.25rem 0;
}
.stats-bar .stat-item {
  text-align: center;
  padding: 0.5rem 1rem;
}
.stats-bar .stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stats-bar .stat-lbl {
  font-size: 0.7rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.2rem;
}
.stats-bar .stat-num .accent { color: var(--fs-accent); }

/* ── Section Titles ──────────────────────────────────────── */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fs-accent-dark);
  background: var(--fs-accent-bg);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 0.75rem;
}
.section-headline {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--fs-dark);
  line-height: 1.2;
}
.section-sub {
  color: var(--fs-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  max-width: 520px;
}

/* ── Feature Cards ───────────────────────────────────────── */
.feature-grid {
  padding: 5rem 0;
}
.feature-card {
  border: 1px solid var(--fs-border);
  border-radius: var(--fs-radius);
  padding: 2rem 1.75rem;
  height: 100%;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: var(--fs-accent);
  box-shadow: var(--fs-shadow);
  transform: translateY(-3px);
}
.feature-card .icon-wrap {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}
.icon-green  { background: var(--fs-accent-bg);  color: var(--fs-accent-dark); }
.icon-blue   { background: #eff6ff; color: #2563eb; }
.icon-orange { background: #fff7ed; color: #ea580c; }
.icon-purple { background: #faf5ff; color: #7c3aed; }
.icon-red    { background: #fef2f2; color: #dc2626; }
.icon-teal   { background: #f0fdfa; color: #0d9488; }
.feature-card h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fs-dark);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.feature-card p {
  font-size: 0.875rem;
  color: var(--fs-muted);
  line-height: 1.7;
  margin: 0;
}

/* ── Kalorie-Rechner ─────────────────────────────────────── */
.calculator-section {
  background: var(--fs-light);
  border-top: 1px solid var(--fs-border);
  border-bottom: 1px solid var(--fs-border);
  padding: 5rem 0;
}
.calc-card {
  background: white;
  border: 1px solid var(--fs-border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--fs-shadow);
}
.calc-result {
  background: var(--fs-dark);
  border-radius: var(--fs-radius);
  padding: 2rem;
  color: white;
  text-align: center;
}
.calc-result .kcal-big {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--fs-accent);
  line-height: 1;
}
.calc-result .kcal-sub {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.calc-result .macro-row {
  display: flex;
  justify-content: space-around;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #333;
}
.calc-result .m-item { text-align: center; }
.calc-result .m-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
}
.calc-result .m-lbl {
  font-size: 0.65rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.15rem;
}
.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fs-mid);
  margin-bottom: 0.4rem;
}
.form-control, .form-select {
  border-color: var(--fs-border);
  border-radius: var(--fs-radius-sm);
  font-size: 0.9rem;
  padding: 0.65rem 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--fs-accent);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.15);
  outline: none;
}

/* ── How it works ────────────────────────────────────────── */
.how-section {
  padding: 5rem 0;
}
.step-item {
  text-align: center;
  padding: 0 1rem;
}
.step-number {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--fs-dark);
  color: white;
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.step-connector {
  flex: 1;
  height: 2px;
  background: var(--fs-border);
  margin-top: -28px;
}
.step-item h5 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}
.step-item p {
  font-size: 0.85rem;
  color: var(--fs-muted);
  line-height: 1.7;
}

/* ── CTA Section ─────────────────────────────────────────── */
.cta-section {
  background: var(--fs-dark);
  padding: 5rem 0;
  text-align: center;
}
.cta-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: white;
  line-height: 1.15;
}
.cta-section .lead {
  color: #888;
  font-size: 1rem;
  max-width: 440px;
  margin: 1rem auto 2rem;
  line-height: 1.75;
}

/* ── Auth-Seiten (Login / Register) ─────────────────────── */
.auth-page {
  min-height: 100vh;
  background: var(--fs-light);
  display: flex;
  align-items: center;
  padding: 2rem 0;
}
.auth-card {
  background: white;
  border: 1px solid var(--fs-border);
  border-radius: 20px;
  padding: 2.5rem 2.25rem;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: var(--fs-shadow);
}
.auth-logo {
  height: 40px;
  margin-bottom: 1.75rem;
}
.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}
.auth-card .auth-sub {
  font-size: 0.875rem;
  color: var(--fs-muted);
  margin-bottom: 1.75rem;
}
.auth-divider {
  text-align: center;
  position: relative;
  margin: 1.5rem 0;
}
.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: var(--fs-border);
}
.auth-divider span {
  position: relative;
  background: white;
  padding: 0 0.75rem;
  font-size: 0.8rem;
  color: var(--fs-muted);
}
.password-wrapper {
  position: relative;
}
.password-wrapper .toggle-pw {
  position: absolute;
  right: 0.75rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--fs-muted);
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
}
.strength-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--fs-border);
  margin-top: 0.4rem;
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s, background 0.3s;
  width: 0%;
}

/* ── Dashboard ───────────────────────────────────────────── */
.dashboard-page {
  background: var(--fs-light);
  min-height: calc(100vh - 60px);
  padding: 2.5rem 0;
}
.dash-card {
  background: white;
  border: 1px solid var(--fs-border);
  border-radius: var(--fs-radius);
  padding: 1.75rem;
  height: 100%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.dash-card-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fs-muted);
  margin-bottom: 0.75rem;
}
.dash-cal-big {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--fs-dark);
}
.dash-cal-big .unit {
  font-size: 1rem;
  font-weight: 500;
  color: var(--fs-muted);
  margin-left: 0.2rem;
}
.cal-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--fs-border);
  margin: 0.75rem 0;
  overflow: hidden;
}
.cal-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--fs-accent);
  transition: width 0.5s ease;
}
.cal-progress-bar.over { background: var(--fs-danger); }
.meal-type-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fs-muted);
  padding: 0.65rem 0 0.35rem;
  border-top: 1px solid var(--fs-border);
  margin-top: 0.75rem;
}
.meal-type-label:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}
.meal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--fs-light);
  font-size: 0.875rem;
}
.meal-row:last-child { border-bottom: none; }
.meal-row .food-name { font-weight: 500; color: var(--fs-dark); }
.meal-row .food-meta { font-size: 0.75rem; color: var(--fs-muted); }
.meal-row .food-kcal { font-weight: 600; color: var(--fs-dark); white-space: nowrap; }
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--fs-muted);
  font-size: 0.875rem;
}
.empty-state i { font-size: 2rem; margin-bottom: 0.75rem; opacity: 0.4; }
.quick-add-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  background: var(--fs-light);
  border: 1.5px dashed var(--fs-border);
  border-radius: var(--fs-radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--fs-muted);
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  margin-top: 0.75rem;
}
.quick-add-btn:hover {
  border-color: var(--fs-accent);
  background: var(--fs-accent-bg);
  color: var(--fs-accent-dark);
}
.macro-bar-row { margin-bottom: 0.85rem; }
.macro-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}
.macro-bar-label .name { font-weight: 600; color: var(--fs-dark); }
.macro-bar-label .val  { color: var(--fs-muted); }
.macro-bar { height: 6px; border-radius: 999px; background: var(--fs-border); overflow: hidden; }
.macro-bar-fill { height: 100%; border-radius: 999px; }
.macro-bar-fill.protein { background: #3b82f6; }
.macro-bar-fill.carbs   { background: #f59e0b; }
.macro-bar-fill.fat     { background: var(--fs-accent); }

/* ── 2FA Setup ───────────────────────────────────────────── */
.qr-container {
  border: 1px solid var(--fs-border);
  border-radius: var(--fs-radius);
  padding: 1.5rem;
  text-align: center;
  background: var(--fs-light);
}
.qr-container img {
  border-radius: var(--fs-radius-sm);
  border: 4px solid white;
  box-shadow: var(--fs-shadow);
}
.secret-display {
  background: var(--fs-dark);
  color: var(--fs-accent);
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  padding: 0.75rem 1rem;
  border-radius: var(--fs-radius-sm);
  text-align: center;
  margin: 1rem 0;
  word-break: break-all;
}
.badge-2fa-on  { background: var(--fs-accent-bg);  color: var(--fs-accent-dark); border-radius: 999px; padding: 0.3rem 0.85rem; font-size: 0.75rem; font-weight: 600; }
.badge-2fa-off { background: #fef2f2; color: #dc2626; border-radius: 999px; padding: 0.3rem 0.85rem; font-size: 0.75rem; font-weight: 600; }

/* ── Footer ──────────────────────────────────────────────── */
footer.fs-footer {
  background: var(--fs-dark);
  color: #555;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  padding: 1.5rem 0;
}
footer.fs-footer .brand {
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
footer.fs-footer a {
  color: #666;
  text-decoration: none;
  border-bottom: 1px solid #444;
}
footer.fs-footer a:hover { color: #888; }

/* ── Utilities ───────────────────────────────────────────── */
.text-accent { color: var(--fs-accent) !important; }
.bg-accent   { background: var(--fs-accent) !important; }
.border-accent { border-color: var(--fs-accent) !important; }
.fw-800 { font-weight: 800 !important; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-landing { padding: 3.5rem 0 3rem; }
  .hero-visual   { margin-top: 3rem; }
  .hero-mockup   { max-width: 280px; }
  .stats-bar .stat-num { font-size: 1.25rem; }
  .auth-card { padding: 2rem 1.5rem; margin: 0 1rem; }
  .calc-card { padding: 1.75rem 1.25rem; }
}

/* ── Animationen ─────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
  animation: fadeInUp 0.5s ease forwards;
}
