/* Paleta de ações do piloto: apenas cores, sombra e foco; nenhuma medida.
   Clássico e gatilhos de autocomplete conservam seus estilos. */
html.sf-pilot-modern body :is(.green-btn, .green-split-btn, .ui-button-success, .ui-confirmdialog-yes) {
    --sf-button-bg: #477e59; --sf-button-hover: #407150; --sf-button-active: #3a6749; --sf-button-ink: #ffffff;
}
html.sf-pilot-modern body :is(.red-btn, .red-split-btn, .ui-button-danger, .ui-confirmdialog-no) {
    --sf-button-bg: #b35c64; --sf-button-hover: #a1535a; --sf-button-active: #934b52; --sf-button-ink: #ffffff;
}
html.sf-pilot-modern body :is(.orange-btn, .orange-split-btn) {
    --sf-button-bg: #e0ad78; --sf-button-hover: #ca9c6c; --sf-button-active: #b88e62; --sf-button-ink: #38220e;
}
html.sf-pilot-modern body :is(.amber-btn, .amber-split-btn, .ui-button-warning, .yellow-btn) {
    --sf-button-bg: #d9b65f; --sf-button-hover: #c3a456; --sf-button-active: #b2954e; --sf-button-ink: #36290f;
}
html.sf-pilot-modern body :is(.cyan-btn, .cyan-split-btn, .ui-button-info) {
    --sf-button-bg: #327b8f; --sf-button-hover: #2d6f81; --sf-button-active: #296575; --sf-button-ink: #ffffff;
}
html.sf-pilot-modern body :is(.teal-btn, .teal-split-btn) {
    --sf-button-bg: #397e74; --sf-button-hover: #337168; --sf-button-active: #2f675f; --sf-button-ink: #ffffff;
}
html.sf-pilot-modern body :is(.purple-btn, .purple-split-btn, .ui-button-help) {
    --sf-button-bg: #7c659e; --sf-button-hover: #705b8e; --sf-button-active: #665382; --sf-button-ink: #ffffff;
}
html.sf-pilot-modern body :is(.pink-btn, .pink-split-btn) {
    --sf-button-bg: #ad5c80; --sf-button-hover: #9c5373; --sf-button-active: #8e4b69; --sf-button-ink: #ffffff;
}
html.sf-pilot-modern body :is(.deep-orange-btn, .deep-orange-split-btn) {
    --sf-button-bg: #a55c43; --sf-button-hover: #95533c; --sf-button-active: #874b37; --sf-button-ink: #ffffff;
}
html.sf-pilot-modern body :is(.brown-btn, .brown-split-btn) {
    --sf-button-bg: #866b5c; --sf-button-hover: #796053; --sf-button-active: #6e584b; --sf-button-ink: #ffffff;
}
html.sf-pilot-modern body :is(.blue-grey-btn, .blue-grey-split-btn, .ui-button-secondary) {
    --sf-button-bg: #586e7c; --sf-button-hover: #4f6370; --sf-button-active: #485a66; --sf-button-ink: #ffffff;
}
html.sf-pilot-modern.sf-pilot-dark body :is(.green-btn, .green-split-btn, .ui-button-success, .ui-confirmdialog-yes) {
    --sf-button-bg: #345a43; --sf-button-hover: #2f513c; --sf-button-active: #2b4a37; --sf-button-ink: #d8eedf;
}
html.sf-pilot-modern.sf-pilot-dark body :is(.red-btn, .red-split-btn, .ui-button-danger, .ui-confirmdialog-no) {
    --sf-button-bg: #713e48; --sf-button-hover: #663841; --sf-button-active: #5d333b; --sf-button-ink: #ffe1e5;
}
html.sf-pilot-modern.sf-pilot-dark body :is(.orange-btn, .orange-split-btn) {
    --sf-button-bg: #68472c; --sf-button-hover: #5e4028; --sf-button-active: #553a24; --sf-button-ink: #f8dfbf;
}
html.sf-pilot-modern.sf-pilot-dark body :is(.amber-btn, .amber-split-btn, .ui-button-warning, .yellow-btn) {
    --sf-button-bg: #655329; --sf-button-hover: #5b4b25; --sf-button-active: #534422; --sf-button-ink: #f5e3b5;
}
html.sf-pilot-modern.sf-pilot-dark body :is(.cyan-btn, .cyan-split-btn, .ui-button-info) {
    --sf-button-bg: #2c5362; --sf-button-hover: #284b58; --sf-button-active: #244450; --sf-button-ink: #d3edf4;
}
html.sf-pilot-modern.sf-pilot-dark body :is(.teal-btn, .teal-split-btn) {
    --sf-button-bg: #305851; --sf-button-hover: #2b4f49; --sf-button-active: #274842; --sf-button-ink: #d7efea;
}
html.sf-pilot-modern.sf-pilot-dark body :is(.purple-btn, .purple-split-btn, .ui-button-help) {
    --sf-button-bg: #514361; --sf-button-hover: #493c57; --sf-button-active: #423750; --sf-button-ink: #ebdef8;
}
html.sf-pilot-modern.sf-pilot-dark body :is(.pink-btn, .pink-split-btn) {
    --sf-button-bg: #684258; --sf-button-hover: #5e3b4f; --sf-button-active: #553648; --sf-button-ink: #f8dfec;
}
html.sf-pilot-modern.sf-pilot-dark body :is(.deep-orange-btn, .deep-orange-split-btn) {
    --sf-button-bg: #6c4638; --sf-button-hover: #613f32; --sf-button-active: #59392e; --sf-button-ink: #f7e0d5;
}
html.sf-pilot-modern.sf-pilot-dark body :is(.brown-btn, .brown-split-btn) {
    --sf-button-bg: #55473f; --sf-button-hover: #4c4039; --sf-button-active: #463a34; --sf-button-ink: #eee3dc;
}
html.sf-pilot-modern.sf-pilot-dark body :is(.blue-grey-btn, .blue-grey-split-btn, .ui-button-secondary) {
    --sf-button-bg: #3b4f5e; --sf-button-hover: #354755; --sf-button-active: #30414d; --sf-button-ink: #e0eaf1;
}
html.sf-pilot-modern body .ui-button:where(:not(.ui-selectbooleanbutton, .ui-selectonebutton .ui-button, .ui-selectmanybutton .ui-button, .ui-autocomplete-dropdown)) {
    background: var(--sf-button-bg, var(--sf-action-bg)) !important;
    color: var(--sf-button-ink, #ffffff) !important;
    border-color: var(--sf-button-bg, var(--sf-action-bg)) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.10);
}
html.sf-pilot-modern body .ui-button:where(:not(.ui-selectbooleanbutton, .ui-selectonebutton .ui-button, .ui-selectmanybutton .ui-button, .ui-autocomplete-dropdown)) :is(.ui-icon, .ui-button-text) { color: inherit !important; }
html.sf-pilot-modern body .ui-button:where(:not(.ui-selectbooleanbutton, .ui-selectonebutton .ui-button, .ui-selectmanybutton .ui-button, .ui-autocomplete-dropdown)):not(.ui-state-disabled, :disabled, .ui-state-disabled *):is(:hover, .ui-state-hover) {
    background: var(--sf-button-hover, var(--sf-action-hover)) !important;
}
html.sf-pilot-modern body .ui-button:where(:not(.ui-selectbooleanbutton, .ui-selectonebutton .ui-button, .ui-selectmanybutton .ui-button, .ui-autocomplete-dropdown)):not(.ui-state-disabled, :disabled, .ui-state-disabled *):is(:active, .ui-state-active) {
    background: var(--sf-button-active, var(--sf-action-active)) !important;
}
html.sf-pilot-modern body .ui-button:where(:not(.ui-selectbooleanbutton, .ui-selectonebutton .ui-button, .ui-selectmanybutton .ui-button, .ui-autocomplete-dropdown)):not(.ui-state-disabled, :disabled, .ui-state-disabled *):is(:focus-visible, .ui-state-focus) {
    outline: 2px solid var(--sf-accent) !important; outline-offset: 2px;
}
/* A opacidade do estado desabilitado já é aplicada pelo tema legado ao botão
   ou ao menuitem pai. Não duplicar a opacidade nem transformar foco em ativação. */

