/* ==== Reset & base ==== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  background: #0d1117;
  color: #c9d1d9;
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 80px;
  -webkit-font-smoothing: antialiased;
}
a { color: #58a6ff; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; color: #f0f6fc; }
h2 { font-size: 17px; font-weight: 600; margin-bottom: 12px; color: #f0f6fc; }
p { margin-bottom: 8px; }

/* ==== Topbar ==== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .logo {
  font-weight: 700;
  font-size: 16px;
  color: #f0f6fc;
}
.topbar .logo:hover { text-decoration: none; }
.topbar .user {
  font-size: 14px;
  color: #8b949e;
  background: #21262d;
  padding: 4px 10px;
  border-radius: 12px;
}
.topbar .user:hover { color: #c9d1d9; text-decoration: none; background: #30363d; }

/* ==== Bottom nav ==== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #161b22;
  border-top: 1px solid #30363d;
  display: flex;
  justify-content: space-around;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  z-index: 50;
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10px;
  color: #8b949e;
  padding: 4px 4px;
  border-radius: 8px;
  min-width: 0;
  flex: 1;
}
.bottom-nav a:hover { text-decoration: none; }
.bottom-nav a.active { color: #58a6ff; }
.bottom-nav .nav-icon { font-size: 20px; margin-bottom: 2px; }

/* ==== Main / cards ==== */
main {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}
.card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.card.empty {
  text-align: center;
  color: #8b949e;
  padding: 32px 16px;
}

