:root {
    color-scheme: light;
    --app-bg: #f6f8fb;
    --app-surface: #ffffff;
    --app-surface-elevated: #ffffff;
    --app-surface-muted: #f8fafc;
    --app-surface-soft: #f3f6fa;
    --app-border: #dbe3ec;
    --app-border-strong: #c8d3df;
    --app-heading: #10243f;
    --app-text: #344767;
    --app-muted: #667085;
    --app-faint: #98a2b3;
    --app-icon-surface: #f8fafc;
    --app-table-head: #f8fafc;
    --app-table-row: #ffffff;
    --app-table-hover: #fcfdff;
    --app-input-bg: #ffffff;
    --app-input-disabled: #f8fafc;
    --app-dropdown-bg: #ffffff;
    --app-modal-bg: #ffffff;
    --app-toast-bg: rgba(255, 255, 255, 0.96);
    --app-focus-ring: rgba(var(--app-primary-rgb, 233, 30, 99), 0.16);
    --app-soft-card-radius: 1.15rem;
    --app-soft-card-border: color-mix(in srgb, var(--bs-primary) 12%, #e7edf4);
    --app-soft-card-divider: color-mix(in srgb, var(--bs-primary) 10%, #edf2f7);
    --app-soft-card-bg: linear-gradient(
        180deg,
        #ffffff 0%,
        color-mix(in srgb, var(--bs-primary) 3%, #ffffff) 100%
    );
    --app-soft-card-head-bg: linear-gradient(
        180deg,
        color-mix(in srgb, var(--bs-primary) 6%, #ffffff) 0%,
        rgba(255, 255, 255, 0.72) 100%
    );
    --app-soft-card-shadow: 0 18px 36px rgba(var(--app-primary-rgb), 0.08);
    --app-soft-card-shadow-hover: 0 22px 44px rgba(var(--app-primary-rgb), 0.12);
}

[data-bs-theme="dark"] {
    color-scheme: dark;
    --app-bg: #0d1420;
    --app-surface: #121a28;
    --app-surface-elevated: #172033;
    --app-surface-muted: #111827;
    --app-surface-soft: #1b2435;
    --app-border: rgba(148, 163, 184, 0.18);
    --app-border-strong: rgba(148, 163, 184, 0.28);
    --app-heading: #f8fafc;
    --app-text: #d7deea;
    --app-muted: #aab5c4;
    --app-faint: #7f8b9d;
    --app-icon-surface: rgba(255, 255, 255, 0.06);
    --app-table-head: #101827;
    --app-table-row: #141d2d;
    --app-table-hover: #182235;
    --app-input-bg: #121a28;
    --app-input-disabled: #0f1724;
    --app-dropdown-bg: #172033;
    --app-modal-bg: #172033;
    --app-toast-bg: rgba(17, 24, 39, 0.96);
    --app-focus-ring: rgba(var(--app-primary-rgb, 233, 30, 99), 0.24);
    --app-soft-card-border: #344054;
    --app-soft-card-divider: #2d3950;
    --app-soft-card-bg: linear-gradient(
        180deg,
        color-mix(in srgb, var(--bs-primary) 8%, #1b2333) 0%,
        #1b2333 100%
    );
    --app-soft-card-head-bg: linear-gradient(
        180deg,
        color-mix(in srgb, var(--bs-primary) 10%, #1f2637) 0%,
        rgba(27, 35, 51, 0.88) 100%
    );
    --app-soft-card-shadow: none;
    --app-soft-card-shadow-hover: none;
}

.bg-gradient-primary,
.btn.bg-gradient-primary,
.badge.bg-gradient-primary,
.nav-pills .nav-link.active,
.dropdown-item.active,
.dropdown-item:active {
    background-image: linear-gradient(
        195deg,
        color-mix(in srgb, var(--bs-primary) 76%, #ffffff) 0%,
        color-mix(in srgb, var(--bs-primary) 88%, #111827) 100%
    ) !important;
    background-color: var(--bs-primary) !important;
}

.btn-primary,
.page-item.active .page-link,
.form-check-input:checked,
.form-switch .form-check-input:checked {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.text-primary,
.text-gradient.text-primary,
a.text-primary,
.material-symbols-rounded.text-primary {
    color: var(--bs-primary) !important;
}

.border-primary,
.border-primary-subtle {
    border-color: var(--bs-primary) !important;
}

.link-primary,
a {
    --bs-link-color-rgb: var(--bs-primary-rgb);
    --bs-link-hover-color-rgb: var(--bs-primary-rgb);
}

.btn-outline-primary {
    --bs-btn-color: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: var(--bs-primary);
    --bs-btn-hover-border-color: var(--bs-primary);
    --bs-btn-active-bg: var(--bs-primary);
    --bs-btn-active-border-color: var(--bs-primary);
}

.alert-primary,
.badge.bg-primary,
.bg-primary {
    background-color: var(--bs-primary) !important;
}

.text-bg-primary {
    background-color: var(--bs-primary) !important;
    color: #ffffff !important;
}

.admin-layout .card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--app-soft-card-border);
    border-radius: var(--app-soft-card-radius);
    background: var(--app-soft-card-bg);
    box-shadow: var(--app-soft-card-shadow);
    transition:
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.22s ease;
}

.admin-layout .card:hover {
    border-color: color-mix(in srgb, var(--bs-primary) 18%, var(--app-soft-card-border));
    box-shadow: var(--app-soft-card-shadow-hover);
    transform: translateY(-1px);
}

.admin-layout .card > .card-header,
.admin-layout .card .card-header:first-child {
    border-bottom: 1px solid var(--app-soft-card-divider);
    background: var(--app-soft-card-head-bg);
    box-shadow: none;
}

.admin-layout .card .card-body {
    background: transparent;
}

.theme-toggle {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
}

.theme-toggle:focus-visible {
    outline: 0;
    box-shadow:
        0 0 0 0.2rem rgba(37, 99, 235, 0.18),
        0 16px 32px rgba(15, 23, 42, 0.18);
}

.theme-toggle .material-symbols-rounded {
    font-size: 1.25rem;
    line-height: 1;
}

.theme-toggle--nav {
    width: 2.5rem;
    height: 2.5rem;
}

.app-navbar {
    border: 1px solid rgba(148, 163, 184, 0.18);
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        color 0.2s ease;
}

.app-sidenav {
    border: 1px solid rgba(148, 163, 184, 0.16);
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        color 0.25s ease;
    --app-sidenav-section: rgba(15, 23, 42, 0.46);
    --app-sidenav-separator: rgba(148, 163, 184, 0.28);
    --app-sidenav-submenu-rail: rgba(148, 163, 184, 0.24);
    --app-sidenav-hover: rgba(15, 23, 42, 0.04);
    --app-sidenav-nested-hover: rgba(15, 23, 42, 0.03);
    --app-sidenav-icon-bg: rgba(148, 163, 184, 0.12);
    --app-sidenav-icon-border: rgba(148, 163, 184, 0.18);
}

.app-sidenav .sidenav-header {
    padding-bottom: 0.35rem;
}

.app-sidenav .navbar-brand {
    padding: 0.1rem 0.15rem 0.5rem !important;
}

.app-sidenav .sidebar-logo {
    width: 2.9rem;
    height: 2.9rem;
    padding: 0.45rem;
    border-radius: 1rem;
    background: color-mix(in srgb, var(--bs-primary) 10%, rgba(255, 255, 255, 0.76));
    border: 1px solid color-mix(in srgb, var(--bs-primary) 12%, rgba(148, 163, 184, 0.2));
    object-fit: contain;
}

.app-sidenav .sidebar-brand-name {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.app-sidenav .sidebar-brand-tagline {
    font-size: 0.78rem;
    opacity: 0.72;
}

#sidenav-collapse-main {
    height: calc(100vh - 11.75rem);
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 7.5rem;
}

#sidenav-collapse-main::-webkit-scrollbar {
    width: 6px;
}

#sidenav-collapse-main::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--bs-primary) 18%, rgba(148, 163, 184, 0.42));
}

.app-sidenav__nav {
    gap: 0.2rem;
}

.app-sidenav__section {
    padding: 0.6rem 1rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--app-sidenav-section);
}

.app-sidenav__separator {
    margin: 0.75rem 1rem 0.35rem;
    border-top: 1px solid var(--app-sidenav-separator);
    list-style: none;
}

.app-sidenav .navbar-nav .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 2.85rem;
    border-radius: 0.95rem;
    margin: 0.12rem 0.7rem;
}

.app-sidenav__main {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    flex: 1 1 auto;
}

.app-sidenav .navbar-nav .nav-link > i:first-child,
.app-sidenav__main > i:first-child {
    width: 2rem;
    height: 2rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--app-sidenav-icon-bg);
    border: 1px solid var(--app-sidenav-icon-border);
}

.app-sidenav__caret {
    margin-left: auto;
    font-size: 1.15rem;
    opacity: 0.72;
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.app-sidenav .nav-link[aria-expanded="true"] .app-sidenav__caret {
    transform: rotate(180deg);
    opacity: 1;
}

.auth-card-header .mphb__title,
.auth-card-header .mphb__subtitle {
    color: #ffffff;
    text-align: center;
}

.auth-card-header .mphb__left {
    width: 100%;
}

.auth-card-header .mphb__subtitle {
    opacity: 0.82;
}

.fixed-plugin-card-header .mphb__title {
    color: #1f2a3d;
}

.fixed-plugin-card-header .mphb__subtitle {
    color: #667085;
}

.fixed-plugin-card-header .mphb__badge {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
    color: #344767;
}

.fixed-plugin-card-header .mphb__right {
    align-items: center;
}

.fixed-plugin {
    position: relative;
    z-index: 1050;
}

.fixed-plugin .fixed-plugin-button {
    z-index: 1055;
    transition:
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.28s ease;
}

.fixed-plugin.show .fixed-plugin-button {
    transform: translateY(-2px) rotate(90deg);
}

.fixed-plugin-backdrop {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 80% 18%, rgba(var(--app-primary-rgb), 0.16), transparent 28%),
        rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.28s ease,
        visibility 0.28s ease;
    z-index: 1050;
}

.fixed-plugin.show .fixed-plugin-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.fixed-plugin .card.tbl-panel {
    position: fixed !important;
    top: 1rem !important;
    right: 1rem !important;
    left: auto !important;
    width: min(23.5rem, calc(100vw - 1.5rem)) !important;
    height: calc(100vh - 2rem) !important;
    max-height: calc(100vh - 2rem) !important;
    padding: 0 !important;
    border-radius: 1.4rem !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(calc(100% + 1.25rem), 0, 0) scale(0.98) !important;
    transform-origin: right center;
    transition:
        transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.24s ease,
        visibility 0.24s ease !important;
    z-index: 1060;
}

.fixed-plugin .card.tbl-panel:hover {
    transform: translate3d(calc(100% + 1.25rem), 0, 0) scale(0.98) !important;
}

.fixed-plugin.show .card.tbl-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1) !important;
}

