html {
  font-size: 14px;
  height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* ── Sticky Footer (Flexbox-Strategie) ─────────────────────────── */
body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
}

.page-content {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 100;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

/* ── Focus Styles ───────────────────────────────────────────────── */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* ── Trainingskategorie-Banner ──────────────────────────────────── */
.kategorie-banner {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  border-radius: 0.375rem 0.375rem 0 0;
}
.banner-Laufen        { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.banner-Radfahren     { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.banner-Krafttraining { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.banner-Schwimmen     { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }
.banner-Yoga          { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
.banner-Mannschaftssport { background: linear-gradient(135deg, #96fbc4 0%, #f9f586 100%); }
.banner-Sonstiges     { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); }

.training-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 0.375rem 0.375rem 0 0;
}

/* ── Kalender ───────────────────────────────────────────────────── */
.calendar-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.calendar-table th {
  text-align: center;
  padding: 8px 4px;
  font-weight: 600;
  color: #6c757d;
  font-size: 0.8rem;
  border-bottom: 2px solid #dee2e6;
}

.calendar-day {
  height: 80px;
  vertical-align: top;
  padding: 5px;
  border: 1px solid #e9ecef;
  cursor: pointer;
  transition: background-color 0.12s;
  position: relative;
}

.calendar-day:hover { background-color: #f8f9fa; }
.calendar-day.today { background-color: #e8f4f8; }
.calendar-day.selected {
  background-color: #cfe2ff;
  border: 2px solid #0d6efd;
}
.calendar-day.other-month { background-color: #fafafa; opacity: 0.45; cursor: default; }

.day-number {
  font-weight: 700;
  font-size: 0.85rem;
  color: #212529;
  display: block;
}
.today .day-number { color: #0d6efd; }

.day-training-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 3px;
}
.training-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #0d6efd;
}

.calorie-bar-mini {
  height: 4px;
  border-radius: 2px;
  background-color: #e9ecef;
  margin-top: 4px;
  overflow: hidden;
}
.calorie-bar-mini .fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}
.fill-ok      { background-color: #198754; }
.fill-warning { background-color: #ffc107; }
.fill-over    { background-color: #dc3545; }

.day-kcal {
  font-size: 0.65rem;
  color: #6c757d;
  margin-top: 1px;
}

/* ── Kalender Sidebar ────────────────────────────────────────────── */
.mahlzeit-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
}

/* ── Ziel-Karten ─────────────────────────────────────────────────── */
.border-4 { border-width: 4px !important; }

.ziel-card-erreicht  { border-left-color: #198754 !important; }
.ziel-card-progress  { border-left-color: #ffc107 !important; }
.ziel-card-verpasst  { border-left-color: #dc3545 !important; }
.ziel-card-ausstehend{ border-left-color: #6c757d !important; }

/* ── Kalorien 7-Tage-Chart ───────────────────────────────────────── */

/* Wrapper: nur flex-column, kein height hier */
.week-chart-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Bars-Area: FESTE Höhe – nur Balken, keine Labels drin.
   position:relative für die absolute Ziel-Linie. */
.week-bars-area {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 100px;
  position: relative;
}

/* Jeder Balken-Link: nimmt volle Höhe, lässt den Balken von unten wachsen */
.week-bar-link {
  flex: 1;
  display: flex;
  align-items: flex-end;
  height: 100%;
  text-decoration: none;
}

.week-bar-link.active .week-bar {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

.week-bar-link:hover .week-bar { filter: brightness(1.15); }

.week-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  min-height: 3px;
  transition: height 0.3s ease, background-color 0.2s;
}

/* Labels-Row: unterhalb der Bars-Area, beeinflusst Balkenhöhe nicht */
.week-labels-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.week-label-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.week-label-item.active .week-bar-label {
  font-weight: 700;
  color: #0d6efd;
}

.week-bar-label {
  font-size: 0.68rem;
  color: #6c757d;
  white-space: nowrap;
}

.week-bar-kcal {
  font-size: 0.6rem;
  color: #adb5bd;
  min-height: 10px;
}

/* Ziel-Linie: absolut in .week-bars-area → bottom: X% stimmt exakt mit Balkenhöhe überein */
.week-ziel-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: repeating-linear-gradient(
    90deg, #dc3545 0, #dc3545 6px, transparent 6px, transparent 10px
  );
  pointer-events: none;
  z-index: 1;
}

