.meal-section{margin-bottom:2rem;}
.meal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.75rem;flex-wrap:wrap;gap:.5rem;}
.meal-actions{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;}
.meal-kcal-label{font-size:.78rem;color:var(--text-secondary);}
.meal-kcal-label strong{color:var(--accent-primary);font-family:'Space Mono',monospace;}
.meal-kcal-edit{background:none;border:none;cursor:pointer;font-size:.78rem;padding:.1rem;transition:transform .2s;}
.meal-kcal-edit:hover{transform:scale(1.2);}
.meal-action-btn{padding:.35rem .65rem;border:1.5px solid var(--border);border-radius:8px;background:#fff;color:var(--text-muted);font-size:.72rem;font-weight:700;cursor:pointer;transition:all .2s;font-family:'Manrope',sans-serif;}
.meal-action-btn:hover{border-color:var(--accent-primary);color:var(--accent-primary);}
.meal-table-wrap{overflow-x:auto;border-radius:14px;border:1.5px solid var(--border);background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.02);}
.meal-table{width:100%;border-collapse:collapse;min-width:800px;}
.meal-table th{background:var(--bg-primary);padding:.5rem .4rem;font-size:.68rem;font-weight:700;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.03em;border-bottom:1.5px solid var(--border);text-align:center;}
.meal-label-col{width:70px;text-align:left!important;}
.meal-label{font-size:.72rem;font-weight:700;color:var(--text-secondary);padding:.4rem .5rem;background:var(--bg-primary);border-right:1px solid var(--border);white-space:nowrap;}
.total-label{font-weight:800;color:var(--accent-primary)!important;}
.meal-cell{padding:.3rem .25rem;border-right:1px solid var(--border);border-bottom:1px solid var(--border);vertical-align:top;min-width:110px;}
.meal-input{width:100%;padding:.3rem .35rem;border:1.5px solid transparent;border-radius:6px;background:transparent;color:var(--text-primary);font-size:.72rem;font-family:'Manrope',sans-serif;outline:none;transition:all .2s;}
.meal-input:focus{border-color:var(--accent-primary);background:#fff;box-shadow:0 0 0 2px rgba(232,74,122,.06);}
.meal-name{font-weight:600;font-size:.75rem;}
.macro-inputs{display:grid;grid-template-columns:repeat(4,1fr);gap:2px;margin-top:2px;}
.meal-cal{font-family:'Space Mono',monospace;font-size:.65rem;font-weight:700;}
.meal-macro{font-family:'Space Mono',monospace;font-size:.6rem;text-align:center;}
.mp{color:var(--accent-primary);}.mc{color:var(--accent-warning);}.mf{color:var(--text-muted);}
.meal-totals-row{background:var(--bg-primary);}
.total-cell{text-align:center;padding:.5rem .35rem!important;}
.total-cal{font-family:'Space Mono',monospace;font-size:.78rem;font-weight:700;color:var(--text-primary);}
.total-cal-val{color:var(--accent-primary);}
.total-macros{display:flex;justify-content:center;gap:.4rem;margin-top:.2rem;}
.tm{font-family:'Space Mono',monospace;font-size:.58rem;font-weight:700;padding:.1rem .3rem;border-radius:4px;background:rgba(232,74,122,.05);}
.tp{color:var(--accent-primary);}.tca{color:var(--accent-warning);}.tf{color:var(--text-muted);}
.total-bar{height:4px;background:var(--border);border-radius:2px;margin-top:.35rem;overflow:hidden;}
.total-bar-fill{height:100%;border-radius:2px;transition:width .4s ease-out;}
.bar-under{background:var(--border-strong);}.bar-good{background:var(--accent-success);}.bar-over{background:var(--accent-primary);}
.snack-row{border-top:2px solid var(--border);}.snack-row .meal-label{font-style:italic;color:var(--text-muted);}
.meal-ac-wrap{position:relative;}
.meal-ac-drop{display:none;position:absolute;top:100%;left:0;right:0;background:#fff;border:1.5px solid var(--border);border-radius:10px;box-shadow:0 8px 25px rgba(0,0,0,.1);z-index:50;max-height:200px;overflow-y:auto;margin-top:2px;}
.meal-ac-drop.open{display:block;}
.meal-ac-item{display:flex;align-items:center;gap:.5rem;padding:.45rem .55rem;cursor:pointer;transition:background .15s;border-bottom:1px solid var(--border);}
.meal-ac-item:last-child{border-bottom:none;}
.meal-ac-item:hover,.meal-ac-item.ac-active{background:var(--bg-hover);}
.ac-thumb{width:32px;height:32px;border-radius:8px;background-size:cover;background-position:center;flex-shrink:0;border:1px solid var(--border);}
.ac-no-img{background:var(--bg-primary);display:flex;align-items:center;justify-content:center;font-size:.75rem;}
.ac-info{flex:1;min-width:0;}
.ac-title{font-size:.75rem;font-weight:700;color:var(--text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ac-macros{font-size:.62rem;color:var(--text-muted);font-family:'Space Mono',monospace;}
.recipe-section{background:#fff;border:1.5px solid var(--border);border-radius:16px;padding:1.25rem;box-shadow:0 1px 4px rgba(0,0,0,.02);}
.recipe-form{margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid var(--border);}
.recipe-form-row{margin-bottom:.5rem;}
.recipe-title-input{font-weight:700;font-size:.9rem!important;}
.recipe-macros-row{display:grid;grid-template-columns:repeat(4,1fr);gap:.4rem;}
.recipe-photo-label{display:inline-flex;align-items:center;gap:.3rem;padding:.4rem .7rem;border:1.5px solid var(--border);border-radius:8px;font-size:.75rem;font-weight:700;color:var(--text-secondary);cursor:pointer;transition:all .2s;}
.recipe-photo-label:hover{border-color:var(--accent-primary);color:var(--accent-primary);}
.recipe-photo-preview{width:48px;height:48px;border-radius:10px;background-size:cover;background-position:center;display:inline-block;vertical-align:middle;margin-left:.5rem;border:1.5px solid transparent;}
.recipe-photo-preview.has-photo{border-color:var(--accent-primary);}
.recipe-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:.65rem;}
.recipe-card{background:var(--bg-primary);border:1.5px solid var(--border);border-radius:12px;padding:.75rem;transition:all .2s;cursor:pointer;}
.recipe-card:hover{border-color:var(--border-strong);box-shadow:0 4px 12px rgba(0,0,0,.04);}
.recipe-thumb{width:100%;aspect-ratio:4/3;border-radius:8px;background-size:cover;background-position:center;margin-bottom:.4rem;border:1px solid var(--border);}
.recipe-title{font-weight:700;font-size:.82rem;color:var(--text-primary);margin-bottom:.2rem;}
.recipe-macros{font-family:'Space Mono',monospace;font-size:.6rem;color:var(--text-muted);}
