body[data-layout-mode="dark"] {
    color-scheme: dark !important;
    --sk-bg: #050506;
    --sk-bg-soft: #0b0b0d;
    --sk-surface: #111114;
    --sk-surface-elevated: #17171b;
    --sk-surface-strong: #1d1d22;
    --sk-border: rgba(255, 255, 255, 0.08);
    --sk-border-strong: rgba(255, 94, 94, 0.24);
    --sk-text: #f5f5f7;
    --sk-text-muted: #a3a3ad;
    --sk-red: #d92c36;
    --sk-red-soft: #ff5b61;
    --sk-red-deep: #7f1118;
    --sk-shadow: 0 24px 48px rgba(0, 0, 0, 0.38);
    background:
        radial-gradient(circle at top left, rgba(217, 44, 54, 0.14), transparent 28%),
        radial-gradient(circle at bottom right, rgba(121, 13, 21, 0.18), transparent 32%),
        linear-gradient(180deg, #09090b 0%, #050506 100%);
    color: var(--sk-text);
}

#page-topbar .navbar-header .header-item {
    height: 46px;
    min-width: 46px;
    margin: 0 0.25rem;
    padding: 0 0.9rem !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
    color: #334155 !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#page-topbar .navbar-header .page-topbar-left,
#page-topbar .navbar-header .page-topbar-right {
    display: flex;
    align-items: center;
}

#page-topbar .navbar-header .page-topbar-left {
    flex: 0 0 auto;
    min-width: 0;
    gap: 14px;
}

#page-topbar .navbar-header .page-topbar-right {
    margin-left: auto;
    justify-content: flex-end;
    gap: 0.2rem;
}

#page-topbar .navbar-header .page-topbar-right > .dropdown,
#page-topbar .navbar-header .page-topbar-left > * {
    display: flex;
    align-items: center;
}

#page-topbar .navbar-header .right-bar-toggle.me-2 {
    margin-right: 0 !important;
}

#page-topbar .navbar-header .header-item:hover,
#page-topbar .navbar-header .header-item:focus,
#page-topbar .navbar-header .show > .header-item {
    color: #4f46e5 !important;
    border-color: rgba(99, 102, 241, 0.22) !important;
    box-shadow: 0 14px 28px rgba(79, 70, 229, 0.12);
    transform: translateY(-1px);
}

#page-topbar .navbar-header .header-item i,
#page-topbar .navbar-header .header-item svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.15;
}

#page-topbar .navbar-header .app-search .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#page-topbar .navbar-header .app-search .btn i,
#page-topbar .navbar-header .app-search .btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.15;
}

#page-topbar .navbar-header .noti-icon .badge {
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(217, 44, 54, 0.28);
}

#page-topbar .navbar-header #vertical-menu-btn {
    min-width: 48px;
    padding: 0 !important;
}

#page-topbar .navbar-header .header-user-trigger {
    min-width: 0;
    gap: 0.55rem;
    padding: 0 0.95rem !important;
}

#page-topbar .navbar-header .header-language-trigger {
    min-width: 0;
    gap: 0.55rem;
    padding: 0 0.9rem !important;
}

#page-topbar .navbar-header .header-language-label {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1;
}

#page-topbar .navbar-header .header-user-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(124, 127, 239, 0.22));
    color: #4f46e5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

#page-topbar .navbar-header .header-user-trigger .mdi-chevron-down {
    font-size: 1rem;
    color: #64748b;
}

.header-language-menu {
    min-width: 220px;
    padding: 0.55rem;
    border-radius: 18px;
}

.header-language-menu__title {
    padding: 0.3rem 0.55rem 0.55rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.header-language-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.7rem 0.75rem;
    border-radius: 14px;
    color: #334155;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.header-language-option:hover,
.header-language-option:focus {
    background: rgba(79, 70, 229, 0.08);
    color: #4338ca;
    transform: translateY(-1px);
}

.header-language-option.is-active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(129, 140, 248, 0.18));
    color: #312e81;
}

.header-language-option__meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.header-language-option__name {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.25;
}

.header-language-option__label {
    margin-top: 0.14rem;
    font-size: 0.76rem;
    color: #64748b;
}

.header-language-option .mdi-check {
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.header-language-option.is-active .mdi-check {
    opacity: 1;
}

@media (min-width: 992px) {
    body:not([data-layout="horizontal"]) #page-topbar .navbar-header #vertical-menu-btn {
        margin: 0;
        padding: 0 !important;
        flex: 0 0 auto;
        align-self: center;
    }

    body[data-sidebar-size="sm"] #page-topbar {
        z-index: 1002;
    }
}

@media (min-width: 992px) and (hover: hover) and (pointer: fine) {
    body:not([data-layout="horizontal"]) #page-topbar .navbar-header #vertical-menu-btn {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    #page-topbar .navbar-header {
        padding: 0 14px;
        gap: 12px;
    }

    #page-topbar .navbar-header .page-topbar-left {
        flex: 0 0 auto;
        gap: 0;
    }

    #page-topbar .navbar-header .page-topbar-right {
        flex: 1 1 auto;
        justify-content: flex-end;
        gap: 0.15rem;
    }

    #page-topbar .navbar-header .header-item {
        height: 42px;
        min-width: 42px;
        margin: 0 0.15rem;
        border-radius: 12px !important;
    }

    #page-topbar .navbar-header .header-item i,
    #page-topbar .navbar-header .header-item svg {
        width: 17px;
        height: 17px;
    }

    #page-topbar .navbar-header #vertical-menu-btn {
        margin: 0;
        padding: 0 !important;
        flex: 0 0 auto;
        align-self: center;
    }

    #page-topbar .navbar-header .header-language-trigger {
        padding: 0 !important;
    }
}

body[data-layout-mode="dark"] #layout-wrapper,
body[data-layout-mode="dark"] .main-content,
body[data-layout-mode="dark"] .page-content,
body[data-layout-mode="dark"] .layout-wrapper,
body[data-layout-mode="dark"] .right-bar,
body[data-layout-mode="dark"] .footer {
    background: transparent;
}

body[data-layout-mode="dark"] .page-content {
    position: relative;
}

body[data-layout-mode="dark"] .page-content::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.06));
    z-index: 0;
}

