/*
 * FIDDET Platform Interaction Controls 2.4 - Patch 20260731-02
 *
 * Central interaction-state and semantic-action contract.
 * FIDDET Balanced action colors use user-approved light-to-medium solid
 * treatments. Dark action ink preserves readable labels and icons on the
 * lighter blue, green, orange, and red families; neutral gray retains white.
 */

:root {
    /* Brand/accent blue remains reserved for focus, links, selected states, and discovery. */
    --fiddet-control-rest-bg: rgb(233, 243, 255);
    --fiddet-control-rest-border: rgb(199, 225, 255);
    --fiddet-control-rest-color: rgb(15, 99, 194);
    --fiddet-control-outline: #1B84FF;
    --fiddet-control-active-bg: #1B84FF;
    --fiddet-control-active-rgb: 27, 132, 255;
    --fiddet-control-active-color: #FFFFFF;
    --fiddet-table-control-border: #9CC7F5;
    --fiddet-table-action-icon: #0B5CAD;

    /* FIDDET Balanced action palette. */
    --fiddet-action-blue: #69A6DE;
    --fiddet-action-blue-hover: #589CDA;
    --fiddet-action-blue-active: #4892D7;
    --fiddet-action-blue-rgb: 105, 166, 222;

    --fiddet-action-green: #33C48A;
    --fiddet-action-green-hover: #2FB47F;
    --fiddet-action-green-active: #2BA473;
    --fiddet-action-green-rgb: 51, 196, 138;

    --fiddet-action-orange: #FFC996;
    --fiddet-action-orange-hover: #FFBF82;
    --fiddet-action-orange-active: #FFB46D;
    --fiddet-action-orange-rgb: 255, 201, 150;

    --fiddet-action-red: #F57C83;
    --fiddet-action-red-hover: #F46971;
    --fiddet-action-red-active: #F2565F;
    --fiddet-action-red-rgb: 245, 124, 131;

    --fiddet-action-gray: #6B7280;
    --fiddet-action-gray-hover: #5B6370;
    --fiddet-action-gray-active: #4B535F;
    --fiddet-action-gray-rgb: 107, 114, 128;

    --fiddet-action-ink: #17233C;
    --fiddet-action-text: var(--fiddet-action-ink);
    --fiddet-action-text-inverse: #FFFFFF;
    --fiddet-action-focus: #1B84FF;

    /* Legacy medium-action class now resolves to the Balanced blue family. */
    --fiddet-control-medium-bg: var(--fiddet-action-blue);
    --fiddet-control-medium-border: var(--fiddet-action-blue);
    --fiddet-control-medium-rgb: var(--fiddet-action-blue-rgb);
    --fiddet-control-medium-color: var(--fiddet-action-text);
    --fiddet-control-medium-hover-bg: var(--fiddet-action-blue-hover);
    --fiddet-control-medium-hover-border: var(--fiddet-action-blue-hover);
    --fiddet-control-medium-hover-rgb: 88, 156, 218;
    --fiddet-control-medium-hover-color: var(--fiddet-action-text);

    /* Soft semantic colors remain for notes, badges, selection, and notifications. */
    --fiddet-danger-rest-bg: rgb(255, 241, 244);
    --fiddet-danger-rest-border: #FFD0DA;
    --fiddet-danger-rest-color: rgb(201, 31, 65);
    --fiddet-danger-active-bg: var(--fiddet-action-red);
    --fiddet-danger-active-color: var(--fiddet-action-ink);

    --fiddet-success-rest-bg: #ECFDF3;
    --fiddet-success-rest-color: #027A48;
    --fiddet-success-rest-border: #B7EACB;
    --fiddet-success-active-bg: var(--fiddet-action-green);
    --fiddet-success-active-color: var(--fiddet-action-ink);

    --fiddet-warning-rest-bg: #FFF8E1;
    --fiddet-warning-rest-color: #B54708;
    --fiddet-warning-rest-border: #FCE2A3;
    --fiddet-warning-active-bg: var(--fiddet-action-orange);
    --fiddet-warning-active-color: var(--fiddet-action-ink);

    --fiddet-control-disabled-bg: #E4E7EC;
    --fiddet-control-disabled-border: #D0D5DD;
    --fiddet-control-disabled-color: #98A2B3;

    --fiddet-panel-option-hover-bg: #F6FAFF;
    --fiddet-panel-option-hover-border: #D7E9FF;
}

