/* ============================================
   NovayaHumano — Dark Theme
   ============================================ */

/* === CSS Variables === */
:root {
    /* Hintergruende — Nachthimmel */
    --bg-dark: #020810;
    --bg-card: rgba(14, 24, 48, 0.82);
    --bg-elevated: rgba(18, 28, 52, 0.75);
    --bg-input: rgba(6, 10, 22, 0.7);
    --bg-border: rgba(80, 110, 170, 0.12);

    /* Akzente — Primär: Eisblau, Sekundär: Violett, Tertiär: Mauve */
    --accent: #7EB8E0;
    --accent-hover: #98CCF0;
    --accent-soft: #B0D8F5;
    --accent-dim: rgba(126, 184, 224, 0.15);
    --accent-glow: rgba(126, 184, 224, 0.25);
    --gold: #C8A855;
    --gold-hover: #D8B860;
    --gold-soft: #E8D090;
    --gold-dim: rgba(200, 168, 85, 0.10);
    --gold-glow: rgba(200, 168, 85, 0.15);
    --cyan: #7EB8E0;
    --cyan-light: #98CCF0;
    --cyan-dim: rgba(126, 184, 224, 0.15);
    --violet: #6E4FA0;
    --violet-light: #9B7FCC;
    --violet-dim: rgba(110, 79, 160, 0.15);
    --magenta: #A04878;
    --magenta-light: #C06898;
    --rose: #A0788A;
    --mauve: #8A6080;

    /* Text */
    --text-primary: #E8ECF1;
    --text-secondary: #B0BCCC;
    --text-muted: #6B7A8D;
    --text-border: #3D4F63;

    /* Naehrstoff-Farben */
    --color-calories: #D4A843;
    --color-protein: #4DB8E8;
    --color-carbs: #E8B84D;
    --color-fat: #E74C5F;
    --color-fiber: #2ECC71;
    --color-water: #4DB8E8;
    --color-vitamins: #9B7FCC;

    /* Status */
    --success: #2ECC71;
    --warning: #D4A843;
    --error: #E74C5F;
    --info: #1E90CF;

    /* Shadows */
    --shadow-card: 0 4px 30px rgba(0, 0, 0, 0.4), 0 0 1px rgba(100, 140, 200, 0.08);
    --shadow-elevated: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 2px rgba(80, 100, 160, 0.1);
    --shadow-gold: 0 0 16px rgba(212, 168, 67, 0.25), 0 2px 8px rgba(212, 168, 67, 0.15);
    --shadow-cyan: 0 0 12px rgba(100, 160, 220, 0.15), 0 2px 6px rgba(100, 160, 220, 0.08);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Radius */
    --radius: 16px;
    --radius-sm: 10px;
    --radius-btn: 12px;
    --radius-pill: 20px;
    --radius-full: 50%;

    /* Fonts */
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Nav */
    --nav-height: 72px;
}

/* === Reset === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    background-image:
        radial-gradient(ellipse 70% 45% at 50% 5%, rgba(15, 35, 95, 0.35) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 15% 40%, rgba(90, 50, 140, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 85% 55%, rgba(140, 50, 100, 0.04) 0%, transparent 55%),
        radial-gradient(ellipse 100% 50% at 50% 95%, rgba(40, 15, 50, 0.18) 0%, transparent 60%);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* === Sterne === */
.stars {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    pointer-events: none;
}
.star {
    position: absolute;
    border-radius: 50%;
    animation: twinkle var(--dur) ease-in-out infinite;
    animation-delay: var(--delay);
}
@keyframes twinkle {
    0%, 100% { opacity: var(--min-o); }
    50% { opacity: var(--max-o); }
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

/* === Typography === */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.text-accent {
    color: var(--accent);
}

.text-gold {
    color: var(--gold);
}

/* === Logo === */
.header-logo {
    background: linear-gradient(135deg,
        #e8f2ff 0%, #b0d4f0 20%, #88bcec 40%,
        #8878b8 60%, #6a50a0 80%, #a8d0f0 100%
    );
    background-size: 250% 250%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoShimmer 10s ease-in-out infinite;
}

@keyframes logoShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.logo-novaya {
    font-family: var(--font-heading);
    font-weight: 700;
}

.logo-humano {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* === App Layout === */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: var(--nav-height);
    position: relative;
    z-index: 1;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    padding-top: calc(var(--space-lg) + env(safe-area-inset-top, 0px));
}

.header-logo {
    font-size: 1.3rem;
}

.header-streak {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.95rem;
}

.page-title {
    font-size: 1.3rem;
}

.main-content {
    padding: 0 var(--space-md) var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* === Cards — Stained Glass === */
.card {
    background: linear-gradient(160deg,
        rgba(14, 24, 48, 0.82) 0%,
        rgba(12, 16, 35, 0.85) 50%,
        rgba(15, 12, 30, 0.82) 100%
    );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius);
    padding: var(--space-md);
    border: 1px solid var(--bg-border);
    box-shadow: var(--shadow-card);
    transition: border-color 0.3s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(100, 180, 240, 0.08) 15%,
        rgba(120, 170, 240, 0.18) 35%,
        rgba(140, 120, 200, 0.20) 50%,
        rgba(170, 80, 140, 0.14) 70%,
        rgba(140, 100, 180, 0.08) 85%,
        transparent 100%
    );
    pointer-events: none;
}