body[data-layout-mode="dark"] .container-fluid,
body[data-layout-mode="dark"] .row,
body[data-layout-mode="dark"] .col,
body[data-layout-mode="dark"] .col-sm,
body[data-layout-mode="dark"] .col-lg-12,
body[data-layout-mode="dark"] .col-xl-12,
body[data-layout-mode="dark"] .card,
body[data-layout-mode="dark"] .card-body,
body[data-layout-mode="dark"] .card-header,
body[data-layout-mode="dark"] .table-responsive {
    position: relative;
    z-index: 1;
}

body[data-layout-mode="dark"][data-topbar="dark"] #page-topbar,
body[data-layout-mode="dark"][data-topbar="dark"] .navbar-header {
    background: rgba(9, 9, 11, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--sk-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
}

body[data-layout-mode="dark"] .navbar-brand-box,
body[data-layout-mode="dark"] .app-search .form-control,
body[data-layout-mode="dark"] .header-item,
body[data-layout-mode="dark"] .dropdown-menu,
body[data-layout-mode="dark"] .card,
body[data-layout-mode="dark"] .right-bar,
body[data-layout-mode="dark"] .modal-content,
body[data-layout-mode="dark"] .swal2-popup {
    background-color: var(--sk-surface);
    color: var(--sk-text);
}

body[data-layout-mode="dark"] .navbar-brand-box {
    border-right: 1px solid var(--sk-border);
}

body[data-layout-mode="dark"] #page-topbar .navbar-header .header-item {
    background: linear-gradient(180deg, rgba(24, 24, 28, 0.92), rgba(12, 12, 15, 0.88));
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #ececf1 !important;
    box-shadow:
        0 16px 32px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-layout-mode="dark"] #page-topbar .navbar-header .header-item:hover,
body[data-layout-mode="dark"] #page-topbar .navbar-header .header-item:focus,
body[data-layout-mode="dark"] #page-topbar .navbar-header .show > .header-item {
    color: #ffb8bc !important;
    border-color: rgba(255, 155, 160, 0.22) !important;
    box-shadow:
        0 18px 36px rgba(0, 0, 0, 0.28),
        0 0 0 1px rgba(255, 91, 97, 0.06);
}

body[data-layout-mode="dark"] #page-topbar .navbar-header .header-user-icon {
    background: linear-gradient(135deg, rgba(255, 91, 97, 0.18), rgba(127, 17, 24, 0.28));
    color: #ffb8bc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body[data-layout-mode="dark"] #page-topbar .navbar-header .header-user-trigger .mdi-chevron-down {
    color: #a3a3ad;
}

body[data-layout-mode="dark"] .header-language-option {
    color: #f5f5f7;
}

body[data-layout-mode="dark"] .header-language-option:hover,
body[data-layout-mode="dark"] .header-language-option:focus {
    background: rgba(255, 91, 97, 0.1);
    color: #ffd5d7;
}

body[data-layout-mode="dark"] .header-language-option.is-active {
    background: linear-gradient(135deg, rgba(255, 91, 97, 0.16), rgba(127, 17, 24, 0.24));
    color: #fff5f5;
}

body[data-layout-mode="dark"] .header-language-option__label,
body[data-layout-mode="dark"] .header-language-menu__title {
    color: #a3a3ad;
}

body[data-layout-mode="dark"] .logo-txt,
body[data-layout-mode="dark"] .page-title-box h4,
body[data-layout-mode="dark"] h1,
body[data-layout-mode="dark"] h2,
body[data-layout-mode="dark"] h3,
body[data-layout-mode="dark"] h4,
body[data-layout-mode="dark"] h5,
body[data-layout-mode="dark"] h6,
body[data-layout-mode="dark"] .form-label,
body[data-layout-mode="dark"] label,
body[data-layout-mode="dark"] .table,
body[data-layout-mode="dark"] .table th,
body[data-layout-mode="dark"] .table td,
body[data-layout-mode="dark"] .dropdown-item,
body[data-layout-mode="dark"] .btn,
body[data-layout-mode="dark"] .header-item,
body[data-layout-mode="dark"] .text-dark {
    color: var(--sk-text) !important;
}

body[data-layout-mode="dark"] p,
body[data-layout-mode="dark"] .text-muted,
body[data-layout-mode="dark"] .text-secondary,
body[data-layout-mode="dark"] .card-title-desc,
body[data-layout-mode="dark"] .breadcrumb-item,
body[data-layout-mode="dark"] .breadcrumb-item a,
body[data-layout-mode="dark"] .form-text,
body[data-layout-mode="dark"] small {
    color: #b8b8c4 !important;
}

body[data-layout-mode="dark"] code {
    color: #ff858e !important;
    background: rgba(255, 255, 255, 0.08) !important;
    padding: 0.16rem 0.45rem !important;
    border-radius: 6px !important;
    font-size: 0.86em !important;
}

