/* Premium enterprise theme. Loaded last so it wins over the admin template. */

:root {
    --p-font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

body.app-premium {
    --p-primary: #7C6CF2;
    --p-primary-dark: #6858e4;
    --p-primary-soft: #F3F1FE;
    --p-sidebar: #5E4B8B;
    --p-bg: #F7F7FC;
    --p-surface: #FFFFFF;
    --p-border: #E7E4F2;
    --p-text: #2C2840;
    --p-muted: #1A1630;
    --p-radius: 14px;
    background: var(--p-bg) !important;
    color: var(--p-text);
    font-family: var(--p-font);
    letter-spacing: 0;
}

body.app-premium h1,
body.app-premium h2,
body.app-premium h3,
body.app-premium h4,
body.app-premium h5,
body.app-premium h6,
body.app-premium .h1,
body.app-premium .h2,
body.app-premium .h3,
body.app-premium .h4,
body.app-premium .h5,
body.app-premium .h6,
body.app-premium .btn,
body.app-premium .form-control,
body.app-premium .custom-select,
body.app-premium .dropdown-menu,
body.app-premium .dropdown-item,
body.app-premium .nav-link,
body.app-premium .sidebar-nav a,
body.app-premium .page-titles,
body.app-premium .card-title,
body.app-premium .tooltip,
body.app-premium .popover,
body.app-premium .modal,
body.app-premium .swal2-popup,
body.app-premium .select2-container,
body.app-premium .select2-dropdown,
body.app-premium .dataTables_wrapper,
body.app-premium table,
body.app-premium input,
body.app-premium button,
body.app-premium select,
body.app-premium textarea,
body.auth-page h1,
body.auth-page h2,
body.auth-page h3,
body.auth-page h4,
body.auth-page h5,
body.auth-page h6,
body.auth-page .btn,
body.auth-page input,
body.auth-page button,
body.auth-page select,
body.auth-page textarea {
    font-family: var(--p-font);
}

body.app-premium #main-wrapper,
body.app-premium .page-wrapper {
    background: transparent !important;
}

body.app-premium .page-wrapper {
    min-height: calc(100vh - 64px);
}

body.app-premium,
body.app-premium .page-wrapper,
body.app-premium .container-fluid {
    max-width: 100%;
}

/* ---------- Topbar ---------- */
body.app-premium .topbar {
    background: #fff;
    box-shadow: none;
    border-bottom: 1px solid var(--p-border);
}

body.app-premium .topbar,
body.app-premium .topbar .top-navbar,
body.app-premium .topbar .navbar,
body.app-premium .navbar.navbar-dark {
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    background: #fff !important;
    padding: 0;
    box-shadow: none !important;
}

body.app-premium .topbar {
    background: #fff;
    border-bottom: 1px solid var(--p-border);
}

body.app-premium .topbar .top-navbar .navbar-header {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: 220px;
    flex: 0 0 220px;
    height: 64px !important;
    min-height: 64px !important;
    max-height: 64px !important;
    line-height: 1;
    padding: 0 16px;
    background: var(--p-sidebar) !important;
    display: flex;
    align-items: center;
}

body.app-premium .topbar .top-navbar .navbar-header::before {
    content: "";
    position: absolute;
    width: 72px;
    height: 72px;
    right: -26px;
    top: -28px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 68%);
    pointer-events: none;
    z-index: 0;
    animation: p-side-drift 8s ease-in-out infinite;
}

body.app-premium .topbar .top-navbar .navbar-header .navbar-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 64px;
    margin: 0;
    padding: 0;
    line-height: 1;
    min-width: 0;
}

body.app-premium .topbar .top-navbar .navbar-header .navbar-brand b {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    line-height: 0;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .92);
}

body.app-premium .topbar .top-navbar .navbar-header .navbar-brand .brand-mark {
    display: block;
    width: 36px;
    height: 36px;
    max-width: none;
    object-fit: cover;
    object-position: center 42%;
    transform: scale(1.18);
    transform-origin: center 42%;
}

body.app-premium .brand-word {
    display: block;
    min-width: 0;
    max-width: calc(100% - 46px);
    margin: 0;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.app-premium .navbar-collapse {
    height: 64px !important;
    min-height: 64px !important;
    margin-left: 0 !important;
    padding: 0 8px 0 0 !important;
    display: flex !important;
    align-items: center;
}

body.app-premium .topbar .navbar-nav {
    align-items: center;
}

body.app-premium .topbar .nav-link {
    color: var(--p-text) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 12px !important;
    border-radius: 10px;
}

body.app-premium .topbar .navbar-nav.mr-auto {
    margin: 0;
    padding: 0;
}

body.app-premium .topbar .navbar-nav.mr-auto > .nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
    margin: 0;
    padding: 0;
}

body.app-premium .topbar .sidebartoggler,
body.app-premium .topbar .nav-toggler {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0 !important;
    line-height: 0 !important;
    border-radius: 12px;
    background: var(--p-primary-soft);
    color: var(--p-sidebar) !important;
}

body.app-premium .topbar .sidebartoggler i,
body.app-premium .topbar .nav-toggler i {
    display: block;
    width: 16px;
    height: 2px;
    margin: 0 !important;
    padding: 0;
    font-size: 0;
    line-height: 0;
    background: currentColor;
    border-radius: 2px;
    position: relative;
}

body.app-premium .topbar .sidebartoggler i::before,
body.app-premium .topbar .nav-toggler i::before,
body.app-premium .topbar .sidebartoggler i::after,
body.app-premium .topbar .nav-toggler i::after {
    content: "" !important;
    position: absolute;
    left: 0;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

body.app-premium .topbar .sidebartoggler i::before,
body.app-premium .topbar .nav-toggler i::before {
    top: -5px;
}

body.app-premium .topbar .sidebartoggler i::after,
body.app-premium .topbar .nav-toggler i::after {
    top: 5px;
}

@media (min-width: 768px) {
    body.app-premium .topbar .nav-toggler {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    body.app-premium .topbar .sidebartoggler {
        display: none !important;
    }
}

body.app-premium .topbar .nav-link:hover,
body.app-premium .topbar .nav-link:focus {
    background: var(--p-primary-soft);
    color: var(--p-sidebar) !important;
}

body.app-premium .topbar .profile-pic img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--p-border);
}

body.app-premium .topbar .profile-pic .hidden-md-down {
    color: var(--p-text);
    font-weight: 600;
    font-size: 13.5px;
}

body.app-premium .dropdown-menu {
    border: 1px solid var(--p-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(44, 32, 72, .10);
    padding: 6px;
    margin-top: 8px;
}

body.app-premium .dropdown-item {
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13.5px;
    color: var(--p-text);
}

body.app-premium .dropdown-item:hover {
    background: var(--p-primary-soft);
    color: var(--p-sidebar);
}

body.app-premium .fixed-layout .page-wrapper,
body.app-premium .fixed-header .page-wrapper {
    padding-top: 64px;
}

@media (min-width: 768px) {
    body.app-premium.mini-sidebar .topbar .top-navbar .navbar-header {
        width: 70px !important;
        flex: 0 0 70px !important;
        padding: 0 !important;
        justify-content: center;
    }

    body.app-premium.mini-sidebar .topbar .top-navbar .navbar-header .navbar-brand {
        width: 36px;
        margin: 0;
        justify-content: center;
    }

    body.app-premium.mini-sidebar .topbar .top-navbar .navbar-header .navbar-brand b {
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 0;
        margin: 0;
    }

    body.app-premium.mini-sidebar .topbar .top-navbar .navbar-header .navbar-brand span {
        display: none;
    }

    body.app-premium.mini-sidebar .footer,
    body.app-premium.mini-sidebar .page-wrapper {
        margin-left: 70px !important;
    }

    body.app-premium.mini-sidebar .left-sidebar::before {
        left: 16px;
        width: 38px;
    }

    body.app-premium.mini-sidebar .left-sidebar::after {
        width: 28px;
        height: 28px;
        right: 10px;
        bottom: 18px;
        box-shadow:
            0 -42px 0 -12px rgba(255, 255, 255, .22),
            -6px -78px 0 -13px rgba(221, 204, 255, .28);
    }

    body.app-premium.mini-sidebar #sidebarnav .user-pro {
        animation: none;
    }
}

/* ---------- Sidebar ornaments ---------- */
body.app-premium .left-sidebar {
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(160px 200px at 120% -8%, rgba(255, 255, 255, .16), transparent 62%),
        radial-gradient(140px 180px at -30% 108%, rgba(196, 181, 253, .32), transparent 64%),
        #5E4B8B !important;
}

body.app-premium .left-sidebar::before {
    content: "";
    position: absolute;
    left: -24px;
    top: 18%;
    width: 86px;
    height: 46%;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .2), transparent);
    filter: blur(8px);
    pointer-events: none;
    z-index: 0;
    animation: p-side-veil 9s ease-in-out infinite;
}

body.app-premium .left-sidebar::after {
    content: "";
    position: absolute;
    right: -36px;
    bottom: 9%;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow:
        -28px -64px 0 -40px rgba(255, 255, 255, .28),
        8px -118px 0 -44px rgba(221, 204, 255, .42),
        -54px -150px 0 -48px rgba(255, 255, 255, .16);
    pointer-events: none;
    z-index: 0;
    animation: p-side-drift 11s ease-in-out infinite;
}

body.app-premium .scroll-sidebar,
body.app-premium .sidebar-nav {
    position: relative;
    z-index: 1;
}

body.app-premium #sidebarnav .user-pro {
    animation: p-side-chip 3.8s ease-in-out infinite;
}

@keyframes p-side-veil {
    0%, 100% { transform: translate3d(0, -6%, 0); opacity: .45; }
    50% { transform: translate3d(18px, 10%, 0); opacity: .9; }
}

@keyframes p-side-drift {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-10px, -14px, 0); }
}

@keyframes p-side-chip {
    0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 0 0 0 rgba(196, 181, 253, 0); }
    50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 0 16px rgba(196, 181, 253, .38); }
}

/* ---------- Page heading ---------- */
body.app-premium .container-fluid {
    padding: 8px 24px 28px;
}

body.app-premium .page-wrapper .page-titles {
    position: relative;
    isolation: isolate;
    align-items: center;
    min-height: 0;
    margin: 4px 0 12px !important;
    padding: 8px 12px 8px 14px !important;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, 0) 24%, rgba(255, 255, 255, .62) 46%, rgba(255, 255, 255, 0) 68%),
        radial-gradient(460px 130px at 96% -10%, rgba(186, 156, 255, .72), transparent 64%),
        radial-gradient(280px 110px at 4% 130%, rgba(147, 112, 219, .4), transparent 72%),
        linear-gradient(108deg, #F3E9FF 0%, #E0CEFF 38%, #EFE4FF 64%, #D4C0FF 100%) !important;
    background-size: 240% 100%, 100% 100%, 100% 100%, 220% 220% !important;
    border: 1px solid rgba(167, 139, 250, .42) !important;
    border-radius: 18px !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .94),
        0 14px 34px rgba(94, 75, 139, .08) !important;
    overflow: hidden;
    animation: p-crumb-shift 9s ease-in-out infinite;
}

body.app-premium .page-wrapper .page-titles::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    right: auto;
    bottom: 10px;
    width: 3px;
    height: auto;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, #E9D5FF 0%, #C4B5FD 46%, #7C6CF2 100%);
    box-shadow: 0 0 14px rgba(167, 139, 250, .75);
    pointer-events: none;
    z-index: 1;
    animation: p-crumb-glow 2.8s ease-in-out infinite;
}

body.app-premium .page-wrapper .page-titles::after {
    content: "";
    position: absolute;
    right: 18%;
    top: -34px;
    bottom: auto;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(221, 204, 255, .72), transparent 68%);
    box-shadow:
        -220px 28px 0 -38px rgba(167, 139, 250, .28),
        86px 18px 0 -42px rgba(255, 255, 255, .85),
        -90px 46px 0 -46px rgba(196, 181, 253, .4);
    pointer-events: none;
    z-index: 0;
    animation: p-crumb-float 7s ease-in-out infinite;
}

@keyframes p-crumb-shift {
    0%, 100% { background-position: 0% 50%, 0 0, 0 0, 0% 50%; }
    50% { background-position: 100% 50%, 0 0, 0 0, 100% 50%; }
}

@keyframes p-crumb-float {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-22px, 10px, 0); }
}

@keyframes p-crumb-glow {
    0%, 100% { opacity: .55; box-shadow: 0 0 6px rgba(167, 139, 250, .35); }
    50% { opacity: 1; box-shadow: 0 0 16px rgba(167, 139, 250, .9); }
}

@keyframes p-crumb-chip {
    0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 0 0 0 rgba(167, 139, 250, 0); }
    50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 0 0 3px rgba(167, 139, 250, .16); }
}