/*
 * Governed semantic button map.
 *
 * Positive / Balanced green:
 *   save, apply, create, new, invite, continue, activate, verify, enable.
 * Context / Balanced blue:
 *   sign in, filter, review, manage, view, modal close, copy, print.
 * Warning / Balanced orange:
 *   reset, clear, regenerate, restore, retry.
 * Destructive / Balanced red:
 *   suspend, retire, revoke, delete, deactivate, sign out another session.
 * Neutral / Balanced gray:
 *   cancel, back, dismiss, and secondary exit actions.
 *
 * Soft colors are not the default action-button treatment. They remain
 * available for status badges, governance notes, selected panels, and toasts.
 */

/* Unclassified ordinary buttons default to the Balanced blue family. */
html body .btn:not(.btn-link):not(.btn-close):not(.fiddet-button-medium):not(.shell-user-trigger):not(.app-sidebar-toggle):not(.shell-notification-trigger):not(.shell-language-trigger):not(.shell-environment-trigger):not(.capability-domain-toggle):not(#kt_app_sidebar_mobile_toggle):not(.fiddet-table-action-button):not([data-fiddet-action]):not([data-fiddet-native]),
.button:not(.button-border):not(.fiddet-button-medium):not([data-fiddet-action]):not([data-fiddet-native]) {
    --fiddet-button-bg: var(--fiddet-action-blue);
    --fiddet-button-hover-bg: var(--fiddet-action-blue-hover);
    --fiddet-button-active-bg: var(--fiddet-action-blue-active);
    --fiddet-button-text: var(--fiddet-action-text);
}

html body :is(.btn.btn-primary,.btn.btn-light-primary,.btn.btn-outline-primary,.btn[data-fiddet-action="context"]):not(.btn-link):not(.btn-close),
.button[data-fiddet-action="context"] {
    --fiddet-button-bg: var(--fiddet-action-blue);
    --fiddet-button-hover-bg: var(--fiddet-action-blue-hover);
    --fiddet-button-active-bg: var(--fiddet-action-blue-active);
    --fiddet-button-text: var(--fiddet-action-text);
}

/* Filter controls retain governed blue-family action ink in every state. */
html body [data-fiddet-button-role="filter"],
html body [data-fiddet-button-role="filter"] .shell-filter-button-label,
html body [data-fiddet-button-role="filter"] > i,
html body [data-fiddet-button-role="filter"] > svg,
html body [data-fiddet-button-role="filter"].filter-active,
html body [data-fiddet-button-role="filter"].filter-active .shell-filter-button-label,
html body [data-fiddet-button-role="filter"].filter-active > i,
html body [data-fiddet-button-role="filter"].filter-active > svg {
    color: var(--fiddet-action-ink) !important;
}

html body :is(.btn.btn-success,.btn.btn-light-success,.btn.btn-outline-success,.btn[data-fiddet-action="positive"]):not(.btn-link):not(.btn-close),
.button[data-fiddet-action="positive"] {
    --fiddet-button-bg: var(--fiddet-action-green);
    --fiddet-button-hover-bg: var(--fiddet-action-green-hover);
    --fiddet-button-active-bg: var(--fiddet-action-green-active);
    --fiddet-button-text: var(--fiddet-action-text);
}

html body :is(.btn.btn-warning,.btn.btn-light-warning,.btn.btn-outline-warning,.btn[data-fiddet-action="warning"]):not(.btn-link):not(.btn-close),
.button[data-fiddet-action="warning"] {
    --fiddet-button-bg: var(--fiddet-action-orange);
    --fiddet-button-hover-bg: var(--fiddet-action-orange-hover);
    --fiddet-button-active-bg: var(--fiddet-action-orange-active);
    --fiddet-button-text: var(--fiddet-action-text);
}

html body :is(.btn.btn-danger,.btn.btn-light-danger,.btn.btn-outline-danger,.btn[data-fiddet-action="destructive"]):not(.btn-link):not(.btn-close),
.button.button-danger,
.button[data-fiddet-action="destructive"] {
    --fiddet-button-bg: var(--fiddet-action-red);
    --fiddet-button-hover-bg: var(--fiddet-action-red-hover);
    --fiddet-button-active-bg: var(--fiddet-action-red-active);
    --fiddet-button-text: var(--fiddet-action-text);
}

html body :is(.btn.btn-secondary,.btn.btn-light-secondary,.btn.btn-outline-secondary,.btn[data-fiddet-action="neutral"]):not(.btn-link):not(.btn-close),
.button[data-fiddet-action="neutral"] {
    --fiddet-button-bg: var(--fiddet-action-gray);
    --fiddet-button-hover-bg: var(--fiddet-action-gray-hover);
    --fiddet-button-active-bg: var(--fiddet-action-gray-active);
    --fiddet-button-text: var(--fiddet-action-text-inverse);
}

/* Legacy medium class participates in the same Balanced blue contract. */
html body .btn.fiddet-button-medium,
.button.fiddet-button-medium,
.fiddet-button-medium {
    --fiddet-button-bg: var(--fiddet-action-blue);
    --fiddet-button-hover-bg: var(--fiddet-action-blue-hover);
    --fiddet-button-active-bg: var(--fiddet-action-blue-active);
    --fiddet-button-text: var(--fiddet-action-text);
}

/* Shared filled-action geometry and interaction states. */
html body .btn:not(.btn-link):not(.btn-close):not(.shell-user-trigger):not(.app-sidebar-toggle):not(.shell-notification-trigger):not(.shell-language-trigger):not(.shell-environment-trigger):not(.capability-domain-toggle):not(#kt_app_sidebar_mobile_toggle):not(.fiddet-table-action-button):not([data-fiddet-native]),
.button[data-fiddet-action],
.button.fiddet-button-medium,
.button:not(.button-border):not([data-fiddet-native]) {
    --bs-btn-color: var(--fiddet-button-text);
    --bs-btn-bg: var(--fiddet-button-bg);
    --bs-btn-border-color: var(--fiddet-button-bg);
    --bs-btn-hover-color: var(--fiddet-button-text);
    --bs-btn-hover-bg: var(--fiddet-button-hover-bg);
    --bs-btn-hover-border-color: var(--fiddet-button-hover-bg);
    --bs-btn-active-color: var(--fiddet-button-text);
    --bs-btn-active-bg: var(--fiddet-button-active-bg);
    --bs-btn-active-border-color: var(--fiddet-button-active-bg);
    --bs-btn-disabled-color: var(--fiddet-control-disabled-color);
    --bs-btn-disabled-bg: var(--fiddet-control-disabled-bg);
    --bs-btn-disabled-border-color: var(--fiddet-control-disabled-border);
    color: var(--fiddet-button-text) !important;
    background-color: var(--fiddet-button-bg) !important;
    background-image: none !important;
    border: 1px solid var(--fiddet-button-bg) !important;
    box-shadow: none !important;
    outline: 0;
}

html body .btn:not(.btn-link):not(.btn-close):not(.shell-user-trigger):not(.app-sidebar-toggle):not(.shell-notification-trigger):not(.shell-language-trigger):not(.shell-environment-trigger):not(.capability-domain-toggle):not(#kt_app_sidebar_mobile_toggle):not(.fiddet-table-action-button):not([data-fiddet-native]) :is(i,.ki,.svg-icon,.svg-inline--fa),
.button[data-fiddet-action] :is(i,.ki,.svg-icon,.svg-inline--fa),
.button.fiddet-button-medium :is(i,.ki,.svg-icon,.svg-inline--fa) {
    color: currentColor !important;
    opacity: 1 !important;
}

html body .btn:not(.btn-link):not(.btn-close):not(.shell-user-trigger):not(.app-sidebar-toggle):not(.shell-notification-trigger):not(.shell-language-trigger):not(.shell-environment-trigger):not(.capability-domain-toggle):not(#kt_app_sidebar_mobile_toggle):not(.fiddet-table-action-button):not([data-fiddet-native]):is(:focus,.active,.show):not(:hover):not(:active),
html body .show > .btn:not(.btn-link):not(.btn-close):not(.shell-user-trigger):not(.app-sidebar-toggle):not(.shell-notification-trigger):not(.shell-language-trigger):not(.shell-environment-trigger):not(.capability-domain-toggle):not(#kt_app_sidebar_mobile_toggle):not(.fiddet-table-action-button):not([data-fiddet-native]):not(:hover):not(:active),
.button[data-fiddet-action]:is(:focus,.active,.show):not(:hover):not(:active),
.button.fiddet-button-medium:is(:focus,.active,.show):not(:hover):not(:active) {
    color: var(--fiddet-button-text) !important;
    background-color: var(--fiddet-button-bg) !important;
    border-color: var(--fiddet-button-bg) !important;
    box-shadow: none !important;
}

html body .btn:not(.btn-link):not(.btn-close):not(.shell-user-trigger):not(.app-sidebar-toggle):not(.shell-notification-trigger):not(.shell-language-trigger):not(.shell-environment-trigger):not(.capability-domain-toggle):not(#kt_app_sidebar_mobile_toggle):not(.fiddet-table-action-button):not([data-fiddet-native]):hover:not(:disabled),
.button[data-fiddet-action]:hover:not(:disabled),
.button.fiddet-button-medium:hover:not(:disabled) {
    color: var(--fiddet-button-text) !important;
    background-color: var(--fiddet-button-hover-bg) !important;
    border-color: var(--fiddet-button-hover-bg) !important;
    box-shadow: none !important;
}

html body .btn:not(.btn-link):not(.btn-close):not(.shell-user-trigger):not(.app-sidebar-toggle):not(.shell-notification-trigger):not(.shell-language-trigger):not(.shell-environment-trigger):not(.capability-domain-toggle):not(#kt_app_sidebar_mobile_toggle):not(.fiddet-table-action-button):not([data-fiddet-native]):active:not(:disabled),
.button[data-fiddet-action]:active:not(:disabled),
.button.fiddet-button-medium:active:not(:disabled) {
    color: var(--fiddet-button-text) !important;
    background-color: var(--fiddet-button-active-bg) !important;
    border-color: var(--fiddet-button-active-bg) !important;
    box-shadow: none !important;
}

html body .btn:not(.btn-link):not(.btn-close):not(.shell-user-trigger):not(.app-sidebar-toggle):not(.shell-notification-trigger):not(.shell-language-trigger):not(.shell-environment-trigger):not(.capability-domain-toggle):not(#kt_app_sidebar_mobile_toggle):not(.fiddet-table-action-button):not([data-fiddet-native]):focus-visible,
.button[data-fiddet-action]:focus-visible,
.button.fiddet-button-medium:focus-visible {
    outline: 2px solid var(--fiddet-action-focus) !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(27,132,255,0.18) !important;
}

html body .btn:not(.btn-link):not(.btn-close):not(.shell-user-trigger):not(.app-sidebar-toggle):not(.shell-notification-trigger):not(.shell-language-trigger):not(.shell-environment-trigger):not(.capability-domain-toggle):not(#kt_app_sidebar_mobile_toggle):not(.fiddet-table-action-button):not([data-fiddet-native]):disabled,
html body .btn:not(.btn-link):not(.btn-close):not(.shell-user-trigger):not(.app-sidebar-toggle):not(.shell-notification-trigger):not(.shell-language-trigger):not(.shell-environment-trigger):not(.capability-domain-toggle):not(#kt_app_sidebar_mobile_toggle):not(.fiddet-table-action-button):not([data-fiddet-native]).disabled,
html body fieldset:disabled .btn:not(.btn-link):not(.btn-close):not(.shell-user-trigger):not(.app-sidebar-toggle):not(.shell-notification-trigger):not(.shell-language-trigger):not(.shell-environment-trigger):not(.capability-domain-toggle):not(#kt_app_sidebar_mobile_toggle):not(.fiddet-table-action-button):not([data-fiddet-native]),
.button[data-fiddet-action]:disabled,
.button[data-fiddet-action].disabled,
.button.fiddet-button-medium:disabled,
.button.fiddet-button-medium.disabled {
    color: var(--fiddet-control-disabled-color) !important;
    background-color: var(--fiddet-control-disabled-bg) !important;
    border-color: var(--fiddet-control-disabled-border) !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

/*
 * Applied-filter count badges are independent semantic indicators. Their text
 * remains white in every parent button state, including retained focus, open,
 * hover, and physical press.
 */
html body .btn .fiddet-filter-count-badge,
html body .btn:hover .fiddet-filter-count-badge,
html body .btn:active .fiddet-filter-count-badge,
html body .btn:focus .fiddet-filter-count-badge,
html body .btn.active .fiddet-filter-count-badge,
html body .btn.show .fiddet-filter-count-badge,
html body .show > .btn .fiddet-filter-count-badge {
    --bs-badge-color: #FFFFFF;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
}

/*
 * Compact DataTable action-menu standard.
 * These row controls are intentionally white at rest so they remain elevated
 * above both white and blue-striped table rows. Opening a dropdown or retaining
 * keyboard focus does not leave the control filled after pointer release.
 */
html body .table .btn.fiddet-table-action-button,
html body .table .btn.fiddet-table-action-button:focus:not(:hover):not(:active),
html body .table .btn.fiddet-table-action-button.show:not(:hover):not(:active),
html body .table .show > .btn.fiddet-table-action-button:not(:hover):not(:active) {
    color: var(--fiddet-table-action-icon) !important;
    background-color: #FFFFFF !important;
    background-image: none !important;
    border: 1px solid var(--fiddet-table-control-border) !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

/*
 * Table actions use the bright interaction accent rather than the solid
 * semantic action palette. The stronger table selector prevents Bootstrap or
 * Metronic variant classes from substituting a darker hover colour.
 */
html body .table .btn.fiddet-table-action-button:hover,
html body .table .btn.fiddet-table-action-button:active {
    color: #FFFFFF !important;
    background-color: rgb(27,132,255) !important;
    background-image: none !important;
    border-color: rgb(27,132,255) !important;
    box-shadow: none !important;
}

html body .table .btn.fiddet-table-action-button :is(i,.ki,.svg-icon,.svg-inline--fa) {
    color: currentColor !important;
    opacity: 1 !important;
}

html body .table .btn.fiddet-table-action-button .ki-dots-vertical {
    font-size: 1.2rem !important;
    line-height: 1 !important;
}

/* Keep square icon controls centered while inheriting the shared palette. */
.btn.btn-icon:not(.btn-close) {
    display: inline-grid !important;
    place-items: center;
    padding: 0 !important;
    line-height: 1 !important;
}

.btn.btn-icon:not(.btn-close) > i,
.btn.btn-icon:not(.btn-close) > .svg-inline--fa {
    display: block !important;
    grid-area: 1 / 1;
    width: 1em !important;
    height: 1em !important;
    margin: 0 !important;
    line-height: 1 !important;
    transform: none !important;
}

/*
 * Platform select-field standard.
 * - Single and multiple select surfaces remain neutral white.
 * - Hover, focus, and open states use a thin medium-blue outline without fill.
 * - Dropdown option hover/selection uses the light-blue discovery treatment.
 * - Selected values in multi-select fields use medium-blue pills with white text.
 */
.form-select:not(.form-select-transparent) {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%230F63C2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    color: var(--bs-gray-700) !important;
    background-color: #FFFFFF !important;
    border-color: var(--bs-border-color) !important;
    box-shadow: none !important;
}

.form-select:not(.form-select-transparent):hover:not(:disabled),
.form-select:not(.form-select-transparent):focus:not(:disabled),
.form-select:not(.form-select-transparent):active:not(:disabled) {
    color: var(--bs-gray-700) !important;
    background-color: #FFFFFF !important;
    border-color: var(--fiddet-control-outline) !important;
    box-shadow: none !important;
}

.select2-container--bootstrap5 .select2-selection {
    color: var(--bs-gray-700) !important;
    background-color: #FFFFFF !important;
    border-color: var(--bs-border-color) !important;
    box-shadow: none !important;
}

.select2-container--bootstrap5 .select2-selection .select2-selection__rendered,
.select2-container--bootstrap5 .select2-selection .select2-selection__placeholder,
.select2-container--bootstrap5 .select2-selection .select2-search__field {
    color: var(--bs-gray-700) !important;
    -webkit-text-fill-color: var(--bs-gray-700) !important;
    opacity: 1 !important;
}

.select2-container--bootstrap5:not(.select2-container--disabled) .select2-selection:hover,
.select2-container--bootstrap5.select2-container--focus:not(.select2-container--disabled) .select2-selection,
.select2-container--bootstrap5.select2-container--open:not(.select2-container--disabled) .select2-selection {
    color: var(--bs-gray-700) !important;
    background-color: #FFFFFF !important;
    border-color: var(--fiddet-control-outline) !important;
    box-shadow: none !important;
}

.select2-container--bootstrap5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {
    color: var(--fiddet-control-medium-color) !important;
    -webkit-text-fill-color: var(--fiddet-control-medium-color) !important;
    background-color: var(--fiddet-control-medium-bg) !important;
    border: 1px solid var(--fiddet-control-medium-border) !important;
}

.select2-container--bootstrap5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__display {
    color: var(--fiddet-control-medium-color) !important;
    -webkit-text-fill-color: var(--fiddet-control-medium-color) !important;
}

.select2-container--bootstrap5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove {
    color: #FFFFFF !important;
    background-color: #FFFFFF !important;
    opacity: 0.88;
}

.select2-container--bootstrap5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove:hover,
.select2-container--bootstrap5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove:focus {
    color: #FFFFFF !important;
    background-color: #FFFFFF !important;
    opacity: 1;
}

.select2-container--bootstrap5 .select2-dropdown .select2-results__option.select2-results__option--selected,
.select2-container--bootstrap5 .select2-dropdown .select2-results__option.select2-results__option--highlighted {
    color: var(--fiddet-control-rest-color) !important;
    background-color: var(--fiddet-control-rest-bg) !important;
}

/*
 * Role-selection chips use the platform interaction blue rather than the
 * darker medium-action tier. The semantic field wrapper raises specificity
 * above the generic Select2 token without affecting other multiselects.
 */
.um-role-select-field .select2-container--bootstrap5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    background-color: var(--fiddet-control-active-bg) !important;
    border-color: var(--fiddet-control-active-bg) !important;
}

.um-role-select-field .select2-container--bootstrap5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__display,
.um-role-select-field .select2-container--bootstrap5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove {
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
}

.um-role-select-field .select2-container--bootstrap5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove,
.um-role-select-field .select2-container--bootstrap5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove:hover,
.um-role-select-field .select2-container--bootstrap5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice .select2-selection__choice__remove:focus {
    background-color: #FFFFFF !important;
    opacity: 1 !important;
}

/*
 * Aside navigation contract.
 * Hover/open discovery is light blue. Only the current/active route is dark.
 */
.app-sidebar .menu .menu-item .menu-link:hover,
.app-sidebar .menu .menu-item .menu-link.show:not(.active):not(.here) {
    color: var(--fiddet-control-rest-color) !important;
    background-color: var(--fiddet-control-rest-bg) !important;
}

.app-sidebar .menu .menu-item .menu-link:hover .menu-title,
.app-sidebar .menu .menu-item .menu-link:hover .menu-icon i,
.app-sidebar .menu .menu-item .menu-link:hover .menu-icon svg,
.app-sidebar .menu .menu-item .menu-link.show:not(.active):not(.here) .menu-title,
.app-sidebar .menu .menu-item .menu-link.show:not(.active):not(.here) .menu-icon i,
.app-sidebar .menu .menu-item .menu-link.show:not(.active):not(.here) .menu-icon svg {
    color: var(--fiddet-control-rest-color) !important;
}

.app-sidebar .menu .menu-item .menu-link.active,
.app-sidebar .menu .menu-item .menu-link.here {
    color: var(--fiddet-control-active-color) !important;
    background-color: var(--fiddet-control-active-bg) !important;
}

.app-sidebar .menu .menu-item .menu-link.active .menu-title,
.app-sidebar .menu .menu-item .menu-link.active .menu-icon i,
.app-sidebar .menu .menu-item .menu-link.active .menu-icon svg,
.app-sidebar .menu .menu-item .menu-link.here .menu-title,
.app-sidebar .menu .menu-item .menu-link.here .menu-icon i,
.app-sidebar .menu .menu-item .menu-link.here .menu-icon svg {
    color: var(--fiddet-control-active-color) !important;
}

/* Capability toggles return to their light resting state after release. */
.capability-domain-toggle:focus:not(:hover):not(:active) {
    color: var(--fiddet-control-rest-color) !important;
    background-color: var(--fiddet-control-rest-bg) !important;
    border-color: var(--fiddet-control-rest-border) !important;
    box-shadow: none !important;
}

/*
 * Sidebar collapse/expand control.
 * Metronic keeps an .active class to represent the collapsed layout; that
 * state must never be interpreted as a pressed colour. The control is white at
 * rest, blue only while hovered or physically pressed, and white again after
 * release even when browser focus or the layout-state class remains.
 */
.app-sidebar-toggle,
.app-sidebar-toggle:focus:not(:hover):not(:active),
.app-sidebar-toggle.active:not(:hover):not(:active),
.app-sidebar-toggle.show:not(:hover):not(:active) {
    color: var(--fiddet-control-rest-color) !important;
    background-color: #FFFFFF !important;
    border: 1px solid var(--portal-border) !important;
    box-shadow: none !important;
}

.app-sidebar-toggle:hover,
.app-sidebar-toggle:active {
    color: #FFFFFF !important;
    background-color: var(--fiddet-control-active-bg) !important;
    border: 1px solid var(--fiddet-control-active-bg) !important;
    box-shadow: none !important;
}

.app-sidebar-toggle:focus-visible:not(:hover):not(:active) {
    outline: 1px solid var(--fiddet-control-outline);
    outline-offset: 1px;
}

/*
 * Environment trigger remains a specialized shell control, separate from
 * the solid semantic action palette. Tenant initials belong only inside its menu.
 */
.shell-environment-trigger :is(i, .svg-icon, .svg-inline--fa) {
    color: currentColor !important;
}

/* The user photograph trigger remains an intentionally transparent control. */
.shell-user-trigger,
.shell-user-trigger:hover,
.shell-user-trigger:active,
.shell-user-trigger:focus {
    color: inherit !important;
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

/* Dropdown interaction: light discovery, dark only for committed active state. */
.dropdown-item:hover,
.dropdown-item:focus,
button.shell-environment-option:hover,
button.shell-environment-option:focus {
    color: var(--fiddet-control-rest-color) !important;
    background-color: var(--fiddet-control-rest-bg) !important;
    box-shadow: none !important;
}

.dropdown-item.active,
.dropdown-item:active {
    color: var(--fiddet-control-active-color) !important;
    background-color: var(--fiddet-control-active-bg) !important;
}

/* Destructive dropdown rows remain semantically red. */
.dropdown-item.text-danger {
    color: var(--fiddet-danger-rest-color) !important;
}

.dropdown-item.text-danger:hover,
.dropdown-item.text-danger:focus {
    color: var(--fiddet-danger-rest-color) !important;
    background-color: var(--fiddet-danger-rest-bg) !important;
}

.dropdown-item.text-danger:active,
.dropdown-item.text-danger.active {
    color: var(--fiddet-danger-active-color) !important;
    background-color: var(--fiddet-danger-active-bg) !important;
}

/* Pagination remains quiet except for hover and the current page. */
.pagination .page-link:hover,
.pagination .page-link:focus {
    color: var(--fiddet-control-rest-color) !important;
    background-color: var(--fiddet-control-rest-bg) !important;
    border-color: var(--fiddet-control-rest-border) !important;
    box-shadow: none !important;
}

.pagination .page-item.active .page-link,
.pagination .page-link.active {
    color: var(--fiddet-control-active-color) !important;
    background-color: var(--fiddet-control-active-bg) !important;
    border-color: var(--fiddet-control-active-bg) !important;
}

/* Canvas authentication border-buttons retain the shared border on interaction. */
.button.button-border:not(.button-fill):hover,
.button.button-border:not(.button-fill):active {
    border-color: var(--fiddet-control-active-bg) !important;
}
