/* Shared dark-theme treatment for controls used across the main application. */
html[data-theme="dark"] {
    --control-glass-bg: rgba(148, 163, 184, 0.09);
    --control-glass-hover: rgba(148, 163, 184, 0.15);
    --control-glass-pressed: rgba(148, 163, 184, 0.19);
    --control-glass-border: rgba(148, 163, 184, 0.23);
    --control-glass-border-hover: rgba(180, 195, 214, 0.34);
    --control-glass-text: #d5dfeb;
    --control-glass-text-hover: #f4f7fb;
    --control-glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 2px 7px rgba(0, 0, 0, 0.16);

    --control-primary-bg: rgba(56, 189, 248, 0.17);
    --control-primary-bg-hover: rgba(56, 189, 248, 0.23);
    --control-primary-border: rgba(56, 189, 248, 0.34);
    --control-primary-border-hover: rgba(56, 189, 248, 0.46);
    --control-primary-text: #c3eafa;
    --control-primary-text-hover: #e5f7ff;

    --control-accent-bg: rgba(129, 140, 248, 0.15);
    --control-accent-bg-hover: rgba(129, 140, 248, 0.22);
    --control-accent-border: rgba(129, 140, 248, 0.31);
    --control-accent-border-hover: rgba(165, 180, 252, 0.43);
    --control-accent-text: #d0d5ff;
    --control-accent-text-hover: #eef0ff;

    --control-danger-bg: rgba(248, 113, 113, 0.13);
    --control-danger-bg-hover: rgba(248, 113, 113, 0.2);
    --control-danger-border: rgba(248, 113, 113, 0.31);
    --control-danger-border-hover: rgba(248, 113, 113, 0.44);
    --control-danger-text: #f1b7b8;
    --control-danger-text-hover: #ffdada;

    --control-success-bg: rgba(52, 211, 153, 0.13);
    --control-success-bg-hover: rgba(52, 211, 153, 0.2);
    --control-success-border: rgba(52, 211, 153, 0.3);
    --control-success-border-hover: rgba(52, 211, 153, 0.43);
    --control-success-text: #bcebd7;
    --control-success-text-hover: #dcfff0;
}

/*
 * Most controls across system tools, cloud integrations, history, and discovery
 * share this restrained glass surface. Layout and sizing remain page-specific.
 */
html[data-theme="dark"] button:where(:not(.vfp-overlay-backdrop):not(.mobile-dock-btn):not(.nav-category-btn):not(.utility-cover-style-card)),
html[data-theme="dark"] a[role="button"],
html[data-theme="dark"] a[class*="btn"],
html[data-theme="dark"] input[type="button"],
html[data-theme="dark"] input[type="submit"] {
    border-style: solid !important;
    border-width: 1px !important;
    border-color: var(--control-glass-border) !important;
    background-color: var(--control-glass-bg) !important;
    background-image: none !important;
    color: var(--control-glass-text) !important;
    box-shadow: var(--control-glass-shadow) !important;
    backdrop-filter: blur(12px) saturate(135%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(135%) !important;
    text-shadow: none !important;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease !important;
}

html[data-theme="dark"] button:where(:not(.vfp-overlay-backdrop):not(.mobile-dock-btn):not(.nav-category-btn):not(.utility-cover-style-card)):hover:not(:disabled),
html[data-theme="dark"] a[role="button"]:hover,
html[data-theme="dark"] a[class*="btn"]:hover,
html[data-theme="dark"] input[type="button"]:hover:not(:disabled),
html[data-theme="dark"] input[type="submit"]:hover:not(:disabled) {
    border-color: var(--control-glass-border-hover) !important;
    background-color: var(--control-glass-hover) !important;
    color: var(--control-glass-text-hover) !important;
    box-shadow: 0 4px 11px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.075) !important;
}

html[data-theme="dark"] button:where(:not(.vfp-overlay-backdrop):not(.mobile-dock-btn):not(.nav-category-btn):not(.utility-cover-style-card)):active:not(:disabled),
html[data-theme="dark"] a[role="button"]:active,
html[data-theme="dark"] a[class*="btn"]:active,
html[data-theme="dark"] input[type="button"]:active:not(:disabled),
html[data-theme="dark"] input[type="submit"]:active:not(:disabled) {
    background-color: var(--control-glass-pressed) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

html[data-theme="dark"] button:where(:not(.vfp-overlay-backdrop):not(.mobile-dock-btn):not(.nav-category-btn):not(.utility-cover-style-card)):focus-visible,
html[data-theme="dark"] a[role="button"]:focus-visible,
html[data-theme="dark"] a[class*="btn"]:focus-visible,
html[data-theme="dark"] input[type="button"]:focus-visible,
html[data-theme="dark"] input[type="submit"]:focus-visible {
    outline: 2px solid rgba(96, 165, 250, 0.55) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15), var(--control-glass-shadow) !important;
}