@media (prefers-reduced-motion: reduce) {
    body.app-premium .page-wrapper .page-titles,
    body.app-premium .page-wrapper .page-titles::before,
    body.app-premium .page-wrapper .page-titles::after,
    body.app-premium .page-wrapper .page-titles .breadcrumb-item.active,
    body.app-premium .left-sidebar::before,
    body.app-premium .left-sidebar::after,
    body.app-premium .topbar .top-navbar .navbar-header::before,
    body.app-premium #sidebarnav .user-pro,
    body.app-premium .card::before,
    body.app-premium .card::after {
        animation: none;
    }
}

body.app-premium .page-wrapper .page-titles > [class*="col-"] {
    position: relative;
    z-index: 2;
    padding-top: 2px;
    padding-bottom: 2px;
}

body.app-premium .page-wrapper .page-titles h4,
body.app-premium .text-themecolor {
    color: #1A1630 !important;
    font-weight: 500 !important;
    font-size: 1.42rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
    text-shadow: none !important;
    margin-bottom: 0 !important;
}

body.app-premium .page-wrapper .page-titles .breadcrumb {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    margin: 0 !important;
    padding: 2px 6px 2px 8px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(237, 228, 255, .7)) !important;
    border: 1px solid rgba(167, 139, 250, .34) !important;
    border-radius: 999px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .95),
        0 6px 16px rgba(124, 108, 242, .08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.app-premium .page-wrapper .page-titles .breadcrumb-item,
body.app-premium .page-wrapper .page-titles .breadcrumb-item a {
    color: #1A1630 !important;
    font-weight: 400 !important;
    font-size: .8rem;
    letter-spacing: .01em;
    text-decoration: none !important;
}

body.app-premium .page-wrapper .page-titles .breadcrumb-item a {
    transition: color .16s ease;
}

body.app-premium .page-wrapper .page-titles .breadcrumb-item a:hover {
    color: #5E4B8B !important;
}

body.app-premium .page-wrapper .page-titles .breadcrumb-item + .breadcrumb-item:not(.active) {
    padding-left: 0 !important;
}

body.app-premium .page-wrapper .page-titles .breadcrumb-item.active {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 22px;
    padding: 2px 10px 2px 14px !important;
    color: #4C3D80 !important;
    font-weight: 500 !important;
    background: linear-gradient(180deg, #FFFFFF, #EDE4FF);
    border: 1px solid rgba(124, 108, 242, .28);
    border-radius: 999px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .95),
        0 0 0 0 rgba(167, 139, 250, .35);
    animation: p-crumb-chip 2.6s ease-in-out infinite;
}

body.app-premium .page-wrapper .page-titles .breadcrumb-item + .breadcrumb-item::before {
    content: "" !important;
    display: inline-block;
    width: 5px;
    height: 5px;
    margin: 0 10px 1px 10px;
    padding: 0 !important;
    border-right: 1.5px solid #A78BFA;
    border-top: 1.5px solid #A78BFA;
    border-radius: 0;
    background: none;
    color: transparent !important;
    font-family: inherit !important;
    font-size: 0 !important;
    float: none;
    transform: rotate(45deg);
    vertical-align: middle;
}

body.app-premium .page-wrapper .page-titles .breadcrumb-item.active::before {
    position: absolute;
    left: -15px;
    top: 50%;
    margin: 0 !important;
    transform: translateY(-50%) rotate(45deg);
}

/* ---------- Cards ---------- */
body.app-premium .card {
    position: relative;
    border: 1px solid var(--p-border) !important;
    border-radius: var(--p-radius) !important;
    background:
        radial-gradient(140px 90px at 100% 0%, rgba(196, 181, 253, .2), transparent 70%),
        radial-gradient(120px 90px at 0% 100%, rgba(124, 108, 242, .08), transparent 72%),
        var(--p-surface) !important;
    box-shadow: 0 1px 2px rgba(40, 28, 72, .04) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible;
}

/* Corner filigree sits in the card padding, under the content. */
body.app-premium .card::before {
    content: "" !important;
    display: block !important;
    position: absolute;
    inset: 7px;
    width: auto;
    height: auto;
    border-radius: 10px;
    background:
        linear-gradient(#8B5CF6, #8B5CF6) right bottom / 26px 2px no-repeat,
        linear-gradient(#8B5CF6, #8B5CF6) right bottom / 2px 26px no-repeat,
        radial-gradient(circle at calc(100% - 2px) 8px, #fff 0 2.5px, #C4B5FD 3.5px, #7C6CF2 6px, transparent 7.5px),
        radial-gradient(circle at 12px calc(100% - 2px), rgba(196, 181, 253, .95) 0 3px, transparent 4px) !important;
    pointer-events: none;
    z-index: 0;
    animation: p-card-filigree 3.8s ease-in-out infinite;
}

/* A thin light travels the top edge. It does not cover buttons. */
body.app-premium .card::after {
    content: "" !important;
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    right: auto;
    bottom: auto;
    width: 34%;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95), rgba(167, 139, 250, .95), transparent) !important;
    pointer-events: none;
    z-index: 2;
    animation: p-card-sheen 5.8s ease-in-out infinite;
}

@keyframes p-card-filigree {
    0%, 100% { opacity: .72; }
    50% { opacity: 1; }
}

@keyframes p-card-sheen {
    0% { transform: translate3d(-140%, 0, 0); opacity: 0; }
    12% { opacity: 1; }
    42% { transform: translate3d(340%, 0, 0); opacity: 0; }
    100% { transform: translate3d(340%, 0, 0); opacity: 0; }
}

body.app-premium .card:hover {
    transform: none !important;
    box-shadow: 0 1px 2px rgba(40, 28, 72, .04) !important;
}

body.app-premium .card-body,
body.app-premium .card-header,
body.app-premium .card-footer {
    padding: 10px 12px !important;
}

body.app-premium .card-title,
body.app-premium .card-header h1,
body.app-premium .card-header h2,
body.app-premium .card-header h3,
body.app-premium .card-header h4,
body.app-premium .card-header h5,
body.app-premium .card-header h6,
body.app-premium .card-header > a,
body.app-premium .clin-card-head h4,
body.app-premium .clin-card-head h5,
body.app-premium .billing-card-header {
    text-transform: capitalize;
}

body.app-premium .card-title {
    color: var(--p-text) !important;
    font-size: 1.02rem !important;
    font-weight: 650 !important;
    letter-spacing: -0.01em;
}

body.app-premium .card-subtitle,
body.app-premium .text-muted {
    color: var(--p-muted) !important;
}

/* ---------- Buttons ---------- */
body.app-premium .btn {
    border-radius: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0;
    box-shadow: none !important;
    transform: none !important;
}

body.app-premium .btn:hover,
body.app-premium .btn:focus {
    transform: none !important;
    box-shadow: none !important;
}

body.app-premium .btn-primary {
    background: var(--p-primary) !important;
    border: 1px solid var(--p-primary) !important;
    color: #fff !important;
}

body.app-premium .btn-primary:hover,
body.app-premium .btn-primary:focus {
    background: var(--p-primary-dark) !important;
    border-color: var(--p-primary-dark) !important;
}

body.app-premium .btn-info {
    background: #5C6BC0 !important;
    border: 1px solid #5C6BC0 !important;
    color: #fff !important;
}

body.app-premium .btn-success {
    background: #2F8F6B !important;
    border: 1px solid #2F8F6B !important;
    color: #FFFFFF !important;
}

body.app-premium .btn-warning {
    background: #C9922A !important;
    border: 1px solid #C9922A !important;
    color: #FFFFFF !important;
}

body.app-premium .btn-danger {
    background: #D4535E !important;
    border: 1px solid #D4535E !important;
    color: #fff !important;
}

body.app-premium .btn-secondary,
body.app-premium .btn-default,
body.app-premium .btn-light {
    background: #fff !important;
    border: 1px solid var(--p-border) !important;
    color: var(--p-text) !important;
}

body.app-premium .btn-secondary:hover,
body.app-premium .btn-default:hover,
body.app-premium .btn-light:hover {
    background: var(--p-primary-soft) !important;
    border-color: #D9D4EA !important;
    color: var(--p-sidebar) !important;
}

body.app-premium .dt-button,
body.app-premium .dt-buttons .dt-button {
    background: #fff !important;
    border: 1px solid var(--p-border) !important;
    border-radius: 10px !important;
    color: var(--p-text) !important;
    font-weight: 600 !important;
    padding: .4rem .8rem !important;
    box-shadow: none !important;
}

body.app-premium .dt-button:hover {
    background: var(--p-primary-soft) !important;
    border-color: #D9D4EA !important;
    color: var(--p-sidebar) !important;
}

/* ---------- Forms ---------- */
body.app-premium .form-group {
    margin-bottom: 8px;
}

body.app-premium label {
    color: #3A3550;
    font-size: .84rem;
    font-weight: 600;
}

body.app-premium .card-body:has(h4.card-title) form[method="GET"] label,
body.app-premium .card-body:has(h4.card-title) form[method="get"] label {
    color: #000 !important;
    font-weight: 400 !important;
}

body.app-premium .form-control,
body.app-premium .custom-select,
body.app-premium .select2-container--default .select2-selection--single,
body.app-premium .select2-container--default .select2-selection--multiple {
    min-height: 40px !important;
    border-radius: 10px !important;
    border: 1px solid #DDD8EA !important;
    background: #fff !important;
    color: var(--p-text) !important;
    box-shadow: none !important;
}

body.app-premium textarea.form-control {
    min-height: 96px !important;
    height: auto !important;
}

body.app-premium .form-control:focus,
body.app-premium .custom-select:focus,
body.app-premium .select2-container--default.select2-container--focus .select2-selection--single,
body.app-premium .select2-container--default.select2-container--open .select2-selection--single,
body.app-premium .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--p-primary) !important;
    box-shadow: 0 0 0 3px rgba(124, 108, 242,   .16) !important;
}

body.app-premium .form-control:disabled,
body.app-premium .form-control[readonly],
body.app-premium select.form-control:disabled,
body.app-premium .form-control-link,
body.app-premium .form-control:has(a[target="_blank"]) {
    background-color: #F6F5FA !important;
    color: #1A1630 !important;
    border-color: #E7E4F2 !important;
}

body.app-premium select.form-control:not([multiple]):not([size]),
body.app-premium select.custom-select:not([multiple]):not([size]) {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    padding-right: 32px !important;
    cursor: pointer;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.2 1.4L6 6.2 10.8 1.4' fill='none' stroke='%237C6CF2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px 8px !important;
}

body.app-premium select.form-control:disabled:not([multiple]):not([size]),
body.app-premium select.form-control[readonly]:not([multiple]):not([size]),
body.app-premium select.custom-select:disabled:not([multiple]):not([size]),
body.app-premium select.custom-select[readonly]:not([multiple]):not([size]) {
    background-color: #F6F5FA !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.2 1.4L6 6.2 10.8 1.4' fill='none' stroke='%237C6CF2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px 8px !important;
    color: #1A1630 !important;
    border-color: #E7E4F2 !important;
    cursor: not-allowed;
    opacity: 1;
}

body.app-premium .select2-container--default.select2-container--disabled .select2-selection--single,
body.app-premium .select2-container--default.select2-container--disabled .select2-selection--multiple {
    background: #F6F5FA !important;
    border-color: #E7E4F2 !important;
    cursor: not-allowed !important;
    padding-right: 10px !important;
}

body.app-premium .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__rendered,
body.app-premium .select2-container--default.select2-container--disabled .select2-selection--multiple .select2-selection__rendered {
    color: #1A1630 !important;
}

body.app-premium .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__arrow {
    display: none !important;
}

body.app-premium .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    width: 28px !important;
    right: 4px !important;
    top: 0 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.2 1.4L6 6.2 10.8 1.4' fill='none' stroke='%237C6CF2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 12px 8px !important;
}

body.app-premium .select2-container--default .select2-selection--single .select2-selection__arrow b {
    display: none !important;
}

body.app-premium .form-control.is-invalid,
body.app-premium .was-validated .form-control:invalid {
    border-color: #D4535E !important;
    box-shadow: none !important;
}

body.app-premium .invalid-feedback,
body.app-premium .color-red {
    color: #C2414B !important;
}

body.app-premium .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--p-text) !important;
    line-height: 38px !important;
}

body.app-premium .select2-dropdown {
    border: 1px solid #DDD8EA !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 28px rgba(44, 32, 72, .08);
    overflow: hidden;
}

body.app-premium.modal-open .select2-container--open,
body.app-premium .modal > .select2-container--open {
    z-index: 1060;
}

body.app-premium .select2-container--default .select2-results__option {
    padding: 8px 12px;
    font-size: .88rem;
    color: #2C2840;
}

body.app-premium .select2-container--default .select2-results__option[aria-selected=true] {
    background: #F3F1FE;
    color: #2C2840;
}

body.app-premium .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--p-primary) !important;
    color: #fff !important;
}

