/* =============================================================================
   CSS VARIABLEN - ÜBERARBEITET FÜR GESÜNDERE BEWERTUNG
   ============================================================================= */
:root {
    /* Primärfarben */
    --primary-color: #4a90e2;
    --primary-dark: #3a80d2;
    --primary-light: #74a9e8;
    --primary-bg: #e6f2ff;
    
    /* NEUE Bewertungskategorien für gesündere Einschätzung */
    --too-low-color: #e67e22;           /* Orange für 0-75% (Zu wenig) */
    --too-low-light: #f39c12;
    --too-low-bg: #fdeaa7;
    --too-low-text: #b7711a;
    
    --excellent-color: #27ae60;         /* Dunkelgrün für 75-85% (Sehr gut) */
    --excellent-light: #2ecc71;
    --excellent-bg: #d5f4e6;
    --excellent-text: #0e4b26;
    
    --good-color: #52c785;              /* Hellgrün für 85-95% (Gut) */
    --good-light: #68d391;
    --good-bg: #e0f7e9;
    --good-text: #1a5a32;
    
    --warning-color: #f39c12;           /* Orange für 95-99.9% (Nah am Limit) */
    --warning-light: #f8c471;
    --warning-bg: #fff3cd;
    --warning-text: #856404;
    
    --over-color: #e74c3c;              /* Rot für 100%+ (Über Ziel) */
    --over-light: #ec7063;
    --over-bg: #f8d7da;
    --over-text: #721c24;
    
    /* Graustufen */
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    /* Spezielle Farben */
    --superadmin-color: #8e44ad;
}

/* =============================================================================
   GRUNDLEGENDE STYLES
   ============================================================================= */
body { 
    font-family: Arial, sans-serif; 
    max-width: 800px; 
    margin: 0 auto; 
    padding: 20px; 
    background-color: #f5f5f5;
}

.container { 
    background: #f7f7f7; 
    border-radius: 10px; 
    padding: 20px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
}

.footer {
    background: #f7f7f7; 
    border-radius: 10px;
	padding: 20px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-top: 20px;
    text-align: center;
    font-size: 0.9em;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--primary-color);
    margin-top: 2rem;
    font-size: 0.9rem;
}

.einleitung h3 {
	font-size: 1.6em;
}

.einleitung p {
	font-size: 1.1em;
}

.for-after {
	max-width: 100%;
	width: auto;
    height: auto;
	margin: 2em auto;
	display: block;
    overflow: hidden;
    box-sizing: border-box;
}

.video {
	max-width: 100%;
	width: 640px;
    height: auto;
	margin: 2em auto;
	display: block;
    overflow: hidden;
    box-sizing: border-box;
}

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

h1, h2, h3 { 
    color: #333; 
}


/* =============================================================================
   LOGO STYLES
   ============================================================================= */
