:root {
    --eat-green: #22c55e;
    --eat-red: #ef4444;
    --eat-carb: #f59e0b;
    --eat-fat: #a855f7;
    --eat-protein: #3b82f6;
}

html, body {
    min-height: 100%;
    background-color: #0f1115;
}

body {
    padding-bottom: 5rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.eat-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    background-color: #171a21;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.eat-bottom-nav a {
    flex: 1;
    text-align: center;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.75rem;
    padding: 0.5rem 0;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
}

.eat-bottom-nav a.active { color: var(--eat-green); }
.eat-bottom-nav a i { font-size: 1.25rem; line-height: 1; }

.btn, .form-control, .form-select { min-height: 44px; }
.btn-xsm {min-height: 30px}

.macro-carb    { color: var(--eat-carb); }
.macro-fat     { color: var(--eat-fat); }
.macro-protein { color: var(--eat-protein); }

.progress-eat .progress-bar { background-color: var(--eat-green); }
.progress-eat.over .progress-bar { background-color: var(--eat-red); }

.ring-kcal { display: block; margin: 0 auto; }
.ring-kcal .ring-track { stroke: rgba(255,255,255,0.08); }
.ring-kcal .ring-progress { stroke: var(--eat-green); transition: stroke-dasharray 0.4s ease, stroke 0.2s ease; }
.ring-kcal.over .ring-progress { stroke: var(--eat-red); }

.week-swiper {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.25rem 0;
}
.week-swiper .day-pill {
    padding: 0.4rem 0;
    border-radius: 0.75rem;
    text-align: center;
    background: #171a21;
    color: #cbd5e1;
    border: 1px solid rgba(255,255,255,0.06);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    font-size: 0.7rem;
    min-height: 52px;
}
.week-swiper .day-pill.today { border-color: var(--eat-green); color: var(--eat-green); }
.week-swiper .day-pill.selected { background: var(--eat-green); color: #0f1115; border-color: var(--eat-green); }
.week-swiper .day-pill .day-num { font-weight: 700; font-size: 1.05rem; line-height: 1; }

.meal-card { border-radius: 1rem; }
.meal-card.finished { opacity: 0.65; }

.day-summary {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
}
@media (max-width: 380px) {
    .day-summary { grid-template-columns: 1fr; text-align: center; }
}
.macro-tri {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}
.macro-tile {
    background: #171a21;
    border-radius: 0.75rem;
    padding: 0.5rem 0.4rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.06);
}
.macro-tile.over { border-color: rgba(239,68,68,0.4); }
.macro-tile .macro-label { font-size: 0.7rem; font-weight: 600; }
.macro-tile .macro-value { font-size: 0.95rem; font-weight: 700; }
.macro-tile .macro-sub   { font-size: 0.65rem; color: #94a3b8; }

.meal-summary { display: flex; align-items: center; gap: 0.75rem; }
.meal-summary .meal-ring { flex: 0 0 auto; }
.meal-summary .meal-macros { flex: 1 1 auto; }
.meal-item-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.4rem 0; border-top: 1px solid rgba(255,255,255,0.06);
    background: transparent; border-left: 0; border-right: 0; border-bottom: 0;
    width: 100%; text-align: left; color: inherit;
}
.meal-item-row-flex {
    width: 100%;
}
.meal-item-row:first-child { border-top: 0; }
.meal-item-row:hover:not(:disabled) { background: rgba(255,255,255,0.02); }