@supports (appearance: base-select) {
    body.app-premium select.form-control:not([multiple]):not([size]),
    body.app-premium select.custom-select:not([multiple]):not([size]),
    body.app-premium .dataTables_wrapper .dataTables_length select,
    body.app-premium select.form-control:not([multiple]):not([size])::picker(select),
    body.app-premium select.custom-select:not([multiple]):not([size])::picker(select),
    body.app-premium .dataTables_wrapper .dataTables_length select::picker(select) {
        appearance: base-select !important;
    }

    body.app-premium select.form-control:disabled:not([multiple]):not([size]),
    body.app-premium select.form-control[readonly]:not([multiple]):not([size]),
    body.app-premium select.custom-select:disabled:not([multiple]):not([size]),
    body.app-premium select.custom-select[readonly]:not([multiple]):not([size]) {
        background-color: #F6F5FA !important;
        color: #1A1630 !important;
        opacity: 1 !important;
    }

    body.app-premium select.form-control:disabled option,
    body.app-premium select.form-control:disabled option:checked,
    body.app-premium select.form-control[readonly] option,
    body.app-premium select.form-control[readonly] option:checked,
    body.app-premium select.custom-select:disabled option,
    body.app-premium select.custom-select:disabled option:checked,
    body.app-premium select.custom-select[readonly] option,
    body.app-premium select.custom-select[readonly] option:checked {
        background: #F6F5FA !important;
        background-color: #F6F5FA !important;
        color: #1A1630 !important;
    }

    body.app-premium select.form-control:not([multiple]):not([size])::picker(select),
    body.app-premium select.custom-select:not([multiple]):not([size])::picker(select),
    body.app-premium .dataTables_wrapper .dataTables_length select::picker(select) {
        margin-top: 4px;
        padding: 4px;
        border: 1px solid #DDD8EA;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 12px 28px rgba(44, 32, 72, .08);
    }

    body.app-premium select.form-control:not([multiple]):not([size])::picker-icon,
    body.app-premium select.custom-select:not([multiple]):not([size])::picker-icon,
    body.app-premium .dataTables_wrapper .dataTables_length select::picker-icon {
        display: none;
    }

    body.app-premium select.form-control option,
    body.app-premium select.custom-select option,
    body.app-premium .dataTables_wrapper .dataTables_length select option {
        min-height: 0;
        padding: 8px 12px;
        border-radius: 6px;
        background: #fff;
        color: #2C2840;
        font-size: .88rem;
        font-weight: 400;
    }

    body.app-premium select.form-control option:checked,
    body.app-premium select.custom-select option:checked,
    body.app-premium .dataTables_wrapper .dataTables_length select option:checked {
        background: #F3F1FE;
        color: #2C2840;
    }

    body.app-premium select.form-control option:hover,
    body.app-premium select.form-control option:focus,
    body.app-premium select.custom-select option:hover,
    body.app-premium select.custom-select option:focus,
    body.app-premium .dataTables_wrapper .dataTables_length select option:hover,
    body.app-premium .dataTables_wrapper .dataTables_length select option:focus,
    body.app-premium select.form-control option:checked:hover,
    body.app-premium select.custom-select option:checked:hover,
    body.app-premium .dataTables_wrapper .dataTables_length select option:checked:hover {
        background: #7C6CF2;
        color: #fff;
    }

    body.app-premium select.form-control option::checkmark,
    body.app-premium select.custom-select option::checkmark,
    body.app-premium .dataTables_wrapper .dataTables_length select option::checkmark {
        display: none;
    }
}

body.app-premium .bootstrap-select > .dropdown-toggle {
    border-radius: 10px !important;
    border: 1px solid #DDD8EA !important;
    background: #fff !important;
    min-height: 40px;
}

body.app-premium .dropify-wrapper {
    border-radius: 12px;
    border: 1px dashed #D5D0E6;
    background: #F4F1FC;
}

body.app-premium .note-editor.note-frame {
    border: 1px solid #DDD8EA;
    border-radius: 12px;
    overflow: hidden;
}

/* ---------- Tables ---------- */
body.app-premium .table {
    color: var(--p-text);
    font-size: .9rem;
}

body.app-premium .table thead th {
    background: #F6F5FB !important;
    color: #1A1630 !important;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: none;
    border-bottom: 1px solid var(--p-border) !important;
    border-top: 0 !important;
    padding: 6px 8px !important;
}

body.app-premium .table tbody td,
body.app-premium .table tbody th,
body.app-premium .table tfoot th,
body.app-premium .table tfoot td {
    border-color: #F0EDF6 !important;
    padding: 6px 8px !important;
    color: var(--p-text);
    vertical-align: middle !important;
}

body.app-premium .table-striped tbody tr:nth-of-type(odd) {
    background: #F8F5FF;
}

body.app-premium .table-hover tbody tr:hover {
    background: #F4F1FC !important;
}

body.app-premium .table-bordered,
body.app-premium .table-bordered th,
body.app-premium .table-bordered td {
    border-color: #EFEBF6 !important;
}

body.app-premium .dataTables_wrapper .dataTables_filter input,
body.app-premium .dataTables_wrapper .dataTables_length select {
    border: 1px solid #DDD8EA !important;
    border-radius: 10px !important;
    min-height: 36px;
    padding: .3rem .65rem !important;
    background: #fff !important;
    color: var(--p-text);
}

body.app-premium .dataTables_wrapper .dataTables_filter input:focus,
body.app-premium .dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--p-primary) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 108, 242,   .16);
}

body.app-premium .dataTables_wrapper .dataTables_info,
body.app-premium .dataTables_wrapper .dataTables_length,
body.app-premium .dataTables_wrapper .dataTables_filter {
    color: var(--p-muted);
    font-size: .84rem;
}

body.app-premium .dataTables_wrapper .dataTables_processing {
    border-radius: 12px !important;
    border: 1px solid var(--p-border) !important;
    color: var(--p-sidebar) !important;
    box-shadow: 0 8px 24px rgba(44, 32, 72, .08) !important;
}

body.app-premium .page-item .page-link {
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    color: var(--p-sidebar) !important;
    background: transparent;
    margin: 0 2px;
}

body.app-premium .page-item.active .page-link {
    background: var(--p-primary) !important;
    border-color: var(--p-primary) !important;
    color: #fff !important;
}

body.app-premium .page-item .page-link:hover {
    background: var(--p-primary-soft);
}

body.app-premium .badge {
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: .01em;
    padding: .38em .7em;
}

body.app-premium .badge-primary { background: #EDE9FE; color: #3A2C92; }
body.app-premium .badge-success { background: #E5F6EE; color: #1F7A52; }
body.app-premium .badge-info { background: #E8EEF8; color: #3D4E86; }
body.app-premium .badge-warning { background: #FBF3E0; color: #8A6412; }
body.app-premium .badge-danger { background: #FDECEC; color: #B4232C; }
body.app-premium .badge-secondary,
body.app-premium .badge-dark { background: #F1EFF6; color: #4E4864; }

/* ---------- Modals, alerts, SweetAlert ---------- */
body.app-premium .modal-dialog {
    max-width: 440px;
}

body.app-premium .modal-dialog.modal-xl,
body.app-premium .modal-dialog.modal-lg {
    max-width: 720px;
}

body.app-premium .modal-dialog.modal-l,
body.app-premium .modal[id*="delete"] .modal-dialog {
    max-width: 420px;
}

body.app-premium .modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: calc(100vh - 1.5rem);
    border: 1px solid #E7E4F2 !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 18px 50px rgba(24, 16, 48, .18);
    overflow: hidden;
}

body.app-premium .modal-content::before {
    content: "";
    display: block;
    flex: 0 0 auto;
    height: 2px;
    background: #7C6CF2;
}

body.app-premium .modal-header,
body.app-premium .modal-footer {
    flex: 0 0 auto;
}

body.app-premium .modal-header {
    align-items: center;
    background: #fff !important;
    color: #1A1630 !important;
    border-bottom: 1px solid #EEEAF6 !important;
    padding: 10px 14px;
}

body.app-premium .modal-title {
    color: #1A1630;
    font-weight: 650;
    font-size: .98rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

body.app-premium .modal-header .close {
    width: 26px;
    height: 26px;
    margin: 0 0 0 12px;
    padding: 0;
    border-radius: 8px;
    background: #F4F2F8;
    color: #3A3550;
    text-shadow: none;
    opacity: 1;
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
}

body.app-premium .modal-header .close:hover {
    background: #E8E4F2;
    color: #1A1630;
    opacity: 1;
}

body.app-premium .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 14px 6px;
    background: #fff;
}

body.app-premium .modal-body > .col-12 {
    padding-left: 0;
    padding-right: 0;
}

body.app-premium .modal-body > .col-12 > p:first-child:not(.form-section),
body.app-premium .modal-body > div > p:first-child:not(.form-section) {
    margin: 0 0 10px;
    color: #6B657C;
    font-size: .78rem;
    font-weight: 500;
    line-height: 1.4;
}

body.app-premium .modal-body .form-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 8px !important;
    color: #5E4B8B !important;
    font-size: .68rem !important;
    font-weight: 700 !important;
    letter-spacing: .12em;
    text-transform: uppercase;
}

body.app-premium .modal-body .col-12 > .form-section:first-child {
    margin-top: 0 !important;
}

body.app-premium .modal-body .form-section::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 2px;
    background: #7C6CF2;
}

body.app-premium .modal-body .form-section::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #E7E4F2;
}

body.app-premium .modal .form-control:not(textarea),
body.app-premium .modal .custom-select {
    min-height: 34px !important;
    height: 34px;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    font-size: .84rem;
}

body.app-premium .modal textarea.form-control {
    min-height: 72px !important;
    height: auto !important;
    border-radius: 8px !important;
    font-size: .84rem;
}

body.app-premium .modal .select2.select2-container {
    width: 100% !important;
    max-width: 100%;
}

body.app-premium .modal .select2-container--default .select2-selection--single {
    min-height: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
}

body.app-premium .modal .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 32px !important;
    font-size: .84rem;
    padding-left: 10px !important;
    color: #1A1630;
}

body.app-premium .modal .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
}

body.app-premium .modal .select2-container--default .select2-selection--multiple {
    min-height: 34px !important;
    border-radius: 8px !important;
}

body.app-premium .modal abbr.color-red,
body.app-premium .modal .color-red {
    color: #D92D20;
    text-decoration: none;
    font-weight: 700;
}

/* Label + input tables become a compact two-column form. */
body.app-premium .modal-body table.table-striped.table-bordered:not(.table-hover):not(.pf-form):not(.pf-lines):not(.uom-table):not(:has(thead)) {
    display: block;
    width: 100%;
    margin: 0 0 4px;
    background: transparent !important;
    border: 0 !important;
}

body.app-premium .modal-body table.table-striped.table-bordered:not(.table-hover):not(.pf-form):not(.pf-lines):not(.uom-table):not(:has(thead)) tbody {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px 12px;
    width: 100%;
}

body.app-premium .modal-body table.table-striped.table-bordered:not(.table-hover):not(.pf-form):not(.pf-lines):not(.uom-table):not(:has(thead)) tr {
    display: block;
    min-width: 0;
    border: 0 !important;
    background: transparent !important;
}

body.app-premium .modal-body tr.modal-span {
    grid-column: 1 / -1;
}

body.app-premium .modal-body table.table-striped.table-bordered:not(.table-hover):not(.pf-form):not(.pf-lines):not(.uom-table):not(:has(thead)) tr:has(textarea),
body.app-premium .modal-body table.table-striped.table-bordered:not(.table-hover):not(.pf-form):not(.pf-lines):not(.uom-table):not(:has(thead)) tr:has(input[type="checkbox"]),
body.app-premium .modal-body table.table-striped.table-bordered:not(.table-hover):not(.pf-form):not(.pf-lines):not(.uom-table):not(:has(thead)) tr:has(input[type="radio"]),
body.app-premium .modal-body table.table-striped.table-bordered:not(.table-hover):not(.pf-form):not(.pf-lines):not(.uom-table):not(:has(thead)) tr:has(input[type="file"]),
body.app-premium .modal-body table.table-striped.table-bordered:not(.table-hover):not(.pf-form):not(.pf-lines):not(.uom-table):not(:has(thead)) tr:has(.dropify-wrapper),
body.app-premium .modal-body table.table-striped.table-bordered:not(.table-hover):not(.pf-form):not(.pf-lines):not(.uom-table):not(:has(thead)) tr:has(.row),
body.app-premium .modal-body table.table-striped.table-bordered:not(.table-hover):not(.pf-form):not(.pf-lines):not(.uom-table):not(:has(thead)) tr:has(table) {
    grid-column: 1 / -1;
}

body.app-premium .modal-body tr.fb-subject-note {
    display: none !important;
}

body.app-premium .modal-body tr.fb-subject-note.is-on {
    display: block !important;
    grid-column: 1 / -1;
}

#portal_request_row_edit {
    display: none !important;
}

#portal_request_row_edit.is-on {
    display: block !important;
    grid-column: 1 / -1;
}

#portal_request_edit {
    white-space: normal;
    overflow-wrap: anywhere;
}