.fixed-plugin.show .card.tbl-panel:hover {
    transform: translate3d(0, 0, 0) scale(1) !important;
}

.fixed-plugin .tbl-panel__head {
    padding: 1.1rem 1.2rem 0.55rem !important;
}

.fixed-plugin .tbl-panel__body {
    padding: 0 1.2rem 1.2rem !important;
    overflow-y: auto;
}

.fixed-plugin__content {
    display: grid;
    gap: 1rem;
}

.fixed-plugin-section {
    padding: 1rem;
    border: 1px solid var(--app-soft-card-divider);
    border-radius: 1rem;
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--bs-primary) 4%, rgba(255, 255, 255, 0.98)) 0%,
            rgba(255, 255, 255, 0.88) 100%
        );
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.fixed-plugin-section__head {
    margin-bottom: 0.9rem;
}

.fixed-plugin-section__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2a3d;
}

.fixed-plugin-section__subtitle {
    margin: 0.3rem 0 0;
    color: #667085;
    font-size: 0.84rem;
    line-height: 1.55;
}

.fixed-plugin-mode-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.fixed-plugin-mode-btn {
    justify-content: center;
}

.fixed-plugin-mode-btn.is-active {
    border-color: color-mix(in srgb, var(--bs-primary) 44%, rgba(var(--app-primary-rgb), 0.22));
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--bs-primary) 14%, rgba(255, 255, 255, 0.98)) 0%,
        color-mix(in srgb, var(--bs-primary) 24%, rgba(255, 255, 255, 0.94)) 100%
    );
    box-shadow: 0 16px 30px rgba(var(--app-primary-rgb), 0.16);
}