.card:hover {
    border-color: rgba(100, 140, 200, 0.18);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

/* === Macro Bars === */
.macro-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.macro-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.macro-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 110px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    font-weight: 500;
}

.macro-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    width: 95px;
    text-align: right;
    flex-shrink: 0;
}

/* === Progress Bar === */
.progress-bar {
    flex: 1;
    height: 10px;
    background: rgba(15, 25, 50, 0.6);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(60, 80, 120, 0.12);
}

.progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.4s ease;
    position: relative;
}

.progress-calories {
    background: linear-gradient(90deg, var(--color-calories), var(--gold-hover));
    box-shadow: 0 0 8px rgba(212, 168, 67, 0.3);
}
.progress-protein {
    background: linear-gradient(90deg, var(--cyan), var(--cyan-light));
    box-shadow: 0 0 8px rgba(30, 144, 207, 0.3);
}
.progress-carbs {
    background: linear-gradient(90deg, #E0A030, var(--color-carbs));
    box-shadow: 0 0 8px rgba(232, 184, 77, 0.3);
}
.progress-fat {
    background: linear-gradient(90deg, #D04050, var(--color-fat));
    box-shadow: 0 0 8px rgba(231, 76, 95, 0.3);
}
.progress-fiber {
    background: linear-gradient(90deg, #25A85E, var(--color-fiber));
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.3);
}
.progress-water {
    background: linear-gradient(90deg, #3A8ED8, var(--color-water));
    box-shadow: 0 0 8px rgba(77, 184, 232, 0.3);
}

/* === Water Buttons === */
.water-buttons {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    flex-wrap: wrap;
}

/* Wasser: Individuell-Slider */
.water-custom {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    padding: 10px 12px;
    background: rgba(6, 10, 22, 0.5);
    border-radius: var(--radius);
    border: 1px solid var(--bg-border);
}
.water-slider-row {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.water-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(80, 110, 170, 0.2);
    border-radius: 2px;
    outline: none;
}
.water-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-water);
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.15);
}
.water-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-water);
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.15);
}
.water-slider-val {
    min-width: 60px;
    text-align: right;
    font-size: 0.85rem;
    color: var(--color-water);
}

/* Fett-Details aufklappbar */
.fat-toggle {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.fat-chevron {
    vertical-align: middle;
    margin-left: 2px;
    transition: transform 0.2s ease;
    opacity: 0.5;
}
.fat-details {
    padding: 6px 0 2px 0;
    margin: 4px 0 4px 0;
    position: relative;
}
.fat-sub-row {
    display: flex;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid rgba(80, 110, 170, 0.08);
}
.fat-sub-row:last-of-type {
    border-bottom: none;
}
.fat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 8px;
}
.fat-sub-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex: 1;
}
.fat-sub-value {
    font-size: 0.8rem;
    color: var(--text-primary);
    text-align: right;
    min-width: 45px;
}
.fat-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(80, 110, 170, 0.15);
    color: var(--text-muted);
    font-size: 0.6rem;
    font-style: italic;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0 8px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    transition: background 0.15s;
}
.fat-info-btn:active {
    background: rgba(80, 110, 170, 0.3);
}
.fat-tooltip {
    display: none;
    background: rgba(14, 24, 48, 0.95);
    border: 1px solid rgba(80, 110, 170, 0.2);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-secondary);
    margin-top: 6px;
    backdrop-filter: blur(8px);
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) 0;
    color: var(--text-muted);
}

.empty-state .btn {
    margin-top: var(--space-md);
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-btn);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: var(--space-sm);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(60, 110, 200, 0.12), rgba(100, 60, 150, 0.08));
    color: var(--accent-soft);
    border: 1px solid rgba(100, 140, 200, 0.25);
    box-shadow: 0 0 16px rgba(80, 120, 200, 0.06);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(60, 110, 200, 0.22), rgba(100, 60, 150, 0.14));
    border-color: rgba(120, 150, 220, 0.40);
    box-shadow: 0 0 20px rgba(80, 120, 200, 0.12), 0 0 40px rgba(100, 60, 160, 0.06);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(80, 110, 170, 0.20);
}

.btn-secondary:hover {
    border-color: rgba(100, 140, 200, 0.35);
    color: var(--accent-soft);
    background: rgba(60, 100, 180, 0.06);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(80, 110, 170, 0.20);
}

.btn-outline:hover {
    border-color: rgba(100, 140, 200, 0.35);
    color: var(--accent-soft);
    background: rgba(60, 100, 180, 0.06);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
}

.btn-ghost:hover {
    color: var(--text-primary);
}

.btn-danger {
    background: var(--error);
    color: var(--text-primary);
}

.btn-danger:hover {
    box-shadow: 0 0 12px rgba(231, 76, 95, 0.3);
}

.btn-sm {
    padding: 10px 16px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    min-height: 40px;
}

.btn-full {
    width: 100%;
}

/* === Forms === */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--text-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: rgba(100, 140, 210, 0.40);
    box-shadow: 0 0 0 3px rgba(100, 130, 200, 0.06), 0 0 16px rgba(80, 100, 180, 0.05);
    background: rgba(8, 12, 28, 0.9);
}