body[data-layout-mode="dark"] .bg-light,
body[data-layout-mode="dark"] code.bg-light,
body[data-layout-mode="dark"] .avatar-title.bg-light {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body[data-layout-mode="dark"] .app-search .form-control {
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

body[data-layout-mode="dark"] .app-search .form-control::placeholder {
    color: #81818b;
}

body[data-layout-mode="dark"] .app-search .btn,
body[data-layout-mode="dark"] .btn-primary,
body[data-layout-mode="dark"] .swal2-confirm {
    border-color: rgba(255, 91, 97, 0.8) !important;
    background: linear-gradient(135deg, var(--sk-red-soft), var(--sk-red-deep)) !important;
    color: #fff !important;
    box-shadow: 0 14px 28px rgba(127, 17, 24, 0.3);
}

body[data-layout-mode="dark"] .btn-light,
body[data-layout-mode="dark"] .btn-soft-light,
body[data-layout-mode="dark"] .bg-soft-light,
body[data-layout-mode="dark"] .swal2-cancel {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--sk-text) !important;
}

body[data-layout-mode="dark"] .card,
body[data-layout-mode="dark"] .dropdown-menu,
body[data-layout-mode="dark"] .right-bar,
body[data-layout-mode="dark"] .modal-content,
body[data-layout-mode="dark"] .swal2-popup {
    border: 1px solid var(--sk-border);
    box-shadow: var(--sk-shadow);
}

.right-bar {
    width: 360px;
    max-width: 100vw;
    right: 0;
    overflow: hidden;
    transform: translateX(calc(100% + 18px));
    transition: transform 0.22s ease-out;
    will-change: transform;
}

body.right-bar-enabled .right-bar {
    transform: translateX(0);
}

.rightbar-overlay {
    position: fixed;
    inset: 0;
}

.theme-customizer {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.theme-customizer__header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.2rem 1.25rem;
    background:
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.theme-customizer__heading {
    min-width: 0;
    flex: 1 1 auto;
}

.theme-customizer__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.right-bar .theme-customizer__close {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: inline-flex;
    margin-left: auto;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.74);
    color: #334155;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.right-bar .theme-customizer__close:hover {
    color: #4f46e5;
    border-color: rgba(99, 102, 241, 0.22);
    background: #ffffff;
    transform: translateY(-1px);
}

.theme-customizer__body {
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.theme-customizer__section {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

.theme-customizer__section-head {
    margin-bottom: 0.9rem;
}

.theme-customizer__section-head h6 {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 700;
    color: #0f172a;
}

.theme-customizer__section-head p {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #64748b;
}

.theme-customizer__options {
    display: grid;
    gap: 0.75rem;
}

.theme-customizer__options--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.theme-customizer__options--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.theme-option {
    display: block;
    margin: 0;
    cursor: pointer;
}

.theme-option__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-option__card {
    min-height: 122px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.45rem;
    padding: 0.8rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.theme-option__input:checked + .theme-option__card {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.14),
        0 14px 28px rgba(79, 70, 229, 0.12);
    background: linear-gradient(180deg, rgba(241, 245, 255, 0.98), rgba(236, 240, 255, 0.94));
    transform: translateY(-1px);
}

.theme-option__preview {
    width: 100%;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    position: relative;
    overflow: hidden;
}

.theme-option__preview::before,
.theme-option__preview::after {
    content: "";
    position: absolute;
    border-radius: 8px;
}

.theme-option__preview::before {
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: 22%;
    background: rgba(15, 23, 42, 0.12);
}

.theme-option__preview::after {
    left: 34%;
    right: 8px;
    top: 8px;
    bottom: 8px;
    background: rgba(255, 255, 255, 0.82);
}

.theme-option__preview--dark {
    background: linear-gradient(135deg, #19191d, #0f0f12);
}

.theme-option__preview--topbar-dark,
.theme-option__preview--sidebar-dark {
    background: linear-gradient(135deg, #1b1b20, #111116);
}

.theme-option__preview--sidebar-brand::before {
    background: rgba(255, 255, 255, 0.18);
}

.theme-option__preview--dark::before,
.theme-option__preview--topbar-dark::before,
.theme-option__preview--sidebar-dark::before {
    background: rgba(255, 255, 255, 0.12);
}

.theme-option__preview--dark::after {
    background: rgba(255, 255, 255, 0.06);
}

.theme-option__preview--topbar-light::after,
.theme-option__preview--topbar-dark::after {
    top: 16px;
}

.theme-option__preview--topbar-light::before,
.theme-option__preview--topbar-dark::before {
    left: 8px;
    right: 8px;
    top: 8px;
    height: 8px;
    width: auto;
}

.theme-option__preview--topbar-light::before {
    background: rgba(255, 255, 255, 0.98);
}

.theme-option__preview--topbar-dark::before {
    background: rgba(15, 23, 42, 0.82);
}

.theme-option__preview--sidebar-default::before {
    width: 28%;
}

.theme-option__preview--sidebar-compact::before {
    width: 22%;
}

.theme-option__preview--sidebar-small::before {
    width: 14%;
}

.theme-option__preview--sidebar-brand {
    background: linear-gradient(135deg, #7c7fef, #5b5fc7);
}

.theme-option__label {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

.theme-option__meta {
    font-size: 0.76rem;
    line-height: 1.45;
    color: #64748b;
}

body[data-layout-mode="dark"] .theme-customizer__header {
    background:
        radial-gradient(circle at top right, rgba(255, 91, 97, 0.14), transparent 32%),
        linear-gradient(180deg, rgba(20, 20, 24, 0.98), rgba(11, 11, 14, 0.96));
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

body[data-layout-mode="dark"] .theme-customizer__title {
    color: #f5f5f7;
}

body[data-layout-mode="dark"] .right-bar .theme-customizer__close {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #ececf1;
}

body[data-layout-mode="dark"] .right-bar .theme-customizer__close:hover {
    color: #ffb8bc;
    border-color: rgba(255, 155, 160, 0.22);
    background: rgba(255, 255, 255, 0.06);
}

body[data-layout-mode="dark"] .theme-customizer__section {
    border-color: rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
        var(--sk-surface);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

body[data-layout-mode="dark"] .theme-customizer__section-head h6,
body[data-layout-mode="dark"] .theme-option__label {
    color: #f5f5f7;
}

body[data-layout-mode="dark"] .theme-customizer__section-head p,
body[data-layout-mode="dark"] .theme-option__meta {
    color: #a3a3ad;
}

body[data-layout-mode="dark"] .theme-option__card {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body[data-layout-mode="dark"] .theme-option__input:checked + .theme-option__card {
    border-color: rgba(255, 91, 97, 0.3);
    box-shadow:
        0 0 0 1px rgba(255, 91, 97, 0.08),
        0 18px 32px rgba(0, 0, 0, 0.2);
    background: linear-gradient(180deg, rgba(255, 91, 97, 0.08), rgba(255, 255, 255, 0.03));
}

@media (max-width: 575.98px) {
    .right-bar {
        width: 100%;
        max-width: 100%;
        transform: translateX(100%);
    }

    .theme-customizer__options--2,
    .theme-customizer__options--3 {
        grid-template-columns: 1fr;
    }

    .theme-option__card {
        min-height: 104px;
    }
}

body[data-layout-mode="dark"] .card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
        var(--sk-surface);
    border-radius: 18px;
}

body[data-layout-mode="dark"] .card-header,
body[data-layout-mode="dark"] .card-footer,
body[data-layout-mode="dark"] .dropdown-divider,
body[data-layout-mode="dark"] .table > :not(caption) > * > *,
body[data-layout-mode="dark"] .border,
body[data-layout-mode="dark"] .border-top,
body[data-layout-mode="dark"] .border-bottom,
body[data-layout-mode="dark"] .border-start,
body[data-layout-mode="dark"] .border-end,
body[data-layout-mode="dark"] hr {
    border-color: var(--sk-border) !important;
}

body[data-layout-mode="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--sk-text);
    --bs-table-border-color: var(--sk-border);
}

body[data-layout-mode="dark"] .table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: rgba(255, 255, 255, 0.03);
    color: var(--sk-text);
}

body[data-layout-mode="dark"] .form-control,
body[data-layout-mode="dark"] .form-select,
body[data-layout-mode="dark"] select,
body[data-layout-mode="dark"] textarea,
body[data-layout-mode="dark"] .choices__inner,
body[data-layout-mode="dark"] .swal2-input,
body[data-layout-mode="dark"] .swal2-textarea,
body[data-layout-mode="dark"] .swal2-select {
    background: var(--sk-surface-elevated) !important;
    border: 1px solid var(--sk-border) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

body[data-layout-mode="dark"] select option,
body[data-layout-mode="dark"] .form-select option,
body[data-layout-mode="dark"] .swal2-select option,
body[data-layout-mode="dark"] .ios-select option {
    background-color: #1c1c22 !important;
    color: #ffffff !important;
}

body[data-layout-mode="dark"] select option:checked,
body[data-layout-mode="dark"] .form-select option:checked,
body[data-layout-mode="dark"] .swal2-select option:checked,
body[data-layout-mode="dark"] .ios-select option:checked {
    background-color: #2e2e38 !important;
    color: #ffffff !important;
}

body[data-layout-mode="dark"] .form-control:disabled,
body[data-layout-mode="dark"] .form-control[readonly],
body[data-layout-mode="dark"] input:disabled,
body[data-layout-mode="dark"] input[readonly],
body[data-layout-mode="dark"] textarea:disabled,
body[data-layout-mode="dark"] textarea[readonly] {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #f5f5f7 !important;
    -webkit-text-fill-color: #f5f5f7 !important;
    opacity: 1 !important;
    cursor: default;
}

body[data-layout-mode="dark"] input::placeholder,
body[data-layout-mode="dark"] textarea::placeholder,
body[data-layout-mode="dark"] .form-control::placeholder {
    color: rgba(255, 255, 255, 0.44) !important;
    opacity: 1 !important;
}

body[data-layout-mode="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
body[data-layout-mode="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
body[data-layout-mode="dark"] input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.2) !important;
    cursor: pointer;
    opacity: 0.85;
}

body[data-layout-mode="dark"] input[type="date"]::-webkit-calendar-picker-indicator:hover,
body[data-layout-mode="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

body[data-layout-mode="dark"] .form-control:focus,
body[data-layout-mode="dark"] .form-select:focus,
body[data-layout-mode="dark"] .swal2-input:focus,
body[data-layout-mode="dark"] .swal2-textarea:focus,
body[data-layout-mode="dark"] .swal2-select:focus {
    border-color: rgba(255, 91, 97, 0.7) !important;
    box-shadow: 0 0 0 0.2rem rgba(217, 44, 54, 0.16) !important;
}

body[data-layout-mode="dark"] .form-check-input {
    background-color: #111114;
    border-color: rgba(255, 255, 255, 0.12);
}

body[data-layout-mode="dark"] .form-check-input:checked {
    background-color: var(--sk-red);
    border-color: var(--sk-red);
}

.vertical-menu,
.vertical-menu .navbar-brand-box,
#sidebar-menu,
.vertical-menu .simplebar-content-wrapper,
.vertical-menu .simplebar-content {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.56)),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.vertical-menu {
    border-right: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 14px 0 34px rgba(15, 23, 42, 0.08);
}

.menu-title {
    color: #7c8697 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 4px 12px 10px;
    padding: 0.72rem 0.95rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.sidebar-brand-link {
    min-width: 0;
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #0f172a !important;
}

.sidebar-brand-mark {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(145deg, #7380ff 0%, #5f68dd 55%, #4850b6 100%);
    box-shadow:
        0 14px 24px rgba(50, 56, 146, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.sidebar-brand-text {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

body[data-layout-mode="dark"] .sidebar-brand {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.06);
}

body[data-layout-mode="dark"] .sidebar-brand-link {
    color: #f5f5f7 !important;
}

#sidebar-menu ul li a {
    color: #475569 !important;
    border-radius: 12px;
    margin: 2px 12px;
}

body[data-sidebar-size="sm"] .vertical-menu #sidebar-menu > ul > li > a {
    margin: 0 !important;
    border-radius: 0 !important;
}

body[data-sidebar-size="sm"] .vertical-menu #sidebar-menu > ul > li > a i {
    margin-left: 4px;
}

body[data-sidebar-size="sm"] .vertical-menu #sidebar-menu > ul > li > a svg {
    margin-left: 6px;
    margin-right: 10px;
    margin-top: -3px;
}

#sidebar-menu ul li a i,
#sidebar-menu ul li a svg {
    color: #667085 !important;
}

#sidebar-menu ul li a svg,
#sidebar-menu ul li a svg *,
.header-item svg,
.header-item svg * {
    stroke: currentColor !important;
}

#sidebar-menu ul li a:hover,
#sidebar-menu ul li.mm-active > a,
#sidebar-menu ul li.mm-active > a:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(79, 70, 229, 0.08));
    color: #312e81 !important;
}

body[data-sidebar-size="sm"] .vertical-menu #sidebar-menu > ul > li:hover > a,
body[data-sidebar-size="sm"] .vertical-menu #sidebar-menu > ul > li.mm-active > a,
body[data-sidebar-size="sm"] .vertical-menu #sidebar-menu > ul > li.mm-active > a:hover {
    border-radius: 0 !important;
}

#sidebar-menu ul li a:hover i,
#sidebar-menu ul li.mm-active > a i,
#sidebar-menu ul li a:hover svg,
#sidebar-menu ul li.mm-active > a svg {
    color: #312e81 !important;
}

body[data-layout-mode="dark"][data-sidebar="dark"] .vertical-menu,
body[data-layout-mode="dark"][data-sidebar="dark"] .vertical-menu .navbar-brand-box,
body[data-layout-mode="dark"][data-sidebar="dark"] #sidebar-menu,
body[data-layout-mode="dark"][data-sidebar="dark"] .vertical-menu .simplebar-content-wrapper,
body[data-layout-mode="dark"][data-sidebar="dark"] .vertical-menu .simplebar-content {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
        linear-gradient(180deg, #10090b 0%, #09090b 100%);
}

body[data-layout-mode="dark"][data-sidebar="dark"] .vertical-menu {
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 12px 0 36px rgba(0, 0, 0, 0.22);
}

body[data-layout-mode="dark"] .menu-title {
    color: #8e8e98 !important;
}

body[data-layout-mode="dark"] #sidebar-menu ul li a {
    color: #c9cad3 !important;
}

body[data-layout-mode="dark"] #sidebar-menu ul li a i,
body[data-layout-mode="dark"] #sidebar-menu ul li a svg {
    color: #b9bbc7 !important;
}

body[data-layout-mode="dark"] #sidebar-menu ul li a:hover,
body[data-layout-mode="dark"] #sidebar-menu ul li.mm-active > a,
body[data-layout-mode="dark"] #sidebar-menu ul li.mm-active > a:hover {
    background: linear-gradient(135deg, rgba(217, 44, 54, 0.18), rgba(127, 17, 24, 0.28));
    color: #fff !important;
}

body[data-layout-mode="dark"] #sidebar-menu ul li a:hover i,
body[data-layout-mode="dark"] #sidebar-menu ul li.mm-active > a i,
body[data-layout-mode="dark"] #sidebar-menu ul li a:hover svg,
body[data-layout-mode="dark"] #sidebar-menu ul li.mm-active > a svg {
    color: #fff !important;
}

body[data-sidebar-size="sm"] .sidebar-brand {
    margin: 4px 10px 10px;
    padding: 0.72rem 0.82rem;
}

body[data-sidebar-size="sm"] .sidebar-brand-link {
    gap: 0;
}

body[data-sidebar-size="sm"] .sidebar-brand-text {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateX(-8px);
    transition: max-width 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

body[data-sidebar-size="sm"] #layout-wrapper .vertical-menu:hover .sidebar-brand,
body[data-sidebar-size="sm"] #layout-wrapper .vertical-menu.sidebar-hover-open .sidebar-brand {
    margin-left: 12px;
    margin-right: 12px;
    padding-left: 0.95rem;
    padding-right: 0.95rem;
}

body[data-sidebar-size="sm"] #layout-wrapper .vertical-menu:hover .sidebar-brand-link,
body[data-sidebar-size="sm"] #layout-wrapper .vertical-menu.sidebar-hover-open .sidebar-brand-link {
    gap: 0.75rem;
}

body[data-sidebar-size="sm"] #layout-wrapper .vertical-menu:hover .sidebar-brand-text,
body[data-sidebar-size="sm"] #layout-wrapper .vertical-menu.sidebar-hover-open .sidebar-brand-text {
    max-width: 160px;
    opacity: 1;
    transform: translateX(0);
}