.fixed-plugin-mode-btn.is-active .mui-btn__content {
    color: var(--bs-primary);
}

.fixed-plugin-swatches {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.fixed-plugin-swatch {
    width: 100%;
    min-width: 0;
    padding: 0 !important;
    border-radius: 0.95rem !important;
    text-align: left;
}

.fixed-plugin-swatch,
.fixed-plugin-swatch:hover,
.fixed-plugin-swatch:focus-visible {
    text-decoration: none;
}

.fixed-plugin-swatch .mui-btn__content {
    width: 100%;
    justify-content: flex-start;
    gap: 0.7rem;
    padding: 0.78rem 0.9rem;
    white-space: nowrap;
    overflow: hidden;
}

.fixed-plugin-swatch .mui-btn__content > span,
.fixed-plugin-swatch .mui-btn__content > i {
    position: relative;
    z-index: 1;
}

.fixed-plugin-swatch .mui-btn__layer {
    opacity: 1;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--app-soft-card-divider);
    box-shadow: none;
}

.fixed-plugin-swatch:hover .mui-btn__layer {
    background: rgba(255, 255, 255, 0.9);
    border-color: color-mix(in srgb, var(--bs-primary) 24%, var(--app-soft-card-divider));
    box-shadow: 0 14px 28px rgba(var(--app-primary-rgb), 0.12);
}

.fixed-plugin-swatch:focus-visible .mui-btn__layer {
    border-color: color-mix(in srgb, var(--bs-primary) 45%, var(--app-soft-card-divider));
    box-shadow:
        0 0 0 0.2rem rgba(var(--app-primary-rgb), 0.16),
        0 14px 28px rgba(var(--app-primary-rgb), 0.12);
}

.fixed-plugin-swatch__dot {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: var(--fixed-plugin-swatch-color);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.66),
        0 0 0 1px color-mix(in srgb, var(--fixed-plugin-swatch-color) 48%, rgba(15, 23, 42, 0.1));
}

.fixed-plugin-swatch__label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.9rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fixed-plugin-swatch__check {
    flex: 0 0 auto;
    opacity: 0;
    transform: scale(0.82);
    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

.fixed-plugin-swatch.is-active {
    transform: none;
}

.fixed-plugin-swatch.is-active .mui-btn__layer {
    border-color: color-mix(in srgb, var(--bs-primary) 44%, var(--app-soft-card-divider));
    background: color-mix(in srgb, var(--bs-primary) 12%, rgba(255, 255, 255, 0.94));
    box-shadow: 0 16px 30px rgba(var(--app-primary-rgb), 0.16);
}

.fixed-plugin-swatch.is-active .fixed-plugin-swatch__label,
.fixed-plugin-swatch.is-active .fixed-plugin-swatch__check {
    color: var(--bs-primary);
}

.fixed-plugin-swatch.is-active .fixed-plugin-swatch__check {
    opacity: 1;
    transform: scale(1);
}

.app-navbar .mui-field {
    margin-bottom: 0;
}

.app-sidenav .sidenav-footer form {
    margin: 0;
}

[data-bs-theme="dark"] .fixed-plugin-card-header .mphb__title {
    color: #f8fafc;
}

[data-bs-theme="dark"] .fixed-plugin-card-header .mphb__subtitle {
    color: #b8c3d1;
}

[data-bs-theme="dark"] .fixed-plugin-card-header .mphb__badge {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
}

[data-bs-theme="dark"] .fixed-plugin-backdrop {
    background:
        radial-gradient(circle at 82% 18%, rgba(var(--app-primary-rgb), 0.2), transparent 28%),
        rgba(2, 6, 23, 0.44);
}

[data-bs-theme="dark"] .fixed-plugin-section {
    border-color: rgba(148, 163, 184, 0.18);
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--bs-primary) 8%, rgba(27, 35, 51, 0.96)) 0%,
            rgba(27, 35, 51, 0.92) 100%
        );
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-bs-theme="dark"] .fixed-plugin-section__title {
    color: #f8fafc;
}

[data-bs-theme="dark"] .fixed-plugin-section__subtitle {
    color: #b8c3d1;
}

[data-bs-theme="dark"] .fixed-plugin-mode-btn.is-active {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--bs-primary) 18%, rgba(27, 35, 51, 0.96)) 0%,
        color-mix(in srgb, var(--bs-primary) 26%, rgba(27, 35, 51, 0.94)) 100%
    );
}

[data-bs-theme="dark"] .fixed-plugin-swatch {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .fixed-plugin-swatch .mui-btn__layer {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.46);
}