/* === Alerts === */
.alert {
    padding: 12px var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(231, 76, 95, 0.12);
    color: var(--error);
    border: 1px solid rgba(231, 76, 95, 0.25);
}

.alert-success {
    background: rgba(46, 204, 113, 0.12);
    color: var(--success);
    border: 1px solid rgba(46, 204, 113, 0.25);
}

/* === Login === */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--space-xl) var(--space-md);
    background: var(--bg-dark);
    background-image: radial-gradient(
        ellipse at 50% 30%,
        rgba(212, 168, 67, 0.08) 0%,
        rgba(30, 144, 207, 0.04) 35%,
        rgba(10, 22, 40, 1) 70%
    );
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.login-container {
    max-width: 380px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.login-logo h1 {
    font-size: 2.2rem;
    letter-spacing: -0.5px;
    text-shadow: 0 0 40px rgba(212, 168, 67, 0.15);
}

.login-subtitle {
    color: var(--text-muted);
    margin-top: var(--space-sm);
    font-size: 0.95rem;
}

.login-card {
    background: rgba(17, 29, 53, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius);
    padding: var(--space-lg);
    border: 1px solid rgba(212, 168, 67, 0.1);
    box-shadow: var(--shadow-elevated);
}

.login-card h2 {
    margin-bottom: var(--space-sm);
    font-size: 1.1rem;
}

/* === Profile === */
.profile-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(100, 140, 210, 0.15), rgba(110, 79, 160, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-soft);
    border: 1px solid rgba(100, 140, 200, 0.20);
    box-shadow: 0 0 12px rgba(100, 140, 200, 0.06);
}

/* === Menu List === */
.menu-list {
    display: flex;
    flex-direction: column;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 14px 0;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(61, 79, 99, 0.3);
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

.menu-item:hover {
    color: var(--accent);
}

.menu-item-danger {
    color: var(--error);
}

.menu-item-danger:hover {
    color: #F06070;
}

/* === Bottom Navigation === */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    height: var(--nav-height);
    background: rgba(4, 8, 18, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(80, 110, 170, 0.10);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 100;
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    padding: 12px 18px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
    text-decoration: none;
    cursor: pointer;
    min-height: 48px;
    min-width: 48px;
    position: relative;
    z-index: 1;
}

.nav-item.active {
    color: var(--accent);
}

.nav-item svg {
    width: 22px;
    height: 22px;
}

.nav-add {
    margin-top: -20px;
}

.nav-add-btn {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(80, 130, 210, 0.20), rgba(110, 79, 160, 0.15));
    border: 1px solid rgba(100, 140, 200, 0.30);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(80, 120, 200, 0.10), 0 0 40px rgba(100, 60, 160, 0.05);
    transition: all 0.3s ease;
}

.nav-add-btn:hover {
    background: linear-gradient(135deg, rgba(80, 130, 210, 0.30), rgba(110, 79, 160, 0.22));
    border-color: rgba(120, 160, 230, 0.45);
    box-shadow: 0 0 28px rgba(80, 120, 200, 0.18), 0 0 50px rgba(100, 60, 160, 0.08);
    transform: scale(1.05);
}

.nav-add-btn svg {
    color: var(--accent-soft);
}

/* === Cookie Banner === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(17, 29, 53, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--bg-border);
    padding: var(--space-md) var(--space-lg);
    z-index: 200;
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-banner-inner {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.cookie-banner p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cookie-banner a {
    color: var(--accent);
}

.cookie-banner-buttons {
    display: flex;
    gap: var(--space-sm);
}

/* === Legal Pages === */
.legal-page {
    max-width: 480px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
}

.legal-page h1 {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
}

.legal-page h2 {
    font-size: 1.1rem;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
    color: var(--accent);
}

.legal-page p,
.legal-page li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

.legal-page ul {
    padding-left: var(--space-lg);
}

.legal-page .back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
}

.legal-page .back-link:hover {
    color: var(--accent);
}

/* === Footer Links === */
.login-footer {
    margin-top: var(--space-lg);
    text-align: center;
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.login-footer a {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.login-footer a:hover {
    color: var(--accent);
}

/* === Site Footer === */
.site-footer {
    padding: var(--space-lg) var(--space-md);
    padding-bottom: calc(var(--nav-height) + var(--space-lg));
    text-align: center;
    border-top: 1px solid rgba(61, 79, 99, 0.2);
    margin-top: var(--space-xl);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.3px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-secondary);
}

/* === Cookie Banner (vollständig) === */
.cookie-title {
    font-size: 0.88rem !important;
    font-weight: 600;
    color: var(--text-secondary) !important;
    margin-bottom: 4px !important;
}

.cookie-text {
    font-size: 0.82rem !important;
    color: var(--text-muted) !important;
    line-height: 1.6 !important;
}

.cookie-detail {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(61, 79, 99, 0.3);
}

.cookie-detail-title {
    font-size: 0.8rem !important;
    font-weight: 600;
    color: var(--text-muted) !important;
    margin-bottom: 12px !important;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(61, 79, 99, 0.25);
}

.cookie-option:last-of-type {
    border-bottom: none;
}

.cookie-option-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cookie-option-desc {
    font-size: 0.73rem !important;
    color: var(--text-muted) !important;
    margin-top: 2px !important;
    margin-bottom: 0 !important;
}

.cookie-option input[type="checkbox"] {
    accent-color: var(--cyan);
    width: 18px;
    height: 18px;
}

/* === Date Navigation === */
.date-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
}