body.app-premium .modal-body table.table-striped.table-bordered:not(.table-hover):not(.pf-form):not(.pf-lines):not(.uom-table):not(:has(thead)) tr:has(input[type="hidden"]):not(:has(input:not([type="hidden"]))):not(:has(select)):not(:has(textarea)) {
    display: none;
}

body.app-premium .modal-body table.table-striped.table-bordered:not(.table-hover):not(.pf-form):not(.pf-lines):not(.uom-table):not(:has(thead)) td {
    display: block;
    width: auto !important;
    max-width: 100%;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #1A1630 !important;
    white-space: normal;
}

body.app-premium .modal-body table.table-striped.table-bordered:not(.table-hover):not(.pf-form):not(.pf-lines):not(.uom-table):not(:has(thead)) small.text-muted {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    color: #6B657F !important;
    white-space: normal;
    overflow-wrap: anywhere;
}

body.app-premium .modal-body table.table-striped.table-bordered:not(.table-hover):not(.pf-lines):not(.uom-table) > tbody > tr > td:first-child,
body.app-premium .modal-body table.table-bordered > tbody > tr > td.bg-light,
body.app-premium .modal .pf-form td:first-child {
    margin-bottom: 4px;
    font-size: .84rem !important;
    font-weight: 700 !important;
    letter-spacing: 0;
    color: #111 !important;
}

body.app-premium .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid #EEEAF6 !important;
    background: #FAFAFC !important;
    padding: 10px 14px;
}

body.app-premium .modal-footer .btn {
    width: auto !important;
    flex: 0 0 auto !important;
    max-width: none !important;
    min-height: 34px;
    margin: 0 !important;
    padding: 0 14px !important;
    border-radius: 8px !important;
    font-size: .84rem;
    font-weight: 650;
    line-height: 1;
}

body.app-premium .modal-footer .btn-outline,
body.app-premium .modal-footer .btn[data-dismiss="modal"] {
    background: #fff !important;
    border: 1px solid #E4E0EE !important;
    color: #3A3550 !important;
    box-shadow: none !important;
}

body.app-premium .modal-footer .btn-outline:hover,
body.app-premium .modal-footer .btn[data-dismiss="modal"]:hover {
    background: #F6F5FA !important;
    color: #1A1630 !important;
}

body.app-premium .modal-footer .btn-info,
body.app-premium .modal-footer .btn-primary,
body.app-premium .modal-footer .btn-success {
    background: #5E4B8B !important;
    border-color: #5E4B8B !important;
    color: #fff !important;
}

body.app-premium .modal-footer .btn-info:hover,
body.app-premium .modal-footer .btn-primary:hover,
body.app-premium .modal-footer .btn-success:hover {
    background: #4A3A74 !important;
    border-color: #4A3A74 !important;
}

body.app-premium .modal-footer .btn-danger {
    background: #D92D20 !important;
    border-color: #D92D20 !important;
    color: #fff !important;
}

body.app-premium .modal-footer .btn-danger:hover {
    background: #B42318 !important;
    border-color: #B42318 !important;
}

body.app-premium .modal-footer .btn-warning {
    background: #B7791F !important;
    border-color: #B7791F !important;
    color: #fff !important;
}

body.app-premium .modal[id*="delete"] .modal-content::before {
    background: #D92D20;
}

body.app-premium .modal[id*="delete"] .modal-header {
    background: #FFFBFA !important;
}

body.app-premium .modal[id*="delete"] .modal-body > .col-12 > p:first-child,
body.app-premium .modal[id*="delete"] .modal-body > div > p:first-child {
    margin: 2px 0 8px;
    padding: 10px 12px;
    border: 1px solid #F8D4D2;
    border-radius: 10px;
    background: #FEF3F2;
    color: #7A271A;
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.45;
}

body.app-premium .modal-backdrop.show {
    opacity: 1;
    background: rgba(18, 12, 32, .46);
    backdrop-filter: blur(2px);
}

@media (max-width: 767.98px) {
    body.app-premium .modal-dialog,
    body.app-premium .modal-dialog.modal-xl,
    body.app-premium .modal-dialog.modal-lg,
    body.app-premium .modal-dialog.modal-l,
    body.app-premium .modal[id*="delete"] .modal-dialog {
        max-width: calc(100% - 1rem);
        margin: .5rem auto;
    }

    body.app-premium .modal-body table.table-striped.table-bordered:not(.table-hover):not(.pf-form):not(.pf-lines):not(.uom-table):not(:has(thead)) tbody {
        grid-template-columns: minmax(0, 1fr);
    }
}

body.app-premium .alert {
    border: 0;
    border-radius: 12px;
    font-size: .9rem;
}

body.app-premium .alert-success {
    background: #E8F6EF;
    color: #176347;
}

body.app-premium .alert-danger {
    background: #FDECEC;
    color: #9F2430;
}

body.app-premium .alert-warning {
    background: #FBF4E4;
    color: #7A5A10;
}

body.app-premium .alert-info {
    background: #EEF0FA;
    color: #3A4580;
}

body.app-premium .swal2-popup {
    border-radius: 14px !important;
    padding: 1.15rem 1.1rem 1rem !important;
    font-family: var(--p-font);
}

body.app-premium .swal2-title {
    color: var(--p-text) !important;
    font-size: 1.05rem !important;
}

body.app-premium .swal2-content,
body.app-premium .swal2-html-container {
    color: var(--p-muted) !important;
}

body.app-premium .swal2-styled.swal2-confirm {
    background: var(--p-primary) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    min-height: 34px;
    font-size: .86rem !important;
}

body.app-premium .swal2-styled.swal2-cancel {
    background: #F6F5FA !important;
    color: var(--p-text) !important;
    border-radius: 8px !important;
    min-height: 34px;
    font-size: .86rem !important;
}

/* ---------- Tabs, footer, misc ---------- */
body.app-premium .nav-tabs {
    border-bottom: 1px solid var(--p-border);
}

body.app-premium .nav-tabs .nav-link {
    border: 0;
    color: var(--p-muted);
    font-weight: 600;
    border-radius: 0;
    padding: .7rem 1rem;
}

body.app-premium .nav-tabs .nav-link.active {
    color: var(--p-sidebar);
    background: transparent;
    border-bottom: 2px solid var(--p-primary);
}

body.app-premium .footer {
    background: transparent;
    color: var(--p-muted);
    border-top: 1px solid transparent;
    padding: 14px 24px 22px;
    font-size: .82rem;
}
body.app-premium .footer a {
    margin-left: 12px;
    color: var(--p-primary, #5E4B8B);
}

body.app-premium,
body.app-premium * {
    scrollbar-width: thin;
    scrollbar-color: rgba(94, 75, 139,   .4) transparent;
}

body.app-premium ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

body.app-premium ::-webkit-scrollbar-track,
body.app-premium ::-webkit-scrollbar-corner {
    background: transparent;
}

body.app-premium ::-webkit-scrollbar-thumb {
    background: rgba(94, 75, 139,   .28);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

body.app-premium ::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 108, 242,   .55);
    border: 3px solid transparent;
    background-clip: padding-box;
}

body.app-premium .scroll-sidebar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body.app-premium .scroll-sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

body.app-premium .scroll-sidebar > .ps__scrollbar-x-rail,
body.app-premium .scroll-sidebar > .ps__scrollbar-y-rail {
    display: none !important;
}

body.app-premium .bg-light {
    background: #F6F5FB !important;
}

/* Dashboard */
body.app-premium .stat-card {
    padding: 10px 12px !important;
}

body.app-premium .stat-card label {
    color: var(--p-muted);
    font-size: .78rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

body.app-premium .stat-card h2 {
    color: var(--p-text);
    font-weight: 650;
    letter-spacing: -0.03em;
    margin: 0;
}

body.app-premium .appointment-funnel .funnel-item {
    border-radius: 12px;
    background: #F6F5FB;
    color: var(--p-text);
    border: 1px solid var(--p-border);
}

body.app-premium .appointment-funnel .funnel-item label,
body.app-premium .appointment-funnel .funnel-item h3 {
    color: var(--p-text);
    margin-bottom: 0;
}

body.app-premium .appointment-funnel .funnel-item h3 {
    margin-top: 4px;
    font-weight: 650;
}

body.app-premium .appointment-funnel .is-pending { background: #FBF4E4; border-color: #F3E4C2; }
body.app-premium .appointment-funnel .is-confirmed { background: #EEF0FA; border-color: #DDE2F4; }
body.app-premium .appointment-funnel .is-completed { background: #E8F6EF; border-color: #D3EDE2; }
body.app-premium .appointment-funnel .is-cancelled { background: #FDECEC; border-color: #F6D6D8; }
body.app-premium .appointment-funnel .is-rate { background: #F3F1FE; border-color: #E3DEF6; }

/* ---------- Auth ---------- */
body.auth-page {
    margin: 0;
    min-height: 100vh;
    color: #2C2840;
    font-family: var(--p-font);
    background: #F7F7FC !important;
}

body.auth-page .preloader {
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F7F7FC;
}

body.auth-page .theme-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

body.auth-page .theme-loader-orb {
    position: relative;
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
}

body.auth-page .theme-loader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(124, 108, 242, .18);
    border-top-color: #7C6CF2;
    border-right-color: #A78BFA;
    animation: theme-spin .9s linear infinite;
}

body.auth-page .theme-loader-mark {
    position: relative;
    z-index: 1;
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 18px rgba(94, 75, 139, .16);
}

body.auth-page .theme-loader-label {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #5E4B8B;
    white-space: nowrap;
}

@keyframes theme-spin {
    to { transform: rotate(360deg); }
}

.gate {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(280px, 38%) 1fr;
}

.gate-side {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 56px 48px;
    color: #F7F4FF;
    background:
        radial-gradient(520px 380px at 12% 108%, rgba(124, 108, 242, .55), transparent 68%),
        radial-gradient(340px 260px at 100% 0%, rgba(255, 255, 255, .14), transparent 62%),
        #5E4B8B;
}

.gate-side:before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -70px;
    bottom: 18%;
    border-radius: 50%;
    border: 40px solid rgba(255, 255, 255, .06);
    pointer-events: none;
}

.gate-side-inner {
    position: relative;
    z-index: 1;
    max-width: 280px;
}

.gate-logo {
    width: 84px;
    height: 84px;
    object-fit: contain;
    padding: 6px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(44, 40, 64, .18);
}

.gate-side-name {
    margin: 22px 0 0;
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #fff;
}

.gate-side-note {
    margin: 8px 0 0;
    max-width: 240px;
    font-size: 14px !important;
    line-height: 1.5;
    color: rgba(247, 244, 255, .74);
}

.gate-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: #F7F7FC;
}

.gate-form {
    width: min(420px, 100%);
}

.gate-kicker {
    margin: 0 0 10px;
    font-size: 12px !important;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #7C6CF2;
}

.gate-form h1 {
    margin: 0;
    font-size: 36px;
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #2C2840;
}

.gate-lead {
    margin: 10px 0 26px;
    max-width: 360px;
    font-size: 15px !important;
    line-height: 1.55;
    color: #1A1630;
}

.gate-form .alert {
    border: 0;
    border-radius: 12px;
    font-size: 13.5px;
}

.gate-field {
    margin-bottom: 16px;
}

.gate-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .04em;
    color: #1A1630;
}

body.auth-page .gate-form .form-control {
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 14px !important;
    border: 1px solid #E7E4F2 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
    color: #2C2840 !important;
    font-size: 15px !important;
    caret-color: #5E4B8B;
}

body.auth-page .gate-form .form-control::-webkit-input-placeholder {
    color: #1A1630 !important;
}

body.auth-page .gate-form .form-control::placeholder {
    color: #1A1630 !important;
    font-size: 15px !important;
}

body.auth-page .gate-form .form-control:focus {
    border-color: #7C6CF2 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(124, 108, 242, .16) !important;
}

body.auth-page .gate-form .form-control:-webkit-autofill {
    -webkit-text-fill-color: #2C2840;
    box-shadow: 0 0 0 1000px #fff inset !important;
}

body.auth-page .gate-submit {
    width: 100%;
    height: 48px;
    margin-top: 8px;
    border: 0 !important;
    border-radius: 12px !important;
    background: #7C6CF2 !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 650 !important;
    float: none !important;
    transform: none !important;
    box-shadow: none !important;
}

body.auth-page .gate-submit:hover,
body.auth-page .gate-submit:focus {
    background: #6858e4 !important;
    color: #fff !important;
    transform: none !important;
    box-shadow: none !important;
}

.gate-roles {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(46vh, 360px);
    overflow-y: auto;
    margin: 0 0 18px;
    padding-right: 2px;
}

.gate-role {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #E7E4F2;
    border-radius: 14px;
    background: #fff;
    color: #2C2840;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.gate-role:hover {
    border-color: #C9C2EA;
    background: #F3F1FE;
}

.gate-role.is-active {
    border-color: #7C6CF2;
    background: #F3F1FE;
    box-shadow: 0 0 0 3px rgba(124, 108, 242, .12);
}

.gate-radio {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border-radius: 50%;
    border: 2px solid #C9C2EA;
    background: #fff;
}

.gate-role.is-active .gate-radio {
    border-color: #7C6CF2;
    background: radial-gradient(circle, #7C6CF2 0 5px, #fff 6px);
}

.gate-role-copy {
    min-width: 0;
    flex: 1;
}

.gate-role-name {
    display: block;
    font-size: 15px;
    font-weight: 650;
}

.gate-role-kind {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #1A1630;
}

.gate-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.gate-link {
    color: #1A1630;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.gate-link:hover {
    color: #5E4B8B;
    text-decoration: none;
}

.gate-actions .gate-submit {
    width: auto;
    min-width: 150px;
    margin-top: 0;
    padding: 0 22px !important;
}

@media (max-width: 860px) {
    .gate {
        grid-template-columns: 1fr;
    }

    .gate-side {
        align-items: center;
        min-height: 0;
        padding: 28px 22px;
    }

    .gate-side:before {
        display: none;
    }

    .gate-side-inner {
        display: flex;
        align-items: center;
        gap: 14px;
        max-width: none;
    }

    .gate-logo {
        width: 56px;
        height: 56px;
        border-radius: 16px;
        padding: 4px;
    }

    .gate-side-name {
        margin: 0;
        font-size: 18px;
    }

    .gate-side-note {
        display: none;
    }

    .gate-main {
        align-items: flex-start;
        padding: 28px 22px 40px;
    }

    .gate-form h1 {
        font-size: 30px;
    }
}

/* Login: purple field. Select-access keeps the split .gate layout. */
body.auth-signin,
body.auth-page:has(.signin),
body.auth-signin .preloader,
body.auth-page:has(.signin) .preloader {
    background: #4E3D7A !important;
}

body.auth-signin .theme-loader-ring,
body.auth-page:has(.signin) .theme-loader-ring {
    border-color: rgba(255, 255, 255, .16);
    border-top-color: #fff;
    border-right-color: #DDD6FE;
}

body.auth-signin .theme-loader-mark,
body.auth-page:has(.signin) .theme-loader-mark {
    box-shadow: 0 8px 20px rgba(20, 8, 40, .28);
}

body.auth-signin .theme-loader-label,
body.auth-page:has(.signin) .theme-loader-label {
    color: rgba(255, 255, 255, .88);
}

.signin {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    overflow: hidden;
    background:
        radial-gradient(720px 420px at 88% -8%, rgba(167, 139, 250, .55), transparent 58%),
        radial-gradient(560px 420px at -12% 110%, rgba(94, 75, 139, .45), transparent 62%),
        #4E3D7A;
}

.signin::before,
.signin::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.signin::before {
    width: 280px;
    height: 280px;
    right: -80px;
    bottom: -60px;
    border: 48px solid rgba(255, 255, 255, .06);
}

.signin::after {
    width: 160px;
    height: 160px;
    left: -40px;
    top: 8%;
    background: rgba(255, 255, 255, .05);
}

.signin-card {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    padding: 34px 32px 28px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(24, 12, 48, .32);
    backdrop-filter: blur(10px);
}

.signin-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.signin-logo {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    object-fit: cover;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 18px rgba(94, 75, 139, .14);
}

.signin-kicker {
    margin: 0 0 2px;
    font-size: 12px !important;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .72);
}

.signin-card h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #fff;
}

.signin-lead {
    margin: 0 0 22px;
    font-size: 14.5px !important;
    line-height: 1.5;
    color: rgba(255, 255, 255, .74);
}

.signin-card .alert {
    border: 0;
    border-radius: 12px;
    font-size: 13.5px;
}

.signin-field {
    margin-bottom: 14px;
}

.signin-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 650;
    color: #fff;
}