[data-bs-theme="dark"] .fixed-plugin-swatch:hover .mui-btn__layer {
    background: rgba(15, 23, 42, 0.62);
}

[data-bs-theme="dark"] .fixed-plugin-swatch.is-active .mui-btn__layer {
    background: color-mix(in srgb, var(--bs-primary) 18%, rgba(15, 23, 42, 0.74));
}

.app-sidenav .navbar-nav > .nav-item > .nav-link:hover {
    background: var(--app-sidenav-hover);
}

.app-sidenav__submenu {
    position: relative;
    margin: 0.32rem 0 0;
    padding: 0.2rem 0 0 0.78rem;
}

.app-sidenav__submenu::before {
    content: "";
    position: absolute;
    top: 0.2rem;
    bottom: 0.15rem;
    left: 1rem;
    width: 1px;
    background: var(--app-sidenav-submenu-rail);
}

.app-sidenav__submenu .nav-link {
    min-height: 2.55rem;
    margin: 0 0 0 0.65rem;
    padding: 0.38rem 0.58rem 0.38rem 0.46rem;
    gap: 0.42rem;
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.2);
}

.app-sidenav__submenu .nav-link:hover {
    background: var(--app-sidenav-nested-hover);
}

.app-sidenav__submenu .nav-link .nav-link-text {
    font-size: 0.82rem;
    font-weight: 500;
}

.app-sidenav__submenu .nav-link > i:first-child {
    flex: 0 0 1.78rem;
    width: 1.78rem;
    height: 1.78rem;
    border-radius: 0.72rem;
    font-size: 1rem;
}

.app-sidenav__submenu .nav-link .nav-link-text.ms-1 {
    margin-left: 0 !important;
}

.app-sidenav .navbar-nav .collapse.show,
.app-sidenav .navbar-nav .collapsing {
    margin-top: 0.15rem;
}

.app-sidenav__footer {
    flex: 0 0 auto;
    padding: 0.9rem 0 1rem;
    margin-top: auto;
    border-top: 1px solid var(--app-sidenav-separator);
    background: var(--app-sidenav-footer-bg);
}

.app-sidenav__empty {
    margin: 0 0.75rem;
    padding: 1.4rem 1rem;
    border: 1px dashed color-mix(in srgb, var(--bs-primary) 16%, rgba(148, 163, 184, 0.34));
    border-radius: 1.2rem;
    text-align: center;
    color: var(--app-sidenav-section);
    background: rgba(255, 255, 255, 0.28);
}

.app-sidenav__empty-icon {
    width: 2.6rem;
    height: 2.6rem;
    margin: 0 auto 0.7rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--bs-primary) 10%, rgba(255, 255, 255, 0.52));
    color: var(--bs-primary);
}

.app-sidenav__empty strong {
    display: block;
    margin-bottom: 0.22rem;
    color: inherit;
}

.app-sidenav__empty span {
    display: block;
    font-size: 0.82rem;
    line-height: 1.45;
}

.app-sidenav [data-sidebar-item].is-hidden,
.app-sidenav [data-sidebar-group].is-hidden {
    display: none !important;
}

.app-sidenav .nav-link,
.app-sidenav .nav-link i,
.app-sidenav .nav-link .nav-link-text,
.app-sidenav .nav-link .material-symbols-rounded,
.app-sidenav .sidebar-brand-name,
.app-sidenav .sidebar-brand-tagline,
.app-sidenav .btn,
.app-sidenav .sidebar-close-icon,
.app-sidenav .sidebar-logo {
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease,
        opacity 0.2s ease;
}

.sidenav.app-sidenav.theme-sidebar-light {
    background: #ffffff !important;
    box-shadow: 0 24px 50px rgba(148, 163, 184, 0.18);
}

.sidenav.app-sidenav.theme-sidebar-light {
    --app-sidenav-section: rgba(15, 23, 42, 0.46);
    --app-sidenav-separator: rgba(148, 163, 184, 0.28);
    --app-sidenav-submenu-rail: rgba(148, 163, 184, 0.24);
    --app-sidenav-hover: rgba(15, 23, 42, 0.04);
    --app-sidenav-nested-hover: rgba(15, 23, 42, 0.03);
    --app-sidenav-icon-bg: rgba(148, 163, 184, 0.12);
    --app-sidenav-icon-border: rgba(148, 163, 184, 0.18);
    --app-sidenav-panel-bg: linear-gradient(
        180deg,
        color-mix(in srgb, var(--bs-primary) 5%, rgba(255, 255, 255, 0.98)) 0%,
        rgba(255, 255, 255, 0.86) 100%
    );
    --app-sidenav-panel-border: color-mix(in srgb, var(--bs-primary) 10%, rgba(148, 163, 184, 0.22));
    --app-sidenav-chip-bg: color-mix(in srgb, var(--bs-primary) 12%, rgba(255, 255, 255, 0.82));
    --app-sidenav-chip-color: color-mix(in srgb, var(--bs-primary) 78%, #334155);
    --app-sidenav-search-bg: rgba(255, 255, 255, 0.8);
    --app-sidenav-footer-bg: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.94) 22%,
        rgba(255, 255, 255, 0.98) 100%
    );
}

.sidenav.app-sidenav.theme-sidebar-light .sidebar-brand-name,
.sidenav.app-sidenav.theme-sidebar-light .sidebar-brand-tagline,
.sidenav.app-sidenav.theme-sidebar-light .navbar-nav .nav-link,
.sidenav.app-sidenav.theme-sidebar-light .navbar-nav .nav-link .nav-link-text,
.sidenav.app-sidenav.theme-sidebar-light .navbar-nav .nav-link i,
.sidenav.app-sidenav.theme-sidebar-light
    .navbar-nav
    .nav-link
    .material-symbols-rounded,