.date-nav-arrow {
    color: var(--text-muted);
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.date-nav-arrow:hover {
    color: var(--accent);
    background: var(--accent-dim);
}

.date-nav-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.date-nav-picker {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}
.date-nav-picker input[type="date"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    -webkit-appearance: none;
}
.date-nav-picker input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.date-nav-icon {
    color: var(--accent);
    opacity: 0.6;
    margin-bottom: 1px;
    pointer-events: none;
}

.date-nav-label {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.date-nav-today {
    font-size: 0.72rem;
    color: var(--accent);
    font-weight: 500;
}

/* === Calories Card === */
.cal-card {
    text-align: center;
}

.cal-header {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
}

.cal-current {
    font-size: 1.8rem;
    font-weight: 600;
}

.cal-divider {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.cal-target {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.cal-remaining {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.progress-bar-lg {
    height: 14px;
    border-radius: 7px;
}

.progress-bar-lg .progress-fill {
    border-radius: 7px;
}

/* === Water Entries === */
.water-entries {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.water-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    background: rgba(77, 184, 232, 0.05);
}

.water-entry-info {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-width: 32px;
    min-height: 32px;
    justify-content: center;
}

.btn-icon:hover {
    color: var(--error);
    background: rgba(231, 76, 95, 0.1);
}

/* === Meal Cards === */
.btn-icon-add {
    color: var(--text-muted);
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.btn-icon-add:hover {
    color: var(--accent);
    background: var(--accent-dim);
}

.meal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meal-card-item {
    padding: 10px 12px;
    background: rgba(10, 18, 38, 0.5);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(80, 110, 170, 0.10);
}

.meal-card-body {
    display: flex;
    gap: 0;
}

.meal-card-body.has-photo {
    gap: 10px;
}

.meal-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.meal-card-content {
    flex: 1;
    min-width: 0;
}

.meal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.meal-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.meal-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.meal-macros {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.73rem;
}

.meal-macro {
    color: var(--text-muted);
}

.meal-macro.cal {
    color: var(--color-calories);
}

.meal-macro.prot {
    color: var(--color-protein);
}

.meal-macro.carb {
    color: var(--color-carbs);
}

.meal-macro.fatt {
    color: var(--color-fat);
}

.meal-items {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(61, 79, 99, 0.25);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meal-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 32px;
}

.meal-item-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex: 1;
    min-width: 0;
}

.meal-item-amount {
    font-size: 0.75rem;
}

/* === Water Display === */
.water-display {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* === Header User === */
.header-user {
    display: flex;
    align-items: center;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 2px;
}

/* === Selection === */
::selection {
    background: rgba(126, 184, 224, 0.2);
    color: var(--text-primary);
}

/* === Add Meal Page === */
.header-back {
    color: var(--text-muted);
    padding: 4px;
    transition: color 0.2s;
}
.header-back:hover {
    color: var(--accent);
}

/* Meal Type Selector */
.meal-type-selector {
    display: flex;
    gap: var(--space-sm);
}
.meal-type-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    background: rgba(14, 24, 48, 0.5);
    border: 1px solid rgba(80, 110, 170, 0.12);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.meal-type-btn.active {
    background: rgba(60, 110, 200, 0.12);
    border-color: rgba(100, 140, 200, 0.30);
    color: var(--accent-soft);
}
.meal-type-icon {
    font-size: 1.2rem;
}

/* Capture Card */
.capture-card {
    padding: 0;
    overflow: hidden;
}
.capture-preview {
    position: relative;
    width: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 10, 22, 0.5);
}
.capture-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: var(--space-lg);
}
.capture-img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
}
.capture-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.capture-remove:hover {
    background: rgba(231, 76, 95, 0.5);
}
.capture-buttons {
    display: flex;
    gap: 6px;
    padding: var(--space-md);
}
.capture-btn {
    flex: 1;
    padding: 10px 8px;
    font-size: 0.82rem;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

/* Analyze Button */
.btn-analyze {
    font-size: 1rem;
    padding: 14px 24px;
}
.btn-analyze:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Loading Spinner */
.analyze-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.analyze-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(126, 184, 224, 0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Result Card */
.result-card {
    border-color: rgba(46, 204, 113, 0.20);
}
/* Result Items — Erkannte Lebensmittel */
.result-item {
    padding: 14px;
    margin-bottom: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--bg-border);
    border-radius: 12px;
}
.result-item:last-child {
    margin-bottom: 0;
}
.result-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.result-edit-name {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(80, 110, 170, 0.15);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 0;
    outline: none;
}
.result-edit-name:focus {
    border-bottom-color: var(--accent);
}
.result-item-remove {
    opacity: 0.4;
    transition: opacity 0.2s;
    flex-shrink: 0;
}
.result-item-remove:hover {
    opacity: 1;
}

/* Mengen-Stepper */
.result-amount-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.result-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--bg-border);
    border-radius: 10px;
    overflow: hidden;
}
.result-stepper-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 8px 12px;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    transition: background 0.15s;
    touch-action: manipulation;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.result-stepper-btn:hover {
    background: rgba(126, 184, 224, 0.1);
}
.result-stepper-btn:active {
    background: rgba(126, 184, 224, 0.2);
}
.result-edit-amount {
    width: 56px;
    background: transparent;
    border: none;
    border-left: 1px solid var(--bg-border);
    border-right: 1px solid var(--bg-border);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    padding: 8px 4px;
    outline: none;
    -moz-appearance: textfield;
    font-family: 'JetBrains Mono', monospace;
}
.result-edit-amount::-webkit-inner-spin-button,
.result-edit-amount::-webkit-outer-spin-button {
    -webkit-appearance: none;
}
.result-edit-g {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}
.result-amount-presets {
    display: flex;
    gap: 4px;
    flex: 1;
    justify-content: flex-end;
}
.result-preset-btn {
    background: var(--bg-card);
    border: 1px solid var(--bg-border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.68rem;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.15s;
    touch-action: manipulation;
}
.result-preset-btn:hover {
    background: rgba(126, 184, 224, 0.1);
    color: var(--accent);
    border-color: rgba(126, 184, 224, 0.2);
}

/* Makro-Zeile */
.result-item-macros {
    display: flex;
    gap: 10px;
    font-size: 0.73rem;
    margin-bottom: 6px;
}

/* Mikronährstoffe Toggle */
.result-micros-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
}
.result-micros-toggle:hover {
    color: var(--accent);
}
.result-micros-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px 12px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--bg-border);
}
.result-micro-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: var(--text-muted);
    padding: 2px 0;
}
.result-micro-val {
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
}

