/* assets/style.css — Design der Abnehm-Gruppe */

:root {
    --bg: #f1f7f3;
    --card: #ffffff;
    --ink: #1e2a24;
    --muted: #6b7d74;
    --primary: #16a06a;
    --primary-dark: #0f8456;
    --primary-soft: #e4f4ec;
    --accent: #f5963f;
    --ok: #16a06a;
    --warn: #e0903a;
    --danger: #d4544e;
    --border: #e1ebe5;
    --radius: 16px;
    --shadow: 0 2px 12px rgba(20, 80, 50, 0.07);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
}

a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Topbar ---- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 10px rgba(20, 80, 50, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.2rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo { height: 36px; width: auto; display: block; }
.auth-logo-img { height: 68px; width: auto; display: block; margin: 0 auto 1.1rem; }
.brand-badge { width: 32px; height: 32px; border-radius: 9px; flex: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 700;
    box-shadow: 0 3px 9px rgba(22, 160, 106, 0.38); }

.nav { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; flex: 1; margin-left: 1.4rem; }
.nav a, .nav-dd > summary { color: var(--ink); font-size: 0.93rem; padding: 0.45rem 0.8rem;
    border-radius: 10px; transition: background 0.15s ease, color 0.15s ease; }
.nav a:hover, .nav-dd > summary:hover { background: var(--primary-soft); color: var(--primary-dark); text-decoration: none; }
.nav a.active, .nav-dd > summary.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.nav-user { color: var(--muted); font-size: 0.9rem; }
.nav-logout { color: var(--danger) !important; }
.nav-avatar { width: 26px; height: 26px; border-radius: 50%; flex: none;
    background: var(--primary-soft); color: var(--primary-dark); display: inline-flex;
    align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; margin-right: 0.45rem; }
.nav-user-dd > summary { display: inline-flex; align-items: center; color: var(--ink); }

/* Navigations-Dropdown (Desktop) */
.nav-right { margin-left: auto; }
.nav-dd { position: relative; }
.nav-dd > summary { list-style: none; cursor: pointer; color: var(--ink); font-size: 0.95rem; }
.nav-dd > summary::-webkit-details-marker { display: none; }
.nav-dd > summary:hover { color: var(--primary-dark); }
.nav-dd > summary.active { color: var(--primary-dark); font-weight: 700; }
.nav-dd[open] > summary { color: var(--primary-dark); }
.nav-user-dd > summary { color: var(--muted); }
.nav-dd-menu { position: absolute; top: calc(100% + 8px); left: 0; background: #fff;
    border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 30px rgba(20, 80, 50, 0.14);
    padding: 0.4rem; min-width: 190px; display: flex; flex-direction: column; gap: 0.1rem; z-index: 60; }
.nav-dd-menu.nav-dd-right { left: auto; right: 0; }
.nav-dd-menu a { padding: 0.55rem 0.7rem; border-radius: 8px; font-size: 0.92rem; white-space: nowrap; }
.nav-dd-menu a:hover { background: var(--primary-soft); text-decoration: none; }

/* ---- Layout ---- */
.container { max-width: 920px; margin: 0 auto; padding: 1.5rem 1.2rem 3rem; }
.back-link { display: inline-flex; align-items: center; gap: 0.2rem; margin-bottom: 1rem;
    color: var(--primary-dark); font-weight: 600; font-size: 0.95rem; text-decoration: none;
    padding: 0.4rem 0.9rem 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: 99px; background: #fff; }
.back-link:hover { border-color: var(--primary); background: var(--primary-soft); text-decoration: none; }
h1 { font-size: 1.6rem; margin: 0.2rem 0 1rem; }
h2 { font-size: 1.2rem; margin: 0 0 0.8rem; }

.footer { text-align: center; color: var(--muted); padding: 2rem; }

/* ---- Cards ---- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem;
    margin-bottom: 1.2rem;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.8rem; flex-wrap: wrap; }
.card-head h1, .card-head h2 { margin: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.stat { display: flex; flex-direction: column; gap: 0.2rem; }
.stat-label { color: var(--muted); font-size: 0.85rem; }
.stat-value { font-size: 1.5rem; font-weight: 700; }

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
}
.btn:hover { text-decoration: none; border-color: var(--primary); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.btn-link-danger { border: none; background: none; color: var(--danger); padding: 0.2rem 0.4rem; }

/* ---- Forms ---- */
label { display: block; font-size: 0.9rem; color: var(--ink); margin-bottom: 0.8rem; }
input, select, textarea {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    background: #fff;
    color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(124,92,191,0.3); border-color: var(--primary); }
textarea { resize: vertical; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-row { display: flex; align-items: center; gap: 0.6rem; }
.input-icon { width: 60px; text-align: center; }
.input-grow { flex: 1; }
.form-row label { margin-bottom: 0; }

.summary-btn { cursor: pointer; font-weight: 600; }

/* ---- Auth (Vollbild-Login/Register) ---- */
.auth-body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #0f8456 0%, #38b98a 45%, #cdeadd 100%);
}
.auth-shell {
    width: 100%;
    max-width: 410px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 20px 55px rgba(50, 30, 80, 0.28);
    padding: 2.4rem 2.2rem;
}
.auth-logo {
    width: 64px; height: 64px;
    margin: 0 auto 1.1rem;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; font-size: 1.9rem; font-weight: 700;
    box-shadow: 0 8px 20px rgba(22, 160, 106, 0.4);
}
.auth-shell h1 { text-align: center; margin: 0 0 0.3rem; font-size: 1.5rem; }
.auth-sub { text-align: center; color: var(--muted); margin: 0 0 1.6rem; font-size: 0.95rem; }
.auth-shell .btn-primary { width: 100%; padding: 0.7rem; font-size: 1rem; margin-top: 0.4rem; }
.auth-alt {
    text-align: center; margin-top: 1.4rem; padding-top: 1.1rem;
    border-top: 1px solid var(--border); color: var(--muted); font-size: 0.92rem;
}
.auth-alt a { font-weight: 600; }
.auth-shell .flash { margin-bottom: 1.1rem; }

/* ---- Premium Split-Layout (Login) ---- */
.auth-split { display: flex; min-height: 100vh; }

.auth-hero {
    position: relative;
    flex: 1 1 56%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.auth-hero::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top,
        rgba(12, 38, 26, 0.92) 0%,
        rgba(12, 38, 26, 0.45) 42%,
        rgba(12, 38, 26, 0.10) 100%);
}
.auth-hero-text { position: relative; z-index: 1; color: #fff; padding: 3.5rem 3rem; max-width: 560px; }
.auth-hero-eyebrow {
    display: inline-block; text-transform: uppercase; letter-spacing: 2px;
    font-size: 0.72rem; font-weight: 600; opacity: 0.85; margin-bottom: 1rem;
    border: 1px solid rgba(255,255,255,0.35); border-radius: 99px; padding: 0.3rem 0.8rem;
}
.auth-hero-brand { font-size: 2.6rem; font-weight: 800; letter-spacing: 0.4px; margin: 0 0 0.7rem; line-height: 1.1; }
.auth-hero-tagline { font-size: 1.15rem; line-height: 1.55; font-weight: 300; opacity: 0.94; margin: 0; }

.auth-panel {
    flex: 1 1 44%;
    display: flex; align-items: center; justify-content: center;
    padding: 2.5rem; background: #fff;
}
.auth-form { width: 100%; max-width: 360px; }
.auth-badge {
    width: 52px; height: 52px; border-radius: 15px; margin-bottom: 1.4rem;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; font-size: 1.5rem; font-weight: 700;
    box-shadow: 0 8px 18px rgba(22, 160, 106, 0.35);
}
.auth-form h1 { font-size: 1.7rem; margin: 0 0 0.3rem; }
.auth-form .auth-sub { text-align: left; margin: 0 0 1.7rem; }
.auth-form .btn-primary { width: 100%; padding: 0.75rem; font-size: 1rem; margin-top: 0.5rem; }
.auth-form .auth-alt { text-align: left; }

@media (max-width: 880px) {
    .auth-split { flex-direction: column; }
    .auth-hero { flex: none; min-height: 240px; }
    .auth-hero-text { padding: 1.8rem; }
    .auth-hero-brand { font-size: 1.9rem; }
    .auth-hero-tagline { font-size: 1rem; }
    .auth-panel { padding: 2.2rem 1.5rem; }
    .auth-form { max-width: 420px; margin: 0 auto; }
}

/* alte schlichte Auth-Karte (Fallback) */
.auth-card { max-width: 380px; margin: 3rem auto; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; }
.auth-card h1 { text-align: center; }

/* ---- Flash ---- */
.flash { padding: 0.7rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: 0.95rem; }
.flash-success { background: #e7f6e8; color: #2c6b2f; }
.flash-error { background: #fbe6e5; color: #9b302c; }
.flash-info { background: #eef0fb; color: #3a3f7a; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 600; }
.table tr.status-warn td { background: #fdf4ea; }
.table tr.status-today td { background: #f0f9f0; }

.pos { color: var(--ok); font-weight: 600; }
.neg { color: var(--danger); font-weight: 600; }
.muted { color: var(--muted); font-size: 0.9rem; }

.badge { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 99px; font-size: 0.75rem; background: #eee; color: #555; vertical-align: middle; }
.badge-ok { background: #e7f6e8; color: #2c6b2f; }
.badge-warn { background: #fbe6e5; color: #9b302c; }

/* ---- Habits ---- */
.habit-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.8rem; }
.habit-item { margin: 0; }
.habit-toggle {
    width: 100%; display: flex; align-items: center; gap: 0.7rem;
    padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: 12px;
    background: #fff; cursor: pointer; font-size: 1rem; text-align: left;
}
.habit-toggle:hover { border-color: var(--primary); }
.habit-item.done .habit-toggle { background: #f0f9f0; border-color: var(--ok); }
.habit-check {
    width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; flex-shrink: 0;
}
.habit-item.done .habit-check { background: var(--ok); border-color: var(--ok); }
.habit-icon { font-size: 1.2rem; }
.habit-name { flex: 1; }

/* ---- Feed ---- */
.feed-compose textarea { margin-bottom: 0.6rem; }
.feed-item { position: relative; }
.feed-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.feed-author { font-weight: 600; }
.feed-body { margin: 0; white-space: pre-wrap; }
.feed-delete { margin-top: 0.4rem; }

/* ---- Tap-first Eingabe (entry.php) ---- */
.date-pick { width: auto; margin: 0; padding: 0.4rem 0.6rem; }
.track-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.1rem 1.2rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.track-title { font-weight: 700; font-size: 1rem; margin-bottom: 0.8rem; }

.stepper { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.step-btn {
    flex: 0 0 auto; width: 54px; height: 54px; border-radius: 50%;
    border: 2px solid var(--border); background: #fff; color: var(--primary-dark);
    font-size: 1.7rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
    -webkit-tap-highlight-color: transparent; user-select: none;
}
.step-btn:hover { border-color: var(--primary); background: var(--primary-soft); }
.step-btn:active { transform: scale(0.94); }
.big-value { text-align: center; font-size: 2.2rem; font-weight: 800; line-height: 1.1; }
.big-value small { font-size: 0.9rem; color: var(--muted); font-weight: 600; margin-left: 0.2rem; }
.big-value.center { margin: 0.2rem 0 0.6rem; }
.big-value .sub { font-size: 0.8rem; color: var(--muted); font-weight: 600; margin-top: 0.2rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.chip { padding: 0.5rem 0.9rem; border-radius: 99px; border: 1px solid var(--border);
    background: #fff; color: var(--ink); font-size: 0.9rem; font-weight: 600; cursor: pointer;
    -webkit-tap-highlight-color: transparent; }
.chip:hover { border-color: var(--primary); background: var(--primary-soft); }
.chip:active { transform: scale(0.96); }
.chip.allerg.active { border-color: var(--primary); background: var(--primary); color: #fff; font-weight: 700; }

input[type="range"] { width: 100%; accent-color: var(--primary); height: 28px; }

.mood-faces { display: flex; justify-content: space-between; gap: 0.4rem; }
.face { flex: 1; font-size: 1.9rem; padding: 0.5rem 0; border: 2px solid var(--border);
    border-radius: 14px; background: #fff; cursor: pointer; line-height: 1;
    -webkit-tap-highlight-color: transparent; }
.face:hover { border-color: var(--primary); }
.face.active { border-color: var(--primary); background: var(--primary-soft); transform: scale(1.05); }

.entry-actions { display: flex; gap: 0.6rem; margin-top: 0.4rem; }
.entry-actions .btn { flex: 1; }

/* Auswahl-Chips als Radio (z.B. Mahlzeit) */
.opt-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.opt { position: relative; margin: 0; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt span { display: inline-block; padding: 0.5rem 1rem; border-radius: 99px; border: 1px solid var(--border);
    background: #fff; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.opt input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }

/* KI-Schätzung (Ernährung) */
.est-card { border-left: 4px solid var(--primary); }
.file-inline { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.7rem; font-size: 0.88rem; color: var(--muted); flex-wrap: wrap; }
.est-result { border-left: 4px solid var(--ok); }
.est-kcal { font-size: 1.3rem; font-weight: 800; color: var(--primary-dark); }
.est-save { display: flex; align-items: flex-end; gap: 0.7rem; margin-top: 1rem; flex-wrap: wrap; }
.est-kcal-edit { margin: 0; font-size: 0.85rem; }
.est-kcal-edit input { width: 110px; margin-top: 0.25rem; }

/* Essen-Eingabezeile */
.food-add { display: flex; gap: 0.5rem; margin-top: 1rem; }
.food-add input { margin-top: 0; }
.food-add .kcal-in { flex: 0 0 90px; }
.food-add .btn { flex: 0 0 auto; padding: 0.55rem 1.1rem; font-size: 1.2rem; line-height: 1; }

/* ---- Upload-Box (Aus Vorrat kochen) ---- */
.upload-box { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; text-align: center;
    padding: 1.8rem 1rem; border: 2px dashed var(--border); border-radius: 14px; cursor: pointer; margin: 0; }
.upload-box:hover { border-color: var(--primary); background: var(--primary-soft); }
.upload-box input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-ic { width: 46px; height: 46px; border-radius: 50%; background: var(--primary-soft);
    color: var(--primary-dark); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 700; }

/* Kamera-/Galerie-Buttons */
.cam-actions { display: flex; gap: 0.7rem; }
.cam-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
    padding: 1.2rem 0.5rem; border: 2px dashed var(--border); border-radius: 14px; cursor: pointer;
    font-weight: 600; font-size: 0.92rem; text-align: center; margin: 0; }
.cam-btn:hover { border-color: var(--primary); background: var(--primary-soft); }
.cam-btn input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cam-btn svg { width: 30px; height: 30px; color: var(--primary-dark); }
.preview-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.preview-grid img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }

/* ---- Essensplan-Banner (Dashboard) ---- */
.plan-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.2rem; margin-bottom: 1.2rem; border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff;
    text-decoration: none; box-shadow: 0 8px 20px rgba(22,160,106,0.3); }
.plan-banner:hover { text-decoration: none; filter: brightness(1.05); }
.plan-banner strong { display: block; font-size: 1.05rem; }
.plan-banner span { font-size: 0.85rem; opacity: 0.92; }
.plan-banner-arrow { font-size: 1.8rem; line-height: 1; }
.menu-hl { border-color: var(--primary); background: var(--primary-soft); }

/* ---- Essensplan & Prognose ---- */
.proj-card { border-left: 4px solid var(--primary); }
.proj-lead { font-size: 1.05rem; margin: 0 0 1rem; }
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.proj-item { background: var(--bg); border-radius: 12px; padding: 0.8rem; text-align: center; display: flex; flex-direction: column; gap: 0.2rem; }
.proj-lbl { font-size: 0.74rem; color: var(--muted); }
.proj-val { font-size: 1.2rem; font-weight: 800; }

/* Lade-Overlay beim Plan-Erstellen */
.plan-loading { position: fixed; inset: 0; z-index: 250; background: rgba(18, 40, 28, 0.6);
    display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.plan-loading[hidden] { display: none; }
.pl-box { background: #fff; border-radius: 20px; padding: 2rem 1.8rem; max-width: 360px; text-align: center;
    box-shadow: 0 20px 55px rgba(8, 45, 30, 0.35); }
.pl-spinner { width: 52px; height: 52px; margin: 0 auto 1.1rem; border-radius: 50%;
    border: 5px solid var(--primary-soft); border-top-color: var(--primary); animation: plSpin 0.9s linear infinite; }
@keyframes plSpin { to { transform: rotate(360deg); } }
.pl-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.4rem; }

/* Plan-Übersicht + Mahlzeit-Karten */
.plan-overview-card { border-left: 4px solid var(--primary); }
.plan-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-top: 0.3rem; }
.po-item { background: var(--bg); border-radius: 12px; padding: 0.7rem; text-align: center; display: flex; flex-direction: column; gap: 0.15rem; }
.po-lbl { font-size: 0.72rem; color: var(--muted); }
.po-val { font-size: 1.1rem; font-weight: 800; }
.plan-intro { margin: 0.9rem 0 0; }

.meal-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); margin-bottom: 1rem; overflow: hidden; }
.meal-head { display: flex; align-items: center; gap: 0.7rem; padding: 0.9rem 1.1rem;
    background: var(--primary-soft); border-bottom: 1px solid var(--border); }
.meal-ic { width: 38px; height: 38px; border-radius: 10px; flex: none; background: #fff;
    display: flex; align-items: center; justify-content: center; color: var(--primary-dark); }
.meal-ic svg { width: 22px; height: 22px; }
.meal-title { margin: 0; font-size: 1.05rem; flex: 1; }
.meal-kcal { background: var(--primary); color: #fff; font-size: 0.8rem; font-weight: 700;
    padding: 0.25rem 0.7rem; border-radius: 99px; white-space: nowrap; }
.meal-check-form { margin: 0; }
.meal-check { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.7rem;
    border-radius: 99px; border: 1.5px solid var(--border); background: #fff; color: var(--muted);
    font-size: 0.8rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.meal-check svg { width: 15px; height: 15px; }
.meal-check:hover { border-color: var(--primary); color: var(--primary-dark); }
.meal-check.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.meal-card.eaten { border-color: var(--primary); }
.meal-card.eaten .meal-head { background: var(--primary-soft); }

.meal-body { padding: 0.9rem 1.1rem; }
.meal-item { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.55rem 0.2rem;
    border-bottom: 1px solid var(--border); cursor: pointer; margin: 0; }
.meal-item:last-child { border-bottom: none; }
.meal-item input[type="checkbox"] { width: 22px; height: 22px; margin: 0.1rem 0 0; flex: none;
    accent-color: var(--primary); cursor: pointer; }
.meal-item span { flex: 1; line-height: 1.5; }
.meal-item.on span { text-decoration: line-through; color: var(--muted); }
.meal-line { margin: 0.5rem 0; line-height: 1.5; }
.meal-body .plan-h { display: none; } /* Abschnittstitel steckt schon im Karten-Header */

.plan-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.plan-history .hist-item { border-top: 1px solid var(--border); padding-top: 0.9rem; margin-top: 0.9rem; }
.plan-history .hist-meta { font-size: 0.82rem; margin-bottom: 0.4rem; }
.plan-history .plan-content { opacity: 0.85; }
.plan-empty { text-align: center; }
.plan-empty-ic { width: 56px; height: 56px; border-radius: 16px; margin: 0.5rem auto 0.8rem;
    background: var(--primary-soft); color: var(--primary-dark); }
.plan-empty-ic svg { width: 30px; height: 30px; }

.plan-content { line-height: 1.6; }
.plan-content .plan-h { font-size: 1.1rem; margin: 1.2rem 0 0.4rem; color: var(--primary-dark);
    padding-bottom: 0.3rem; border-bottom: 1px solid var(--border); }
.plan-content .plan-h:first-child { margin-top: 0; }
.plan-content p { margin: 0.3rem 0; }
.plan-content .plan-ul { margin: 0.3rem 0 0.6rem; padding-left: 1.3rem; }
.plan-content .plan-ul li { margin: 0.15rem 0; }
@media (max-width: 560px) { .proj-grid { grid-template-columns: 1fr; } }

/* ---- Onboarding-Wizard ---- */
.wiz-body {
    min-height: 100vh; margin: 0; display: flex; align-items: center; justify-content: center;
    padding: 2rem 1.2rem;
    background: radial-gradient(120% 80% at 50% 0%, #16a06a 0%, #0f8456 38%, #0c6b46 100%);
}
.wiz-shell {
    width: 100%; max-width: 480px; background: #fff; border-radius: 26px;
    box-shadow: 0 24px 70px rgba(8, 45, 30, 0.35); padding: 2.2rem 2rem 2rem;
    animation: wizIn 0.4s ease;
}
@keyframes wizIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.wiz-head { text-align: center; margin-bottom: 1.6rem; }
.wiz-head .auth-badge { margin-left: auto; margin-right: auto; width: 58px; height: 58px; border-radius: 17px; font-size: 1.7rem; }
.wiz-head h1 { margin: 0.2rem 0 0.3rem; font-size: 1.55rem; }
.wiz-progress { height: 8px; background: var(--primary-soft); border-radius: 99px; margin-top: 1.4rem; overflow: hidden; }
.wiz-progress-bar { height: 100%; width: 16%; border-radius: 99px; transition: width 0.35s ease;
    background: linear-gradient(90deg, var(--primary), #3fd296); }
.wiz-step-count { text-align: center; font-size: 0.8rem; color: var(--muted); font-weight: 600; margin-top: 0.5rem; letter-spacing: 0.3px; }
.wiz-step h2 { font-size: 1.25rem; margin: 0 0 1.1rem; }
.wiz-label { display: block; font-size: 0.9rem; font-weight: 600; margin: 1rem 0 0.5rem; }
.wiz-step > .wiz-label:first-of-type { margin-top: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-bottom: 1.1rem; }
.choice { position: relative; margin: 0; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
    display: flex; align-items: center; justify-content: center; text-align: center;
    padding: 0.95rem 0.4rem; border: 2px solid var(--border); border-radius: 14px;
    font-size: 0.92rem; font-weight: 600; cursor: pointer; min-height: 52px; transition: 0.15s;
}
.choice span:hover { border-color: var(--primary); }
.choice input:checked + span { border-color: var(--primary); background: var(--primary-soft);
    color: var(--primary-dark); box-shadow: 0 0 0 3px rgba(22, 160, 106, 0.12); }
.wiz-nav { display: flex; gap: 0.6rem; margin-top: 1.8rem; }
.wiz-nav .btn { flex: 1; padding: 0.8rem; font-size: 1rem; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.sum-item { background: var(--bg); border-radius: 14px; padding: 1rem; display: flex; flex-direction: column; gap: 0.2rem; }
.sum-item.highlight { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; grid-column: 1 / -1; }
.sum-item.highlight .sum-lbl { color: rgba(255, 255, 255, 0.85); }
.sum-lbl { font-size: 0.78rem; color: var(--muted); }
.sum-val { font-size: 1.4rem; font-weight: 800; }

/* ---- Dashboard: Analyse-Karte ---- */
.analysis-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; }
.an-item { background: var(--bg); border-radius: 12px; padding: 0.8rem; text-align: center; display: flex; flex-direction: column; gap: 0.15rem; }
.an-lbl { font-size: 0.72rem; color: var(--muted); }
.an-val { font-size: 1.15rem; font-weight: 800; }
.an-val small { font-size: 0.65rem; font-weight: 600; color: var(--muted); }
@media (max-width: 560px) { .analysis-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---- Tracking-Kalender ---- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 1rem; }
.cal-head h1 { margin: 0; font-size: 1.3rem; text-align: center; flex: 1; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-weekdays { margin-bottom: 6px; }
.cal-wd { text-align: center; font-size: 0.75rem; color: var(--muted); font-weight: 600; padding: 0.2rem 0; }
.cal-cell { position: relative; aspect-ratio: 1 / 1; border: 1px solid var(--border); border-radius: 10px;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    padding: 0.25rem 0.1rem; text-decoration: none; color: var(--ink); background: #fff; overflow: hidden; }
a.cal-cell:hover { border-color: var(--primary); text-decoration: none; }
.cal-cell.empty { border: none; background: transparent; }
.cal-cell.future { color: var(--muted); background: var(--bg); opacity: 0.6; }
.cal-cell.active { background: var(--primary-soft); border-color: var(--primary); }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--primary); }
.cal-day { font-size: 0.85rem; font-weight: 600; line-height: 1.1; }
.cal-dots { display: flex; gap: 3px; margin-top: 2px; min-height: 8px; }
.cdot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--border); }
.cdot-w { background: var(--primary); }
.cdot-h { background: #f5963f; }
.cdot-h.full { background: var(--ok); }
.cal-w { font-size: 0.66rem; color: var(--primary-dark); font-weight: 700; margin-top: auto; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; font-size: 0.82rem; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }

/* ---- Diagramm-Container (feste Höhe für Chart.js) ---- */
.chart-wrap { position: relative; height: 240px; width: 100%; }
.chart-wrap canvas { max-width: 100%; }

/* ---- Einfach-Modus (groß & klar) ---- */
html.simple-mode { font-size: 19px; }
.simple-mode .topbar { padding: 0.9rem 1.2rem; }
.simple-mode .btn { padding: 0.7rem 1.2rem; }
.simple-mode .btn-sm { padding: 0.5rem 0.9rem; font-size: 0.95rem; }
.simple-mode input, .simple-mode select, .simple-mode textarea { padding: 0.7rem 0.8rem; }
.simple-mode .bn-item span { font-size: 0.74rem; }
.simple-mode .bn-item svg { width: 26px; height: 26px; }
.simple-mode .muted { font-size: 0.95rem; }
.simple-mode .step-btn { width: 60px; height: 60px; font-size: 1.9rem; }
.simple-mode .chip, .simple-mode .opt span { font-size: 1rem; padding: 0.6rem 1.1rem; }

/* Umschalt-Zeile (Einfach-Modus) */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.toggle-row .tr-label strong { display: block; }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--border); border-radius: 999px; transition: 0.2s; }
.switch .track::before { content: ''; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::before { transform: translateX(22px); }

/* ---- Einführungs-Tour (Modal) ---- */
.tour-overlay { position: fixed; inset: 0; background: rgba(20, 40, 30, 0.55); z-index: 200;
    display: flex; align-items: center; justify-content: center; padding: 1.2rem; }
.tour-card { background: #fff; border-radius: 20px; max-width: 420px; width: 100%; padding: 1.8rem;
    box-shadow: 0 20px 55px rgba(15, 60, 40, 0.35); text-align: center; }
.tour-ic { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 18px; display: flex;
    align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary-dark); }
.tour-ic svg { width: 34px; height: 34px; }
.tour-card h2 { margin: 0 0 0.5rem; font-size: 1.3rem; }
.tour-card p { margin: 0; color: var(--ink); line-height: 1.55; }
.tour-dots { display: flex; justify-content: center; gap: 0.4rem; margin: 1.3rem 0; }
.tour-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.tour-dot.active { background: var(--primary); }
.tour-nav { display: flex; gap: 0.6rem; }
.tour-nav .btn { flex: 1; }
.tour-skip { display: block; margin-top: 0.9rem; color: var(--muted); font-size: 0.88rem; background: none; border: none; cursor: pointer; width: 100%; }

/* ---- Spruch des Tages ---- */
.quote-card { position: relative; background: linear-gradient(135deg, var(--primary-soft), #fff);
    border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius);
    padding: 1.1rem 1.2rem 1.1rem 1.3rem; margin-bottom: 1.2rem; }
.quote-mark { position: absolute; top: 0.1rem; left: 0.7rem; font-size: 2.4rem; color: var(--primary);
    opacity: 0.35; line-height: 1; font-family: Georgia, serif; }
.quote-text { margin: 0 0 0.3rem; font-size: 1.05rem; line-height: 1.5; font-style: italic; padding-left: 1.4rem; }
.quote-src { display: block; text-align: right; font-size: 0.82rem; color: var(--primary-dark); font-weight: 600; }

/* Coach-Nachricht (Mitglied) */
.coach-msg-card { border-left: 4px solid var(--accent); }
.coach-msg { padding: 0.5rem 0; border-top: 1px solid var(--border); }
.coach-msg:first-of-type { border-top: none; }
.coach-msg p { margin: 0 0 0.2rem; white-space: pre-wrap; }

/* ---- Mein Tag: Start-Screen ---- */
.start-screen { max-width: 420px; margin: 1.5rem auto; text-align: center; padding: 1rem; }
.start-badge { width: 80px; height: 80px; margin: 0 auto 1.2rem; border-radius: 24px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff;
    box-shadow: 0 12px 28px rgba(22, 160, 106, 0.4); }
.start-badge svg { width: 38px; height: 38px; }
.start-screen h1 { font-size: 1.6rem; margin: 0 0 0.6rem; }
.start-screen p { color: var(--ink); line-height: 1.6; margin: 0 0 1.2rem; }
.btn-start { width: 100%; max-width: 280px; padding: 0.9rem; font-size: 1.1rem; margin: 0 auto 1rem; display: block; }

/* ---- Mein Tag: Tagesansicht ---- */
.today-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.8rem; }
.today-top h1 { margin: 0.2rem 0 0; font-size: 1.5rem; }
.day-badge { display: inline-block; background: var(--primary-soft); color: var(--primary-dark);
    font-weight: 700; font-size: 0.8rem; padding: 0.25rem 0.8rem; border-radius: 99px; letter-spacing: 0.3px; }
.today-goal { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--primary);
    border-radius: var(--radius); padding: 0.8rem 1.1rem; margin-bottom: 1rem; font-size: 0.98rem; }
.today-progress { color: var(--muted); font-weight: 600; margin: 0 0 0.9rem; }
.day-done { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff;
    padding: 1rem 1.2rem; border-radius: var(--radius); font-weight: 700; margin-bottom: 1rem; text-align: center; }

/* 30-Tage-Programm-Karte */
.program-card { border-left: 4px solid var(--primary); }
.prog-bar { height: 8px; background: var(--primary-soft); border-radius: 99px; overflow: hidden; margin-bottom: 0.8rem; }
.prog-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #3fd296); border-radius: 99px; transition: width 0.4s ease; }
.prog-label { font-size: 0.74rem; color: var(--primary-dark); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.prog-title { margin: 0.3rem 0 0.4rem; font-size: 1.2rem; }
.prog-text { margin: 0; line-height: 1.6; color: var(--ink); }
.prog-finished { border-left-color: var(--ok); text-align: center; }

/* Tages-Dashboard (Mein Tag) */
.preview-bar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.prev-chip { padding: 0.35rem 0.8rem; border-radius: 99px; border: 1px solid var(--border);
    background: #fff; color: var(--ink); font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.prev-chip:hover { border-color: var(--primary); text-decoration: none; }
.prev-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.day-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 1rem; }
.day-nav-btn { padding: 0.45rem 0.9rem; border-radius: 99px; border: 1px solid var(--border);
    background: #fff; color: var(--primary-dark); font-weight: 600; font-size: 0.88rem; text-decoration: none; }
.day-nav-btn:hover { border-color: var(--primary); text-decoration: none; }
.day-nav-btn.disabled { color: var(--muted); opacity: 0.5; background: var(--bg); }
.day-nav-cur { font-weight: 700; background: var(--primary); color: #fff;
    padding: 0.45rem 1.1rem; border-radius: 99px; box-shadow: 0 3px 10px rgba(22, 160, 106, 0.32); }

.day-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin-bottom: 1.2rem; }
.day-tile { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 0.9rem 0.6rem; text-align: center; display: flex; flex-direction: column; gap: 0.15rem;
    cursor: pointer; font: inherit; color: var(--ink); transition: 0.15s; }
.day-tile:hover { border-color: var(--primary); transform: translateY(-1px); }
.day-tile:active { transform: scale(0.98); }

/* Popup zum Eintragen einzelner Werte */
.metric-overlay { position: fixed; inset: 0; background: rgba(18, 40, 28, 0.55); z-index: 200;
    display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.metric-overlay[hidden] { display: none; }
@media (min-width: 560px) { .metric-overlay { align-items: center; padding: 1.2rem; } }
.metric-card { background: #fff; width: 100%; max-width: 420px; border-radius: 22px 22px 0 0;
    padding: 1.5rem 1.4rem; box-shadow: 0 -12px 44px rgba(0, 0, 0, 0.22); animation: wizIn 0.25s ease; }
@media (min-width: 560px) { .metric-card { border-radius: 22px; } }
.metric-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; }
.metric-head h3 { margin: 0; font-size: 1.2rem; }
.metric-close { background: none; border: none; font-size: 1.7rem; line-height: 1; cursor: pointer; color: var(--muted); }
.metric-input { width: 100%; font-size: 1.4rem; text-align: center; padding: 0.7rem; margin: 0; }
.metric-stepper { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.metric-big { font-size: 2rem; font-weight: 800; text-align: center; }
.metric-big small { font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.metric-actions { display: flex; gap: 0.6rem; margin-top: 1.4rem; }
.metric-actions .btn { flex: 1; }
.metric-textarea { width: 100%; font-size: 1rem; padding: 0.7rem; margin: 0; resize: vertical; line-height: 1.5; }

/* Notiz-Karte */
.note-card { display: flex; align-items: center; gap: 0.8rem; width: 100%; text-align: left;
    padding: 0.9rem 1.1rem; margin-bottom: 1.2rem; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; font: inherit; color: var(--ink); }
.note-card:hover { border-color: var(--primary); }
.note-ic { width: 38px; height: 38px; border-radius: 10px; flex: none; background: var(--primary-soft);
    color: var(--primary-dark); display: flex; align-items: center; justify-content: center; }
.note-ic svg { width: 20px; height: 20px; }
.note-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-text.is-empty { color: var(--muted); }
.dt-ic { font-size: 1.3rem; }
.dt-val { font-size: 1.25rem; font-weight: 800; }
.dt-val small { font-size: 0.7rem; color: var(--muted); font-weight: 600; margin-left: 0.15rem; }
.dt-lbl { font-size: 0.7rem; color: var(--muted); }
@media (max-width: 560px) { .day-tiles { grid-template-columns: repeat(2, 1fr); } }

.cal-card { }
.cal-body { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.cal-body .ring-wrap { flex: none; }
.cal-side { flex: 1; min-width: 180px; }
.cal-row { display: flex; justify-content: space-between; padding: 0.4rem 0; border-bottom: 1px dashed var(--border); }
.cal-k { color: var(--muted); }
.cal-v { font-weight: 700; }
.macro-list { display: flex; gap: 0.5rem; margin-top: 0.9rem; }
.macro { flex: 1; background: var(--bg); border-radius: 12px; padding: 0.6rem 0.4rem; text-align: center; display: flex; flex-direction: column; gap: 0.1rem; }
.macro-lbl { font-size: 0.68rem; color: var(--muted); }
.macro-v { font-size: 1rem; font-weight: 800; }
.cal-note { margin: 0.9rem 0 0; }

.plan-tomorrow { display: flex; align-items: center; gap: 0.9rem; }
.pt-ic { width: 44px; height: 44px; border-radius: 12px; flex: none; background: var(--primary-soft);
    color: var(--primary-dark); display: flex; align-items: center; justify-content: center; }
.pt-ic svg { width: 24px; height: 24px; }
.pt-info { flex: 1; display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.pt-info strong { font-size: 1.02rem; }

.step-list { display: flex; flex-direction: column; gap: 0.8rem; }
.step-card { display: flex; align-items: center; gap: 0.9rem; padding: 1.1rem 1.2rem;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: 0.15s; }
.step-card:hover { text-decoration: none; border-color: var(--primary); transform: translateY(-1px); }
.step-check { width: 38px; height: 38px; border-radius: 50%; flex: none; display: flex;
    align-items: center; justify-content: center; font-weight: 800; font-size: 1.05rem;
    background: var(--bg); color: var(--muted); border: 2px solid var(--border); }
.step-card.done { background: var(--primary-soft); border-color: var(--primary); }
.step-card.done .step-check { background: var(--primary); border-color: var(--primary); color: #fff; }
.step-info { flex: 1; display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.step-info strong { font-size: 1.02rem; }
.step-action { color: var(--primary-dark); font-weight: 700; font-size: 0.9rem; white-space: nowrap; }

/* ---- Dashboard: Begrüßung ---- */
.dash-greeting { margin-bottom: 1.1rem; }
.dash-greeting h1 { margin: 0 0 0.1rem; }

/* ---- Dashboard: Fortschritts-Hero ---- */
.hero-card { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.ring-wrap { flex: 0 0 auto; }
.ring { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--primary-soft); stroke-width: 11; }
.ring-fg { fill: none; stroke: var(--primary); stroke-width: 11; stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease; }
.ring-pct { transform: rotate(90deg); transform-origin: 60px 60px; text-anchor: middle;
    font-size: 22px; font-weight: 800; fill: var(--ink); }
.ring-sub { transform: rotate(90deg); transform-origin: 60px 60px; text-anchor: middle;
    font-size: 10px; fill: var(--muted); }
.hero-stats { flex: 1; min-width: 180px; }
.hero-weight { display: flex; align-items: baseline; gap: 0.3rem; }
.hero-num { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.hero-unit { font-size: 1.1rem; color: var(--muted); font-weight: 600; }
.hero-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.8rem; }
.pill { display: inline-block; padding: 0.3rem 0.7rem; border-radius: 99px;
    background: var(--bg); color: var(--ink); font-size: 0.82rem; font-weight: 600; }
.pill-ok { background: var(--primary-soft); color: var(--primary-dark); }

/* ---- Dashboard: Mini-Kennzahlen ---- */
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin-bottom: 1.2rem; }
.mini { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 0.9rem 0.6rem; text-align: center; display: flex; flex-direction: column; gap: 0.15rem;
    text-decoration: none; color: var(--ink); }
.mini:hover { text-decoration: none; border-color: var(--primary); }
.mini-icon { font-size: 1.25rem; }
.mini-val { font-size: 1.25rem; font-weight: 800; }
.mini-lbl { font-size: 0.72rem; color: var(--muted); }

/* ---- Dashboard: Schnellaktionen ---- */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; margin-bottom: 1.2rem; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
    padding: 0.9rem 0.4rem; background: var(--card); border: 1px solid var(--border);
    border-radius: 14px; color: var(--ink); text-decoration: none; font-size: 0.8rem; font-weight: 600; }
.qa:hover { text-decoration: none; border-color: var(--primary); background: var(--primary-soft); }
.qa-ic { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px;
    border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); font-size: 1.2rem; font-weight: 700; }
.quick-actions.qa-3 { grid-template-columns: repeat(3, 1fr); }
button.qa { cursor: pointer; font: inherit; width: 100%; }
.opt-wrap { flex-wrap: wrap; }

/* ---- Mobile Tab-Leiste ---- */
.bottom-nav { display: none; }
.bn-item, .bn-fab a { -webkit-tap-highlight-color: transparent; }

@media (max-width: 880px) {
    .nav-member { display: none; }
    .bottom-nav {
        display: flex;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
        background: #fff;
        border-top: 1px solid var(--border);
        justify-content: space-around;
        align-items: center;
        padding: 0.35rem 0.3rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -3px 14px rgba(20, 80, 50, 0.07);
    }
    .container { padding-bottom: 5.5rem; }
}
.bn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: var(--muted); font-size: 0.68rem; text-decoration: none; padding: 0.35rem 0;
}
.bn-item:hover { text-decoration: none; }
.bn-item.active { color: var(--primary); font-weight: 600; }
.bn-item svg { width: 23px; height: 23px; }
.bn-fab { flex: 0 0 auto; }
.bn-fab a {
    display: flex; align-items: center; justify-content: center;
    width: 54px; height: 54px; margin-top: -24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 6px 16px rgba(22, 160, 106, 0.45);
}
.bn-fab a:hover { text-decoration: none; }
.bn-fab svg { width: 28px; height: 28px; }

/* ---- "Mehr"-Liste ---- */
.menu-list { display: flex; flex-direction: column; gap: 0.7rem; }
.menu-row {
    display: flex; align-items: center; gap: 0.9rem;
    padding: 1rem 1.1rem; background: #fff;
    border: 1px solid var(--border); border-radius: 14px;
    color: var(--ink); text-decoration: none;
}
.menu-row:hover { border-color: var(--primary); text-decoration: none; }
.menu-row svg { width: 24px; height: 24px; color: var(--primary); flex: none; }
.menu-row .chev { margin-left: auto; color: var(--muted); font-size: 1.4rem; line-height: 1; }

/* ---- Einladungscode-Panel ---- */
.invite-panel { border-left: 4px solid var(--primary); }
.invite-row { margin-bottom: 1rem; }
.invite-label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; }
.copy-group { display: flex; gap: 0.5rem; align-items: stretch; max-width: 560px; }
.copy-group input { margin-top: 0; font-family: ui-monospace, "Courier New", monospace; background: #faf9fd; }
.copy-group .btn { white-space: nowrap; }

/* ---- Fotos ---- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.photo-card { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.photo-card img { width: 100%; height: 180px; object-fit: cover; display: block; background: #eee; }
.photo-card figcaption { padding: 0.5rem 0.6rem; font-size: 0.85rem; }

/* ---- Mobile ---- */
@media (max-width: 560px) {
    .form-grid { grid-template-columns: 1fr; }
    .stat-value { font-size: 1.3rem; }
    h1 { font-size: 1.35rem; }
}
