/* Global Dark Mode Form Styling */

/* Base form controls in dark mode */
/* Base form controls in dark mode */
[data-theme="dark"] .form-control:not(.form-range),
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-control-modern,
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="color"]):not([type="range"]):not(.form-range):not(.color-picker-input):not(.color-picker-swatch),
[data-bs-theme="dark"] .form-control:not(.form-range),
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .form-control-modern,
[data-bs-theme="dark"] textarea,
[data-bs-theme="dark"] select,
[data-bs-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="color"]):not([type="range"]):not(.form-range):not(.color-picker-input):not(.color-picker-swatch),
.theme-dark .form-control:not(.form-range),
.theme-dark .form-select,
.theme-dark .form-control-modern,
.theme-dark textarea,
.theme-dark select,
.theme-dark input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="color"]):not([type="range"]):not(.form-range):not(.color-picker-input):not(.color-picker-swatch),
.dark-theme .form-control:not(.form-range),
.dark-theme .form-select,
.dark-theme .form-control-modern,
.dark-theme textarea,
.dark-theme select,
.dark-theme input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="color"]):not([type="range"]):not(.form-range):not(.color-picker-input):not(.color-picker-swatch),
body.dark-theme .form-control:not(.form-range),
body.dark-theme .form-select,
body.dark-theme .form-control-modern,
body.dark-theme textarea,
body.dark-theme select,
body.dark-theme input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="color"]):not([type="range"]):not(.form-range):not(.color-picker-input):not(.color-picker-swatch) {
    background-color: var(--input-bg, #1E293B) !important;
    background: var(--input-bg, #1E293B) !important;
    color: var(--input-text, #F8FAFC) !important;
    border: 1px solid var(--input-border, #334155) !important;
    border-color: var(--input-border, #334155) !important;
    color-scheme: dark !important;
}

/* Focus states */
[data-theme="dark"] .form-control:not(.form-range):focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] .form-control-modern:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="color"]):not([type="range"]):not(.form-range):not(.color-picker-input):not(.color-picker-swatch):focus,
[data-bs-theme="dark"] .form-control:not(.form-range):focus,
[data-bs-theme="dark"] .form-select:focus,
[data-bs-theme="dark"] textarea:focus,
.theme-dark .form-control:not(.form-range):focus,
.theme-dark .form-select:focus,
.theme-dark .form-control-modern:focus,
.theme-dark textarea:focus,
.theme-dark select:focus,
.theme-dark input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="color"]):not([type="range"]):not(.form-range):not(.color-picker-input):not(.color-picker-swatch):focus,
body.dark-theme .form-control:not(.form-range):focus,
body.dark-theme .form-select:focus,
body.dark-theme .form-control-modern:focus,
body.dark-theme textarea:focus,
body.dark-theme select:focus,
body.dark-theme input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="color"]):not([type="range"]):not(.form-range):not(.color-picker-input):not(.color-picker-swatch):focus {
    background-color: var(--input-bg, #1E293B) !important;
    background: var(--input-bg, #1E293B) !important;
    color: #ffffff !important;
    border-color: var(--input-border, #334155) !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Placeholder text */
[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] textarea::placeholder,
[data-theme="dark"] input::placeholder,
[data-theme="dark"] select::placeholder,
[data-bs-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] textarea::placeholder,
[data-bs-theme="dark"] input::placeholder,
.theme-dark .form-control::placeholder,
.theme-dark textarea::placeholder,
.theme-dark input::placeholder,
.dark-theme .form-control::placeholder,
.dark-theme textarea::placeholder,
.dark-theme input::placeholder,
.dark-mode .form-control::placeholder,
.dark-mode textarea::placeholder,
.dark-mode input::placeholder,
body.dark-theme .form-control::placeholder,
body.dark-theme textarea::placeholder,
body.dark-theme input::placeholder,
body.theme-dark .form-control::placeholder,
body.theme-dark textarea::placeholder,
body.theme-dark input::placeholder,
body.dark-mode .form-control::placeholder,
body.dark-mode textarea::placeholder,
body.dark-mode input::placeholder,
body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder,
body[data-theme="dark"] .form-control::placeholder,
body[data-bs-theme="dark"] input::placeholder,
body[data-bs-theme="dark"] textarea::placeholder,
body[data-bs-theme="dark"] .form-control::placeholder {
    color: var(--input-placeholder, #CBD5E1) !important;
    opacity: 1 !important;
}

[data-theme="dark"] input::-webkit-input-placeholder,
[data-theme="dark"] textarea::-webkit-input-placeholder,
[data-bs-theme="dark"] input::-webkit-input-placeholder,
[data-bs-theme="dark"] textarea::-webkit-input-placeholder,
.theme-dark input::-webkit-input-placeholder,
.dark-theme input::-webkit-input-placeholder,
.dark-mode input::-webkit-input-placeholder,
body.dark-mode input::-webkit-input-placeholder,
body[data-theme="dark"] input::-webkit-input-placeholder,
body[data-bs-theme="dark"] input::-webkit-input-placeholder {
    color: var(--input-placeholder, #CBD5E1) !important;
    opacity: 1 !important;
}

[data-theme="dark"] input::-moz-placeholder,
[data-theme="dark"] textarea::-moz-placeholder,
[data-bs-theme="dark"] input::-moz-placeholder,
.theme-dark input::-moz-placeholder,
.dark-theme input::-moz-placeholder,
.dark-mode input::-moz-placeholder,
body.dark-mode input::-moz-placeholder,
body[data-theme="dark"] input::-moz-placeholder,
body[data-bs-theme="dark"] input::-moz-placeholder {
    color: var(--input-placeholder, #CBD5E1) !important;
    opacity: 1 !important;
}

/* Form labels */
[data-theme="dark"] .form-label,
[data-theme="dark"] .form-check-label,
[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] .form-check-label,
.theme-dark .form-label,
.theme-dark .form-check-label,
.dark-theme .form-label,
.dark-theme .form-check-label,
body.dark-theme .form-label,
body.dark-theme .form-check-label,
body.theme-dark .form-label,
body.theme-dark .form-check-label {
    color: var(--text-primary, #F8FAFC) !important;
}

[data-theme="dark"] .input-group-text,
[data-bs-theme="dark"] .input-group-text,
.theme-dark .input-group-text,
.dark-theme .input-group-text,
body.dark-theme .input-group-text,
body.theme-dark .input-group-text {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    color: var(--text-secondary, #94A3B8) !important;
    box-shadow: none !important;
}

/* Dynamic System-Wide Text Muted & Secondary Colors for Dark Mode */
[data-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-muted,
.theme-dark .text-muted,
.dark-theme .text-muted,
.dark-mode .text-muted,
html[data-theme="dark"] .text-muted,
html[data-bs-theme="dark"] .text-muted,
body.dark-theme .text-muted,
body.theme-dark .text-muted,
body.dark-mode .text-muted,
body[data-theme="dark"] .text-muted,
body[data-bs-theme="dark"] .text-muted,
[data-theme="dark"] .text-secondary,
[data-bs-theme="dark"] .text-secondary,
.theme-dark .text-secondary,
.dark-theme .text-secondary,
.dark-mode .text-secondary,
html[data-theme="dark"] .text-secondary,
body.dark-theme .text-secondary,
body.theme-dark .text-secondary,
body.dark-mode .text-secondary,
body[data-theme="dark"] .text-secondary,
[data-theme="dark"] .text-black-50,
[data-bs-theme="dark"] .text-black-50,
.theme-dark .text-black-50,
.dark-theme .text-black-50,
.dark-mode .text-black-50,
body.dark-theme .text-black-50,
body.dark-mode .text-black-50,
body[data-theme="dark"] .text-black-50,
[data-theme="dark"] .form-text,
[data-bs-theme="dark"] .form-text,
.theme-dark .form-text,
.dark-theme .form-text,
.dark-mode .form-text,
body.dark-theme .form-text,
body.dark-mode .form-text,
body[data-theme="dark"] .form-text,
[data-theme="dark"] .card-subtitle,
[data-bs-theme="dark"] .card-subtitle,
.theme-dark .card-subtitle,
.dark-theme .card-subtitle,
.dark-mode .card-subtitle,
body.dark-theme .card-subtitle,
body.dark-mode .card-subtitle,
body[data-theme="dark"] .card-subtitle,
[data-theme="dark"] .empty-state p,
[data-bs-theme="dark"] .empty-state p,
.theme-dark .empty-state p,
.dark-theme .empty-state p,
.dark-mode .empty-state p,
body.dark-theme .empty-state p,
body.dark-mode .empty-state p,
body[data-theme="dark"] .empty-state p,
[data-theme="dark"] .empty-state-text,
.theme-dark .empty-state-text,
.dark-theme .empty-state-text,
.dark-mode .empty-state-text,
body.dark-theme .empty-state-text,
body.dark-mode .empty-state-text,
body[data-theme="dark"] .empty-state-text,
[data-theme="dark"] p.text-muted,
[data-bs-theme="dark"] p.text-muted,
.theme-dark p.text-muted,
.dark-theme p.text-muted,
.dark-mode p.text-muted,
body.dark-theme p.text-muted,
body.theme-dark p.text-muted,
body.dark-mode p.text-muted,
body[data-theme="dark"] p.text-muted,
[data-theme="dark"] span.text-muted,
[data-bs-theme="dark"] span.text-muted,
.theme-dark span.text-muted,
.dark-theme span.text-muted,
.dark-mode span.text-muted,
body.dark-theme span.text-muted,
body.theme-dark span.text-muted,
body.dark-mode span.text-muted,
body[data-theme="dark"] span.text-muted,
[data-theme="dark"] small.text-muted,
[data-bs-theme="dark"] small.text-muted,
.theme-dark small.text-muted,
.dark-theme small.text-muted,
.dark-mode small.text-muted,
body.dark-theme small.text-muted,
body.theme-dark small.text-muted,
body.dark-mode small.text-muted,
body[data-theme="dark"] small.text-muted,
body[data-bs-theme="dark"] small.text-muted,
[data-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-muted,
.theme-dark .text-muted,
.dark-theme .text-muted,
.dark-mode .text-muted,
body.dark-theme .text-muted,
body.theme-dark .text-muted,
body.dark-mode .text-muted,
body[data-theme="dark"] .text-muted,
body[data-bs-theme="dark"] .text-muted,
[data-theme="dark"] .text-secondary,
[data-bs-theme="dark"] .text-secondary,
.theme-dark .text-secondary,
.dark-theme .text-secondary,
.dark-mode .text-secondary,
body.dark-theme .text-secondary,
body.theme-dark .text-secondary,
body.dark-mode .text-secondary,
body[data-theme="dark"] .text-secondary,
body[data-bs-theme="dark"] .text-secondary,
[data-theme="dark"] .form-text,
[data-bs-theme="dark"] .form-text,
.theme-dark .form-text,
.dark-theme .form-text,
.dark-mode .form-text,
body.dark-theme .form-text,
body.theme-dark .form-text,
body.dark-mode .form-text,
body[data-theme="dark"] .form-text,
body[data-bs-theme="dark"] .form-text {
    color: rgba(255, 255, 255, 0.75) !important;
}

[data-theme="dark"] i.text-muted,
[data-bs-theme="dark"] i.text-muted,
.theme-dark i.text-muted,
.dark-theme i.text-muted,
.dark-mode i.text-muted,
body.dark-theme i.text-muted,
body.theme-dark i.text-muted,
body.dark-mode i.text-muted,
body[data-theme="dark"] i.text-muted,
[data-theme="dark"] .empty-state i,
[data-bs-theme="dark"] .empty-state i,
.theme-dark .empty-state i,
.dark-theme .empty-state i,
.dark-mode .empty-state i,
body.dark-theme .empty-state i,
body.dark-mode .empty-state i,
body[data-theme="dark"] .empty-state i,
body[data-bs-theme="dark"] i.text-muted {
    color: rgba(255, 255, 255, 0.45) !important;
}

[data-theme="dark"] h1.text-muted,
[data-theme="dark"] h2.text-muted,
[data-theme="dark"] h3.text-muted,
[data-theme="dark"] h4.text-muted,
[data-theme="dark"] h5.text-muted,
[data-theme="dark"] h6.text-muted,
[data-bs-theme="dark"] h1.text-muted,
[data-bs-theme="dark"] h2.text-muted,
[data-bs-theme="dark"] h3.text-muted,
[data-bs-theme="dark"] h4.text-muted,
[data-bs-theme="dark"] h5.text-muted,
[data-bs-theme="dark"] h6.text-muted,
.theme-dark h5.text-muted,
.dark-theme h5.text-muted,
.dark-mode h5.text-muted,
body.dark-theme h5.text-muted,
body.theme-dark h5.text-muted,
body.dark-mode h5.text-muted,
body[data-theme="dark"] h5.text-muted,
body[data-bs-theme="dark"] h5.text-muted {
    color: #F8FAFC !important;
}

/* Form select dropdowns */
[data-theme="dark"] .form-select option,
[data-bs-theme="dark"] .form-select option,
.theme-dark .form-select option {
    background-color: #1E293B;
    color: #F8FAFC;
}

/* Form check inputs */
[data-theme="dark"] .form-check-input:checked,
[data-bs-theme="dark"] .form-check-input:checked,
.theme-dark .form-check-input:checked {
    background-color: var(--brand-primary, #4DD0E1);
    border-color: var(--brand-primary, #4DD0E1);
}

/* Form validation */
[data-theme="dark"] .is-valid,
[data-bs-theme="dark"] .is-valid,
.theme-dark .is-valid {
    border-color: #10b981 !important;
}

[data-theme="dark"] .is-invalid,
[data-bs-theme="dark"] .is-invalid,
.theme-dark .is-invalid {
    border-color: #ef4444 !important;
}

[data-theme="dark"] .form-text.text-muted,
[data-bs-theme="dark"] .form-text.text-muted,
.theme-dark .form-text.text-muted {
    color: var(--text-muted, #94A3B8) !important;
}

/* Modal forms */
[data-theme="dark"] .modal-content,
[data-bs-theme="dark"] .modal-content,
.theme-dark .modal-content,
.dark-theme .modal-content,
body.dark-theme .modal-content {
    background-color: #1A2236 !important;
    color: var(--text-primary, #F8FAFC) !important;
    border: 1px solid rgba(99, 179, 237, 0.25) !important;
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 179, 237, 0.15), inset 0 1px 0 rgba(255,255,255,0.04) !important;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] div.modal-header,
[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] div.modal-header,
.theme-dark .modal-header,
.theme-dark div.modal-header,
.dark-theme .modal-header,
.dark-theme div.modal-header,
body.dark-theme .modal-header {
    background: #131d30 !important;
    background-color: #131d30 !important;
    background-image: none !important;
    color: #F8FAFC !important;
    border-bottom: 1px solid rgba(99, 179, 237, 0.2) !important;
}

[data-theme="dark"] .modal-header .modal-title,
.theme-dark .modal-header .modal-title,
.dark-theme .modal-header .modal-title {
    color: #F8FAFC !important;
}

[data-theme="dark"] .modal-footer,
[data-bs-theme="dark"] .modal-footer,
.theme-dark .modal-footer,
.dark-theme .modal-footer,
body.dark-theme .modal-footer {
    background-color: #131d30 !important;
    border-top: 1px solid rgba(99, 179, 237, 0.15) !important;
}

/* Card forms */
[data-theme="dark"] .card,
[data-bs-theme="dark"] .card,
.theme-dark .card,
.dark-theme .card,
.dark-mode .card,
body.dark-theme .card,
body.theme-dark .card,
body.dark-mode .card,
body[data-theme="dark"] .card,
body[data-bs-theme="dark"] .card,
[data-theme="dark"] .cms-card,
[data-bs-theme="dark"] .cms-card,
.theme-dark .cms-card,
.dark-theme .cms-card,
.dark-mode .cms-card,
body.dark-theme .cms-card,
body.theme-dark .cms-card,
body.dark-mode .cms-card,
body[data-theme="dark"] .cms-card,
body[data-bs-theme="dark"] .cms-card,
[data-theme="dark"] .modern-card,
[data-bs-theme="dark"] .modern-card,
.theme-dark .modern-card,
.dark-theme .modern-card,
.dark-mode .modern-card,
body.dark-theme .modern-card,
body.theme-dark .modern-card,
body.dark-mode .modern-card,
body[data-theme="dark"] .modern-card,
body[data-bs-theme="dark"] .modern-card,
[data-theme="dark"] .settings-card,
[data-bs-theme="dark"] .settings-card,
.theme-dark .settings-card,
.dark-theme .settings-card,
.dark-mode .settings-card,
body.dark-theme .settings-card,
body.theme-dark .settings-card,
body.dark-mode .settings-card,
body[data-theme="dark"] .settings-card,
body[data-bs-theme="dark"] .settings-card {
    background-color: var(--bg-card, #1E293B) !important;
    background: var(--bg-card, #1E293B) !important;
    border-color: var(--border-color, #334155) !important;
    color: var(--text-primary, #F8FAFC) !important;
}

[data-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-header,
.theme-dark .card-header {
    background-color: var(--bg-card, #1E293B) !important;
    border-bottom-color: var(--border-color, #334155) !important;
    color: var(--text-primary, #F8FAFC) !important;
}

[data-theme="dark"] .card-footer,
[data-bs-theme="dark"] .card-footer,
.theme-dark .card-footer {
    background-color: var(--bg-card, #1E293B) !important;
    border-top-color: var(--border-color, #334155) !important;
}

/* Dark Mode Alerts (Sleek, Translucent, Accessible) */
[data-theme="dark"] .alert,
[data-bs-theme="dark"] .alert,
.theme-dark .alert,
.dark-theme .alert,
body.dark-theme .alert,
body.theme-dark .alert {
    background-color: rgba(30, 41, 59, 0.95) !important;
    border: 1px solid #334155 !important;
    color: #F8FAFC !important;
    border-radius: 12px !important;
}

[data-theme="dark"] .alert-info,
[data-bs-theme="dark"] .alert-info,
.theme-dark .alert-info,
.dark-theme .alert-info,
body.dark-theme .alert-info,
body.theme-dark .alert-info {
    background-color: rgba(14, 116, 144, 0.22) !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
    color: #E0F2FE !important;
}

[data-theme="dark"] .alert-info h1,
[data-theme="dark"] .alert-info h2,
[data-theme="dark"] .alert-info h3,
[data-theme="dark"] .alert-info h4,
[data-theme="dark"] .alert-info h5,
[data-theme="dark"] .alert-info h6,
[data-theme="dark"] .alert-info strong,
[data-theme="dark"] .alert-info b,
.theme-dark .alert-info h6,
.theme-dark .alert-info strong {
    color: #38BDF8 !important;
}

[data-theme="dark"] .alert-info .text-muted,
[data-theme="dark"] .alert-info small,
.theme-dark .alert-info .text-muted,
.theme-dark .alert-info small {
    color: #94A3B8 !important;
}

[data-theme="dark"] .alert-success,
[data-bs-theme="dark"] .alert-success,
.theme-dark .alert-success,
body.dark-theme .alert-success {
    background-color: rgba(22, 101, 52, 0.22) !important;
    border: 1px solid rgba(34, 197, 94, 0.45) !important;
    color: #DCFCE7 !important;
}

[data-theme="dark"] .alert-warning,
[data-bs-theme="dark"] .alert-warning,
.theme-dark .alert-warning,
body.dark-theme .alert-warning {
    background-color: rgba(133, 77, 14, 0.22) !important;
    border: 1px solid rgba(250, 204, 21, 0.45) !important;
    color: #FEF08A !important;
}

[data-theme="dark"] .alert-danger,
[data-bs-theme="dark"] .alert-danger,
.theme-dark .alert-danger,
body.dark-theme .alert-danger {
    background-color: rgba(153, 27, 27, 0.22) !important;
    border: 1px solid rgba(248, 113, 113, 0.45) !important;
    color: #FEE2E2 !important;
}

[data-theme="dark"] .alert-primary,
[data-bs-theme="dark"] .alert-primary,
.theme-dark .alert-primary,
body.dark-theme .alert-primary {
    background-color: rgba(3, 105, 161, 0.22) !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
    color: #E0F2FE !important;
}

/* Table forms */
[data-theme="dark"] .table,
[data-bs-theme="dark"] .table,
.theme-dark .table {
    color: var(--text-primary, #F8FAFC) !important;
}

[data-theme="dark"] .table th,
[data-theme="dark"] .table td,
[data-bs-theme="dark"] .table th,
[data-bs-theme="dark"] .table td,
.theme-dark .table th,
.theme-dark .table td {
    border-color: var(--border-color, #334155) !important;
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > *,
[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > *,
.theme-dark .table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: rgba(255, 255, 255, 0.03) !important;
    color: var(--text-primary, #F8FAFC) !important;
}

/* Buttons in forms */
[data-theme="dark"] .btn-outline-secondary,
[data-bs-theme="dark"] .btn-outline-secondary,
.theme-dark .btn-outline-secondary {
    color: var(--text-secondary, #CBD5E1) !important;
    border-color: var(--border-color, #334155) !important;
}

[data-theme="dark"] .btn-outline-secondary:hover,
[data-bs-theme="dark"] .btn-outline-secondary:hover,
.theme-dark .btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--border-color, #334155) !important;
}

/* Dark Mode Input groups - seamless unified group */
[data-theme="dark"] .input-group,
[data-bs-theme="dark"] .input-group,
.theme-dark .input-group,
.dark-theme .input-group,
body.dark-theme .input-group,
body.theme-dark .input-group {
    background-color: var(--input-bg, #1E293B) !important;
    border: 1px solid var(--input-border, #334155) !important;
    border-color: var(--input-border, #334155) !important;
}

[data-theme="dark"] .input-group:focus-within,
[data-bs-theme="dark"] .input-group:focus-within,
.theme-dark .input-group:focus-within,
.dark-theme .input-group:focus-within,
body.dark-theme .input-group:focus-within,
body.theme-dark .input-group:focus-within {
    border-color: var(--brand-primary, #38BDF8) !important;
    box-shadow: none !important;
    outline: none !important;
}

[data-theme="dark"] .input-icon-group .form-control,
[data-bs-theme="dark"] .input-icon-group .form-control,
.theme-dark .input-icon-group .form-control,
body.dark-theme .input-icon-group .form-control {
    background-color: #1E293B !important;
    background: #1E293B !important;
    color: #F8FAFC !important;
    border: 1px solid #334155 !important;
}

[data-theme="dark"] .input-icon-group .input-icon,
[data-theme="dark"] .input-icon-group > i,
[data-bs-theme="dark"] .input-icon-group .input-icon,
[data-bs-theme="dark"] .input-icon-group > i,
.theme-dark .input-icon-group .input-icon,
.theme-dark .input-icon-group > i,
body.dark-theme .input-icon-group .input-icon,
body.dark-theme .input-icon-group > i {
    color: #94A3B8 !important;
}

[data-theme="dark"] .input-icon-group:focus-within .input-icon,
[data-theme="dark"] .input-icon-group:focus-within > i,
[data-bs-theme="dark"] .input-icon-group:focus-within .input-icon,
[data-bs-theme="dark"] .input-icon-group:focus-within > i,
.theme-dark .input-icon-group:focus-within .input-icon,
.theme-dark .input-icon-group:focus-within > i,
body.dark-theme .input-icon-group:focus-within .input-icon,
body.dark-theme .input-icon-group:focus-within > i {
    color: var(--brand-accent, #4DD0E1) !important;
}

/* Dark Mode children inside input-group: NO borders, NO backgrounds, ZERO border-radius */
[data-theme="dark"] .input-group > *,
[data-theme="dark"] .input-group > .input-group-text,
[data-theme="dark"] .input-group > span,
[data-theme="dark"] .input-group > .password-toggle-btn,
[data-theme="dark"] .input-group > button,
[data-theme="dark"] .input-group > .btn,
[data-theme="dark"] .password-toggle-btn,
[data-bs-theme="dark"] .input-group > *,
[data-bs-theme="dark"] .input-group > .input-group-text,
[data-bs-theme="dark"] .input-group > span,
[data-bs-theme="dark"] .input-group > .password-toggle-btn,
[data-bs-theme="dark"] .input-group > button,
[data-bs-theme="dark"] .input-group > .btn,
[data-bs-theme="dark"] .password-toggle-btn,
.theme-dark .input-group > *,
.theme-dark .input-group > .input-group-text,
.theme-dark .input-group > span,
.theme-dark .input-group > .password-toggle-btn,
.theme-dark .input-group > button,
.theme-dark .input-group > .btn,
.theme-dark .password-toggle-btn,
.dark-theme .input-group > *,
.dark-theme .input-group > .input-group-text,
.dark-theme .input-group > span,
.dark-theme .input-group > .password-toggle-btn,
.dark-theme .input-group > button,
.dark-theme .input-group > .btn,
.dark-theme .password-toggle-btn,
body.dark-theme .input-group > *,
body.dark-theme .input-group > .input-group-text,
body.dark-theme .input-group > span,
body.dark-theme .input-group > .password-toggle-btn,
body.dark-theme .input-group > button,
body.dark-theme .input-group > .btn,
body.dark-theme .password-toggle-btn,
body.theme-dark .input-group > *,
body.theme-dark .input-group > .input-group-text,
body.theme-dark .input-group > span,
body.theme-dark .input-group > .password-toggle-btn,
body.theme-dark .input-group > button,
body.theme-dark .input-group > .btn,
body.theme-dark .password-toggle-btn {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--text-muted, #94A3B8) !important;
}

[data-theme="dark"] .password-toggle-btn:hover,
[data-bs-theme="dark"] .password-toggle-btn:hover,
.theme-dark .password-toggle-btn:hover,
.dark-theme .password-toggle-btn:hover,
body.dark-theme .password-toggle-btn:hover,
body.theme-dark .password-toggle-btn:hover {
    color: var(--brand-primary, #38BDF8) !important;
}

[data-theme="dark"] .input-group > .form-control,
[data-theme="dark"] .input-group > input,
[data-theme="dark"] .input-group > select,
[data-theme="dark"] .input-group > .form-select,
[data-bs-theme="dark"] .input-group > .form-control,
[data-bs-theme="dark"] .input-group > input,
[data-bs-theme="dark"] .input-group > select,
[data-bs-theme="dark"] .input-group > .form-select,
.theme-dark .input-group > .form-control,
.theme-dark .input-group > input,
.theme-dark .input-group > select,
.theme-dark .input-group > .form-select,
.dark-theme .input-group > .form-control,
.dark-theme .input-group > input,
.dark-theme .input-group > select,
.dark-theme .input-group > .form-select,
body.dark-theme .input-group > .form-control,
body.dark-theme .input-group > input,
body.dark-theme .input-group > select,
body.dark-theme .input-group > .form-select,
body.theme-dark .input-group > .form-control,
body.theme-dark .input-group > input,
body.theme-dark .input-group > select,
body.theme-dark .input-group > .form-select {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    color: var(--input-text, #F8FAFC) !important;
}

/* Dark Mode disabled / readonly input groups */
[data-theme="dark"] .input-group:has(.form-control:disabled),
[data-theme="dark"] .input-group:has(input:disabled),
[data-bs-theme="dark"] .input-group:has(.form-control:disabled),
[data-bs-theme="dark"] .input-group:has(input:disabled),
.theme-dark .input-group:has(.form-control:disabled),
.theme-dark .input-group:has(input:disabled),
.dark-theme .input-group:has(.form-control:disabled),
.dark-theme .input-group:has(input:disabled),
body.dark-theme .input-group:has(.form-control:disabled),
body.dark-theme .input-group:has(input:disabled),
body.theme-dark .input-group:has(.form-control:disabled),
body.theme-dark .input-group:has(input:disabled) {
    background-color: rgba(15, 23, 42, 0.7) !important;
    border-color: #334155 !important;
}

/* Custom file upload */
[data-theme="dark"] .form-file-label,
[data-bs-theme="dark"] .form-file-label,
.theme-dark .form-file-label {
    background-color: var(--input-bg, #1E293B) !important;
    color: var(--input-text, #F8FAFC) !important;
    border-color: var(--input-border, #475569) !important;
}

/* Range inputs (Range Scroll Sliders) - Clean slider with NO boxing or borders */
.form-range,
input[type="range"],
[data-theme="dark"] .form-range,
[data-theme="dark"] input[type="range"],
[data-bs-theme="dark"] .form-range,
[data-bs-theme="dark"] input[type="range"],
.theme-dark .form-range,
.theme-dark input[type="range"],
.dark-theme .form-range,
.dark-theme input[type="range"],
body.dark-theme .form-range,
body.dark-theme input[type="range"],
body.theme-dark .form-range,
body.theme-dark input[type="range"] {
    width: 100% !important;
    height: 1.5rem !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    accent-color: var(--brand-primary, #06B6D4) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.form-range:focus,
input[type="range"]:focus,
[data-theme="dark"] .form-range:focus,
[data-theme="dark"] input[type="range"]:focus,
[data-bs-theme="dark"] .form-range:focus,
[data-bs-theme="dark"] input[type="range"]:focus,
.theme-dark .form-range:focus,
.theme-dark input[type="range"]:focus,
.dark-theme .form-range:focus,
.dark-theme input[type="range"]:focus,
body.dark-theme .form-range:focus,
body.dark-theme input[type="range"]:focus,
body.theme-dark .form-range:focus,
body.theme-dark input[type="range"]:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
}

.form-range::-webkit-slider-runnable-track {
    width: 100% !important;
    height: 0.5rem !important;
    cursor: pointer !important;
    background-color: #334155 !important;
    border-radius: 1rem !important;
}

.form-range::-moz-range-track {
    width: 100% !important;
    height: 0.5rem !important;
    cursor: pointer !important;
    background-color: #334155 !important;
    border-radius: 1rem !important;
}

.form-range::-webkit-slider-thumb {
    width: 1.25rem !important;
    height: 1.25rem !important;
    margin-top: -0.375rem !important;
    background-color: var(--brand-primary, #06B6D4) !important;
    border: 2px solid #FFFFFF !important;
    border-radius: 1rem !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
    cursor: pointer !important;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease !important;
}

.form-range::-moz-range-thumb {
    width: 1.25rem !important;
    height: 1.25rem !important;
    background-color: var(--brand-primary, #06B6D4) !important;
    border: 2px solid #FFFFFF !important;
    border-radius: 1rem !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
    cursor: pointer !important;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease !important;
}

.form-range::-webkit-slider-thumb:hover,
.form-range::-moz-range-thumb:hover {
    background-color: #22D3EE !important;
    transform: scale(1.15) !important;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.6) !important;
}

.form-range::-webkit-slider-thumb:active,
.form-range::-moz-range-thumb:active {
    background-color: #0891B2 !important;
    transform: scale(1.25) !important;
    box-shadow: 0 0 14px rgba(6, 182, 212, 0.8) !important;
}

[data-theme="dark"] .form-range::-webkit-slider-runnable-track,
[data-bs-theme="dark"] .form-range::-webkit-slider-runnable-track,
.theme-dark .form-range::-webkit-slider-runnable-track,
[data-theme="dark"] .form-range::-moz-range-track,
[data-bs-theme="dark"] .form-range::-moz-range-track,
.theme-dark .form-range::-moz-range-track {
    background-color: #334155 !important;
}

[data-theme="dark"] .form-range::-webkit-slider-thumb,
[data-bs-theme="dark"] .form-range::-webkit-slider-thumb,
.theme-dark .form-range::-webkit-slider-thumb,
[data-theme="dark"] .form-range::-moz-range-thumb,
[data-bs-theme="dark"] .form-range::-moz-range-thumb,
.theme-dark .form-range::-moz-range-thumb {
    background-color: var(--brand-primary, #06B6D4) !important;
    border: 2px solid #FFFFFF !important;
}

/* Disabled form controls (Standalone only - excludes input-group children) */
[data-theme="dark"] .form-control:disabled:not(.input-group *),
[data-theme="dark"] .form-select:disabled:not(.input-group *),
[data-bs-theme="dark"] .form-control:disabled:not(.input-group *),
[data-bs-theme="dark"] .form-select:disabled:not(.input-group *),
.theme-dark .form-control:disabled:not(.input-group *),
.theme-dark .form-select:disabled:not(.input-group *) {
    background-color: rgba(15, 23, 42, 0.5) !important;
    color: var(--text-muted, #94A3B8) !important;
    border-color: #334155 !important;
}

/* Readonly form controls (Standalone only - excludes input-group children) */
[data-theme="dark"] .form-control[readonly]:not(.input-group *),
[data-bs-theme="dark"] .form-control[readonly]:not(.input-group *),
.theme-dark .form-control[readonly]:not(.input-group *) {
    background-color: rgba(15, 23, 42, 0.5) !important;
    color: var(--text-muted, #94A3B8) !important;
}

/* =====================================================================
   FLAWLESS UNIFIED INPUT GROUPS (ONE CONTINUOUS BLENDED FIELD)
   ===================================================================== */
.input-group,
.input-group.input-group-lg,
.input-group.input-group-sm {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: 100% !important;
    min-height: 44px !important;
    background-color: var(--input-bg, #FFFFFF) !important;
    border: 1px solid var(--input-border, #CBD5E1) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    position: relative !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.input-group.input-group-lg {
    min-height: 50px !important;
    border-radius: 10px !important;
}

.input-group.input-group-sm {
    min-height: 32px !important;
    border-radius: 6px !important;
}

[data-theme="dark"] .input-group,
[data-bs-theme="dark"] .input-group,
.theme-dark .input-group,
.dark-theme .input-group,
body.dark-theme .input-group,
body.theme-dark .input-group {
    background-color: var(--input-bg, #0F172A) !important;
    border: 1px solid var(--input-border, #334155) !important;
    border-color: #334155 !important;
}

.input-group:focus-within {
    border-color: var(--brand-primary, #0284C7) !important;
}

[data-theme="dark"] .input-group:focus-within,
[data-bs-theme="dark"] .input-group:focus-within,
.theme-dark .input-group:focus-within,
.dark-theme .input-group:focus-within,
body.dark-theme .input-group:focus-within,
body.theme-dark .input-group:focus-within {
    border-color: #38BDF8 !important;
}

/* ZERO INTERNAL BORDERS, NO VERTICAL DIVIDERS, TRANSPARENT ON ALL CHILDREN */
.input-group > *,
.input-group > .form-control,
.input-group > .form-select,
.input-group > .input-group-text,
.input-group > .input-group-append,
.input-group > .input-group-prepend,
.input-group > span,
.input-group > input,
.input-group > input[type="text"],
.input-group > input[type="email"],
.input-group > input[type="password"],
.input-group > input[type="number"],
.input-group > input[type="tel"],
.input-group > input[type="url"],
.input-group > select,
.input-group > button,
.input-group > .btn,
.input-group > .password-toggle-btn,
.input-group .form-control,
.input-group .form-select,
.input-group .input-group-text,
.input-group span,
.input-group input,
.input-group input[type="text"],
.input-group input[type="email"],
.input-group input[type="password"],
.input-group input[type="number"],
.input-group input[type="tel"],
.input-group input[type="url"],
.input-group select,
.input-group button,
.input-group .btn,
.input-group .form-control:disabled,
.input-group input:disabled,
.input-group .form-control[readonly],
.input-group input[readonly],
.input-group .form-control:focus,
.input-group input:focus,
[data-theme="dark"] .input-group > *,
[data-theme="dark"] .input-group > input,
[data-theme="dark"] .input-group > input[type="text"],
[data-theme="dark"] .input-group > .form-control,
[data-theme="dark"] .input-group > .input-group-text,
[data-theme="dark"] .input-group > span,
[data-theme="dark"] .input-group .form-control,
[data-theme="dark"] .input-group input,
[data-theme="dark"] .input-group .input-group-text,
[data-theme="dark"] .input-group span,
[data-theme="dark"] .input-group input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="range"]):not(.form-range),
[data-bs-theme="dark"] .input-group input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="range"]):not(.form-range),
.theme-dark .input-group input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="range"]):not(.form-range),
.dark-theme .input-group input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="range"]):not(.form-range),
body.dark-theme .input-group input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="range"]):not(.form-range),
body.theme-dark .input-group input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="range"]):not(.form-range),
[data-theme="dark"] .input-group .form-control:disabled,
[data-theme="dark"] .input-group input:disabled,
[data-theme="dark"] .input-group .form-control[readonly],
[data-theme="dark"] .input-group input[readonly],
[data-bs-theme="dark"] .input-group .form-control:disabled,
[data-bs-theme="dark"] .input-group input:disabled,
[data-bs-theme="dark"] .input-group .form-control[readonly],
[data-bs-theme="dark"] .input-group input[readonly],
.theme-dark .input-group .form-control:disabled,
.theme-dark .input-group input:disabled,
.theme-dark .input-group .form-control[readonly],
.theme-dark .input-group input[readonly],
.dark-theme .input-group .form-control:disabled,
.dark-theme .input-group input:disabled,
.dark-theme .input-group .form-control[readonly],
.dark-theme .input-group input[readonly],
body.dark-theme .input-group .form-control:disabled,
body.dark-theme .input-group input:disabled,
body.dark-theme .input-group .form-control[readonly],
body.dark-theme .input-group input[readonly],
body.theme-dark .input-group .form-control:disabled,
body.theme-dark .input-group input:disabled,
body.theme-dark .input-group .form-control[readonly],
body.theme-dark .input-group input[readonly] {
    border: 0 !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    margin: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Inner input flex layout */
.input-group > .form-control,
.input-group > input,
.input-group > select,
.input-group > .form-select,
.input-group .form-control,
.input-group input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    padding: 0.625rem 0.875rem !important;
    font-size: 0.9375rem !important;
    line-height: 1.5 !important;
    color: var(--input-text, #0F172A) !important;
}

[data-theme="dark"] .input-group > .form-control,
[data-theme="dark"] .input-group > input,
[data-theme="dark"] .input-group .form-control,
[data-theme="dark"] .input-group input,
[data-bs-theme="dark"] .input-group > .form-control,
[data-bs-theme="dark"] .input-group > input,
[data-bs-theme="dark"] .input-group .form-control,
[data-bs-theme="dark"] .input-group input,
.theme-dark .input-group > .form-control,
.theme-dark .input-group > input,
.dark-theme .input-group > .form-control,
.dark-theme .input-group > input,
body.dark-theme .input-group > .form-control,
body.dark-theme .input-group > input,
body.theme-dark .input-group > .form-control,
body.theme-dark .input-group > input {
    color: var(--input-text, #F8FAFC) !important;
}

/* Leading Addon / Icon */
.input-group > .input-group-text:first-child,
.input-group > span:first-child {
    padding-left: 1rem !important;
    padding-right: 0.4rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-muted, #64748B) !important;
    flex-shrink: 0 !important;
    background: transparent !important;
    border: none !important;
}

.input-group > .input-group-text:first-child + .form-control,
.input-group > .input-group-text:first-child + input,
.input-group > span:first-child + .form-control,
.input-group > span:first-child + input {
    padding-left: 0.35rem !important;
}

/* Trailing Addon / Text (.clasyo.com, points, KES) */
.input-group > .input-group-text:last-child,
.input-group > span:last-child {
    padding-left: 0.35rem !important;
    padding-right: 1.15rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-muted, #64748B) !important;
    font-weight: 500 !important;
    font-size: 0.9375rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    user-select: none !important;
    background: transparent !important;
    border: none !important;
}

.input-group > .form-control:not(:last-child),
.input-group > input:not(:last-child) {
    padding-right: 0.35rem !important;
}

/* Trailing Button */
.input-group > button,
.input-group > .btn,
.input-group > .password-toggle-btn {
    padding-left: 0.5rem !important;
    padding-right: 1rem !important;
    color: var(--text-muted, #64748B) !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    background: transparent !important;
    border: none !important;
}

/* Disabled input-group container */
.input-group:has(.form-control:disabled),
.input-group:has(input:disabled),
.input-group.is-disabled {
    background-color: var(--bg-hover, #F8FAFC) !important;
    border-color: var(--input-border, #CBD5E1) !important;
    opacity: 0.85 !important;
    cursor: not-allowed !important;
}

[data-theme="dark"] .input-group:has(.form-control:disabled),
[data-theme="dark"] .input-group:has(input:disabled),
[data-bs-theme="dark"] .input-group:has(.form-control:disabled),
[data-bs-theme="dark"] .input-group:has(input:disabled),
.theme-dark .input-group:has(.form-control:disabled),
.theme-dark .input-group:has(input:disabled),
.dark-theme .input-group:has(.form-control:disabled),
.dark-theme .input-group:has(input:disabled),
body.dark-theme .input-group:has(.form-control:disabled),
body.dark-theme .input-group:has(input:disabled),
body.theme-dark .input-group:has(.form-control:disabled),
body.theme-dark .input-group:has(input:disabled) {
    background-color: rgba(15, 23, 42, 0.7) !important;
    border-color: #334155 !important;
}

/* ==========================================================
   SYSTEM-WIDE DARK MODE TOGGLE SWITCHES, CHECKBOXES & RADIOS
   ========================================================== */

/* 1. Form Switches (Toggle Buttons) in Dark Mode */
.form-switch,
[data-theme="dark"] .form-switch,
[data-bs-theme="dark"] .form-switch,
.theme-dark .form-switch,
.dark-theme .form-switch,
body.dark-theme .form-switch,
body.theme-dark .form-switch {
    padding-left: 3.5em !important;
}

.form-switch input[type="checkbox"],
.form-switch input,
.form-switch .form-check-input,
[data-theme="dark"] .form-switch input[type="checkbox"],
[data-theme="dark"] .form-switch input,
[data-theme="dark"] .form-switch .form-check-input,
[data-bs-theme="dark"] .form-switch input[type="checkbox"],
[data-bs-theme="dark"] .form-switch input,
[data-bs-theme="dark"] .form-switch .form-check-input,
.theme-dark .form-switch input[type="checkbox"],
.theme-dark .form-switch input,
.theme-dark .form-switch .form-check-input,
.dark-theme .form-switch input[type="checkbox"],
.dark-theme .form-switch input,
.dark-theme .form-switch .form-check-input,
body.dark-theme .form-switch input[type="checkbox"],
body.dark-theme .form-switch input,
body.dark-theme .form-switch .form-check-input,
body.theme-dark .form-switch input[type="checkbox"],
body.theme-dark .form-switch input,
body.theme-dark .form-switch .form-check-input,
[data-theme="dark"] input[type="checkbox"][role="switch"],
[data-bs-theme="dark"] input[type="checkbox"][role="switch"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    width: 2.75em !important;
    height: 1.4em !important;
    margin-left: -3.5em !important;
    border-radius: 2em !important;
    background-color: #334155 !important;
    border: 1.5px solid #64748B !important;
    /* High contrast white circle knob for OFF state, positioned on the left */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23FFFFFF'/%3e%3c/svg%3e") !important;
    background-position: left center !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-position 0.2s ease !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
    vertical-align: middle !important;
    display: inline-block !important;
    margin-top: 0.1em !important;
    float: left !important;
}

.form-switch .form-check-label,
[data-theme="dark"] .form-switch .form-check-label,
[data-bs-theme="dark"] .form-switch .form-check-label,
.theme-dark .form-switch .form-check-label,
.dark-theme .form-switch .form-check-label,
body.dark-theme .form-switch .form-check-label,
body.theme-dark .form-switch .form-check-label {
    margin-left: 0.65rem !important;
    cursor: pointer !important;
    user-select: none !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.form-switch input[type="checkbox"]:hover,
.form-switch input:hover,
.form-switch .form-check-input:hover,
[data-theme="dark"] .form-switch input[type="checkbox"]:hover,
[data-theme="dark"] .form-switch input:hover,
[data-theme="dark"] .form-switch .form-check-input:hover,
[data-bs-theme="dark"] .form-switch input[type="checkbox"]:hover,
[data-bs-theme="dark"] .form-switch input:hover,
[data-bs-theme="dark"] .form-switch .form-check-input:hover,
.theme-dark .form-switch input[type="checkbox"]:hover,
.theme-dark .form-switch input:hover,
.theme-dark .form-switch .form-check-input:hover,
.dark-theme .form-switch input[type="checkbox"]:hover,
.dark-theme .form-switch input:hover,
.dark-theme .form-switch .form-check-input:hover,
body.dark-theme .form-switch input[type="checkbox"]:hover,
body.dark-theme .form-switch input:hover,
body.dark-theme .form-switch .form-check-input:hover,
body.theme-dark .form-switch input[type="checkbox"]:hover,
body.theme-dark .form-switch input:hover,
body.theme-dark .form-switch .form-check-input:hover {
    background-color: #475569 !important;
    border-color: #94A3B8 !important;
}

.form-switch input[type="checkbox"]:checked,
.form-switch input:checked,
.form-switch .form-check-input:checked,
[data-theme="dark"] .form-switch input[type="checkbox"]:checked,
[data-theme="dark"] .form-switch input:checked,
[data-theme="dark"] .form-switch .form-check-input:checked,
[data-bs-theme="dark"] .form-switch input[type="checkbox"]:checked,
[data-bs-theme="dark"] .form-switch input:checked,
[data-bs-theme="dark"] .form-switch .form-check-input:checked,
.theme-dark .form-switch input[type="checkbox"]:checked,
.theme-dark .form-switch input:checked,
.theme-dark .form-switch .form-check-input:checked,
.dark-theme .form-switch input[type="checkbox"]:checked,
.dark-theme .form-switch input:checked,
.dark-theme .form-switch .form-check-input:checked,
body.dark-theme .form-switch input[type="checkbox"]:checked,
body.dark-theme .form-switch input:checked,
body.dark-theme .form-switch .form-check-input:checked,
body.theme-dark .form-switch input[type="checkbox"]:checked,
body.theme-dark .form-switch input:checked,
body.theme-dark .form-switch .form-check-input:checked,
[data-theme="dark"] input[type="checkbox"][role="switch"]:checked,
[data-bs-theme="dark"] input[type="checkbox"][role="switch"]:checked {
    background-color: var(--brand-primary, #06B6D4) !important;
    border-color: var(--brand-primary, #22D3EE) !important;
    /* High contrast white circle knob for ON state, positioned on the right */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23FFFFFF'/%3e%3c/svg%3e") !important;
    background-position: right center !important;
    box-shadow: 0 0 10px rgba(var(--brand-primary-rgb, 6, 182, 212), 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.3) !important;
}

.form-switch input[type="checkbox"]:checked:hover,
.form-switch input:checked:hover,
.form-switch .form-check-input:checked:hover,
[data-theme="dark"] .form-switch input[type="checkbox"]:checked:hover,
[data-theme="dark"] .form-switch input:checked:hover,
[data-theme="dark"] .form-switch .form-check-input:checked:hover,
[data-bs-theme="dark"] .form-switch input[type="checkbox"]:checked:hover,
[data-bs-theme="dark"] .form-switch input:checked:hover,
[data-bs-theme="dark"] .form-switch .form-check-input:checked:hover,
.theme-dark .form-switch input[type="checkbox"]:checked:hover,
.theme-dark .form-switch input:checked:hover,
.theme-dark .form-switch .form-check-input:checked:hover,
.dark-theme .form-switch input[type="checkbox"]:checked:hover,
.dark-theme .form-switch input:checked:hover,
.dark-theme .form-switch .form-check-input:checked:hover,
body.dark-theme .form-switch input[type="checkbox"]:checked:hover,
body.dark-theme .form-switch input:checked:hover,
body.dark-theme .form-switch .form-check-input:checked:hover,
body.theme-dark .form-switch input[type="checkbox"]:checked:hover,
body.theme-dark .form-switch input:checked:hover,
body.theme-dark .form-switch .form-check-input:checked:hover {
    background-color: #0891B2 !important;
    border-color: #67E8F9 !important;
    box-shadow: 0 0 18px rgba(6, 182, 212, 0.85) !important;
}

.form-switch input[type="checkbox"]:focus,
.form-switch input:focus,
.form-switch .form-check-input:focus,
[data-theme="dark"] .form-switch input[type="checkbox"]:focus,
[data-theme="dark"] .form-switch input:focus,
[data-theme="dark"] .form-switch .form-check-input:focus,
[data-bs-theme="dark"] .form-switch input[type="checkbox"]:focus,
[data-bs-theme="dark"] .form-switch input:focus,
[data-bs-theme="dark"] .form-switch .form-check-input:focus,
.theme-dark .form-switch input[type="checkbox"]:focus,
.theme-dark .form-switch input:focus,
.theme-dark .form-switch .form-check-input:focus,
.dark-theme .form-switch input[type="checkbox"]:focus,
.dark-theme .form-switch input:focus,
.dark-theme .form-switch .form-check-input:focus,
body.dark-theme .form-switch input[type="checkbox"]:focus,
body.dark-theme .form-switch input:focus,
body.dark-theme .form-switch .form-check-input:focus,
body.theme-dark .form-switch input[type="checkbox"]:focus,
body.theme-dark .form-switch input:focus,
body.theme-dark .form-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(6, 182, 212, 0.4) !important;
    outline: none !important;
}

/* 2. Standard Checkboxes in Dark Mode */
[data-theme="dark"] .form-check-input:not([type="radio"]):not(.form-switch .form-check-input),
[data-bs-theme="dark"] .form-check-input:not([type="radio"]):not(.form-switch .form-check-input),
.theme-dark .form-check-input:not([type="radio"]):not(.form-switch .form-check-input),
.dark-theme .form-check-input:not([type="radio"]):not(.form-switch .form-check-input),
body.dark-theme .form-check-input:not([type="radio"]):not(.form-switch .form-check-input),
body.theme-dark .form-check-input:not([type="radio"]):not(.form-switch .form-check-input) {
    background-color: #1E293B !important;
    border: 1.5px solid #64748B !important;
    border-radius: 4px !important;
    cursor: pointer !important;
}

[data-theme="dark"] .form-check-input:not([type="radio"]):not(.form-switch .form-check-input):checked,
[data-bs-theme="dark"] .form-check-input:not([type="radio"]):not(.form-switch .form-check-input):checked,
.theme-dark .form-check-input:not([type="radio"]):not(.form-switch .form-check-input):checked,
.dark-theme .form-check-input:not([type="radio"]):not(.form-switch .form-check-input):checked,
body.dark-theme .form-check-input:not([type="radio"]):not(.form-switch .form-check-input):checked,
body.theme-dark .form-check-input:not([type="radio"]):not(.form-switch .form-check-input):checked {
    background-color: var(--brand-primary, #06B6D4) !important;
    border-color: var(--brand-primary, #06B6D4) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.5) !important;
}

/* 3. Radio Buttons in Dark Mode */
[data-theme="dark"] .form-check-input[type="radio"],
[data-bs-theme="dark"] .form-check-input[type="radio"],
.theme-dark .form-check-input[type="radio"],
.dark-theme .form-check-input[type="radio"],
body.dark-theme .form-check-input[type="radio"],
body.theme-dark .form-check-input[type="radio"] {
    background-color: #1E293B !important;
    border: 1.5px solid #64748B !important;
    border-radius: 50% !important;
    cursor: pointer !important;
}

[data-theme="dark"] .form-check-input[type="radio"]:checked,
[data-bs-theme="dark"] .form-check-input[type="radio"]:checked,
.theme-dark .form-check-input[type="radio"]:checked,
.dark-theme .form-check-input[type="radio"]:checked,
body.dark-theme .form-check-input[type="radio"]:checked,
body.theme-dark .form-check-input[type="radio"]:checked {
    background-color: var(--brand-primary, #06B6D4) !important;
    border-color: var(--brand-primary, #06B6D4) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23ffffff'/%3e%3c/svg%3e") !important;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.5) !important;
}

/* 4. Form Check Labels in Dark Mode */
[data-theme="dark"] .form-check-label,
[data-bs-theme="dark"] .form-check-label,
.theme-dark .form-check-label,
.dark-theme .form-check-label,
body.dark-theme .form-check-label,
body.theme-dark .form-check-label {
    color: #F8FAFC !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    user-select: none !important;
}

/* 5. Disabled Toggle & Checkbox States in Dark Mode */
[data-theme="dark"] .form-check-input:disabled,
[data-bs-theme="dark"] .form-check-input:disabled,
.theme-dark .form-check-input:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    filter: grayscale(80%) !important;
}

/* Color Field Container & Trigger - Dark Mode */
.color-field-container {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
}

.color-field-container .form-control.color-code-input,
.color-field-container input.color-code-input {
    width: 100% !important;
    padding-right: 42px !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
}

.color-field-container .color-picker-trigger {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    color: #94A3B8 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: color 0.15s ease, transform 0.15s ease !important;
    padding: 0 !important;
    z-index: 2 !important;
}

.color-field-container .color-picker-trigger:hover {
    color: #38BDF8 !important;
    transform: translateY(-50%) scale(1.15) !important;
}

.color-picker-native-hidden {
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.color-label-clickable {
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    user-select: none !important;
}

.color-label-clickable:hover .color-label-dot {
    transform: scale(1.25) !important;
}

.color-label-dot {
    transition: transform 0.15s ease, color 0.2s ease !important;
    display: inline-block !important;
}



[data-theme="dark"] .text-dark,
[data-bs-theme="dark"] .text-dark,
.theme-dark .text-dark,
.dark-theme .text-dark,
body.dark-theme .text-dark {
    color: #F8FAFC !important;
}

[data-theme="dark"] .text-muted,
[data-bs-theme="dark"] .text-muted,
.theme-dark .text-muted,
.dark-theme .text-muted {
    color: #94A3B8 !important;
}

/* Maintenance status selector boxes in Dark Mode */
[data-theme="dark"] .maintenance-status-selector .form-check,
[data-bs-theme="dark"] .maintenance-status-selector .form-check {
    background: rgba(30, 41, 59, 0.6) !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .maintenance-status-selector .bg-light-success,
[data-bs-theme="dark"] .maintenance-status-selector .bg-light-success {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: #10B981 !important;
}

[data-theme="dark"] .maintenance-status-selector .bg-light-warning,
[data-bs-theme="dark"] .maintenance-status-selector .bg-light-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    border-color: #F59E0B !important;
}

[data-theme="dark"] .maintenance-status-selector .bg-light-danger,
[data-bs-theme="dark"] .maintenance-status-selector .bg-light-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: #EF4444 !important;
}

/* Shared In-Page Form Views Dark Mode */
[data-theme="dark"] .form-panel-view,
[data-bs-theme="dark"] .form-panel-view,
.theme-dark .form-panel-view {
    background-color: var(--card-bg, #1E293B) !important;
    border-color: var(--border-color, #334155) !important;
}

[data-theme="dark"] .form-header-bar,
[data-bs-theme="dark"] .form-header-bar,
.theme-dark .form-header-bar {
    background-color: rgba(15, 23, 42, 0.5) !important;
    border-bottom-color: var(--border-color, #334155) !important;
}

/* Universal Form Panel Inner Border / Nested Card Outline Removal Dark Mode */
[data-theme="dark"] .form-panel-view .modern-card,
[data-theme="dark"] .form-panel-view .card,
[data-theme="dark"] .form-card-body .modern-card,
[data-theme="dark"] .form-card-body .card,
[data-bs-theme="dark"] .form-panel-view .modern-card,
[data-bs-theme="dark"] .form-panel-view .card,
[data-bs-theme="dark"] .form-card-body .modern-card,
[data-bs-theme="dark"] .form-card-body .card,
.theme-dark .form-panel-view .modern-card,
.theme-dark .form-panel-view .card,
.theme-dark .form-card-body .modern-card,
.theme-dark .form-card-body .card {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* Dark Mode Dropdowns, TomSelect, Select2 & Choice Items */
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .modern-dropdown-menu,
[data-theme="dark"] .ts-dropdown,
[data-theme="dark"] .select2-dropdown,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .ts-dropdown,
[data-bs-theme="dark"] .select2-dropdown,
body.dark-theme .dropdown-menu,
body.dark-theme .ts-dropdown,
body.dark-theme .select2-dropdown {
    background-color: #1E293B !important;
    border-color: #334155 !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
}

[data-theme="dark"] .dropdown-item,
[data-theme="dark"] .modern-dropdown-menu .dropdown-item,
[data-theme="dark"] .ts-dropdown .option,
[data-theme="dark"] .select2-results__option,
[data-bs-theme="dark"] .dropdown-item,
[data-bs-theme="dark"] .ts-dropdown .option,
[data-bs-theme="dark"] .select2-results__option,
body.dark-theme .dropdown-item,
body.dark-theme .ts-dropdown .option,
body.dark-theme .select2-results__option {
    color: #E2E8F0 !important;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .modern-dropdown-menu .dropdown-item:hover,
[data-theme="dark"] .ts-dropdown .option:hover,
[data-theme="dark"] .select2-results__option--highlighted,
[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .ts-dropdown .option:hover,
[data-bs-theme="dark"] .select2-results__option--highlighted,
body.dark-theme .dropdown-item:hover,
body.dark-theme .ts-dropdown .option:hover,
body.dark-theme .select2-results__option--highlighted {
    background-color: rgba(56, 189, 248, 0.16) !important;
    color: var(--brand-primary, #38BDF8) !important;
}

[data-theme="dark"] .dropdown-item.active,
[data-theme="dark"] .ts-dropdown .active,
[data-bs-theme="dark"] .dropdown-item.active,
[data-bs-theme="dark"] .ts-dropdown .active,
body.dark-theme .dropdown-item.active,
body.dark-theme .ts-dropdown .active {
    background-color: var(--brand-primary, #38BDF8) !important;
    color: #0F172A !important;
}

[data-theme="dark"] .dropdown-item i,
[data-theme="dark"] .modern-dropdown-menu .dropdown-item i,
[data-bs-theme="dark"] .dropdown-item i,
body.dark-theme .dropdown-item i {
    color: var(--brand-primary, #38BDF8) !important;
}

[data-theme="dark"] .form-select option,
[data-bs-theme="dark"] .form-select option,
body.dark-theme .form-select option {
    background-color: #1E293B !important;
    color: #F8FAFC !important;
}

/* Dark Mode - Dashboard Overview & Aligned Cards */
[data-theme="dark"] .hero-stat-card,
[data-bs-theme="dark"] .hero-stat-card,
.theme-dark .hero-stat-card,
[data-theme="dark"] .side-stat-card,
[data-bs-theme="dark"] .side-stat-card,
.theme-dark .side-stat-card,
[data-theme="dark"] .quick-stats-chart-card,
[data-bs-theme="dark"] .quick-stats-chart-card,
.theme-dark .quick-stats-chart-card {
    background: #1E293B !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .hero-stat-title,
[data-bs-theme="dark"] .hero-stat-title,
.theme-dark .hero-stat-title,
[data-theme="dark"] .hero-stat-primary-value,
[data-bs-theme="dark"] .hero-stat-primary-value,
.theme-dark .hero-stat-primary-value,
[data-theme="dark"] .hero-sub-val,
[data-bs-theme="dark"] .hero-sub-val,
.theme-dark .hero-sub-val,
[data-theme="dark"] .side-stat-val,
[data-bs-theme="dark"] .side-stat-val,
.theme-dark .side-stat-val,
[data-theme="dark"] .quick-stats-chart-title,
[data-bs-theme="dark"] .quick-stats-chart-title,
.theme-dark .quick-stats-chart-title,
[data-theme="dark"] .quick-stats-legend-val,
[data-bs-theme="dark"] .quick-stats-legend-val,
.theme-dark .quick-stats-legend-val {
    color: #F8FAFC !important;
}

[data-theme="dark"] .hero-stat-subtitle,
[data-bs-theme="dark"] .hero-stat-subtitle,
.theme-dark .hero-stat-subtitle,
[data-theme="dark"] .hero-sub-lbl,
[data-bs-theme="dark"] .hero-sub-lbl,
.theme-dark .hero-sub-lbl,
[data-theme="dark"] .side-stat-lbl,
[data-bs-theme="dark"] .side-stat-lbl,
.theme-dark .side-stat-lbl,
[data-theme="dark"] .quick-stats-legend-item,
[data-bs-theme="dark"] .quick-stats-legend-item,
.theme-dark .quick-stats-legend-item {
    color: #94A3B8 !important;
}

[data-theme="dark"] .hero-stat-footer,
[data-bs-theme="dark"] .hero-stat-footer,
.theme-dark .hero-stat-footer,
[data-theme="dark"] .quick-stats-legend,
[data-bs-theme="dark"] .quick-stats-legend,
.theme-dark .quick-stats-legend {
    border-top-color: #334155 !important;
}

/* ==========================================================================
   STRICT FINAL OVERRIDE: Color Picker Group - Single Seamless Outer Border
   Guarantees zero inner borders, zero nested backgrounds, zero outlines
   ========================================================================== */
.color-picker-group input,
.color-picker-group input[type="text"],
.color-picker-group input[type="color"],
.color-picker-group .color-picker-input,
.color-picker-group .color-picker-swatch,
[data-theme="dark"] .color-picker-group input,
[data-theme="dark"] .color-picker-group input[type="text"],
[data-theme="dark"] .color-picker-group input[type="color"],
[data-theme="dark"] .color-picker-group .color-picker-input,
[data-theme="dark"] .color-picker-group .color-picker-swatch,
[data-bs-theme="dark"] .color-picker-group input,
[data-bs-theme="dark"] .color-picker-group input[type="text"],
[data-bs-theme="dark"] .color-picker-group input[type="color"],
[data-bs-theme="dark"] .color-picker-group .color-picker-input,
[data-bs-theme="dark"] .color-picker-group .color-picker-swatch,
.theme-dark .color-picker-group input,
.theme-dark .color-picker-group input[type="text"],
.theme-dark .color-picker-group input[type="color"],
.theme-dark .color-picker-group .color-picker-input,
.theme-dark .color-picker-group .color-picker-swatch,
.dark-theme .color-picker-group input,
.dark-theme .color-picker-group input[type="text"],
.dark-theme .color-picker-group input[type="color"],
.dark-theme .color-picker-group .color-picker-input,
.dark-theme .color-picker-group .color-picker-swatch,
body.dark-theme .color-picker-group input,
body.dark-theme .color-picker-group input[type="text"],
body.dark-theme .color-picker-group input[type="color"],
body.dark-theme .color-picker-group .color-picker-input,
body.dark-theme .color-picker-group .color-picker-swatch,
body.theme-dark .color-picker-group input,
body.theme-dark .color-picker-group input[type="text"],
body.theme-dark .color-picker-group input[type="color"],
body.theme-dark .color-picker-group .color-picker-input,
body.theme-dark .color-picker-group .color-picker-swatch {
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* ==========================================================================
   Global High-Contrast Dark Mode Badges & Protocol Chips
   ========================================================================== */
[data-theme="dark"] .badge-port,
[data-bs-theme="dark"] .badge-port,
body.dark-theme .badge-port,
body.theme-dark .badge-port,
html.dark-theme .badge-port,
.theme-dark .badge-port,
.dark-theme .badge-port,
[data-theme="dark"] .badge-code-chip,
[data-bs-theme="dark"] .badge-code-chip,
body.dark-theme .badge-code-chip,
body.theme-dark .badge-code-chip,
html.dark-theme .badge-code-chip {
    background-color: rgba(30, 41, 59, 0.95) !important;
    color: #94A3B8 !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
}

[data-theme="dark"] .badge-protocol,
[data-bs-theme="dark"] .badge-protocol,
body.dark-theme .badge-protocol,
body.theme-dark .badge-protocol,
html.dark-theme .badge-protocol,
.theme-dark .badge-protocol,
.dark-theme .badge-protocol {
    background-color: rgba(14, 165, 233, 0.2) !important;
    color: #38BDF8 !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
}

[data-theme="dark"] .badge-protocol-primary,
[data-bs-theme="dark"] .badge-protocol-primary,
body.dark-theme .badge-protocol-primary,
body.theme-dark .badge-protocol-primary,
html.dark-theme .badge-protocol-primary {
    background-color: rgba(99, 102, 241, 0.2) !important;
    color: #818CF8 !important;
    border: 1px solid rgba(129, 140, 248, 0.45) !important;
}

[data-theme="dark"] .badge-system-default,
[data-bs-theme="dark"] .badge-system-default,
body.dark-theme .badge-system-default,
body.theme-dark .badge-system-default,
html.dark-theme .badge-system-default {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #94A3B8 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

[data-theme="dark"] .badge.bg-secondary-subtle,
[data-bs-theme="dark"] .badge.bg-secondary-subtle,
body.dark-theme .badge.bg-secondary-subtle,
body.theme-dark .badge.bg-secondary-subtle,
html.dark-theme .badge.bg-secondary-subtle {
    background-color: rgba(51, 65, 85, 0.7) !important;
    color: #CBD5E1 !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
}

[data-theme="dark"] .badge.bg-info-subtle,
[data-bs-theme="dark"] .badge.bg-info-subtle,
body.dark-theme .badge.bg-info-subtle,
body.theme-dark .badge.bg-info-subtle,
html.dark-theme .badge.bg-info-subtle {
    background-color: rgba(14, 165, 233, 0.2) !important;
    color: #38BDF8 !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
}

/* Global Table Inner Outline Elimination */
.table,
.modern-table,
.table-responsive,
.table-responsive-modern {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    outline: none !important;
}

.table tbody tr:last-child td,
.table tbody tr:last-child th,
.modern-table tbody tr:last-child td,
.modern-table tbody tr:last-child th {
    border-bottom: none !important;
    border-bottom-width: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Universal Button Glow & Shadow Removal Across Entire System */
.btn,
.btn-modern,
.btn-primary,
.btn-primary-modern,
.btn-secondary,
.btn-secondary-modern,
.btn-success,
.btn-success-modern,
.btn-danger,
.btn-danger-modern,
.btn-warning,
.btn-warning-modern,
.btn-info,
.btn-info-modern,
.btn-light,
.btn-dark,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-light,
.btn-outline-dark,
.smart-btn,
.smart-btn-primary,
.smart-btn-success,
.smart-btn-info,
.smart-btn-warning,
.smart-btn-danger,
.filter-btn,
.filter-pill,
.nav-icon-btn,
#theme-toggle {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
}

.btn:hover,
.btn:focus,
.btn:active,
.btn:focus-visible,
.btn-modern:hover,
.btn-modern:focus,
.btn-modern:active,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary-modern:hover,
.btn-primary-modern:focus,
.btn-primary-modern:active,
.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active,
.btn-info:hover,
.btn-info:focus,
.btn-info:active,
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-info:hover,
.btn-outline-info:focus,
.btn-outline-light:hover,
.btn-outline-light:focus,
.smart-btn:hover,
.smart-btn:focus,
.smart-btn:active,
.filter-btn:hover,
.filter-btn:focus,
.filter-btn.active,
.filter-pill:hover,
.filter-pill:focus,
.filter-pill.active,
.nav-icon-btn:hover,
.nav-icon-btn:focus,
#theme-toggle:hover,
#theme-toggle:focus {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
}

[data-theme="dark"] .btn,
[data-theme="dark"] .btn:hover,
[data-theme="dark"] .btn:focus,
[data-theme="dark"] .btn:active,
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-primary:focus,
[data-theme="dark"] .btn-primary:active,
[data-bs-theme="dark"] .btn,
[data-bs-theme="dark"] .btn:hover,
[data-bs-theme="dark"] .btn:focus,
[data-bs-theme="dark"] .btn:active,
[data-bs-theme="dark"] .btn-primary,
[data-bs-theme="dark"] .btn-primary:hover,
.theme-dark .btn,
.theme-dark .btn:hover,
.theme-dark .btn:focus,
.theme-dark .btn:active,
.theme-dark .btn-primary,
.theme-dark .btn-primary:hover,
body.dark-theme .btn,
body.dark-theme .btn:hover,
body.dark-theme .btn-primary,
body.dark-theme .btn-primary:hover {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
}