/* Summary */
.result-summary {
    padding: 14px;
    margin-top: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--bg-border);
    border-radius: 12px;
}
.result-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 6px;
}
.result-summary-macros {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
}
.result-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

/* DB-Suche Dropdown */
.db-search-results {
    position: absolute;
    left: var(--space-md);
    right: var(--space-md);
    top: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    max-height: 260px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.db-search-item {
    padding: 10px var(--space-md);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}
.db-search-item:last-child {
    border-bottom: none;
}
.db-search-item:hover,
.db-search-item:active {
    background: rgba(126, 184, 224, 0.1);
}
.db-search-name {
    font-size: 0.9rem;
    color: var(--text-primary);
}
.db-search-macros {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.db-search-empty {
    padding: 12px var(--space-md);
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

/* Barcode Scanner */
.barcode-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(2, 8, 16, 0.97);
    z-index: 150;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.barcode-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 480px;
    padding: var(--space-md);
    padding-top: calc(var(--space-lg) + env(safe-area-inset-top, 0px));
    color: var(--text-primary);
    font-weight: 600;
    font-family: var(--font-heading);
}
.barcode-video-wrap {
    position: relative;
    width: 100%;
    max-width: 480px;
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.barcode-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#barcodeScannerArea {
    width: 100%;
    max-width: 480px;
}
#barcodeScannerArea video {
    width: 100% !important;
    border-radius: 8px;
}
.barcode-manual {
    width: 100%;
    max-width: 480px;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom, 0px));
}
.barcode-manual-row {
    display: flex;
    gap: var(--space-sm);
}
.barcode-manual-row input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--text-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    outline: none;
}
.barcode-manual-row input:focus {
    border-color: rgba(100, 140, 210, 0.40);
}

/* Barcode Result */
.barcode-result-card {
    border-color: rgba(126, 184, 224, 0.20);
}
.barcode-product-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}
.barcode-product-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.05);
}
.barcode-product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.barcode-product-macros {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.78rem;
    padding: 8px 0;
    align-items: center;
}

/* Confirm Dialog */
.confirm-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(2, 8, 16, 0.85);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}
.confirm-dialog {
    background: rgba(14, 24, 48, 0.95);
    border: 1px solid rgba(80, 110, 170, 0.20);
    border-radius: var(--radius);
    padding: var(--space-lg);
    max-width: 320px;
    width: 100%;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-elevated);
}
.confirm-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    line-height: 1.5;
}
.confirm-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    line-height: 1.4;
}
.confirm-actions {
    display: flex;
    gap: var(--space-sm);
}
.confirm-actions .btn {
    flex: 1;
}

/* Meal action buttons */
.meal-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.meal-item-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 8px;
}
.btn-meal-edit,
.btn-meal-delete {
    border: none;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn-meal-edit {
    color: #7EB8E0;
    background: rgba(126, 184, 224, 0.15);
}
.btn-meal-edit:hover {
    background: rgba(126, 184, 224, 0.3);
    box-shadow: 0 0 12px rgba(126, 184, 224, 0.35);
    transform: scale(1.1);
}
.btn-meal-delete {
    color: #A04878;
    background: rgba(160, 72, 120, 0.12);
}
.btn-meal-delete:hover {
    color: #E74C5F;
    background: rgba(231, 76, 95, 0.25);
    box-shadow: 0 0 12px rgba(231, 76, 95, 0.3);
    transform: scale(1.1);
}
.btn-item-edit {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s;
}
.btn-item-edit .meal-item-amount {
    color: #D4A843;
    border-bottom: 1px dashed rgba(212, 168, 67, 0.4);
    transition: color 0.2s;
}
.btn-item-edit:hover {
    background: rgba(212, 168, 67, 0.1);
}
.btn-item-edit:hover .meal-item-amount {
    color: #E8B84D;
    border-bottom-color: #E8B84D;
}
.meal-item-kcal {
    color: var(--text-muted);
    font-size: 0.8rem;
}
.btn-item-delete {
    opacity: 0.35;
    color: #A04878;
    transition: opacity 0.2s, color 0.2s;
}
.btn-item-delete:hover {
    opacity: 1;
    color: #E74C5F;
}

/* === Mikronährstoffe === */
.micro-toggle {
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    transition: color 0.2s;
}
.micro-toggle:hover {
    color: var(--accent);
}
.micro-chevron {
    transition: transform 0.25s;
}

.micro-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    margin-top: 10px;
}