.logo-container {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.main-logo {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 120px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
    box-sizing: border-box;
}

/* =============================================================================
   HEADER UND NAVIGATION - NEUE STRUKTUR
   ============================================================================= */

/* Haupttitel über allem */
.main-title {
    text-align: center;
    margin: 0 0 25px 0;
    color: #333;
    font-size: 2.2em;
    font-weight: bold;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

/* User-Header (rechtsbündig) */
.user-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
}

.admin-avatar {
    background-color: #b83b3b;
}

.user-name {
    font-weight: bold;
    margin-right: 15px;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    margin-left: 15px;
}

.nav-links a:hover {
    text-decoration: underline;
}

/* =============================================================================
   BUTTONS
   ============================================================================= */
button, .btn { 
    background: var(--primary-color); 
    color: white; 
    border: none; 
    padding: 10px 15px; 
    border-radius: 4px; 
    cursor: pointer; 
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

button:hover, .btn:hover { 
    background: var(--primary-dark); 
    text-decoration: none;
    color: white;
}

.btn-secondary {
    background: var(--gray-600);
}

.btn-secondary:hover {
    background: #5a6268;
}

.nav-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-button:hover {
    background: var(--primary-dark);
}

.today-button {
    flex: 0 0 auto;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9em;
    white-space: nowrap;
}

/* =============================================================================
   FORMULAR-STYLES
   ============================================================================= */
.input-form { 
    margin-top: 30px; 
    background: white; 
    padding: 15px; 
    border-radius: 8px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
}

.form-row { 
    display: flex; 
    margin-bottom: 15px; 
    align-items: center; 
}

.form-row label { 
    width: 120px; 
}

.form-row input, 
.form-row select { 
    flex: 1; 
    padding: 8px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
}

/* =============================================================================
   BADGES
   ============================================================================= */
.admin-badge {
    background-color: #b83b3b;
    color: white;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
    vertical-align: middle;
}

.superadmin-badge {
    background-color: var(--superadmin-color);
    color: white;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
    vertical-align: middle;
}

/* =============================================================================
   WOCHEN-NAVIGATION
   ============================================================================= */
.week-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.week-title {
    font-size: 1.2em;
    font-weight: bold;
    flex: 2;
    text-align: center;
}

.week-dropdown {
    flex: 2;
    margin: 0 10px;
}

.week-dropdown select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.date-selector {
    display: flex;
    width: 100%;
    gap: 10px;
    align-items: center;
}

.year-select {
    flex: 0 0 80px;
}

.week-select {
    flex: 1;
}

/* =============================================================================
   MONATS-NAVIGATION
   ============================================================================= */
.month-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.month-title {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--gray-800);
}

.month-nav-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.month-nav-buttons select {
    padding: 8px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    background: white;
}

/* =============================================================================
   KALENDER
   ============================================================================= */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: var(--gray-300);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.calendar-header {
    background: var(--primary-color);
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9em;
}

.calendar-day {
    background: white;
    min-height: 60px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.calendar-day:hover {
    background: var(--gray-100);
    transform: scale(1.02);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.calendar-day.other-month {
    background: var(--gray-100);
    color: var(--gray-400);
    cursor: default;
}

.calendar-day.other-month:hover {
    transform: none;
    box-shadow: none;
}

.calendar-day.today {
    border: 2px solid var(--primary-color);
    background: var(--primary-bg);
}

.day-number {
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
}

.day-percentage {
    font-size: 0.8em;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 10px;
    min-width: 35px;
    text-align: center;
    border: 1px solid transparent;
}

/* =============================================================================
   BEWERTUNGS-KLASSEN FÜR KALENDER - ERWEITERT UM NEUE KATEGORIE
   ============================================================================= */
.day-too-low .day-percentage {
    background: var(--too-low-bg) !important;
    color: var(--too-low-text) !important;
    border: 1px solid var(--too-low-color) !important;
}

.day-excellent .day-percentage,
.day-green .day-percentage {
    background: var(--excellent-bg) !important;
    color: var(--excellent-text) !important;
    border: 1px solid var(--excellent-color) !important;
}

.day-good .day-percentage {
    background: var(--good-bg) !important;
    color: var(--good-text) !important;
    border: 1px solid var(--good-color) !important;
}

.day-warning .day-percentage,
.day-orange .day-percentage {
    background: var(--warning-bg) !important;
    color: var(--warning-text) !important;
    border: 1px solid var(--warning-color) !important;
}

.day-over .day-percentage,
.day-red .day-percentage {
    background: var(--over-bg) !important;
    color: var(--over-text) !important;
    border: 1px solid var(--over-color) !important;
}

.day-no-data .day-percentage {
    background: var(--gray-200) !important;
    color: var(--gray-600) !important;
}

/* =============================================================================
   LEGENDE - ERWEITERT UM NEUE KATEGORIE
   ============================================================================= */
.month-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
    padding: 15px;
    background: var(--gray-100);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    font-weight: 500;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.legend-color.too-low {
    background: var(--too-low-bg);
    border-color: var(--too-low-color);
}

.legend-color.excellent {
    background: var(--excellent-bg);
    border-color: var(--excellent-color);
}

.legend-color.good {
    background: var(--good-bg);
    border-color: var(--good-color);
}

.legend-color.warning {
    background: var(--warning-bg);
    border-color: var(--warning-color);
}

.legend-color.over {
    background: var(--over-bg);
    border-color: var(--over-color);
}

.legend-color.no-data {
    background: var(--gray-200);
    border-color: var(--gray-400);
}

/* =============================================================================
   STATISTIKEN
   ============================================================================= */
.month-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.month-stat {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.month-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.month-stat-value {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
    margin-bottom: 5px;
}

.month-stat-label {
    font-size: 0.85em;
    color: var(--gray-600);
    margin-top: 5px;
}

/* =============================================================================
   WOCHENVERGLEICH
   ============================================================================= */
.week-bars-container {
    margin: 20px 0;
}

.week-bar-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.week-bar-item:hover {
    background: var(--gray-100);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.week-bar-label {
    width: 120px;
    font-weight: 500;
    color: var(--gray-800);
    font-size: 0.9em;
}

.week-bar-visual {
    flex: 1;
    height: 30px;
    background: var(--gray-200);
    border-radius: 15px;
    position: relative;
    margin: 0 15px;
    overflow: hidden;
}

.week-bar-fill {
    height: 100%;
    border-radius: 15px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.week-bar-fill.too-low {
    background: linear-gradient(90deg, var(--too-low-color), var(--too-low-light));
}

.week-bar-fill.excellent {
    background: linear-gradient(90deg, var(--excellent-color), var(--excellent-light));
}

.week-bar-fill.good {
    background: linear-gradient(90deg, var(--good-color), var(--good-light));
}

.week-bar-fill.warning {
    background: linear-gradient(90deg, var(--warning-color), var(--warning-light));
}

.week-bar-fill.over-goal {
    background: linear-gradient(90deg, var(--over-color), var(--over-light));
}

.week-bar-info {
    width: 150px;
    text-align: right;
    font-size: 0.9em;
}

.week-bar-calories {
    font-weight: bold;
    color: var(--gray-800);
}

.week-bar-percentage {
    color: var(--gray-600);
    font-size: 0.8em;
}

/* =============================================================================
   COMPARISON KOMPONENTEN
   ============================================================================= */
.week-comparison-container {
    background: white;
    border-radius: 0 0 8px 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.comparison-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.comparison-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comparison-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.comparison-stat {
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    text-align: center;
    min-width: 100px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.comparison-stat-value {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
}

.comparison-stat-label {
    font-size: 0.8em;
    color: var(--gray-600);
    margin-top: 2px;
}

/* =============================================================================
   DASHBOARD KOMPONENTEN
   ============================================================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.dashboard-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.dashboard-card.too-low {
    border-left: 4px solid var(--too-low-color);
    background: linear-gradient(135deg, var(--too-low-color), var(--too-low-light));
    color: white;
}

.dashboard-card.excellent {
    border-left: 4px solid var(--excellent-color);
    background: linear-gradient(135deg, var(--excellent-color), var(--excellent-light));
    color: white;
}

.dashboard-card.good {
    border-left: 4px solid var(--good-color);
    background: linear-gradient(135deg, var(--good-color), var(--good-light));
    color: white;
}

.dashboard-card.warning {
    border-left: 4px solid var(--warning-color);
    background: linear-gradient(135deg, var(--warning-color), var(--warning-light));
    color: white;
}

.dashboard-card.over {
    border-left: 4px solid var(--over-color);
    background: linear-gradient(135deg, var(--over-color), var(--over-light));
    color: white;
}

.stat-big {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0;
    text-align: center;
}

.stat-big.too-low { color: var(--too-low-color); }
.stat-big.excellent { color: var(--excellent-color); }
.stat-big.good { color: var(--good-color); }
.stat-big.warning { color: var(--warning-color); }
.stat-big.over { color: var(--over-color); }

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.action-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    text-decoration: none;
    color: white;
}

.action-card h4 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
}

.action-card p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9em;
}

/* Recent Activity */
.recent-activity {
    max-height: 200px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-date {
    color: var(--gray-600);
    font-size: 0.9em;
}

.activity-calories {
    font-weight: bold;
    color: var(--primary-color);
}

/* Recommendations */
.recommendations {
    margin-top: 30px;
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: var(--gray-100);
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s ease;
}

.recommendation-item:hover {
    transform: translateX(5px);
}

.recommendation-item.warning {
    background: var(--warning-bg);
    border-left-color: var(--warning-color);
}

.recommendation-item.tip {
    background: var(--primary-bg);
    border-left-color: var(--primary-color);
}

.recommendation-item.info {
    background: var(--excellent-bg);
    border-left-color: var(--excellent-color);
}

.recommendation-icon {
    font-size: 1.2em;
    margin-top: 2px;
}

.recommendation-content h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 0.95em;
}

.recommendation-content p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.9em;
}

/* Trend Indicators */
.trend-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.trend-indicator.increasing {
    background: var(--over-bg);
    color: var(--over-text);
}

.trend-indicator.decreasing {
    background: var(--excellent-bg);
    color: var(--excellent-text);
}

.trend-indicator.stable {
    background: var(--good-bg);
    color: var(--good-text);
}

/* =============================================================================
   TABELLEN
   ============================================================================= */
.kalorien-tabelle { 
    width: 100%; 
    margin: 20px 0 30px 0; 
    border-collapse: collapse; 
    background: white; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.kalorien-tabelle th, 
.kalorien-tabelle td { 
    padding: 12px 15px; 
    text-align: center; 
    border-bottom: 1px solid #eee;
}

.kalorien-tabelle th {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.kalorien-tabelle tr:last-child td {
    border-bottom: none;
}

.kalorien-tabelle tr:nth-child(even) {
    background-color: #f9f9f9;
}

.kalorien-tabelle .total-row {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    border-top: 2px solid var(--primary-dark);
}

.kalorien-tabelle .total-row .positiv {
    color: #ff9999;
}

.kalorien-tabelle .total-row .negativ {
    color: #99ffcc;
}

.positiv { 
    color: #d9534f; 
}

.negativ { 
    color: #5cb85c; 
}

/* Mobile Tabellen-Anpassungen */
.mobile-header-row, .mobile-view {
    display: none;
}

/* =============================================================================
   ZUSÄTZLICHE KOMPONENTEN
   ============================================================================= */
.week-selector { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 20px; 
}

.week-day { 
    text-align: center; 
    cursor: pointer; 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: #e0f0ff; 
}

.week-day.active { 
    background: #ff4040; 
    color: white; 
}

.chart-container { 
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: 400px; /* 200% der ursprünglichen Höhe für Desktop */
    overflow: hidden;
}

.chart-title {
    text-align: center;
    margin-bottom: 15px;
    color: var(--gray-800);
    font-weight: 500;
    font-size: 1.1em;
}

.summary { 
    display: flex; 
    justify-content: space-between; 
    margin-top: 20px; 
}

.summary-box { 
    background: white; 
    border-radius: 8px; 
    padding: 15px; 
    text-align: center; 
    flex: 1; 
    margin: 0 10px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
}

.summary-value { 
    font-size: 1.5em; 
    font-weight: bold; 
    margin-bottom: 5px; 
}

.summary-label { 
    color: #777; 
    font-size: 0.9em; 
}

/* =============================================================================
   PROGRESS BARS UND TOOLTIPS
   ============================================================================= */
.progress-bar {
    width: 100%;
    height: 20px;
    background: var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transition: width 0.8s ease;
    border-radius: 10px;
}

.progress-fill.too-low { 
    background: linear-gradient(90deg, var(--too-low-color), var(--too-low-light)); 
}

.progress-fill.excellent { 
    background: linear-gradient(90deg, var(--excellent-color), var(--excellent-light)); 
}

.progress-fill.good { 
    background: linear-gradient(90deg, var(--good-color), var(--good-light)); 
}

.progress-fill.warning { 
    background: linear-gradient(90deg, var(--warning-color), var(--warning-light)); 
}

.progress-fill.over { 
    background: linear-gradient(90deg, var(--over-color), var(--over-light)); 
}

.data-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8em;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    max-width: 200px;
    word-wrap: break-word;
}

.data-tooltip.show {
    opacity: 1;
}

/* =============================================================================
   PERFORMANCE LABELS
   ============================================================================= */
.performance-label {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    text-align: center;
    min-width: 80px;
}

.performance-label.too-low {
    background: var(--too-low-bg);
    color: var(--too-low-text);
    border: 1px solid var(--too-low-color);
}

.performance-label.excellent {
    background: var(--excellent-bg);
    color: var(--excellent-text);
    border: 1px solid var(--excellent-color);
}

.performance-label.good {
    background: var(--good-bg);
    color: var(--good-text);
    border: 1px solid var(--good-color);
}

.performance-label.warning {
    background: var(--warning-bg);
    color: var(--warning-text);
    border: 1px solid var(--warning-color);
}

.performance-label.over {
    background: var(--over-bg);
    color: var(--over-text);
    border: 1px solid var(--over-color);
}

/* =============================================================================
   PERFORMANCE LABELS IN TOTAL ROW - ERGÄNZUNG FÜR FARBKORREKTUR
   ============================================================================= */

/* Spezifische Regeln für Performance-Labels in der blauen total-row */
.total-row .performance-label.total-row-label.too-low {
    background: var(--too-low-color) !important;
    border-color: var(--too-low-light) !important;
    color: white !important;
}

.total-row .performance-label.total-row-label.excellent {
    background: var(--excellent-color) !important;
    border-color: var(--excellent-light) !important;
    color: white !important;
}

.total-row .performance-label.total-row-label.good {
    background: var(--good-color) !important;
    border-color: var(--good-light) !important;
    color: white !important;
}

.total-row .performance-label.total-row-label.warning {
    background: var(--warning-color) !important;
    border-color: var(--warning-light) !important;
    color: white !important;
}

.total-row .performance-label.total-row-label.over {
    background: var(--over-color) !important;
    border-color: var(--over-light) !important;
    color: white !important;
}

/* =============================================================================
   MINI STATS
   ============================================================================= */
.mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.mini-stat {
    text-align: center;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
}

.mini-stat-value {
    font-size: 1.3em;
    font-weight: bold;
    color: white;
    display: block;
}

.mini-stat-label {
    font-size: 0.8em;
    color: rgba(255,255,255,0.8);
    margin-top: 2px;
}

/* Mini-Stats in weißen Dashboard-Cards (ohne farbigen Hintergrund) */
.dashboard-card:not(.too-low):not(.excellent):not(.good):not(.warning):not(.over) .mini-stat {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
}

.dashboard-card:not(.too-low):not(.excellent):not(.good):not(.warning):not(.over) .mini-stat-value {
    color: var(--primary-color);
}

.dashboard-card:not(.too-low):not(.excellent):not(.good):not(.warning):not(.over) .mini-stat-label {
    color: var(--gray-600);
}

/* =============================================================================
   VIEW CONTAINER
   ============================================================================= */
.month-view-container {
    background: white;
    border-radius: 0 0 8px 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* =============================================================================
   AUTHENTIFIZIERUNG
   ============================================================================= */
.auth-form {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 20px;
}

.auth-form .form-row {
    flex-direction: column;
    align-items: flex-start;
}

.auth-form .form-row label {
    width: 100%;
    margin-bottom: 5px;
}

.auth-form .form-row input {
    width: 100%;
}

.forgot-password {
    margin-top: 5px;
    font-size: 0.9em;
}

.forgot-password a {
    color: var(--primary-color);
    text-decoration: none;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.auth-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.auth-message {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}

.auth-info {
    text-align: center;
    margin-bottom: 15px;
    color: #555;
    font-size: 0.9em;
}

.error {
    background-color: var(--over-bg);
    border: 1px solid var(--over-color);
    color: var(--over-text);
}

.success {
    background-color: var(--excellent-bg);
    border: 1px solid var(--excellent-color);
    color: var(--excellent-text);
}

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

/* Tablet und kleine Desktops */
@media (max-width: 768px) {
    /* Chart-Container Anpassung für Tablets */
    .chart-container {
        height: 400px; /* Gleiche Höhe wie Desktop */
    }
    
    /* Logo Anpassungen */
    .main-logo {
        max-width: 100%;
        max-height: auto;
    }
    
    .logo-container {
        margin-bottom: 15px;
    }
    
    /* Header Anpassungen */
    .main-title {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    
    .user-header {
        justify-content: center;
        text-align: center;
    }
    
    .user-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-links {
        display: flex;
        gap: 10px;
        justify-content: center;
    }
    
    .nav-links a {
        margin: 0;
    }
    
    /* Dashboard Anpassungen */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .summary {
        flex-direction: column;
        gap: 10px;
    }
    
    .summary-box {
        margin: 0;
    }
    
    .month-navigation {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .month-nav-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .month-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .month-legend {
        gap: 10px;
        padding: 10px;
    }
    
    .legend-item {
        font-size: 0.8em;
        gap: 5px;
    }
    
    .legend-color {
        width: 16px;
        height: 16px;
    }
    
    .calendar-day {
        min-height: 50px;
        padding: 4px 2px;
    }
    
    .calendar-header {
        padding: 8px 4px;
        font-size: 0.8em;
    }
    
    .day-number {
        font-size: 0.8em;
    }
    
    .day-percentage {
        font-size: 0.7em;
        padding: 2px 4px;
        min-width: 25px;
    }
    
    .comparison-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .comparison-stats {
        justify-content: space-between;
    }
    
    .comparison-stat {
        flex: 1;
        min-width: 80px;
    }
    
    .week-bar-label {
        width: 80px;
        font-size: 0.8em;
    }
    
    .week-bar-visual {
        margin: 0 10px;
    }
    
    .week-bar-info {
        width: 120px;
        font-size: 0.8em;
    }
}

/* Bildschirme zwischen 400px und 719px */
@media only screen and (min-width: 400px) and (max-width: 719px) {
    .kalorien-tabelle th, 
    .kalorien-tabelle td {
        padding: 10px 8px;
        font-size: 0.9em;
    }
    
    .week-navigation {
        flex-wrap: wrap;
    }
    
    .week-title {
        order: -1;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Smartphones */
@media only screen and (max-width: 480px) {
    /* Chart-Container Anpassung für Smartphones - 150% */
    .chart-container {
        height: 300px; /* 150% der ursprünglichen ~200px Höhe */
    }
    
    .main-title {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.9em;
    }
    
    .user-name {
        font-size: 0.9em;
        margin-right: 10px;
    }
    
    .nav-links a {
        font-size: 0.9em;
        margin-left: 8px;
    }
    
    .month-stats {
        grid-template-columns: 1fr;
    }
    
    .month-legend {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .legend-item {
        justify-content: center;
        width: 100%;
    }
    
    .calendar-day {
        min-height: 40px;
        padding: 2px 1px;
    }
    
    .day-percentage {
        font-size: 0.65em;
        padding: 1px 2px;
        min-width: 20px;
    }
    
    .month-nav-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .month-nav-buttons select {
        width: 100%;
        max-width: 200px;
    }
    
    .week-bar-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .week-bar-label {
        width: 100%;
        text-align: center;
    }
    
    .week-bar-visual {
        margin: 0;
        height: 25px;
    }
    
    .week-bar-info {
        width: 100%;
        text-align: center;
    }
    
    .comparison-stats {
        flex-direction: column;
    }
    
    .comparison-stat {
        width: 100%;
    }
}

/* Extra kleine Smartphones */
@media only screen and (max-width: 399px) {
    /* Chart-Container für sehr kleine Smartphones */
    .chart-container {
        height: 250px; /* Kompaktere Höhe für sehr kleine Bildschirme */
    }
    
    /* Logo Anpassungen */
    .main-logo {
        max-width: 95%;
        max-height: auto;  
    }
    
    .main-title {
        font-size: 1.3em;
        padding-bottom: 10px;
    }
    
    .user-header {
        padding-bottom: 10px;
        margin-bottom: 15px;
    }
    
    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.8em;
        margin-right: 8px;
    }
    
    .user-name {
        font-size: 0.8em;
        margin-right: 8px;
    }
    
    .nav-links a {
        font-size: 0.8em;
        margin-left: 6px;
    }
    
    .desktop-header-row {
        display: none;
    }
    
    .mobile-header-row {
        display: table-row;
    }
    
    .mobile-header-row th {
        font-size: 0.85em;
        padding: 8px 5px !important;
    }
    
    .desktop-view {
        display: none;
    }
    
    .mobile-view {
        display: inline;
    }
    
    .kalorien-tabelle th, 
    .kalorien-tabelle td {
        padding: 8px 5px;
        font-size: 0.85em;
    }
    
    .kalorien-tabelle td:not(:first-child) {
        font-size: 0.8em;
    }
    
    .week-navigation {
        flex-direction: column;
        padding: 12px 10px;
    }
    
    .week-title {
        order: -1;
        margin-bottom: 12px;
        width: 100%;
        flex: unset;
    }
    
    .nav-button {
        flex: 0 0 36px;
        padding: 6px;
        font-size: 0.9em;
    }
    
    .week-dropdown {
        flex: 1;
        margin: 8px 5px;
    }
    
    .today-button {
        padding: 6px 8px;
        font-size: 0.85em;
        min-width: 50px;
    }
    
    .date-selector {
        gap: 5px;
    }
    
    .year-select {
        flex: 0 0 65px;
        font-size: 0.9em;
    }
    
    .week-select {
        min-width: 0;
        font-size: 0.9em;
    }
    
    .stat-big {
        font-size: 2em;
    }
}