html[data-theme="dark"] button:disabled,
html[data-theme="dark"] button[aria-disabled="true"],
html[data-theme="dark"] input[type="button"]:disabled,
html[data-theme="dark"] input[type="submit"]:disabled {
    opacity: 0.48 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    filter: saturate(0.68);
}

/* Primary actions keep a clear blue signal without luminous gradients. */
html[data-theme="dark"] button:is([class*="primary"], [class*="action"], [class*="submit"], [class*="save"], [class*="run"], [class*="generate"], [class*="pick"], [class*="verify"], [class*="send"], [class*="add-btn"], [class*="test-btn"], .login-btn, .directory-selector-mini-btn, [data-variant="primary"], [id$="-save-btn"], [id$="-run-btn"], [id$="-submit-btn"], #organize-run-now-btn, #organize-batch-retag-btn),
html[data-theme="dark"] a[role="button"]:is([class*="primary"], [class*="action"], [class*="submit"], [class*="save"], [class*="run"], [class*="pick"], [class*="add-btn"], [data-variant="primary"]) {
    border-color: var(--control-primary-border) !important;
    background-color: var(--control-primary-bg) !important;
    background-image: none !important;
    color: var(--control-primary-text) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.075), 0 3px 9px rgba(14, 116, 144, 0.12) !important;
}

html[data-theme="dark"] button:is([class*="primary"], [class*="action"], [class*="submit"], [class*="save"], [class*="run"], [class*="generate"], [class*="pick"], [class*="verify"], [class*="send"], [class*="add-btn"], [class*="test-btn"], .login-btn, .directory-selector-mini-btn, [data-variant="primary"], [id$="-save-btn"], [id$="-run-btn"], [id$="-submit-btn"], #organize-run-now-btn, #organize-batch-retag-btn):hover:not(:disabled),
html[data-theme="dark"] a[role="button"]:is([class*="primary"], [class*="action"], [class*="submit"], [class*="save"], [class*="run"], [class*="pick"], [class*="add-btn"], [data-variant="primary"]):hover {
    border-color: var(--control-primary-border-hover) !important;
    background-color: var(--control-primary-bg-hover) !important;
    background-image: none !important;
    color: var(--control-primary-text-hover) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 5px 13px rgba(14, 116, 144, 0.16) !important;
}

html[data-theme="dark"] button:is([class*="primary"], [class*="action"], [class*="submit"], [class*="save"], [class*="run"], [class*="generate"], [class*="pick"], [class*="verify"], [class*="send"], [class*="add-btn"], [class*="test-btn"], .login-btn, .directory-selector-mini-btn, [data-variant="primary"], [id$="-save-btn"], [id$="-run-btn"], [id$="-submit-btn"], #organize-run-now-btn, #organize-batch-retag-btn):active:not(:disabled),
html[data-theme="dark"] a[role="button"]:is([class*="primary"], [class*="action"], [class*="submit"], [class*="save"], [class*="run"], [class*="pick"], [class*="add-btn"], [data-variant="primary"]):active {
    border-color: var(--control-primary-border-hover) !important;
    background-color: var(--control-primary-bg-hover) !important;
    background-image: none !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.22) !important;
}

/* Selected tabs and secondary accent actions use an indigo tint. */
html[data-theme="dark"] button:where(:not(.mobile-dock-btn):not(.utility-cover-style-card)):is(.active, .is-active, .selected, [aria-selected="true"], [aria-pressed="true"], [class*="accent"], [class*="soft"], .transfer-history-recognize-btn),
html[data-theme="dark"] a[role="button"]:is(.active, .is-active, .selected, [aria-selected="true"], [aria-pressed="true"], [class*="accent"], [class*="soft"]) {
    border-color: var(--control-accent-border) !important;
    background-color: var(--control-accent-bg) !important;
    background-image: none !important;
    color: var(--control-accent-text) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 3px 9px rgba(49, 46, 129, 0.12) !important;
}

html[data-theme="dark"] button:where(:not(.mobile-dock-btn):not(.utility-cover-style-card)):is(.active, .is-active, .selected, [aria-selected="true"], [aria-pressed="true"], [class*="accent"], [class*="soft"], .transfer-history-recognize-btn):hover:not(:disabled),
html[data-theme="dark"] a[role="button"]:is(.active, .is-active, .selected, [aria-selected="true"], [aria-pressed="true"], [class*="accent"], [class*="soft"]):hover {
    border-color: var(--control-accent-border-hover) !important;
    background-color: var(--control-accent-bg-hover) !important;
    background-image: none !important;
    color: var(--control-accent-text-hover) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 5px 13px rgba(49, 46, 129, 0.16) !important;
}

html[data-theme="dark"] button:where(:not(.mobile-dock-btn):not(.utility-cover-style-card)):is(.active, .is-active, .selected, [aria-selected="true"], [aria-pressed="true"], [class*="accent"], [class*="soft"], .transfer-history-recognize-btn):active:not(:disabled),
html[data-theme="dark"] a[role="button"]:is(.active, .is-active, .selected, [aria-selected="true"], [aria-pressed="true"], [class*="accent"], [class*="soft"]):active {
    border-color: var(--control-accent-border-hover) !important;
    background-color: var(--control-accent-bg-hover) !important;
    background-image: none !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.22) !important;
}