.sidenav.app-sidenav.theme-sidebar-light .btn,
.sidenav.app-sidenav.theme-sidebar-light .sidebar-close-icon {
    color: #0f172a !important;
}

.sidenav.app-sidenav.theme-sidebar-light .navbar-nav .nav-link.active {
    border-color: color-mix(in srgb, var(--bs-primary) 24%, rgba(148, 163, 184, 0.24));
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--bs-primary) 16%, rgba(255, 255, 255, 0.96)) 0%,
        color-mix(in srgb, var(--bs-primary) 8%, rgba(255, 255, 255, 0.84)) 100%
    ) !important;
    color: #0f172a !important;
    box-shadow: 0 14px 26px rgba(var(--app-primary-rgb), 0.08) !important;
}

.sidenav.app-sidenav.theme-sidebar-light .btn.btn-outline-dark {
    border-color: rgba(15, 23, 42, 0.16);
    background: #f8fafc;
}

.sidenav.app-sidenav.theme-sidebar-light hr.horizontal {
    background-image: linear-gradient(
        90deg,
        transparent,
        rgba(15, 23, 42, 0.18),
        transparent
    );
}

.dark-version .sidenav.app-sidenav.theme-sidebar-dark {
    background: linear-gradient(180deg, #121b3b 0%, #060b1a 100%) !important;
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 30px 60px rgba(2, 6, 23, 0.38);
}

.dark-version .sidenav.app-sidenav.theme-sidebar-dark {
    --app-sidenav-section: rgba(226, 232, 240, 0.56);
    --app-sidenav-separator: rgba(226, 232, 240, 0.12);
    --app-sidenav-submenu-rail: rgba(226, 232, 240, 0.14);
    --app-sidenav-hover: rgba(255, 255, 255, 0.05);
    --app-sidenav-nested-hover: rgba(255, 255, 255, 0.04);
    --app-sidenav-icon-bg: rgba(255, 255, 255, 0.08);
    --app-sidenav-icon-border: rgba(255, 255, 255, 0.12);
    --app-sidenav-panel-bg: linear-gradient(
        180deg,
        color-mix(in srgb, var(--bs-primary) 10%, rgba(17, 24, 39, 0.98)) 0%,
        rgba(11, 18, 32, 0.92) 100%
    );
    --app-sidenav-panel-border: rgba(148, 163, 184, 0.16);
    --app-sidenav-chip-bg: rgba(255, 255, 255, 0.08);
    --app-sidenav-chip-color: #e2e8f0;
    --app-sidenav-search-bg: rgba(15, 23, 42, 0.54);
    --app-sidenav-footer-bg: linear-gradient(
        180deg,
        rgba(6, 11, 26, 0) 0%,
        rgba(6, 11, 26, 0.9) 20%,
        rgba(6, 11, 26, 0.98) 100%
    );
}

.dark-version .sidenav.app-sidenav.theme-sidebar-dark .sidebar-brand-name,
.dark-version .sidenav.app-sidenav.theme-sidebar-dark .sidebar-brand-tagline,
.dark-version .sidenav.app-sidenav.theme-sidebar-dark .navbar-nav .nav-link,
.dark-version
    .sidenav.app-sidenav.theme-sidebar-dark
    .navbar-nav
    .nav-link
    .nav-link-text,
.dark-version .sidenav.app-sidenav.theme-sidebar-dark .navbar-nav .nav-link i,
.dark-version
    .sidenav.app-sidenav.theme-sidebar-dark
    .navbar-nav
    .nav-link
    .material-symbols-rounded,
.dark-version .sidenav.app-sidenav.theme-sidebar-dark .btn,
.dark-version .sidenav.app-sidenav.theme-sidebar-dark .sidebar-close-icon {
    color: #e2e8f0 !important;
}

.dark-version
    .sidenav.app-sidenav.theme-sidebar-dark
    .navbar-nav
    .nav-link.active,
.dark-version
    .sidenav.app-sidenav.theme-sidebar-dark
    .navbar-nav
    .nav-link.active
    .nav-link-text,
.dark-version
    .sidenav.app-sidenav.theme-sidebar-dark
    .navbar-nav
    .nav-link.active
    i,
.dark-version
    .sidenav.app-sidenav.theme-sidebar-dark
    .navbar-nav
    .nav-link.active
    .material-symbols-rounded {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--bs-primary) 20%, rgba(15, 23, 42, 0.96)) 0%,
        rgba(255, 255, 255, 0.08) 100%
    ) !important;
    color: #ffffff !important;
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 18px 30px rgba(2, 6, 23, 0.26) !important;
}

.dark-version .sidenav.app-sidenav.theme-sidebar-dark .btn.btn-outline-dark {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.45);
    color: #f8fafc !important;
}

.dark-version .sidenav.app-sidenav.theme-sidebar-dark .btn.bg-gradient-dark {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
}

.dark-version .sidenav.app-sidenav.theme-sidebar-dark hr.horizontal {
    background-image: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
}

.sidenav.app-sidenav.theme-sidebar-transparent {
    background: rgba(255, 255, 255, 0.62) !important;
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 24px 50px rgba(148, 163, 184, 0.16);
    backdrop-filter: blur(16px);
}