body.auth-page .signin-card .form-control {
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 14px !important;
    border: 1px solid #E4DFEF !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
    color: #2C2840 !important;
    font-size: 15px !important;
    caret-color: #5E4B8B;
}

body.auth-page .signin-card .form-control::placeholder {
    color: #1A1630 !important;
    font-size: 15px !important;
}

body.auth-page .signin-card .form-control:focus {
    border-color: #7C6CF2 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(124, 108, 242, .14) !important;
}

body.auth-page .signin-card .form-control:-webkit-autofill {
    -webkit-text-fill-color: #2C2840;
    box-shadow: 0 0 0 1000px #fff inset !important;
}

.signin-password {
    position: relative;
}

body.auth-page .signin-password .form-control {
    padding-right: 72px !important;
}

.signin-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: #F3F1FE;
    color: #5E4B8B;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
}

.signin-toggle:hover,
.signin-toggle:focus {
    background: #E7E2FB;
    outline: none;
}

body.auth-page .signin-submit {
    width: 100%;
    height: 48px;
    margin-top: 8px;
    border: 0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #4E3D7A !important;
    font-size: 15px !important;
    font-weight: 650 !important;
    float: none !important;
    box-shadow: none !important;
}

body.auth-page .signin-submit:hover,
body.auth-page .signin-submit:focus {
    background: #F3F1FE !important;
    color: #4E3D7A !important;
    box-shadow: none !important;
}

.tfa-card {
    width: min(560px, 100%);
}

.tfa-card .signin-brand {
    margin-bottom: 12px;
}

.tfa-card h1 {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.2;
}

.tfa-panel {
    margin-bottom: 8px;
    padding: 18px 18px 8px;
    border-radius: 16px;
    background: #fff;
    color: #2C2840;
}