/* Explicit success and destructive actions retain their meaning at low brightness. */
html[data-theme="dark"] button:is([class*="success"], [data-variant="success"]),
html[data-theme="dark"] a[role="button"]:is([class*="success"], [data-variant="success"]) {
    border-color: var(--control-success-border) !important;
    background-color: var(--control-success-bg) !important;
    background-image: none !important;
    color: var(--control-success-text) !important;
}

html[data-theme="dark"] button:is([class*="success"], [data-variant="success"]):hover:not(:disabled),
html[data-theme="dark"] a[role="button"]:is([class*="success"], [data-variant="success"]):hover {
    border-color: var(--control-success-border-hover) !important;
    background-color: var(--control-success-bg-hover) !important;
    background-image: none !important;
    color: var(--control-success-text-hover) !important;
}

html[data-theme="dark"] button:is([class*="success"], [data-variant="success"]):active:not(:disabled),
html[data-theme="dark"] a[role="button"]:is([class*="success"], [data-variant="success"]):active {
    border-color: var(--control-success-border-hover) !important;
    background-color: var(--control-success-bg-hover) !important;
    background-image: none !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.22) !important;
}

html[data-theme="dark"] button:is([class*="danger"], [class*="delete"], [class*="remove"], [class*="logout"], [data-variant="danger"], [data-action*="delete"], [data-action*="remove"], [data-action*="clear"], [id$="-clear-btn"]):not([class*="close"]),
html[data-theme="dark"] a[role="button"]:is([class*="danger"], [class*="delete"], [class*="remove"], [data-variant="danger"], [data-action*="delete"], [data-action*="remove"], [data-action*="clear"]),
html[data-theme="dark"] a[class*="btn"][class*="danger"] {
    border-color: var(--control-danger-border) !important;
    background-color: var(--control-danger-bg) !important;
    background-image: none !important;
    color: var(--control-danger-text) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 7px rgba(0, 0, 0, 0.14) !important;
}

html[data-theme="dark"] button:is([class*="danger"], [class*="delete"], [class*="remove"], [class*="logout"], [data-variant="danger"], [data-action*="delete"], [data-action*="remove"], [data-action*="clear"], [id$="-clear-btn"]):not([class*="close"]):hover:not(:disabled),
html[data-theme="dark"] a[role="button"]:is([class*="danger"], [class*="delete"], [class*="remove"], [data-variant="danger"], [data-action*="delete"], [data-action*="remove"], [data-action*="clear"]):hover,
html[data-theme="dark"] a[class*="btn"][class*="danger"]:hover {
    border-color: var(--control-danger-border-hover) !important;
    background-color: var(--control-danger-bg-hover) !important;
    background-image: none !important;
    color: var(--control-danger-text-hover) !important;
}

