* { margin: 0; padding: 0; box-sizing: border-box; } :root { --bg: #121212; --surface: #1e1e1e; --primary: #bb86fc; --on-bg: #e0e0e0; --on-surface: #ffffff; --positive: #cf6679; --negative: #03dac6; --muted: #888; --border: #333; --radius: 8px; } body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--on-bg); font-size: 16px; line-height: 1.4; overflow-x: hidden; -webkit-tap-highlight-color: transparent; } #app { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; } /* Header / date navigation */ .day-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; } .day-header button { background: none; border: none; color: var(--primary); font-size: 24px; padding: 8px; cursor: pointer; border-radius: var(--radius); } .day-header button:active { background: rgba(187, 134, 252, 0.15); } .day-header .date-text { font-size: 18px; font-weight: 500; color: var(--on-surface); } /* Weight display */ .weight-row { padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--border); font-size: 14px; color: var(--muted); } .weight-row span { color: var(--on-surface); font-weight: 500; } /* Entry list */ .entries { flex: 1; overflow-y: auto; padding: 8px 0; } .entry-item { display: grid; grid-template-columns: 50px 1fr 70px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); } .entry-item:active { background: rgba(255, 255, 255, 0.05); } .entry-time { font-size: 13px; color: var(--muted); } .entry-desc { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .entry-kcal { text-align: right; font-size: 14px; font-weight: 500; } .entry-kcal.intake { color: var(--positive); } .entry-kcal.expenditure { color: var(--negative); } /* Balance summary */ .balance-bar { display: flex; justify-content: space-around; padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--border); font-size: 14px; } .balance-bar .label { color: var(--muted); font-size: 12px; } .balance-bar .value { font-size: 18px; font-weight: 600; } .balance-bar .value.deficit { color: var(--negative); } .balance-bar .value.surplus { color: var(--positive); } /* FAB (add button) */ .fab { position: fixed; bottom: 80px; right: 24px; width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: #000; border: none; font-size: 28px; font-weight: 300; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); display: flex; align-items: center; justify-content: center; } .fab:active { transform: scale(0.95); } /* Bottom nav */ .bottom-nav { display: flex; justify-content: space-around; padding: 10px 0; background: var(--surface); border-top: 1px solid var(--border); position: sticky; bottom: 0; } .bottom-nav button { background: none; border: none; color: var(--muted); font-size: 12px; padding: 4px 16px; cursor: pointer; } .bottom-nav button.active { color: var(--primary); } /* Modal / add entry overlay */ .modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); z-index: 100; display: flex; align-items: flex-end; justify-content: center; } .modal-sheet { background: var(--surface); width: 100%; max-width: 480px; border-radius: 16px 16px 0 0; padding: 20px 16px; max-height: 85vh; overflow-y: auto; } .modal-sheet h2 { font-size: 18px; margin-bottom: 16px; color: var(--on-surface); } /* Form elements */ .form-group { margin-bottom: 14px; } .form-group label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; } .form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); color: var(--on-surface); font-size: 16px; font-family: inherit; } .form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); } .type-chips { display: flex; flex-wrap: wrap; gap: 8px; } .type-chip { padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border); background: none; color: var(--on-bg); font-size: 14px; cursor: pointer; } .type-chip.selected { background: var(--primary); color: #000; border-color: var(--primary); } .btn-row { display: flex; gap: 12px; margin-top: 16px; } .btn { flex: 1; padding: 12px; border-radius: var(--radius); border: none; font-size: 16px; font-family: inherit; cursor: pointer; } .btn-primary { background: var(--primary); color: #000; font-weight: 600; } .btn-secondary { background: var(--border); color: var(--on-bg); } /* Setup screen */ .setup-screen { padding: 24px 16px; display: flex; flex-direction: column; gap: 20px; min-height: 100vh; justify-content: center; } .setup-screen h1 { font-size: 24px; color: var(--on-surface); text-align: center; } .setup-screen p { color: var(--muted); text-align: center; font-size: 14px; } /* Kcal preview */ .kcal-preview { padding: 10px 12px; background: rgba(187, 134, 252, 0.1); border-radius: var(--radius); text-align: center; font-size: 18px; font-weight: 500; color: var(--primary); } /* Empty state */ .empty-state { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 15px; padding: 40px; text-align: center; } /* Screen layout */ #app { display: flex; flex-direction: column; min-height: 100vh; } .bottom-nav { order: 2; position: sticky; bottom: 0; } .screen-content { order: 1; flex: 1; overflow-y: auto; padding-bottom: 8px; } .nav-btn { background: none; border: none; color: var(--muted); font-size: 13px; padding: 8px 12px; cursor: pointer; font-family: inherit; } .nav-btn.active { color: var(--primary); font-weight: 600; } /* Day navigation */ .day-header h2 { font-size: 15px; font-weight: 500; text-align: center; } .day-nav { background: none; border: none; color: var(--primary); font-size: 20px; padding: 4px 10px; cursor: pointer; } /* Summary cards */ .summary-row { display: flex; gap: 8px; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--border); } .summary-card { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 6px 4px; border-radius: var(--radius); background: var(--bg); } .summary-val { font-size: 18px; font-weight: 700; } .summary-lbl { font-size: 10px; color: var(--muted); text-align: center; } .summary-card.surplus .summary-val { color: #cf6679; } .summary-card.deficit .summary-val { color: #03dac6; } .summary-card.balanced .summary-val { color: var(--on-bg); } /* Log sections */ .log-section { padding: 0 0 4px; border-bottom: 1px solid var(--border); } .section-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px 4px; } .section-header h3 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; } .add-btn { background: none; border: none; color: var(--primary); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; } .log-list { list-style: none; padding: 0; margin: 0; } .log-item { display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-top: 1px solid rgba(255,255,255,0.04); } .log-time { font-size: 12px; color: var(--muted); min-width: 38px; } .log-desc { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .log-desc small { color: var(--muted); margin-left: 4px; font-size: 11px; } .log-kcal { font-size: 13px; color: var(--muted); min-width: 52px; text-align: right; } .log-empty { padding: 6px 14px; font-size: 13px; color: var(--muted); font-style: italic; } .del-btn { background: none; border: none; color: #555; font-size: 14px; cursor: pointer; padding: 2px 4px; flex-shrink: 0; } .del-btn:active { color: #cf6679; } /* Sleep info */ .sleep-info { padding: 6px 14px 8px; display: flex; flex-direction: column; gap: 2px; } .sleep-line { font-size: 13px; color: var(--on-bg); } /* Modal */ .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 200; display: flex; align-items: flex-end; justify-content: center; } .modal { background: var(--surface); width: 100%; max-width: 480px; border-radius: 16px 16px 0 0; padding: 20px 16px 16px; max-height: 90vh; overflow-y: auto; } .modal h3 { font-size: 17px; margin-bottom: 16px; } .modal-btns { display: flex; gap: 10px; margin-top: 16px; } .btn-primary, .btn-secondary { flex: 1; padding: 12px; border-radius: var(--radius); border: none; font-size: 16px; font-family: inherit; cursor: pointer; } .btn-primary { background: var(--primary); color: #000; font-weight: 600; } .btn-secondary { background: var(--border); color: var(--on-bg); } .full-width { width: 100%; } /* Products screen */ .stub-screen, .settings-screen { padding: 16px; } .stub-screen h2, .settings-screen h2 { font-size: 20px; margin-bottom: 16px; } .stub-note { color: var(--muted); font-size: 14px; margin-top: 8px; } .search-input { width: 100%; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); color: var(--on-surface); font-size: 16px; font-family: inherit; margin-bottom: 12px; } .search-input:focus { outline: none; border-color: var(--primary); } .prod-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 4px; border-bottom: 1px solid var(--border); } .prod-name { font-size: 14px; flex: 1; } .prod-name small { color: var(--muted); font-size: 12px; margin-left: 4px; } .prod-kcal { font-size: 13px; color: var(--muted); } /* Loading */ .loading { text-align: center; padding: 40px; color: var(--muted); }