.tfa-steps {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tfa-steps > li {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.tfa-num {
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    margin-top: 1px;
    border-radius: 50%;
    background: #4E3D7A;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.tfa-steps h2 {
    margin: 0 0 4px;
    color: #2C2840;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.3;
}

.tfa-steps p {
    margin: 0 0 10px;
    color: #5C5670;
    font-size: 13.5px !important;
    line-height: 1.45;
}

.tfa-qr {
    display: flex;
    justify-content: center;
    margin: 4px 0 2px;
    padding: 10px;
    border: 1px solid #E4DFEF;
    border-radius: 14px;
    background: #fff;
}

.tfa-qr svg {
    display: block;
    width: 196px;
    height: 196px;
}

.tfa-codes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tfa-codes code {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    background: #F3F1FE;
    color: #2C2840;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    letter-spacing: 0;
    word-break: break-all;
}

.tfa-panel .signin-field label {
    color: #2C2840;
}

body.auth-page .tfa-panel .signin-submit {
    background: #4E3D7A !important;
    color: #fff !important;
}

body.auth-page .tfa-panel .signin-submit:hover,
body.auth-page .tfa-panel .signin-submit:focus {
    background: #3F3164 !important;
    color: #fff !important;
}

.tfa-signout {
    margin: 14px 0 0;
    text-align: center;
}

.tfa-signout button {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 12px;
    background: transparent;
    color: #fff;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
}

.tfa-signout button:hover,
.tfa-signout button:focus {
    color: #fff;
    outline: none;
}

@media (max-width: 480px) {
    .tfa-card h1 {
        font-size: 24px;
    }

    .tfa-codes {
        grid-template-columns: 1fr;
    }

    .tfa-panel {
        padding: 14px 12px 4px;
    }
}

@media (max-width: 480px) {
    .signin {
        align-items: flex-start;
        padding: 20px 14px 28px;
    }

    .signin-card {
        padding: 28px 18px 22px;
        border-radius: 18px;
    }

    .signin-logo {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }

    .signin-card h1 {
        font-size: 24px;
    }
}

/* ---------- Auth motion ---------- */
@keyframes auth-rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes auth-card {
    from {
        opacity: 0;
        transform: translateY(22px) scale(.985);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes auth-pop {
    from {
        opacity: 0;
        transform: scale(.86);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes auth-drift {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(14px, -18px, 0); }
}

@keyframes auth-drift-alt {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-16px, 12px, 0) scale(1.06); }
}

.signin-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.signin-orb-a {
    width: 180px;
    height: 180px;
    top: 10%;
    left: 7%;
    background: rgba(255, 255, 255, .07);
    animation: auth-drift 11s ease-in-out infinite;
}

.signin-orb-b {
    width: 96px;
    height: 96px;
    right: 11%;
    bottom: 16%;
    background: rgba(167, 139, 250, .32);
    animation: auth-drift-alt 8.5s ease-in-out infinite;
}

.signin-orb-c {
    width: 42px;
    height: 42px;
    top: 20%;
    right: 24%;
    background: rgba(255, 255, 255, .14);
    animation: auth-drift 7s ease-in-out infinite;
    animation-delay: -2s;
}

.signin::before {
    animation: auth-drift-alt 13s ease-in-out infinite;
}

.signin::after {
    animation: auth-drift 9s ease-in-out infinite;
}

.signin-card {
    animation: auth-card .7s cubic-bezier(.22, 1, .36, 1) backwards;
}

.signin-logo {
    animation: auth-pop .65s .08s cubic-bezier(.22, 1, .36, 1) backwards;
}

.signin-brand,
.signin-lead,
.signin-card .alert,
.signin-field,
.signin-submit {
    animation: auth-rise .55s cubic-bezier(.22, 1, .36, 1) backwards;
}

.signin-brand { animation-delay: .08s; }
.signin-lead { animation-delay: .16s; }
.signin-card .alert { animation-delay: .2s; }
.signin-field:nth-of-type(1) { animation-delay: .24s; }
.signin-field:nth-of-type(2) { animation-delay: .32s; }
.signin-submit { animation-delay: .4s; }

body.auth-page .signin-submit,
body.auth-page .gate-submit,
.gate-role {
    transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

body.auth-page .signin-submit:hover,
body.auth-page .signin-submit:focus {
    transform: translateY(-1px) !important;
}

.gate-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.gate-orb-a {
    width: 160px;
    height: 160px;
    top: -40px;
    left: -30px;
    background: rgba(255, 255, 255, .08);
    animation: auth-drift 12s ease-in-out infinite;
}

.gate-orb-b {
    width: 70px;
    height: 70px;
    right: 18%;
    bottom: 14%;
    background: rgba(167, 139, 250, .35);
    animation: auth-drift-alt 9s ease-in-out infinite;
}

.gate-side:before {
    animation: auth-drift-alt 16s ease-in-out infinite;
}

.gate-logo,
.gate-side-name,
.gate-side-note {
    animation: auth-rise .6s cubic-bezier(.22, 1, .36, 1) backwards;
}

.gate-logo {
    animation-name: auth-pop;
    animation-delay: .06s;
}

.gate-side-name { animation-delay: .14s; }
.gate-side-note { animation-delay: .2s; }

.gate-kicker,
.gate-form h1,
.gate-lead,
.gate-form .alert,
.gate-role,
.gate-actions {
    animation: auth-rise .55s cubic-bezier(.22, 1, .36, 1) backwards;
}

.gate-kicker { animation-delay: .1s; }
.gate-form h1 { animation-delay: .16s; }
.gate-lead { animation-delay: .22s; }
.gate-form .alert { animation-delay: .26s; }
.gate-role:nth-child(1) { animation-delay: .28s; }
.gate-role:nth-child(2) { animation-delay: .34s; }
.gate-role:nth-child(3) { animation-delay: .4s; }
.gate-role:nth-child(4) { animation-delay: .46s; }
.gate-role:nth-child(5) { animation-delay: .52s; }
.gate-role:nth-child(6) { animation-delay: .58s; }
.gate-role:nth-child(n+7) { animation-delay: .64s; }
.gate-actions { animation-delay: .7s; }

.gate-role:hover {
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .signin-orb,
    .signin::before,
    .signin::after,
    .signin-card,
    .signin-logo,
    .signin-brand,
    .signin-lead,
    .signin-card .alert,
    .signin-field,
    .signin-submit,
    .gate-orb,
    .gate-side:before,
    .gate-side-inner,
    .gate-logo,
    .gate-side-name,
    .gate-side-note,
    .gate-kicker,
    .gate-form h1,
    .gate-lead,
    .gate-form .alert,
    .gate-role,
    .gate-actions,
    body.auth-page .theme-loader-ring {
        animation: none !important;
    }
}

@media (max-width: 767.98px) {
    body.app-premium .topbar .top-navbar .navbar-header {
        width: auto;
        padding: 0 10px;
    }

    body.app-premium .container-fluid {
        padding: 4px 12px 20px;
    }

    body.app-premium .page-wrapper .page-titles {
        min-height: 0;
        padding: 8px 10px !important;
        margin: 2px 0 14px !important;
        border-radius: 14px !important;
    }

    body.app-premium .page-wrapper .page-titles h4 {
        font-size: 1.16rem !important;
    }

    body.app-premium .page-wrapper .page-titles .text-right,
    body.app-premium .page-wrapper .page-titles .d-flex.justify-content-end {
        text-align: left !important;
        justify-content: flex-start !important;
        margin-top: 8px;
    }

    body.app-premium .page-wrapper .page-titles .breadcrumb {
        padding: 2px 4px 2px 6px !important;
    }

    body.app-premium .card-body,
    body.app-premium .card-header,
    body.app-premium .card-footer,
    body.app-premium .stat-card {
        padding: 10px 12px !important;
    }

    body.app-premium .modal-dialog {
        margin: 10px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    body.app-premium .container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* =========================================================
   MOBILE SHELL
   Phone layout for the top bar, page heading, card actions,
   and datatable controls. Desktop rules above stay as they are.
   ========================================================= */
@media (max-width: 767.98px) {
    body.app-premium .topbar,
    body.app-premium .topbar .top-navbar,
    body.app-premium .topbar .navbar,
    body.app-premium .navbar.navbar-dark {
        height: 56px !important;
        min-height: 56px !important;
        max-height: 56px !important;
    }

    body.app-premium.fixed-layout .page-wrapper,
    body.app-premium.fixed-header .page-wrapper {
        padding-top: 56px;
    }

    body.app-premium .topbar .top-navbar {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }

    body.app-premium .topbar .top-navbar .navbar-header {
        width: auto !important;
        flex: 0 0 auto !important;
        height: 56px !important;
        min-height: 56px !important;
        max-height: 56px !important;
        line-height: 1 !important;
        padding: 0 4px 0 12px !important;
        background: transparent !important;
    }

    body.app-premium .topbar .top-navbar .navbar-header .navbar-brand {
        gap: 0;
        height: 56px;
        margin: 0;
    }

    body.app-premium .topbar .top-navbar .navbar-header .navbar-brand b {
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        line-height: 0 !important;
    }

    body.app-premium .topbar .top-navbar .navbar-header .navbar-brand .brand-mark {
        width: 34px;
        height: 34px;
    }

    body.app-premium .topbar .brand-word {
        display: none !important;
    }

    body.app-premium .navbar-collapse {
        display: flex !important;
        flex: 1 1 auto;
        align-items: center;
        justify-content: space-between;
        height: 56px !important;
        min-height: 56px !important;
        max-height: 56px !important;
        padding: 0 12px 0 8px !important;
    }

    body.app-premium .topbar .navbar-nav.mr-auto,
    body.app-premium .topbar .navbar-nav.my-lg-0 {
        flex-direction: row !important;
        align-items: center;
    }

    body.app-premium .topbar .navbar-nav.mr-auto > .nav-item,
    body.app-premium .topbar .navbar-nav.my-lg-0 > .nav-item {
        display: flex;
        align-items: center;
        height: 56px;
        margin: 0;
        padding: 0;
    }

    body.app-premium .topbar .nav-toggler {
        width: 36px;
        height: 36px;
        margin: 0 !important;
        border-radius: 10px;
        background: var(--p-primary-soft) !important;
        color: var(--p-sidebar) !important;
    }

    body.app-premium .topbar .top-navbar .navbar-nav > .nav-item > .profile-pic {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 40px;
        margin: 0;
        padding: 0 !important;
        line-height: 0;
    }

    body.app-premium .topbar .profile-pic img {
        display: block;
        width: 40px;
        height: 40px;
        margin: 0;
        vertical-align: middle;
    }

    body.app-premium .page-wrapper .page-titles {
        display: flex !important;
        flex-direction: column;
        align-items: stretch !important;
        gap: 8px;
        min-height: 0;
        margin: 2px 0 12px !important;
        padding: 8px 10px !important;
    }

    body.app-premium .page-wrapper .page-titles > [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
    }

    body.app-premium .page-wrapper .page-titles .d-flex,
    body.app-premium .page-wrapper .page-titles .d-flex.justify-content-end {
        display: block !important;
        width: 100%;
        margin: 0 !important;
        text-align: left !important;
    }

    body.app-premium .page-wrapper .page-titles h4 {
        font-size: 1.12rem !important;
        line-height: 1.3;
        white-space: normal;
    }

    body.app-premium .page-wrapper .page-titles .breadcrumb {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        width: 100%;
        max-width: 100%;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible;
        row-gap: 6px;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none;
    }

    body.app-premium .page-wrapper .page-titles .breadcrumb-item:not(:first-child):not(.active):not(:last-child) {
        display: none !important;
    }

    body.app-premium .page-wrapper .page-titles .breadcrumb-item {
        display: inline-flex !important;
        align-items: center;
        flex: 0 0 auto;
        float: none !important;
        white-space: nowrap;
    }

    body.app-premium .page-wrapper .page-titles .breadcrumb-item.active {
        position: relative;
        margin: 0 0 0 2px;
    }

    body.app-premium .page-wrapper .page-titles .breadcrumb-item + .breadcrumb-item::before,
    body.app-premium .page-wrapper .page-titles .breadcrumb-item.active::before {
        position: static !important;
        left: auto !important;
        top: auto !important;
        display: inline-block;
        flex: 0 0 auto;
        margin: 0 8px 1px 4px !important;
        transform: rotate(45deg);
    }

    body.app-premium .card-body > .row > [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    body.app-premium .card-body > .row > [class*="col-"] > .btn,
    body.app-premium .card-body > .row > [class*="col-"] > a.btn,
    body.app-premium .card-body > .row > [class*="col-"] > .btn.float-right,
    body.app-premium .card-body > .row > [class*="col-"] > a.btn.float-right {
        float: none !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 8px 0 0 !important;
        text-align: center;
    }

    body.app-premium .dataTables_wrapper .dataTables_length,
    body.app-premium .dataTables_wrapper .dataTables_filter,
    body.app-premium .dataTables_wrapper .dataTables_info,
    body.app-premium .dataTables_wrapper .dataTables_paginate {
        float: none !important;
        width: 100%;
        text-align: left !important;
        margin: 0 0 10px;
    }

    body.app-premium .dataTables_wrapper .dataTables_length label,
    body.app-premium .dataTables_wrapper .dataTables_filter label {
        display: flex !important;
        align-items: center;
        gap: 8px;
        width: 100%;
        margin: 0;
    }

    body.app-premium .dataTables_wrapper .dataTables_filter input {
        flex: 1 1 auto;
        width: 1% !important;
        min-width: 0;
        margin: 0 !important;
    }

    body.app-premium .dataTables_wrapper .dataTables_paginate {
        display: flex;
        justify-content: flex-start;
    }

    body.app-premium .dataTables_wrapper .dataTables_paginate .pagination {
        flex-wrap: wrap;
        margin: 0;
    }

    body.app-premium .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.app-premium .table-responsive table.dataTable th,
    body.app-premium .table-responsive table.dataTable td {
        max-width: 400px;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    body.app-premium .table-responsive table.dataTable td.nowrap,
    body.app-premium .table-responsive table.dataTable th.nowrap,
    body.app-premium .table-responsive table.dataTable td:last-child:has(.btn) {
        max-width: none;
        white-space: nowrap;
    }
}

/* Secondary copy stays near-black on every page. */
body.app-premium .text-muted,
body.app-premium .text-secondary,
body.app-premium .ep-info-label,
body.app-premium .pd-info-label,
body.app-premium .ep-mrn,
body.app-premium .pd-mrn,
body.app-premium .ep-meta,
body.app-premium .pd-meta,
body.app-premium .ep-subtitle,
body.app-premium .pd-subtitle,
body.app-premium .ep-empty,
body.app-premium .pd-empty,
body.app-premium .ep-tabs .nav-link,
body.app-premium .pd-tabs .nav-link,
body.app-premium .summary-item span,
body.app-premium .hero-subtitle,
body.app-premium .kpi-title,
body.app-premium .cid-desc,
body.app-premium .membership-label,
body.app-premium .membership-card .card-body .membership-meta,
body.app-premium .membership-chip span,
body.app-premium .membership-empty,
body.app-premium .card-subtitle,
body.app-premium .breadcrumb-item,
body.app-premium .breadcrumb-item a,
body.app-premium .table thead th,
body.app-premium .dataTables_wrapper .dataTables_info,
body.app-premium .dataTables_wrapper .dataTables_length,
body.app-premium .dataTables_wrapper .dataTables_filter,
body.app-premium .form-control::placeholder,
body.app-premium textarea::placeholder {
    color: #1A1630 !important;
}

body.app-premium .ep-tabs .nav-link.active,
body.app-premium .pd-tabs .nav-link.active {
    color: #5E4B8B !important;
}

/* Empty state shown until a required filter is chosen. */
.filter-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    width: 100%;
    margin: 6px 0 4px;
    padding: 42px 28px 36px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(124, 108, 242, 0.16), transparent 58%),
        #F8F7FF;
    border: 1px dashed #D0C8F4;
    border-radius: 16px;
}

.filter-prompt-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 14px;
    border-radius: 18px;
    background: #fff;
    color: #7C6CF2;
    font-size: 22px;
    box-shadow: 0 10px 24px rgba(94, 75, 139, 0.12);
}

.filter-prompt-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #2C2840;
}

.filter-prompt-text {
    margin: 0;
    max-width: 420px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #5C5674;
}

.filter-prompt-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.filter-prompt-steps span:not(.filter-prompt-sep) {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #E4DFF8;
    border-radius: 999px;
    color: #5E4B8B;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
}

.filter-prompt-sep {
    width: 18px;
    height: 1px;
    background: #C9C0F0;
}

@media (max-width: 575.98px) {
    .filter-prompt {
        padding: 28px 16px 24px;
    }
}

/* Back buttons stay on the left. Other actions keep the right side. */
body.app-premium a.btn:has(.fa-arrow-left),
body.app-premium button.btn:has(.fa-arrow-left) {
    float: left !important;
}

body.app-premium :has(> a.btn .fa-arrow-left):not(.clin-dock):not(.pd-hero-actions):not(.ep-hero-actions):not(.clin-banner-actions),
body.app-premium :has(> button.btn .fa-arrow-left):not(.clin-dock):not(.pd-hero-actions):not(.ep-hero-actions):not(.clin-banner-actions) {
    display: flow-root;
}

body.app-premium .clin-dock > a.btn:has(.fa-arrow-left),
body.app-premium .pd-hero-actions > a.btn:has(.fa-arrow-left),
body.app-premium .ep-hero-actions > a.btn:has(.fa-arrow-left) {
    float: none !important;
    margin-right: auto;
    align-self: flex-start;
}

body.app-premium .clin-banner-actions > a.btn:has(.fa-arrow-left) {
    float: none !important;
    margin-right: 0;
}

/* =========================================================
   MODERN DATATABLES
   One look for every DataTable: toolbar, grid, sort, paging.
   Form tables (no .dataTable) are left alone.
   ========================================================= */
body.app-premium .dataTables_wrapper.container-fluid {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 !important;
}

body.app-premium .dataTables_wrapper::after {
    content: "";
    display: table;
    clear: both;
}

body.app-premium .dataTables_wrapper > .row {
    align-items: center;
    margin-bottom: 12px;
}

body.app-premium .dataTables_wrapper > .row:last-child {
    margin-top: 4px;
    margin-bottom: 0;
}

body.app-premium div.dataTables_wrapper > .dataTables_length,
body.app-premium div.dataTables_wrapper > .dt-buttons {
    float: left;
    margin: 0 8px 12px 0;
}

body.app-premium div.dataTables_wrapper > .dataTables_filter {
    float: right;
    margin: 0 0 12px;
    text-align: right;
}

body.app-premium .dataTables_wrapper > table.dataTable,
body.app-premium .dataTables_wrapper > .dataTables_scroll,
body.app-premium .dataTables_wrapper > .row {
    clear: both;
}

body.app-premium .dataTables_wrapper .dataTables_length label,
body.app-premium .dataTables_wrapper .dataTables_filter label {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-size: .84rem;
    font-weight: 650;
    color: #1A1630;
}

body.app-premium .dataTables_wrapper .dataTables_length label {
    gap: 8px;
}

body.app-premium .dataTables_wrapper .dataTables_length select,
body.app-premium .dataTables_wrapper .dataTables_filter input {
    margin: 0 !important;
    border: 1px solid #E4DFF4 !important;
    background-color: #fff !important;
    color: #1A1630 !important;
    font-size: .86rem !important;
    font-weight: 600;
    box-shadow: none;
}

body.app-premium .dataTables_wrapper .dataTables_length select {
    min-height: 36px;
    min-width: 72px;
    padding: 0 30px 0 12px !important;
    border-radius: 10px !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.2 1.4L6 6.2 10.8 1.4' fill='none' stroke='%237C6CF2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 12px 8px !important;
}

body.app-premium .dataTables_wrapper .dataTables_filter input {
    width: 230px;
    min-height: 36px;
    padding: 0 14px 0 36px !important;
    border-radius: 999px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='4.2' fill='none' stroke='%237C6CF2' stroke-width='1.6'/%3E%3Cpath d='M10.2 10.2L13.4 13.4' fill='none' stroke='%237C6CF2' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: 12px center !important;
    background-size: 15px 15px !important;
}

body.app-premium .dataTables_wrapper .dataTables_filter input:focus,
body.app-premium .dataTables_wrapper .dataTables_length select:focus {
    border-color: #7C6CF2 !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 108, 242, .16) !important;
}

body.app-premium .dt-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
}

body.app-premium .dt-button,
body.app-premium .dt-buttons .dt-button {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 1px solid #C9E8D6 !important;
    border-radius: 10px !important;
    background: #F3FBF6 !important;
    color: #1B7A4E !important;
    font-size: .82rem !important;
    font-weight: 700 !important;
    letter-spacing: .01em;
    box-shadow: none !important;
}

body.app-premium .dt-buttons .dt-button::before {
    content: "\f1c3";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 13px;
    line-height: 1;
}

body.app-premium .dt-button:hover,
body.app-premium .dt-buttons .dt-button:hover {
    background: #E5F6EC !important;
    border-color: #A9D8BE !important;
    color: #14663F !important;
}

body.app-premium .dataTables_wrapper table.dataTable {
    clear: both;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: transparent;
    outline: none;
}

body.app-premium .dataTables_scroll {
    clear: both;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: hidden;
}

body.app-premium .dataTables_scroll table.dataTable {
    border: 0 !important;
    border-radius: 0 !important;
}

body.app-premium table.dataTable > thead > tr > th,
body.app-premium table.dataTable > tbody > tr > td,
body.app-premium table.dataTable > tbody > tr > th,
body.app-premium table.dataTable > tfoot > tr > th,
body.app-premium table.dataTable > tfoot > tr > td {
    border-left: 0 !important;
    border-right: 0 !important;
    border-top: 0 !important;
    border-bottom: 1px solid #F0EDF6 !important;
}

body.app-premium table.dataTable > thead > tr > th {
    background-color: #F6F4FB !important;
    background-image: none !important;
    color: #1A1630 !important;
    font-size: .85rem !important;
    font-weight: 700 !important;
    letter-spacing: .02em;
    padding: 11px 14px !important;
    border-bottom-color: #E4DFEF !important;
    vertical-align: middle !important;
}

body.app-premium table.dataTable thead > tr > th.sorting,
body.app-premium table.dataTable thead > tr > th.sorting_asc,
body.app-premium table.dataTable thead > tr > th.sorting_desc,
body.app-premium table.dataTable thead > tr > td.sorting,
body.app-premium table.dataTable thead > tr > td.sorting_asc,
body.app-premium table.dataTable thead > tr > td.sorting_desc {
    padding-right: 28px !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 10px 14px !important;
}

body.app-premium table.dataTable thead .sorting:before,
body.app-premium table.dataTable thead .sorting:after,
body.app-premium table.dataTable thead .sorting_asc:before,
body.app-premium table.dataTable thead .sorting_asc:after,
body.app-premium table.dataTable thead .sorting_desc:before,
body.app-premium table.dataTable thead .sorting_desc:after,
body.app-premium table.dataTable thead .sorting_asc_disabled:before,
body.app-premium table.dataTable thead .sorting_asc_disabled:after,
body.app-premium table.dataTable thead .sorting_desc_disabled:before,
body.app-premium table.dataTable thead .sorting_desc_disabled:after {
    content: none !important;
    display: none !important;
}

body.app-premium table.dataTable thead > tr > th.sorting,
body.app-premium table.dataTable thead > tr > td.sorting {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='14' viewBox='0 0 10 14'%3E%3Cpath d='M5 1.2L8.4 5H1.6z' fill='%23C9C2DC'/%3E%3Cpath d='M5 12.8L1.6 9h6.8z' fill='%23C9C2DC'/%3E%3C/svg%3E") !important;
}

body.app-premium table.dataTable thead > tr > th.sorting_asc,
body.app-premium table.dataTable thead > tr > td.sorting_asc {
    background-color: #F3F0FC !important;
    color: #5E4B8B !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='14' viewBox='0 0 10 14'%3E%3Cpath d='M5 1.2L8.4 5H1.6z' fill='%237C6CF2'/%3E%3Cpath d='M5 12.8L1.6 9h6.8z' fill='%23DDD7EA'/%3E%3C/svg%3E") !important;
}

body.app-premium table.dataTable thead > tr > th.sorting_desc,
body.app-premium table.dataTable thead > tr > td.sorting_desc {
    background-color: #F3F0FC !important;
    color: #5E4B8B !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='14' viewBox='0 0 10 14'%3E%3Cpath d='M5 1.2L8.4 5H1.6z' fill='%23DDD7EA'/%3E%3Cpath d='M5 12.8L1.6 9h6.8z' fill='%237C6CF2'/%3E%3C/svg%3E") !important;
}

body.app-premium table.dataTable > tbody > tr > td,
body.app-premium table.dataTable > tbody > tr > th {
    padding: 10px 14px !important;
    background-color: #fff;
    color: #1A1630;
    font-size: .875rem;
    vertical-align: middle !important;
}

body.app-premium table.dataTable.table-striped > tbody > tr:nth-of-type(odd) > td,
body.app-premium table.dataTable.table-striped > tbody > tr:nth-of-type(odd) > th {
    background-color: #FBFAFE;
}

body.app-premium table.dataTable.table-hover > tbody > tr:hover > td,
body.app-premium table.dataTable.table-hover > tbody > tr:hover > th {
    background-color: #F4F1FC !important;
}

body.app-premium table.dataTable > tbody > tr:last-child > td,
body.app-premium table.dataTable > tbody > tr:last-child > th {
    border-bottom: 0 !important;
}

body.app-premium table.dataTable > tfoot > tr > th,
body.app-premium table.dataTable > tfoot > tr > td {
    background-color: #F6F4FB !important;
    color: #1A1630 !important;
    font-weight: 700;
    padding: 10px 14px !important;
    border-bottom: 0 !important;
    border-top: 1px solid #E4DFEF !important;
}

body.app-premium table.dataTable > thead > tr:first-child > *:first-child {
    border-top-left-radius: 11px;
}

body.app-premium table.dataTable > thead > tr:first-child > *:last-child {
    border-top-right-radius: 11px;
}

body.app-premium table.dataTable > tbody > tr:last-child > *:first-child {
    border-bottom-left-radius: 11px;
}

body.app-premium table.dataTable > tbody > tr:last-child > *:last-child {
    border-bottom-right-radius: 11px;
}

body.app-premium table.dataTable th.col-index,
body.app-premium table.dataTable td.col-index {
    width: 56px;
    min-width: 56px;
    max-width: 72px !important;
    text-align: center;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums;
    color: #5C5674 !important;
}

body.app-premium table.dataTable td.dataTables_empty {
    padding: 40px 16px !important;
    text-align: center !important;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(124, 108, 242, .1), transparent 68%),
        #FBFAFF !important;
    color: #5C5674 !important;
    font-weight: 650;
}

body.app-premium .dataTables_wrapper .dataTables_info {
    float: left;
    padding-top: 14px !important;
    font-size: .82rem !important;
    font-weight: 600;
    color: #1A1630 !important;
}

body.app-premium .dataTables_wrapper .dataTables_paginate {
    float: right;
    padding-top: 10px;
}

body.app-premium .dataTables_wrapper .dataTables_paginate .pagination {
    gap: 4px;
    margin: 0;
}

body.app-premium .dataTables_wrapper .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    margin: 0;
    padding: 0 10px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    background: transparent;
    color: #1A1630 !important;
    font-size: .84rem;
    font-weight: 400;
    line-height: 1;
}

body.app-premium .dataTables_wrapper .page-item.active .page-link {
    background: #7C6CF2 !important;
    border-color: #7C6CF2 !important;
    color: #fff !important;
    box-shadow: 0 6px 14px rgba(124, 108, 242, .28);
}

body.app-premium .dataTables_wrapper .page-item:not(.active):not(.disabled) .page-link:hover {
    background: #F3F1FE !important;
    color: #5E4B8B !important;
}

body.app-premium .dataTables_wrapper .page-item.disabled .page-link {
    color: #B7B2C6 !important;
    background: transparent !important;
    box-shadow: none;
}

body.app-premium .dataTables_wrapper .dataTables_processing {
    background: rgba(255, 255, 255, .94) !important;
    color: #5E4B8B !important;
}

@media (max-width: 991.98px) {
    body.app-premium .dataTables_wrapper .dataTables_info,
    body.app-premium .dataTables_wrapper .dataTables_paginate {
        float: none;
        width: 100%;
        text-align: left;
    }

    body.app-premium table.dataTable > thead > tr > th.col-action {
        background-color: #F6F4FB !important;
        background-image: none !important;
    }

    body.app-premium table.dataTable.table-striped > tbody > tr:nth-of-type(odd) > td.col-action,
    body.app-premium table.dataTable.table-striped > tbody > tr:nth-of-type(odd) > td:last-child:has(.btn) {
        background-color: #FBFAFE !important;
    }

    body.app-premium table.dataTable.table-hover > tbody > tr:hover > td.col-action,
    body.app-premium table.dataTable.table-hover > tbody > tr:hover > td:last-child:has(.btn) {
        background-color: #F4F1FC !important;
    }
}

@media (max-width: 767.98px) {
    body.app-premium div.dataTables_wrapper > .dt-buttons,
    body.app-premium div.dataTables_wrapper > .dataTables_filter,
    body.app-premium .dataTables_wrapper .dataTables_length,
    body.app-premium .dataTables_wrapper .dataTables_filter,
    body.app-premium .dataTables_wrapper .dataTables_info,
    body.app-premium .dataTables_wrapper .dataTables_paginate {
        float: none !important;
        width: 100%;
        text-align: left !important;
    }

    body.app-premium .dataTables_wrapper .dataTables_filter input {
        width: 100% !important;
        min-width: 0;
    }

    body.app-premium .dt-buttons,
    body.app-premium .dt-buttons .dt-button {
        width: 100%;
    }

    body.app-premium .dt-buttons .dt-button {
        justify-content: center;
    }
}

/* ---------- Clinical chart (vital sign, SOAP, medical record) ---------- */
.clin-page {
    padding-bottom: 88px;
}

.clin-banner,
.clin-card,
.mr-visit {
    background: #fff;
    border: 1px solid var(--p-border);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(40, 28, 72, .04);
}

.clin-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 18px;
    padding: 18px 20px;
    margin-bottom: 16px;
}