html[data-theme="dark"] button:is([class*="danger"], [class*="delete"], [class*="remove"], [class*="logout"], [data-variant="danger"], [data-action*="delete"], [data-action*="remove"], [data-action*="clear"], [id$="-clear-btn"]):not([class*="close"]):active:not(:disabled),
html[data-theme="dark"] a[role="button"]:is([class*="danger"], [class*="delete"], [class*="remove"], [data-variant="danger"], [data-action*="delete"], [data-action*="remove"], [data-action*="clear"]):active {
    border-color: var(--control-danger-border-hover) !important;
    background-color: var(--control-danger-bg-hover) !important;
    background-image: none !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.22) !important;
}

/* Keep the mobile dock and active section marker consistent with the new palette. */
@media (max-width: 768px) {
    html[data-theme="dark"] .mobile-dock-btn.is-active {
        color: #c3eafa !important;
        background: rgba(56, 189, 248, 0.14) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    }
}

html[data-theme="dark"] .nav-item.active {
    background: rgba(56, 189, 248, 0.14) !important;
    border-color: rgba(56, 189, 248, 0.27) !important;
    color: #c3eafa !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 8px rgba(14, 116, 144, 0.1) !important;
}

html[data-theme="dark"] .nav-item.active::before {
    background: #38bdf8 !important;
    box-shadow: 0 0 7px rgba(56, 189, 248, 0.35) !important;
}

html[data-theme="dark"] .nav-category-btn {
    border-color: transparent !important;
    background: transparent !important;
    color: #aebdce !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .nav-category-btn:hover {
    border-color: rgba(148, 163, 184, 0.15) !important;
    background: rgba(148, 163, 184, 0.075) !important;
    color: #e0e8f2 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

html[data-theme="dark"] .nav-category-btn:focus-visible {
    outline: 2px solid rgba(96, 165, 250, 0.42) !important;
    outline-offset: 1px !important;
}

html[data-theme="dark"] .utility-cover-style-card:hover:not(.active) {
    border-color: rgba(96, 165, 250, 0.36) !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(56, 189, 248, 0.08) !important;
    transform: translateY(-1px);
}

html[data-theme="dark"] .utility-cover-style-card.active {
    border-color: rgba(56, 189, 248, 0.44) !important;
    background-color: rgba(56, 189, 248, 0.08) !important;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.13), 0 8px 20px rgba(0, 0, 0, 0.18) !important;
}

html[data-theme="dark"] button:disabled:disabled,
html[data-theme="dark"] button[aria-disabled="true"][aria-disabled="true"],
html[data-theme="dark"] input[type="button"]:disabled:disabled,
html[data-theme="dark"] input[type="submit"]:disabled:disabled {
    opacity: 0.48 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    filter: saturate(0.68);
}

