:root{--hf-rail-width:72px;--hf-rail-open-width:238px;--hf-workspace-border:#dedfe1;--hf-workspace-muted:#727579}

/* Estrutura profissional: menu lateral compacto, com expansão sobre o conteúdo. */
body:has(main.admin) .app.hf-workspace-app>header{padding-left:max(102px,calc((100vw - 1380px)/2 + 72px))!important;padding-right:max(30px,calc((100vw - 1380px)/2))!important}
.hf-workspace-rail{position:fixed;z-index:35;top:76px;bottom:0;left:0;display:flex;width:var(--hf-rail-width);flex-direction:column;overflow:hidden;background:linear-gradient(180deg,#171819 0%,#101112 100%);color:#f5f5f5;transition:width .22s ease,box-shadow .22s ease}
.hf-workspace-rail:hover,.hf-workspace-rail:focus-within,.hf-workspace-rail.is-pinned{width:var(--hf-rail-open-width);box-shadow:9px 0 30px rgba(0,0,0,.18)}
.hf-workspace-menu-toggle{display:grid;flex:0 0 62px;width:72px;height:62px;place-items:center;border:0;border-bottom:1px solid rgba(255,255,255,.1);background:transparent;color:#f1f1f1}.hf-workspace-menu-toggle svg{width:23px;height:23px}
.hf-workspace-rail-items{display:grid;align-content:start;gap:3px;padding:10px 9px;overflow-y:auto;overflow-x:hidden;scrollbar-width:none}.hf-workspace-rail-items::-webkit-scrollbar{display:none}
.hf-workspace-nav-item{display:flex;width:220px;min-height:45px;align-items:center;gap:14px;padding:0 14px;border:0;border-radius:10px;background:transparent;color:#ebebeb;text-align:left;white-space:nowrap;cursor:pointer;transition:background .16s ease}.hf-workspace-nav-item:hover,.hf-workspace-nav-item.is-active{background:rgba(255,255,255,.12)}.hf-workspace-nav-icon{display:grid;width:26px;height:26px;flex:0 0 26px;place-items:center}.hf-workspace-nav-icon svg{width:21px;height:21px}.hf-workspace-nav-label{font-size:13px;font-weight:520;letter-spacing:.005em}.hf-workspace-back{flex:0 0 55px;width:220px;margin:8px 9px;border-top:1px solid rgba(255,255,255,.12);border-radius:0}

/* Área profissional: espaço horizontal generoso e cabeçalho do prontuário fixo. */
body:has(main.admin) main.admin.hf-workspace-patient,body:has(main.admin) main.admin.hf-workspace-dashboard{width:min(calc(100vw - 132px),1460px)!important;max-width:1460px!important;margin-right:auto!important;margin-left:calc(var(--hf-rail-width) + max(28px,(100vw - 1540px)/2))!important;padding-top:23px!important}
body:has(main.admin) main.admin.hf-workspace-patient>.back{margin-bottom:14px!important;font-size:13px!important;color:var(--hf-workspace-muted)!important}
body:has(main.admin) main.admin.hf-workspace-patient>.patient-title{position:sticky;z-index:8;top:76px;margin:0 0 22px!important;padding:15px 0 19px!important;border-bottom:1px solid var(--hf-workspace-border);background:var(--card,#fff)}
body:has(main.admin) main.admin.hf-workspace-patient>.patient-title .avatar.big{width:72px!important;height:72px!important;border-radius:15px!important}
body:has(main.admin) main.admin.hf-workspace-patient>.patient-title h1{font-size:clamp(22px,2.1vw,32px)!important}
body:has(main.admin) main.admin.hf-workspace-patient>.patient-title .patient-latest-summary{gap:7px!important}.hf-workspace-patient .patient-latest-summary>span{padding:5px 8px;border:1px solid var(--hf-workspace-border);border-radius:7px;font-size:11px!important}
body:has(main.admin) main.admin.hf-workspace-patient>.patient-clinical-flow[hidden],body:has(main.admin) main.admin.hf-workspace-patient>.patient-clinical-flow>[hidden],body:has(main.admin) main.admin.hf-workspace-patient>:is(.apn-anamnesis-card,.appointment-admin,.upload-card,.danger-zone,.preview,.hf-patient-overview)[hidden]{display:none!important}
body:has(main.admin) main.admin.hf-workspace-patient>.patient-clinical-flow>*,body:has(main.admin) main.admin.hf-workspace-patient>:is(.apn-anamnesis-card,.appointment-admin,.upload-card,.danger-zone):not([hidden]){margin-top:0!important}

/* Resumo clínico com informações reais e cartões condicionais. */
.hf-patient-overview{display:grid;gap:17px;padding-bottom:28px}.hf-overview-heading h2{margin:0;font-size:24px;font-weight:650}.hf-overview-heading p{margin:5px 0 0;color:var(--hf-workspace-muted);font-size:14px}
.hf-overview-metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.hf-overview-metric,.hf-overview-card,.hf-overview-empty{border:1px solid var(--hf-workspace-border);border-radius:12px;background:var(--card,#fff)}.hf-overview-metric{display:grid;gap:8px;min-height:104px;padding:15px 16px}.hf-overview-metric>span{font-size:13px}.hf-overview-metric>strong{font-size:25px;font-weight:700;line-height:1.1}.hf-overview-metric>small{color:var(--hf-workspace-muted);font-size:11px}
.hf-overview-visual-grid{display:grid;grid-template-columns:minmax(340px,.86fr) minmax(430px,1.14fr);gap:14px}.hf-overview-visual-grid.single{grid-template-columns:1fr}.hf-overview-card{min-width:0;padding:15px 16px}.hf-overview-card>header{display:flex;min-height:25px;align-items:center;justify-content:space-between;gap:12px}.hf-overview-card h3{margin:0;font-size:14px;font-weight:650}.hf-overview-card>header>span{color:var(--hf-workspace-muted);font-size:11px}
.hf-overview-macro-layout{display:flex;min-height:170px;align-items:center;justify-content:center;gap:25px;padding:12px 4px}.hf-overview-donut{position:relative;display:grid;width:150px;height:150px;flex:0 0 150px;place-items:center;border-radius:50%;background:conic-gradient(#27292b 0 var(--hf-carb),#747779 var(--hf-carb) var(--hf-protein),#b8babd var(--hf-protein) 100%)}.hf-overview-donut>span{display:grid;width:102px;height:102px;align-content:center;justify-items:center;border-radius:50%;background:var(--card,#fff)}.hf-overview-donut strong{font-size:21px}.hf-overview-donut small{font-size:11px;color:var(--hf-workspace-muted)}.hf-overview-macro-legend{display:grid;gap:13px}.hf-overview-macro-legend>div{display:grid;grid-template-columns:12px 40px 1fr;align-items:start;gap:8px}.hf-overview-macro-legend i,.hf-overview-chart-legend i{display:block;width:10px;height:10px;margin-top:4px;border-radius:50%}.hf-overview-macro-legend i.carbs{background:#27292b}.hf-overview-macro-legend i.protein{background:#747779}.hf-overview-macro-legend i.fat{background:#b8babd}.hf-overview-macro-legend strong{font-size:14px}.hf-overview-macro-legend span{font-size:12px}.hf-overview-macro-legend small{display:block;margin-top:2px;color:var(--hf-workspace-muted);font-size:10px}
.hf-overview-chart-legend{display:flex;align-items:center;gap:12px}.hf-overview-chart-legend>span{display:flex;align-items:center;gap:6px;color:var(--hf-workspace-muted);font-size:10px}.hf-overview-chart-legend i{width:15px;height:3px;margin:0;border-radius:2px}.hf-overview-chart-legend i.weight,.hf-overview-chart-line.weight{background:#252729;stroke:#252729}.hf-overview-chart-legend i.fat,.hf-overview-chart-line.fat{background:#929598;stroke:#929598}.hf-overview-trend svg{display:block;width:100%;height:176px;margin-top:8px}.hf-overview-grid-line{stroke:#dadbde;stroke-dasharray:3 3}.hf-overview-chart-line{fill:none;stroke-width:2.3}.hf-overview-trend circle.weight{fill:#252729}.hf-overview-trend circle.fat{fill:#929598}.hf-overview-trend text{fill:#717478;font-size:10px}
.hf-overview-detail-grid{display:grid;grid-template-columns:minmax(260px,1fr) minmax(270px,1fr) minmax(150px,.55fr);gap:14px}.hf-overview-energy-row{display:grid;gap:7px;margin-top:20px}.hf-overview-energy-row>span{font-size:12px}.hf-overview-energy-row>strong{font-size:21px}.hf-overview-bar{height:8px;overflow:hidden;border-radius:99px;background:#dedfe1}.hf-overview-bar i{display:block;height:100%;border-radius:99px;background:#282a2c}.hf-overview-cal-details{display:grid;gap:7px;margin-top:15px;font-size:11px}.hf-overview-cal-details>span{display:flex;justify-content:space-between;gap:8px;color:var(--hf-workspace-muted)}.hf-overview-cal-details strong{color:var(--text,#17191d)}
.hf-overview-recent>button{display:grid;width:100%;grid-template-columns:36px minmax(0,1fr) 20px;align-items:center;gap:10px;padding:10px 0;border:0;border-bottom:1px solid var(--hf-workspace-border);background:transparent;color:inherit;text-align:left}.hf-overview-recent>button:last-child{border-bottom:0}.hf-overview-recent-icon{display:grid;width:34px;height:34px;place-items:center;border:1px solid var(--hf-workspace-border);border-radius:8px}.hf-overview-recent-icon svg,.hf-overview-recent-arrow svg{width:19px;height:19px}.hf-overview-recent>button>span:nth-child(2){display:grid;gap:3px}.hf-overview-recent>button strong{font-size:12px}.hf-overview-recent>button small{color:var(--hf-workspace-muted);font-size:10px}
.hf-overview-appointment{display:grid;justify-items:center;align-content:start;text-align:center}.hf-overview-appointment>header{margin-bottom:10px}.hf-overview-appointment-icon svg{width:24px;height:24px}.hf-overview-appointment>strong{margin-top:8px;font-size:38px;line-height:1}.hf-overview-appointment>span:not(.hf-overview-appointment-icon){font-size:17px}.hf-overview-appointment>small{width:100%;margin-top:12px;padding-top:9px;border-top:1px solid var(--hf-workspace-border);font-size:14px}
.hf-overview-empty{display:grid;justify-items:center;padding:45px 20px;text-align:center}.hf-overview-empty>svg{width:36px;height:36px;color:#76797b}.hf-overview-empty h3{margin:14px 0 4px}.hf-overview-empty p{max-width:490px;margin:0;color:var(--hf-workspace-muted);font-size:13px}

/* Biblioteca profissional: cabeçalho arejado e cadastro por 100 gramas. */
body:has(main.admin) .hf-meal-library-head{margin-bottom:24px!important;padding-bottom:5px!important}.hf-custom-food-card{margin-top:18px!important;margin-bottom:18px!important}.hf-custom-food-description{margin:5px 0 17px;color:var(--hf-workspace-muted);font-size:13px}.hf-custom-food-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.hf-custom-food-fields>label{display:grid;gap:7px;font-size:12px}.hf-custom-food-name{grid-column:span 3}.hf-custom-food-fields input{width:100%;min-height:43px;padding:9px 11px;border:1px solid var(--border,#ccd0d6);border-radius:10px;background:var(--card,#fff);color:inherit}.hf-custom-food-reference{background:rgba(125,128,132,.09)!important}.hf-custom-food-actions{margin-top:17px!important}

html[data-theme=dark] .hf-workspace-patient>.patient-title{background:#0d0e10!important}html[data-theme=dark] :is(.hf-overview-card,.hf-overview-metric,.hf-overview-empty,.hf-overview-donut>span){background:#15171a;border-color:#34363a}html[data-theme=dark] .hf-overview-heading h2,html[data-theme=dark] .hf-overview-card h3,html[data-theme=dark] .hf-overview-metric strong,html[data-theme=dark] .hf-overview-cal-details strong{color:#f4f4f5}html[data-theme=dark] .hf-overview-chart-line.weight{stroke:#f0f0f0}html[data-theme=dark] .hf-overview-trend circle.weight{fill:#f0f0f0}html[data-theme=dark] .hf-overview-grid-line{stroke:#414348}html[data-theme=dark] .hf-overview-chart-legend i.weight,html[data-theme=dark] .hf-overview-bar i{background:#e7e8e9}html[data-theme=dark] .hf-custom-food-fields input{background:#15171a;border-color:#34363a}

@media(max-width:1080px){.hf-overview-visual-grid{grid-template-columns:1fr}.hf-overview-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hf-overview-appointment{grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center}.hf-overview-appointment>header{margin:0}.hf-overview-appointment>strong{margin:0}.hf-overview-appointment>small{margin:0;padding:0;border:0}}
@media(max-width:720px){:root{--hf-rail-width:55px;--hf-rail-open-width:min(230px,calc(100vw - 45px))}.hf-workspace-rail{top:66px}.hf-workspace-menu-toggle{width:55px}.hf-workspace-rail-items{padding-right:5px;padding-left:5px}.hf-workspace-nav-item{padding-left:10px}.hf-workspace-back{margin-left:5px}body:has(main.admin) .app.hf-workspace-app>header{padding-right:12px!important;padding-left:65px!important}body:has(main.admin) main.admin.hf-workspace-patient,body:has(main.admin) main.admin.hf-workspace-dashboard{width:calc(100vw - 75px)!important;margin-left:65px!important;padding-top:14px!important}body:has(main.admin) main.admin.hf-workspace-patient>.patient-title{top:66px;padding-top:10px!important}.hf-overview-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.hf-overview-metric{min-height:87px;padding:11px}.hf-overview-metric>strong{font-size:20px}.hf-overview-detail-grid{grid-template-columns:1fr}.hf-overview-appointment{grid-column:auto}.hf-overview-macro-layout{gap:14px}.hf-overview-donut{width:115px;height:115px;flex-basis:115px}.hf-overview-donut>span{width:79px;height:79px}.hf-overview-macro-legend>div{grid-template-columns:9px 33px 1fr;gap:5px}.hf-overview-macro-legend strong{font-size:12px}.hf-overview-macro-legend span{font-size:10px}.hf-overview-chart-legend{gap:5px}.hf-overview-chart-legend>span{font-size:9px}.hf-custom-food-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.hf-custom-food-name{grid-column:span 2}}
@media(max-width:420px){.hf-overview-visual-grid{grid-template-columns:1fr}.hf-overview-card{padding:12px 10px}.hf-overview-macro-layout{gap:9px}.hf-overview-donut{width:101px;height:101px;flex-basis:101px}.hf-overview-donut>span{width:68px;height:68px}.hf-overview-donut strong{font-size:16px}.hf-overview-heading h2{font-size:20px}.hf-overview-card h3{font-size:12px}.hf-overview-metric>strong{font-size:17px}.hf-overview-metric>small{font-size:9px}}

/* Cabeçalho HF: identidade preta permanente, nos dois temas. */
.app>header,html[data-theme=light] .app>header,html[data-theme=dark] .app>header{background:#111214!important;border-bottom:1px solid #292b2e!important;color:#f5f5f5!important}.app>header .brand b,.app>header .account b{color:#fff!important}.app>header .brand small,.app>header .account small{color:#bec1c5!important}.app>header .theme-toggle,.app>header .icon{border-color:#44474a!important;background:#25272a!important;color:#fff!important}

/* Prontuário: menu sempre aberto e exclusivo da página do paciente. */
@media(min-width:721px){:root{--hf-rail-width:64px;--hf-rail-open-width:220px}.hf-workspace-rail,.hf-workspace-rail:focus-within{width:var(--hf-rail-width);box-shadow:none}.hf-workspace-rail:hover,.hf-workspace-rail:has(:focus-visible),.hf-workspace-rail.is-pinned{width:var(--hf-rail-open-width);box-shadow:9px 0 30px rgba(0,0,0,.18)}.hf-workspace-rail-items{gap:2px;padding:12px 8px}.hf-workspace-nav-item{width:204px;min-height:42px;gap:9px;padding:0 10px}.hf-workspace-nav-label,.hf-workspace-submenu-arrow{opacity:0;transition:opacity .16s ease}.hf-workspace-rail:hover .hf-workspace-nav-label,.hf-workspace-rail:hover .hf-workspace-submenu-arrow,.hf-workspace-rail:has(:focus-visible) .hf-workspace-nav-label,.hf-workspace-rail:has(:focus-visible) .hf-workspace-submenu-arrow,.hf-workspace-rail.is-pinned .hf-workspace-nav-label,.hf-workspace-rail.is-pinned .hf-workspace-submenu-arrow{opacity:1}.hf-workspace-nav-label{display:block;font-size:12px}.hf-workspace-rail:not(:hover):not(:has(:focus-visible)):not(.is-pinned) .hf-workspace-submenu{display:none!important}.hf-workspace-back{width:204px;margin:8px}.hf-workspace-menu-toggle{display:none}body:has(main.admin.hf-workspace-patient) .app.hf-workspace-app>header{padding-left:88px!important;padding-right:max(24px,calc((100vw - 1510px)/2))!important}body:has(main.admin) main.admin.hf-workspace-patient{width:min(calc(100vw - 114px),1460px)!important;margin-left:calc(var(--hf-rail-width) + max(22px,(100vw - 1544px)/2))!important;padding-top:12px!important}}

/* Resumo compacto e estritamente informativo. */
body:has(main.admin) main.admin.hf-workspace-patient>.back{margin-bottom:7px!important}body:has(main.admin) main.admin.hf-workspace-patient>.patient-title{margin-bottom:11px!important;padding:8px 0 11px!important}body:has(main.admin) main.admin.hf-workspace-patient>.patient-title .avatar.big{width:58px!important;height:58px!important}.hf-patient-overview{gap:10px;padding-bottom:12px}.hf-overview-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.hf-overview-heading h2{font-size:21px}.hf-overview-heading p{margin-top:3px;font-size:12px}.hf-overview-next-appointment{display:flex;align-items:center;gap:9px;padding:7px 11px;border:1px solid var(--hf-workspace-border);border-radius:10px}.hf-overview-next-appointment>span:last-child{display:grid;gap:2px}.hf-overview-next-appointment small{color:var(--hf-workspace-muted);font-size:10px}.hf-overview-next-appointment strong{font-size:12px;white-space:nowrap}.hf-overview-appointment-icon svg{width:20px;height:20px}.hf-overview-metric-grid{gap:10px}.hf-overview-metric{min-height:76px;gap:4px;padding:10px 12px}.hf-overview-metric>strong{font-size:21px}.hf-overview-metric>small{font-size:10px}.hf-overview-visual-grid{grid-template-columns:minmax(300px,.86fr) minmax(360px,1.14fr);gap:10px}.hf-overview-card{padding:10px 12px}.hf-overview-macro-layout{min-height:136px;gap:20px;padding:7px 2px}.hf-overview-donut{width:122px;height:122px;flex-basis:122px;background:conic-gradient(#3679dc 0 var(--hf-carb),#db535d var(--hf-carb) var(--hf-protein),#e8b632 var(--hf-protein) 100%)}.hf-overview-donut>span{width:84px;height:84px}.hf-overview-macro-legend{gap:9px}.hf-overview-macro-legend i.carbs{background:#3679dc}.hf-overview-macro-legend i.protein{background:#db535d}.hf-overview-macro-legend i.fat{background:#e8b632}.hf-overview-chart-legend i.fat{background:#e8b632}.hf-overview-chart-line.fat{stroke:#e8b632}.hf-overview-trend circle.fat{fill:#e8b632}.hf-overview-chart-legend i.muscle{background:#db535d}.hf-overview-chart-line.muscle{stroke:#db535d}.hf-overview-trend circle.muscle{fill:#db535d}.hf-overview-trend svg{height:139px;margin-top:5px}.hf-overview-detail-grid{grid-template-columns:1fr;gap:10px}.hf-overview-calorimetry>header>div{display:grid;gap:3px}.hf-overview-calorimetry>header>div>small{color:var(--hf-workspace-muted);font-size:10px}.hf-overview-calorimetry>header>strong{font-size:17px}.hf-overview-calorimetry>svg{display:block;width:100%;height:89px;margin-top:4px}.hf-overview-energy-line{fill:none;stroke:#3679dc;stroke-width:2.5}.hf-overview-energy-point{fill:#3679dc}.hf-overview-calorimetry text{fill:#73767a;font-size:10px}

@media(min-width:721px) and (max-width:1080px){.hf-overview-visual-grid{grid-template-columns:1fr}.hf-overview-detail-grid{grid-template-columns:1fr}}@media(min-width:1081px) and (max-height:850px){.hf-workspace-rail-items{gap:0;padding-top:8px}.hf-workspace-nav-item{min-height:38px}.hf-overview-metric{min-height:69px;padding:8px 11px}.hf-overview-macro-layout{min-height:120px}.hf-overview-donut{width:108px;height:108px;flex-basis:108px}.hf-overview-donut>span{width:75px;height:75px}.hf-overview-trend svg{height:123px}.hf-overview-calorimetry>svg{height:72px}}@media(max-width:720px){.hf-workspace-rail,.hf-workspace-rail:hover,.hf-workspace-rail:focus-within{width:55px;box-shadow:none}.hf-workspace-nav-label{display:none}.hf-workspace-menu-toggle{display:none}.hf-workspace-rail-items{padding-top:12px}.hf-overview-heading{align-items:flex-start}.hf-overview-next-appointment{padding:5px}.hf-overview-next-appointment small{font-size:9px}.hf-overview-next-appointment strong{font-size:10px}.hf-overview-visual-grid{grid-template-columns:1fr}.hf-overview-detail-grid{grid-template-columns:1fr}}

/* Cabeçalho e menu compartilham a cor configurada para a identidade. */
.app>header,html[data-theme=light] .app>header,html[data-theme=dark] .app>header,.hf-workspace-rail{background:var(--brand-primary,var(--primary,#111214))!important}.app>header .theme-toggle,.app>header .icon{background:rgba(255,255,255,.12)!important}

/* Identificação clínica leve, sem cartões nem peso visual excessivo. */
.hf-workspace-patient .patient-latest-summary{gap:0!important}.hf-workspace-patient .patient-latest-summary>span{padding:0 10px!important;border:0!important;border-radius:0!important;background:none!important;font-size:12px!important;font-weight:400!important}.hf-workspace-patient .patient-latest-summary>span+span{border-left:1px solid currentColor!important}.hf-workspace-patient .patient-latest-summary>span::before,.hf-workspace-patient .patient-latest-summary>span::after{display:none!important}

/* A navegação lateral abre as seções diretamente; seus toggles não aparecem. */
.hf-workspace-patient :is(.anthro-admin-head,.diet-builder-title,.patient-prescriptions-head,.anthro-history-head,.apn-image-head,.apn-pulse-record-head,.apn-anamnesis-head,.appointment-admin)>:is(.anthro-section-toggle,.diet-plan-toggle,.apn-pulse-record-toggle,.apn-image-open,.apn-anamnesis-open,.appointment-toggle),.hf-workspace-patient .diet-builder-title-actions>.diet-plan-toggle,.hf-workspace-patient .anthro-history-card>.anthro-section-toggle{display:none!important}.hf-workspace-patient :is(.anthro-admin,.diet-builder,.patient-prescriptions-card,.anthro-history-card,.apn-image-card,.apn-pulse-record,.apn-anamnesis-card){margin-top:0!important}

/* Avaliação RFM horizontal: duas fotos pequenas e quatro medidas à direita. */
@media(min-width:761px){.hf-workspace-patient .apn-image-form{grid-template-columns:minmax(0,1.35fr) minmax(240px,.65fr);gap:11px 18px;align-items:start}.hf-workspace-patient .apn-photo-section{grid-column:1;grid-row:1;gap:8px}.hf-workspace-patient .apn-rfm-fields{grid-column:2;grid-row:1;grid-template-columns:1fr;gap:9px;padding-top:4px}.hf-workspace-patient .apn-image-form>:not(.apn-photo-section):not(.apn-rfm-fields){grid-column:1/-1}.hf-workspace-patient .apn-photo-card{grid-template-rows:auto minmax(95px,125px) auto auto;gap:5px;padding:9px 8px}.hf-workspace-patient .apn-photo-grid{gap:10px}.hf-workspace-patient .apn-photo-silhouette{width:min(82px,72%)}.hf-workspace-patient .apn-photo-title,.hf-workspace-patient .apn-photo-action{font-size:12px}.hf-workspace-patient .apn-photo-guidance,.hf-workspace-patient .apn-photo-privacy,.hf-workspace-patient .apn-photo-section-head p{font-size:10px;line-height:1.35}.hf-workspace-patient .apn-rfm-fields label{gap:4px;font-size:11px}.hf-workspace-patient .apn-rfm-fields input{min-height:36px;padding:7px 9px}.hf-workspace-patient .apn-image-content{padding-top:10px}.hf-workspace-patient .apn-image-result{margin-top:3px}}

/* Gasto energético: ativação no cabeçalho e indicadores compactos. */
.hf-workspace-patient .energy-card-title{margin-bottom:5px!important}.hf-workspace-patient .energy-menu-content{margin-top:4px!important;padding-top:9px!important}.hf-workspace-patient .energy-planning-body{padding-top:0!important}.hf-workspace-patient .energy-summary-five{gap:7px!important}.hf-workspace-patient .energy-summary-five>:is(span,label){min-height:47px!important;gap:3px!important;padding:7px 9px!important}.hf-workspace-patient .energy-summary-five small{font-size:12px!important;font-weight:700!important;color:inherit!important}.hf-workspace-patient .energy-summary-five b,.hf-workspace-patient .energy-summary-five select{font-size:12px!important;font-weight:400!important}.hf-workspace-patient .energy-readonly b{font-weight:400!important}.hf-workspace-patient .energy-card-title>.energy-use-calculation{flex:0 0 auto}@media(max-width:760px){.hf-workspace-patient .energy-card-title{align-items:flex-start;gap:8px}.hf-workspace-patient .energy-card-title>.energy-use-calculation{padding:6px;font-size:10px!important}.hf-workspace-patient .energy-summary-five small{font-size:10px!important}}

/* Barra superior sempre na cor principal, inclusive na versão clara. */
html[data-theme="light"] body #root>.app>header,html[data-theme="dark"] body #root>.app>header,html body #root>.app>header{background:var(--brand-primary,#111214)!important;background-color:var(--brand-primary,#111214)!important;background-image:none!important;border-bottom-color:rgba(255,255,255,.16)!important;color:#fff!important}.hf-workspace-rail{background:var(--brand-primary,#111214)!important}html body #root>.app>header .brand b,html body #root>.app>header .account b{color:#fff!important}html body #root>.app>header .brand small,html body #root>.app>header .account small{color:#d0d2d5!important}html[data-theme="light"] body #root>.app>header .theme-toggle{background:#f1f2f3!important;border-color:#d2d4d6!important;color:#17191d!important}html[data-theme="light"] body #root>.app>header .theme-toggle :is(.theme-toggle-icon,.theme-toggle-label){color:#17191d!important}html[data-theme="dark"] body #root>.app>header .theme-toggle{background:#25272a!important;color:#fff!important}

/* O retorno ao painel permanece somente no botão Início da navegação lateral. */
body:has(main.admin) main.admin.hf-workspace-patient>.back{display:none!important}body:has(main.admin) main.admin.hf-workspace-patient>.patient-title{margin-top:2px!important}

/* Prescrições com campos, fontes e espaçamentos proporcionais ao prontuário. */
body:has(main.admin) .hf-workspace-patient .patient-clinical-flow>.patient-prescriptions-card{padding:14px 16px!important;border-radius:16px!important}.hf-workspace-patient .patient-prescriptions-head{gap:10px!important;margin-bottom:8px!important}.hf-workspace-patient .patient-prescriptions-head .hf-section-symbol{width:43px!important;height:43px!important;flex-basis:43px!important}.hf-workspace-patient .patient-prescriptions-head h2{margin:1px 0 3px!important;font-size:20px!important}.hf-workspace-patient .patient-prescriptions-head p{font-size:12px!important}.hf-workspace-patient .patient-prescriptions-body{margin-top:8px!important;padding-top:10px!important}.hf-workspace-patient :is(.rx-draft-toolbar,.rx-draft-meta){gap:9px!important;margin-bottom:9px!important}.hf-workspace-patient :is(.rx-draft-toolbar label,.rx-draft-meta label,.rx-instructions){gap:4px!important;font-size:12px!important;font-weight:550!important}.hf-workspace-patient :is(.rx-draft-toolbar select,.rx-draft-meta input,.rx-instructions textarea,.rx-template-compound input){min-height:38px!important;padding:7px 9px!important;border-radius:9px!important;font-size:13px!important}.hf-workspace-patient .rx-instructions textarea{min-height:75px!important;max-height:130px}.hf-workspace-patient .rx-publish-actions{gap:8px!important;margin-top:10px!important}.hf-workspace-patient .rx-publish-actions button{min-height:37px!important;padding:7px 12px!important;font-size:12px!important}.hf-workspace-patient .rx-published-list{gap:7px!important;margin-top:13px!important}.hf-workspace-patient .rx-published-list article{gap:9px!important;padding:9px 10px!important}.hf-workspace-patient .rx-published-list h4{font-size:13px!important}.hf-workspace-patient .rx-empty{margin-top:12px!important;padding:13px 8px!important;font-size:12px!important}.hf-workspace-patient .rx-items{gap:7px!important;margin:9px 0!important}.hf-workspace-patient .rx-item{gap:7px!important;padding:8px!important}

/* No tema claro, os cartões do resumo acompanham a identidade preta do HF. */
html[data-theme="light"] .hf-patient-overview :is(.hf-overview-metric,.hf-overview-card,.hf-overview-empty,.hf-overview-next-appointment){border-color:#17191d!important}.hf-workspace-home{margin-bottom:5px!important}

/* Antropometria: submenu contextual e resultados idênticos ao aplicativo do paciente. */
.hf-workspace-anthropometry-parent{position:relative}.hf-workspace-submenu-arrow{display:grid;width:15px;height:15px;margin-left:auto;place-items:center;transition:transform .18s ease}.hf-workspace-submenu-arrow svg{width:14px;height:14px}.hf-workspace-anthropometry-parent.is-active .hf-workspace-submenu-arrow{transform:rotate(90deg)}.hf-workspace-anthropometry-submenu{display:grid;gap:2px;margin:2px 0 5px 21px;padding-left:8px;border-left:1px solid rgba(255,255,255,.26)}.hf-workspace-anthropometry-submenu[hidden]{display:none!important}.hf-workspace-subnav-item{width:175px!important;min-height:35px!important;gap:7px!important;padding:0 8px!important}.hf-workspace-subnav-item .hf-workspace-nav-icon{width:20px;height:20px;flex-basis:20px}.hf-workspace-subnav-item .hf-workspace-nav-icon svg{width:16px;height:16px}.hf-workspace-subnav-item .hf-workspace-nav-label{font-size:11px!important}.hf-professional-anthropometry-results{min-width:0}.hf-professional-anthropometry-results>.assessments{margin:0!important}.hf-professional-anthropometry-results .section-head{margin-bottom:12px!important}.hf-professional-anthropometry-results .assessment-card{margin:0!important}.hf-professional-anthropometry-results .assessment-table-wrap{max-width:100%;overflow-x:auto}.hf-professional-results-empty{padding:20px;border:1px solid var(--hf-workspace-border);border-radius:14px;color:var(--hf-workspace-muted)}@media(max-width:720px){.hf-workspace-anthropometry-submenu{margin-left:3px;padding-left:0;border-left:0}.hf-workspace-subnav-item{width:42px!important;justify-content:center;padding:0!important}.hf-workspace-submenu-arrow{display:none}}

/* Submenus clínicos e comparativos horizontais no histórico profissional. */
.hf-workspace-prescriptions-parent{position:relative}.hf-workspace-prescriptions-parent.is-active .hf-workspace-submenu-arrow{transform:rotate(90deg)}.hf-workspace-prescriptions-submenu{display:grid;gap:2px;margin:2px 0 5px 21px;padding-left:8px;border-left:1px solid rgba(255,255,255,.26)}.hf-workspace-prescriptions-submenu[hidden]{display:none!important}.hf-workspace-prescriptions-submenu .hf-workspace-subnav-item{width:177px!important}.hf-workspace-prescriptions-submenu .hf-workspace-nav-label{overflow:hidden;font-size:10px!important;text-overflow:ellipsis}.hf-professional-anthropometry-results>.assessments{display:grid;gap:11px}.hf-professional-anthropometry-results .section-head h2{margin:0;font-size:22px}.hf-professional-anthropometry-results .assessment-card{padding:15px 17px!important;border-radius:16px!important}.hf-professional-anthropometry-results .assessment-title{padding:0 0 10px!important}.hf-professional-anthropometry-results .assessment-title>span{width:42px!important;height:42px!important}.hf-professional-anthropometry-results .assessment-title h3{font-size:18px!important}.hf-professional-anthropometry-results .assessment-title p{font-size:11px!important}.hf-professional-anthropometry-results .assessment-table{width:max-content;min-width:100%;border-spacing:0}.hf-professional-anthropometry-results .assessment-table th,.hf-professional-anthropometry-results .assessment-table td{padding:9px 11px!important;font-size:12px!important}.hf-professional-anthropometry-results .assessment-table thead th{white-space:nowrap}.hf-professional-anthropometry-results .assessment-table tbody th{min-width:155px;white-space:nowrap}.hf-professional-anthropometry-results .assessment-table tbody td{min-width:145px;white-space:nowrap}.hf-professional-anthropometry-results .assessment-table td strong{display:inline-block!important;margin:0 8px 0 0!important;font-size:13px!important;vertical-align:middle}.hf-professional-anthropometry-results .assessment-table td .delta{display:inline-flex!important;margin:0!important;padding:3px 6px!important;font-size:9px!important;vertical-align:middle}.hf-professional-anthropometry-results .scroll-hint{margin-top:7px;font-size:10px}.hf-professional-anthropometry-results .patient-trend-card{margin-top:10px!important}.lab-exam-prescription-body .rx-instructions{margin-bottom:10px}.lab-exam-template-loader select{min-height:38px;padding:7px 9px;border:1px solid var(--border,#ccd0d6);border-radius:9px;background:var(--card,#fff);color:inherit}@media(max-width:720px){.hf-workspace-prescriptions-submenu{margin-left:3px;padding-left:0;border-left:0}.hf-workspace-prescriptions-submenu .hf-workspace-subnav-item{width:42px!important}}
.hf-professional-anthropometry-results .section-head{order:0}.hf-professional-anthropometry-results .assessment-card{order:1}.hf-professional-anthropometry-results .assessment-card:last-child:not(.apn-rfm-patient-card){order:2}.hf-professional-anthropometry-results .apn-rfm-patient-card{order:3}

/* Comparação personalizada: a tabela aparece somente após escolher as datas. */
.hf-results-awaiting-selection{display:none!important}.hf-assessment-date-selector{display:grid;gap:12px;margin:11px 0;padding:14px;border:1px solid var(--border,#d7d9dc);border-radius:12px;background:var(--card,#fff)}.hf-assessment-date-selector-head,.hf-assessment-date-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.hf-assessment-date-selector-head>div{display:grid;gap:3px}.hf-assessment-date-selector-head strong{font-size:13px}.hf-assessment-date-selector-head small,.hf-assessment-date-actions>small{color:var(--hf-workspace-muted);font-size:11px}.hf-assessment-select-all{padding:6px 9px;border:1px solid var(--border,#d7d9dc);border-radius:8px;background:transparent;color:inherit;font-size:11px;cursor:pointer}.hf-assessment-date-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}.hf-assessment-date-option{display:flex;min-height:38px;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--border,#d7d9dc);border-radius:9px;font-size:11px;cursor:pointer}.hf-assessment-date-option.is-selected{border-color:var(--brand-primary,#17191d);background:rgba(120,120,120,.08)}.hf-assessment-date-option input{width:15px;height:15px;accent-color:var(--brand-primary,#17191d)}.hf-assessment-compare-button{min-height:35px;padding:7px 12px;border:0;border-radius:9px;background:var(--brand-primary,#17191d);color:#fff;font-size:11px;cursor:pointer}.hf-assessment-compare-button:disabled{opacity:.45;cursor:not-allowed}html[data-theme="light"] .lab-exam-template-loader select,html[data-theme="light"] .lab-exam-prescription-body :is(select,textarea){background:#fff!important;color:#17191d!important;border-color:#cfd2d6!important}html[data-theme="dark"] .lab-exam-template-loader select,html[data-theme="dark"] .lab-exam-prescription-body :is(select,textarea){background:#15171a!important;color:#f1f2f3!important;border-color:#44474a!important}html[data-theme="dark"] .hf-assessment-date-selector{background:#15171a;border-color:#44474a}html[data-theme="dark"] .hf-assessment-date-option,html[data-theme="dark"] .hf-assessment-select-all{border-color:#44474a}@media(max-width:650px){.hf-assessment-date-selector-head,.hf-assessment-date-actions{align-items:flex-start;flex-direction:column}.hf-assessment-date-options{grid-template-columns:1fr}}
.hf-assessment-date-action-buttons{display:flex;align-items:center;gap:8px}.hf-assessment-download-button{min-height:35px;padding:7px 12px;border:1px solid var(--brand-primary,#17191d);border-radius:9px;background:transparent;color:inherit;font-size:11px;cursor:pointer}.hf-assessment-download-button:disabled{opacity:.5;cursor:not-allowed}.hf-assessment-download-error{color:#c44747;font-size:11px}@media(max-width:650px){.hf-assessment-date-action-buttons{width:100%;flex-wrap:wrap}}
.hf-workspace-patient .energy-planning-body{border-top:0!important}

/* Ações do prontuário e alternador visual alinhados à identidade da plataforma. */
.hf-patient-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;margin-left:auto}.hf-patient-header-actions .patient-preview-button{margin-left:0!important;white-space:nowrap}.hf-patient-edit-header-button>span{font-size:18px;line-height:1}html[data-theme="light"] body #root>.app>header .theme-toggle,html[data-theme="dark"] body #root>.app>header .theme-toggle{background:var(--brand-primary,var(--primary,#111214))!important;background-color:var(--brand-primary,var(--primary,#111214))!important;border-color:rgba(255,255,255,.35)!important;color:#fff!important}html[data-theme="light"] body #root>.app>header .theme-toggle :is(.theme-toggle-icon,.theme-toggle-label),html[data-theme="dark"] body #root>.app>header .theme-toggle :is(.theme-toggle-icon,.theme-toggle-label){color:#fff!important}@media(max-width:900px){.hf-patient-header-actions{flex-wrap:wrap;gap:6px}.hf-patient-header-actions .patient-preview-button{padding:7px 9px!important;font-size:11px!important}}@media(max-width:720px){.hf-patient-header-actions{justify-content:flex-start}}

/* Tema e saída preservam a cor da plataforma no painel e no aplicativo. */
html[data-theme="light"] body #root>.app>header .account>button:is(.theme-toggle,.icon),html[data-theme="dark"] body #root>.app>header .account>button:is(.theme-toggle,.icon){background:var(--brand-primary,var(--primary,#111214))!important;background-color:var(--brand-primary,var(--primary,#111214))!important;background-image:none!important;border:1px solid rgba(255,255,255,.35)!important;color:#fff!important}html[data-theme="light"] body #root>.app>header .account>button:is(.theme-toggle,.icon) :is(span,svg),html[data-theme="dark"] body #root>.app>header .account>button:is(.theme-toggle,.icon) :is(span,svg){color:#fff!important;stroke:currentColor}

/* Todas as ações do aplicativo seguem a cor institucional, inclusive o Agente HF. */
html[data-theme="light"] body:has(main.portal) main.portal :is(.patient-download-card>button,.patient-resource-link,.guide-download,.install-app,.supplement-link,.calendar-link,.agent-hf-cta>a),html[data-theme="dark"] body:has(main.portal) main.portal :is(.patient-download-card>button,.patient-resource-link,.guide-download,.install-app,.supplement-link,.calendar-link,.agent-hf-cta>a){background:var(--brand-primary,var(--primary,#111214))!important;background-color:var(--brand-primary,var(--primary,#111214))!important;background-image:none!important;border-color:var(--brand-primary,var(--primary,#111214))!important;color:#fff!important}html[data-theme="light"] body:has(main.portal) main.portal :is(.patient-download-card>button,.patient-resource-link,.guide-download,.install-app,.supplement-link,.calendar-link,.agent-hf-cta>a) :is(svg,span),html[data-theme="dark"] body:has(main.portal) main.portal :is(.patient-download-card>button,.patient-resource-link,.guide-download,.install-app,.supplement-link,.calendar-link,.agent-hf-cta>a) :is(svg,span){color:#fff!important;stroke:currentColor}

/* Resultados profissionais: contraste correto no tema claro. */
html[data-theme="light"] .hf-professional-anthropometry-results .assessment-table-wrap{border-color:#d0d5da!important;background:#fff!important}
html[data-theme="light"] .hf-professional-anthropometry-results .assessment-table :is(th,td){border-color:#dce0e4!important;color:#17191c!important}
html[data-theme="light"] .hf-professional-anthropometry-results .assessment-table thead th{background:#e9ecef!important;color:#252a30!important}
html[data-theme="light"] .hf-professional-anthropometry-results .assessment-table tbody th{background:#f4f5f7!important;color:#262b30!important}
html[data-theme="light"] .hf-professional-anthropometry-results .assessment-table tbody td{background:#fff!important;color:#17191c!important}
html[data-theme="light"] .hf-professional-anthropometry-results .assessment-table tbody td strong{color:#17191c!important}
html[data-theme="light"] .hf-professional-anthropometry-results .assessment-table tbody tr:hover :is(th,td){background:#eef1f4!important}
html[data-theme="light"] .hf-professional-anthropometry-results .assessment-table .delta.neutral{background:#e4e7ea!important;border-color:#c9cdd2!important;color:#343a40!important}
html[data-theme="light"] .hf-professional-anthropometry-results .assessment-table .delta.good{background:#deefe4!important;border-color:#b7dcc3!important;color:#24643a!important}
html[data-theme="light"] .hf-professional-anthropometry-results .assessment-table .delta.bad{background:#f6e2e4!important;border-color:#eac3c7!important;color:#963943!important}
html[data-theme="light"] .hf-professional-anthropometry-results .patient-trend-card{border-color:#d0d5da!important;background:#fff!important;box-shadow:none!important}
html[data-theme="light"] .hf-professional-anthropometry-results .patient-trend-head h4{color:#17191c!important}
html[data-theme="light"] .hf-professional-anthropometry-results .patient-trend-head small{color:#69717a!important}
html[data-theme="light"] .hf-professional-anthropometry-results .patient-trend-value{fill:#17191c!important}
html[data-theme="light"] .hf-professional-anthropometry-results .patient-trend-date{fill:#69717a!important}
html[data-theme="light"] .hf-professional-anthropometry-results .patient-trend-grid{stroke:#d8dde2!important}
html[data-theme="light"] .hf-professional-anthropometry-results .patient-trend-svg circle{fill:#fff!important}
/* V20 — próxima consulta ampliada com ações rápidas no resumo. */
.hf-overview-next-appointment{display:flex!important;min-width:670px;align-items:center;gap:16px!important;padding:12px 14px!important;border-radius:14px!important}
.hf-overview-appointment-main{display:flex;align-items:center;gap:11px}.hf-overview-appointment-main>span:last-child{display:grid;gap:2px}.hf-overview-appointment-main strong{font-size:13px!important;text-transform:capitalize}.hf-overview-appointment-main b{font-size:17px;line-height:1.1}.hf-overview-appointment-icon{display:grid;width:38px;height:38px;flex:0 0 38px;place-items:center;border-radius:11px;background:var(--brand-primary,#111214);color:#fff}.hf-overview-appointment-icon svg{width:21px!important;height:21px!important}
.hf-overview-appointment-actions{display:flex;align-items:center;gap:7px;flex-wrap:nowrap;margin-left:auto}.hf-overview-appointment-actions :is(a,button,.hf-overview-confirmed){display:inline-flex;min-height:31px;align-items:center;justify-content:center;padding:6px 10px;border:1px solid var(--brand-primary,#111214);border-radius:8px;background:transparent;color:inherit;font:inherit;font-size:10px;font-weight:700;text-decoration:none;cursor:pointer;white-space:nowrap}.hf-overview-appointment-actions button[data-overview-confirm]{background:var(--brand-primary,#111214);color:#fff}.hf-overview-appointment-actions .hf-overview-confirmed{border-color:#198754;background:#e6f5ec;color:#176b3c;cursor:default}.hf-overview-appointment-actions .hf-overview-delete{border-color:#c43f4d!important;background:#c43f4d!important;color:#fff!important}
html[data-theme="dark"] .hf-overview-appointment-actions :is(a,button){border-color:#666b72;color:#f4f5f6}html[data-theme="dark"] .hf-overview-appointment-actions button[data-overview-confirm]{border-color:#f0f1f2;background:#f0f1f2;color:#111214}html[data-theme="dark"] .hf-overview-appointment-actions .hf-overview-confirmed{border-color:#319d61;background:#143421;color:#83d5a5}
@media(max-width:1180px){.hf-overview-next-appointment{min-width:0;flex-wrap:wrap}.hf-overview-appointment-actions{width:100%;margin-left:0}}
@media(max-width:720px){.hf-overview-heading{display:grid!important}.hf-overview-next-appointment{width:100%;min-width:0}.hf-overview-appointment-actions{flex-wrap:wrap}.hf-overview-appointment-actions :is(a,button,.hf-overview-confirmed){flex:1}}