.clin-avatar {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #5E4B8B;
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.clin-avatar.is-female {
    background: linear-gradient(160deg, #A874AC 0%, #CB90A3 100%);
}

.clin-banner-main {
    flex: 1;
    min-width: 0;
}

.clin-kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #6B6284;
}

.clin-name {
    margin: 2px 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #2C2840;
}

.clin-chips,
.clin-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.clin-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #F6F5FB;
    color: #3A3550;
    font-size: 12px;
    font-weight: 650;
}

.clin-chip.is-alert {
    background: #FDECEC;
    color: #9B2C2C;
}

.clin-chip.is-ok {
    background: #E9F8EF;
    color: #1F7A45;
}

.clin-banner-actions {
    flex: 1 0 calc(100% - 76px);
    max-width: calc(100% - 76px);
    margin-left: 76px;
    justify-content: flex-start;
}

.clin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.clin-nav a {
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--p-border);
    color: #5E4B8B;
    font-size: 13px;
    font-weight: 700;
}

.clin-nav a:hover {
    background: var(--p-primary-soft);
    text-decoration: none;
}

.clin-card {
    padding: 16px 16px 8px;
    margin-bottom: 16px;
}

.clin-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.clin-step {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: var(--p-primary-soft);
    color: #5E4B8B;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.clin-card-head h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1A1630;
    text-transform: capitalize;
}

.clin-history-head {
    flex: 1;
    min-width: 0;
}

.clin-history-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.clin-history-title .btn {
    flex-shrink: 0;
}

.clin-card-head p {
    margin: 2px 0 0;
    color: #6B6284;
    font-size: 13px;
}

.clin-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 12px;
    margin-bottom: 8px;
}

.clin-meta > .form-group {
    margin-bottom: 0;
}

.clin-split {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.4fr);
    gap: 16px;
    align-items: start;
}

.vs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.vs-tile {
    background: #F8F7FC;
    border: 1px solid #E7E4F2;
    border-radius: 14px;
    padding: 10px 12px 12px;
    margin: 0;
}

.vs-tile.is-required {
    background: #fff;
    border-color: #D9D2F6;
    box-shadow: inset 3px 0 0 #7C6CF2;
}

.vs-tile.is-wide {
    grid-column: 1 / -1;
}

.vs-label {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #3A3550;
}

.vs-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vs-field .form-control,
.vs-tile > .form-control,
.vs-tile > select.form-control,
.vs-tile > textarea.form-control {
    font-size: 18px;
    font-weight: 650;
    min-height: 46px;
}

.vs-unit {
    flex: 0 0 auto;
    min-width: 52px;
    color: #6B6284;
    font-size: 12px;
    font-weight: 700;
}

.vs-hint {
    display: block;
    margin-top: 4px;
    color: #8A829C;
    font-size: 11px;
    font-weight: 600;
}

.clin-bmi {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #F3F1FE;
    color: #5E4B8B;
    font-weight: 700;
}

.clin-bmi strong {
    font-size: 22px;
}

