:root{--brand-primary:#7c3aed;--brand-secondary:#4c1d95;--brand-gradient:linear-gradient(135deg,var(--brand-primary),var(--brand-secondary));--brand-gradient-hover:linear-gradient(135deg,var(--brand-secondary),var(--brand-primary));--hf-primary:var(--brand-primary)}
/* Identidade dinâmica; estados clínicos, sucesso, alerta e exclusão são preservados. */
html body #root>.app>header,.hf-workspace-rail,.hf-agenda-head,.apn-pulse-header,.apn-pulse-page>header,.hf-booking>header{background:var(--brand-gradient)!important;background-color:var(--brand-primary)!important;border-color:var(--brand-primary)!important}
:is(main.admin,main.portal,.hf-agenda-overlay,.apn-customizer-overlay,.apn-pulse-page) :is(button.primary,a.primary,.secondary-button,.patient-preview-button,.patient-list-toggle,.upload-section-toggle,.hf-card-action,.anthro-section-toggle,.diet-plan-toggle,.appointment-toggle,.apn-image-analyze,.apn-image-save,.apn-pulse-primary,.apn-pulse-save,.apn-pulse-button-primary,.apn-management-pdf-button,.hf-assessment-compare-button):not(.danger):not([class*=delete]):not([class*=success]){background:var(--brand-gradient)!important;background-color:var(--brand-primary)!important;border-color:var(--brand-primary)!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
:is(main.admin,main.portal,.hf-agenda-overlay,.apn-customizer-overlay,.apn-pulse-page) :is(button.primary,a.primary,.secondary-button,.patient-preview-button,.patient-list-toggle,.upload-section-toggle,.hf-card-action,.anthro-section-toggle,.diet-plan-toggle,.appointment-toggle,.apn-image-analyze,.apn-image-save,.apn-pulse-primary,.apn-pulse-save,.apn-pulse-button-primary,.apn-management-pdf-button):not(.danger):not([class*=delete]):hover{background:var(--brand-gradient-hover)!important;border-color:var(--brand-secondary)!important}
:is(main.admin,main.portal,.hf-agenda-overlay,.apn-customizer-overlay,.apn-pulse-page) :is(.kicker,.eyebrow,a:not(.danger),.apn-photo-action,.apn-photo-camera,.apn-photo-silhouette,.apn-phone-scroll>small,.apn-customizer header small){color:var(--brand-primary)!important}
:is(main.admin,main.portal,.hf-agenda-overlay,.apn-customizer-overlay,.apn-pulse-page) :is(input[type=checkbox],input[type=radio]){accent-color:var(--brand-primary)!important}
:is(main.admin,main.portal) :is(.tabs button.active,.hf-management-tabs button.active),.hf-agenda-daystrip button.active,.hf-public-slots button.active,.apn-phone-scroll>nav button.active,.apn-preview-fixed{background:var(--brand-gradient)!important;border-color:var(--brand-primary)!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
html[data-theme=light] :is(.hf-management-tabs button,.tabs button):not(.active):hover{background:color-mix(in srgb,var(--brand-primary) 13%,#fff)!important;border-color:color-mix(in srgb,var(--brand-primary) 35%,#fff)!important;color:var(--brand-primary)!important;-webkit-text-fill-color:var(--brand-primary)!important}
.hf-section-symbol,.summary-grid .summary>span,.avatar:not(.has-photo),.patient-download-icon,.assessment-title>span:first-child,.hf-memory-icon{background:var(--brand-gradient)!important;border-color:var(--brand-primary)!important}
[data-preview-intern],[data-preview-secretary],.hf-public-booking-summary,.apn-change-context,.apn-pulse-options button.selected{background:var(--brand-gradient)!important;border-color:var(--brand-primary)!important;color:#fff!important}
.hf-agenda-overlay .hf-agenda-page button[data-preview-secretary],.hf-agenda-overlay .hf-agenda-page button[data-preview-intern]{background:var(--brand-gradient)!important;border-color:var(--brand-primary)!important;color:#fff!important;box-shadow:0 8px 20px color-mix(in srgb,var(--brand-primary) 22%,transparent)!important}
.apn-pulse-page-head .kicker,.apn-demand-section-head .kicker{display:none!important}
html[data-theme="light"] main.portal.admin-patient-preview .preview-banner{background:#fff!important;border-color:#d8d5df!important;color:#17181a!important;box-shadow:0 10px 28px rgba(28,20,40,.08)!important}
html[data-theme="light"] main.portal.admin-patient-preview .preview-banner :is(b,p,svg){color:#17181a!important}
html[data-theme="light"] main.portal.admin-patient-preview nav.tabs{background:#fff!important;border-color:#d8d5df!important}
html[data-theme="light"] main.portal.admin-patient-preview nav.tabs button:not(.active){background:#fff!important;color:#4b4b52!important;-webkit-text-fill-color:#4b4b52!important}
html[data-theme="light"] main.portal.admin-patient-preview nav.tabs button:not(.active) svg{color:#4b4b52!important}
.hf-agenda-head nav button:hover,.hf-agenda-head nav button.active{background:#fff!important;color:var(--brand-primary)!important}
.hf-agenda-brand img[data-tenant-logo]{width:34px;height:34px;flex:0 0 34px;object-fit:contain;border-radius:7px;background:#fff;padding:2px}.hf-agenda-brand>svg[hidden]{display:none!important}img[data-tenant-logo]{object-fit:contain!important;object-position:center!important;background:transparent!important}.saas-palette-icon{width:21px;height:21px;flex:0 0 21px}button[data-saas-profile]{display:inline-flex!important;align-items:center;justify-content:center;gap:9px}
@media (prefers-reduced-motion:no-preference){:is(button,a,.hf-section-symbol){transition:background .18s ease,border-color .18s ease,color .18s ease}}

/* APN V11 Hostinger — acabamento final da identidade visual. */
html[data-theme="light"] body:has(main.portal) .timeline .meal{background:#fff!important;border-color:#d8d5df!important;box-shadow:0 8px 24px rgba(28,20,40,.07)!important;color:#17181a!important}
html[data-theme="light"] body:has(main.portal) .timeline .meal-toggle{background:#fff!important;background-image:none!important;color:#17181a!important;-webkit-text-fill-color:#17181a!important;border-color:#d8d5df!important}
html[data-theme="light"] body:has(main.portal) .timeline .meal-toggle:hover{background:color-mix(in srgb,var(--brand-primary) 7%,#fff)!important;border-color:color-mix(in srgb,var(--brand-primary) 34%,#d8d5df)!important}
html[data-theme="light"] body:has(main.portal) .timeline .meal-toggle :is(.time,.meal-title,.meal-copy small,.meal-copy b,.meal-chevron,svg){color:#17181a!important;-webkit-text-fill-color:#17181a!important}
html[data-theme="light"] body:has(main.portal) .timeline .meal-icon{background:color-mix(in srgb,var(--brand-primary) 10%,#fff)!important;border-color:color-mix(in srgb,var(--brand-primary) 24%,#d8d5df)!important}
html[data-theme="light"] body:has(main.portal) .timeline .meal-body,
html[data-theme="light"] body:has(main.portal) .timeline .meal li{background:#fff!important;color:#17181a!important;border-color:#e3dfe8!important}
html[data-theme="light"] body:has(main.portal) .timeline .meal li :is(span,b,small,p){color:#17181a!important;-webkit-text-fill-color:#17181a!important}

/* Abrir e Duplicar acompanham a paleta do assinante nos dois temas. */
body:has(main.admin) .diet-builder-meal-head :is(.diet-duplicate-meal,.diet-collapse-meal){background:color-mix(in srgb,var(--brand-primary) 12%,transparent)!important;background-image:none!important;color:var(--brand-primary)!important;-webkit-text-fill-color:var(--brand-primary)!important;border-color:color-mix(in srgb,var(--brand-primary) 58%,transparent)!important;box-shadow:none!important}
body:has(main.admin) .diet-builder-meal-head :is(.diet-duplicate-meal,.diet-collapse-meal):hover,
body:has(main.admin) .diet-builder-meal-head :is(.diet-duplicate-meal,.diet-collapse-meal):focus-visible{background:color-mix(in srgb,var(--brand-primary) 24%,transparent)!important;color:var(--brand-primary)!important;-webkit-text-fill-color:var(--brand-primary)!important;border-color:var(--brand-primary)!important}
html[data-theme="dark"] body:has(main.admin) .diet-builder-meal-head :is(.diet-duplicate-meal,.diet-collapse-meal){color:color-mix(in srgb,var(--brand-primary) 72%,#fff)!important;-webkit-text-fill-color:color-mix(in srgb,var(--brand-primary) 72%,#fff)!important}

/* Exclusões no escuro: vermelho translúcido, sem fundo branco. */
html[data-theme="dark"] body:has(main.admin) :is(.diet-builder-meal-head>.diet-remove,.rx-item>.diet-remove,.rx-published-list .diet-remove,.rx-template-compound .diet-remove){background:rgba(196,48,62,.14)!important;background-image:none!important;color:#ff7b87!important;-webkit-text-fill-color:#ff7b87!important;border-color:rgba(255,91,107,.48)!important;box-shadow:none!important}
html[data-theme="dark"] body:has(main.admin) :is(.diet-builder-meal-head>.diet-remove,.rx-item>.diet-remove,.rx-published-list .diet-remove,.rx-template-compound .diet-remove):hover,
html[data-theme="dark"] body:has(main.admin) :is(.diet-builder-meal-head>.diet-remove,.rx-item>.diet-remove,.rx-published-list .diet-remove,.rx-template-compound .diet-remove):focus-visible{background:rgba(196,48,62,.25)!important;color:#ff9aa3!important;-webkit-text-fill-color:#ff9aa3!important;border-color:#ff6675!important}