body[data-layout-mode="dark"] .notification-item,
body[data-layout-mode="dark"] .dropdown-icon-item {
    border-radius: 14px;
}

body[data-layout-mode="dark"] .notification-item:hover,
body[data-layout-mode="dark"] .dropdown-icon-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

body[data-layout-mode="dark"] .right-bar .bg-dark {
    background: linear-gradient(135deg, #120708, #22090d) !important;
}

body[data-layout-mode="dark"] .breadcrumb-item.active,
body[data-layout-mode="dark"] .breadcrumb-item + .breadcrumb-item::before {
    color: #7d7d88;
}

body[data-layout-mode="dark"] a {
    color: #ff8b90;
}

body[data-layout-mode="dark"] a:hover {
    color: #ffb0b4;
}

body[data-layout-mode="dark"] .footer {
    background: rgba(9, 9, 11, 0.92);
    border-top: 1px solid var(--sk-border);
    color: var(--sk-text-muted);
}

body[data-layout-mode="dark"] .footer a {
    color: #ff9ba0;
}

body[data-layout-mode="dark"] .badge {
    font-weight: 600 !important;
    letter-spacing: 0.02em;
}

body[data-layout-mode="dark"] .badge.bg-warning,
body[data-layout-mode="dark"] .badge-warning {
    background: rgba(245, 158, 11, 0.22) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15) !important;
}

