/* Energy Summary — 3 circles at top */
.energy-summary {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding: 16px 0 20px;
    background: var(--bg-elevated);
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

/* Macro Summary Bars (Protein / Carbs / Fat) */
.macro-summary {
    background: var(--bg-elevated);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 12px 16px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.macro-summary-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.macro-summary-label {
    font-size: 12px;
    font-weight: 600;
    width: 52px;
    flex-shrink: 0;
}

.macro-summary-track {
    flex: 1;
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}

.macro-summary-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    min-width: 0;
    width: 0;
}

.macro-summary-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    min-width: 80px;
    text-align: right;
    flex-shrink: 0;
}

.macro-summary-divider {
    height: 1px;
    background: var(--border);
    margin: 2px 0;
}

.energy-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.energy-ring {
    width: 100px;
    height: 100px;
}

.energy-value {
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    line-height: 1.2;
}

.energy-value span:first-child {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.energy-unit {
    font-size: 11px;
    color: var(--text-dim);
}

.energy-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    gap: 12px;
}

/* Week Chart */
.chart-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 140px;
    gap: 4px;
    position: relative;
}

.chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.chart-col.today .chart-label { font-weight: 700; color: #10b981; }

.chart-value {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 500;
}

.chart-bar-container {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.chart-bar {
    width: 80%;
    max-width: 32px;
    border-radius: 4px 4px 0 0;
    background: var(--bg-input);
    transition: height 0.5s ease;
    min-height: 2px;
}

.chart-bar.ok { background: #10b981; }
.chart-bar.over { background: #ef4444; }

.chart-label {
    font-size: 11px;
    color: var(--text-dim);
}

#week-chart {
    position: relative;
}

.chart-goal-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px dashed var(--border-strong);
    pointer-events: none;
}

.goal-label {
    position: absolute;
    right: 0;
    top: -14px;
    font-size: 10px;
    color: var(--text-dim);
}

/* Streak */
.streak-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
}

#streak-count {
    font-size: 36px;
    font-weight: 700;
    color: #f59e0b;
}

#streak-label {
    font-size: 14px;
    color: var(--text-dim);
}

/* Water tracking */
.water-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
}

.water-icon { font-size: 20px; }

#dash-water-count {
    font-size: 28px;
    font-weight: 700;
    color: #38bdf8;
}

.water-goal {
    font-size: 14px;
    color: var(--text-dim);
}

/* Log water row */
.log-water-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 4px 0 2px;
}

.log-water-row .water-icon { font-size: 16px; }

#log-water-count {
    font-size: 18px;
    font-weight: 700;
    color: #38bdf8;
    min-width: 20px;
    text-align: center;
}

.log-water-row .water-goal { font-size: 13px; }

.water-btn {
    font-size: 18px !important;
    color: #38bdf8 !important;
    padding: 2px 8px !important;
}

/* Settings section on dashboard */
.settings-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-row label {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--text-secondary);
}

.settings-row input {
    max-width: 120px;
}

/* Favorites on dashboard */
.quick-favorites {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.quick-fav-btn {
    padding: 6px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background 0.2s;
}

.quick-fav-btn:hover { background: var(--btn-bg); }

/* Favorites page */
.favorite-item {
    background: var(--bg-elevated);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
}

.fav-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.fav-name { font-weight: 500; font-size: 15px; color: var(--text); }
.fav-calories { font-weight: 600; color: var(--accent); }

.fav-details {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.fav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (min-width: 600px) {
    .macro-summary {
        padding: 16px 24px;
        gap: 10px;
    }
    .macro-summary-label { width: 72px; font-size: 13px; }
    .macro-summary-track { height: 10px; }
    .macro-summary-val { font-size: 14px; min-width: 90px; }
}

@media (max-width: 400px) {
    .energy-ring { width: 85px; height: 85px; }
    .energy-value { top: 22px; }
    .energy-value span:first-child { font-size: 18px; }
}
