*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:root{--bg: #0f0f0f;--surface: #1a1a1a;--surface2: #242424;--border: #2e2e2e;--text: #e8e8e8;--text-muted: #888;--accent: #f0a500;--accent-dim: rgba(240,165,0,.15);--red: #e05252;--green: #52c152;--radius: 10px;--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif}html,body,#root{height:100%}body{font-family:var(--font);background:var(--bg);color:var(--text);font-size:15px;line-height:1.5}button{cursor:pointer;font:inherit;border:none;background:none;color:inherit}ul{list-style:none}a{color:var(--accent)}.app{display:flex;flex-direction:column;height:100%}.main{flex:1;overflow:hidden;display:flex;flex-direction:column}.header{display:flex;align-items:center;gap:1rem;padding:.6rem 1rem;background:var(--surface);border-bottom:1px solid var(--border);flex-shrink:0}.header-logo{font-size:1.1rem;font-weight:700}.tabs{display:flex;gap:.25rem;flex:1}.tab-btn{padding:.35rem .8rem;border-radius:6px;color:var(--text-muted);transition:all .15s}.tab-btn:hover{color:var(--text);background:var(--surface2)}.tab-btn.active{color:var(--accent);background:var(--accent-dim);font-weight:600}.ws-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.ws-connecting{background:var(--accent);animation:pulse 1s infinite}.ws-open{background:var(--green)}.ws-closed,.ws-error{background:var(--red)}@keyframes pulse{0%,to{opacity:1}50%{opacity:.3}}.chat-panel{display:flex;flex-direction:column;flex:1;overflow:hidden}.messages{flex:1;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:1rem}.empty-chat{color:var(--text-muted);text-align:center;margin-top:2rem}.msg{display:flex;gap:.6rem;max-width:800px}.msg-user{align-self:flex-end;flex-direction:row-reverse}.msg-user .msg-bubble{background:var(--accent);color:#000;border-radius:var(--radius) 2px var(--radius) var(--radius);padding:.6rem .9rem;max-width:70%;white-space:pre-wrap}.msg-chef{align-self:flex-start}.msg-chef .msg-bubble{background:var(--surface);border:1px solid var(--border);border-radius:2px var(--radius) var(--radius) var(--radius);padding:.7rem 1rem;max-width:min(70%,600px)}.msg-error .msg-bubble{background:#e0525226;border:1px solid var(--red);border-radius:var(--radius);padding:.6rem .9rem;color:var(--red)}.msg-avatar{font-size:1.4rem;flex-shrink:0;line-height:1;margin-top:4px}.prose{font-size:.95rem}.prose p{margin-bottom:.6em}.prose p:last-child{margin-bottom:0}.prose ul,.prose ol{padding-left:1.4em;margin-bottom:.6em}.prose li{margin-bottom:.2em}.prose h1,.prose h2,.prose h3,.prose h4{font-weight:700;margin:.8em 0 .3em;line-height:1.2}.prose h1{font-size:1.3em}.prose h2{font-size:1.15em}.prose h3{font-size:1.05em}.prose code{background:var(--surface2);padding:.1em .4em;border-radius:4px;font-size:.88em;font-family:Fira Code,Cascadia Code,Consolas,monospace}.prose pre{background:var(--surface2);border:1px solid var(--border);border-radius:6px;padding:.8em 1em;overflow-x:auto;margin:.6em 0}.prose pre code{background:none;padding:0}.prose blockquote{border-left:3px solid var(--accent);padding-left:.8em;color:var(--text-muted);margin:.5em 0}.prose table{border-collapse:collapse;width:100%;margin:.6em 0}.prose th,.prose td{border:1px solid var(--border);padding:.4em .7em;text-align:left}.prose th{background:var(--surface2)}.prose strong{color:var(--text)}.prose a{color:var(--accent)}.chat-input-row{display:flex;gap:.5rem;padding:.75rem 1rem;border-top:1px solid var(--border);background:var(--surface);flex-shrink:0;align-items:flex-end}.scan-btn{font-size:1.2rem;padding:.4rem;border-radius:8px;flex-shrink:0;transition:background .15s}.scan-btn:hover{background:var(--surface2)}.chat-input{flex:1;background:var(--surface2);border:1px solid var(--border);border-radius:8px;color:var(--text);padding:.55rem .8rem;resize:none;font:inherit;max-height:8rem;overflow-y:auto;field-sizing:content}.chat-input::placeholder{color:var(--text-muted)}.chat-input:focus{outline:none;border-color:var(--accent)}.chat-input:disabled{opacity:.5}.send-btn{width:36px;height:36px;border-radius:8px;background:var(--accent);color:#000;font-size:1.1rem;font-weight:700;flex-shrink:0;transition:opacity .15s}.send-btn:disabled{opacity:.35;cursor:not-allowed}.panel-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1rem .5rem;flex-shrink:0}.panel-header h2{font-size:1.1rem}.count{color:var(--text-muted);font-weight:400;font-size:.9em}.panel-loading,.panel-error{padding:1.5rem;color:var(--text-muted)}.panel-error{color:var(--red)}.empty{color:var(--text-muted);padding:1rem}.setup-wizard{margin:2rem 0;padding:2rem;background:var(--surface2);border:1px solid var(--border);border-radius:12px;text-align:center}.setup-wizard-title{font-size:1.1rem;font-weight:600;margin-bottom:.5rem}.setup-wizard-hint{color:var(--text-muted);margin-bottom:1.5rem;max-width:440px;margin-left:auto;margin-right:auto;line-height:1.5}.setup-wizard-actions{display:flex;gap:.75rem;justify-content:center;flex-wrap:wrap}.btn-primary{background:var(--accent);color:#000;font-weight:600;padding:.5rem 1.2rem;border-radius:8px;transition:opacity .15s}.btn-primary:hover{opacity:.85}.btn-secondary{background:var(--surface2);border:1px solid var(--border);color:var(--text);padding:.4rem .9rem;border-radius:8px;transition:background .15s}.btn-secondary:hover{background:var(--border)}.inventory-panel{display:flex;flex-direction:column;flex:1;overflow:hidden}.inv-toolbar{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.75rem 1rem .5rem;flex-shrink:0;border-bottom:1px solid var(--border)}.inv-toolbar-left{display:flex;align-items:baseline;gap:.4rem}.inv-title{font-size:1.05rem;font-weight:700}.inv-toolbar-right{display:flex;align-items:center;gap:.4rem}.inv-search{background:var(--surface2);border:1px solid var(--border);border-radius:6px;color:var(--text);padding:.3rem .65rem;font:inherit;font-size:.85rem;width:140px}.inv-search:focus{outline:none;border-color:var(--accent)}.btn-icon{font-size:1rem;padding:.3rem .5rem;border-radius:6px;color:var(--text-muted);transition:color .1s,background .1s}.btn-icon:hover{color:var(--text);background:var(--surface2)}.inv-body{flex:1;overflow-y:auto;padding-bottom:.5rem}.inv-category{border-bottom:1px solid var(--border)}.cat-header{display:flex;align-items:center}.cat-toggle{flex:1;display:flex;align-items:center;gap:.5rem;padding:.65rem 1rem;text-align:left;transition:background .1s;font-size:.9rem}.cat-toggle:hover{background:var(--surface2)}.cat-emoji{font-size:1rem}.cat-label{font-weight:600}.cat-count{margin-left:auto;color:var(--text-muted);font-size:.8em;background:var(--surface2);border-radius:10px;padding:.05em .5em;min-width:1.5em;text-align:center}.chevron{color:var(--text-muted);font-size:.7em;margin-left:.1rem}.cat-add-btn{padding:.3rem .75rem;margin-right:.75rem;font-size:.8rem;color:var(--accent);border:1px solid var(--accent);border-radius:6px;opacity:.75;transition:opacity .15s,background .15s;flex-shrink:0}.cat-add-btn:hover{opacity:1;background:var(--accent-dim)}.inv-items{display:flex;flex-direction:column;padding:.2rem 0 .5rem}.inv-item{display:flex;align-items:center;gap:.5rem;padding:.3rem 1rem .3rem 2rem;font-size:.875rem;border-radius:0;transition:background .1s;min-height:2.1rem}.inv-item:hover{background:var(--surface2)}.inv-item:hover .inv-item-actions{opacity:1}.inv-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inv-qty-area{display:flex;align-items:center;gap:.2rem;flex-shrink:0}.inv-qty{color:var(--text-muted);font-size:.85em;min-width:3em;text-align:center}.qty-adj{width:20px;height:20px;border-radius:4px;border:1px solid var(--border);color:var(--text-muted);font-size:.95rem;line-height:1;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .1s,color .1s,background .1s}.inv-item:hover .qty-adj{opacity:1}.qty-adj:hover{color:var(--text);background:var(--border)}.inv-notes{color:var(--text-muted);font-size:.78em;font-style:italic;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inv-notes-warn{color:var(--accent);font-style:normal;font-weight:500}.inv-item-actions{display:flex;gap:.2rem;opacity:0;transition:opacity .1s;flex-shrink:0}.inv-act{width:24px;height:24px;border-radius:4px;color:var(--text-muted);font-size:.9rem;display:flex;align-items:center;justify-content:center;transition:color .1s,background .1s}.inv-act:hover{color:var(--text);background:var(--border)}.inv-act-del:hover{color:var(--red);background:#e052521f}.inv-item-confirming{background:#e0525212}.inv-delete-confirm{display:flex;align-items:center;gap:.3rem;font-size:.8rem;flex-shrink:0}.inv-delete-confirm span{color:var(--text-muted)}.btn-confirm-del{padding:.15rem .5rem;border-radius:4px;font-size:.8rem;background:var(--red);color:#fff;font-weight:600}.btn-cancel-del{padding:.15rem .5rem;border-radius:4px;font-size:.8rem;background:var(--surface2);border:1px solid var(--border);color:var(--text-muted)}.inv-item-edit{background:var(--surface2);border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:.4rem .75rem;gap:.35rem;flex-wrap:wrap}.inv-item-edit:hover{background:var(--surface2)}.inv-field{background:var(--surface);border:1px solid var(--border);border-radius:5px;color:var(--text);padding:.3rem .5rem;font:inherit;font-size:.85rem}.inv-field:focus{outline:none;border-color:var(--accent)}.inv-field::placeholder{color:var(--text-muted)}.inv-field-name{flex:2;min-width:100px}.inv-field-qty{width:68px;flex-shrink:0}.inv-field-unit{width:72px;flex-shrink:0}.inv-field-notes{flex:1;min-width:80px}.inv-edit-btns{display:flex;gap:.25rem;flex-shrink:0}.btn-save-item{width:28px;height:28px;border-radius:5px;background:var(--accent);color:#000;font-weight:700;font-size:.9rem;transition:opacity .15s}.btn-save-item:disabled{opacity:.35;cursor:not-allowed}.btn-cancel-item{width:28px;height:28px;border-radius:5px;background:var(--surface);border:1px solid var(--border);color:var(--text-muted);font-size:.9rem;transition:color .1s}.btn-cancel-item:hover{color:var(--text)}.inv-no-match{padding:.4rem 2rem;color:var(--text-muted);font-size:.82rem;font-style:italic}.inv-add-strip{display:flex;flex-wrap:wrap;gap:.4rem;padding:.75rem 1rem;border-top:1px dashed var(--border);margin-top:.25rem}.inv-add-cat-btn{font-size:.78rem;padding:.25rem .65rem;border-radius:6px;border:1px solid var(--border);color:var(--text-muted);background:var(--surface2);transition:color .1s,border-color .1s}.inv-add-cat-btn:hover{color:var(--accent);border-color:var(--accent)}.inv-chat{flex-shrink:0;border-top:1px solid var(--border);background:var(--surface)}.inv-chat-expanded .inv-chat-history{max-height:220px;overflow-y:auto;padding:.6rem .75rem .25rem;display:flex;flex-direction:column;gap:.5rem}.inv-cmsg{display:flex;align-items:flex-start;gap:.4rem;font-size:.83rem;line-height:1.45}.inv-cmsg-user{flex-direction:row-reverse}.inv-cmsg-who{font-size:1rem;flex-shrink:0;margin-top:1px}.inv-cmsg-you{font-size:.72rem;color:var(--text-muted);font-style:italic;margin-top:3px}.inv-cmsg-chef .inv-cmsg-text{background:var(--surface2);border:1px solid var(--border);border-radius:3px 8px 8px;padding:.35rem .6rem;color:var(--text);max-width:88%;display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden}.inv-cmsg-user .inv-cmsg-text{background:var(--accent);color:#000;border-radius:8px 3px 8px 8px;padding:.35rem .6rem;max-width:88%;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.inv-cmsg-live{font-style:italic;color:var(--text-muted)!important}.inv-typing-dots{display:inline-flex;gap:3px;align-items:center;padding:.1em 0}.inv-typing-dots span{width:5px;height:5px;background:var(--text-muted);border-radius:50%;animation:inv-dot 1.2s infinite}.inv-typing-dots span:nth-child(2){animation-delay:.2s}.inv-typing-dots span:nth-child(3){animation-delay:.4s}@keyframes inv-dot{0%,80%,to{opacity:.2;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}.inv-chat-bar{display:flex;align-items:center;gap:.4rem;padding:.5rem .75rem}.inv-chat-toggle{font-size:.7rem;color:var(--text-muted);padding:.25rem .4rem;border-radius:4px;flex-shrink:0;transition:color .1s}.inv-chat-toggle:hover{color:var(--text)}.inv-chat-input{flex:1;background:var(--surface2);border:1px solid var(--border);border-radius:8px;color:var(--text);padding:.45rem .75rem;font:inherit;font-size:.875rem}.inv-chat-input::placeholder{color:var(--text-muted);font-size:.85rem}.inv-chat-input:focus{outline:none;border-color:var(--accent)}.inv-chat-input:disabled{opacity:.45}.inv-chat-send{width:32px;height:32px;border-radius:8px;background:var(--accent);color:#000;font-size:1rem;font-weight:700;flex-shrink:0;transition:opacity .15s}.inv-chat-send:disabled{opacity:.35;cursor:not-allowed}.recipes-panel{display:flex;flex-direction:column;flex:1;overflow-y:auto;padding-bottom:1rem}.recipe-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:.75rem;padding:.5rem 1rem 1rem}.recipe-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:.9rem 1rem;text-align:left;transition:border-color .15s,background .15s}.recipe-card:hover{border-color:var(--accent);background:var(--surface2)}.recipe-card.active{border-color:var(--accent);background:var(--accent-dim)}.recipe-name{font-weight:600;margin-bottom:.4rem}.recipe-meta{display:flex;gap:.6rem;font-size:.8rem;color:var(--text-muted);flex-wrap:wrap}.recipe-detail{margin:0 1rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.2rem}.recipe-detail-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:.8rem}.recipe-detail-header h3{font-size:1.15rem}.recipe-meta-row{display:flex;gap:1.2rem;color:var(--text-muted);font-size:.85rem;margin-bottom:1rem;flex-wrap:wrap}.recipe-detail section{margin-bottom:1rem}.recipe-detail h4{font-size:.85rem;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);margin-bottom:.4rem}.recipe-notes{color:var(--text-muted);font-size:.9rem}.cook-btn{width:100%;margin-top:1rem;padding:.65rem;font-size:1rem;border-radius:var(--radius)}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#000000b3;display:flex;align-items:center;justify-content:center;z-index:100;padding:1rem}.modal{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.2rem;width:100%;max-width:480px;max-height:80vh;overflow-y:auto}.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.modal-header h2{font-size:1.1rem}.modal-close{color:var(--text-muted);font-size:1rem;padding:.2rem .4rem;border-radius:4px;transition:color .1s}.modal-close:hover{color:var(--text)}.drop-zone{border:2px dashed var(--border);border-radius:var(--radius);padding:2.5rem 1rem;text-align:center;cursor:pointer;transition:border-color .15s,background .15s}.drop-zone:hover{border-color:var(--accent);background:var(--accent-dim)}.drop-zone p{margin-bottom:.4rem}.hint{color:var(--text-muted);font-size:.85rem}.scan-status{color:var(--text-muted);padding:1rem 0;text-align:center}.scan-error{color:var(--red);margin-bottom:.8rem}.scan-found{color:var(--green);margin-bottom:.6rem}.scan-list{display:flex;flex-direction:column;gap:.35rem;margin-bottom:1rem}.scan-list li{font-size:.9rem}.item-cat{color:var(--text-muted);font-size:.8em}.modal-actions{display:flex;gap:.6rem;justify-content:flex-end;margin-top:1rem}.settings-panel{flex:1;overflow-y:auto;padding:1.2rem 1rem;max-width:600px;margin:0 auto;width:100%}.settings-section{padding:1.2rem 0;border-bottom:1px solid var(--border)}.settings-section:last-child{border-bottom:none}.settings-section-title{font-size:.72rem;text-transform:uppercase;letter-spacing:.09em;color:var(--text-muted);font-weight:600;margin-bottom:.85rem}.settings-section-title.danger{color:var(--red)}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.35rem 0}.settings-label,.settings-value{font-size:.9rem}.settings-muted{color:var(--text-muted)}.settings-select{background:var(--surface2);border:1px solid var(--border);border-radius:6px;color:var(--text);padding:.35rem .65rem;font:inherit;font-size:.9rem;cursor:pointer}.settings-select:focus{outline:none;border-color:var(--accent)}.settings-save-msg{font-size:.8rem;margin-top:.5rem;text-align:right}.settings-save-msg.ok{color:var(--green)}.settings-save-msg.err{color:var(--red)}.settings-danger-intro{font-size:.85rem;color:var(--text-muted);line-height:1.5;margin-bottom:1rem}.reset-options{display:flex;flex-direction:column;gap:.5rem;margin-bottom:1rem}.reset-option{display:flex;gap:.75rem;align-items:flex-start;cursor:pointer;padding:.65rem .8rem;border-radius:8px;border:1px solid var(--border);transition:border-color .15s,background .15s}.reset-option:hover{background:var(--surface2)}.reset-option input[type=checkbox]{margin-top:3px;flex-shrink:0;accent-color:var(--red)}.reset-option-content{display:flex;flex-direction:column;gap:.15rem}.reset-option-label{font-size:.9rem;font-weight:500}.reset-option-desc{font-size:.8rem;color:var(--text-muted);line-height:1.4}.reset-success-banner{display:flex;align-items:center;gap:.75rem;background:#52c1521a;border:1px solid var(--green);border-radius:8px;padding:.6rem .9rem;font-size:.85rem;color:var(--green);margin-bottom:.9rem;flex-wrap:wrap}.btn-reload{background:var(--green);color:#000;font-weight:600;font-size:.8rem;padding:.3rem .7rem;border-radius:6px;transition:opacity .15s;margin-left:auto}.btn-reload:hover{opacity:.85}.settings-danger-actions{display:flex;gap:.6rem;align-items:center}.btn-select-all{font-size:.8rem;color:var(--text-muted);padding:.35rem .65rem;border-radius:6px;border:1px solid var(--border);transition:color .1s,background .15s}.btn-select-all:hover{color:var(--text);background:var(--surface2)}.btn-reset{background:var(--red);color:#fff;font-weight:600;padding:.45rem 1rem;border-radius:8px;font-size:.9rem;transition:opacity .15s}.btn-reset:disabled{opacity:.35;cursor:not-allowed}.btn-reset:not(:disabled):hover{opacity:.85}.confirm-body{font-size:.9rem;color:var(--text-muted);margin-bottom:.75rem}.confirm-list{list-style:disc;padding-left:1.4rem;margin-bottom:1rem;font-size:.9rem}.confirm-list li{margin-bottom:.25rem}@media (max-width: 480px){.recipe-grid{grid-template-columns:1fr 1fr}.msg-user .msg-bubble,.msg-chef .msg-bubble{max-width:90%}.tabs{gap:0}.tab-btn{padding:.35rem .6rem;font-size:.85rem}}.auth-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:var(--bg);display:flex;align-items:center;justify-content:center;z-index:200;padding:1rem}.auth-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:2rem;width:100%;max-width:360px;text-align:center}.auth-logo{font-size:2rem;margin-bottom:.3rem}.auth-tagline{color:var(--text-muted);font-size:.85rem;margin-bottom:1.5rem}.auth-tabs{display:flex;border-bottom:1px solid var(--border);margin-bottom:1.2rem}.auth-tab{flex:1;padding:.5rem;color:var(--text-muted);border-bottom:2px solid transparent;transition:all .15s}.auth-tab.active{color:var(--accent);border-bottom-color:var(--accent)}.auth-form{display:flex;flex-direction:column;gap:.7rem}.auth-input{background:var(--surface2);border:1px solid var(--border);border-radius:8px;color:var(--text);padding:.65rem .9rem;font:inherit;text-align:left}.auth-input:focus{outline:none;border-color:var(--accent)}.auth-error{color:var(--red);font-size:.85rem;text-align:left}.auth-submit{background:var(--accent);color:#000;font-weight:600;padding:.65rem;border-radius:8px;margin-top:.3rem;transition:opacity .15s}.auth-submit:disabled{opacity:.5;cursor:not-allowed}.header-right{display:flex;align-items:center;gap:.6rem;flex-shrink:0}.user-menu{display:flex;align-items:center;gap:.4rem}.username{font-size:.8rem;color:var(--text-muted)}.logout-btn{font-size:.9rem;padding:.2rem .4rem;border-radius:4px;color:var(--text-muted);transition:color .1s}.logout-btn:hover{color:var(--text)}