.micro-pill {
    display: flex;
    align-items: center;
    gap: 6px;
}

.micro-pill-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    min-width: 52px;
    white-space: nowrap;
}

.micro-pill-bar {
    flex: 1;
    height: 3px;
    background: rgba(80, 110, 170, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.micro-pill-fill {
    height: 100%;
    background: var(--color-vitamins);
    border-radius: 2px;
    transition: width 0.3s;
}

.micro-pill-val {
    font-size: 0.65rem;
    color: var(--text-muted);
    min-width: 36px;
    text-align: right;
}

.micro-details {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(61, 79, 99, 0.25);
}

.micro-group-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
    font-family: var(--font-display);
}

.micro-group-title:not(:first-child) {
    margin-top: 14px;
}

.micro-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.micro-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.micro-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 72px;
}

.micro-bar {
    flex: 1;
    height: 4px;
}

.progress-micro {
    background: var(--color-vitamins);
}

.progress-mineral {
    background: var(--cyan);
}

.micro-pill-fill-mineral {
    background: var(--cyan);
}

.micro-value {
    font-size: 0.68rem;
    color: var(--text-muted);
    min-width: 80px;
    text-align: right;
}

/* === Water entries collapse === */
.water-entry-hidden {
    display: none !important;
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 6px 0 2px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-text:hover {
    opacity: 1;
}

/* === Tag abschließen === */
.day-close-card {
    text-align: center;
}

.btn-close-day {
    width: 100%;
    padding: 14px;
    gap: 8px;
    background: linear-gradient(135deg, var(--violet), var(--magenta));
    color: #fff;
    border: 1px solid rgba(110, 79, 160, 0.4);
    box-shadow: 0 0 16px rgba(110, 79, 160, 0.25);
    font-weight: 600;
}

.btn-close-day:hover {
    background: linear-gradient(135deg, var(--violet-light), var(--magenta-light));
    box-shadow: 0 0 24px rgba(110, 79, 160, 0.4);
    transform: translateY(-1px);
}

.day-close-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.4;
}

.day-closed-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--color-fiber);
    font-size: 0.82rem;
    margin: 0;
    padding: 4px 0;
}

/* === Profile Reminder === */
.profile-reminder {
    position: relative;
    border-left: 3px solid var(--warning);
    padding: 14px 40px 14px 16px;
    background: linear-gradient(160deg,
        rgba(212, 168, 67, 0.08) 0%,
        rgba(14, 24, 48, 0.82) 50%,
        rgba(15, 12, 30, 0.82) 100%
    );
}

.btn-reminder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-body);
    white-space: nowrap;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--warning), #E0B840);
    color: #1a1a2e;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    touch-action: manipulation;
    box-shadow: 0 0 12px rgba(212, 168, 67, 0.3);
    min-height: 40px;
}

.btn-reminder:hover {
    background: linear-gradient(135deg, #E0B840, #ECC850);
    box-shadow: 0 0 20px rgba(212, 168, 67, 0.45);
    transform: translateY(-1px);
    color: #1a1a2e;
}

.reminder-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.reminder-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.85rem;
}

.reminder-text strong {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.reminder-text span {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.4;
}

.reminder-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

/* === Profile Page === */
.profile-form .card {
    margin-bottom: 16px;
}

.card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-input,
.input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--bg-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    color-scheme: dark;
}

.form-input:focus {
    border-color: var(--accent);
}

.form-input option {
    background: var(--bg-card);
    color: var(--text-primary);
}

select.form-input {
    cursor: pointer;
}

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

.radio-group {
    display: flex;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--bg-border);
    border-radius: 8px;
    flex: 1;
    justify-content: center;
    transition: border-color 0.2s;
}

.radio-option:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-label {
    font-size: 0.88rem;
    color: var(--text-primary);
}

.btn-full {
    width: 100%;
    margin-top: 8px;
}

.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    width: 36px;
    height: 36px;
}

/* Berechnete Ziele */
.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--bg-border);
}

.calc-row:last-child {
    border-bottom: none;
}

.calc-explanation {
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(46, 204, 113, 0.06);
    border: 1px solid rgba(46, 204, 113, 0.15);
    border-radius: 8px;
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.calc-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.calc-value {
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    font-weight: 600;
}

.calc-highlight {
    color: var(--accent);
    font-size: 1rem;
}

/* Save message */
.save-msg {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-top: 12px;
}

.save-msg-ok {
    color: var(--color-fiber);
    background: rgba(46, 204, 113, 0.1);
}

.save-msg-err {
    color: var(--error);
    background: rgba(231, 76, 95, 0.1);
}

/* Profile header in More page */
.profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.menu-list {
    display: flex;
    flex-direction: column;
}

.menu-item {
    display: block;
    padding: 14px 0;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--bg-border);
    transition: color 0.15s;
}

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