html[data-theme="dark"] .sidebar-footer .theme-toggle-btn,
html[data-theme="dark"] .sidebar-footer .logout-btn {
    border-color: var(--control-glass-border) !important;
    background: var(--control-glass-bg) !important;
    color: var(--control-glass-text) !important;
    box-shadow: var(--control-glass-shadow) !important;
    backdrop-filter: blur(12px) saturate(135%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(135%) !important;
}

html[data-theme="dark"] .sidebar-footer .theme-toggle-btn:hover,
html[data-theme="dark"] .sidebar-footer .theme-toggle-btn:active {
    border-color: var(--control-glass-border-hover) !important;
    background: var(--control-glass-hover) !important;
    color: var(--control-glass-text-hover) !important;
    box-shadow: var(--control-glass-shadow) !important;
}

html[data-theme="dark"] .sidebar-footer .logout-btn {
    border-color: var(--control-danger-border) !important;
    background: var(--control-danger-bg) !important;
    color: var(--control-danger-text) !important;
}

html[data-theme="dark"] .sidebar-footer .logout-btn:hover,
html[data-theme="dark"] .sidebar-footer .logout-btn:active {
    border-color: var(--control-danger-border-hover) !important;
    background: var(--control-danger-bg-hover) !important;
    color: var(--control-danger-text-hover) !important;
}

/* Utility dialogs have older high-specificity rules; normalize those controls here. */
html[data-theme="dark"] body .utility-modal .transfer-history-refresh-btn:not(.transfer-history-danger-btn):not([id$="-save-btn"]):not([id$="-run-btn"]):not([id$="-generate-btn"]),
html[data-theme="dark"] body .utility-ai-actions .transfer-history-refresh-btn:not(.transfer-history-danger-btn):not([id$="-save-btn"]):not([id$="-run-btn"]):not([id$="-generate-btn"]),
html[data-theme="dark"] body .utility-modal .utility-cover-action-btn:not(.is-primary),
html[data-theme="dark"] body .utility-modal .utility-cover-mini-btn:not(.utility-cover-mini-btn-primary):not(.utility-cover-mini-btn-accent):not([data-action*="delete"]):not([data-action*="remove"]):not([data-action*="clear"]) {
    border-color: var(--control-glass-border) !important;
    background: var(--control-glass-bg) !important;
    background-image: none !important;
    color: var(--control-glass-text) !important;
    box-shadow: var(--control-glass-shadow) !important;
    backdrop-filter: blur(12px) saturate(135%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(135%) !important;
}

html[data-theme="dark"] body .utility-modal .transfer-history-refresh-btn:not(.transfer-history-danger-btn):not([id$="-save-btn"]):not([id$="-run-btn"]):not([id$="-generate-btn"]):hover:not(:disabled),
html[data-theme="dark"] body .utility-ai-actions .transfer-history-refresh-btn:not(.transfer-history-danger-btn):not([id$="-save-btn"]):not([id$="-run-btn"]):not([id$="-generate-btn"]):hover:not(:disabled),
html[data-theme="dark"] body .utility-modal .utility-cover-action-btn:not(.is-primary):hover:not(:disabled),
html[data-theme="dark"] body .utility-modal .utility-cover-mini-btn:not(.utility-cover-mini-btn-primary):not(.utility-cover-mini-btn-accent):not([data-action*="delete"]):not([data-action*="remove"]):not([data-action*="clear"]):hover:not(:disabled) {
    border-color: var(--control-glass-border-hover) !important;
    background: var(--control-glass-hover) !important;
    background-image: none !important;
    color: var(--control-glass-text-hover) !important;
    box-shadow: 0 4px 11px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.075) !important;
}

html[data-theme="dark"] body .utility-modal .utility-cover-mini-btn-primary,
html[data-theme="dark"] body .utility-modal .utility-cover-action-btn.is-primary,
html[data-theme="dark"] body .utility-modal button[id$="-save-btn"],
html[data-theme="dark"] body .utility-modal button[id$="-run-btn"],
html[data-theme="dark"] body .utility-modal button[id$="-generate-btn"],
html[data-theme="dark"] body .utility-modal #emby-metadata-cleaner-clean-btn,
html[data-theme="dark"] body .utility-ai-actions button[id$="-save-btn"] {
    border-color: var(--control-primary-border) !important;
    background: var(--control-primary-bg) !important;
    background-image: none !important;
    color: var(--control-primary-text) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.075), 0 3px 9px rgba(14, 116, 144, 0.12) !important;
}

html[data-theme="dark"] body .utility-modal .utility-cover-mini-btn-primary:hover:not(:disabled),
html[data-theme="dark"] body .utility-modal .utility-cover-action-btn.is-primary:hover:not(:disabled),
html[data-theme="dark"] body .utility-modal button[id$="-save-btn"]:hover:not(:disabled),
html[data-theme="dark"] body .utility-modal button[id$="-run-btn"]:hover:not(:disabled),
html[data-theme="dark"] body .utility-modal button[id$="-generate-btn"]:hover:not(:disabled),
html[data-theme="dark"] body .utility-modal #emby-metadata-cleaner-clean-btn:hover:not(:disabled),
html[data-theme="dark"] body .utility-ai-actions button[id$="-save-btn"]:hover:not(:disabled) {
    border-color: var(--control-primary-border-hover) !important;
    background: var(--control-primary-bg-hover) !important;
    background-image: none !important;
    color: var(--control-primary-text-hover) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 5px 13px rgba(14, 116, 144, 0.16) !important;
}

html[data-theme="dark"] body .utility-modal .utility-cover-mini-btn-accent,
html[data-theme="dark"] body .utility-modal #share-strm-invalid-cleaner-pick-folder-btn,
html[data-theme="dark"] body .utility-modal #emby-metadata-cleaner-pick-folder-btn {
    border-color: var(--control-accent-border) !important;
    background: var(--control-accent-bg) !important;
    background-image: none !important;
    color: var(--control-accent-text) !important;
}

html[data-theme="dark"] body .utility-modal .utility-cover-mini-btn-accent:hover:not(:disabled),
html[data-theme="dark"] body .utility-modal #share-strm-invalid-cleaner-pick-folder-btn:hover:not(:disabled),
html[data-theme="dark"] body .utility-modal #emby-metadata-cleaner-pick-folder-btn:hover:not(:disabled) {
    border-color: var(--control-accent-border-hover) !important;
    background: var(--control-accent-bg-hover) !important;
    background-image: none !important;
    color: var(--control-accent-text-hover) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 5px 13px rgba(49, 46, 129, 0.16) !important;
}