.sidenav.app-sidenav.theme-sidebar-transparent {
    --app-sidenav-section: rgba(15, 23, 42, 0.46);
    --app-sidenav-separator: rgba(148, 163, 184, 0.28);
    --app-sidenav-submenu-rail: rgba(148, 163, 184, 0.24);
    --app-sidenav-hover: rgba(15, 23, 42, 0.04);
    --app-sidenav-nested-hover: rgba(15, 23, 42, 0.03);
    --app-sidenav-icon-bg: rgba(148, 163, 184, 0.12);
    --app-sidenav-icon-border: rgba(148, 163, 184, 0.18);
    --app-sidenav-panel-bg: linear-gradient(
        180deg,
        color-mix(in srgb, var(--bs-primary) 5%, rgba(255, 255, 255, 0.92)) 0%,
        rgba(255, 255, 255, 0.74) 100%
    );
    --app-sidenav-panel-border: color-mix(in srgb, var(--bs-primary) 10%, rgba(148, 163, 184, 0.2));
    --app-sidenav-chip-bg: color-mix(in srgb, var(--bs-primary) 12%, rgba(255, 255, 255, 0.74));
    --app-sidenav-chip-color: color-mix(in srgb, var(--bs-primary) 78%, #334155);
    --app-sidenav-search-bg: rgba(255, 255, 255, 0.66);
    --app-sidenav-footer-bg: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.78) 22%,
        rgba(255, 255, 255, 0.9) 100%
    );
}