.menu-item-danger {
    color: var(--error);
}

/* === Logs Page === */

/* Kalender-Streifen */
.cal-strip-wrap {
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--bg-border);
}

.cal-strip {
    display: flex;
    overflow-x: auto;
    padding: 10px 6px;
    gap: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cal-strip::-webkit-scrollbar {
    display: none;
}

.cal-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 38px;
    padding: 6px 4px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    transition: background 0.15s;
}

.cal-day:hover {
    background: rgba(126, 184, 224, 0.08);
}

.cal-day-wd {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cal-day-num {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.cal-today {
    background: rgba(126, 184, 224, 0.1);
    border: 1px solid rgba(126, 184, 224, 0.25);
}

.cal-today .cal-day-num {
    color: var(--accent);
}

.cal-has-data .cal-day-num {
    color: var(--text-primary);
}

.cal-has-data::after {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: 2px;
}

/* Tages-Cards */
.log-days {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.log-day-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-border);
    border-radius: 14px;
    padding: 14px 16px;
    transition: border-color 0.15s;
}

.log-day-card.log-day-open {
    border-color: rgba(126, 184, 224, 0.2);
}

.log-day-header {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.log-day-date {
    display: flex;
    flex-direction: column;
    min-width: 50px;
}

.log-day-weekday {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.5px;
}

.log-day-full {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.log-day-meta {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.log-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.log-badge-closed {
    background: rgba(110, 79, 160, 0.15);
    color: var(--violet-light);
    border: 1px solid rgba(110, 79, 160, 0.25);
}

.log-meal-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.log-day-toggle {
    color: var(--text-muted);
    transition: transform 0.2s;
    display: flex;
}

.log-day-open .log-day-toggle {
    transform: rotate(180deg);
}

/* Kalorien-Balken */
.log-day-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.log-day-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    overflow: hidden;
}

.log-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.log-bar-under {
    background: var(--accent);
}

.log-bar-good {
    background: linear-gradient(90deg, var(--accent), #60D394);
}

.log-bar-over {
    background: linear-gradient(90deg, #E0A040, #D05050);
}

.log-day-cal {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 100px;
    text-align: right;
}

/* Makro-Zahlen */
.log-day-macros {
    display: flex;
    gap: 14px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.log-macro {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.log-macro strong {
    color: var(--text-secondary);
    font-weight: 600;
}

.log-macro-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.log-macro-p { background: var(--color-protein, #7EB8E0); }
.log-macro-c { background: var(--color-carbs, #E0C060); }
.log-macro-f { background: var(--color-fat, #E08060); }
.log-macro-w { background: #60A0D0; }

/* Detail-Bereich */
.log-day-detail {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--bg-border);
}

/* Mahlzeiten im Detail */
.log-meal {
    margin-bottom: 12px;
}

.log-meal:last-child {
    margin-bottom: 0;
}

.log-meal-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.log-meal-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
}
.log-meal-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}
.log-meal-actions button:hover {
    background: rgba(126, 184, 224, 0.1);
}

.log-meal-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--bg-border);
}

.log-meal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.log-meal-type {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.log-meal-name {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.log-meal-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.log-meal-kcal {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Einzelne Zutaten */
.log-meal-items {
    margin-top: 8px;
    margin-left: 50px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.log-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--text-muted);
    padding: 3px 0;
}

.log-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-item-amount {
    color: var(--text-secondary);
    min-width: 36px;
    text-align: right;
}

.log-item-cal {
    color: var(--text-secondary);
    min-width: 50px;
    text-align: right;
}

/* === Charts/Analyse Page === */

.analyse-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid rgba(126, 184, 224, 0.2);
    color: var(--text);
    font-size: 0.95rem;
    cursor: pointer;
    margin-bottom: 10px;
    color-scheme: dark;
}
.analyse-select option {
    background: #0a1628;
    color: #e0e8f0;
}
.analyse-period {
    margin-bottom: 12px;
}
.analyse-period-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid rgba(212, 168, 67, 0.2);
    color: #D4A843;
    font-size: 0.85rem;
    cursor: pointer;
    color-scheme: dark;
}
.analyse-period-select option {
    background: #0a1628;
    color: #D4A843;
}
.chart-avg-header {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.chart-view-btn-UNUSED {
    text-align: center;
    padding: 8px;
    font-size: 0.82rem;
    border-radius: 10px;
    color: var(--text-muted);
    background: rgba(126, 184, 224, 0.05);
    border: 1px solid rgba(126, 184, 224, 0.08);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.chart-view-btn:hover {
    color: var(--text-secondary);
    background: rgba(126, 184, 224, 0.08);
}
.chart-view-btn.active {
    background: rgba(212, 168, 67, 0.15);
    color: #D4A843;
    border-color: rgba(212, 168, 67, 0.3);
}
.analyse-tab-select select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid rgba(126, 184, 224, 0.15);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
}

.chart-range {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    background: var(--bg-card);
    border: 1px solid var(--bg-border);
    border-radius: 10px;
    padding: 4px;
}

.chart-range-btn {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.15s;
}

.chart-range-btn:hover {
    color: var(--text-secondary);
    background: rgba(126, 184, 224, 0.06);
}

.chart-range-btn.active {
    background: rgba(126, 184, 224, 0.12);
    color: var(--accent);
    border: 1px solid rgba(126, 184, 224, 0.2);
}

.chart-card {
    margin-bottom: 14px;
}

.chart-wrap {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.chart-wrap canvas {
    display: block;
    width: 100%;
}

.chart-legend {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--bg-border);
}

.chart-legend-item {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.chart-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Health Dashboard auf Home */
.health-dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.health-dash-item {
    background: rgba(126, 184, 224, 0.05);
    border-radius: 8px;
    padding: 10px 12px;
}
.health-dash-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: block;
}
.health-dash-val {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Durchschnitte */
.chart-avg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.chart-avg-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border-radius: 10px;
    border: 1px solid var(--bg-border);
}

.chart-avg-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.chart-avg-val {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.chart-avg-target {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* === Weight Page === */

.wt-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.wt-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border-radius: 10px;
    border: 1px solid var(--bg-border);
}

.wt-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.wt-stat-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.wt-stat-val.wt-down {
    color: #60D394;
}

.wt-stat-val.wt-up {
    color: #E08060;
}

.wt-entries {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wt-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-border);
}

.wt-entry:last-child {
    border-bottom: none;
}

.wt-entry-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wt-entry-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 90px;
}

.wt-entry-weight {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.wt-entry-del {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.wt-entry-del:hover {
    color: var(--error);
    background: rgba(224, 80, 80, 0.1);
}

/* === Targets Page === */

.targets-sub {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 18px 0 10px 0;
    padding-top: 10px;
    border-top: 1px solid var(--bg-border);
}

.targets-sub:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.form-input-sm {
    padding: 8px 10px;
    font-size: 0.82rem;
}

/* Makro-Verteilung */
.macro-split {
    margin-top: 12px;
}

.macro-bar {
    display: flex;
    height: 22px;
    border-radius: 6px;
    overflow: hidden;
    gap: 2px;
}

.macro-bar-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    min-width: 24px;
}

.macro-bar-p { background: rgba(77, 184, 232, 0.5); }
.macro-bar-c { background: rgba(232, 184, 77, 0.5); }
.macro-bar-f { background: rgba(231, 76, 95, 0.5); }

.macro-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* === Foods Page === */

.btn-icon {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.btn-icon:hover {
    background: rgba(126, 184, 224, 0.1);
}

.food-search-wrap {
    margin-bottom: 14px;
}

.food-search-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.food-search-input {
    flex: 1;
    min-width: 120px;
}

.food-cat-select {
    width: auto;
    min-width: 100px;
    flex: 0 0 auto;
}

.food-add-card {
    margin-bottom: 14px;
}

.food-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.food-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.food-item {
    background: var(--bg-card);
    border: 1px solid var(--bg-border);
    border-radius: 10px;
    padding: 12px 14px;
}

.food-item-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.food-clickable {
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 6px;
    padding: 4px;
    margin: -4px;
}
.food-clickable:hover {
    background: rgba(126, 184, 224, 0.06);
}
.food-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.food-item-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}
.food-item-actions button:hover {
    background: rgba(126, 184, 224, 0.1);
}

.food-item-name {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.food-item-name strong {
    font-size: 0.85rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.food-item-brand {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.food-item-macros {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.food-item-cal {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.food-item-macro {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.food-item-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.food-item-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.food-portions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.food-portion-tag {
    font-size: 0.68rem;
    color: var(--text-secondary);
    background: rgba(126, 184, 224, 0.08);
    border: 1px solid rgba(126, 184, 224, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.food-portion-del {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0 2px;
    line-height: 1;
}
.food-portion-del:hover {
    color: var(--danger);
}

.food-add-portion-btn {
    background: none;
    border: 1px dashed rgba(126, 184, 224, 0.25);
    color: var(--accent);
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
    cursor: pointer;
}
.food-add-portion-btn:hover {
    background: rgba(126, 184, 224, 0.08);
}

.food-item-cat {
    font-size: 0.65rem;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: capitalize;
}

.food-item-src {
    font-size: 0.6rem;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 2px 6px;
    border-radius: 8px;
}

.food-del-btn {
    margin-left: auto;
}

.food-paging {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 16px;
}

.food-paging-info {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* === Favorites Page === */

.fav-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fav-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-border);
    border-radius: 14px;
    padding: 14px 16px;
}

.fav-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.fav-info {
    flex: 1;
    min-width: 0;
}

.fav-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fav-meta {
    display: flex;
    gap: 8px;
    margin-top: 3px;
}

.fav-type {
    font-size: 0.68rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fav-uses {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.fav-macros {
    text-align: right;
    flex-shrink: 0;
}

.fav-cal {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.fav-macro-row {
    display: flex;
    gap: 6px;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.fav-items {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 10px;
}

.fav-item-tag {
    font-size: 0.68rem;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px solid var(--bg-border);
    padding: 3px 8px;
    border-radius: 8px;
}

.fav-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--bg-border);
}

.fav-use-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fav-del-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.fav-del-btn:hover {
    color: var(--error);
    background: rgba(224, 80, 80, 0.1);
}