/* Seleção mantém estados distintos, com as superfícies suaves do tema. */
html.sf-pilot-modern body :is(.ui-selectbooleanbutton, .ui-selectonebutton > .ui-button, .ui-selectmanybutton > .ui-button) {
    background:var(--sf-soft) !important; color:var(--sf-text) !important;
    border-color:var(--sf-border) !important; box-shadow:none;
}
html.sf-pilot-modern body :is(.ui-selectbooleanbutton, .ui-selectonebutton > .ui-button, .ui-selectmanybutton > .ui-button).ui-state-active {
    background:var(--sf-active-bg) !important; color:var(--sf-success) !important;
    border-color:var(--sf-success) !important;
}
html.sf-pilot-modern body :is(.ui-selectbooleanbutton, .ui-selectonebutton > .ui-button, .ui-selectmanybutton > .ui-button) :is(.ui-icon, .ui-button-text) { color:inherit !important; }
html.sf-pilot-modern body :is(.ui-selectbooleanbutton, .ui-selectonebutton > .ui-button, .ui-selectmanybutton > .ui-button):not(.ui-state-disabled, :disabled):is(:hover, .ui-state-hover) { box-shadow:inset 0 0 0 1px var(--sf-muted); }
html.sf-pilot-modern body :is(.ui-selectbooleanbutton, .ui-selectonebutton > .ui-button, .ui-selectmanybutton > .ui-button):not(.ui-state-disabled, :disabled):is(:focus-visible, .ui-state-focus) { outline:2px solid var(--sf-accent) !important; outline-offset:2px; }

