*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:#f4f5f7;color:#1a1a1a}.app{display:flex;flex-direction:column;min-height:100vh;max-width:720px;margin:0 auto;background:#fff}.app-header{background:#f60;color:#fff;padding:1rem;text-align:center}.app-header h1{margin:0;font-size:1.25rem}.app-version{margin-top:.25rem;font-size:.7rem;opacity:.7}.scope-toggle{display:flex;justify-content:center;gap:.5rem;margin-top:.5rem}.scope-button{background:#ffffff26;border:1px solid rgba(255,255,255,.4);color:#fff;border-radius:999px;padding:.25rem .75rem;font-size:.8rem;cursor:pointer}.scope-button.active{background:#fff;color:#f60;font-weight:600}.app-header-user{display:flex;align-items:center;justify-content:center;gap:.75rem;margin-top:.4rem;font-size:.85rem}.auth-page{max-width:360px;margin:0 auto}.auth-form{display:flex;flex-direction:column;gap:.75rem}.auth-form label{display:flex;flex-direction:column;gap:.3rem;font-size:.9rem}.auth-links{display:flex;flex-direction:column;gap:.5rem;margin-top:1rem;align-items:center}.link-button{background:none;border:none;color:#f60;text-decoration:underline;cursor:pointer;font-size:.9rem;padding:0}.link-button-light{color:#fff}.update-banner{position:fixed;bottom:3.5rem;left:0;right:0;z-index:2000;background:#1a1a1a;color:#fff;padding:.75rem 1rem;display:flex;align-items:center;justify-content:space-between;gap:1rem;max-width:720px;margin:0 auto}.update-banner span{font-size:.9rem}.app-main{flex:1;padding:1rem 1rem 5rem}.app-nav{position:fixed;bottom:0;left:0;right:0;max-width:720px;margin:0 auto;display:flex;border-top:1px solid #ddd;background:#fff}.nav-button{flex:1;padding:.9rem;border:none;background:none;font-size:.95rem;cursor:pointer;color:#555}.nav-button.active{color:#f60;font-weight:700;border-top:2px solid #ff6600}.btn{background:#f60;color:#fff;border:none;border-radius:6px;padding:.6rem 1.2rem;font-size:1rem;cursor:pointer}.btn:disabled{background:#ccc;cursor:default}.btn-secondary{background:#eee;color:#333}.btn-danger{background:#d9362e;color:#fff;margin-left:.5rem}.btn-small{padding:.3rem .6rem;font-size:.8rem}input[type=text],input[type=search],input[type=number],input[type=date],input[type=password],input[type=email]{width:100%;padding:.5rem;font-size:1rem;border:1px solid #ccc;border-radius:4px}table{width:100%;border-collapse:collapse;font-size:.9rem}th,td{border-bottom:1px solid #eee;padding:.4rem;text-align:left;overflow-wrap:break-word}.col-name{width:1px;white-space:nowrap}.receipt-table th:nth-child(2),.receipt-table td:nth-child(2),.receipt-table th:nth-child(3),.receipt-table td:nth-child(3),.receipt-table th:nth-child(4),.receipt-table td:nth-child(4),.receipt-table th:nth-child(5),.receipt-table td:nth-child(5){text-align:center}.receipt-table th:nth-child(5),.receipt-table td:nth-child(5){width:1px}.items-list{display:flex;flex-direction:column;gap:.5rem;margin:1rem 0}.item-card{border-bottom:1px solid #eee;padding-bottom:.5rem}.item-row-main{display:flex;gap:.5rem;margin-bottom:.3rem}.item-row-main input.field-auto{width:auto;min-width:3ch}.item-row-details{display:flex;flex-wrap:wrap;gap:.75rem}.item-row-details label{display:flex;flex-direction:column;font-size:.75rem;color:#666}.item-row-details input{width:auto}.item-card input{font-size:.85rem;padding:.3rem}th:nth-child(2),td:nth-child(2){width:30%}.error{color:#c0392b;background:#fdecea;border:1px solid #f5c6cb;border-radius:4px;padding:.5rem;margin:.5rem 0}.success{color:#2e7d32;background:#e8f5e9;border:1px solid #c8e6c9;border-radius:4px;display:flex;align-items:center;justify-content:space-between;padding:.5rem;margin:.5rem 0}.product-card{border:1px solid #eee;border-radius:6px;padding:.6rem;margin-bottom:.5rem;cursor:pointer}.product-card:hover{background:#fafafa}.price-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:.5rem;margin:1rem 0}.stat{border:1px solid #eee;border-radius:6px;padding:.5rem;text-align:center;cursor:pointer}.stat-static{cursor:default}.stat-label{display:block;font-size:.75rem;color:#777}.stat-value{display:block;font-weight:700;font-size:1.1rem}.stat-subvalue{display:block;font-size:.75rem;color:#777}.history-item{display:flex;justify-content:space-between;padding:.5rem 0;border-bottom:1px solid #eee;transition:background-color .3s}.history-item.highlighted{background-color:#fff3cd}.history-price{font-weight:700}.history-price.lowest{color:#2e7d32}.history-price.highest{color:#c0392b}.price-high{color:#c0392b;font-weight:700}.price-low{color:#2e7d32;font-weight:700}.clickable{cursor:pointer}.clickable:hover{text-decoration:underline}.tooltip-cell{position:relative}.tooltip-box{display:none;position:absolute;bottom:100%;left:50%;transform:translate(-50%);margin-bottom:.3rem;background:#fff;border:1px solid #ccc;border-radius:6px;box-shadow:0 2px 8px #00000026;padding:.4rem .6rem;white-space:nowrap;font-weight:400;font-size:.8rem;color:#333;text-align:left;z-index:10}.tooltip-cell:hover>.tooltip-box{display:block}.alert-icon{position:relative;display:inline-block;cursor:help}.alert-icon .tooltip-box{white-space:normal;width:220px}.alert-icon:hover .tooltip-box{display:block}.notes{font-size:.8rem;color:#777}.receipt-editor{border-top:2px solid #eee;margin-top:1rem;padding-top:1rem}.receipt-list-item{border-bottom:1px solid #eee;padding:.6rem 0;display:flex;justify-content:space-between;cursor:pointer}.receipt-list-item:hover{background:#fafafa}.date-filter{display:flex;align-items:flex-end;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}.date-filter label{display:flex;flex-direction:column;font-size:.85rem}.date-filter input[type=date]{width:auto}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000}.modal{background:#fff;border-radius:8px;padding:1.5rem;max-width:90vw;width:480px}.modal-compare{width:100%;margin:1rem 0}.modal-compare th,.modal-compare td{text-align:left;padding:.3rem .5rem;border-bottom:1px solid #eee}