.clin-alerts {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 10px;
}

.clin-alerts.is-single {
    grid-template-columns: 1fr;
}

.clin-alert {
    border-radius: 12px;
    padding: 10px 12px;
    min-height: 92px;
    background: #F8F7FC;
    border: 1px solid #E7E4F2;
}

.clin-alert label {
    display: block;
    margin-bottom: 4px;
}

.clin-alert textarea {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    min-height: 64px !important;
    resize: vertical;
    box-shadow: none !important;
}

.clin-alert.is-note { background: #FFF8EC; border-color: #F3E2B8; }
.clin-alert.is-prefer { background: #F1FBF4; border-color: #CDEBD6; }
.clin-alert.is-avoid { background: #FDF3F3; border-color: #F0D0D0; }

.clin-history {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow: auto;
    padding-right: 4px;
}

.visit-mini {
    border: 1px solid #E7E4F2;
    border-radius: 12px;
    padding: 10px 12px;
    background: #FCFBFF;
}

.visit-mini-top {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
    font-size: 13px;
}

.visit-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
}

.visit-mini-grid span,
.mr-k {
    display: block;
    color: #8A829C;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.visit-mini-grid p,
.mr-v {
    margin: 0;
    color: #2C2840;
    font-size: 13px;
}

.clin-plan-block {
    margin-bottom: 18px;
}

.clin-plan-block h5 {
    margin: 0;
    font-size: 15px;
}

.clin-dock {
    position: sticky;
    bottom: 12px;
    z-index: 30;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid var(--p-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(44, 32, 72, .12);
    backdrop-filter: blur(8px);
}

.mr-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.mr-toolbar input {
    width: min(320px, 100%);
}

.mr-visit {
    margin-bottom: 12px;
    overflow: hidden;
}

.mr-toolbar p {
    margin: 2px 0 0;
    color: #6B6284;
    font-size: 13px;
}

.mr-visit > summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
}

.mr-visit > summary:hover {
    background: #F6F4FB;
}

.mr-caret {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #F3F0FA;
    color: #5E4B8B;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: transform .15s ease;
}

.mr-visit[open] > summary .mr-caret {
    transform: rotate(180deg);
    background: #E7E1F8;
}

.mr-visit > summary::-webkit-details-marker,
.mr-visit > summary::marker {
    display: none;
    content: "";
}

.mr-visit[open] > summary {
    border-bottom: 1px solid #F0EDF6;
    background: #FCFBFF;
}

.mr-visit.is-current {
    border-color: #C9C0F0;
    box-shadow: 0 0 0 3px rgba(124, 108, 242, .12);
}

.mr-body {
    padding: 14px 16px 16px;
}

tr.allergy-next,
tr.allergy-next td,
tr.allergy-item-row,
tr.allergy-item-row td {
    background: #fde8e8 !important;
}

tr.allergy-item-row td:first-child,
tr.allergy-next td:first-child {
    box-shadow: inset 3px 0 0 #c0392b;
}

.mr-visit.is-allergy-next,
.mr-visit.is-allergy-source {
    border-color: #e11d48;
    background: #fff5f5;
}

.clin-fold > summary {
    cursor: pointer;
    list-style: none;
    justify-content: flex-start;
    align-items: center;
}

.clin-fold-caret {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #F3F0FA;
    color: #5E4B8B;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 0;
    transition: transform .15s ease;
}

.clin-fold[open] > summary .clin-fold-caret {
    transform: rotate(180deg);
    background: #E7E1F8;
}

.btn-drda,
.btn-drda:hover,
.btn-drda:focus {
    background: #5E4B8B;
    border-color: #5E4B8B;
    color: #fff;
}

.next-visit-alert {
    border: 2px solid #5E4B8B;
    background: #f4efff;
    box-shadow: 0 0 0 4px rgba(94, 75, 139, .18);
}

.clin-fold > summary::-webkit-details-marker,
.clin-fold > summary::marker {
    display: none;
}

.clin-fold-body {
    padding: 0 18px 18px;
}

.rx-choice {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rx-choice-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid #d9d3ea;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
}

.rx-choice-item input {
    margin: 0;
}

.ba-slots,
.ba-grid,
.compare-wrap {
    display: grid;
    gap: 10px;
}

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

.compare-wrap {
    grid-template-columns: 1fr 1fr;
}

.ba-slot,
.ba-grid-cell,
.compare-photo {
    border: 1px dashed #cfc6e4;
    border-radius: 10px;
    padding: 8px;
    background: #faf8ff;
    text-align: center;
}

.ba-slot .dropify-wrapper {
    width: 100%;
}

.ba-slot img,
.ba-grid-cell img,
.compare-photo img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    background: #efeaf8;
}

.photo-pick {
    display: flex;
    gap: 8px;
    align-items: center;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 6px;
    margin-bottom: 6px;
}

.photo-pick img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
}

.photo-pick.is-on {
    border-color: #5E4B8B;
    background: #f6f2ff;
}

.photo-pick {
    display: block;
    height: 100%;
    margin-bottom: 0;
    cursor: pointer;
}

.photo-pick img {
    width: 100%;
    height: 220px;
    transform: none !important;
}

.photo-pick-meta {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
    text-align: left;
}

.photo-pick-meta input {
    margin-top: 3px;
    flex: 0 0 auto;
}

#photo_preview_modal img.app-zoomable:hover {
    transform: none !important;
    box-shadow: none !important;
}

.modal-ba-screen {
    max-width: 98vw;
    width: 98vw;
    height: calc(100vh - 1rem);
    margin: .5rem auto;
}

.modal-ba-screen .modal-content {
    height: 100%;
}

.modal-ba-screen .modal-body {
    height: calc(100% - 56px);
    overflow: hidden;
    padding: 8px;
}

#ba_grid_body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
}

#ba_grid_body .ba-grid {
    flex: 1;
    gap: 4px;
    min-height: 0;
}

#ba_grid_body .ba-grid-cell {
    position: relative;
    padding: 0;
    border: 0;
    background: #16121f;
    overflow: hidden;
}

#ba_grid_body .mr-photo-thumb,
#ba_grid_body .ba-grid-empty {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: calc((100vh - 20px) / 2);
    border: 0;
    padding: 0;
    background: transparent;
    color: #cfc6e4;
}

#ba_grid_body .ba-grid-cell img {
    width: 100%;
    height: calc((100vh - 20px) / 2);
    object-fit: contain;
    border-radius: 0;
    background: #16121f;
}

.photo-grid-screen {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: block;
    background: rgba(12, 10, 18, .94);
    padding: 8px;
}

.photo-grid-screen[hidden] {
    display: none;
}

.photo-compare-screen .mr-lightbox-close,
.photo-grid-screen .mr-lightbox-close,
.mr-lightbox .mr-lightbox-close {
    z-index: 6;
    top: 18px;
    right: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    font-size: 16px;
    cursor: pointer;
}

.mr-photo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 4px 14px 4px 4px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.mr-photo-btn i {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.mr-photo-btn.is-view {
    background: #F3F0FA;
    color: #5E4B8B;
}

.mr-photo-btn.is-view i {
    background: #5E4B8B;
    color: #fff;
}

.mr-photo-btn.is-upload {
    background: #5E4B8B;
    color: #fff;
}

.mr-photo-btn.is-upload i {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.ba-slot .dropify-wrapper .dropify-preview .dropify-render img {
    width: 100%;
    height: 100%;
    max-height: none !important;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transform: none;
}

.ba-caption {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 2;
    max-width: calc(100% - 16px);
    background: #5E4B8B;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
    padding: 4px 8px;
    border-radius: 4px;
}

.photo-compare-screen {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: block;
    background: rgba(12, 10, 18, .94);
    padding: 8px;
}

.photo-compare-screen[hidden] {
    display: none;
}

.photo-compare-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    height: 100%;
}

.photo-compare-cell {
    position: relative;
    min-width: 0;
}

.photo-compare-cell img {
    width: 100%;
    height: calc(100vh - 16px);
    object-fit: contain;
    background: #000;
}

.mr-photo-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.mr-photo-side h5,
#before_after_modal h6 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 800;
    color: #5E4B8B;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.mr-photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mr-photo-item {
    position: relative;
}

.mr-photo-thumb {
    width: 92px;
    height: 92px;
    padding: 0;
    border: 1px solid #E4DFF2;
    border-radius: 10px;
    overflow: hidden;
    background: #F8F7FC;
    cursor: zoom-in;
}

.mr-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mr-photo-remove,
.mr-photo-remove-new {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: rgba(40, 30, 60, .72);
    color: #fff;
    line-height: 22px;
    padding: 0;
}

.mr-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(20, 16, 32, .82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.mr-lightbox[hidden] {
    display: none;
}

.mr-lightbox img {
    max-width: min(1100px, 92vw);
    max-height: 88vh;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}

.mr-lightbox-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #241b36;
    font-size: 28px;
    line-height: 40px;
}

.ba-save-progress {
    flex: 1 1 auto;
    min-width: 180px;
    margin-right: 12px;
}

.ba-save-progress .progress {
    height: 10px;
    border-radius: 999px;
    background: #E4DFF2;
    overflow: hidden;
}

.ba-save-progress .progress-bar {
    background: #7C6CF2;
}

@media (max-width: 767.98px) {
    .mr-photo-block {
        grid-template-columns: 1fr;
    }
}

.mr-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 14px;
}

.mr-vitals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.mr-vital {
    background: #F8F7FC;
    border-radius: 10px;
    padding: 8px 10px;
}

.mr-vital strong {
    display: block;
    font-size: 15px;
}

.mr-section {
    margin-top: 14px;
}

.mr-section h5 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 800;
    color: #5E4B8B;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.mr-empty {
    padding: 28px 16px;
    text-align: center;
    color: #6B6284;
}

@media (max-width: 991.98px) {
    .clin-split,
    .clin-meta,
    .clin-alerts,
    .mr-grid,
    .mr-vitals {
        grid-template-columns: 1fr 1fr;
    }

    .clin-banner-actions {
        flex-basis: 100%;
        max-width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 575.98px) {
    .clin-meta,
    .vs-grid,
    .clin-alerts,
    .visit-mini-grid,
    .mr-grid,
    .mr-vitals,
    .clin-split {
        grid-template-columns: 1fr;
    }

    .clin-dock {
        flex-wrap: wrap;
    }
}

.rj-actions {
    flex-wrap: nowrap !important;
    justify-content: flex-end;
    align-items: center;
}

.rj-actions .btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 5px 10px !important;
    line-height: 1.2;
}

.rj-caret {
    font-size: 10px;
    opacity: .7;
}

.rj-print {
    position: relative;
}

.rj-print-menu {
    display: none;
    position: fixed;
    z-index: 2050;
    min-width: 220px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--p-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(44, 32, 72, .12);
}

.rj-print.is-open .rj-print-menu {
    display: flex;
    flex-direction: column;
}

.rj-print-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--p-text);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.rj-print-item:hover,
.rj-print-item:focus {
    background: var(--p-primary-soft);
    color: var(--p-sidebar);
    text-decoration: none;
    outline: none;
}

body.app-premium table.dataTable tbody tr.row-my-handler > td,
body.app-premium table.dataTable.table-striped > tbody > tr.row-my-handler > td,
body.app-premium table.dataTable.table-striped > tbody > tr.row-my-handler:nth-of-type(odd) > td,
body.app-premium table.dataTable.table-hover > tbody > tr.row-my-handler:hover > td,
body.app-premium .table-detail-rjp tbody tr.row-my-handler > td,
body.app-premium table.table tbody tr.row-my-handler > td {
    background-color: #d9f5e3 !important;
}

.rj-mine-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 6px;
    border-radius: 50%;
    background: #e03131;
    box-shadow: 0 0 0 0 rgba(224, 49, 49, .7);
    vertical-align: middle;
    animation: rj-mine-blink 1s ease-in-out infinite;
}

@keyframes rj-mine-blink {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(224, 49, 49, .55); }
    50% { opacity: .15; box-shadow: 0 0 0 4px rgba(224, 49, 49, 0); }
}

.pdp-identity .card-body {
    padding: 22px 24px 20px;
}

.pdp-kicker {
    margin: 0 0 14px;
    color: #5E4B8B;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.pdp-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.pdp-facts div {
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid #E7E2F4;
    border-radius: 14px;
    background: #F8F6FC;
}

.pdp-facts span {
    display: block;
    margin-bottom: 4px;
    color: #6B647C;
    font-size: 12px;
    font-weight: 650;
}

.pdp-facts strong {
    display: block;
    color: #2C2840;
    font-size: 16px;
    font-weight: 700;
    word-break: break-word;
}

.pdp-note {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #F3F1FE;
}

.pdp-note strong {
    display: block;
    margin-bottom: 4px;
    color: #4E3D7A;
    font-size: 13px;
}

.pdp-note p {
    margin: 0;
    color: #5C5670;
    font-size: 13.5px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .pdp-facts {
        grid-template-columns: 1fr;
    }
}
