/* APN SaaS V39 — Cardápios prontos. Todos os destaques herdam o white label. */
.hf-menu-template-card{margin-top:34px}
.hf-menu-description{margin:6px 0 20px;color:var(--muted,#706879)}
.hf-menu-meta{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:16px}
.hf-menu-meta label,.hf-menu-section-row label{display:grid;gap:7px;font-weight:800}
.hf-menu-section-row{display:grid;grid-template-columns:minmax(230px,1.35fr) minmax(180px,1fr) 130px auto;gap:12px;align-items:end;padding:16px;margin:12px 0;border:1px solid var(--line,#ddd6e8);border-left:5px solid var(--brand-primary,#7c3aed);border-radius:16px;background:color-mix(in srgb,var(--brand-primary,#7c3aed) 4%,var(--card,#fff))}
.hf-menu-row-actions{display:flex;gap:6px;align-items:center}.hf-menu-row-actions button{min-width:42px;padding:11px 10px}.hf-menu-row-actions button:disabled{opacity:.4}
.hf-menu-list article{border-left:5px solid var(--brand-primary,#7c3aed)}
.hf-menu-totals{margin:18px 0}.hf-menu-clone-meal{margin:16px 0}.hf-menu-clone-meal .diet-builder-meal-head{grid-template-columns:130px minmax(180px,1fr) 150px auto auto}.hf-menu-load-saved{display:grid;gap:7px;margin:14px 0;padding:13px;border-radius:12px;background:var(--tenant-soft,color-mix(in srgb,var(--brand-primary,#7c3aed) 8%,transparent));font-weight:800}.hf-menu-load-saved select{background:var(--card,#fff);color:inherit}.hf-menu-food-group{margin:14px 0;padding:14px;border:1px solid var(--line,#ddd6e8);border-radius:14px}.hf-menu-food-group h4{margin:0 0 10px}.hf-menu-food-group .template-creator-item{margin:9px 0}.hf-menu-order-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.hf-menu-order-actions button:disabled{opacity:.4}.hf-load-menu-button,.hf-diet-pdf-button{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:44px!important;padding:10px 16px!important;border:1px solid var(--brand-primary,#7c3aed)!important;border-radius:14px!important;background:var(--brand-gradient,linear-gradient(135deg,#7c3aed,#5420a3))!important;color:#fff!important;-webkit-text-fill-color:#fff!important;font-weight:800!important;line-height:1.1!important;box-shadow:0 6px 16px color-mix(in srgb,var(--brand-primary,#7c3aed) 20%,transparent)!important;white-space:nowrap}
html[data-theme="dark"] body:has(main.admin) :is(.hf-load-menu-button,.hf-diet-pdf-button){border-radius:14px!important;background:var(--brand-gradient,linear-gradient(135deg,#7c3aed,#5420a3))!important;color:#fff!important;-webkit-text-fill-color:#fff!important;font-weight:800!important;border-color:var(--brand-primary,#7c3aed)!important}
.hf-menu-picker-overlay{position:fixed;inset:0;z-index:2147481000;display:grid;place-items:center;padding:20px;background:#09070db8;backdrop-filter:blur(7px)}.hf-menu-picker{box-sizing:border-box;width:min(680px,100%);max-height:min(760px,calc(100dvh - 40px));overflow:auto;padding:24px;border:1px solid var(--line,#ddd6e8);border-radius:24px;background:var(--card,#fff);color:var(--text,#17131d);box-shadow:0 28px 80px #0006}.hf-menu-picker>header{display:flex;justify-content:space-between;gap:16px;padding-bottom:17px;border-bottom:1px solid var(--line,#ddd6e8)}.hf-menu-picker header small{color:var(--brand-primary,#7c3aed);font-weight:900;letter-spacing:.12em}.hf-menu-picker header h3{margin:4px 0;font-size:27px}.hf-menu-picker header p{margin:0;color:var(--muted,#706879)}.hf-menu-picker header>button{width:42px;height:42px;border:0;border-radius:50%;background:var(--tenant-soft,#f1eafa);color:inherit;font-size:27px}.hf-menu-picker>label{display:grid;gap:8px;margin:20px 0;font-weight:800}.hf-menu-picker-preview{padding:17px;border:1px solid var(--line,#ddd6e8);border-radius:15px}.hf-menu-picker-preview h4{margin:0 0 4px}.hf-menu-picker-preview p{color:var(--muted,#706879)}.hf-menu-picker-preview ol{display:grid;gap:7px;margin:14px 0 0;padding-left:22px}.hf-menu-picker-preview li{padding-left:4px}.hf-menu-picker-preview li span{float:right;color:var(--muted,#706879)}.hf-menu-picker>footer{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:9px;margin-top:20px;padding-top:17px;border-top:1px solid var(--line,#ddd6e8)}
html[data-theme="light"] .patient-edit-warning{background:#f4eef9!important;color:#24192b!important;-webkit-text-fill-color:#24192b!important;border:1px solid #d8c8e4!important}
@media(max-width:980px){.hf-menu-section-row{grid-template-columns:1fr 1fr}.hf-menu-row-actions{grid-column:1/-1}.hf-menu-meta{grid-template-columns:1fr}.hf-menu-clone-meal .diet-builder-meal-head{grid-template-columns:1fr 1fr}.hf-menu-clone-meal .diet-builder-meal-head button{width:100%}}
@media(max-width:640px){.hf-menu-section-row{grid-template-columns:1fr}.hf-menu-row-actions{grid-column:auto;flex-wrap:wrap}.hf-menu-time{max-width:none}.hf-menu-row-actions .diet-remove{margin-left:auto}.diet-total-with-loader{grid-template-columns:1fr!important}.diet-total-loader{min-width:0!important;width:100%!important}.hf-menu-clone-meal .diet-builder-meal-head{grid-template-columns:1fr}.hf-menu-picker-overlay{padding:0}.hf-menu-picker{min-height:100dvh;max-height:100dvh;border-radius:0}.diet-builder-title-actions{flex-wrap:wrap!important}.hf-load-menu-button,.hf-diet-pdf-button{flex:1 1 auto!important}.hf-menu-picker>footer{display:grid}.hf-menu-picker>footer button{width:100%}}

/* APN SaaS V41 — acabamento visual dos cardápios prontos. */
.hf-menu-food-group .template-creator-item{
  display:grid!important;
  grid-template-columns:minmax(210px,1.15fr) 112px minmax(300px,1.85fr) 44px!important;
  gap:12px!important;
  align-items:end!important;
  min-width:0!important;
}
.hf-menu-food-group .template-creator-item>label{display:grid!important;gap:7px!important;min-width:0!important}
.hf-menu-food-group .template-creator-item :is(input,select){box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important}
.hf-menu-food-group .template-amount-field{width:112px!important;max-width:112px!important}
.hf-menu-food-group .template-display-field{min-width:0!important}
.hf-menu-food-group .diet-remove-food-icon,.hf-menu-remove-meal{
  display:inline-flex!important;width:42px!important;min-width:42px!important;height:42px!important;min-height:42px!important;
  align-items:center!important;justify-content:center!important;padding:0!important;border:1px solid #dc6674!important;
  border-radius:11px!important;background:transparent!important;color:#c3263a!important;box-shadow:none!important
}
.hf-menu-food-group .diet-remove-food-icon svg,.hf-menu-remove-meal svg{width:21px!important;height:21px!important}
.hf-menu-remove-meal{align-self:end!important}
.diet-builder-title-actions .hf-load-menu-button{order:1!important;min-width:245px!important;padding-inline:22px!important}
.diet-builder-title-actions .hf-diet-pdf-button{order:2!important;margin-left:auto!important;min-width:145px!important}
.diet-builder-title-actions .diet-plan-toggle{order:3!important}
.diet-builder-title:has(.hf-load-menu-button){flex-wrap:wrap!important}
.diet-builder-title:has(.hf-load-menu-button) .diet-builder-title-actions{display:flex!important;width:100%!important;flex:1 1 100%!important}
html[data-theme="light"] .diet-builder>.notice.success{color:#17131d!important;-webkit-text-fill-color:#17131d!important}

html[data-theme="dark"] .hf-menu-template-card :is(input,select,textarea),
html[data-theme="dark"] .hf-menu-load-saved select{
  border-color:#45404d!important;background:#111015!important;color:#f7f3fb!important;-webkit-text-fill-color:#f7f3fb!important
}
html[data-theme="dark"] .hf-menu-load-saved{background:color-mix(in srgb,var(--brand-primary,#7c3aed) 14%,#111015)!important;color:#f7f3fb!important}
html[data-theme="dark"] .hf-menu-picker{
  border-color:#45404d!important;background:#151318!important;color:#f7f3fb!important
}
html[data-theme="dark"] .hf-menu-picker :is(select,input,textarea){border-color:#51495d!important;background:#0d0c10!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
html[data-theme="dark"] .hf-menu-picker header>button{background:#29232f!important;color:#fff!important}
html[data-theme="dark"] .hf-menu-picker :is(header p,.hf-menu-picker-preview p,.hf-menu-picker-preview li span){color:#bbb3c2!important}
html[data-theme="dark"] .hf-menu-picker-preview{border-color:#45404d!important;background:#111015!important}
html[data-theme="dark"] .hf-menu-food-group .diet-remove-food-icon,
html[data-theme="dark"] .hf-menu-remove-meal{border-color:#a84050!important;background:#201116!important;color:#ff8291!important;-webkit-text-fill-color:#ff8291!important}

@media(max-width:1050px){
  .hf-menu-food-group .template-creator-item{grid-template-columns:minmax(170px,1fr) 100px minmax(220px,1.45fr) 42px!important}
  .hf-menu-food-group .template-amount-field{width:100px!important;max-width:100px!important}
}
@media(max-width:760px){
  .hf-menu-food-group .template-creator-item{grid-template-columns:minmax(0,1fr) 92px 42px!important}
  .hf-menu-food-group .template-display-field{grid-column:1/3!important}
  .hf-menu-food-group .diet-remove-food-icon{grid-column:3!important;grid-row:1/3!important;align-self:end!important}
  .hf-menu-food-group .template-amount-field{width:92px!important;max-width:92px!important}
  .diet-builder-title-actions{display:grid!important;grid-template-columns:1fr auto!important;width:100%!important}
  .diet-builder-title-actions .hf-load-menu-button{grid-column:1!important;width:100%!important;min-width:0!important}
  .diet-builder-title-actions .hf-diet-pdf-button{grid-column:2!important;margin-left:0!important;min-width:135px!important}
  .diet-builder-title-actions .diet-plan-toggle{grid-column:1/-1!important;width:100%!important}
}
@media(max-width:520px){
  .hf-menu-food-group .template-creator-item{grid-template-columns:minmax(0,1fr) 42px!important}
  .hf-menu-food-group .template-amount-field,.hf-menu-food-group .template-display-field{grid-column:1!important;width:100%!important;max-width:none!important}
  .hf-menu-food-group .diet-remove-food-icon{grid-column:2!important;grid-row:1/4!important}
  .diet-builder-title-actions{grid-template-columns:1fr!important}
  .diet-builder-title-actions :is(.hf-load-menu-button,.hf-diet-pdf-button,.diet-plan-toggle){grid-column:1!important;width:100%!important;min-width:0!important;margin:0!important}
}

/* APN SaaS V42 — fluxo compacto do construtor e ações do plano. */
.hf-menu-clone-meal .diet-builder-meal-head{
  display:grid!important;
  grid-template-columns:120px minmax(180px,1fr) 145px 108px 116px 44px!important;
  gap:9px!important;
  align-items:end!important
}
.hf-menu-clone-meal .diet-builder-meal-head>*{box-sizing:border-box!important;min-width:0!important;margin:0!important}
.hf-menu-clone-meal .diet-builder-meal-head .hf-menu-collapse{width:116px!important}
.hf-menu-clone-meal.collapsed>:not(.diet-builder-meal-head){display:none!important}
.hf-menu-meal-actions{
  display:grid!important;
  grid-template-columns:max-content max-content minmax(210px,1fr)!important;
  gap:10px!important;
  align-items:stretch!important;
  margin-top:14px!important
}
.hf-menu-brand-action{
  box-sizing:border-box!important;display:inline-flex!important;min-height:44px!important;align-items:center!important;justify-content:center!important;
  padding:10px 15px!important;border:1px solid var(--brand-primary,#7c3aed)!important;border-radius:12px!important;
  background:var(--brand-gradient,linear-gradient(135deg,var(--brand-primary,#7c3aed),var(--brand-secondary,#5420a3)))!important;
  color:#fff!important;-webkit-text-fill-color:#fff!important;font:inherit!important;font-weight:850!important;line-height:1.15!important;
  box-shadow:0 6px 16px color-mix(in srgb,var(--brand-primary,#7c3aed) 20%,transparent)!important;cursor:pointer!important
}
.hf-menu-action-load{width:100%!important;min-width:210px!important;text-align:center!important;text-align-last:center!important}
html[data-theme="dark"] .hf-menu-action-load{background:var(--brand-gradient,linear-gradient(135deg,var(--brand-primary,#7c3aed),var(--brand-secondary,#5420a3)))!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:var(--brand-primary,#7c3aed)!important}
.hf-diet-pdf-inline{display:none!important}
.diet-builder-title:has(.hf-load-menu-button){flex-wrap:nowrap!important;align-items:center!important}
.diet-builder-title:has(.hf-load-menu-button) .diet-builder-title-actions{
  display:flex!important;width:auto!important;flex:0 0 auto!important;align-items:center!important;justify-content:flex-end!important;
  gap:10px!important;margin-left:auto!important
}
.diet-builder-title-actions .hf-load-menu-button{
  order:1!important;box-sizing:border-box!important;width:220px!important;min-width:220px!important;max-width:220px!important;
  white-space:normal!important;text-align:center!important;line-height:1.15!important;padding:10px 18px!important
}
.diet-builder-title-actions .hf-diet-pdf-button{
  order:2!important;box-sizing:border-box!important;width:145px!important;min-width:145px!important;max-width:145px!important;margin:0!important
}
.diet-builder-title-actions .diet-plan-toggle{order:3!important}
@media(max-width:1100px){
  .hf-menu-clone-meal .diet-builder-meal-head{grid-template-columns:110px minmax(150px,1fr) 135px 100px 108px 42px!important}
  .hf-menu-clone-meal .diet-builder-meal-head .hf-menu-collapse{width:108px!important}
  .hf-menu-meal-actions{grid-template-columns:1fr 1fr 1fr!important}
}
@media(max-width:760px){
  .hf-menu-clone-meal .diet-builder-meal-head{grid-template-columns:1fr 1fr!important}
  .hf-menu-clone-meal .diet-builder-meal-head :is(button,.hf-menu-collapse){width:100%!important}
  .hf-menu-remove-meal{width:42px!important;justify-self:end!important}
  .hf-menu-meal-actions{grid-template-columns:1fr!important}
  .hf-menu-action-load{min-width:0!important}
  .diet-builder-title:has(.hf-load-menu-button){align-items:stretch!important;flex-direction:column!important}
  .diet-builder-title:has(.hf-load-menu-button) .diet-builder-title-actions{width:100%!important;margin-left:0!important}
  .diet-builder-title-actions .hf-load-menu-button{flex:1 1 auto!important;width:auto!important;min-width:0!important;max-width:none!important}
  .diet-builder-title-actions .hf-diet-pdf-button{flex:0 0 145px!important}
}
@media(max-width:480px){
  .diet-builder-title:has(.hf-load-menu-button) .diet-builder-title-actions{display:grid!important;grid-template-columns:1fr 128px!important}
  .diet-builder-title-actions .hf-load-menu-button{grid-column:1!important;width:100%!important}
  .diet-builder-title-actions .hf-diet-pdf-button{grid-column:2!important;width:128px!important;min-width:128px!important;max-width:128px!important}
  .diet-builder-title-actions .diet-plan-toggle{grid-column:1/-1!important;width:100%!important}
}


/* APN V116 — acabamento solicitado em Minhas refeições / cardápio pronto. */
.hf-menu-clone-meal .diet-builder-meal-head{
  grid-template-columns:112px minmax(180px,1fr) 104px 112px 44px!important;
  align-items:end!important
}
.hf-menu-clone-meal .diet-builder-meal-head>input[type="time"]{font-size:14px!important;font-weight:500!important}
.hf-menu-clone-meal .diet-builder-meal-head>input:not([type="time"]){font-size:15px!important;font-weight:500!important}
.hf-menu-clone-meal .diet-builder-meal-head .hf-menu-collapse{width:112px!important}
.hf-menu-food-group .template-creator-item{
  grid-template-columns:34px minmax(210px,1.15fr) 112px minmax(300px,1.85fr) 44px!important
}
.hf-menu-food-group .hf-menu-drag-handle{grid-column:1!important;align-self:end!important}
.hf-menu-food-group .template-food-field{grid-column:2!important}
.hf-menu-food-group .template-amount-field{grid-column:3!important}
.hf-menu-food-group .template-display-field{grid-column:4!important}
.hf-menu-food-group .diet-remove-food-icon{grid-column:5!important}
.hf-menu-meal-actions{
  display:flex!important;align-items:center!important;justify-content:flex-start!important;flex-wrap:wrap!important;gap:10px!important
}
.hf-menu-brand-action{width:auto!important;min-width:0!important;flex:0 0 auto!important;white-space:nowrap!important}
.hf-menu-action-load{width:auto!important;min-width:205px!important;max-width:280px!important;padding-right:34px!important;text-align:center!important;text-align-last:center!important}
@media(max-width:1050px){
  .hf-menu-clone-meal .diet-builder-meal-head{grid-template-columns:105px minmax(150px,1fr) 96px 106px 42px!important}
  .hf-menu-food-group .template-creator-item{grid-template-columns:34px minmax(170px,1fr) 100px minmax(220px,1.45fr) 42px!important}
}
@media(max-width:760px){
  .hf-menu-clone-meal .diet-builder-meal-head{grid-template-columns:1fr 1fr!important}
  .hf-menu-clone-meal .diet-builder-meal-head :is(button,.hf-menu-collapse){width:100%!important}
  .hf-menu-food-group .template-creator-item{grid-template-columns:34px minmax(0,1fr) 92px 42px!important}
  .hf-menu-food-group .hf-menu-drag-handle{grid-column:1!important;grid-row:1!important}
  .hf-menu-food-group .template-food-field{grid-column:2!important;grid-row:1!important}
  .hf-menu-food-group .template-amount-field{grid-column:3!important;grid-row:1!important}
  .hf-menu-food-group .template-display-field{grid-column:2/4!important;grid-row:2!important}
  .hf-menu-food-group .diet-remove-food-icon{grid-column:4!important;grid-row:1/3!important}
}
@media(max-width:520px){
  .hf-menu-food-group .template-creator-item{grid-template-columns:34px minmax(0,1fr) 42px!important}
  .hf-menu-food-group .hf-menu-drag-handle{grid-column:1!important;grid-row:1!important}
  .hf-menu-food-group .template-food-field{grid-column:2!important;grid-row:1!important}
  .hf-menu-food-group .template-amount-field{grid-column:2!important;grid-row:2!important;width:100%!important;max-width:none!important}
  .hf-menu-food-group .template-display-field{grid-column:2!important;grid-row:3!important}
  .hf-menu-food-group .diet-remove-food-icon{grid-column:3!important;grid-row:1/4!important}
  .hf-menu-action-load{width:100%!important;max-width:none!important}
}
