/* ============================================================
   APPLICATION THEME SECTION
   ============================================================ */
:root {
    --app-bg: #f5f7fb;
    --app-card-radius: 1rem;
}
body {
    background: var(--app-bg);
    color: #1f2937;
}
.navbar-brand { letter-spacing: .2px; }
.card { border-radius: var(--app-card-radius); }
.card-header { border-top-left-radius: var(--app-card-radius) !important; border-top-right-radius: var(--app-card-radius) !important; }
.dashboard-card, .mini-card { overflow: hidden; }
.metric-label { color: #6b7280; font-size: .84rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.metric-value { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; font-weight: 700; margin-top: .35rem; }
.metric-value span { font-size: 1rem; font-weight: 600; }
.chart-wrap { position: relative; min-height: 300px; height: 300px; }
.chart-wrap-sm { min-height: 260px; height: 260px; }
.app-logo { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: #0d6efd; color: white; font-size: 1.4rem; font-weight: 800; }
.form-section-title { font-size: .8rem; color: #6b7280; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding-top: .25rem; }
.food-search { max-width: 320px; }
.meal-summary > div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid #eef0f4; }
.meal-summary > div:last-child { border-bottom: 0; }
.meal-summary span { color: #6b7280; }
.table > :not(caption) > * > * { padding: .9rem 1rem; }
.form-sticky { top: 88px; }
.plan-card { transition: transform .18s ease, box-shadow .18s ease; }
.plan-card:hover { transform: translateY(-2px); box-shadow: 0 .75rem 1.5rem rgba(31, 41, 55, .12) !important; }
.plan-energy { white-space: nowrap; align-self: flex-start; }
@media (display-mode: standalone) {
    [data-install-app] { display: none !important; }
}
@media (max-width: 767.98px) {
    .container-xl { padding-left: 14px; padding-right: 14px; }
    .card-body { padding-left: 1rem; padding-right: 1rem; }
    .food-search { max-width: none; width: 100%; }
    .table > :not(caption) > * > * { padding: .75rem .65rem; }
    .grams-column { width: 132px !important; min-width: 132px; }
    .grams-control { width: 118px; min-width: 118px; flex-wrap: nowrap; }
    .grams-control .grams-input { min-width: 82px; width: 82px; flex: 0 0 82px; }
}