html[data-bs-theme="light"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .sidebar-brand-name,
html[data-bs-theme="light"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .sidebar-brand-tagline,
html[data-bs-theme="light"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .navbar-nav
    .nav-link,
html[data-bs-theme="light"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .navbar-nav
    .nav-link
    .nav-link-text,
html[data-bs-theme="light"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .navbar-nav
    .nav-link
    i,
html[data-bs-theme="light"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .navbar-nav
    .nav-link
    .material-symbols-rounded,
html[data-bs-theme="light"] .sidenav.app-sidenav.theme-sidebar-transparent .btn,
html[data-bs-theme="light"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .sidebar-close-icon {
    color: #0f172a !important;
}

html[data-bs-theme="light"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .navbar-nav
    .nav-link.active {
    border-color: color-mix(in srgb, var(--bs-primary) 22%, rgba(148, 163, 184, 0.24));
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--bs-primary) 16%, rgba(255, 255, 255, 0.94)) 0%,
        rgba(255, 255, 255, 0.82) 100%
    ) !important;
    color: #0f172a !important;
    box-shadow: 0 14px 26px rgba(var(--app-primary-rgb), 0.08) !important;
}

html[data-bs-theme="light"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .btn.btn-outline-dark {
    border-color: rgba(15, 23, 42, 0.16);
    background: rgba(255, 255, 255, 0.72);
}

html[data-bs-theme="light"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    hr.horizontal {
    background-image: linear-gradient(
        90deg,
        transparent,
        rgba(15, 23, 42, 0.16),
        transparent
    );
}

html[data-bs-theme="dark"] .sidenav.app-sidenav.theme-sidebar-transparent {
    background: rgba(15, 23, 42, 0.48) !important;
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 30px 60px rgba(2, 6, 23, 0.24);
}

html[data-bs-theme="dark"] .sidenav.app-sidenav.theme-sidebar-transparent {
    --app-sidenav-section: rgba(226, 232, 240, 0.56);
    --app-sidenav-separator: rgba(226, 232, 240, 0.14);
    --app-sidenav-submenu-rail: rgba(226, 232, 240, 0.15);
    --app-sidenav-hover: rgba(255, 255, 255, 0.05);
    --app-sidenav-nested-hover: rgba(255, 255, 255, 0.04);
    --app-sidenav-icon-bg: rgba(255, 255, 255, 0.08);
    --app-sidenav-icon-border: rgba(255, 255, 255, 0.12);
    --app-sidenav-panel-bg: linear-gradient(
        180deg,
        color-mix(in srgb, var(--bs-primary) 10%, rgba(15, 23, 42, 0.84)) 0%,
        rgba(15, 23, 42, 0.72) 100%
    );
    --app-sidenav-panel-border: rgba(148, 163, 184, 0.18);
    --app-sidenav-chip-bg: rgba(255, 255, 255, 0.08);
    --app-sidenav-chip-color: #e2e8f0;
    --app-sidenav-search-bg: rgba(15, 23, 42, 0.44);
    --app-sidenav-footer-bg: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0) 0%,
        rgba(15, 23, 42, 0.72) 20%,
        rgba(15, 23, 42, 0.9) 100%
    );
}

html[data-bs-theme="dark"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .sidebar-brand-name,
html[data-bs-theme="dark"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .sidebar-brand-tagline,
html[data-bs-theme="dark"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .navbar-nav
    .nav-link,
html[data-bs-theme="dark"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .navbar-nav
    .nav-link
    .nav-link-text,
html[data-bs-theme="dark"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .navbar-nav
    .nav-link
    i,
html[data-bs-theme="dark"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .navbar-nav
    .nav-link
    .material-symbols-rounded,
html[data-bs-theme="dark"] .sidenav.app-sidenav.theme-sidebar-transparent .btn,
html[data-bs-theme="dark"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .sidebar-close-icon {
    color: #e2e8f0 !important;
}

html[data-bs-theme="dark"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .navbar-nav
    .nav-link.active,
html[data-bs-theme="dark"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .navbar-nav
    .nav-link.active
    .nav-link-text,
html[data-bs-theme="dark"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .navbar-nav
    .nav-link.active
    i,
html[data-bs-theme="dark"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .navbar-nav
    .nav-link.active
    .material-symbols-rounded {
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--bs-primary) 18%, rgba(15, 23, 42, 0.82)) 0%,
        rgba(255, 255, 255, 0.08) 100%
    ) !important;
    color: #ffffff !important;
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 30px rgba(2, 6, 23, 0.22) !important;
}

html[data-bs-theme="dark"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .btn.btn-outline-dark {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.3);
    color: #f8fafc !important;
}

html[data-bs-theme="dark"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    .btn.bg-gradient-dark {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"]
    .sidenav.app-sidenav.theme-sidebar-transparent
    hr.horizontal {
    background-image: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.16),
        transparent
    );
}

.dark-version .app-sidenav .navbar-nav > .nav-item > .nav-link:hover,
html[data-bs-theme="dark"]
    .app-sidenav
    .navbar-nav
    > .nav-item
    > .nav-link:hover {
    background: var(--app-sidenav-hover);
}

.dark-version .app-sidenav__submenu .nav-link:hover,
html[data-bs-theme="dark"] .app-sidenav__submenu .nav-link:hover {
    background: var(--app-sidenav-nested-hover);
}

html[data-bs-theme="light"] .app-navbar {
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 45px rgba(148, 163, 184, 0.12);
}

html[data-bs-theme="light"] .app-navbar .nav-link,
html[data-bs-theme="light"] .app-navbar .breadcrumb-item,
html[data-bs-theme="light"] .app-navbar .breadcrumb-item a,
html[data-bs-theme="light"] .app-navbar .material-symbols-rounded {
    color: #0f172a !important;
}

html[data-bs-theme="light"] .app-navbar .sidenav-toggler-line {
    background-color: #0f172a !important;
}

html[data-bs-theme="dark"] .theme-toggle {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.35);
}

html[data-bs-theme="dark"] .app-navbar {
    background: rgba(15, 23, 42, 0.82);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.32);
}

html[data-bs-theme="dark"] .app-navbar .nav-link,
html[data-bs-theme="dark"] .app-navbar .breadcrumb-item,
html[data-bs-theme="dark"] .app-navbar .breadcrumb-item a,
html[data-bs-theme="dark"] .app-navbar .material-symbols-rounded {
    color: #e2e8f0 !important;
}

html[data-bs-theme="dark"] .app-navbar .sidenav-toggler-line {
    background-color: #e2e8f0 !important;
}

@media (max-width: 991.98px) {
    .app-sidenav {
        height: calc(100vh - 0.5rem);
    }

    .app-sidenav__header {
        padding: 0.85rem 0.85rem 0.75rem;
    }

    .app-sidenav__workspace {
        padding: 0.85rem 0.9rem;
    }

    .app-sidenav__group {
        margin: 0 0.6rem;
        padding: 0.78rem 0.72rem 0.72rem;
    }

    .app-sidenav__scroll {
        padding-bottom: 0.85rem;
    }

    .theme-toggle--nav {
        width: 2.25rem;
        height: 2.25rem;
    }

    .fixed-plugin .card.tbl-panel {
        top: auto !important;
        bottom: 0.75rem !important;
        right: 0.75rem !important;
        width: calc(100vw - 1.5rem) !important;
        height: min(42rem, calc(100vh - 1.5rem)) !important;
        max-height: calc(100vh - 1.5rem) !important;
        transform: translate3d(0, calc(100% + 1rem), 0) scale(0.98) !important;
        transform-origin: center bottom;
    }

    .fixed-plugin .card.tbl-panel:hover {
        transform: translate3d(0, calc(100% + 1rem), 0) scale(0.98) !important;
    }

    .fixed-plugin.show .card.tbl-panel,
    .fixed-plugin.show .card.tbl-panel:hover {
        transform: translate3d(0, 0, 0) scale(1) !important;
    }

    .fixed-plugin-swatches {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Quiet ERP dark-mode repair layer
   Canonical selector: html[data-bs-theme="dark"]
========================================= */

html[data-bs-theme="dark"],
html[data-bs-theme="dark"] body {
    background: var(--app-bg) !important;
    color: var(--app-text);
}

html[data-bs-theme="dark"] body.admin-layout,
html[data-bs-theme="dark"] body.auth-layout,
html[data-bs-theme="dark"] body.pos-layout,
html[data-bs-theme="dark"] .main-content {
    background-color: var(--app-bg) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 20rem),
        var(--app-bg) !important;
    color: var(--app-text);
}

html[data-bs-theme="dark"] h1,
html[data-bs-theme="dark"] h2,
html[data-bs-theme="dark"] h3,
html[data-bs-theme="dark"] h4,
html[data-bs-theme="dark"] h5,
html[data-bs-theme="dark"] h6,
html[data-bs-theme="dark"] .h1,
html[data-bs-theme="dark"] .h2,
html[data-bs-theme="dark"] .h3,
html[data-bs-theme="dark"] .h4,
html[data-bs-theme="dark"] .h5,
html[data-bs-theme="dark"] .h6,
html[data-bs-theme="dark"] .text-dark {
    color: var(--app-heading) !important;
}

html[data-bs-theme="dark"] p,
html[data-bs-theme="dark"] .text-body,
html[data-bs-theme="dark"] .text-secondary,
html[data-bs-theme="dark"] .small,
html[data-bs-theme="dark"] small {
    color: var(--app-muted) !important;
}

html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .tbl-panel,
html[data-bs-theme="dark"] .dropdown-menu,
html[data-bs-theme="dark"] .modal-content,
html[data-bs-theme="dark"] .swal2-popup,
html[data-bs-theme="dark"] .fixed-plugin .card,
html[data-bs-theme="dark"] .app-user-menu__dropdown,
html[data-bs-theme="dark"] .app-notification-menu,
html[data-bs-theme="dark"] .list-group-item,
html[data-bs-theme="dark"] .accordion-item,
html[data-bs-theme="dark"] .offcanvas {
    background: var(--app-surface-elevated) !important;
    border-color: var(--app-border) !important;
    color: var(--app-text) !important;
    box-shadow: none !important;
}

html[data-bs-theme="dark"] .card > .card-header,
html[data-bs-theme="dark"] .card .card-header:first-child,
html[data-bs-theme="dark"] .modal-header,
html[data-bs-theme="dark"] .modal-footer,
html[data-bs-theme="dark"] .dropdown-header,
html[data-bs-theme="dark"] .accordion-button,
html[data-bs-theme="dark"] .app-user-menu__header {
    background: var(--app-surface-muted) !important;
    border-color: var(--app-border) !important;
    color: var(--app-heading) !important;
}

html[data-bs-theme="dark"] .bg-white,
html[data-bs-theme="dark"] .bg-gray-100,
html[data-bs-theme="dark"] .bg-gray-200,
html[data-bs-theme="dark"] .nav.bg-white,
html[data-bs-theme="dark"] .table-responsive,
html[data-bs-theme="dark"] .empty-state,
html[data-bs-theme="dark"] .well,
html[data-bs-theme="dark"] .alert-light {
    background-color: var(--app-surface) !important;
    color: var(--app-text) !important;
    border-color: var(--app-border) !important;
}

html[data-bs-theme="dark"] .dropdown-item,
html[data-bs-theme="dark"] .dropdown-item i,
html[data-bs-theme="dark"] .dropdown-item .material-symbols-rounded,
html[data-bs-theme="dark"] .list-group-item,
html[data-bs-theme="dark"] .breadcrumb-item,
html[data-bs-theme="dark"] .breadcrumb-item a {
    color: var(--app-text) !important;
}

html[data-bs-theme="dark"] .dropdown-item:hover,
html[data-bs-theme="dark"] .dropdown-item:focus,
html[data-bs-theme="dark"] .list-group-item-action:hover,
html[data-bs-theme="dark"] .accordion-button:hover {
    background: var(--app-table-hover) !important;
    color: var(--app-heading) !important;
}

html[data-bs-theme="dark"] .badge:not(.bg-gradient-primary):not(.bg-gradient-danger):not(.bg-gradient-success):not(.bg-gradient-warning),
html[data-bs-theme="dark"] .badge.bg-light,
html[data-bs-theme="dark"] .badge.bg-white {
    background: var(--app-icon-surface) !important;
    border: 1px solid var(--app-border);
    color: var(--app-text) !important;
}

html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select,
html[data-bs-theme="dark"] .input-group.input-group-outline .form-control,
html[data-bs-theme="dark"] .input-group.input-group-dynamic .form-control,
html[data-bs-theme="dark"] .input-group.input-group-static .form-control,
html[data-bs-theme="dark"] textarea,
html[data-bs-theme="dark"] select {
    background-color: var(--app-input-bg) !important;
    border-color: var(--app-border) !important;
    color: var(--app-text) !important;
    box-shadow: none !important;
}

html[data-bs-theme="dark"] .form-control::placeholder,
html[data-bs-theme="dark"] textarea::placeholder {
    color: var(--app-faint) !important;
}

html[data-bs-theme="dark"] .form-control:focus,
html[data-bs-theme="dark"] .form-select:focus,
html[data-bs-theme="dark"] textarea:focus,
html[data-bs-theme="dark"] select:focus {
    border-color: color-mix(in srgb, var(--bs-primary) 54%, var(--app-border)) !important;
    box-shadow: 0 0 0 0.2rem var(--app-focus-ring) !important;
}

html[data-bs-theme="dark"] .form-control:disabled,
html[data-bs-theme="dark"] .form-control[readonly],
html[data-bs-theme="dark"] .form-select:disabled,
html[data-bs-theme="dark"] textarea:disabled,
html[data-bs-theme="dark"] select:disabled {
    background-color: var(--app-input-disabled) !important;
    color: var(--app-faint) !important;
}

html[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
html[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple,
html[data-bs-theme="dark"] .select2-dropdown,
html[data-bs-theme="dark"] .select2-search--dropdown,
html[data-bs-theme="dark"] .select2-search--dropdown .select2-search__field {
    background: var(--app-input-bg) !important;
    border-color: var(--app-border) !important;
    color: var(--app-text) !important;
    box-shadow: none !important;
}

html[data-bs-theme="dark"] .select2-container--default .select2-selection__rendered,
html[data-bs-theme="dark"] .select2-container--default .select2-selection__placeholder,
html[data-bs-theme="dark"] .select2-results__option {
    color: var(--app-text) !important;
}

html[data-bs-theme="dark"] .select2-results__option--highlighted,
html[data-bs-theme="dark"] .select2-results__option--selected {
    background: var(--app-table-hover) !important;
    color: var(--app-heading) !important;
}

html[data-bs-theme="dark"] .table,
html[data-bs-theme="dark"] .table > :not(caption) > * > *,
html[data-bs-theme="dark"] .table tbody td,
html[data-bs-theme="dark"] .table thead th {
    background-color: transparent;
    border-color: var(--app-border) !important;
    color: var(--app-text);
}

html[data-bs-theme="dark"] hr,
html[data-bs-theme="dark"] .dropdown-divider,
html[data-bs-theme="dark"] .border,
html[data-bs-theme="dark"] .border-top,
html[data-bs-theme="dark"] .border-bottom,
html[data-bs-theme="dark"] .border-start,
html[data-bs-theme="dark"] .border-end {
    border-color: var(--app-border) !important;
}

html[data-bs-theme="dark"] .page-link {
    background: var(--app-surface) !important;
    border-color: var(--app-border) !important;
    color: var(--app-text) !important;
}

html[data-bs-theme="dark"] .page-link:hover,
html[data-bs-theme="dark"] .page-link:focus {
    background: var(--app-table-hover) !important;
    color: var(--app-heading) !important;
}

html[data-bs-theme="dark"] .page-item.active .page-link,
html[data-bs-theme="dark"] .page-link.active {
    background: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .swal2-title {
    color: var(--app-heading) !important;
}

html[data-bs-theme="dark"] .swal2-html-container,
html[data-bs-theme="dark"] .swal2-content {
    color: var(--app-muted) !important;
}

html[data-bs-theme="dark"] .flatpickr-calendar,
html[data-bs-theme="dark"] .iti__country-list {
    background: var(--app-dropdown-bg) !important;
    border-color: var(--app-border) !important;
    color: var(--app-text) !important;
    box-shadow: none !important;
}