/* ==== Buttons ==== */
.btn-primary, .btn-secondary, .btn-success {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.15s;
  font-family: inherit;
}
.btn-primary { background: #238636; color: white; }
.btn-primary:hover { background: #2ea043; text-decoration: none; color: white; }
.btn-secondary { background: #21262d; color: #c9d1d9; border: 1px solid #30363d; }
.btn-secondary:hover { background: #30363d; text-decoration: none; color: #f0f6fc; }
.btn-success { background: #1f6feb; color: white; }
.btn-success:hover { background: #388bfd; text-decoration: none; color: white; }
.btn-full { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-icon {
  background: transparent;
  border: none;
  color: #8b949e;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 4px;
}
.btn-icon:hover { color: #f85149; background: #21262d; }
.btn-text {
  background: transparent;
  border: none;
  color: #8b949e;
  cursor: pointer;
  font-size: 13px;
  padding: 8px;
  text-decoration: underline;
  font-family: inherit;
}
.btn-text:hover { color: #f85149; }

/* ==== Forms ==== */
input[type="text"], input[type="password"], input[type="url"], input[type="search"],
input[type="email"], input[type="number"], textarea, select {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: #0d1117;
  color: #f0f6fc;
  font-size: 16px;
  font-family: inherit;
  margin-bottom: 12px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #58a6ff;
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}
label {
  display: block;
  font-size: 13px;
  color: #8b949e;
  margin-bottom: 6px;
  margin-top: 4px;
}
textarea { resize: vertical; min-height: 60px; }

/* ==== Flash messages ==== */
.flash-container { max-width: 600px; margin: 0 auto; padding: 0 16px; }
.flash {
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 14px;
}
.flash-success { background: rgba(35, 134, 54, 0.2); border: 1px solid #238636; color: #56d364; }
.flash-error { background: rgba(248, 81, 73, 0.15); border: 1px solid #f85149; color: #ff7b72; }

/* ==== Auth ==== */
.auth-container {
  max-width: 400px;
  margin: 60px auto 0;
  padding: 24px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
}
.auth-container h1 {
  text-align: center;
  margin-bottom: 4px;
  font-size: 28px;
}
.auth-container .subtitle {
  text-align: center;
  color: #8b949e;
  margin-bottom: 24px;
  font-size: 14px;
}
.auth-form button { margin-top: 8px; width: 100%; }
.auth-switch { text-align: center; margin-top: 16px; color: #8b949e; font-size: 14px; }

/* ==== Dashboard ==== */
.day-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding: 4px 0;
}
.day-header .muted { font-size: 13px; color: #8b949e; margin-bottom: 2px; }
.week-badge {
  text-align: center;
  background: #161b22;
  border: 1px solid #30363d;
  padding: 8px 12px;
  border-radius: 12px;
  min-width: 70px;
}
.week-badge .big { display: block; font-size: 24px; font-weight: 700; color: #58a6ff; line-height: 1; }
.week-badge .small { font-size: 10px; color: #8b949e; }

.plan-list { list-style: none; padding: 0; margin-bottom: 16px; }
.plan-list li { border-bottom: 1px solid #21262d; }
.plan-list li:last-child { border-bottom: none; }
.plan-list a {
  display: block;
  padding: 12px 0;
  color: #c9d1d9;
}
.plan-list a:hover { text-decoration: none; }
.plan-ex-name { font-weight: 500; color: #f0f6fc; }
.plan-ex-meta { font-size: 13px; color: #8b949e; margin-top: 2px; }

.alert {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.alert-active {
  background: rgba(31, 111, 235, 0.15);
  border: 1px solid #1f6feb;
}

/* ==== Workout session ==== */
.session-header { margin-bottom: 20px; }
.session-header .muted { font-size: 13px; color: #8b949e; }

.exercise-block {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.ex-header { margin-bottom: 12px; }
.ex-title-link {
  color: #f0f6fc;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ex-title-link:hover { text-decoration: none; color: #58a6ff; }
.ex-title-link h2 { display: inline; color: inherit; }
.info-icon {
  font-size: 13px;
  color: #8b949e;
  background: #21262d;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.last-perf {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px;
  background: #0d1117;
  border-radius: 8px;
  font-size: 13px;
}
.set-pill {
  display: inline-block;
  padding: 3px 8px;
  background: #21262d;
  border-radius: 12px;
  font-size: 12px;
  color: #c9d1d9;
}
.set-pill.prev { background: #21262d; color: #8b949e; }
.rir-tag {
  font-size: 10px;
  color: #8b949e;
  background: #30363d;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 2px;
}

.logged-sets {
  margin-bottom: 12px;
  background: #0d1117;
  border-radius: 8px;
  padding: 4px 12px;
}
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #21262d;
  font-size: 14px;
}
.set-row:last-child { border-bottom: none; }
.set-num { font-weight: 700; color: #58a6ff; width: 28px; }
.set-data { flex: 1; }
.inline-form { display: inline; }

.log-form { margin-top: 8px; }
.log-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.log-input label {
  font-size: 11px;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.log-input input {
  margin-bottom: 0;
  padding: 10px 8px;
  font-size: 18px;
  text-align: center;
  font-weight: 600;
}

.extra-add { padding: 0; }
.extra-add summary {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 500;
  color: #58a6ff;
  list-style: none;
}
.extra-add summary::-webkit-details-marker { display: none; }
.extra-add[open] summary { border-bottom: 1px solid #30363d; }
.extra-add .log-form { padding: 12px 16px; }
.extra-add select { margin-bottom: 12px; }

.finish-block { background: #161b22; }
.finish-block textarea { margin-bottom: 12px; }
.cancel-form { text-align: center; margin-top: 8px; }

/* ==== History / lists ==== */
.session-list { list-style: none; padding: 0; }
.session-list li { border-bottom: 1px solid #21262d; }
.session-list li:last-child { border-bottom: none; }
.session-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  color: #c9d1d9;
}
.session-list a:hover { text-decoration: none; }
.session-list.big a { padding: 16px 12px; }
.session-name { font-weight: 500; color: #f0f6fc; }
.chevron { color: #8b949e; font-size: 20px; }

.badge {
  display: inline-block;
  padding: 1px 6px;
  background: #1f6feb;
  color: white;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
}

/* ==== Exercises list ==== */
.filter-form { margin-bottom: 20px; }
.filter-form input[type="search"] { margin-bottom: 8px; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.filter-row select { margin-bottom: 0; padding: 10px; }
.filter-row button { white-space: nowrap; }

.cat-header {
  text-transform: uppercase;
  font-size: 12px;
  color: #8b949e;
  margin-top: 20px;
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.cat-header:first-child { margin-top: 0; }

.exercise-list { list-style: none; padding: 0; background: #161b22; border: 1px solid #30363d; border-radius: 12px; overflow: hidden; }
.exercise-list li { border-bottom: 1px solid #21262d; }
.exercise-list li:last-child { border-bottom: none; }
.exercise-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: #c9d1d9;
}
.exercise-list a:hover { background: #21262d; text-decoration: none; }
.ex-name { font-weight: 500; color: #f0f6fc; }

/* ==== Exercise detail ==== */
.back-link { margin-bottom: 12px; }
.back-link a { color: #8b949e; font-size: 14px; }
.ex-detail-header { margin-bottom: 20px; }
.ex-detail-header h1 { margin-bottom: 4px; }
.ex-detail-header .muted { color: #8b949e; font-size: 14px; }

.ex-media {
  margin-bottom: 16px;
  border-radius: 12px;
  overflow: hidden;
  background: #161b22;
}
.ex-media img { width: 100%; display: block; }
.ex-media.placeholder {
  padding: 60px 16px;
  text-align: center;
  border: 1px dashed #30363d;
}
.placeholder-icon { font-size: 64px; margin-bottom: 12px; }
.placeholder-text { color: #8b949e; font-size: 14px; }

.tip-list { padding-left: 20px; }
.tip-list li { margin-bottom: 6px; }

.stats-card { text-align: center; }
.big-stat {
  font-size: 32px;
  font-weight: 700;
  color: #58a6ff;
  margin: 8px 0;
}

#progressChart { width: 100%; height: 180px; }

.history-sets { list-style: none; padding: 0; }
.history-date-header {
  text-transform: uppercase;
  font-size: 11px;
  color: #8b949e;
  margin-top: 12px;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}
.history-date-header:first-child { margin-top: 0; }
.history-date-group {
  background: #0d1117;
  border-radius: 8px;
  padding: 4px 12px;
  margin-bottom: 8px;
}

.admin-actions { margin-top: 24px; }

/* ==== Profile ==== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stat {
  text-align: center;
  padding: 16px;
  background: #0d1117;
  border-radius: 8px;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #58a6ff;
}
.stat-label {
  font-size: 12px;
  color: #8b949e;
  margin-top: 4px;
}

.muted { color: #8b949e; }
.muted-sm { color: #8b949e; font-size: 13px; }

.notes-card { font-size: 14px; }

.edit-form { padding: 0; }

/* Larger touch targets on mobile */
@media (max-width: 768px) {
  .btn-primary, .btn-secondary, .btn-success { padding: 14px 20px; min-height: 48px; }
  .log-input input { padding: 14px 8px; }
}

/* ==== Module 3: Pantry & Recipes ==== */
.pantry-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.pantry-chip {
  background: #21262d;
  border: 1px solid #30363d;
  color: #8b949e;
  padding: 8px 14px;
  border-radius: 18px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.pantry-chip:hover { border-color: #58a6ff; }
.pantry-chip.in-stock {
  background: rgba(35, 134, 54, 0.25);
  border-color: #2ea043;
  color: #56d364;
  font-weight: 500;
}
.pantry-chip.in-stock::before {
  content: "✓ ";
  font-weight: 700;
}
.pantry-chip:disabled { opacity: 0.5; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  color: #c9d1d9;
}
.checkbox-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
}

/* Recipe display */
.recipe-card { margin-bottom: 20px; }
.recipe-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.recipe-header h1, .recipe-header h2 { margin: 0; flex: 1; }
.fav-btn {
  background: transparent;
  border: 1px solid #30363d;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.4;
  flex-shrink: 0;
  transition: all 0.15s;
}
.fav-btn.active {
  opacity: 1;
  background: rgba(248, 81, 73, 0.15);
  border-color: #f85149;
}
.fav-btn:hover { opacity: 1; }

.recipe-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}
.stat-pill {
  background: #21262d;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  color: #c9d1d9;
}
.stat-pill.thermomix {
  background: rgba(31, 111, 235, 0.2);
  color: #79c0ff;
}

.recipe-card h3 {
  font-size: 14px;
  color: #8b949e;
  margin-top: 16px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ingredient-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}
.ingredient-list li {
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid #21262d;
}
.ingredient-list li:last-child { border-bottom: none; }
.ingredient-list.need li { color: #f0b86e; }

.instruction-list {
  padding-left: 20px;
  margin: 0;
}
.instruction-list li {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.55;
}

#generate-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Tighter bottom nav for 5 items on mobile */
@media (max-width: 480px) {
  .bottom-nav a {
    min-width: 0;
    padding: 4px 6px;
    flex: 1;
  }
  .bottom-nav .nav-icon { font-size: 20px; }
  .bottom-nav a span:not(.nav-icon) { font-size: 10px; }
}

/* ==== Wochenplan + Einkaufsliste ==== */
.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.card-header-flex h2 { margin: 0; }
.link-sm { font-size: 13px; color: #58a6ff; }

.today-meals, .day-meals {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
}
.today-meals li, .day-meals li {
  padding: 10px 0;
  border-bottom: 1px solid #21262d;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.today-meals li:last-child, .day-meals li:last-child { border-bottom: none; }
.meal-slot {
  font-size: 12px;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.meal-recipe { color: #f0f6fc; font-weight: 500; }
.meal-custom { color: #c9d1d9; font-style: italic; }

.day-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.day-card.today {
  border-color: #1f6feb;
  background: rgba(31, 111, 235, 0.08);
}
.day-card h2 { margin-bottom: 4px; font-size: 16px; }

.shopping-items {
  list-style: none;
  padding: 0;
  margin: 0;
}
.shopping-items li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid #21262d;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.15s;
}
.shopping-items li:last-child { border-bottom: none; }
.shopping-items li:hover { background: rgba(255,255,255,0.02); }
.shopping-items li.checked {
  opacity: 0.45;
  text-decoration: line-through;
}
.check-box {
  font-size: 18px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #58a6ff;
  flex-shrink: 0;
}
.item-name { flex: 1; font-size: 14px; }
.item-amount {
  font-size: 13px;
  color: #8b949e;
}
.shopping-items li.checked .item-amount { color: #6e7681; }

/* ==== Ingredient checking (Phase 4) ==== */
.ingredient-check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}
.ing-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-bottom: 1px solid #21262d;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.ing-row:last-child { border-bottom: none; }
.ing-row:hover { background: rgba(255,255,255,0.03); }
.ing-row.have {
  opacity: 0.55;
}
.ing-row.have .ing-text {
  text-decoration: line-through;
}
.ing-row .check-box {
  font-size: 20px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  color: #58a6ff;
}
.ing-row.have .check-box { color: #56d364; }
.ing-row .ing-text { flex: 1; font-size: 14px; }

/* ==== Cookidoo-Modus (Phase 5) ==== */
.cooking-body {
  background: #0d1117;
  padding-bottom: 0; /* no bottom-nav */
  min-height: 100vh;
}
.cook-shell {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.cook-topbar {
  display: grid;
  grid-template-columns: 44px 1fr 60px;
  align-items: center;
  padding: 12px 16px;
  background: #161b22;
  border-bottom: 1px solid #30363d;
}
.cook-exit {
  font-size: 22px;
  color: #8b949e;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #21262d;
  text-decoration: none;
}
.cook-exit:hover { background: #30363d; color: #f0f6fc; }
.cook-title {
  font-size: 14px;
  color: #f0f6fc;
  text-align: center;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cook-step-counter {
  font-size: 13px;
  color: #8b949e;
  text-align: right;
}

.cook-progress-bar {
  height: 4px;
  background: #21262d;
}
.cook-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #58a6ff, #2ea043);
  transition: width 0.3s ease;
}

.cook-content {
  flex: 1;
  padding: 32px 20px 20px;
  display: flex;
  flex-direction: column;
}

.cook-step-num {
  font-size: 13px;
  color: #58a6ff;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 12px;
}
.cook-step-text {
  font-size: 24px;
  font-weight: 600;
  color: #f0f6fc;
  line-height: 1.35;
  margin-bottom: 24px;
}

.cook-tip {
  background: rgba(31, 111, 235, 0.12);
  border-left: 3px solid #58a6ff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  color: #c9d1d9;
  margin-bottom: 20px;
}

/* Thermomix-Box */
.tm-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(31, 111, 235, 0.15), rgba(46, 160, 67, 0.08));
  border: 1px solid rgba(88, 166, 255, 0.3);
  border-radius: 16px;
}
.tm-cell {
  text-align: center;
  padding: 8px;
}
.tm-value {
  font-size: 38px;
  font-weight: 700;
  color: #f0f6fc;
  line-height: 1;
}
.tm-value .tm-unit {
  font-size: 16px;
  font-weight: 500;
  color: #8b949e;
  margin-left: 4px;
  vertical-align: top;
}
.tm-value-sm {
  font-size: 22px;
  font-weight: 600;
  color: #f0f6fc;
  line-height: 1.1;
}
.tm-label {
  font-size: 11px;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}
.tm-direction {
  grid-column: 1 / -1;
}
.tm-direction .tm-value-sm {
  font-size: 16px;
  color: #f0b86e;
}

/* Timer */
.cook-timer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: #161b22;
  border-top: 1px solid #30363d;
  border-bottom: 1px solid #30363d;
}
.cook-timer-display {
  font-size: 56px;
  font-weight: 800;
  color: #f0f6fc;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.cook-timer-display.timer-done {
  color: #56d364;
  animation: pulse-glow 1s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.timer-cancel-btn {
  font-size: 13px;
  padding: 8px 16px;
}

.cook-actions {
  padding: 0 20px 12px;
}
.btn-cook-action {
  font-size: 17px;
  padding: 16px;
}

.cook-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 20px max(12px, env(safe-area-inset-bottom));
  background: #161b22;
  border-top: 1px solid #30363d;
}
.cook-nav button {
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
}
.cook-nav button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Cook CTA Card auf Recipe-Detail */
.cook-cta-card {
  background: linear-gradient(135deg, rgba(31, 111, 235, 0.15), rgba(46, 160, 67, 0.1));
  border-color: rgba(88, 166, 255, 0.4);
}
.btn-cook {
  font-size: 17px;
  padding: 16px;
}

/* Auf größeren Displays mehr Raum */
@media (min-width: 480px) {
  .tm-value { font-size: 48px; }
  .cook-step-text { font-size: 28px; }
  .cook-timer-display { font-size: 72px; }
}

/* ==== Body Tracking (Phase 6) ==== */
.big-weight {
  font-size: 48px;
  font-weight: 800;
  color: #f0f6fc;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.stat-good { color: #56d364; }
.stat-warn { color: #f0883e; }

.profile-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #21262d;
  font-size: 14px;
}
.profile-row:last-of-type { border-bottom: none; }
.profile-row span { color: #8b949e; }
.profile-row strong { color: #f0f6fc; font-weight: 500; }

.measurement-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.measurement-list li {
  border-bottom: 1px solid #21262d;
}
.measurement-list li:last-child { border-bottom: none; }
.measurement-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  text-decoration: none;
  color: #f0f6fc;
}
.measurement-date {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}
.measurement-data {
  font-size: 12px;
  color: #8b949e;
}
.chevron {
  color: #58a6ff;
  font-size: 18px;
}

.highlight-card {
  background: linear-gradient(135deg, rgba(31, 111, 235, 0.10), rgba(46, 160, 67, 0.05));
  border-color: rgba(88, 166, 255, 0.3);
}

.required-mark { color: #f85149; }

.optional-details {
  margin: 12px 0;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
}
.optional-details summary {
  cursor: pointer;
  padding: 6px 0;
  color: #58a6ff;
  font-size: 14px;
  user-select: none;
}
.optional-details[open] summary {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #21262d;
}

/* ==== Wochenplan-Builder (Phase 7) ==== */
.day-meals.editable {
  list-style: none;
  padding: 0;
  margin: 0;
}
.day-meals.editable li {
  border-bottom: 1px solid #21262d;
}
.day-meals.editable li:last-child { border-bottom: none; }
.meal-row-edit {
  display: grid;
  grid-template-columns: 110px 1fr 16px;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  text-decoration: none;
  color: #f0f6fc;
  font-size: 14px;
}
.meal-row-edit:hover { background: rgba(255,255,255,0.02); }
.meal-row-edit .meal-slot {
  color: #8b949e;
  font-size: 13px;
}
.meal-row-edit .meal-content {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meal-row-edit .meal-recipe {
  color: #58a6ff;
  font-weight: 500;
}
.meal-row-edit .meal-custom {
  color: #c9d1d9;
  font-style: italic;
}

/* Recipe Picker List */
.recipe-picker-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}
.recipe-picker-list li {
  margin-bottom: 6px;
}
.picker-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.picker-item:hover {
  border-color: #58a6ff;
  background: rgba(31, 111, 235, 0.05);
}
.picker-item.selected {
  border-color: #58a6ff;
  background: rgba(31, 111, 235, 0.10);
}
.picker-item input[type="radio"] {
  margin: 4px 0 0 0;
  width: auto;
  flex-shrink: 0;
}
.picker-text {
  flex: 1;
  min-width: 0;
}
.picker-name {
  display: block;
  font-weight: 500;
  color: #f0f6fc;
  margin-bottom: 4px;
}
.picker-meta {
  display: block;
  font-size: 12px;
  color: #8b949e;
}

/* Shopping list note + delete category */
.cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.cat-header h2 { margin: 0; }
.inline-form { display: inline; margin: 0; }
.btn-link {
  background: transparent;
  border: none;
  color: #f85149;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
}
.btn-link:hover { color: #ff7b72; }
.item-note {
  display: block;
  font-size: 11px;
  color: #8b949e;
  margin-top: 2px;
  font-style: italic;
}

/* ==== Kalender ==== */
.week-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}
.week-card.current-week {
  border-color: #58a6ff;
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}
.week-card.past-week {
  opacity: 0.6;
}
.week-card.prepped {
  background: linear-gradient(135deg, rgba(46, 160, 67, 0.10), #161b22 60%);
  border-color: rgba(46, 160, 67, 0.5);
}

.week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #21262d;
  background: rgba(255,255,255,0.02);
}
.week-title {
  font-weight: 600;
  color: #f0f6fc;
  font-size: 15px;
}
.prep-toggle {
  background: #21262d;
  color: #8b949e;
  border: 1px solid #30363d;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 500;
}
.prep-toggle:hover { border-color: #58a6ff; color: #f0f6fc; }
.prep-toggle.prepped {
  background: rgba(46, 160, 67, 0.15);
  border-color: #2ea043;
  color: #56d364;
}

.calendar-days {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cal-day {
  padding: 10px 16px;
  border-bottom: 1px solid #21262d;
}
.cal-day:last-child { border-bottom: none; }
.cal-day.today {
  background: rgba(88, 166, 255, 0.08);
  border-left: 3px solid #58a6ff;
  padding-left: 13px;
}
.cal-day.sunday {
  background: rgba(248, 81, 73, 0.04);
}
.cal-day.holiday {
  background: rgba(240, 184, 110, 0.07);
}

.cal-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.cal-day-name {
  font-size: 13px;
  font-weight: 600;
  color: #c9d1d9;
}
.cal-holiday-badge {
  font-size: 11px;
  color: #f0b86e;
  background: rgba(240, 184, 110, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}
.cal-sunday-badge {
  font-size: 11px;
  color: #f85149;
  font-weight: 500;
}

.cal-meals {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cal-meals.empty {
  padding: 4px 0;
}
.cal-meal a, .cal-meal .cal-custom {
  display: block;
  font-size: 13px;
  color: #c9d1d9;
  text-decoration: none;
  padding: 4px 0;
}
.cal-meal a:hover { color: #58a6ff; }
.cal-custom { font-style: italic; color: #8b949e; }

.tm-mini {
  display: inline-block;
  font-size: 9px;
  background: rgba(88, 166, 255, 0.15);
  color: #58a6ff;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ==== Quick-Nav Tiles ==== */
.quick-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 6px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  text-decoration: none;
  color: #f0f6fc;
  transition: all 0.15s;
}
.quick-tile:hover, .quick-tile:active {
  border-color: #58a6ff;
  background: rgba(31, 111, 235, 0.05);
}
.quick-tile-icon {
  font-size: 24px;
  line-height: 1;
}
.quick-tile-label {
  font-size: 12px;
  font-weight: 500;
}

/* ==== Portion Selector ==== */
.portion-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  background: rgba(31, 111, 235, 0.06);
  border: 1px solid #30363d;
  border-radius: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.portion-label {
  font-size: 13px;
  color: #8b949e;
  font-weight: 500;
}
.portion-btn {
  background: #21262d;
  border: 1px solid #30363d;
  color: #f0f6fc;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
.portion-btn:hover, .portion-btn:active {
  background: #30363d;
  border-color: #58a6ff;
}
.portion-value {
  font-size: 24px;
  font-weight: 700;
  color: #58a6ff;
  min-width: 40px;
  text-align: center;
}
.portion-base {
  font-size: 11px;
  flex-basis: 100%;
  text-align: center;
  margin-top: -4px;
}

/* ==== Equipment Badges ==== */
.ex-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  align-items: center;
}
.equip-badge {
  display: inline-block;
  font-size: 10px;
  background: rgba(88, 166, 255, 0.12);
  color: #58a6ff;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
  text-transform: lowercase;
}
.muscle-text {
  font-size: 11px;
  color: #8b949e;
  margin-left: 4px;
}

/* ==== Mein Studio ==== */
.studio-filter-bar {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}
.studio-filter-btn {
  display: inline-block;
  padding: 6px 12px;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 16px;
  font-size: 13px;
  color: #8b949e;
  text-decoration: none;
  font-weight: 500;
}
.studio-filter-btn.active {
  background: rgba(46, 160, 67, 0.15);
  border-color: #2ea043;
  color: #56d364;
}
.studio-filter-btn:hover { border-color: #58a6ff; }

.equip-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}
.equip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #21262d;
}
.equip-row:last-child { border-bottom: none; }
.equip-name {
  color: #f0f6fc;
  font-weight: 500;
  font-size: 14px;
}
.equip-sub {
  font-size: 11px;
  color: #8b949e;
  margin-top: 2px;
}

.preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.preset-btn {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 12px 8px;
  width: 100%;
  cursor: pointer;
  text-align: left;
  color: #f0f6fc;
}
.preset-btn:hover {
  border-color: #58a6ff;
  background: rgba(31, 111, 235, 0.05);
}
.preset-name {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}
.preset-count {
  font-size: 11px;
  color: #8b949e;
}

/* Photo upload */
.photo-input {
  position: absolute;
  left: -9999px;
  opacity: 0;
}
.btn-cam {
  text-align: center;
  display: block;
  padding: 14px;
  font-size: 16px;
  cursor: pointer;
}

.result-card {
  text-align: center;
}
.result-card.result-unknown {
  background: rgba(240, 184, 110, 0.05);
  border-color: rgba(240, 184, 110, 0.3);
}
.result-confidence {
  display: inline-block;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-weight: 600;
}
.confidence-high {
  background: rgba(46, 160, 67, 0.15);
  color: #56d364;
}
.confidence-medium {
  background: rgba(240, 184, 110, 0.15);
  color: #f0b86e;
}
.confidence-low {
  background: rgba(248, 81, 73, 0.10);
  color: #f85149;
}
.result-explanation {
  color: #c9d1d9;
  font-size: 14px;
  margin: 10px 0 16px;
  line-height: 1.5;
}

/* ==== Onboarding Wizard ==== */
.onboarding-body {
  background: #0d1117;
  min-height: 100vh;
  padding-bottom: 0;
}
.wiz-shell {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 20px max(20px, env(safe-area-inset-bottom));
}
.wiz-header {
  margin-bottom: 24px;
}
.wiz-title {
  font-size: 14px;
  color: #8b949e;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}
.wiz-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.wiz-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.45;
  transition: opacity 0.2s;
}
.wiz-step.active { opacity: 1; }
.wiz-step.done { opacity: 0.85; }
.wiz-step-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #21262d;
  border: 2px solid #30363d;
  border-radius: 50%;
  font-size: 16px;
}
.wiz-step.active .wiz-step-icon {
  background: rgba(31, 111, 235, 0.2);
  border-color: #58a6ff;
}
.wiz-step.done .wiz-step-icon {
  background: rgba(46, 160, 67, 0.15);
  border-color: #2ea043;
}
.wiz-step-label {
  font-size: 10px;
  color: #8b949e;
  margin-top: 4px;
  text-align: center;
  max-width: 60px;
}
.wiz-step.active .wiz-step-label { color: #58a6ff; font-weight: 600; }
.wiz-step.done .wiz-step-label { color: #56d364; }
.wiz-step-line {
  height: 2px;
  background: #30363d;
  flex: 1;
  margin: 0 -2px;
  margin-bottom: 16px;
}
.wiz-step-line.done { background: #2ea043; }

.wiz-content h1 {
  margin-bottom: 6px;
  font-size: 24px;
}
.wiz-intro {
  color: #8b949e;
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}
.btn-wiz {
  font-size: 17px;
  padding: 16px;
  margin-top: 20px;
}

.wiz-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 24px 0;
}
.wiz-feature {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: #c9d1d9;
}

.wiz-skip {
  margin-top: 32px;
  text-align: center;
}
.link-btn {
  background: transparent;
  border: none;
  color: #8b949e;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  padding: 8px;
}
.link-btn:hover { color: #f0f6fc; }

.wiz-sub-h {
  font-size: 14px;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 24px 0 12px;
}

.info-box {
  background: rgba(46, 160, 67, 0.10);
  border: 1px solid #2ea043;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  color: #56d364;
  font-size: 14px;
}

.summary-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 4px 16px;
  margin: 16px 0;
}
.summary-section {
  padding: 14px 0;
  border-bottom: 1px solid #21262d;
}
.summary-section:last-child { border-bottom: none; }
.summary-title {
  font-size: 13px;
  color: #58a6ff;
  font-weight: 600;
  margin-bottom: 6px;
}
.summary-body {
  font-size: 14px;
  color: #c9d1d9;
  line-height: 1.6;
}

.next-steps {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #30363d;
}
.next-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.next-list li {
  padding: 10px 0;
  border-bottom: 1px solid #21262d;
  color: #c9d1d9;
  font-size: 14px;
}
.next-list li:last-child { border-bottom: none; }

/* ==== Training Mode + Focus ==== */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.mode-card {
  background: #161b22;
  border: 2px solid #30363d;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.mode-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.mode-card:hover {
  border-color: #484f58;
}
.mode-card.selected {
  border-color: #58a6ff;
  background: rgba(31, 111, 235, 0.10);
}
.mode-label {
  font-weight: 600;
  font-size: 14px;
  color: #f0f6fc;
  margin-bottom: 4px;
}
.mode-desc {
  font-size: 11px;
  color: #8b949e;
  line-height: 1.35;
}

.area-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.area-chip {
  background: #161b22;
  border: 2px solid #30363d;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
  color: #c9d1d9;
  position: relative;
}
.area-chip input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.area-chip:hover {
  border-color: #484f58;
}
.area-chip.selected {
  background: rgba(31, 111, 235, 0.25);
  border-color: #58a6ff;
  color: #f0f6fc;
  font-weight: 600;
}
.area-chip.selected::before {
  content: '✓ ';
}

/* Studio-filter-bar may host both buttons */
.studio-filter-btn small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  opacity: 0.85;
  margin-top: 2px;
}

/* ==== Focus Workout Card on Dashboard ==== */
.focus-workout-card {
  border: 2px solid #58a6ff;
  background: linear-gradient(135deg, rgba(31, 111, 235, 0.10), rgba(31, 111, 235, 0.02));
}
.focus-workout-card h2 {
  color: #58a6ff;
}
.focus-meta {
  font-size: 13px;
  color: #8b949e;
  margin: -6px 0 14px 0;
}
.focus-meta strong {
  color: #58a6ff;
}
.btn-text {
  background: transparent;
  border: none;
  color: #8b949e;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  padding: 8px;
}
.btn-text:hover { color: #f0f6fc; }
