/* ==========================================================================
   KATONA J — portal.css
   Zusätzliche Komponenten für Cont (Login/Register), Kunden-Portal & Admin.
   Nutzt die Design-Tokens aus styles.css (:root).
   ========================================================================== */

/* ----------------------------------------------------------- Auth (cont.html) */
.auth-wrap { max-width: 920px; margin-inline: auto; }
.auth-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.auth__tabs { display: flex; border-bottom: 1px solid var(--border); }
.auth__tab {
  flex: 1; padding: 18px 14px; background: none; border: 0; cursor: pointer;
  color: var(--muted); font-family: var(--font-body); font-weight: 700;
  font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
  border-bottom: 2px solid transparent;
}
.auth__tab:hover { color: var(--text); }
.auth__tab.active { color: var(--text); border-bottom-color: var(--red); background: var(--red-soft); }
.auth__panel { display: none; padding: clamp(22px, 4vw, 40px); }
.auth__panel.active { display: block; }
.auth__panel > .form { max-width: 820px; }
.auth__err, .auth__ok {
  display: none; margin: 14px 0 0; padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.auth__err.show { display: block; background: var(--red-soft); border: 1px solid var(--red-bright); color: #ffd9d6; }
.auth__ok.show { display: block; background: rgba(31,157,87,0.12); border: 1px solid #1f9d57; color: #9be7bd; }
.auth__hint { color: var(--muted); font-size: 0.9rem; margin-top: 16px; }
.auth__hint a { color: var(--red-bright); font-weight: 600; }

/* ----------------------------------------------------------- Tabs (Dashboard) */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.tab {
  padding: 12px 20px; background: none; border: 0; border-bottom: 2px solid transparent;
  cursor: pointer; color: var(--muted); font-family: var(--font-body); font-weight: 700;
  font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--red); }
.tab .count {
  display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 7px;
  border-radius: 999px; background: var(--red); color: #fff; font-size: 0.72rem; font-weight: 700;
}
.panel { display: none; }
.panel.active { display: block; }

/* ----------------------------------------------------------- Karten / Layout */
.card-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: clamp(18px, 3vw, 30px); margin-bottom: 22px;
}
.card-box h3 { font-size: 1.3rem; margin-bottom: 16px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; border: 1px dashed var(--border); border-radius: var(--radius); }

/* ----------------------------------------------------------- Profil (KV) */
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2px; }
.kv__item { padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.kv__k { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 3px; }
.kv__v { font-size: 1rem; font-weight: 600; word-break: break-word; }

.qa-list { display: grid; gap: 8px; margin-top: 8px; }
.qa { display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 0.92rem; }
.qa .n { color: var(--muted-2); font-weight: 700; min-width: 22px; }
.qa .q { flex: 1; }
.qa .a { font-weight: 700; font-size: 0.78rem; padding: 2px 12px; border-radius: 999px; }
.qa--da .a { background: #3a2410; color: #ffb259; }
.qa--nu .a { background: #11331f; color: #6fe0a0; }
.qa--block { align-items: flex-start; }
.qa--block .qa__body { flex: 1; }
.qa--block .qa__body .q { font-weight: 600; }
.qa--block .qa__val { margin-top: 4px; color: var(--muted); white-space: pre-wrap; font-size: 0.9rem; }

/* ----------------------------------------------------------- News (Social-Post-Stil) */
.posts { display: grid; gap: 18px; max-width: 640px; margin-inline: auto; }
.post {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; cursor: pointer; transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.post:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.post__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.post__avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--red); color: #fff;
  display: grid; place-items: center; font-family: var(--font-display); font-size: 1.05rem;
  letter-spacing: 0.04em; flex-shrink: 0;
}
.post__id { flex: 1; min-width: 0; }
.post__author { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.post__verified { color: var(--red-bright); font-size: 0.85rem; }
.post__time { color: var(--muted-2); font-size: 0.8rem; }
.post__badges { display: flex; gap: 6px; flex-wrap: wrap; }
.post__title { font-weight: 700; font-size: 1.1rem; margin-bottom: 6px; }
.post__text {
  white-space: pre-wrap; line-height: 1.6; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden;
}
.post .news-media { margin: 0 0 12px; }
.post .news-media img { max-height: 430px; object-fit: cover; }
.post .news-media video { max-height: 430px; }
.post__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px solid var(--border); padding-top: 12px; margin-top: 2px;
}
.post__stat { color: var(--muted); font-size: 0.9rem; }
.post__stats { display: flex; align-items: center; gap: 14px; }
.post__actions { display: flex; gap: 6px; }

/* Avatare (Bild oder generierte Initialen) */
.avatar { border-radius: 50%; flex-shrink: 0; display: inline-grid; place-items: center; overflow: hidden; vertical-align: middle; color: #fff; font-weight: 700; line-height: 1; }
.avatar--brand { background: var(--red); font-family: var(--font-display); letter-spacing: 0.04em; }
.avatar--gen { font-family: var(--font-body); }

/* Like (Hantel-Icon) */
.like-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; color: var(--muted); font: inherit; font-size: 0.9rem; padding: 4px 6px; border-radius: 8px; transition: color 0.15s var(--ease), background 0.15s var(--ease); }
.like-btn:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.like-btn.liked { color: var(--red-bright); }
.like-btn .dumbbell { transition: transform 0.15s var(--ease); }
.like-btn.liked .dumbbell { transform: rotate(-12deg) scale(1.1); }

/* ----------------------------------------------------------- News (kompakte Vorschau, alt) */
.news-rows { display: grid; gap: 14px; }
.news-row {
  display: flex; gap: 16px; align-items: center; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.news-row:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.news-row__thumb {
  width: 104px; height: 76px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface-2); display: grid; place-items: center;
}
.news-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-row__thumb .ph { color: var(--muted-2); font-size: 1.5rem; }
.news-row__main { flex: 1; min-width: 0; }
.news-row__title { font-size: 1.15rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.news-row__meta { color: var(--muted-2); font-size: 0.8rem; margin: 4px 0 6px; display: flex; gap: 12px; flex-wrap: wrap; }
.news-row__excerpt {
  color: var(--muted); font-size: 0.92rem; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-row__arrow { color: var(--muted-2); font-size: 1.4rem; flex-shrink: 0; }

/* Artikel im Popup — Bild/Video nie zu groß */
.article__meta { color: var(--muted-2); font-size: 0.85rem; margin-bottom: 14px; }
.article__text { white-space: pre-wrap; line-height: 1.75; }

/* ----------------------------------------------------------- News-Feed (alt, ungenutzt) */
.news-list { display: grid; gap: 22px; }
.news-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.news-card__body { padding: clamp(18px, 3vw, 28px); }
.news-card__title { font-size: clamp(1.3rem, 3vw, 1.9rem); margin-bottom: 8px; }
.news-card__meta { color: var(--muted-2); font-size: 0.82rem; margin-bottom: 14px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.news-card__text { color: var(--text); white-space: pre-wrap; line-height: 1.7; }
.news-media { display: grid; gap: 12px; margin: 16px 0; }
.news-media img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); }
.news-media video { width: 100%; max-height: 60vh; border-radius: var(--radius-sm); background: #000; }
.embed { position: relative; aspect-ratio: 16/9; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.news-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.news-links a {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 0.86rem; font-weight: 600;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.news-links a:hover { border-color: var(--red); color: var(--red-bright); }

/* Badges */
.badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 0.72rem;
  font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.badge--all { background: rgba(255,255,255,0.08); color: var(--muted); }
.badge--selected { background: var(--red-soft); color: var(--red-bright); }
.badge--pending { background: #3a2410; color: #ffb259; }
.badge--active { background: #11331f; color: #6fe0a0; }
.badge--rejected { background: #3a1414; color: #ff8d8d; }

/* ----------------------------------------------------------- Kommentare */
.comments { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 16px; }
.comment { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: 0; }
.comment__avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: var(--red-soft); color: var(--red-bright); font-weight: 700; font-size: 0.9rem;
}
.comment__main { flex: 1; min-width: 0; }
.comment__head { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; margin-bottom: 3px; }
.comment__head b { font-weight: 700; }
.comment__head .when { color: var(--muted-2); }
.comment__body { color: var(--text); white-space: pre-wrap; word-break: break-word; }
.comment__del { margin-left: auto; background: none; border: 0; color: var(--muted-2); cursor: pointer; font-size: 0.8rem; }
.comment__del:hover { color: var(--red-bright); }
.comment__actions { margin-top: 4px; }
.comment__actions .like-btn { padding: 2px 6px; font-size: 0.82rem; }

/* Profil-Avatar (Portal + Admin) */
.profile-avatar { display: flex; align-items: center; gap: 16px; margin: 14px 0; }
.profile-avatar__btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.comment-form { display: flex; gap: 10px; margin-top: 14px; }
.comment-form textarea {
  flex: 1; min-height: 46px; max-height: 160px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font-body); font-size: 0.95rem; resize: vertical;
}
.comment-form textarea:focus { outline: none; border-color: var(--red); }

/* ----------------------------------------------------------- Tabellen (Admin) */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.92rem; vertical-align: middle; }
.table th { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(255,255,255,0.02); }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ----------------------------------------------------------- kleine Buttons */
.btn--sm { padding: 7px 14px; font-size: 0.76rem; }
.btn--danger { background: linear-gradient(180deg, #c41410, #8d0d0a); }
.btn--danger:hover { box-shadow: 0 14px 40px -16px rgba(225,6,0,0.6); }
.btn--ok { background: linear-gradient(180deg, #1f9d57, #137a40); }
.linkbtn { background: none; border: 0; color: var(--red-bright); cursor: pointer; font-weight: 600; font-size: 0.84rem; padding: 0; }

/* ----------------------------------------------------------- Composer / Felder */
.stack { display: grid; gap: 14px; }
.inline-fields { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-fields .field { flex: 1; min-width: 180px; }
.media-item, .link-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px;
}
.media-item img, .media-item video { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; }
.media-item .grow, .link-item .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; color: var(--muted); }
.x-btn { background: none; border: 0; color: var(--muted-2); cursor: pointer; font-size: 1.1rem; line-height: 1; }
.x-btn:hover { color: var(--red-bright); }

/* Zielgruppen-Auswahl */
.targets { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 6px; max-height: 220px; overflow-y: auto; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.target { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; cursor: pointer; }
.target input { width: 16px; height: 16px; accent-color: var(--red); }
.hidden { display: none !important; }

/* ----------------------------------------------------------- Modal */
.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: flex-start; justify-content: center; padding: 5vh 16px; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); overflow-y: auto; }
.modal.open { display: flex; }
.modal__box { width: 100%; max-width: 720px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal__head h3 { font-size: 1.3rem; }
.modal__body { padding: 22px; }
.modal__foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal__close { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.6rem; line-height: 1; }
.modal__close:hover { color: var(--text); }

/* ----------------------------------------------------------- Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); z-index: 300; padding: 12px 22px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-strong); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); font-size: 0.9rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: var(--red-bright); }

/* Pending-Screen */
.pending-box { text-align: center; max-width: 560px; margin-inline: auto; padding: clamp(28px,5vw,48px); }
.pending-box .big { font-size: 3rem; margin-bottom: 12px; }

/* Spinner */
.loading { color: var(--muted); padding: 30px; text-align: center; }

/* ----------------------------------------------------------- Passwort-Toggle */
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 44px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; font-size: 1.05rem; opacity: 0.6; line-height: 1; }
.pw-toggle:hover { color: var(--text); }

/* ----------------------------------------------------------- Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; padding: 4vh 4vw; background: rgba(0,0,0,0.9); backdrop-filter: blur(3px); }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.lightbox__close { position: absolute; top: 18px; right: 24px; background: none; border: 0; color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; }
.news-media img { cursor: zoom-in; }

/* ----------------------------------------------------------- Statistik */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; }
.stat__n { font-family: var(--font-display); font-size: 2rem; line-height: 1; }
.stat__n.accent { color: var(--red-bright); }
.stat__l { font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); margin-top: 6px; }

/* ----------------------------------------------------------- „NOU"-Badge */
.badge--new { background: var(--red); color: #fff; }
.tab .count.count--soft { background: var(--surface-2); color: var(--red-bright); border: 1px solid var(--red); }

/* ----------------------------------------------------------- Suche */
.search-input { width: 100%; max-width: 320px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-family: var(--font-body); font-size: 0.92rem; }
.search-input:focus { outline: none; border-color: var(--red); }

/* ====================================================== REȚETE — Admin-Karten */
.recipe-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.recipe-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.recipe-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.recipe-card__thumb { height: 130px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.recipe-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.recipe-card__thumb .ph { font-size: 2.2rem; opacity: 0.5; }
.recipe-card__body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.recipe-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.recipe-card__title { font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.recipe-card__cat { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--red-bright); }
.recipe-card__macros { font-size: 0.85rem; }
.recipe-card__macros span { color: var(--muted-2); }
.recipe-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pop { display: inline-flex; gap: 10px; font-size: 0.9rem; font-weight: 600; }
.pop--up { color: #6fe0a0; }
.pop--down { color: #ff8d8d; }

/* Rezept-Detail (Popup, beide Seiten) */
.recipe-detail__img { width: 100%; max-height: 280px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 12px; }
.recipe-cat { display: inline-block; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--red-bright); font-weight: 700; margin-bottom: 6px; }
.recipe-desc { color: var(--muted); line-height: 1.6; margin-bottom: 12px; white-space: pre-wrap; }
.servings-ctl { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; flex-wrap: wrap; }
.servings-ctl b { font-size: 1.15rem; min-width: 24px; text-align: center; }
.step-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-size: 1.1rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center; transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.step-btn:hover { border-color: var(--red); color: var(--red-bright); }
.macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.macro { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 6px; text-align: center; }
.macro__n { display: block; font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.macro__l { display: block; font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-2); margin-top: 5px; }
.recipe-h { font-size: 1rem; margin: 16px 0 8px; color: var(--red-bright); }
.ing-list { list-style: none; display: grid; gap: 4px; }
.ing-list li { display: flex; gap: 10px; padding: 8px 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.ing__amt { font-weight: 700; min-width: 86px; color: var(--text); }
.ing__name { color: var(--muted); }
.steps-list { padding-left: 22px; display: grid; gap: 8px; }
.steps-list li { line-height: 1.6; padding-left: 4px; }

/* Rezept-Editor (Zutaten-/Schritt-Zeilen) */
.rc-grouplabel { display: block; font-size: 0.82rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
/* Mehrspaltige Editor-Zeile (.rc-row): Inputs unten bündig halten, damit ein
   umbrechendes Label (z. B. „Valorile sunt pentru (porții)") sein Eingabefeld
   nicht tiefer schiebt als die Nachbarspalte. Labels bleiben oben bündig, die
   gestreckten Felder schieben das Input per auto-Margin auf gleiche Baseline.
   Beim Umbruch aufs Handy (1 Feld/Zeile) fehlt der Freiraum → kein Effekt. (#1478) */
.rc-row .field > input { margin-top: auto; }
.ing-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.ing-row .ing-name { flex: 2; min-width: 0; }
.ing-row .ing-amt { flex: 0 0 80px; width: 80px; }
.ing-row .ing-unit { flex: 0 0 80px; width: 80px; }
.step-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.step-row__n { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: var(--red-soft); color: var(--red-bright); display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; }
.step-row .step-text { flex: 1; min-width: 0; }

/* ====================================================== Wochenplaner (D&D) */
.mp-wrap { display: grid; gap: 18px; }
.mp-pool-wrap { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.mp-pool-title { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 14px; }
.mp-pool-title .muted { letter-spacing: 0; text-transform: none; font-weight: 500; }
/* Pool-Items als einheitliches, responsives Kachel-Raster statt ragged wrap (#1508 Reopen) */
.mp-pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.mp-chip {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 8px 10px; cursor: grab; min-width: 0; position: relative;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}
.mp-chip:hover { border-color: var(--red); box-shadow: 0 8px 22px -14px rgba(0,0,0,0.75); transform: translateY(-1px); }
.mp-chip:active { cursor: grabbing; }
.mp-chip.selected { border-color: var(--red-bright); box-shadow: 0 0 0 2px var(--red-soft); }
.mp-chip.dragging { opacity: 0.45; }
.mp-chip__grip { flex: 0 0 auto; color: var(--muted-2); font-size: 0.95rem; line-height: 1; letter-spacing: -2px; opacity: 0.55; transition: color 0.15s var(--ease), opacity 0.15s var(--ease); }
.mp-chip:hover .mp-chip__grip { color: var(--red-bright); opacity: 1; }
.mp-chip__thumb { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 8px; overflow: hidden; background: var(--bg-2); display: grid; place-items: center; }
.mp-chip__thumb img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.mp-chip__thumb .ph { font-size: 1.1rem; opacity: 0.5; }
.mp-chip__main { flex: 1; min-width: 0; cursor: pointer; }
.mp-chip__title { font-weight: 600; font-size: 0.88rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mp-chip__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; }
.mp-chip__kcal { font-size: 0.7rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.mp-chip__info { flex: 0 0 auto; background: none; border: 0; color: var(--muted-2); cursor: pointer; font-size: 0.95rem; padding: 2px 4px; line-height: 1; align-self: flex-start; }
.mp-chip__info:hover { color: var(--red-bright); }
.pref { font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.pref--up { background: #11331f; color: #6fe0a0; }
.pref--down { background: #3a1414; color: #ff8d8d; }
.pref--none { background: rgba(255,255,255,0.06); color: var(--muted-2); }
.vote-row { display: inline-flex; gap: 4px; }
.vote-btn { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 0.95rem; padding: 4px 8px; line-height: 1; filter: grayscale(0.6); opacity: 0.7; transition: all 0.15s var(--ease); }
.vote-btn:hover { opacity: 1; filter: none; }
.vote-btn.up { background: #11331f; border-color: #1f9d57; filter: none; opacity: 1; }
.vote-btn.down { background: #3a1414; border-color: var(--red-bright); filter: none; opacity: 1; }

.mp-grid-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Hinweis, wenn das Profil unvollständig ist → kein kcal/Makro-Soll pro Tag (#1507) */
.mp-hint { margin: 0 0 10px; padding: 8px 12px; font-size: 0.82rem; line-height: 1.35; color: var(--muted); background: var(--red-soft); border: 1px solid var(--border); border-left: 3px solid var(--red); border-radius: var(--radius); }
.mp-grid { display: grid; grid-template-columns: minmax(64px, 0.7fr) repeat(3, minmax(96px, 1fr)); gap: 6px; min-width: 440px; }
.mp-corner { }
.mp-colh { font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; text-align: center; padding: 6px 2px; align-self: center; }
.mp-dayh { font-size: 0.8rem; font-weight: 700; color: var(--text); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding: 4px 6px; }
.mp-dayh__name { font-size: 0.8rem; font-weight: 700; }
.mp-dayh__kcal { font-size: 0.72rem; font-weight: 600; color: var(--muted); line-height: 1.2; }
.mp-dayh__rest { font-size: 0.7rem; font-weight: 500; color: var(--muted-2); line-height: 1.2; }
/* Tages-Makros: P/C/G in g, verbrauch(/soll) — analog zur kcal-Zeile (#1507) */
.mp-dayh__macros { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 0.68rem; font-weight: 600; color: var(--muted-2); line-height: 1.2; }
.mp-dayh__macro { white-space: nowrap; }
/* Textueller Tages-Badge: în limită / peste limită / sub necesar (#1507) */
.mp-badge { display: inline-block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; border: 1px solid transparent; line-height: 1.3; white-space: nowrap; }
.mp-badge--ok { background: #11331f; border-color: #1f9d57; color: #5fe39a; }
.mp-badge--over { background: var(--red-soft); border-color: var(--red-bright); color: #ff8c87; }
.mp-badge--under { background: rgba(214, 158, 46, 0.14); border-color: #b8862b; color: #e7c06a; }
.mp-badge--empty { background: var(--surface-2, rgba(255,255,255,0.04)); border-color: var(--border); color: var(--muted-2); }
.mp-cell {
  min-height: 64px; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  padding: 6px; position: relative; display: flex; flex-direction: column; transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.mp-cell:hover { border-color: var(--red); }
.mp-cell.over { border-style: solid; border-color: var(--red-bright); background: var(--red-soft); }
.mp-cell.filled { border-style: solid; cursor: default; }
.mp-cell__empty { margin: auto; color: var(--muted-2); font-size: 1.4rem; opacity: 0.5; }
/* Mehrere Mahlzeiten pro Slot (#1503): je eine Karte pro Mahlzeit, "+" bleibt darunter */
.mp-meal { position: relative; background: var(--surface-2, rgba(255,255,255,0.03)); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 6px 4px; margin-bottom: 6px; display: flex; flex-direction: column; }
.mp-cell__add { align-self: stretch; margin-top: auto; background: none; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--muted-2); cursor: pointer; font-size: 1.15rem; line-height: 1; padding: 4px 0; transition: border-color 0.15s var(--ease), color 0.15s var(--ease); }
.mp-cell__add:hover { border-color: var(--red); color: var(--red-bright); }
/* Rezept-Auswahl-Popup (#1595): durchsuchbares Modal hinter dem "+"-Button eines
   Slots. Nutzt die .modal-/.rgv-Struktur; Items sind klickbare Kacheln im Stil der
   Pool-Chips, aber als Button (Klick = Rezept dem Slot hinzufügen). */
.mp-picker .modal__box { max-width: 640px; }
.mp-picker .modal__body { padding: 16px 18px 22px; }
.mp-pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.mp-pick {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 10px; cursor: pointer; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}
.mp-pick:hover, .mp-pick:focus-visible { border-color: var(--red); box-shadow: 0 8px 22px -14px rgba(0,0,0,0.75); transform: translateY(-1px); outline: none; }
.mp-pick--dis { opacity: 0.55; }
.mp-pick__main { flex: 1; min-width: 0; }
.mp-pick__title { font-weight: 600; font-size: 0.88rem; line-height: 1.25; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mp-pick__fav { flex: 0 0 auto; color: #ffd86b; font-size: 0.9rem; }
.mp-pick__add { flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 999px; background: var(--red-soft); color: var(--red-bright); font-size: 1.05rem; font-weight: 700; line-height: 1; }
.mp-pick:hover .mp-pick__add { background: var(--red-bright); color: #fff; }
.mp-slot__rm { position: absolute; top: 2px; right: 4px; background: none; border: 0; color: var(--muted-2); cursor: pointer; font-size: 1.05rem; line-height: 1; }
.mp-slot__rm:hover { color: var(--red-bright); }
.mp-slot__title { font-size: 0.82rem; font-weight: 600; line-height: 1.25; cursor: pointer; padding-right: 14px; word-break: break-word; }
.mp-slot__title[data-open]:hover { color: var(--red-bright); }
/* Nährwerte pro Rezept-Karte: kcal + P/C/G in g, skaliert mit den Portionen (#1513) */
.mp-meal__nutri { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin-top: 4px; line-height: 1.2; }
.mp-meal__kcal { font-size: 0.72rem; font-weight: 700; color: var(--text); }
.mp-meal__macro { font-size: 0.66rem; font-weight: 600; color: var(--muted-2); white-space: nowrap; }
.mp-slot__serv { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; font-size: 0.78rem; color: var(--muted); }
.mp-slot__serv .step-btn { width: 22px; height: 22px; font-size: 0.95rem; }

/* ====================================================== Rezept-Übersicht: Gruppen + Suche (#1508)
   Gemeinsame, durchsuchbare + nach Kategorie gruppierte + personalisiert sortierte
   Ansicht. Genutzt vom Plan-Pool (Items = .mp-chip) und vom „Rețete"-Tab (.rb-card). */
.rgv { display: grid; gap: 12px; }
.rgv-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rgv-search {
  flex: 1; min-width: 200px; padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  font-family: var(--font-body); font-size: 0.92rem;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.rgv-search:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.rgv-cat {
  padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface);
  border: 1px solid var(--border-strong); color: var(--text); font-family: var(--font-body);
  font-size: 0.9rem; cursor: pointer; max-width: 220px; transition: border-color 0.15s var(--ease);
}
.rgv-cat:focus { outline: none; border-color: var(--red); }
.rgv-fav {
  padding: 10px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--muted); font-family: var(--font-body); font-weight: 700; font-size: 0.82rem; cursor: pointer;
  white-space: nowrap; transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.rgv-fav:hover { color: var(--text); border-color: var(--red); }
.rgv-fav.active { color: #ffd86b; border-color: #b8862b; background: rgba(214,158,46,0.14); }
.rgv-groups { display: grid; gap: 12px; }
.rgv-group { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.rgv-group__head {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; cursor: pointer;
  background: var(--surface-2); border: 0; border-bottom: 1px solid var(--border); color: var(--text);
  font-family: var(--font-body); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.06em;
  text-transform: uppercase; text-align: left; box-shadow: inset 3px 0 0 0 var(--red);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.rgv-group__head:hover { color: var(--red-bright); background: var(--surface); }
.rgv-group__chev { font-size: 0.8rem; color: var(--muted-2); transition: transform 0.18s var(--ease); }
.rgv-group__title { flex: 1; min-width: 0; }
.rgv-group__count {
  min-width: 22px; padding: 1px 9px; border-radius: 999px; background: var(--red-soft);
  border: 1px solid transparent; color: var(--red-bright); font-size: 0.72rem; font-weight: 800; letter-spacing: 0;
  text-align: center;
}
.rgv-group__body { padding: 12px 14px; }
.rgv-group.collapsed .rgv-group__chev { transform: rotate(-90deg); }
.rgv-group.collapsed .rgv-group__head { border-bottom-color: transparent; }
.rgv-group.collapsed .rgv-group__body { display: none; }

/* Pool-Chip: Präferenz-Markierung statt Vote-Buttons (#1508) */
.mp-chip__fav { flex: 0 0 auto; color: #ffd86b; font-size: 0.95rem; line-height: 1; align-self: flex-start; }
.mp-chip--dis { opacity: 0.55; }
.mp-chip--dis:hover { opacity: 0.85; }

/* ====================================================== Rețete-Tab: Karten-Grid (#1508) */
.rb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.rb-card {
  display: flex; flex-direction: column; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.rb-card:hover { border-color: var(--red); transform: translateY(-2px); }
.rb-card:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 2px; }
.rb-card--dis { opacity: 0.55; }
.rb-card--dis:hover { opacity: 0.9; }
.rb-card__thumb { position: relative; height: 120px; background: var(--surface); display: grid; place-items: center; overflow: hidden; }
.rb-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rb-card__thumb .ph { font-size: 2.2rem; opacity: 0.5; }
.rb-card__fav {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(10,10,11,0.72); color: #ffd86b; display: grid; place-items: center; font-size: 0.9rem;
}
.rb-card__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 13px; flex: 1; }
.rb-card__title { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.rb-card__cat { font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--red-bright); }
.rb-card__macros { font-size: 0.82rem; color: var(--muted); }
.rb-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }
.rb-card__open { font-size: 0.8rem; font-weight: 600; color: var(--muted-2); white-space: nowrap; }
.rb-card:hover .rb-card__open { color: var(--red-bright); }

@media (max-width: 640px) {
  .news-card__meta { gap: 8px; }
  .modal { padding: 2vh 8px; }
  .macros { grid-template-columns: repeat(2, 1fr); }
  .recipe-cards { grid-template-columns: 1fr; }
  .rb-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .mp-pool { grid-template-columns: 1fr; }
  .rgv-search { max-width: none; }
}
