*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:root{--bg: #1a1a2e;--surface: #16213e;--surface2: #0f3460;--accent: #e94560;--text: #eee;--text-muted: #999;--radius: 8px}html{height:100%}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text);height:100%;display:flex;flex-direction:column}#app{display:flex;flex-direction:column;flex:1;min-height:0}header{background:var(--surface);padding:16px 24px;display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid var(--accent)}header h1{font-size:1.6rem;font-weight:700;letter-spacing:1px}header h1 span{color:var(--accent)}button{background:var(--surface2);color:var(--text);border:1px solid rgba(255,255,255,.1);padding:8px 14px;border-radius:var(--radius);cursor:pointer;font-size:.85rem;transition:background .2s}button:hover{background:#1a4a80}button.primary{background:var(--accent);border-color:var(--accent)}button.primary:hover{background:#c73a52}button.danger{background:#6b1a1a;border-color:#8b2a2a}button.danger:hover{background:#8b2a2a}.app{display:flex;flex:1;overflow:hidden}.sidebar{width:340px;min-width:340px;background:var(--surface);padding:16px;overflow-y:auto;border-right:1px solid rgba(255,255,255,.05);display:flex;flex-direction:column;gap:12px}.sidebar h2{font-size:1rem;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:1px}.item-card{background:var(--bg);border-radius:var(--radius);padding:12px;cursor:pointer;border:1px solid rgba(255,255,255,.05);transition:border-color .2s}.item-card:hover{border-color:#ffffff26}.item-card.expanded{border-color:#fff3}.item-header{display:flex;align-items:center;gap:10px}.color-dot{width:14px;height:14px;border-radius:50%;flex-shrink:0}.item-name{font-weight:600;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.item-summary{font-size:.8rem;color:var(--text-muted);margin-top:4px;padding-left:24px}.item-details{margin-top:12px;padding-top:12px;border-top:1px solid rgba(255,255,255,.05)}.item-info{display:grid;grid-template-columns:1fr 1fr;gap:6px;font-size:.8rem;margin-bottom:12px}.item-info dt{color:var(--text-muted)}.item-info dd{font-weight:600;text-align:right}.measurements-list{max-height:160px;overflow-y:auto;margin-bottom:10px}.measurement-row{display:flex;justify-content:space-between;align-items:center;padding:4px 0;font-size:.8rem;border-bottom:1px solid rgba(255,255,255,.03)}.measurement-row .date{color:var(--text-muted)}.measurement-row .delete-m{background:none;border:none;color:#666;cursor:pointer;padding:2px 6px;font-size:.75rem}.measurement-row .delete-m:hover{color:var(--accent);background:none}.add-measurement-form{display:flex;gap:6px;margin-bottom:8px}.add-measurement-form input{flex:1;min-width:0}input,select{background:var(--surface2);color:var(--text);border:1px solid rgba(255,255,255,.1);padding:7px 10px;border-radius:var(--radius);font-size:.85rem}input:focus,select:focus{outline:none;border-color:var(--accent)}.main{flex:1;padding:20px;display:flex;flex-direction:column;min-width:0}.chart-container{flex:1;position:relative;min-height:300px}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:var(--text-muted);gap:12px;font-size:1.1rem}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;z-index:100;display:flex;align-items:center;justify-content:center}.modal{background:var(--surface);border-radius:12px;padding:24px;width:380px;max-width:90vw;border:1px solid rgba(255,255,255,.1)}.modal h3{margin-bottom:16px;font-size:1.1rem}.form-group{margin-bottom:12px}.form-group label{display:block;font-size:.8rem;color:var(--text-muted);margin-bottom:4px}.form-group input{width:100%}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.pref-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;z-index:100;display:flex;justify-content:flex-end}.pref-panel{background:var(--surface);width:320px;height:100%;padding:24px;overflow-y:auto;border-left:1px solid rgba(255,255,255,.1);display:flex;flex-direction:column;gap:24px}.pref-panel h2{font-size:1.1rem;font-weight:700}.pref-section h3{font-size:.75rem;color:var(--text-muted);text-transform:uppercase;letter-spacing:1px;margin-bottom:12px}.pref-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-size:.9rem;gap:12px}.pref-row select{flex-shrink:0}.tab-bar{display:none}@media(max-width:768px){.tab-bar{display:flex;background:var(--surface);border-bottom:1px solid rgba(255,255,255,.08);flex-shrink:0}.tab-bar button{flex:1;padding:12px;border-radius:0;border:none;border-bottom:3px solid transparent;background:transparent;font-size:.95rem;font-weight:600;color:var(--text-muted);transition:color .2s,border-color .2s}.tab-bar button:hover{background:#ffffff0a}.tab-bar button.active{color:var(--text);border-bottom-color:var(--accent)}.app{flex-direction:column}.sidebar{width:100%;min-width:0;border-right:none;flex:1}.app[data-tab=chart] .sidebar,.app[data-tab=items] .main{display:none}.pref-panel{width:100%;height:auto;max-height:90vh;border-left:none;border-top:1px solid rgba(255,255,255,.1)}}h1.svelte-oiwvqb{display:flex;align-items:center}.logo.svelte-oiwvqb{height:1.6em;width:1.6em;margin-right:.4em}.gear-btn.svelte-oiwvqb{background:none;border:none;font-size:2.6rem;cursor:pointer;color:var(--text-muted);padding:4px 8px;border-radius:var(--radius);transition:color .2s;line-height:1}.gear-btn.svelte-oiwvqb:hover{color:var(--text);background:none}.gear-icon.svelte-oiwvqb{width:1.6rem;height:1.6rem;display:block}