body[data-layout-mode="dark"] .badge.bg-success,
body[data-layout-mode="dark"] .badge-success {
    background: rgba(16, 185, 129, 0.22) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15) !important;
}

body[data-layout-mode="dark"] .badge.bg-danger,
body[data-layout-mode="dark"] .badge-danger {
    background: rgba(239, 68, 68, 0.22) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15) !important;
}

body[data-layout-mode="dark"] .badge.bg-info,
body[data-layout-mode="dark"] .badge-info {
    background: rgba(14, 165, 233, 0.22) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(14, 165, 233, 0.4) !important;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15) !important;
}

body[data-layout-mode="dark"] .badge.bg-primary,
body[data-layout-mode="dark"] .badge-primary {
    background: rgba(99, 102, 241, 0.22) !important;
    color: #818cf8 !important;
    border: 1px solid rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15) !important;
}

body[data-layout-mode="dark"] .badge.bg-secondary,
body[data-layout-mode="dark"] .badge-secondary {
    background: rgba(148, 163, 184, 0.2) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
}

body[data-layout-mode="dark"] .membership-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
        var(--sk-surface);
    border-color: var(--sk-border);
    box-shadow: var(--sk-shadow);
}

body[data-layout-mode="dark"] .membership-chip {
    background: rgba(255, 91, 97, 0.12);
    border-color: rgba(255, 91, 97, 0.2);
    color: #ffd5d7;
}

body[data-layout-mode="dark"] .membership-title,
body[data-layout-mode="dark"] .membership-meta-value {
    color: var(--sk-text);
}

