.auth-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:1rem}.auth-card{width:100%;max-width:400px}.auth-card h1{margin-bottom:1.5rem;text-align:center}.btn-block{width:100%;margin-top:1rem}.auth-footer{margin-top:1rem;text-align:center;color:var(--gray-600)}.auth-footer a{color:var(--primary);text-decoration:none}.auth-footer a:hover{text-decoration:underline}.dashboard h1{margin-bottom:1.5rem}.dashboard-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1rem;margin-bottom:2rem}.stat-card h3{color:var(--gray-600);font-size:.875rem;font-weight:500;margin-bottom:.5rem}.stat-value{font-size:2rem;font-weight:700;color:var(--gray-900)}.stat-goal{font-size:1.25rem;font-weight:400;color:var(--gray-500)}.stat-remaining{margin-top:.5rem;font-size:.875rem;color:var(--gray-600)}.stat-date{margin-top:.25rem;font-size:.875rem;color:var(--gray-500)}.stat-empty{color:var(--gray-400);font-style:italic}.progress-bar{height:8px;background-color:var(--gray-200);border-radius:4px;margin-top:.75rem;overflow:hidden}.progress-fill{height:100%;background-color:var(--primary);border-radius:4px;transition:width .3s ease,background-color .3s ease}.progress-fill.calories.behind{background-color:#22c55e}.progress-fill.calories.on-track{background-color:var(--primary)}.progress-fill.calories.ahead{background-color:#f59e0b}.progress-fill.calories.in-range{background-color:#22c55e}.progress-fill.calories.over-goal{background-color:#ef4444}.progress-fill.protein{background-color:var(--success)}.progress-fill.protein.behind{background-color:#f59e0b}.progress-fill.protein.on-track,.progress-fill.protein.goal-met{background-color:#22c55e}.weekly-section{margin-top:2rem}.weekly-section h2{font-size:1.25rem;margin-bottom:.25rem}.weekly-days{display:flex;gap:.5rem;overflow-x:auto;padding-bottom:.5rem}.day-card{flex:1 0 0;min-width:100px;padding:.75rem .5rem;display:flex;flex-direction:column;gap:.75rem}.day-card.today{border:2px solid var(--primary);background-color:color-mix(in srgb,var(--primary) 5%,transparent)}.day-card-header{text-align:center}.day-name{display:block;font-weight:600;font-size:.875rem;color:var(--gray-900)}.day-date{display:block;font-size:.75rem;color:var(--gray-500)}.day-bars{display:flex;flex-direction:column;gap:4px;width:100%}.day-cal-number{display:block;text-align:center;font-size:.6875rem;color:var(--gray-500)}.day-pro-number{display:none;text-align:center;font-size:.6875rem;color:var(--gray-500)}.mini-progress-bar{height:6px;background-color:var(--gray-200);border-radius:3px;overflow:hidden}.mini-progress-fill{height:100%;border-radius:3px;transition:width .3s ease}.mini-progress-fill.cal{background-color:var(--gray-400)}.mini-progress-fill.cal.under,.mini-progress-fill.cal.in-range{background-color:#22c55e}.mini-progress-fill.cal.close{background-color:#f59e0b}.mini-progress-fill.cal.over{background-color:#ef4444}.mini-progress-fill.pro{background-color:var(--gray-400)}.mini-progress-fill.pro.met{background-color:#22c55e}.mini-progress-fill.pro.close{background-color:#f59e0b}.mini-progress-fill.pro.under{background-color:#ef4444}.day-cal-number.under{color:var(--gray-500)}.day-cal-number.in-range{color:#22c55e}.day-cal-number.close{color:#f59e0b}.day-cal-number.over{color:#ef4444}.day-pro-number.met{color:#22c55e}.day-pro-number.close{color:#f59e0b}.day-pro-number.under{color:#ef4444}.weekly-avg-row{display:flex;justify-content:center;gap:2rem;margin-top:.75rem}.weekly-avg{font-size:.875rem;color:var(--gray-600);text-align:center}@media (max-width: 640px){.dashboard h1{font-size:1.25rem;margin-bottom:.75rem}.dashboard-grid{grid-template-columns:1fr 1fr;gap:.625rem;margin-bottom:1.25rem}.stat-card{padding:.875rem}.stat-card.weight-card{grid-column:1 / -1;display:flex;align-items:baseline;gap:.75rem;padding:.75rem .875rem}.stat-card.weight-card h3{margin-bottom:0;white-space:nowrap}.stat-card.weight-card .stat-value{font-size:1.25rem}.stat-card.weight-card .stat-date{margin-top:0;margin-left:auto}.stat-value{font-size:1.5rem}.stat-goal{font-size:1rem}.stat-remaining{margin-top:.375rem;font-size:.8125rem}.weekly-section{margin-top:1.25rem}.weekly-section h2{font-size:1.125rem}.weekly-days{flex-wrap:nowrap;gap:.375rem}.day-card{min-width:4.5rem;flex:0 0 auto;padding:.5rem .375rem;gap:.5rem}.day-bars{display:none}.day-pro-number{display:block}.weekly-avg-row{gap:1rem;margin-top:.5rem}.weekly-avg{font-size:.8125rem}}.date-picker{width:auto;max-width:10rem}.search-card{margin-bottom:1rem}.mode-selector{display:flex;gap:.5rem;margin-bottom:1rem;flex-wrap:wrap}.mode-pill{padding:.375rem .875rem;border-radius:9999px;border:1px solid var(--gray-300);background:#fff;color:var(--gray-600);font-size:.875rem;font-weight:500;cursor:pointer;transition:all .15s ease;white-space:nowrap}.mode-pill:hover{background:var(--gray-100);border-color:var(--gray-400)}.mode-pill.active{background:var(--primary);color:#fff;border-color:var(--primary)}.mode-pill.active:hover{background:var(--primary-dark);border-color:var(--primary-dark)}.search-form{display:flex;gap:.5rem}.search-form .input{flex:1}.search-status{margin-top:1rem;padding:1rem;border-radius:.375rem;text-align:center}.search-status.searching{background-color:var(--gray-50);color:var(--gray-600);display:flex;align-items:center;justify-content:center;gap:.5rem}.search-status.error{background-color:#fee2e2;color:#991b1b}.search-status.no-results{background-color:#fef3c7;color:#92400e}.spinner{width:1rem;height:1rem;border:2px solid var(--gray-300);border-top-color:var(--primary);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.search-results{margin-top:1rem;border-top:1px solid var(--gray-200);padding-top:1rem}.search-results-header{font-size:.875rem;color:var(--gray-500);margin-bottom:.5rem}.search-result{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0;border-bottom:1px solid var(--gray-100)}.search-result:last-child{border-bottom:none}.result-name{font-weight:500}.result-nutrition{font-size:.875rem;color:var(--gray-500)}.manual-form{margin-top:0;padding-top:0}.form-row{display:flex;gap:1rem;margin-bottom:1rem}.form-row .form-group{flex:1;margin-bottom:0}.entries-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.entries-header h2{font-size:1.125rem}.summary-cards{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-bottom:1rem}.summary-cards .stat-card h3{color:var(--gray-600);font-size:.875rem;font-weight:500;margin-bottom:.5rem}.summary-cards .stat-value{font-size:1.75rem;font-weight:700;color:var(--gray-900)}.summary-cards .stat-goal{font-size:1rem;font-weight:400;color:var(--gray-500)}.summary-cards .stat-remaining{margin-top:.5rem;font-size:.875rem;color:var(--gray-600)}.summary-cards .progress-bar{height:8px;background-color:var(--gray-200);border-radius:4px;margin-top:.75rem;overflow:hidden}.summary-cards .progress-fill{height:100%;border-radius:4px;transition:width .3s ease,background-color .3s ease}.summary-cards .progress-fill.calories.on-track{background-color:var(--primary)}.summary-cards .progress-fill.calories.ahead{background-color:#f59e0b}.summary-cards .progress-fill.calories.in-range{background-color:#22c55e}.summary-cards .progress-fill.calories.over-goal{background-color:#ef4444}.summary-cards .progress-fill.protein.behind{background-color:#f59e0b}.summary-cards .progress-fill.protein.on-track,.summary-cards .progress-fill.protein.goal-met{background-color:#22c55e}.entries-list{border-top:1px solid var(--gray-200)}.entry-item:last-child{border-bottom:none}.entry-name{font-weight:500}.entry-nutrition{font-size:.875rem;color:var(--gray-500)}.servings-btn{background:none;border:none;padding:.125rem .25rem;margin:-.125rem -.25rem;border-radius:.25rem;cursor:pointer;font-size:inherit;color:var(--primary);text-decoration:underline;text-decoration-style:dotted;transition:background-color .15s ease}.servings-btn:hover{background-color:var(--gray-100)}.servings-input{width:4rem;padding:.125rem .25rem;font-size:.875rem;border:1px solid var(--primary);border-radius:.25rem;outline:none}.servings-input:focus{box-shadow:0 0 0 2px #2563eb33}.btn-save-servings,.btn-cancel-servings{padding:.125rem .5rem;font-size:.75rem;border-radius:.25rem;cursor:pointer;border:none}.btn-save-servings{background-color:var(--primary);color:#fff}.btn-save-servings:hover{background-color:var(--primary-dark, #1d4ed8)}.btn-cancel-servings{background-color:var(--gray-200);color:var(--gray-700)}.btn-cancel-servings:hover{background-color:var(--gray-300)}.ai-logger{margin-top:0;padding-top:0}.ai-logger h3{font-size:.95rem;margin-bottom:.75rem;color:var(--gray-700)}.ai-parsed-list{display:flex;flex-direction:column;gap:.75rem}.ai-parsed-item{padding:.75rem;background-color:var(--gray-50);border-radius:.375rem;border:1px solid var(--gray-200)}.ai-parsed-item .form-row{margin-bottom:0;align-items:flex-end}.ai-parsed-item .form-group{margin-bottom:0}.ai-parsed-item label{font-size:.75rem;color:var(--gray-500)}.dish-picker{margin-top:0;padding-top:0}.dish-picker h3{font-size:.95rem;margin-bottom:.75rem;color:var(--gray-700)}.dish-picker-list{display:flex;flex-direction:column}.dishes-page h1{margin-bottom:1.5rem}.page-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem}.dish-editor-card{margin-bottom:1rem}.dish-editor-card h2{margin-bottom:1rem;font-size:1.125rem}.dish-name-input,.dish-search-section{margin-bottom:1rem}.dish-search-section h3{font-size:.95rem;margin-bottom:.5rem;color:var(--gray-700)}.dish-search-form{display:flex;gap:.5rem}.dish-search-form .input{flex:1}.barcode-form{display:flex;gap:.5rem;margin-top:.5rem}.barcode-form .input{flex:1}.dish-search-results{margin-top:.75rem;border-top:1px solid var(--gray-200);padding-top:.75rem}.dish-search-result{display:flex;justify-content:space-between;align-items:center;padding:.5rem 0;border-bottom:1px solid var(--gray-100)}.dish-search-result:last-child{border-bottom:none}.dish-items-section{margin-top:1rem}.dish-items-section h3{font-size:.95rem;margin-bottom:.5rem;color:var(--gray-700)}.dish-items-list{border-top:1px solid var(--gray-200)}.dish-item-row{display:flex;justify-content:space-between;align-items:center;padding:.5rem 0;border-bottom:1px solid var(--gray-100)}.dish-item-row:last-child{border-bottom:none}.dish-item-info{flex:1}.dish-item-name{font-weight:500}.dish-item-nutrition{font-size:.875rem;color:var(--gray-500)}.dish-item-actions{display:flex;align-items:center;gap:.5rem}.servings-inline{display:flex;align-items:center;gap:.25rem}.servings-inline input{width:4rem;padding:.125rem .25rem;font-size:.875rem;border:1px solid var(--gray-300);border-radius:.25rem;text-align:center}.servings-inline label{font-size:.75rem;color:var(--gray-500)}.dish-form-actions{display:flex;gap:.5rem;margin-top:1rem;padding-top:1rem;border-top:1px solid var(--gray-200)}.dishes-list{display:flex;flex-direction:column}.dish-list-item{display:flex;justify-content:space-between;align-items:center;padding:1rem 0;border-bottom:1px solid var(--gray-100)}.dish-list-item:first-child{padding-top:0}.dish-list-item:last-child{border-bottom:none;padding-bottom:0}.dish-list-name{font-weight:500;font-size:1.125rem}.dish-list-meta{font-size:.875rem;color:var(--gray-500);margin-top:.25rem}.dish-list-actions{display:flex;gap:.5rem}.barcode-error,.search-error{margin-top:.5rem;padding:.5rem;background-color:#fee2e2;color:#991b1b;border-radius:.375rem;font-size:.875rem}.servings-btn{background:none;border:none;color:#2563eb;cursor:pointer;font-size:.875rem;padding:0;text-decoration:underline}.servings-btn:hover{color:#1d4ed8}.servings-edit{display:inline-flex;align-items:center;gap:.25rem}.servings-input{width:4rem;padding:.125rem .25rem;font-size:.875rem;border:1px solid var(--gray-300);border-radius:.25rem;text-align:center}.btn-save-servings{padding:.125rem .5rem;font-size:.75rem;background-color:#2563eb;color:#fff;border:none;border-radius:.25rem;cursor:pointer}.btn-save-servings:hover{background-color:#1d4ed8}.btn-cancel-servings{padding:.125rem .5rem;font-size:.75rem;background-color:var(--gray-200, #e5e7eb);color:var(--gray-700, #374151);border:none;border-radius:.25rem;cursor:pointer}.btn-cancel-servings:hover{background-color:var(--gray-300, #d1d5db)}.dish-totals{margin-top:.75rem;padding:.5rem .75rem;background-color:var(--gray-50);border-radius:.375rem;font-size:.875rem;color:var(--gray-700)}.dish-totals strong{color:var(--gray-900)}.weight-page h1{margin-bottom:1.5rem}.weight-page h2{font-size:1.125rem;margin-bottom:1rem}.weight-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1rem;margin-bottom:1rem}.log-form{display:flex;gap:.5rem;align-items:flex-end}.log-form .form-group{flex:1;margin-bottom:0}.stats-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem}.stat{display:flex;flex-direction:column}.stat-label{font-size:.75rem;color:var(--gray-500);text-transform:uppercase;letter-spacing:.05em}.stat-value{font-size:1.5rem;font-weight:600}.stat-value.positive{color:var(--success)}.stat-value.negative{color:var(--danger)}.chart-card{margin-bottom:1rem}.chart-container{margin-top:1rem}.section-header{display:flex;justify-content:space-between;align-items:center}.section-header h2{margin-bottom:0}.entries-list{display:flex;flex-direction:column}.entry-item{display:flex;justify-content:space-between;align-items:center;padding:.75rem 0;border-bottom:1px solid var(--gray-100)}.entry-item:first-child{padding-top:0}.entry-item:last-child{border-bottom:none;padding-bottom:0}.entry-weight{font-weight:600;font-size:1.125rem}.entry-date{font-size:.875rem;color:var(--gray-500)}.sync-message{font-size:.875rem;margin-bottom:.5rem}.sync-message-success{color:var(--success)}.sync-message-error{color:var(--danger)}.empty-message{color:var(--gray-500);text-align:center;padding:2rem}.btn-sm{padding:.25rem .75rem;font-size:.875rem}.weight-history-page h1{margin-bottom:0}.history-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem}.history-table{width:100%;border-collapse:collapse}.history-table th{text-align:left;padding:.75rem;border-bottom:2px solid var(--gray-200);font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--gray-500)}.history-table td{padding:.75rem;border-bottom:1px solid var(--gray-100)}.history-table tbody tr:last-child td{border-bottom:none}.history-table .weight-cell{font-weight:600}.history-table .time-text{color:var(--gray-500);font-size:.875rem}.settings-page h1{margin-bottom:1.5rem}.settings-page h2{font-size:1.125rem;margin-bottom:1rem}.settings-page .card{margin-bottom:1rem;max-width:500px}.hint{display:block;font-size:.75rem;color:var(--gray-500);margin-top:.25rem}.message{padding:.75rem;border-radius:.375rem;margin-bottom:1rem}.message.success{background-color:#dcfce7;color:#166534}.message.error{background-color:#fee2e2;color:#991b1b}.current-goals{background-color:var(--gray-50)}.goals-display{display:flex;flex-direction:column;gap:.75rem}.goal-item{display:flex;justify-content:space-between;align-items:center}.goal-label{color:var(--gray-600)}.goal-value{font-weight:600;font-size:1.125rem}.goal-date{margin-top:1rem;font-size:.75rem;color:var(--gray-400)}.unit-toggle{display:flex;gap:0;border:1px solid var(--gray-300);border-radius:.375rem;overflow:hidden;width:fit-content}.unit-btn{padding:.5rem 1.5rem;border:none;background:#fff;cursor:pointer;font-weight:500;color:var(--gray-600);transition:all .15s ease}.unit-btn:not(:last-child){border-right:1px solid var(--gray-300)}.unit-btn:hover{background:var(--gray-50)}.unit-btn.active{background:var(--primary);color:#fff}.calorie-range-row{display:flex;align-items:flex-start;gap:.5rem}.calorie-range-field{flex:1;display:flex;flex-direction:column}.calorie-range-field .input{text-align:center}.range-separator{padding-top:.6rem;font-size:1.125rem;color:var(--gray-400);font-weight:500}.range-label{font-size:.6875rem;color:var(--gray-400);text-align:center;margin-top:.125rem}.withings-status{color:var(--gray-600);margin-bottom:.75rem}.withings-actions{display:flex;gap:.5rem}.btn-secondary{background:var(--gray-200);color:var(--gray-700);border:none;padding:.5rem 1rem;border-radius:.375rem;cursor:pointer;font-weight:500}.btn-secondary:hover{background:var(--gray-300)}.layout{min-height:100vh;display:flex;flex-direction:column}.header{background-color:#fff;border-bottom:1px solid var(--gray-200);padding:1rem 0}.header-content{display:flex;align-items:center;justify-content:space-between;gap:2rem}.logo{font-size:1.25rem;font-weight:700;color:var(--primary);text-decoration:none}.nav{display:flex;gap:.5rem}.nav-link{padding:.5rem 1rem;border-radius:.375rem;text-decoration:none;color:var(--gray-600);font-weight:500;transition:all .15s ease}.nav-link:hover{background-color:var(--gray-100);color:var(--gray-900)}.nav-link.active{background-color:var(--primary);color:#fff}.user-menu{display:flex;align-items:center;gap:1rem}.user-menu span{color:var(--gray-600)}.main{flex:1;padding:2rem 0}@media (max-width: 768px){.header-content{flex-wrap:wrap}.nav{order:3;width:100%;overflow-x:auto;padding-bottom:.5rem}.user-menu{margin-left:auto}}*{margin:0;padding:0;box-sizing:border-box}:root{--primary: #2563eb;--primary-dark: #1d4ed8;--success: #16a34a;--warning: #ca8a04;--danger: #dc2626;--gray-50: #f9fafb;--gray-100: #f3f4f6;--gray-200: #e5e7eb;--gray-300: #d1d5db;--gray-400: #9ca3af;--gray-500: #6b7280;--gray-600: #4b5563;--gray-700: #374151;--gray-800: #1f2937;--gray-900: #111827}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;background-color:var(--gray-50);color:var(--gray-900);line-height:1.5}.container{max-width:1200px;margin:0 auto;padding:0 1rem}.btn{display:inline-flex;align-items:center;justify-content:center;padding:.5rem 1rem;border-radius:.375rem;font-weight:500;cursor:pointer;transition:all .15s ease;border:none}.btn-primary{background-color:var(--primary);color:#fff}.btn-primary:hover{background-color:var(--primary-dark)}.btn-secondary{background-color:var(--gray-200);color:var(--gray-700)}.btn-secondary:hover{background-color:var(--gray-300)}.btn-danger{background-color:var(--danger);color:#fff}.input{width:100%;padding:.5rem .75rem;border:1px solid var(--gray-300);border-radius:.375rem;font-size:1rem}.input:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px #2563eb1a}.card{background-color:#fff;border-radius:.5rem;box-shadow:0 1px 3px #0000001a;padding:1.5rem}.form-group{margin-bottom:1rem}.form-group label{display:block;margin-bottom:.25rem;font-weight:500;color:var(--gray-700)}.error-message{color:var(--danger);font-size:.875rem;margin-top:.25rem}
