*{box-sizing:border-box;margin:0;padding:0}body{color:#1a1a2e;direction:rtl;background-color:#f0f2f5;min-height:100vh;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif}a{color:#4361ee;text-decoration:none}a:hover{text-decoration:underline}.auth-container{justify-content:center;align-items:center;min-height:100vh;padding:1rem;display:flex}.auth-card{background:#fff;border-radius:16px;width:100%;max-width:420px;padding:2.5rem;box-shadow:0 4px 24px #0000001a}.auth-card h1{text-align:center;color:#1a1a2e;margin-bottom:1.5rem;font-size:1.8rem}.form-group{margin-bottom:1rem}.form-group label{margin-bottom:.4rem;font-size:.9rem;font-weight:600;display:block}.form-group input{border:2px solid #e0e0e0;border-radius:8px;width:100%;padding:.7rem 1rem;font-size:1rem;transition:border-color .2s}.form-group input:focus{border-color:#4361ee;outline:none}.divider{text-align:center;color:#888;margin:1.2rem 0;position:relative}.divider:before,.divider:after{content:"";background:#ddd;width:40%;height:1px;position:absolute;top:50%}.divider:before{right:0}.divider:after{left:0}.google-login{justify-content:center;margin-bottom:1rem;display:flex}.auth-link{text-align:center;margin-top:1rem;font-size:.9rem}.btn{cursor:pointer;border:none;border-radius:8px;padding:.7rem 1.5rem;font-size:1rem;font-weight:600;transition:background-color .2s,transform .1s}.btn:active{transform:scale(.97)}.btn-primary{color:#fff;background-color:#4361ee;width:100%}.btn-primary:hover{background-color:#3a56d4}.btn-secondary{color:#333;background-color:#e0e0e0}.btn-secondary:hover{background-color:#d0d0d0}.btn-delete{color:#e74c3c;background:0 0;border-radius:50%;padding:.3rem .6rem;font-size:1.2rem}.btn-delete:hover{background-color:#ffeaea}.home-container{max-width:700px;margin:0 auto;padding:1.5rem}.app-header{justify-content:space-between;align-items:center;margin-bottom:1rem;display:flex}.app-header h1{font-size:1.6rem}.header-right{align-items:center;gap:1rem;display:flex}.welcome{color:#555;font-weight:500}.tab-bar{background:#fff;border-radius:12px;margin-bottom:1.5rem;padding:.3rem;display:flex;position:relative;overflow:hidden;box-shadow:0 2px 8px #0000000f}.tab-item{color:#888;cursor:pointer;z-index:1;background:0 0;border:none;border-radius:10px;flex:1;justify-content:center;align-items:center;gap:.4rem;padding:.7rem 1rem;font-size:.95rem;font-weight:600;transition:color .25s,background-color .25s;display:flex;position:relative}.tab-item:hover{color:#555}.tab-item.tab-active{color:#4361ee;background:#e8eaf6}.tab-emoji{font-size:1.2rem}.tab-label{white-space:nowrap}.tab-content{min-height:200px}.add-form{gap:.5rem;margin-bottom:1.5rem;display:flex}.add-input{border:2px solid #e0e0e0;border-radius:8px;flex:1;padding:.7rem 1rem;font-size:1rem}.add-input:focus{border-color:#4361ee;outline:none}.quantity-input{text-align:center;border:2px solid #e0e0e0;border-radius:8px;width:70px;padding:.7rem;font-size:1rem}.quantity-input:focus{border-color:#4361ee;outline:none}.add-form .btn-primary{white-space:nowrap;width:auto}.unit-select{cursor:pointer;background:#fff;border:2px solid #e0e0e0;border-radius:8px;min-width:80px;padding:.7rem .5rem;font-size:.9rem}.unit-select:focus{border-color:#4361ee;outline:none}.grocery-group{background:#fff;border-radius:12px;margin-bottom:1rem;padding:1rem 1.5rem;box-shadow:0 2px 8px #0000000f}.group-title{color:#333;border-bottom:2px solid #f0f2f5;margin-bottom:.8rem;padding-bottom:.5rem;font-size:1.1rem}.grocery-group ul{list-style:none}.grocery-item{border-bottom:1px solid #f5f5f5;justify-content:space-between;align-items:center;padding:.6rem 0;display:flex}.grocery-item:last-child{border-bottom:none}.item-info{align-items:center;gap:.5rem;display:flex}.item-name{font-size:1rem;transition:color .2s,-webkit-text-decoration .2s,text-decoration .2s}.item-name:hover{color:#4361ee}.grocery-done{opacity:.55}.item-name-done{color:#999;text-decoration:line-through}.item-name-done:hover{color:#666}.quantity-controls{align-items:center;gap:.3rem;display:flex}.btn-quantity{color:#4361ee;cursor:pointer;background:#e8eaf6;border:none;border-radius:50%;justify-content:center;align-items:center;width:26px;height:26px;padding:0;font-size:.9rem;font-weight:700;transition:background-color .2s;display:flex}.btn-quantity:hover:not(:disabled){background-color:#c5cae9}.btn-quantity:disabled{opacity:.4;cursor:not-allowed}.item-quantity{color:#4361ee;text-align:center;background:#e8eaf6;border-radius:12px;min-width:1.5rem;padding:.1rem .5rem;font-size:.85rem;font-weight:600}.item-actions{align-items:center;gap:.3rem;display:flex}.btn-type{cursor:pointer;background:0 0;border-radius:8px;padding:.3rem .5rem;font-size:1.2rem}.btn-type:hover{background-color:#f0f2f5}.type-select{cursor:pointer;background:#fff;border:2px solid #4361ee;border-radius:8px;padding:.3rem .5rem;font-size:.9rem}.type-select:focus{outline:none}.complete-bar{justify-content:center;margin-bottom:1rem;display:flex}.btn-complete{color:#fff;cursor:pointer;background-color:#4caf50;border:none;border-radius:8px;padding:.7rem 1.5rem;font-size:1rem;font-weight:600;transition:background-color .2s,transform .1s}.btn-complete:hover{background-color:#43a047}.btn-complete:active{transform:scale(.97)}.btn-complete:disabled{cursor:not-allowed;background-color:#c8e6c9}.modal-overlay{z-index:1000;background:#0006;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.modal-card{text-align:center;background:#fff;border-radius:16px;width:90%;max-width:400px;padding:2rem;box-shadow:0 8px 32px #00000026}.modal-card h2{margin-bottom:.8rem;font-size:1.3rem}.modal-card p{color:#666;margin-bottom:1.2rem;font-size:.95rem;line-height:1.5}.modal-card .btn{width:auto;min-width:100px}.smart-bar{justify-content:center;gap:.5rem;margin-bottom:1rem;display:flex}.btn-refresh{color:#333;cursor:pointer;background:#f0f2f5;border:none;border-radius:8px;padding:.7rem 1rem;font-size:.95rem;font-weight:600;transition:background-color .2s,transform .1s}.btn-refresh:hover{background:#e0e2e5}.btn-refresh:active{transform:scale(.97)}.btn-refresh:disabled{opacity:.6;cursor:not-allowed}.btn-smart{color:#fff;cursor:pointer;background:linear-gradient(135deg,#667eea,#764ba2);border:none;border-radius:8px;padding:.7rem 1.5rem;font-size:1rem;font-weight:600;transition:transform .1s,box-shadow .2s;box-shadow:0 2px 8px #667eea4d}.btn-smart:hover{box-shadow:0 4px 12px #667eea73}.btn-smart:active{transform:scale(.97)}.btn-smart:disabled{opacity:.6;cursor:not-allowed}.smart-modal{text-align:right;max-height:80vh;overflow-y:auto}.smart-modal h2{text-align:center;margin-bottom:.5rem}.smart-modal-desc{text-align:center;color:#888;margin-bottom:1rem;font-size:.85rem}.smart-suggestion-list{flex-direction:column;gap:.5rem;margin-bottom:1rem;display:flex}.smart-suggestion{cursor:pointer;background:#f8f9fa;border-radius:8px;align-items:center;gap:.6rem;padding:.6rem .8rem;transition:background-color .15s;display:flex}.smart-suggestion:hover{background:#eef0f5}.smart-suggestion.selected{background:#e8eaf6;border:2px solid #4361ee}.smart-checkbox{accent-color:#4361ee;cursor:pointer;width:20px;height:20px}.smart-suggestion-info{flex-direction:column;flex:1;gap:.1rem;display:flex}.smart-suggestion-name{font-size:.95rem;font-weight:500}.smart-suggestion-meta{color:#888;font-size:.8rem}.reason-badge{border-radius:8px;padding:.1rem .4rem;font-size:.7rem;font-weight:600}.reason-frequent{color:#1565c0;background:#e3f2fd}.reason-missing{color:#e65100;background:#fff3e0}.reason-expired{color:#e74c3c;background:#ffeaea}.smart-modal-actions{justify-content:center;gap:.5rem;display:flex}.smart-empty{text-align:center;color:#888;padding:1.5rem;font-size:.95rem}.loading{text-align:center;color:#888;padding:3rem;font-size:1.1rem}.empty-state{text-align:center;color:#888;padding:3rem}.empty-state p:first-child{margin-bottom:.5rem;font-size:2rem}.error-message{color:#e74c3c;text-align:center;background:#ffeaea;border-radius:8px;margin-bottom:1rem;padding:.8rem 1rem;font-weight:500}.home-setup{flex-direction:column;align-items:center;gap:1rem;display:flex}.setup-card{text-align:center;background:#fff;border-radius:12px;width:100%;padding:1.5rem 2rem;box-shadow:0 2px 8px #0000000f}.setup-card h2{margin-bottom:.5rem;font-size:1.3rem}.setup-card p{color:#888;margin-bottom:1rem;font-size:.9rem}.setup-form{gap:.5rem;display:flex}.setup-divider{color:#888;padding:.3rem 0;font-size:.9rem}.home-header-card{background:#fff;border-radius:12px;margin-bottom:1rem;padding:1rem 1.5rem;box-shadow:0 2px 8px #0000000f}.home-title-row{justify-content:space-between;align-items:center;margin-bottom:.8rem;display:flex}.home-title-row h2{margin:0;font-size:1.2rem}.home-actions{gap:.5rem;display:flex}.btn-delete-home{color:#e74c3c;cursor:pointer;background:#ffeaea;border:none;border-radius:8px;padding:.4rem .8rem;font-size:.85rem;font-weight:600}.btn-delete-home:hover{background:#fdd}.invite-section{align-items:center;gap:.5rem;margin-bottom:.6rem;font-size:.9rem;display:flex}.invite-label{color:#888}.invite-code{color:#4361ee;letter-spacing:1px;background:#e8eaf6;border-radius:6px;padding:.2rem .6rem;font-family:monospace;font-size:1rem;font-weight:700}.members-section{flex-wrap:wrap;align-items:center;gap:.5rem;font-size:.9rem;display:flex}.members-label{color:#888}.members-list{flex-wrap:wrap;gap:.4rem;display:flex}.member-badge{background:#f0f2f5;border-radius:12px;padding:.2rem .6rem;font-size:.85rem;font-weight:500}.section-title{color:#333;margin-bottom:.8rem;font-size:1.1rem}.home-grocery-item{cursor:pointer;border-bottom:1px solid #f5f5f5;justify-content:space-between;align-items:center;padding:.6rem 0;transition:background-color .15s;display:flex}.home-grocery-item:hover{background-color:#f8f9fa}.home-grocery-item:last-child{border-bottom:none}.home-grocery-info{flex:1;align-items:center;gap:.5rem;display:flex}.home-grocery-name{font-size:1rem}.home-grocery-qty{color:#4361ee;background:#e8eaf6;border-radius:10px;padding:.1rem .45rem;font-size:.8rem;font-weight:600}.home-grocery-badges{gap:.3rem;display:flex}.badge-expired{color:#e74c3c;background:#ffeaea;border-radius:10px;padding:.15rem .5rem;font-size:.75rem;font-weight:600}.badge-expiring-soon{color:#f57f17;background:#fff8e1;border-radius:10px;padding:.15rem .5rem;font-size:.75rem;font-weight:600}.detail-modal{text-align:right;max-height:80vh;overflow-y:auto}.detail-modal h2{text-align:center;margin-bottom:1rem}.batch-list{flex-direction:column;gap:.8rem;margin-bottom:1rem;display:flex}.batch-card{background:#f8f9fa;border-radius:10px;padding:.8rem 1rem}.batch-card.batch-expired{background:#fff5f5;border:1px solid #fecaca}.batch-row{justify-content:space-between;align-items:center;margin-bottom:.4rem;font-size:.9rem;display:flex}.batch-row:last-child{margin-bottom:0}.batch-label{color:#888}.batch-value{font-weight:500}.batch-value.expired-text{color:#e74c3c;font-weight:600}.batch-actions{justify-content:flex-end;gap:.4rem;margin-top:.5rem;display:flex}.btn-batch{cursor:pointer;border:none;border-radius:6px;padding:.3rem .7rem;font-size:.8rem;font-weight:600;transition:background-color .2s}.btn-batch-remove{color:#e74c3c;background:#ffeaea}.btn-batch-remove:hover{background:#fdd}.btn-batch-date{color:#4361ee;background:#e8eaf6}.btn-batch-date:hover{background:#c5cae9}.date-edit-row{align-items:center;gap:.4rem;margin-top:.4rem;display:flex}.date-input{border:2px solid #e0e0e0;border-radius:6px;flex:1;padding:.3rem .5rem;font-size:.85rem}.date-input:focus{border-color:#4361ee;outline:none}.btn-date-save{color:#fff;background:#4361ee}.btn-date-cancel{color:#333;background:#e0e0e0}@media (max-width:600px){.home-container{padding:.8rem}.app-header{text-align:center;flex-direction:column;gap:.5rem}.app-header h1{font-size:1.3rem}.header-right{justify-content:center;width:100%}.welcome{font-size:.85rem}.tab-item{gap:.2rem;padding:.6rem .4rem;font-size:.8rem}.tab-emoji{font-size:1rem}.add-form{flex-wrap:wrap}.add-input{flex:100%;min-width:0}.quantity-input{flex-shrink:0;width:60px}.unit-select{flex-shrink:0;min-width:70px}.add-form .btn-primary{flex-shrink:0}.grocery-group{padding:.7rem .8rem}.grocery-item{flex-wrap:wrap;gap:.4rem}.item-info{flex-wrap:wrap;flex:1;min-width:0}.item-name{word-break:break-word;font-size:.9rem}.item-quantity{padding:.1rem .4rem;font-size:.75rem}.quantity-controls{gap:.2rem}.btn-quantity{width:24px;height:24px;font-size:.8rem}.item-actions{gap:.2rem}.btn-complete,.btn-smart{padding:.6rem 1rem;font-size:.9rem}.btn-refresh{padding:.6rem .8rem;font-size:.85rem}.modal-card{width:95%;max-width:95%;margin:.5rem;padding:1.2rem}.modal-card h2{font-size:1.1rem}.modal-card p{font-size:.85rem}.smart-modal{max-height:85vh}.smart-suggestion{gap:.4rem;padding:.5rem .6rem}.smart-suggestion-name{font-size:.85rem}.smart-suggestion-meta{font-size:.75rem}.reason-badge{white-space:nowrap;padding:.1rem .3rem;font-size:.65rem}.batch-card{padding:.6rem .8rem}.batch-row{flex-wrap:wrap;gap:.2rem;font-size:.8rem}.batch-actions{flex-wrap:wrap;gap:.3rem}.btn-batch{padding:.25rem .5rem;font-size:.75rem}.date-edit-row{flex-wrap:wrap}.date-input{min-width:0;font-size:.8rem}.setup-card{padding:1rem 1.2rem}.setup-form{flex-wrap:wrap}.setup-form .add-input{flex:100%}.home-header-card{padding:.8rem 1rem}.home-title-row{flex-wrap:wrap;gap:.5rem}.home-title-row h2{font-size:1.05rem}.invite-section{flex-wrap:wrap;font-size:.8rem}.invite-code{font-size:.85rem}.home-grocery-item{flex-wrap:wrap;gap:.3rem}.home-grocery-name{font-size:.9rem}.home-grocery-badges{flex-wrap:wrap}.badge-expired,.badge-expiring-soon{font-size:.7rem}.auth-card{padding:1.5rem}.auth-card h1{font-size:1.4rem}}