body[data-layout-mode="dark"] .membership-text,
body[data-layout-mode="dark"] .membership-meta-label {
    color: var(--sk-text-muted);
}

body[data-layout-mode="dark"] .membership-meta {
    border-top-color: var(--sk-border);
}

body[data-layout-mode="dark"] .apexcharts-text,
body[data-layout-mode="dark"] .apexcharts-legend-text {
    fill: #c7c7d1 !important;
    color: #c7c7d1 !important;
}

body[data-layout-mode="dark"] .apexcharts-gridline,
body[data-layout-mode="dark"] .apexcharts-xaxis line,
body[data-layout-mode="dark"] .apexcharts-yaxis line,
body[data-layout-mode="dark"] .apexcharts-xaxis-tick,
body[data-layout-mode="dark"] .apexcharts-yaxis-tick {
    stroke: rgba(255, 255, 255, 0.08) !important;
}

/* =========================================================
   DataTables Dark Mode Theme
   ========================================================= */
body[data-layout-mode="dark"] .dataTables_wrapper .dataTables_info,
body[data-layout-mode="dark"] .dataTables_wrapper .dataTables_length,
body[data-layout-mode="dark"] .dataTables_wrapper .dataTables_length label,
body[data-layout-mode="dark"] .dataTables_wrapper .dataTables_filter,
body[data-layout-mode="dark"] .dataTables_wrapper .dataTables_filter label {
    color: #c4c4cc !important;
    font-weight: 500;
}

body[data-layout-mode="dark"] .dataTables_wrapper .dataTables_length select,
body[data-layout-mode="dark"] .dataTables_wrapper .dataTables_filter input {
    background-color: var(--sk-surface-elevated) !important;
    border: 1px solid var(--sk-border) !important;
    color: #ffffff !important;
    border-radius: 10px;
    padding: 0.35rem 0.65rem;
}

body[data-layout-mode="dark"] .dataTables_wrapper .pagination .page-item .page-link {
    background-color: var(--sk-surface-elevated) !important;
    border-color: var(--sk-border) !important;
    color: #c4c4cc !important;
}

body[data-layout-mode="dark"] .dataTables_wrapper .pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--sk-red-soft), var(--sk-red-deep)) !important;
    border-color: rgba(255, 91, 97, 0.5) !important;
    color: #ffffff !important;
}

body[data-layout-mode="dark"] .dataTables_wrapper .pagination .page-item.disabled .page-link {
    background-color: rgba(255, 255, 255, 0.02) !important;
    border-color: var(--sk-border) !important;
    color: #6b7280 !important;
}

body[data-layout-mode="dark"] .dataTables_empty {
    color: #c4c4cc !important;
    font-style: italic;
    padding: 1.5rem !important;
}

/* =========================================================
   Flatpickr Calendar Dark Mode Theme
   ========================================================= */
body[data-layout-mode="dark"] .flatpickr-calendar {
    background: #1c1c20 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6) !important;
    color: #ffffff !important;
}

body[data-layout-mode="dark"] .flatpickr-calendar .flatpickr-months {
    background: #232328 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 5px 5px 0 0;
}

body[data-layout-mode="dark"] .flatpickr-current-month,
body[data-layout-mode="dark"] .flatpickr-current-month .cur-month,
body[data-layout-mode="dark"] .flatpickr-current-month input.cur-year,
body[data-layout-mode="dark"] .flatpickr-monthDropdown-months {
    color: #ffffff !important;
    fill: #ffffff !important;
}

body[data-layout-mode="dark"] .flatpickr-monthDropdown-months option {
    background: #1c1c20 !important;
    color: #ffffff !important;
}

body[data-layout-mode="dark"] .flatpickr-prev-month,
body[data-layout-mode="dark"] .flatpickr-next-month {
    color: #ffffff !important;
    fill: #ffffff !important;
}

body[data-layout-mode="dark"] .flatpickr-prev-month:hover svg,
body[data-layout-mode="dark"] .flatpickr-next-month:hover svg {
    fill: #ff5b61 !important;
}

body[data-layout-mode="dark"] span.flatpickr-weekday {
    color: #a8a8b3 !important;
}

body[data-layout-mode="dark"] .flatpickr-day {
    color: #e5e5ea !important;
}

body[data-layout-mode="dark"] .flatpickr-day.prevMonthDay,
body[data-layout-mode="dark"] .flatpickr-day.nextMonthDay {
    color: #636366 !important;
}

body[data-layout-mode="dark"] .flatpickr-day:hover,
body[data-layout-mode="dark"] .flatpickr-day:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

body[data-layout-mode="dark"] .flatpickr-day.today {
    border-color: #ff5b61 !important;
}

body[data-layout-mode="dark"] .flatpickr-day.selected {
    background: #0a84ff !important;
    border-color: #0a84ff !important;
    color: #ffffff !important;
}

body[data-layout-mode="dark"] .flatpickr-time {
    background: #232328 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body[data-layout-mode="dark"] .flatpickr-time input,
body[data-layout-mode="dark"] .flatpickr-time .flatpickr-time-separator,
body[data-layout-mode="dark"] .flatpickr-time .flatpickr-am-pm {
    color: #ffffff !important;
}

body[data-layout-mode="dark"] .flatpickr-time .numInputWrapper span.arrowUp:after {
    border-bottom-color: #ffffff !important;
}

body[data-layout-mode="dark"] .flatpickr-time .numInputWrapper span.arrowDown:after {
    border-top-color: #ffffff !important;
}

/* =========================================================
   Unified Modern DataTables Footer (Rows per page, Info, Paginate)
   ========================================================= */
.key-table-footer,
.device-table-footer,
.member-table-footer,
.package-table-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.95rem !important;
    margin-top: 1rem !important;
    padding-top: 0.95rem !important;
    border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
}

body[data-layout-mode="dark"] .key-table-footer,
body[data-layout-mode="dark"] .device-table-footer,
body[data-layout-mode="dark"] .member-table-footer,
body[data-layout-mode="dark"] .package-table-footer {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

.key-table-footer .dataTables_length,
.device-table-footer .dataTables_length,
.member-table-footer .dataTables_length,
.package-table-footer .dataTables_length {
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
}

.key-table-footer .dataTables_length label,
.device-table-footer .dataTables_length label,
.member-table-footer .dataTables_length label,
.package-table-footer .dataTables_length label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    margin: 0 !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #74788d !important;
}

