:root{--bg: #0f172a;--surface: #1e293b;--surface-2: #334155;--text: #f8fafc;--muted: #94a3b8;--primary: #0ea5e9;--warn: #f59e0b;--danger: #ef4444;--ok: #10b981;--radius: 10px;--space: 12px}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text);-webkit-tap-highlight-color:transparent}a{color:var(--primary);text-decoration:none}.app{min-height:100%;padding-bottom:72px}.container{max-width:640px;margin:0 auto;padding:16px;display:flex;flex-direction:column;gap:16px}.page-header h1{margin:0 0 4px}.muted{color:var(--muted)}.small{font-size:.85em}.error{color:var(--danger);margin:4px 0}.loading{display:grid;place-items:center;height:100vh;color:var(--muted)}.card{background:var(--surface);border-radius:var(--radius);padding:16px;display:flex;flex-direction:column;gap:12px}.card h2{margin:0;font-size:1.05rem}label{display:flex;flex-direction:column;gap:4px;font-size:.9rem;color:var(--muted)}input,select,textarea{background:var(--surface-2);border:1px solid transparent;border-radius:8px;padding:10px 12px;color:var(--text);font:inherit;width:100%}input:focus{outline:2px solid var(--primary)}button{background:var(--primary);color:#0b1220;border:0;border-radius:8px;padding:10px 14px;font:inherit;font-weight:600;cursor:pointer}button:disabled{opacity:.6;cursor:not-allowed}.btn-secondary{background:var(--surface-2);color:var(--text)}.btn-primary,.btn-block{width:100%}.btn-icon{background:transparent;color:var(--muted);padding:4px 10px;font-size:1.3rem}.inline-form,.form-actions{display:flex;gap:8px}.inline-form input,.form-actions button{flex:1}.progress{display:flex;flex-direction:column;gap:6px}.progress__label{display:flex;justify-content:space-between;align-items:baseline}.progress__label strong{font-size:1.4rem}.progress__track{height:10px;background:var(--surface-2);border-radius:999px;overflow:hidden}.progress__fill{height:100%;background:var(--ok);transition:width .2s}.progress--warn .progress__fill{background:var(--warn)}.progress--over .progress__fill{background:var(--danger)}.entries{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}.entries li{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px;background:var(--surface-2);border-radius:8px}.entries__main{flex:1;min-width:0}.hydration__buttons{display:flex;gap:8px;flex-wrap:wrap}.hydration__buttons button{flex:1 1 auto}label.checkbox{flex-direction:row;align-items:center;gap:8px;cursor:pointer}label.checkbox input{width:auto}.scanner video{width:100%;max-height:50vh;background:#000;border-radius:var(--radius)}.quick-portions{display:flex;gap:8px;flex-wrap:wrap}.quick-portions button{flex:1 1 auto;background:var(--surface-2);color:var(--text)}.entry__product{padding:8px;background:var(--surface-2);border-radius:8px}.entry__sugar{font-size:1.2rem;font-weight:600;color:var(--warn);text-align:center}.chart{width:100%;height:auto}.badge{display:inline-block;padding:1px 6px;border-radius:999px;font-size:.75rem;background:var(--surface);color:var(--muted)}.badge--manual{background:#3730a3;color:#c7d2fe}.badge--openfoodfacts{background:#166534;color:#bbf7d0}.badge--beverage{background:#0369a1;color:#bae6fd}.navbar{position:fixed;bottom:0;left:0;right:0;background:var(--surface);display:flex;justify-content:space-around;padding:8px env(safe-area-inset-right) calc(8px + env(safe-area-inset-bottom)) env(safe-area-inset-left);border-top:1px solid var(--surface-2)}.navbar a{color:var(--muted);padding:6px 10px;font-size:.85rem;text-align:center}.navbar a.active{color:var(--primary)}.auth{max-width:360px;margin:0 auto;padding:48px 16px;text-align:center;display:flex;flex-direction:column;gap:16px}.auth h1{margin:0;font-size:3rem}.auth form{text-align:left}
