.function-admin h2 {font-size:1.15rem;margin:24px 0 12px}
.function-admin fieldset {border:0;padding:0;min-width:0}
.function-admin details {border:1px solid #d9e1e7;border-radius:8px;padding:10px;margin:10px 0}
.function-admin summary {cursor:pointer;font-weight:600}
.function-options {display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;padding-top:10px}
.function-options label {display:flex;align-items:flex-start;gap:8px;margin:0;padding:8px;background:#f5f8fa;border-radius:5px}
.function-options input[type=checkbox] {width:auto;flex:none;margin:4px 0}
.function-options small {display:block;color:#637180;font-size:11px}
.function-assignment {display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px;padding:12px 0;border-bottom:1px solid #d9e1e7}
.function-assignment input[type=checkbox] {width:auto}
.function-impact:empty {display:none}
.function-impact {background:#f4f8fa;padding:12px;border-radius:8px;margin:12px 0}
.function-admin [hidden] {display:none!important}
[data-function-hidden] {display:none!important}
@media(max-width:640px){.function-assignment{grid-template-columns:1fr}.function-options{grid-template-columns:1fr}.function-admin button{min-height:44px}.function-admin .tablebox{overflow:auto}}

.function-tree {max-height:55vh;overflow:auto;overscroll-behavior:contain;padding:2px}

/* New role form only: inline explanations never alter checkbox selection. */
#functionCreateForm .function-tree>details>summary{min-height:28px;align-content:center}
#functionCreateForm .function-tree>details>summary>.fp-help-toggle{vertical-align:middle;margin-left:4px}
#functionCreateForm .fp-choice{min-width:0;background:#f5f8fa;border-radius:5px;padding:8px}
#functionCreateForm .fp-choice-heading{display:flex;align-items:flex-start;gap:4px}
#functionCreateForm .fp-choice-heading label{flex:1;flex-direction:row;min-width:0;padding:0;background:none;line-height:1.5;font-size:13px;overflow-wrap:anywhere}
#functionCreateForm .fp-choice-heading label span{min-width:0}
#functionCreateForm .fp-help-toggle{display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:28px;min-height:28px;width:28px;height:28px;padding:0;border:0;background:transparent;box-shadow:none;color:#496985;font-size:12px;font-weight:500;line-height:1}
#functionCreateForm .fp-help-toggle span{display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;border:1px solid currentColor;border-radius:50%;font-family:Georgia,serif}
#functionCreateForm .fp-help-toggle:hover{color:#1559b8;background:transparent;box-shadow:none}
#functionCreateForm .fp-help-toggle:focus-visible{outline:2px solid #bc5700;outline-offset:1px}
#functionCreateForm .fp-help-body{padding:10px;margin-top:7px;background:#fff;border-left:2px solid #8aa5b9;font-size:12px;line-height:1.7;overflow-wrap:anywhere;white-space:normal;color:#43566a}
#functionCreateForm .fp-help-body p{margin:4px 0 0}
@media(max-width:640px){#functionCreateForm .fp-help-toggle{width:44px;height:44px;min-width:44px;min-height:44px}#functionCreateForm .function-tree>details>summary{min-height:44px}}