body[data-layout-mode="dark"] .key-table-footer .dataTables_length label,
body[data-layout-mode="dark"] .device-table-footer .dataTables_length label,
body[data-layout-mode="dark"] .member-table-footer .dataTables_length label,
body[data-layout-mode="dark"] .package-table-footer .dataTables_length label {
    color: #a6b0cf !important;
}

.key-table-footer .dataTables_length select,
.device-table-footer .dataTables_length select,
.member-table-footer .dataTables_length select,
.package-table-footer .dataTables_length select {
    width: auto !important;
    min-width: 58px !important;
    height: 30px !important;
    border-radius: 8px !important;
    padding: 0.15rem 1.65rem 0.15rem 0.65rem !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    background-color: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: #495057 !important;
    box-shadow: none !important;
    cursor: pointer !important;
    background-position: right 0.45rem center !important;
    background-size: 14px 10px !important;
    transition: border-color 0.15s ease, background-color 0.15s ease !important;
}

body[data-layout-mode="dark"] .key-table-footer .dataTables_length select,
body[data-layout-mode="dark"] .device-table-footer .dataTables_length select,
body[data-layout-mode="dark"] .member-table-footer .dataTables_length select,
body[data-layout-mode="dark"] .package-table-footer .dataTables_length select {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #e2e8f0 !important;
}

.key-table-footer .dataTables_info,
.device-table-footer .dataTables_info,
.member-table-footer .dataTables_info,
.package-table-footer .dataTables_info {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em !important;
    color: #74788d !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
}

body[data-layout-mode="dark"] .key-table-footer .dataTables_info,
body[data-layout-mode="dark"] .device-table-footer .dataTables_info,
body[data-layout-mode="dark"] .member-table-footer .dataTables_info,
body[data-layout-mode="dark"] .package-table-footer .dataTables_info {
    color: #a6b0cf !important;
}

.key-table-footer .dataTables_paginate,
.device-table-footer .dataTables_paginate,
.member-table-footer .dataTables_paginate,
.package-table-footer .dataTables_paginate {
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
}

.key-table-footer .dataTables_paginate .pagination,
.device-table-footer .dataTables_paginate .pagination,
.member-table-footer .dataTables_paginate .pagination,
.package-table-footer .dataTables_paginate .pagination {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.22rem !important;
    margin: 0 !important;
}