html[data-theme="dark"] body .utility-modal .transfer-history-danger-btn,
html[data-theme="dark"] body .utility-ai-actions .transfer-history-danger-btn,
html[data-theme="dark"] body .utility-modal #share-strm-invalid-cleaner-stop-btn:not(:disabled) {
    border-color: var(--control-danger-border) !important;
    background: var(--control-danger-bg) !important;
    background-image: none !important;
    color: var(--control-danger-text) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 7px rgba(0, 0, 0, 0.14) !important;
}

html[data-theme="dark"] body .utility-modal .transfer-history-danger-btn:hover:not(:disabled),
html[data-theme="dark"] body .utility-ai-actions .transfer-history-danger-btn:hover:not(:disabled),
html[data-theme="dark"] body .utility-modal #share-strm-invalid-cleaner-stop-btn:not(:disabled):hover {
    border-color: var(--control-danger-border-hover) !important;
    background: var(--control-danger-bg-hover) !important;
    background-image: none !important;
    color: var(--control-danger-text-hover) !important;
}

html[data-theme="dark"] body .utility-modal .transfer-history-refresh-btn:not(.transfer-history-danger-btn):not([id$="-save-btn"]):not([id$="-run-btn"]):not([id$="-generate-btn"]):active:not(:disabled),
html[data-theme="dark"] body .utility-ai-actions .transfer-history-refresh-btn:not(.transfer-history-danger-btn):not([id$="-save-btn"]):not([id$="-run-btn"]):not([id$="-generate-btn"]):active:not(:disabled),
html[data-theme="dark"] body .utility-modal .utility-cover-action-btn:not(.is-primary):active:not(:disabled),
html[data-theme="dark"] body .utility-modal .utility-cover-mini-btn:not(.utility-cover-mini-btn-primary):not(.utility-cover-mini-btn-accent):not([data-action*="delete"]):not([data-action*="remove"]):not([data-action*="clear"]):active:not(:disabled) {
    background: var(--control-glass-pressed) !important;
    background-image: none !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

html[data-theme="dark"] body .utility-modal .utility-cover-mini-btn-primary:active:not(:disabled),
html[data-theme="dark"] body .utility-modal .utility-cover-action-btn.is-primary:active:not(:disabled),
html[data-theme="dark"] body .utility-modal button[id$="-save-btn"]:active:not(:disabled),
html[data-theme="dark"] body .utility-modal button[id$="-run-btn"]:active:not(:disabled),
html[data-theme="dark"] body .utility-modal button[id$="-generate-btn"]:active:not(:disabled),
html[data-theme="dark"] body .utility-modal #emby-metadata-cleaner-clean-btn:active:not(:disabled),
html[data-theme="dark"] body .utility-ai-actions button[id$="-save-btn"]:active:not(:disabled) {
    background: var(--control-primary-bg-hover) !important;
    background-image: none !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.22) !important;
}

html[data-theme="dark"] body .utility-modal .utility-cover-mini-btn-accent:active:not(:disabled),
html[data-theme="dark"] body .utility-modal #share-strm-invalid-cleaner-pick-folder-btn:active:not(:disabled),
html[data-theme="dark"] body .utility-modal #emby-metadata-cleaner-pick-folder-btn:active:not(:disabled) {
    background: var(--control-accent-bg-hover) !important;
    background-image: none !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.22) !important;
}

html[data-theme="dark"] body .tg-transfer-card .tg-transfer-test-btn,
html[data-theme="dark"] body .transfer-test-btn {
    border-color: var(--control-primary-border) !important;
    background: var(--control-primary-bg) !important;
    background-image: none !important;
    color: var(--control-primary-text) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.075), 0 3px 9px rgba(14, 116, 144, 0.12) !important;
}

html[data-theme="dark"] body .tg-transfer-card .tg-transfer-test-btn:hover:not(:disabled),
html[data-theme="dark"] body .transfer-test-btn:hover:not(:disabled) {
    border-color: var(--control-primary-border-hover) !important;
    background: var(--control-primary-bg-hover) !important;
    background-image: none !important;
    color: var(--control-primary-text-hover) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 5px 13px rgba(14, 116, 144, 0.16) !important;
}
