/**
 * CellReset50+ - Main Stylesheet
 * © 2025 Jan Zurbel | CellReset50+ | Proprietary
 */

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p { 
    margin-bottom: 1rem; 
    color: #4a5568;
}

a {
    color: #22AA66;
    text-decoration: none;
}

a:hover {
    color: #1a8754;
    text-decoration: underline;
}

small {
    font-size: 0.875rem;
    color: #718096;
}

/* ==========================================================================
   LAYOUT & CONTAINER
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.navbar {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1rem 1rem; /* links/rechts Abstand, damit Header nicht klebt */
    margin-bottom: 2rem;
    display: flex; /* Flex direkt auf Navbar anwenden, da kein .container-Wrapper im Markup */
    justify-content: space-between;
    align-items: center;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #22AA66;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-menu a:hover {
    background-color: #f7fafc;
    color: #22AA66;
}

.nav-menu a.active {
    background-color: #22AA66;
    color: white;
}

.nav-menu a.logout {
    color: #e53e3e;
}

.nav-menu a.logout:hover {
    background-color: #fed7d7;
}

/* Responsive navbar: hamburger under 900px */
.nav-toggle { display: none; border: 1px solid #e2e8f0; background:#fff; padding: .5rem .75rem; border-radius: 8px; cursor:pointer; }
@media (max-width: 900px) {
  .nav-menu { display: none !important; }
  .nav-toggle { display: inline-block !important; margin-left: auto; }
}

/* Mobile overlay menu */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: none; z-index: 1000; }
.mobile-menu { position: absolute; right: 0; top: 0; width: min(84vw, 360px); height: 100%; background: #fff; box-shadow: -4px 0 16px rgba(0,0,0,.15); display:flex; flex-direction:column; }
.mobile-menu-header { display:flex; align-items:center; justify-content:space-between; padding: 1rem; border-bottom:1px solid #e2e8f0; font-weight:700; }
.mobile-close { background: #fff; border:1px solid #e2e8f0; border-radius:8px; padding:.25rem .5rem; cursor:pointer; }
.mobile-menu-items { display:flex; flex-direction:column; padding:.5rem; gap:.25rem; }
.mobile-menu-items a { padding:.75rem 1rem; border-radius:8px; text-decoration:none; color:#2d3748; }
.mobile-menu-items a:hover { background:#f7fafc; color:#22AA66; }

/* ==========================================================================
   CARDS & CONTAINERS
   ========================================================================== */

.card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    color: #2d3748;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn-primary, .btn-secondary, .btn-light, .btn-danger, .btn-warning, .btn-success, .btn-small {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background-color: #22AA66;
    color: white;
}

.btn-primary:hover {
    background-color: #1a8754;
    text-decoration: none;
    color: white;
}

.btn-primary:visited { color: white; }
.btn-primary:focus,
.btn-primary:active { color: white; text-decoration: none; }

.btn-secondary {
    background-color: #718096;
    color: white;
}

.btn-secondary:hover {
    background-color: #4a5568;
}

.btn-light {
    background-color: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.btn-light:hover {
    background-color: #edf2f7;
}

.btn-danger {
    background-color: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background-color: #c53030;
}

.btn-warning {
    background-color: #FF6600;
    color: white;
}

.btn-warning:hover {
    background-color: #e55a00;
}

.btn-success {
    background-color: #38a169;
    color: white;
}

.btn-success:hover {
    background-color: #2f855a;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ==========================================================================
   FORMS
   ========================================================================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2d3748;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

/* Password field with inline eye icon */
.password-field {
    position: relative;
}

.password-field input[type="password"],
.password-field input[type="text"] {
    padding-right: 2.5rem; /* space for eye button */
}

.password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    color: #718096;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #2d3748;
}

.password-toggle:focus {
    outline: none;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #22AA66;
    box-shadow: 0 0 0 3px rgba(34, 170, 102, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.form-help {
    color: #718096;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* ==========================================================================
   MESSAGES
   ========================================================================== */

.success-message, .error-message, .warning-message {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.success-message {
    background-color: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.error-message {
    background-color: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

.warning-message {
    background-color: #fefcbf;
    color: #744210;
    border: 1px solid #f6e05e;
}

/* Risk badges and alert banner (used for BP warnings) */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
}
.badge.win { background: #16a34a; color: #ffffff; }
.badge.time { background: #f59e0b; color: #ffffff; }
.badge.danger { background: #dc2626; color: #ffffff; }

.fasting-banner {
    background: #fff7ed; /* subtle warm tone */
    border: 1px solid #ffedd5;
    border-left: 4px solid #f59e0b; /* default accent matches caution */
    border-radius: 6px;
    padding: 0.75rem 1rem;
}

/* ==========================================================================
   LOGIN
   ========================================================================== */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-card h1 {
    text-align: center;
    color: #22AA66;
    margin-bottom: 0.5rem;
}

.login-card p {
    text-align: center;
    color: #718096;
    margin-bottom: 2rem;
}

/* ==========================================================================
   DASHBOARD
   ========================================================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.fast-status {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.fast-time {
    font-size: 1.25rem;
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

.fast-countdown {
    font-size: 1rem;
    opacity: 0.9;
}

.phase-status {
    background: linear-gradient(135deg, #22AA66 0%, #38a169 100%);
    color: white;
}

.phase-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.phase-detox { background-color: #ff6b6b; color: white; }
.phase-reset { background-color: #4ecdc4; color: white; }
.phase-build { background-color: #45b7d1; color: white; }

.phase-description {
    font-size: 0.875rem;
    opacity: 0.9;
}

.daily-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.daily-summary span {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
}

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quick-link {
    display: block;
    padding: 0.75rem;
    background: #f7fafc;
    border-radius: 6px;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.2s;
}

.quick-link:hover {
    background: #edf2f7;
    transform: translateX(5px);
}

.stat-row {
    display: flex;
    justify-content: space-between;
}

.welcome-card {
    text-align: center;
    padding: 3rem 2rem;
}

/* ==========================================================================
   PROFILE
   ========================================================================== */

.profile-container {
    max-width: 1000px;
    margin: 0 auto;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
}

.profile-card, .calculation-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.calculation-grid {
    display: grid;
    gap: 1rem;
}

.calc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f7fafc;
    border-radius: 6px;
}

.calc-label {
    font-weight: 500;
    color: #4a5568;
}

.calc-value {
    font-weight: bold;
    color: #22AA66;
}

.calc-separator {
    height: 1px;
    background: #e2e8f0;
    margin: 0.5rem 0;
}

.recalculate-form {
    margin-top: 1.5rem;
}

/* ==========================================================================
   PLAN
   ========================================================================== */

.plan-container {
    max-width: 1200px;
    margin: 0 auto;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.view-tabs {
    display: flex;
    gap: 0.5rem;
}

.tab-link {
    padding: 0.75rem 1.5rem;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.tab-link:hover {
    background: #edf2f7;
}

.tab-link.active {
    background: #22AA66;
    color: white;
    border-color: #22AA66;
}

.date-navigation, .week-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.nav-btn {
    padding: 0.5rem 1rem;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: #edf2f7;
}

.today-link, .current-week-link {
    text-align: center;
    margin-bottom: 1.5rem;
}

.no-plan-card {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.generate-form {
    margin-top: 1.5rem;
}

.week-generator {
    text-align: center;
    margin-bottom: 2rem;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.day-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.day-summary {
    margin-bottom: 1rem;
}

.kcal-info {
    display: inline-block;
    background: #22AA66;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    font-weight: bold;
}

.liver-day-badge {
    display: inline-block;
    background: #FF6600;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

.meals-preview {
    margin-top: 0.5rem;
}

.meal-preview {
    font-size: 0.875rem;
    color: #4a5568;
    margin-bottom: 0.25rem;
}

.meal-more {
    font-size: 0.8rem;
    color: #718096;
    font-style: italic;
}

.no-plan {
    color: #718096;
    font-style: italic;
    margin-bottom: 1rem;
}

.daily-plan-details {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.plan-info {
    margin-bottom: 2rem;
}

.plan-summary {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.total-kcal {
    background: #22AA66;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
}

.fasting-info, .macros-info, .meals-section {
    margin-bottom: 2rem;
}

.macro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.macro-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f7fafc;
    border-radius: 6px;
}

.macro-label {
    font-weight: 500;
    color: #4a5568;
}

.macro-value {
    font-weight: bold;
    color: #22AA66;
}

.meal-card {
    background: #f7fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.meal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.meal-kcal {
    background: #22AA66;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    font-weight: bold;
}

.meal-macros {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.meal-macros span {
    background: #edf2f7;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.meal-ingredients, .meal-steps {
    margin-bottom: 1rem;
}

.meal-ingredients strong, .meal-steps strong {
    color: #2d3748;
}

.supplements-info {
    background: #fff5e6;
    border: 1px solid #fbd38d;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.week-summary {
    background: #f7fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    border: 1px solid #e2e8f0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    min-height: 88px;
}

.week-summary .summary-item:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}

.summary-label {
    font-weight: 500;
    color: #4a5568;
}

.summary-value {
    font-weight: bold;
    color: #22AA66;
}

.plan-actions {
    text-align: center;
    margin-top: 2rem;
}

/* ==========================================================================
   RECIPES
   ========================================================================== */

.recipes-container {
    max-width: 1200px;
    margin: 0 auto;
}

.recipes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.recipes-filter {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    margin-bottom: 0.5rem;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.recipe-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.recipe-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.recipe-card.inactive {
    opacity: 0.6;
}

.recipe-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.recipe-header h3 {
    margin: 0;
}

.recipe-header h3 a {
    color: #2d3748;
    text-decoration: none;
}

.recipe-header h3 a:hover {
    color: #22AA66;
}

.recipe-nutrition {
    margin-bottom: 1rem;
}

.macros-info {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.macros-info span {
    background: #edf2f7;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.recipe-tags {
    margin-bottom: 1rem;
}

.tag {
    display: inline-block;
    background: #e2e8f0;
    color: #4a5568;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

.recipe-badges {
    margin-bottom: 1rem;
}

.liver-badge {
    background: #FF6600;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    font-weight: bold;
}

.recipe-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: #718096;
}

/* Recipe Form */
.recipe-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.recipe-edit-form {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.ingredient-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* Recipe Detail */
.recipe-detail {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.recipe-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.recipe-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.inactive-badge {
    background: #e53e3e;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    font-weight: bold;
}

.nutrition-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.nutrition-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f7fafc;
    border-radius: 6px;
}

.nutrition-label {
    font-weight: 500;
    color: #4a5568;
}

.nutrition-value {
    font-weight: bold;
    color: #22AA66;
}

.ingredients-list {
    list-style: none;
    padding: 0;
}

.ingredients-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f7fafc;
}

.ingredients-list li:last-child {
    border-bottom: none;
}

.steps-content {
    line-height: 1.8;
    color: #4a5568;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ==========================================================================
   JOURNEY
   ========================================================================== */

.journey-container {
    max-width: 1200px;
    margin: 0 auto;
}

.journey-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.journey-form-container {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.journey-form {
    max-width: 600px;
    margin: 0 auto;
}

.weight-group, .energy-group, .sleep-group, .notes-group {
    margin-bottom: 2rem;
}

.input-with-unit {
    position: relative;
}

.unit {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
    font-weight: 500;
}

.energy-scale {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.energy-option {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.energy-option input[type="radio"] {
    width: auto;
    margin-bottom: 0.25rem;
}

.energy-label {
    font-size: 0.875rem;
    font-weight: bold;
    color: #4a5568;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s;
}

.energy-option input[type="radio"]:checked + .energy-label {
    background: #22AA66;
    color: white;
}

.energy-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #718096;
}

.daily-insights {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.insights-list {
    list-style: none;
    padding: 0;
}

.insights-list li {
    padding: 0.5rem 0;
}

.period-filter {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 2rem;
}

.period-btn {
    padding: 0.5rem 1rem;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.period-btn:hover {
    background: #edf2f7;
}

.period-btn.active {
    background: #22AA66;
    color: white;
    border-color: #22AA66;
}

.overview-summary {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.summary-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem 1.25rem 1rem;
    text-align: center;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform .15s ease, box-shadow .15s ease;
}

.summary-card h4 {
    margin-bottom: 0.25rem;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.95rem;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #22AA66;
    display: block;
    margin-bottom: 0.25rem;
}

.summary-value.positive {
    color: #38a169;
}

.summary-value.negative {
    color: #e53e3e;
}

.summary-value.neutral {
    color: #718096;
}

.summary-label {
    font-size: 0.875rem;
    color: #718096;
}

/* Hover feedback nur im Wochenbereich */
.week-summary .summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}

/* Feinjustierung für Zahlen mit Einheit (z.B. 1485 kcal) */
.summary-value .unit {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    margin-left: 4px;
}

/* Wenn die Makros als Text in einer Zeile kommen, bessere Lesbarkeit erzwingen */
.week-summary .summary-card p {
    margin: 0.15rem 0;
}

/* Erklärende Hilfetexte in Week-Summary */
.week-summary .summary-help {
    display: block;
    margin-top: 0.35rem;
    color: #718096;
    font-size: 0.85rem;
}

/* Makro-Zeilenblock konsistent halten */
.week-summary .macro-lines p strong {
    color: #2d3748;
}

/* Makro-Prozentbalken */
.week-summary .macro-bar {
    width: 100%;
    height: 8px;
    background: #edf2f7;
    border-radius: 999px;
    overflow: hidden;
    margin: 0.25rem 0 0.6rem;
}
.week-summary .macro-bar .bar {
    height: 100%;
    width: 0;
    transition: width 0.5s ease;
}
.week-summary .macro-bar .bar-protein { background: #10b981; }
.week-summary .macro-bar .bar-carbs { background: #34d399; }
.week-summary .macro-bar .bar-fat { background: #059669; }

/* Responsive: auf sehr schmalen Screens etwas kompakter */
@media (max-width: 420px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
  .summary-card {
    min-height: 120px;
    padding: 1rem;
  }
  .summary-value { font-size: 1.5rem; }
}

.entries-table-container {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.entries-table {
    width: 100%;
    border-collapse: collapse;
}

.entries-table th,
.entries-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.entries-table th {
    background: #f7fafc;
    font-weight: 600;
    color: #2d3748;
}

.notes-cell {
    max-width: 200px;
}

.progress-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.progress-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.progress-stats {
    display: grid;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f7fafc;
    border-radius: 6px;
}

.stat-label {
    font-weight: 500;
    color: #4a5568;
}

.stat-value {
    font-weight: bold;
}

.stat-value.positive {
    color: #38a169;
}

.stat-value.negative {
    color: #e53e3e;
}

.stat-value.neutral {
    color: #718096;
}

.best-weeks {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.weeks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.week-card {
    background: #f7fafc;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.week-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.week-stat {
    font-size: 0.875rem;
    color: #4a5568;
}

.motivation-tips {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.motivation-text p {
    margin-bottom: 1rem;
}

.motivation-text p:last-child {
    margin-bottom: 0;
}

.no-data, .insufficient-data {
    text-align: center;
    padding: 3rem 2rem;
    color: #718096;
}

/* ==========================================================================
   VISUAL & CHARTS
   ========================================================================== */

.visual-container {
    max-width: 1200px;
    margin: 0 auto;
}

.visual-header {
    margin-bottom: 2rem;
}

.chart-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.chart-nav-item {
    padding: 0.75rem 1.5rem;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.chart-nav-item:hover {
    background: #edf2f7;
}

.chart-nav-item.active {
    background: #22AA66;
    color: white;
    border-color: #22AA66;
}

.chart-container {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.chart-wrapper {
    margin-bottom: 2rem;
}

.chart-wrapper h3 {
    margin-bottom: 1rem;
    text-align: center;
}

.timeline-wrapper {
    text-align: center;
}

.phase-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.phase-stat-card {
    border-radius: 8px;
    padding: 1.5rem;
    color: white;
    text-align: center;
}

.phase-stat-card h4 {
    margin-bottom: 0.5rem;
}

.phase-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.chart-insights {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.insights-container h4 {
    margin-bottom: 1rem;
    color: #22543d;
}

.print-actions {
    text-align: center;
}

/* ==========================================================================
   EXPORT
   ========================================================================== */

.export-container {
    max-width: 1200px;
    margin: 0 auto;
}

.export-header {
    margin-bottom: 2rem;
}

.export-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.export-nav-item {
    padding: 0.75rem 1.5rem;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.export-nav-item:hover {
    background: #edf2f7;
}

.export-nav-item.active {
    background: #22AA66;
    color: white;
    border-color: #22AA66;
}

.shopping-list-export, .meal-plan-export, .journey-export {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.export-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.shopping-list-content {
    margin-top: 2rem;
}

.shopping-category {
    margin-bottom: 2rem;
}

.shopping-category h4 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #22AA66;
    color: #22AA66;
}

.shopping-items {
    display: grid;
    gap: 0.5rem;
}

.shopping-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f7fafc;
    border-radius: 6px;
    transition: all 0.2s;
}

.shopping-item:hover {
    background: #edf2f7;
}

.shopping-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.shopping-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    cursor: pointer;
    flex: 1;
}

.item-quantity {
    font-weight: bold;
    color: #22AA66;
    min-width: 80px;
}

.item-name {
    color: #2d3748;
}

.shopping-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.meal-plan-week {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.meal-plan-day {
    background: #f7fafc;
    border-radius: 8px;
    padding: 1.5rem;
}

.meal-plan-day h4 {
    margin-bottom: 1rem;
    color: #2d3748;
}

.day-summary {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.macros {
    font-size: 0.875rem;
    color: #4a5568;
}

.day-meals {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
}

.meal-item h5 {
    margin: 0;
    color: #2d3748;
}

.journey-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.journey-table th,
.journey-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.journey-table th {
    background: #f7fafc;
    font-weight: 600;
    color: #2d3748;
}

.export-header-print {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #22AA66;
}

.export-header-print h3 {
    color: #22AA66;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .profile-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .date-navigation,
    .week-navigation {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .week-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-form {
        grid-template-columns: 1fr;
    }
    
    .recipe-actions {
        justify-content: center;
    }
    
    .energy-scale {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .progress-cards {
        grid-template-columns: 1fr;
    }
    
    .chart-nav,
    .export-nav {
        justify-content: center;
    }
    
    .export-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .meal-plan-week {
        grid-template-columns: 1fr;
    }
    
    .shopping-item label {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .login-card {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .ingredient-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .macro-grid {
        grid-template-columns: 1fr;
    }
    
    .nutrition-grid,
    .nutrition-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   HELP / TOOLTIP STYLES
   ========================================================================== */

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 0.4rem;
    border-radius: 50%;
    border: 1px solid #CBD5E0; /* gray-300 */
    background: #F7FAFC; /* gray-50 */
    color: #2D3748; /* gray-700 */
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    padding: 0;
}

.help-icon:hover {
    background: #EDF2F7; /* gray-100 */
}

.help-tooltip {
    position: absolute;
    max-width: 320px;
    background: #1A202C; /* gray-900 */
    color: #fff;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    z-index: 1000;
    font-size: 0.85rem;
}

.help-tooltip::after {
    content: '';
    position: absolute;
    left: 12px;
    bottom: -6px;
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: #1A202C transparent transparent transparent;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: white;
    }
    
    .no-print {
        display: none !important;
    }
    
    .navbar,
    .export-actions,
    .form-actions,
    .recipe-actions,
    .plan-actions,
    .shopping-actions,
    .print-actions {
        display: none !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }
    
    .card,
    .shopping-list-export,
    .meal-plan-export,
    .journey-export {
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 20pt;
        page-break-inside: avoid;
    }
    
    .page-break {
        page-break-before: always;
    }
    
    .meal-plan-day {
        page-break-inside: avoid;
        margin-bottom: 15pt;
    }
    
    .shopping-category {
        page-break-inside: avoid;
    }
    
    .recipe-card,
    .day-card {
        page-break-inside: avoid;
    }
    
    table {
        width: 100%;
        border-collapse: collapse;
    }
    
    table th,
    table td {
        border: 1px solid #ddd;
        padding: 8pt;
    }
    
    table th {
        background: #f5f5f5;
        font-weight: bold;
    }
    
    .entries-table,
    .journey-table {
        font-size: 10pt;
    }
    
    .shopping-item {
        border: 1px solid #ddd;
        margin-bottom: 2pt;
        padding: 5pt;
    }
    
    .shopping-item input[type="checkbox"] {
        -webkit-appearance: checkbox;
        appearance: checkbox;
    }
    
    .kcal-info,
    .liver-day-badge,
    .phase-badge {
        border: 1px solid #333;
        color: #000 !important;
        background: transparent !important;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-light,
    .tab-link.active,
    .period-btn.active {
        color: #000 !important;
        background: transparent !important;
        border: 1px solid #333 !important;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    /* Ensure proper page margins */
    @page {
        margin: 15mm;
        size: A4;
    }
    
    /* Typography for print */
    h1 { font-size: 18pt; }
    h2 { font-size: 16pt; }
    h3 { font-size: 14pt; }
    h4 { font-size: 12pt; }
    h5 { font-size: 11pt; }
    h6 { font-size: 10pt; }
    
    p, li {
        font-size: 10pt;
    }
    
    .meal-plan-week {
        display: block;
    }
    
    .meal-plan-day {
        display: block;
        width: 100%;
        margin-bottom: 15pt;
        padding: 10pt;
    }
    
    .weeks-grid,
    .progress-cards,
    .dashboard-grid {
        display: block;
    }
    
    .week-card,
    .progress-card,
    .card {
        display: block;
        width: 100%;
        margin-bottom: 10pt;
    }
}