:root { --green:#14b886; --blue:#1885d8; --orange:#ff5a2c; --purple:#8d6ee8; --text:#111318; --muted:#757a84; --line:#e9ecef; --bg:#f7f8fa; }
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif; background: var(--bg); color: var(--text); }
.app-shell { max-width: 520px; min-height: 100vh; margin: 0 auto; padding: 22px 16px 92px; background: linear-gradient(#fff, #fafbfc); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
h1 { margin: 0; font-size: 34px; line-height: 1; letter-spacing: -.04em; }
h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
h3 { margin: 0; font-size: 19px; }
p { margin: 0; color: var(--muted); }
.date-pill input { border: 0; background: #f1f3f5; padding: 10px 12px; border-radius: 14px; font: inherit; }
.summary-card, .meal-card, .card, .settings-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 8px 24px rgba(15, 23, 42, .06); }
.summary-card { padding: 24px 18px 28px; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 8px; }
.stats-row strong { display: block; font-size: 30px; line-height: 1; } .stats-row span { color: #343941; } .green { color: var(--green); } .blue { color: var(--blue); } .orange { color: var(--orange); }
.calorie-ring { width: 190px; height: 190px; margin: 26px auto 18px; border-radius: 50%; background: conic-gradient(var(--green) var(--progress), #e6eaed 0); display: grid; place-items: center; position: relative; }
.calorie-ring:before { content:""; position: absolute; inset: 18px; background: white; border-radius: 50%; }
.calorie-ring div { position: relative; display: grid; text-align: center; gap: 2px; } .calorie-ring b { font-size: 45px; letter-spacing: -.05em; } .calorie-ring small { color: #5f6670; font-size: 17px; }
.macro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: center; }
.macro-grid span, .macro-grid b { display: block; } .macro-grid b { margin-top: 5px; font-size: 16px; } .macro-grid i, .meal-bar { display: block; height: 8px; background: #e6eaed; border-radius: 99px; overflow: hidden; margin-top: 14px; } .macro-grid em, .meal-bar span { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.macro-grid div:nth-child(2) em { background: var(--blue); } .macro-grid div:nth-child(3) em { background: var(--purple); }
.section-title { margin: 28px 0 12px; }
.meal-card { display: flex; align-items: center; gap: 16px; padding: 16px; margin: 10px 0; }
.meal-icon { width: 72px; height: 72px; border-radius: 50%; background: #fff0c9; display: grid; place-items: center; font-size: 35px; flex: 0 0 72px; }
.meal-card:nth-of-type(3) .meal-icon { background: #def7d8; } .meal-card:nth-of-type(4) .meal-icon { background: #eee8ff; } .meal-card:nth-of-type(5) .meal-icon { background: #dff6ff; }
.meal-main { width: 100%; } .meal-main p { margin-top: 8px; color: #333; font-size: 21px; } .meal-main small { display: block; color: var(--muted); margin-top: 4px; } .meal-bar span { background: #ffbd2e; }
.card { padding: 16px; margin-top: 16px; } details summary { cursor: pointer; list-style: none; background: var(--green); color: white; border-radius: 18px; padding: 16px; text-align: center; font-weight: 800; } details[open] summary { margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; } .wide { grid-column: 1 / -1; }
label { display: grid; gap: 6px; font-weight: 650; } input, select, button { font: inherit; padding: 12px; border-radius: 14px; border: 1px solid #d8dde3; background: white; } button { border: 0; color: white; background: #111318; cursor: pointer; font-weight: 800; }
.entries-card h3 { margin-top: 18px; color: #565d67; font-size: 16px; }.entry-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); } .entry-row small { color: var(--muted); } .entry-row button { width: 34px; height: 34px; padding: 0; border-radius: 50%; background: #f1f3f5; color: #111; }.exports { margin-top: 16px; } a { color: #009b72; font-weight: 800; text-decoration: none; }
.bottom-nav { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(520px, 100%); background: rgba(255,255,255,.94); border-top: 1px solid var(--line); backdrop-filter: blur(10px); display: grid; grid-template-columns: repeat(2, 1fr); padding: 10px 22px 18px; } .bottom-nav a { display: grid; place-items: center; gap: 3px; color: #6b7280; font-size: 24px; } .bottom-nav span { font-size: 12px; } .bottom-nav .active { color: var(--green); }
.settings-section { margin: 22px 0; }.section-head { display: flex; justify-content: space-between; align-items: center; }.section-head button { background: transparent; color: #009b72; padding: 0; }.settings-card { margin-top: 12px; overflow: hidden; }.settings-card label { grid-template-columns: 1fr 145px; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 500; }.settings-card label:last-child { border-bottom: 0; }.settings-card input { border: 0; padding: 5px; text-align: right; color: #5b616b; }
@media (max-width: 390px) { .macro-grid { gap: 8px; } .macro-grid b { font-size: 14px; } .grid { grid-template-columns: 1fr; } }
.ai-plus { width: 52px; height: 52px; border-radius: 50%; background: #111318; color: white; font-size: 30px; line-height: 1; padding: 0; flex: 0 0 52px; }
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(15,23,42,.38); display: grid; place-items: end center; padding: 12px; }
.hidden { display: none !important; }
.modal-card { width: min(520px, 100%); max-height: 92vh; overflow: auto; background: #fff; border-radius: 28px 28px 18px 18px; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.22); position: relative; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; padding: 0; background: #f1f3f5; color: #111; font-size: 24px; }
.muted { color: var(--muted); margin-top: 8px; }
.ai-form { display: grid; gap: 14px; margin-top: 18px; }
textarea { font: inherit; padding: 12px; border-radius: 14px; border: 1px solid #d8dde3; resize: vertical; }
.ai-status { margin-top: 14px; color: #5f6670; }
.ai-preview { margin-top: 20px; display: grid; gap: 12px; }
.preview-item { border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 5px; }
.preview-item small { color: var(--muted); }
.preview-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
button.secondary { background: #f1f3f5; color: #111318; }
.choice-card { padding-top: 48px; }
.choice-list { display: grid; gap: 14px; margin-top: 22px; }
.choice-option { width: 100%; display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 14px; padding: 16px; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 18px; text-align: left; box-shadow: 0 5px 18px rgba(15,23,42,.04); }
.choice-option b, .choice-option small { display: block; }
.choice-option b { font-size: 18px; }
.choice-option small { color: var(--muted); margin-top: 4px; font-weight: 500; }
.choice-option em { font-style: normal; color: #8b929c; font-size: 34px; font-weight: 400; }
.choice-icon { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: #dff8ee; color: var(--green); font-size: 28px; }
.purple-bg { background: #eee8ff; color: var(--purple); }
.choice-cancel { background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.manual-form { display: grid; gap: 16px; margin-top: 18px; }
.manual-form input { width: 100%; }
.nutri-card { border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: grid; gap: 12px; background: #fff; }
.nutri-card h3 { margin-bottom: 4px; }
.nutri-card label { display: grid; grid-template-columns: 1fr 120px 46px; align-items: center; gap: 10px; font-weight: 550; }
.nutri-card label input { text-align: right; }
.nutri-card span { border: 1px solid #d8dde3; border-radius: 12px; padding: 12px 0; text-align: center; color: #4b5563; }
@media (max-width: 390px) { .nutri-card label { grid-template-columns: 1fr 92px 42px; } }
.activity-card .meal-icon { background: #fff1e8; }
.activity-card .meal-bar span, .activity-bar span { background: var(--orange); }
.activity-list-card { margin-top: 10px; }
.activity-row { grid-template-columns: 1fr auto auto auto; }
.activity-row button { width: 34px; height: 34px; padding: 0; border-radius: 50%; background: #f1f3f5; color: #111; }
.empty-note { padding: 10px 0 2px; }
#activityForm label { display: grid; gap: 8px; }
#activityForm input { width: 100%; }
@media (max-width: 390px) { .activity-row { grid-template-columns: 1fr auto; } .activity-row button { margin-top: 4px; } }
.top-actions { display: grid; gap: 8px; justify-items: end; }
.user-switch { display: inline-block; border: 1px solid var(--line); background: #fff; color: #111318; border-radius: 14px; padding: 8px 10px; font-size: 13px; font-weight: 800; box-shadow: 0 4px 14px rgba(15, 23, 42, .04); }
.bottom-nav { grid-template-columns: repeat(3, 1fr); }
.user-page { padding-bottom: 32px; }
.user-select-card h2 { margin-bottom: 12px; }
.choice-list form { margin: 0; }
.choice-list .choice-option { width: 100%; }
.settings-hint { margin: 8px 0 14px; }
.year-pill input { width: 96px; text-align: center; }
.legend { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 16px; }
.legend span { display: flex; align-items: center; gap: 10px; color: #343941; font-weight: 700; }
.month-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 8px 24px rgba(15, 23, 42, .06); padding: 16px; margin: 14px 0; }
.month-card h2 { margin-bottom: 14px; }
.days-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 9px; }
.day-dot { width: 100%; aspect-ratio: 1 / 1; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; border: 1px solid var(--line); color: #111318; background: #fff; }
.day-dot.good { background: var(--green); border-color: var(--green); color: white; }
.day-dot.bad { background: var(--orange); border-color: var(--orange); color: white; }
.day-dot.empty { background: #fff; color: #7b828c; }
.day-dot.today { outline: 3px solid rgba(24, 133, 216, .28); outline-offset: 2px; }
.legend .day-dot { width: 18px; height: 18px; aspect-ratio: auto; font-size: 0; flex: 0 0 18px; }
@media (max-width: 390px) { .days-grid { gap: 6px; } .day-dot { font-size: 11px; } .topbar { align-items: flex-start; } }