/* Itens de ação em menus usam a mesma paleta dos botões, inclusive em overlays. */
html.sf-pilot-modern body .ui-menu .ui-menuitem-link:is(.sf-action-menuitem, .green-btn, .red-btn, .orange-btn, .amber-btn, .yellow-btn, .cyan-btn, .teal-btn, .purple-btn, .pink-btn, .deep-orange-btn, .brown-btn, .blue-grey-btn) {
    background: var(--sf-button-bg) !important;
    color: var(--sf-button-ink) !important;
    border-radius: 6px;
}
html.sf-pilot-modern body .ui-menu .ui-menuitem-link:is(.sf-action-menuitem, .green-btn, .red-btn, .orange-btn, .amber-btn, .yellow-btn, .cyan-btn, .teal-btn, .purple-btn, .pink-btn, .deep-orange-btn, .brown-btn, .blue-grey-btn) :is(.ui-menuitem-text, .ui-menuitem-icon) {
    color: inherit !important;
}
html.sf-pilot-modern body .ui-menu .ui-menuitem-link:is(.sf-action-menuitem, .green-btn, .red-btn, .orange-btn, .amber-btn, .yellow-btn, .cyan-btn, .teal-btn, .purple-btn, .pink-btn, .deep-orange-btn, .brown-btn, .blue-grey-btn):not(.ui-state-disabled, .ui-state-disabled *):is(:hover, .ui-state-hover) {
    background: var(--sf-button-hover) !important;
}
html.sf-pilot-modern body .ui-menu .ui-menuitem-link:is(.sf-action-menuitem, .green-btn, .red-btn, .orange-btn, .amber-btn, .yellow-btn, .cyan-btn, .teal-btn, .purple-btn, .pink-btn, .deep-orange-btn, .brown-btn, .blue-grey-btn):not(.ui-state-disabled, .ui-state-disabled *):active {
    background: var(--sf-button-active) !important;
}
html.sf-pilot-modern body .ui-menu .ui-menuitem-link:is(.sf-action-menuitem, .green-btn, .red-btn, .orange-btn, .amber-btn, .yellow-btn, .cyan-btn, .teal-btn, .purple-btn, .pink-btn, .deep-orange-btn, .brown-btn, .blue-grey-btn):not(.ui-state-disabled, .ui-state-disabled *):focus-visible {
    outline: 2px solid var(--sf-accent) !important;
    outline-offset: -2px;
}