.key-table-footer .page-link,
.device-table-footer .page-link,
.member-table-footer .page-link,
.package-table-footer .page-link {
    min-width: 30px !important;
    height: 30px !important;
    padding: 0 0.45rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    background: rgba(0, 0, 0, 0.03) !important;
    color: #74788d !important;
    box-shadow: none !important;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body[data-layout-mode="dark"] .key-table-footer .page-link,
body[data-layout-mode="dark"] .device-table-footer .page-link,
body[data-layout-mode="dark"] .member-table-footer .page-link,
body[data-layout-mode="dark"] .package-table-footer .page-link {
    border-color: rgba(255, 255, 255, 0.12) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: #a6b0cf !important;
}

.key-table-footer .page-link i,
.device-table-footer .page-link i,
.member-table-footer .page-link i,
.package-table-footer .page-link i {
    font-size: 1.18rem !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.key-table-footer .page-link:hover,
.device-table-footer .page-link:hover,
.member-table-footer .page-link:hover,
.package-table-footer .page-link:hover {
    background: rgba(225, 75, 84, 0.12) !important;
    color: #e14b54 !important;
    border-color: #e14b54 !important;
    transform: translateY(-1px) !important;
}

.key-table-footer .page-item.active .page-link,
.device-table-footer .page-item.active .page-link,
.member-table-footer .page-item.active .page-link,
.package-table-footer .page-item.active .page-link {
    background: linear-gradient(135deg, #e14b54, #8f1921) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(225, 75, 84, 0.35) !important;
    transform: none !important;
}

.key-table-footer .page-item.disabled .page-link,
.device-table-footer .page-item.disabled .page-link,
.member-table-footer .page-item.disabled .page-link,
.package-table-footer .page-item.disabled .page-link {
    background: transparent !important;
    border-color: transparent !important;
    color: #74788d !important;
    opacity: 0.35 !important;
    pointer-events: none !important;
}

body[data-layout-mode="dark"] .key-table-footer .page-item.disabled .page-link,
body[data-layout-mode="dark"] .device-table-footer .page-item.disabled .page-link,
body[data-layout-mode="dark"] .member-table-footer .page-item.disabled .page-link,
body[data-layout-mode="dark"] .package-table-footer .page-item.disabled .page-link {
    color: #64748b !important;
}

@media (max-width: 767.98px) {
    .key-table-footer,
    .device-table-footer,
    .member-table-footer,
    .package-table-footer {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.65rem !important;
    }
}

/* =========================================================
   Unified Compact Modern Toolbar & Search (Sleek & Pro)
   ========================================================= */
.key-toolbar,
.device-toolbar,
.member-toolbar,
.package-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.45rem 0.65rem !important;
    margin-bottom: 0.75rem !important;
    border-radius: 12px !important;
}

.key-toolbar-left,
.key-toolbar-right,
.device-toolbar-left,
.device-toolbar-right,
.member-toolbar-left,
.member-toolbar-right,
.package-toolbar-left,
.package-toolbar-right {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.42rem !important;
}

.key-toolbar-btn,
.device-toolbar-btn,
.member-toolbar-btn,
.package-toolbar-btn {
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 0.68rem !important;
    border-radius: 8px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.38rem !important;
    line-height: 1 !important;
    box-shadow: none !important;
    transition: all 0.16s ease !important;
}

.key-toolbar-btn i,
.device-toolbar-btn i,
.member-toolbar-btn i,
.package-toolbar-btn i {
    font-size: 0.95rem !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.key-toolbar-search,
.device-toolbar-search,
.member-toolbar-search,
.package-toolbar-search {
    position: relative !important;
    min-width: 220px !important;
    max-width: 320px !important;
}

.key-search-input,
.device-search-input,
.member-search-input,
.package-search-input {
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 2.2rem 0 0.68rem !important;
    border-radius: 8px !important;
    font-size: 0.82rem !important;
    line-height: 32px !important;
    box-shadow: none !important;
}

.key-search-actions,
.device-search-actions,
.member-search-actions,
.package-search-actions {
    position: absolute !important;
    right: 3px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 1px !important;
}

.key-search-btn,
.device-search-btn,
.member-search-btn,
.package-search-btn {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.85rem !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* =========================================================
   Unified Precision Table Header & Cell Alignment
   Eliminates DataTables 30px padding offset & misaligned columns
   ========================================================= */
table.dataTable > thead > tr > th,
table.dataTable > thead > tr > th:not(.sorting_disabled),
table.dataTable > thead > tr > th.sorting,
table.dataTable > thead > tr > th.sorting_asc,
table.dataTable > thead > tr > th.sorting_desc,
.key-table th,
.device-list-table th,
.member-list-table th,
.package-list-table th {
    padding-right: 0.55rem !important;
    padding-left: 0.55rem !important;
    background-image: none !important;
}

table.dataTable > thead > tr > th:before,
table.dataTable > thead > tr > th:after,
.key-table th:before,
.key-table th:after,
.device-list-table th:before,
.device-list-table th:after,
.member-list-table th:before,
.member-list-table th:after,
.package-list-table th:before,
.package-list-table th:after {
    display: none !important;
    content: none !important;
}

/* Checkbox Column */
th.key-select-column,
td.key-select-cell,
th.device-select-column,
td.device-select-cell,
th.member-select-column,
td.member-select-cell,
th.package-select-column,
td.package-select-cell,
th.col-select,
td.col-select,
.col-select {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    text-align: center !important;
    padding: 0.72rem 0.4rem !important;
    vertical-align: middle !important;
}

th.key-select-column .form-check-input,
td.key-select-cell .form-check-input,
th.device-select-column .form-check-input,
td.device-select-cell .form-check-input,
th.member-select-column .form-check-input,
td.member-select-cell .form-check-input,
th.package-select-column .form-check-input,
td.package-select-cell .form-check-input {
    margin: 0 auto !important;
    float: none !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* STT / Order Column */
.col-order,
th.col-order,
td.col-order {
    width: 56px !important;
    min-width: 56px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

th.col-order .key-header-label,
th.col-order .device-header-label,
th.col-order .member-header-label,
th.col-order .package-header-label {
    justify-content: center !important;
    text-align: center !important;
    position: relative !important;
}

/* ID Column */
.col-id,
th.col-id,
td.col-id {
    width: 60px !important;
    min-width: 60px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

th.col-id .key-header-label,
th.col-id .device-header-label,
th.col-id .member-header-label,
th.col-id .package-header-label {
    justify-content: center !important;
    text-align: center !important;
    position: relative !important;
}

/* Key Activated / UUID Counter (Keys Table) */
.key-table .col-uuid,
.key-table th.col-uuid,
.key-table td.col-uuid {
    width: 100px !important;
    min-width: 100px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.key-table th.col-uuid .key-header-label {
    justify-content: center !important;
    text-align: center !important;
    position: relative !important;
}

.key-table td.col-uuid .key-uuid-counter {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: baseline !important;
    margin: 0 auto !important;
}

/* Status Column */
.col-status,
th.col-status,
td.col-status {
    width: 125px !important;
    min-width: 125px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

th.col-status .key-header-label,
th.col-status .device-header-label,
th.col-status .member-header-label,
th.col-status .package-header-label {
    justify-content: center !important;
    text-align: center !important;
    position: relative !important;
}

td.col-status .badge {
    display: inline-flex !important;
    justify-content: center !important;
    margin: 0 auto !important;
}

/* Actions Column */
.col-action,
th.col-action,
td.col-action,
.col-more,
th.col-more,
td.col-more {
    width: 80px !important;
    min-width: 80px !important;
    text-align: center !important;
    vertical-align: middle !important;
    padding: 0.72rem 0.4rem !important;
}

th.col-action .mobile-action-header-text,
th.col-action span,
th.col-more span {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
}

td.col-action .key-action-dropdown,
td.col-action .device-action-dropdown,
td.col-action .member-action-dropdown,
td.col-more .dropdown {
    display: inline-flex !important;
    justify-content: center !important;
    width: 100% !important;
}

/* Centered Sort Hints Positioning (Prevents Shifting Centered Text to the Left) */
th.col-order .key-sort-hint,
th.col-id .key-sort-hint,
th.col-uuid .key-sort-hint,
th.col-status .key-sort-hint,
th.col-order .device-sort-hint,
th.col-id .device-sort-hint,
th.col-status .device-sort-hint,
th.col-order .member-sort-hint,
th.col-limit .member-sort-hint,
th.col-keyusage .member-sort-hint,
th.col-role .member-sort-hint,
th.col-status .member-sort-hint,
th.col-id .package-sort-hint,
th.col-version .package-sort-hint,
th.col-token .package-sort-hint,
th.col-status .package-sort-hint {
    position: absolute !important;
    right: 2px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

/* Data / Text Columns: Consistent Left Alignment & Padding */
th.col-package,
td.col-package,
th.col-key-value,
td.col-key-value,
th.col-key-type,
td.col-key-type,
th.col-expiration,
td.col-expiration,
th.col-name,
td.col-name,
th.col-username,
td.col-username,
th.col-email,
td.col-email,
th.col-visit,
td.col-visit,
th.col-contact,
td.col-contact,
th.col-sha,
td.col-sha,
th.col-link,
td.col-link {
    text-align: left !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

th.col-package .key-header-label,
th.col-key-value .key-header-label,
th.col-key-type .key-header-label,
th.col-expiration .key-header-label,
th.col-name .device-header-label,
th.col-uuid .device-header-label,
th.col-username .member-header-label,
th.col-email .member-header-label,
th.col-visit .member-header-label,
th.col-name .package-header-label,
th.col-contact .package-header-label,
th.col-email .package-header-label,
th.col-sha .package-header-label,
th.col-link .package-header-label {
    justify-content: flex-start !important;
    text-align: left !important;
}


