.recipe-overview{padding:20px;background:#fff;min-width:0}.recipe-overview-heading{display:flex;justify-content:space-between;gap:20px;align-items:start}.recipe-overview-heading h2{margin:3px 0 10px}.recipe-overview-heading p{max-width:75ch}.recipe-overview-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:22px 0}.recipe-overview-filters label{display:grid;gap:6px}.recipe-overview-filters input,.recipe-overview-filters select{min-height:42px;padding:9px;border:1px solid #cbd5e1;border-radius:7px;font:inherit}.recipe-overview-filters .recipe-include-stock{display:flex;align-items:center;align-self:center}.recipe-include-stock input{min-height:0;width:19px;height:19px}.recipe-overview-table-wrap{overflow:auto;max-height:65vh}.recipe-overview table{width:100%;border-collapse:collapse;font-size:14px}.recipe-overview th,.recipe-overview td{padding:12px 10px;text-align:left;border-bottom:1px solid #e2e8f0;vertical-align:top}.recipe-overview th{position:sticky;top:0;background:#f1f5f9;white-space:nowrap}.recipe-overview td small{display:block;color:#64748b;margin-top:4px}.recipe-overview td:nth-child(5),.recipe-overview td:nth-child(6),.recipe-overview td:nth-child(7){white-space:nowrap;text-align:right}.recipe-overview-paging{display:flex;align-items:center;justify-content:end;gap:12px;padding:18px 0}.recipe-unit-notice{background:#fff7ed;border:1px solid #fed7aa;border-radius:8px;padding:14px;margin:12px 0}.recipe-missing-cost{color:#9a3412}.recipe-cost-complete{color:#166534}#productComponentRows select{max-width:95px;min-height:40px;padding:6px;border:1px solid #cbd5e1;border-radius:6px;font:inherit}#productComponentRows [data-component-stock]{font-size:11px;max-width:150px}@media(max-width:650px){.recipe-overview{padding:12px}.recipe-overview-heading{flex-direction:column}.recipe-overview-filters{display:grid;grid-template-columns:minmax(0,1fr)}.recipe-overview-table-wrap{max-height:none}.recipe-overview th,.recipe-overview td{padding:10px 8px}.recipe-overview-paging{justify-content:space-between}.recipe-overview-filters button{min-height:44px}}
/* Component usage cards retain normalized quantities in the existing stock unit. */
#productComponentsDialog{width:min(760px,calc(100vw - 24px))}
#productComponentsDialog .recipe-table-wrap{max-height:43dvh;padding:0 2px}
#productComponentsDialog .recipe-table,#productComponentsDialog .recipe-table tbody{display:block;min-width:0;width:100%}
#productComponentsDialog .recipe-table thead{display:none}
#productComponentsDialog .recipe-table tr{display:block;border:0;margin:0 0 8px;padding:0;background:transparent}
#productComponentsDialog .recipe-table td{display:block;min-width:0;max-width:none;border:0;padding:0;white-space:normal}
#productComponentsDialog .recipe-table td::before{display:none}
.component-card{padding:12px;border:1px solid #cedfea;border-radius:6px;background:#fff;color:#263e54;min-width:0}
.recipe-inactive .component-card{background:#f5f7f9;color:#738394}
.component-card-heading{display:flex;justify-content:space-between;gap:12px;align-items:start}
.component-card-heading>div:first-child{min-width:0;flex:1;overflow-wrap:anywhere}
.component-card-heading strong{font-size:14px;font-weight:600;line-height:1.4}
.component-card-heading small{font-size:11px;margin-top:1px}
.component-card-actions{display:flex;gap:8px;align-items:center;flex:none}
.component-card-actions .recipe-active{display:flex;gap:7px;font-size:12px;margin:0}
.component-card-actions input[role=switch]{appearance:none;width:36px;height:21px;min-height:21px;border:0;border-radius:5px;background:#aab8c3;position:relative;margin:0;padding:0;cursor:pointer;flex:none}
.component-card-actions input[role=switch]::before{content:'';position:absolute;top:3px;left:3px;width:15px;height:15px;background:#fff;border-radius:3px;transition:transform .12s}
.component-card-actions input[role=switch]:checked{background:#087fc1}
.component-card-actions input[role=switch]:checked::before{transform:translateX(15px)}
.component-card-actions input[role=switch]:focus-visible{outline:3px solid #edb34e;outline-offset:2px}
#productComponentsDialog .component-remove{width:32px;height:32px;min-height:32px;padding:0;border:0;background:transparent;color:#758c9d;font-size:23px;border-radius:5px}
#productComponentsDialog .component-remove:hover{background:#fff0f2;color:#bc2344}
.component-card-usage{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px}
#productComponentsDialog .component-card-usage input[type=number]{width:110px;min-height:34px;padding:6px 8px;font-size:14px;border:1px solid #cedfea;border-radius:5px}
#productComponentsDialog .component-card-usage select{width:76px;min-height:34px;padding:5px;font-size:12px}
.component-stock,.component-unit{font-size:12px;color:#647e95}
.component-card-cost{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-top:5px}
#productComponentsDialog .component-card-cost small{font-size:12px;max-width:none;margin:0;line-height:1.5}
#productComponentsDialog .component-unit-cost{font-size:11px;color:#7a8e9e;margin-top:3px}
.component-quick-add{display:grid;gap:7px;font-size:13px;font-weight:600;margin-top:8px}
.component-quick-add select{width:100%;min-height:40px;padding:8px;border:1px solid #b7cfdf;border-radius:5px;background:#fff;font:inherit;color:#29445b}
.component-quick-hint{font-size:11px;color:#72879a}
@media(max-width:600px){#productComponentsDialog .recipe-table-wrap{max-height:42dvh}.component-card{padding:10px}.component-card-heading{gap:6px}.component-card-actions{gap:2px}.component-card-actions .recipe-active{gap:4px}.component-card-actions .recipe-active span{font-size:11px}#productComponentsDialog .recipe-table tr{grid-template-columns:none}.component-card-usage{gap:6px}.component-card-cost{gap:3px}}
#productComponentsDialog .recipe-actions{position:sticky;bottom:-22px;background:#fff;padding:12px 0 0;z-index:2;border-top:1px solid #e2ebf2}
@media(max-width:600px){#productComponentsDialog .recipe-actions{bottom:-14px;padding:10px 0 0}}

/* Dense overview rows retain product codes, costs and existing component actions. */
#recipeOverviewView{padding:12px}
#recipeOverviewView .recipe-overview-heading{gap:12px}
#recipeOverviewView .recipe-overview-heading h2{margin:2px 0 5px}
#recipeOverviewView .recipe-overview-heading p{margin:4px 0;font-size:13px}
#recipeOverviewView .recipe-overview-filters{gap:8px;margin:10px 0;align-items:end}
#recipeOverviewView .recipe-overview-filters label{gap:4px;font-size:12px}
#recipeOverviewView .recipe-overview-filters input,#recipeOverviewView .recipe-overview-filters select{min-height:34px;padding:6px 8px;font-size:13px}
#recipeOverviewView .recipe-include-stock input{min-height:0;padding:0}
#recipeOverviewView .recipe-overview-filters button{min-height:34px;padding:6px 12px;font-size:12px}
#recipeOverviewView>p{margin:7px 0;font-size:12px;line-height:1.4}
#recipeOverviewView table{font-size:13px;min-width:860px}
#recipeOverviewView th,#recipeOverviewView td{padding:6px 8px;line-height:1.3;vertical-align:middle}
#recipeOverviewView th{font-size:12px;padding-top:8px;padding-bottom:8px}
#recipeOverviewView td small{font-size:11px;margin-top:1px;line-height:1.25}
#recipeOverviewView td:last-child{width:1%;white-space:nowrap}
#recipeOverviewView td button{min-height:30px;padding:5px 10px;font-size:12px;line-height:1.3;border-radius:6px;white-space:nowrap}
#recipeOverviewView .recipe-overview-paging{padding:10px 0 0;gap:8px;font-size:12px}
#recipeOverviewView .recipe-overview-paging button{min-height:34px;padding:6px 12px;font-size:12px}
@media(max-width:600px){
 #recipeOverviewView{padding:10px}
 #recipeOverviewView td button,#recipeOverviewView .recipe-overview-filters button,#recipeOverviewView .recipe-overview-paging button{min-height:44px}
}
#recipeOverviewView table{min-width:960px}#recipeOverviewView td:first-child{min-width:210px}#recipeOverviewView td:nth-child(4){min-width:150px;white-space:nowrap}
