/* =========================================================================
   Admin CRM skin
   Everything here is scoped to body.crm, which MainLayout sets for Admin and
   Moderator sessions only (see js/crm.js), so customer pages are untouched.
   Motion: entrance animations use fill-mode "backwards" on purpose - a filled
   transform would keep turning cards into containing blocks for the fixed
   slide-in modals rendered inside them.
   ========================================================================= */

body.crm {
    --crm-bg: #F2F5FC;
    --crm-surface: #FFFFFF;
    --crm-surface-2: #F6F8FD;
    --crm-surface-3: #EDF2FC;
    --crm-glass: rgba(255, 255, 255, 0.74);
    --crm-surface-glass: rgba(255, 255, 255, 0.9);
    --crm-line: #E6EBF5;
    --crm-line-strong: #D3DBEC;
    --crm-ink: #081735;
    --crm-text: #3E4566;
    --crm-muted: #8F95B2;
    --crm-primary: #3C86F3;
    --crm-primary-2: #5AB8F2;
    --crm-primary-ink: #2468DB;
    --crm-primary-soft: rgba(60, 134, 243, 0.11);
    --crm-primary-rgb: 60, 134, 243;
    --crm-grad: linear-gradient(135deg, #5AB8F2 0%, #3C86F3 55%, #4F6BF4 100%);
    --crm-grad-wide: linear-gradient(120deg, #5AB8F2 0%, #3C86F3 35%, #6A5CF6 70%, #5AB8F2 100%);
    --crm-success: #16A864;
    --crm-success-soft: rgba(22, 168, 100, 0.12);
    --crm-warning: #E8950C;
    --crm-warning-soft: rgba(245, 165, 36, 0.16);
    --crm-danger: #E8385F;
    --crm-danger-soft: rgba(239, 71, 111, 0.12);
    --crm-info: #1AA9DB;
    --crm-info-soft: rgba(34, 181, 232, 0.13);
    --crm-violet: #6D5DF3;
    --crm-violet-soft: rgba(123, 108, 246, 0.13);
    --crm-coral: #FF674D;
    --crm-coral-soft: rgba(255, 103, 77, 0.13);
    --crm-gray-soft: rgba(143, 149, 178, 0.14);
    --crm-radius: 18px;
    --crm-radius-sm: 12px;
    --crm-shadow-sm: 0 1px 2px rgba(8, 23, 53, 0.05), 0 2px 8px -4px rgba(8, 23, 53, 0.08);
    --crm-shadow: 0 1px 2px rgba(8, 23, 53, 0.04), 0 12px 32px -16px rgba(8, 23, 53, 0.16);
    --crm-shadow-lg: 0 2px 6px rgba(8, 23, 53, 0.05), 0 28px 60px -24px rgba(8, 23, 53, 0.3);
    --crm-glow: 0 8px 20px -8px rgba(60, 134, 243, 0.65);
    --crm-row-hover: rgba(60, 134, 243, 0.045);
    --crm-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --crm-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    background-color: var(--crm-bg) !important;
    color: var(--crm-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.dark-layout body.crm {
    --crm-bg: #0D1224;
    --crm-surface: #151C33;
    --crm-surface-2: #1B2340;
    --crm-surface-3: #222C4D;
    --crm-glass: rgba(21, 28, 51, 0.74);
    --crm-surface-glass: rgba(21, 28, 51, 0.92);
    --crm-line: #263052;
    --crm-line-strong: #34406B;
    --crm-ink: #EEF2FF;
    --crm-text: #C3CAE2;
    --crm-muted: #8A93B4;
    --crm-primary-ink: #8DC3FF;
    --crm-primary-soft: rgba(90, 160, 255, 0.16);
    --crm-success: #3DD68C;
    --crm-success-soft: rgba(61, 214, 140, 0.14);
    --crm-warning: #FFBE4D;
    --crm-warning-soft: rgba(255, 190, 77, 0.14);
    --crm-danger: #FF6B8B;
    --crm-danger-soft: rgba(255, 107, 139, 0.14);
    --crm-info: #4CCBF5;
    --crm-info-soft: rgba(76, 203, 245, 0.14);
    --crm-violet: #A197FF;
    --crm-violet-soft: rgba(161, 151, 255, 0.15);
    --crm-coral-soft: rgba(255, 103, 77, 0.16);
    --crm-gray-soft: rgba(138, 147, 180, 0.16);
    --crm-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
    --crm-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 14px 34px -16px rgba(0, 0, 0, 0.6);
    --crm-shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.25), 0 30px 64px -24px rgba(0, 0, 0, 0.75);
    --crm-row-hover: rgba(90, 160, 255, 0.06);
}

/* ---------- Keyframes ---------- */
@keyframes crm-fade {
    from { opacity: 0; }
}

@keyframes crm-rise {
    from { opacity: 0; transform: translate3d(0, 18px, 0) scale(0.985); }
}

@keyframes crm-rise-sm {
    from { opacity: 0; transform: translate3d(0, 8px, 0); }
}

@keyframes crm-drop {
    from { opacity: 0; transform: translate3d(0, -14px, 0); }
}

@keyframes crm-slide-left {
    from { opacity: 0; transform: translate3d(-16px, 0, 0); }
}

@keyframes crm-slide-right {
    from { opacity: 0; transform: translate3d(48px, 0, 0); }
}

@keyframes crm-pop {
    0% { opacity: 0; transform: scale(0.9); }
    60% { opacity: 1; transform: scale(1.03); }
    100% { transform: scale(1); }
}

@keyframes crm-shell-in {
    from { visibility: visible; opacity: 0; }
    to { visibility: visible; opacity: 1; }
}

@keyframes crm-modal-in {
    from { opacity: 0; transform: translate3d(0, 22px, 0) scale(0.94); }
}

@keyframes crm-dropdown-in {
    from { visibility: visible; opacity: 0; transform: translate3d(0, -8px, 0) scale(0.96); }
    to { visibility: visible; opacity: 1; transform: none; }
}

@keyframes crm-toast-in {
    0% { opacity: 0; transform: translate3d(56px, 0, 0) scale(0.96); }
    60% { opacity: 1; transform: translate3d(-6px, 0, 0) scale(1); }
    100% { transform: none; }
}

@keyframes crm-toast-out {
    to { opacity: 0; transform: translate3d(calc(100% + 1.5rem), 0, 0) scale(0.96); }
}

@keyframes crm-timer {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@keyframes crm-shine {
    from { transform: translateX(-130%) skewX(-18deg); }
    to { transform: translateX(260%) skewX(-18deg); }
}

@keyframes crm-spin {
    to { transform: rotate(360deg); }
}

@keyframes crm-grow-x {
    from { transform: scaleX(0); }
}

@keyframes crm-grow-y {
    from { transform: scaleY(0); }
}

@keyframes crm-pan {
    from { background-position: 0% 50%; }
    to { background-position: 200% 50%; }
}

@keyframes crm-float {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -5px, 0); }
}

@keyframes crm-breathe {
    0%, 100% { transform: scale(1); opacity: 0.07; }
    50% { transform: scale(1.18); opacity: 0.12; }
}

@keyframes crm-ring {
    0% { box-shadow: 0 0 0 0 rgba(var(--crm-pulse, 232, 56, 95), 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(var(--crm-pulse, 232, 56, 95), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--crm-pulse, 232, 56, 95), 0); }
}

@keyframes crm-ping {
    from { transform: scale(1); opacity: 0.55; }
    to { transform: scale(2.8); opacity: 0; }
}

@keyframes crm-orbit {
    from { transform: translate3d(0, 0, 0) rotate(0deg); }
    50% { transform: translate3d(-18px, 10px, 0) rotate(8deg); }
    to { transform: translate3d(0, 0, 0) rotate(0deg); }
}

@keyframes crm-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.72); }
}

@keyframes crm-bell {
    0%, 22%, 100% { transform: rotate(0); }
    3% { transform: rotate(16deg); }
    7% { transform: rotate(-14deg); }
    11% { transform: rotate(10deg); }
    15% { transform: rotate(-7deg); }
    19% { transform: rotate(3deg); }
}

@keyframes crm-wiggle {
    0%, 100% { transform: rotate(0) scale(1.08); }
    30% { transform: rotate(-10deg) scale(1.12); }
    60% { transform: rotate(8deg) scale(1.1); }
}

@keyframes crm-drift-a {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-9vw, 7vh, 0) scale(1.15); }
}

@keyframes crm-drift-b {
    from { transform: translate3d(0, 0, 0) scale(1.05); }
    to { transform: translate3d(11vw, -8vh, 0) scale(0.92); }
}

@keyframes crm-drift-c {
    from { transform: translate3d(0, 0, 0) scale(0.95); }
    to { transform: translate3d(-6vw, -10vh, 0) scale(1.2); }
}

@keyframes crm-check {
    0% { transform: scale(0.4); opacity: 0; }
    70% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes crm-shimmer {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

/* ---------- Base ---------- */
.crm ::selection {
    background: rgba(60, 134, 243, 0.2);
}

.crm h1, .crm h2, .crm h3, .crm h4, .crm h5, .crm h6 {
    color: var(--crm-ink);
    letter-spacing: -0.01em;
}

.crm .text-muted {
    color: var(--crm-muted) !important;
}

.crm * {
    scrollbar-width: thin;
    scrollbar-color: var(--crm-line-strong) transparent;
}

.crm ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.crm ::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background: var(--crm-line-strong) padding-box;
}

.crm ::-webkit-scrollbar-track {
    background: transparent;
}

/* Soft colour fields drifting behind the whole app */
.crm-aurora {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.crm .crm-aurora {
    display: block;
}

body:not(.crm) .crm-aurora {
    display: none;
}

.crm-aurora i {
    position: absolute;
    display: block;
    width: 52vmax;
    height: 52vmax;
    border-radius: 50%;
    will-change: transform;
}

    .crm-aurora i:nth-child(1) {
        top: -24vmax;
        right: -14vmax;
        background: radial-gradient(closest-side, rgba(90, 184, 242, 0.34), rgba(90, 184, 242, 0));
        animation: crm-drift-a 26s ease-in-out infinite alternate;
    }

    .crm-aurora i:nth-child(2) {
        bottom: -28vmax;
        left: 4vmax;
        background: radial-gradient(closest-side, rgba(128, 150, 255, 0.26), rgba(128, 150, 255, 0));
        animation: crm-drift-b 32s ease-in-out infinite alternate;
    }

    .crm-aurora i:nth-child(3) {
        top: 34vh;
        right: 16vw;
        width: 34vmax;
        height: 34vmax;
        background: radial-gradient(closest-side, rgba(255, 190, 176, 0.24), rgba(255, 190, 176, 0));
        animation: crm-drift-c 38s ease-in-out infinite alternate;
    }

.dark-layout .crm-aurora i {
    opacity: 0.55;
}

/* ---------- Sidebar ---------- */
.crm .main-menu.menu-fixed {
    top: 12px;
    bottom: 12px;
    left: 12px;
    height: auto !important;
    margin: 0 !important;
    border: 1px solid var(--crm-line);
    border-radius: 22px !important;
    background: var(--crm-surface-glass) !important;
    box-shadow: var(--crm-shadow-lg) !important;
}

.crm .main-menu .navigation {
    background: transparent !important;
}

.crm .main-menu .navbar-header {
    height: 76px;
}

.crm .main-menu .shadow-bottom {
    background: linear-gradient(180deg, var(--crm-surface) 44%, rgba(255, 255, 255, 0.5) 73%, rgba(255, 255, 255, 0)) !important;
}

.dark-layout .crm .main-menu .shadow-bottom {
    background: linear-gradient(180deg, var(--crm-surface) 44%, rgba(21, 28, 51, 0.5) 73%, rgba(21, 28, 51, 0)) !important;
}

.crm .beta-logo {
    padding: 3px 7px 2px;
    border-radius: 999px;
    background: var(--crm-grad) !important;
    background-size: 200% 200% !important;
    box-shadow: 0 4px 10px -4px rgba(60, 134, 243, 0.7);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    animation: crm-pan 6s linear infinite;
}

.crm .main-menu .navigation > li {
    animation: crm-slide-left 0.55s var(--crm-ease) backwards;
}

    .crm .main-menu .navigation > li:nth-child(2) { animation-delay: 60ms; }
    .crm .main-menu .navigation > li:nth-child(3) { animation-delay: 120ms; }
    .crm .main-menu .navigation > li:nth-child(4) { animation-delay: 180ms; }
    .crm .main-menu .navigation > li:nth-child(5) { animation-delay: 240ms; }
    .crm .main-menu .navigation > li:nth-child(6) { animation-delay: 300ms; }
    .crm .main-menu .navigation > li:nth-child(7) { animation-delay: 360ms; }

/* Links (top-level Home and every item inside a group) */
.crm .main-menu .navigation li > a:not(.nohover) {
    position: relative;
    overflow: hidden;
    gap: 10px;
    min-height: 42px;
    margin: 2px 12px !important;
    padding: 9px 12px !important;
    border-radius: 12px !important;
    color: var(--crm-text) !important;
    background: transparent;
    box-shadow: none;
    transition: background-color 0.25s ease, color 0.2s ease, box-shadow 0.3s var(--crm-ease), transform 0.3s var(--crm-spring);
}

.crm .main-menu .navigation > li > ul li:not(.has-sub) {
    margin: 0 !important;
}

.crm .main-menu .navigation li > a:not(.nohover) > svg,
.crm .main-menu .navigation li > a:not(.nohover) > i {
    flex-shrink: 0;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    margin: 0 !important;
    color: var(--crm-muted);
    transition: transform 0.35s var(--crm-spring), color 0.2s ease;
}

.crm .main-menu .navigation li > a:not(.nohover) > b {
    font-size: 14px !important;
    font-weight: 500;
    letter-spacing: 0.005em;
    transition: transform 0.3s var(--crm-ease);
}

.crm .main-menu .navigation li.nav-item a:hover > *,
.crm .main-menu .navigation li.nav-item ul.menu-content li a:hover > * {
    transform: none;
}

.crm .main-menu .navigation li > a:not(.nohover):hover {
    background: var(--crm-surface-3);
    color: var(--crm-ink) !important;
}

    .crm .main-menu .navigation li > a:not(.nohover):hover > svg {
        color: var(--crm-primary);
        transform: scale(1.14) rotate(-6deg);
    }

    .crm .main-menu .navigation li > a:not(.nohover):hover > b {
        transform: translateX(3px);
    }

.crm .main-menu .navigation li > a.active,
.crm .main-menu .navigation > li .active,
.crm .main-menu .navigation > li ul .active {
    background: var(--crm-grad) !important;
    color: #FFFFFF !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 22px -10px rgba(60, 134, 243, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

    .crm .main-menu .navigation li > a.active > svg {
        color: #FFFFFF;
    }

    .crm .main-menu .navigation li > a.active::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 45%;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
        pointer-events: none;
        animation: crm-shine 1.1s 0.1s var(--crm-ease) both;
    }

/* Group headers read as section labels */
.crm .main-menu .navigation > li > a.nohover {
    min-height: 0;
    margin: 0 !important;
    padding: 16px 26px 6px !important;
    background: transparent !important;
    box-shadow: none !important;
}

.crm .main-menu.expanded .navigation > li > a.nohover > svg {
    display: none;
}

.crm .main-menu .navigation > li > a.nohover .menu-title {
    font-size: 10.5px !important;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--crm-muted);
}

.crm .main-menu .navigation > li.mt-1 {
    margin-top: 2px !important;
}

.crm .main-menu .navigation .badge-danger {
    --crm-pulse: 232, 56, 95;
    margin-left: 6px;
    background: linear-gradient(135deg, #FF7A93, #E8385F) !important;
    animation: crm-ring 2s ease-out infinite;
}

.crm .main-menu .text-warning.text-bold {
    display: block;
    margin: 8px 16px 16px;
    padding: 7px 10px;
    border-radius: 10px;
    background: var(--crm-warning-soft);
    font-size: 10.5px;
    letter-spacing: 0.1em;
}

/* Collapsed rail: centred icons, labels come back when it expands on hover */
.crm.menu-collapsed .main-menu:not(.expanded) .navigation li > a:not(.nohover) {
    justify-content: center;
    padding: 9px 0 !important;
}

    .crm.menu-collapsed .main-menu:not(.expanded) .navigation li > a:not(.nohover) > b {
        display: none;
    }

.crm.menu-collapsed .main-menu:not(.expanded) .navigation > li > a.nohover {
    justify-content: center;
    padding: 14px 0 6px !important;
}

    .crm.menu-collapsed .main-menu:not(.expanded) .navigation > li > a.nohover > * {
        display: none;
    }

    .crm.menu-collapsed .main-menu:not(.expanded) .navigation > li > a.nohover::before {
        content: "";
        width: 20px;
        height: 2px;
        border-radius: 2px;
        background: var(--crm-line-strong);
    }

/* Mobile overlay menu has to clear the 12px inset too */
.crm.vertical-overlay-menu .main-menu {
    transform: translate3d(calc(-100% - 24px), 0, 0);
}

.crm.vertical-overlay-menu.menu-open .main-menu {
    transform: translate3d(0, 0, 0);
}

/* ---------- Header ---------- */
.crm .header-navbar.floating-nav {
    border: 1px solid var(--crm-line);
    border-radius: 18px !important;
    background: var(--crm-glass) !important;
    -webkit-backdrop-filter: saturate(170%) blur(18px);
    backdrop-filter: saturate(170%) blur(18px);
    box-shadow: 0 1px 2px rgba(8, 23, 53, 0.04), 0 14px 34px -22px rgba(8, 23, 53, 0.35) !important;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
    animation: crm-drop 0.6s var(--crm-ease) backwards;
}

.crm.crm-scrolled .header-navbar.floating-nav {
    box-shadow: 0 1px 2px rgba(8, 23, 53, 0.05), 0 18px 40px -18px rgba(8, 23, 53, 0.42) !important;
}

.crm .header-navbar-shadow {
    background: linear-gradient(180deg, var(--crm-bg) 30%, rgba(242, 245, 252, 0)) !important;
    opacity: 0.85;
}

.dark-layout .crm .header-navbar-shadow {
    background: linear-gradient(180deg, var(--crm-bg) 30%, rgba(13, 18, 36, 0)) !important;
}

.crm .header-navbar .navbar-nav > .nav-item > .nav-link,
.crm .header-navbar .navbar-nav > div > .nav-item > .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 !important;
    border-radius: 12px;
    background: var(--crm-surface-2);
    color: var(--crm-text) !important;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.3s var(--crm-spring), box-shadow 0.3s ease;
}

    .crm .header-navbar .navbar-nav > .nav-item > .nav-link:hover,
    .crm .header-navbar .navbar-nav > div > .nav-item > .nav-link:hover {
        background: var(--crm-primary-soft);
        color: var(--crm-primary) !important;
        transform: translateY(-2px);
        box-shadow: 0 8px 16px -10px rgba(60, 134, 243, 0.6);
    }

.crm .header-navbar .nav-link-style .ficon {
    margin: 0 !important;
    transition: transform 0.6s var(--crm-spring);
}

.crm .header-navbar .nav-link-style:hover .ficon {
    transform: rotate(-35deg) scale(1.1);
}

.crm .header-navbar .dropdown-notification .nav-link svg {
    transform-origin: 50% 2px;
}

.crm .header-navbar .dropdown-notification .nav-link:has(.badge) svg {
    animation: crm-bell 5s ease-in-out 1.2s infinite;
}

.crm .header-navbar .dropdown-notification .badge-up {
    --crm-pulse: 232, 56, 95;
    top: -5px;
    right: -5px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border: 2px solid var(--crm-surface);
    background: linear-gradient(135deg, #FF7A93, #E8385F) !important;
    font-size: 10px;
    line-height: 15px;
    animation: crm-pop 0.5s var(--crm-spring) backwards, crm-ring 2.4s 0.6s ease-out infinite;
}

/* Avatar button: gradient ring that spins up on hover */
.crm .header-navbar .dropdown-user > .nav-link {
    gap: 8px;
    padding: 3px 12px 3px 3px !important;
    border-radius: 999px !important;
}

.crm .header-navbar .dropdown-user .avatar {
    position: relative;
    margin: 0 !important;
}

.crm .header-navbar .dropdown-user > .nav-link > .avatar > .avatar {
    padding: 2px;
    background: conic-gradient(from 0deg, #5AB8F2, #3C86F3, #6A5CF6, #FF8A73, #5AB8F2) !important;
    transition: transform 0.6s var(--crm-ease);
}

    .crm .header-navbar .dropdown-user > .nav-link > .avatar > .avatar .avatar-content {
        width: 32px;
        height: 32px;
        border: 2px solid var(--crm-surface);
        border-radius: 50%;
        background: var(--crm-grad);
        color: #FFFFFF;
        font-weight: 600;
        box-shadow: none !important;
    }

.crm .header-navbar .dropdown-user > .nav-link:hover > .avatar > .avatar {
    transform: rotate(180deg);
}

    .crm .header-navbar .dropdown-user > .nav-link:hover > .avatar > .avatar .avatar-content {
        transform: rotate(-180deg);
    }

.crm .header-navbar .dropdown-user > .nav-link > .avatar::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 1px;
    width: 10px;
    height: 10px;
    border: 2px solid var(--crm-surface);
    border-radius: 50%;
    background: #22C55E;
}

.crm .header-navbar .dropdown-user > .nav-link > svg {
    color: var(--crm-muted);
    transition: transform 0.3s var(--crm-ease);
}

.crm .header-navbar .dropdown-user.show > .nav-link > svg {
    transform: rotate(180deg);
}

/* Route crumb and greeting (HeaderMenu renders it for CRM users) */
.crm-crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 13.5px;
    white-space: nowrap;
    animation: crm-slide-left 0.45s var(--crm-ease) backwards;
}

.crm-crumb-section {
    color: var(--crm-muted);
}

.crm-crumb-sep {
    flex-shrink: 0;
    color: var(--crm-line-strong);
}

.crm-crumb-page {
    font-weight: 600;
    color: var(--crm-ink);
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-crumb-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--crm-grad);
    color: #FFFFFF;
    box-shadow: var(--crm-glow);
    flex-shrink: 0;
}

.crm-greeting {
    color: var(--crm-text);
}

    .crm-greeting b {
        font-weight: 600;
        color: var(--crm-ink);
    }

.crm-wave {
    display: inline-block;
    transform-origin: 70% 70%;
    animation: crm-wiggle 1.2s 0.5s ease-in-out 2;
}

/* ---------- Page transitions ---------- */
/* MainLayout wraps @Body in .sb-page: each page fades in on navigation (opacity only, so fixed children keep their anchor) */
.crm .sb-page > :not(.modal) {
    animation: crm-fade 0.4s ease-out backwards;
}

/* ---------- Page header (in-content) ---------- */
.crm-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px 20px;
    margin: 6px 0 22px;
    animation: crm-rise-sm 0.55s var(--crm-ease) backwards;
}

.crm-page-head-text {
    min-width: 0;
}

.crm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--crm-primary);
}

    .crm-eyebrow::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--crm-grad);
        box-shadow: 0 0 0 3px var(--crm-primary-soft);
    }

.crm .crm-page-title {
    margin: 6px 0 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--crm-ink);
}

.crm-page-sub {
    margin: 4px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--crm-muted);
}

.crm-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.crm-page-crumbs {
    margin: 2px 0 14px;
    animation: crm-slide-left 0.45s var(--crm-ease) backwards;
}

.crm-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 30px 0 14px;
    font-size: 17px;
    font-weight: 600;
    color: var(--crm-ink);
}

    .crm-section-title::after {
        content: "";
        flex: 1 1 auto;
        height: 1px;
        background: linear-gradient(90deg, var(--crm-line-strong), rgba(0, 0, 0, 0));
    }

/* ---------- Cards ---------- */
.crm .card {
    border: 1px solid var(--crm-line);
    border-radius: var(--crm-radius);
    background-color: var(--crm-surface);
    box-shadow: var(--crm-shadow);
}

    .crm .card .card {
        box-shadow: var(--crm-shadow-sm);
    }

.crm .card-header {
    border-bottom: 0;
    background: transparent;
    padding: 20px 22px 4px;
}

    .crm .card-header > h5,
    .crm .card-header > h4,
    .crm .card-header > h3 {
        margin-bottom: 0;
        font-size: 16px;
        font-weight: 600;
        color: var(--crm-ink);
    }

.crm .card-body {
    padding: 20px 22px;
}

.crm .card-footer {
    border-top: 1px solid var(--crm-line);
    background: transparent;
}

.crm .content-body .card {
    animation: crm-rise 0.65s var(--crm-ease) backwards;
    animation-delay: calc(80ms + var(--crm-i, 0) * 70ms);
}

    .crm .content-body .card .card {
        animation: none;
    }

/* Stagger index shared by every animated collection */
.crm .row > :nth-child(2), .crm .content-body .card:nth-child(2), .crm .adm-kpis > :nth-child(2), .crm .adm-grid > :nth-child(2), .crm .crm-grid > :nth-child(2) { --crm-i: 1; }
.crm .row > :nth-child(3), .crm .content-body .card:nth-child(3), .crm .adm-kpis > :nth-child(3), .crm .adm-grid > :nth-child(3), .crm .crm-grid > :nth-child(3) { --crm-i: 2; }
.crm .row > :nth-child(4), .crm .content-body .card:nth-child(4), .crm .adm-kpis > :nth-child(4), .crm .crm-grid > :nth-child(4) { --crm-i: 3; }
.crm .row > :nth-child(5), .crm .content-body .card:nth-child(5), .crm .crm-grid > :nth-child(5) { --crm-i: 4; }
.crm .row > :nth-child(6), .crm .content-body .card:nth-child(6), .crm .crm-grid > :nth-child(6) { --crm-i: 5; }
.crm .row > :nth-child(7), .crm .content-body .card:nth-child(7), .crm .crm-grid > :nth-child(7) { --crm-i: 6; }
.crm .row > :nth-child(n+8), .crm .content-body .card:nth-child(n+8), .crm .crm-grid > :nth-child(n+8) { --crm-i: 7; }

.crm .adm-grid-even,
.crm .adm-grid-wide:not(:first-child) {
    --crm-i: 2;
}

/* ---------- Buttons ---------- */
.crm .btn {
    border-radius: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: transform 0.25s var(--crm-spring), box-shadow 0.3s var(--crm-ease), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

    .crm .btn:not(:disabled):not(.disabled):active {
        transform: scale(0.95) !important;
    }

    .crm .btn:focus,
    .crm .btn.focus {
        box-shadow: 0 0 0 4px var(--crm-primary-soft) !important;
    }

    .crm .btn:disabled,
    .crm .btn.disabled {
        opacity: 0.5;
        box-shadow: none !important;
    }

.crm .btn-sm {
    border-radius: 10px;
}

.crm .btn-primary,
.crm .btn-danger,
.crm .btn-success,
.crm .btn-warning {
    position: relative;
    overflow: hidden;
    border-color: transparent !important;
    color: #FFFFFF !important;
    background-size: 150% 150% !important;
    background-position: 0% 50% !important;
    transition: transform 0.25s var(--crm-spring), box-shadow 0.3s var(--crm-ease), background-position 0.6s var(--crm-ease), opacity 0.2s ease;
}

.crm .btn-primary {
    background-image: var(--crm-grad) !important;
    box-shadow: 0 8px 18px -10px rgba(60, 134, 243, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

.crm .btn-danger {
    background-image: linear-gradient(135deg, #FF7C95 0%, #E8385F 60%, #D42A63 100%) !important;
    box-shadow: 0 8px 18px -10px rgba(232, 56, 95, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

.crm .btn-success {
    background-image: linear-gradient(135deg, #3DD68C 0%, #16A864 60%, #0E8F5A 100%) !important;
    box-shadow: 0 8px 18px -10px rgba(22, 168, 100, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

.crm .btn-warning {
    background-image: linear-gradient(135deg, #FFC85C 0%, #F5A524 60%, #E8870C 100%) !important;
    box-shadow: 0 8px 18px -10px rgba(245, 165, 36, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

    .crm .btn-primary:not(.dropdown-toggle)::after,
    .crm .btn-danger:not(.dropdown-toggle)::after,
    .crm .btn-success:not(.dropdown-toggle)::after,
    .crm .btn-warning:not(.dropdown-toggle)::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 45%;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));
        transform: translateX(-130%) skewX(-18deg);
        pointer-events: none;
    }

    .crm .btn-primary:not(:disabled):hover,
    .crm .btn-danger:not(:disabled):hover,
    .crm .btn-success:not(:disabled):hover,
    .crm .btn-warning:not(:disabled):hover {
        transform: translateY(-2px);
        background-position: 100% 50% !important;
    }

    .crm .btn-primary:not(:disabled):hover {
        box-shadow: 0 14px 26px -12px rgba(60, 134, 243, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
    }

    .crm .btn-danger:not(:disabled):hover {
        box-shadow: 0 14px 26px -12px rgba(232, 56, 95, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
    }

        .crm .btn-primary:not(:disabled):hover::after,
        .crm .btn-danger:not(:disabled):hover::after,
        .crm .btn-success:not(:disabled):hover::after,
        .crm .btn-warning:not(:disabled):hover::after {
            animation: crm-shine 0.9s var(--crm-ease);
        }

.crm .btn-secondary {
    border: 1px solid var(--crm-line-strong) !important;
    background: var(--crm-surface) !important;
    color: var(--crm-text) !important;
    box-shadow: var(--crm-shadow-sm) !important;
}

    .crm .btn-secondary:not(:disabled):hover {
        border-color: var(--crm-muted) !important;
        color: var(--crm-ink) !important;
        transform: translateY(-1px);
    }

.crm .btn-outline-primary,
.crm .btn-outline-danger,
.crm .btn-outline-success,
.crm .btn-outline-warning,
.crm .btn-outline-info {
    border-color: transparent !important;
}

.crm .btn-outline-primary {
    background-color: var(--crm-primary-soft) !important;
    color: var(--crm-primary-ink) !important;
}

.crm .btn-outline-danger {
    background-color: var(--crm-danger-soft) !important;
    color: var(--crm-danger) !important;
}

.crm .btn-outline-success {
    background-color: var(--crm-success-soft) !important;
    color: var(--crm-success) !important;
}

.crm .btn-outline-warning {
    background-color: var(--crm-warning-soft) !important;
    color: var(--crm-warning) !important;
}

.crm .btn-outline-info {
    background-color: var(--crm-info-soft) !important;
    color: var(--crm-info) !important;
}

    .crm .btn-outline-primary:not(:disabled):hover {
        background-color: var(--crm-primary) !important;
        color: #FFFFFF !important;
        box-shadow: var(--crm-glow) !important;
        transform: translateY(-2px);
    }

    .crm .btn-outline-danger:not(:disabled):hover {
        background-color: var(--crm-danger) !important;
        color: #FFFFFF !important;
        box-shadow: 0 8px 20px -8px rgba(232, 56, 95, 0.7) !important;
        transform: translateY(-2px);
    }

    .crm .btn-outline-success:not(:disabled):hover {
        background-color: var(--crm-success) !important;
        color: #FFFFFF !important;
        box-shadow: 0 8px 20px -8px rgba(22, 168, 100, 0.7) !important;
        transform: translateY(-2px);
    }

    .crm .btn-outline-warning:not(:disabled):hover {
        background-color: var(--crm-warning) !important;
        color: #FFFFFF !important;
        box-shadow: 0 8px 20px -8px rgba(245, 165, 36, 0.7) !important;
        transform: translateY(-2px);
    }

    .crm .btn-outline-info:not(:disabled):hover {
        background-color: var(--crm-info) !important;
        color: #FFFFFF !important;
        transform: translateY(-2px);
    }

.crm .btn-outline-secondary {
    border: 1px solid var(--crm-line-strong) !important;
    background-color: var(--crm-surface) !important;
    color: var(--crm-text) !important;
}

    .crm .btn-outline-secondary:not(:disabled):hover {
        border-color: var(--crm-primary) !important;
        background-color: var(--crm-surface) !important;
        color: var(--crm-primary) !important;
        box-shadow: 0 8px 18px -12px rgba(60, 134, 243, 0.7) !important;
        transform: translateY(-2px);
    }

.crm .btn svg,
.crm .btn i {
    transition: transform 0.3s var(--crm-spring);
}

.crm .btn:not(:disabled):hover svg {
    transform: scale(1.12);
}

.crm .btn .spinner-border-sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
    vertical-align: -2px;
}

/* Icon-only square button */
.crm-icon-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0 !important;
}

    .crm-icon-btn.btn-sm {
        width: 32px;
        height: 32px;
    }

/* "Open" row action: arrow slides on hover */
.crm-open {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 6px 12px !important;
    font-size: 12.5px !important;
}

    .crm-open svg {
        transition: transform 0.3s var(--crm-spring) !important;
    }

    .crm-open:hover svg,
    tr:hover .crm-open svg {
        transform: translateX(3px) !important;
    }

/* ---------- Forms ---------- */
.crm .form-control,
.crm .custom-select {
    border: 1px solid var(--crm-line);
    border-radius: 12px;
    background-color: var(--crm-surface-2);
    color: var(--crm-ink);
    transition: border-color 0.2s ease, box-shadow 0.3s var(--crm-ease), background-color 0.2s ease;
}

.crm .form-control:not(textarea):not(.form-control-sm):not(.form-control-lg) {
    height: 42px;
}

.crm .form-control-sm {
    border-radius: 10px;
}

.crm .form-control::placeholder {
    color: var(--crm-muted);
    opacity: 0.85;
}

.crm .form-control:hover {
    border-color: var(--crm-line-strong);
    box-shadow: none;
}

.crm .form-control:focus,
.crm .custom-select:focus {
    border-color: var(--crm-primary) !important;
    background-color: var(--crm-surface);
    box-shadow: 0 0 0 4px var(--crm-primary-soft), 0 8px 18px -14px rgba(60, 134, 243, 0.8) !important;
}

.crm select.form-control:not([multiple="multiple"]) {
    background-position: calc(100% - 12px) center, calc(100% - 20px) center, 100% 0;
}

.crm .form-group > label,
.crm .form-label,
.crm .crm-label {
    margin-bottom: 6px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--crm-text);
}

.crm .input-group-text {
    border-color: var(--crm-line);
    background: var(--crm-surface-2);
    color: var(--crm-muted);
}

.crm .custom-file-label {
    height: 42px;
    padding-top: 9px;
    border: 1px dashed var(--crm-line-strong);
    border-radius: 12px;
    background: var(--crm-surface-2);
    color: var(--crm-muted);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

    .crm .custom-file-label::after {
        height: 40px;
        padding-top: 9px;
        border-radius: 0 11px 11px 0;
        background: var(--crm-primary-soft);
        color: var(--crm-primary-ink);
        font-weight: 500;
    }

.crm .custom-file:hover .custom-file-label {
    border-color: var(--crm-primary);
    background: var(--crm-surface);
}

/* Switches: springy knob that squashes while pressed */
.crm .custom-switch .custom-control-label::before {
    border: 0 !important;
    background-color: var(--crm-line-strong);
    box-shadow: inset 0 1px 2px rgba(8, 23, 53, 0.12);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.crm .custom-switch .custom-control-label::after {
    background-color: #FFFFFF;
    box-shadow: 0 2px 5px rgba(8, 23, 53, 0.25);
    transition: transform 0.4s var(--crm-spring), width 0.2s ease;
}

.crm .custom-switch .custom-control-input:checked ~ .custom-control-label::before {
    background: var(--crm-grad);
    box-shadow: 0 6px 14px -6px rgba(60, 134, 243, 0.8);
}

.crm .custom-switch .custom-control-input:not(:disabled):active ~ .custom-control-label::after {
    width: 1.5rem;
}

.crm .custom-switch .custom-control-input:checked:not(:disabled):active ~ .custom-control-label::after {
    transform: translateX(1.1rem);
}

.crm .custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 4px var(--crm-primary-soft) !important;
}

.crm .custom-control-label {
    color: var(--crm-text);
}

.crm .custom-checkbox .custom-control-label::before {
    border-radius: 6px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.crm .custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
    border-color: transparent;
    background: var(--crm-grad);
    box-shadow: 0 4px 10px -4px rgba(60, 134, 243, 0.8);
}

.crm .custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
    animation: crm-check 0.35s var(--crm-spring);
}

/* ---------- Tables ---------- */
.crm .table {
    margin-bottom: 0;
    color: var(--crm-text);
    border-collapse: separate;
    border-spacing: 0;
}

    .crm .table thead th,
    .crm .table .thead-light th {
        padding: 12px 18px;
        border: 0 !important;
        border-bottom: 1px solid var(--crm-line) !important;
        background: var(--crm-surface-2) !important;
        color: var(--crm-muted) !important;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        white-space: nowrap;
        vertical-align: middle;
        transition: color 0.2s ease;
    }

        .crm .table thead th:hover {
            color: var(--crm-ink) !important;
        }

        .crm .table thead th .feather,
        .crm .table thead th .crm-i {
            width: 14px;
            height: 14px;
            color: var(--crm-primary);
            vertical-align: -2px;
            animation: crm-pop 0.35s var(--crm-spring);
        }

    .crm .table td {
        padding: 13px 18px;
        border-top: 1px solid var(--crm-line);
        vertical-align: middle;
        transition: background-color 0.2s ease;
    }

    .crm .table tbody tr:first-child td {
        border-top: 0;
    }

    .crm .table td > label {
        margin: 0;
        font-size: inherit;
        color: inherit;
    }

    .crm .table tbody tr:hover > td {
        background-color: var(--crm-row-hover);
    }

    .crm .table tbody tr > td:first-child {
        position: relative;
    }

        .crm .table tbody tr > td:first-child::before {
            content: "";
            position: absolute;
            top: 10px;
            bottom: 10px;
            left: 0;
            width: 3px;
            border-radius: 0 3px 3px 0;
            background: var(--crm-grad);
            transform: scaleY(0);
            transition: transform 0.3s var(--crm-spring);
        }

    .crm .table tbody tr:hover > td:first-child::before {
        transform: scaleY(1);
    }

    .crm .table tbody tr {
        animation: crm-rise-sm 0.5s var(--crm-ease) backwards;
    }

        .crm .table tbody tr:nth-child(2) { animation-delay: 30ms; }
        .crm .table tbody tr:nth-child(3) { animation-delay: 60ms; }
        .crm .table tbody tr:nth-child(4) { animation-delay: 90ms; }
        .crm .table tbody tr:nth-child(5) { animation-delay: 120ms; }
        .crm .table tbody tr:nth-child(6) { animation-delay: 150ms; }
        .crm .table tbody tr:nth-child(7) { animation-delay: 180ms; }
        .crm .table tbody tr:nth-child(8) { animation-delay: 210ms; }
        .crm .table tbody tr:nth-child(9) { animation-delay: 240ms; }
        .crm .table tbody tr:nth-child(10) { animation-delay: 270ms; }
        .crm .table tbody tr:nth-child(11) { animation-delay: 300ms; }
        .crm .table tbody tr:nth-child(12) { animation-delay: 330ms; }
        .crm .table tbody tr:nth-child(13) { animation-delay: 360ms; }
        .crm .table tbody tr:nth-child(14) { animation-delay: 390ms; }
        .crm .table tbody tr:nth-child(15) { animation-delay: 420ms; }
        .crm .table tbody tr:nth-child(16) { animation-delay: 450ms; }
        .crm .table tbody tr:nth-child(n+17) { animation: none; }

.crm .card-datatable,
.crm .card > .table-responsive {
    border-radius: inherit;
}

.crm .card > .card-datatable > .table thead th:first-child,
.crm .crm-table-card .table thead th:first-child {
    border-top-left-radius: calc(var(--crm-radius) - 1px);
}

.crm .card > .card-datatable > .table thead th:last-child,
.crm .crm-table-card .table thead th:last-child {
    border-top-right-radius: calc(var(--crm-radius) - 1px);
}

/* ---------- Badges, pills, avatars ---------- */
.crm .badge {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.crm .badge-pill,
.crm .badge[class*="badge-light-"] {
    border-radius: 999px;
}

.crm .badge-light-primary { background: var(--crm-primary-soft) !important; color: var(--crm-primary-ink) !important; }
.crm .badge-light-success { background: var(--crm-success-soft) !important; color: var(--crm-success) !important; }
.crm .badge-light-danger { background: var(--crm-danger-soft) !important; color: var(--crm-danger) !important; }
.crm .badge-light-warning { background: var(--crm-warning-soft) !important; color: var(--crm-warning) !important; }
.crm .badge-light-info { background: var(--crm-info-soft) !important; color: var(--crm-info) !important; }
.crm .badge-light-secondary { background: var(--crm-gray-soft) !important; color: var(--crm-text) !important; }

.crm-pill {
    --tone: var(--crm-muted);
    --tone-soft: var(--crm-gray-soft);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--tone-soft);
    color: var(--tone);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}

    .crm-pill > i {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: currentColor;
        flex-shrink: 0;
    }

    .crm-pill.is-live > i {
        animation: crm-blink 1.6s ease-in-out infinite;
    }

.crm-tone-blue { --tone: var(--crm-primary-ink); --tone-soft: var(--crm-primary-soft); }
.crm-tone-green { --tone: var(--crm-success); --tone-soft: var(--crm-success-soft); }
.crm-tone-amber { --tone: var(--crm-warning); --tone-soft: var(--crm-warning-soft); }
.crm-tone-red { --tone: var(--crm-danger); --tone-soft: var(--crm-danger-soft); }
.crm-tone-violet { --tone: var(--crm-violet); --tone-soft: var(--crm-violet-soft); }
.crm-tone-sky { --tone: var(--crm-info); --tone-soft: var(--crm-info-soft); }
.crm-tone-coral { --tone: var(--crm-coral); --tone-soft: var(--crm-coral-soft); }
.crm-tone-gray { --tone: var(--crm-muted); --tone-soft: var(--crm-gray-soft); }

.crm-avatar {
    --h: 212;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, hsl(var(--h) 92% 68%), hsl(calc(var(--h) + 38) 82% 58%));
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 6px 14px -8px hsl(var(--h) 80% 45%), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: transform 0.35s var(--crm-spring), border-radius 0.35s var(--crm-ease);
}

tr:hover .crm-avatar {
    transform: scale(1.08) rotate(-4deg);
    border-radius: 50%;
}

.crm-avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 12px;
}

.crm-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

a.crm-user-cell:hover {
    text-decoration: none;
}

    a.crm-user-cell:hover .crm-user-name {
        color: var(--crm-primary);
    }

.crm-user-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
}

.crm-user-name {
    font-weight: 600;
    color: var(--crm-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-user-mail {
    font-size: 12.5px;
    color: var(--crm-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-when {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

    .crm-when b {
        font-weight: 500;
        color: var(--crm-ink);
    }

    .crm-when small {
        font-size: 12px;
        color: var(--crm-muted);
    }

.crm-activity {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .crm-activity > i {
        position: relative;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--tone, var(--crm-muted));
        flex-shrink: 0;
    }

    .crm-activity.crm-tone-green > i::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        border-radius: 50%;
        background: inherit;
        animation: crm-ping 2.2s ease-out infinite;
    }

.crm-shop-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    overflow: hidden;
    border: 1px solid var(--crm-line);
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: var(--crm-shadow-sm);
    transition: transform 0.35s var(--crm-spring);
}

    .crm-shop-logo img {
        max-width: 22px;
        max-height: 22px;
        object-fit: contain;
    }

tr:hover .crm-shop-logo {
    transform: scale(1.08) rotate(-4deg);
}

.crm-link-cell {
    display: inline-block;
    max-width: 300px;
    overflow: hidden;
    color: var(--crm-muted);
    font-size: 12.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.crm-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    font-size: 12.5px;
    letter-spacing: 0;
}

.crm-muted {
    color: var(--crm-muted);
}

/* ---------- Toolbar & table card ---------- */
.crm-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.crm-search {
    position: relative;
    flex: 1 1 260px;
    min-width: 0;
}

    .crm-search > svg {
        position: absolute;
        top: 50%;
        left: 14px;
        margin-top: -9px;
        color: var(--crm-muted);
        pointer-events: none;
        transition: color 0.2s ease, transform 0.3s var(--crm-spring);
    }

    .crm-search .form-control {
        padding-left: 42px;
    }

    .crm-search:focus-within > svg {
        color: var(--crm-primary);
        transform: scale(1.12);
    }

.crm-toolbar-select {
    flex: 0 1 190px;
    min-width: 150px;
}

.crm-toolbar-switches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
}

.crm-toolbar-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.crm-toolbar-divider {
    flex-basis: 100%;
    height: 1px;
    margin: 0 -16px;
    background: var(--crm-line);
}

.crm-table-card {
    overflow: hidden;
}

.crm-table-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--crm-line);
}

.crm-table-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--crm-ink);
}

.crm-count {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--crm-primary-soft);
    color: var(--crm-primary-ink);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.crm-table-card .table-responsive {
    margin: 0;
}

.crm-table-card .table thead th {
    border-radius: 0 !important;
}

.crm-table-foot {
    padding: 14px 20px;
    border-top: 1px solid var(--crm-line);
}

.crm .crm-sort {
    cursor: pointer;
    user-select: none;
}

    .crm .crm-sort:hover {
        color: var(--crm-primary) !important;
    }

/* Loading skeletons */
.crm-skel {
    display: inline-block;
    width: 90px;
    max-width: 100%;
    height: 12px;
    border-radius: 6px;
    vertical-align: middle;
    background: linear-gradient(90deg, var(--crm-surface-2) 0%, var(--crm-surface-3) 50%, var(--crm-surface-2) 100%);
    background-size: 200% 100%;
    animation: crm-shimmer 1.4s ease-in-out infinite;
}

.crm-skel-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
}

.crm-skel-lg {
    width: 140px;
    height: 14px;
}

.crm-skel-sm {
    width: 60px;
    height: 10px;
}

.crm-skel-stack {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

/* Empty state */
.crm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 38px 16px;
    text-align: center;
    color: var(--crm-muted);
    animation: crm-fade 0.5s ease backwards;
}

    .crm-empty > span:first-child {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 54px;
        height: 54px;
        margin-bottom: 6px;
        border-radius: 18px;
        background: var(--crm-primary-soft);
        color: var(--crm-primary);
        animation: crm-float 3.2s ease-in-out infinite;
    }

    .crm-empty b {
        font-size: 15px;
        font-weight: 600;
        color: var(--crm-ink);
    }

    .crm-empty p {
        margin: 0;
        font-size: 13px;
    }

/* ---------- Tabs ---------- */
.crm .nav-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 18px;
    padding: 4px;
    border: 1px solid var(--crm-line);
    border-radius: 14px;
    background: var(--crm-surface-2);
}

    .crm .nav-tabs .nav-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 16px;
        border: 0 !important;
        border-radius: 10px !important;
        background: transparent;
        color: var(--crm-muted);
        font-weight: 500;
        transition: color 0.2s ease, background-color 0.2s ease;
    }

        .crm .nav-tabs .nav-link::after {
            display: none !important;
        }

        .crm .nav-tabs .nav-link:hover {
            color: var(--crm-ink);
        }

        .crm .nav-tabs .nav-link.active {
            background: var(--crm-surface) !important;
            color: var(--crm-primary) !important;
            box-shadow: 0 1px 2px rgba(8, 23, 53, 0.06), 0 8px 18px -10px rgba(8, 23, 53, 0.3);
            animation: crm-pop 0.4s var(--crm-spring);
        }

        .crm .nav-tabs .nav-link svg {
            margin-right: 0 !important;
        }

.crm .nav-pills .nav-link {
    border-radius: 10px;
    color: var(--crm-muted);
    font-weight: 500;
    transition: color 0.2s ease, background-color 0.2s ease;
}

    .crm .nav-pills .nav-link svg {
        margin-right: 6px;
    }

    .crm .nav-pills .nav-link.active {
        background: var(--crm-grad) !important;
        color: #FFFFFF !important;
        box-shadow: var(--crm-glow) !important;
        animation: crm-pop 0.4s var(--crm-spring);
    }

.crm .tab-pane.active {
    animation: crm-rise-sm 0.45s var(--crm-ease);
}

/* ---------- Breadcrumb ---------- */
.crm .breadcrumb {
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: 13px;
}

.crm .breadcrumb-item a {
    color: var(--crm-muted);
    transition: color 0.2s ease;
}

    .crm .breadcrumb-item a:hover {
        color: var(--crm-primary);
    }

.crm .breadcrumb-item.active {
    color: var(--crm-ink);
    font-weight: 500;
}

/* ---------- Lists ---------- */
.crm .list-group-item {
    border-color: var(--crm-line);
    background-color: transparent;
    color: var(--crm-text);
    transition: background-color 0.2s ease;
    animation: crm-rise-sm 0.45s var(--crm-ease) backwards;
}

    .crm .list-group-item:nth-child(2) { animation-delay: 40ms; }
    .crm .list-group-item:nth-child(3) { animation-delay: 80ms; }
    .crm .list-group-item:nth-child(4) { animation-delay: 120ms; }
    .crm .list-group-item:nth-child(5) { animation-delay: 160ms; }
    .crm .list-group-item:nth-child(n+6) { animation-delay: 200ms; }

.crm .list-group-flush .list-group-item:hover {
    background-color: var(--crm-surface-2);
}

.crm .list-group-item.bg-primary {
    background: var(--crm-grad) !important;
    border-color: transparent;
    box-shadow: var(--crm-glow);
}

.crm hr {
    border-color: var(--crm-line);
}

/* ---------- Modals ---------- */
.crm .modal.show.animated {
    animation: crm-shell-in 0.2s ease forwards;
}

.crm .modal.show .modal-content {
    animation: crm-modal-in 0.5s var(--crm-spring) backwards;
}

.crm .modal-content {
    overflow: hidden;
    border: 1px solid var(--crm-line);
    border-radius: 22px !important;
    background: var(--crm-surface);
    box-shadow: 0 40px 90px -30px rgba(8, 23, 53, 0.5);
}

.crm .modal-header {
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--crm-line);
    border-radius: 0 !important;
    background: transparent !important;
}

.crm .modal-title,
.crm .modal-danger .modal-header .modal-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--crm-ink) !important;
}

.crm .modal-body {
    padding: 20px 22px;
    color: var(--crm-text);
}

.crm .modal-footer {
    gap: 8px;
    padding: 0 22px 22px;
}

    .crm .modal-footer > * {
        margin: 0;
    }

.crm .modal .close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px !important;
    height: 34px !important;
    margin: 0 !important;
    border-radius: 10px !important;
    color: var(--crm-muted);
    opacity: 1;
    text-shadow: none;
    transition: transform 0.35s var(--crm-spring), background-color 0.2s ease, color 0.2s ease !important;
}

    .crm .modal .close:hover {
        background-color: var(--crm-danger-soft) !important;
        color: var(--crm-danger);
        transform: rotate(90deg) !important;
    }

.crm .modal-backdrop.show {
    opacity: 1 !important;
    background-color: rgba(8, 23, 53, 0.32);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: crm-fade 0.3s ease;
}

.dark-layout .crm .modal-backdrop.show {
    background-color: rgba(3, 6, 16, 0.6);
}

/* Slide-in panels float with a margin */
.crm .modal.modal-slide-in .modal-dialog {
    top: 12px;
    right: 12px;
    bottom: 12px;
    height: auto;
}

.crm .modal.modal-slide-in .modal-content {
    height: 100%;
    overflow-y: auto;
}

.crm .modal.modal-slide-in.show .modal-content {
    animation: crm-slide-right 0.55s var(--crm-ease) backwards;
}

.crm .modal.modal-slide-in .close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    background: var(--crm-surface-2);
}

/* ---------- Dropdowns ---------- */
.crm .dropdown-menu {
    padding: 6px;
    border: 1px solid var(--crm-line);
    border-radius: 16px;
    background: var(--crm-surface);
    box-shadow: var(--crm-shadow-lg);
}

    .crm .dropdown-menu.show {
        animation: crm-dropdown-in 0.35s var(--crm-spring) forwards;
    }

.crm .dropdown-item {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--crm-text);
    font-size: 13.5px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    .crm .dropdown-item:hover,
    .crm .dropdown-item:focus {
        background: var(--crm-surface-2);
        color: var(--crm-primary);
    }

    .crm .dropdown-item svg {
        transition: transform 0.3s var(--crm-spring);
    }

    .crm .dropdown-item:hover svg {
        transform: translateX(2px) scale(1.12);
    }

.crm .dropdown-user .dropdown-menu .user-name {
    margin-bottom: 0;
    color: var(--crm-ink);
}

.crm .dropdown-user .dropdown-menu .user-status {
    font-size: 12px;
    color: var(--crm-muted);
}

.crm .dropdown-user .dropdown-menu hr {
    margin: 6px 0 !important;
}

.crm .dropdown-notification .dropdown-menu-header .notification-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--crm-ink);
}

.crm .dropdown-notification .media-list > a {
    margin: 2px 0;
    border-radius: 12px;
    transition: background-color 0.2s ease;
}

    .crm .dropdown-notification .media-list > a:hover {
        background: var(--crm-surface-2);
    }

.crm .dropdown-notification .media {
    border: 0 !important;
}

/* ---------- Toasts ---------- */
.crm .toast-container {
    z-index: 1090;
}

.crm .toast {
    max-width: 380px;
    margin-bottom: 10px;
    border: 0;
    border-radius: 16px !important;
    background: transparent;
    box-shadow: none;
    /* Leaves just before ToastNotification hides it (5s by default) */
    animation: crm-toast-in 0.6s var(--crm-spring) backwards, crm-toast-out 0.4s ease-in 4.55s forwards;
}

    .crm .toast .toast-body {
        --tone: var(--crm-primary);
        --tone-soft: var(--crm-primary-soft);
        position: relative;
        overflow: hidden;
        min-width: 280px;
        padding: 14px 16px 16px 58px !important;
        border: 1px solid var(--crm-line);
        border-radius: 16px !important;
        background: var(--crm-surface) !important;
        color: var(--crm-ink) !important;
        box-shadow: var(--crm-shadow-lg);
        font-size: 13.5px;
        font-weight: 500;
    }

        .crm .toast .toast-body.bg-success { --tone: var(--crm-success); --tone-soft: var(--crm-success-soft); }
        .crm .toast .toast-body.bg-danger { --tone: var(--crm-danger); --tone-soft: var(--crm-danger-soft); }
        .crm .toast .toast-body.bg-warning { --tone: var(--crm-warning); --tone-soft: var(--crm-warning-soft); }

        .crm .toast .toast-body::before {
            content: "";
            position: absolute;
            top: 50%;
            left: 16px;
            width: 28px;
            height: 28px;
            margin-top: -15px;
            border-radius: 50%;
            background: var(--tone) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='11' x2='12' y2='16'/%3E%3Cline x1='12' y1='7.5' x2='12' y2='7.6'/%3E%3C/svg%3E") center / 16px no-repeat;
            box-shadow: 0 0 0 5px var(--tone-soft);
            animation: crm-pop 0.5s 0.15s var(--crm-spring) backwards;
        }

        .crm .toast .toast-body.bg-success::before {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
        }

        .crm .toast .toast-body.bg-danger::before {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
        }

        .crm .toast .toast-body.bg-warning::before {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='7' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12' y2='17.1'/%3E%3C/svg%3E");
        }

        /* Runs out as the toast starts to leave */
        .crm .toast .toast-body::after {
            content: "";
            position: absolute;
            right: 0;
            bottom: 0;
            left: 0;
            height: 3px;
            background: var(--tone);
            opacity: 0.8;
            transform-origin: left;
            animation: crm-timer 4.55s linear forwards;
        }

    .crm .toast .btn {
        color: var(--crm-muted) !important;
        box-shadow: none !important;
    }

        .crm .toast .btn:hover {
            color: var(--crm-ink) !important;
            transform: rotate(90deg);
        }

/* ---------- Pagination ---------- */
.crm .pagination-item {
    margin: 0 2px;
    border-top: 0 !important;
}

    .crm .pagination-item .btn {
        min-width: 36px;
        height: 36px;
        border-radius: 10px;
        color: var(--crm-text);
        font-variant-numeric: tabular-nums;
    }

        .crm .pagination-item .btn:hover {
            background: var(--crm-surface-2);
            color: var(--crm-primary);
            transform: translateY(-2px);
        }

    .crm .pagination-item.active .btn {
        background: var(--crm-grad);
        color: #FFFFFF;
        box-shadow: var(--crm-glow) !important;
        animation: crm-pop 0.45s var(--crm-spring);
    }

.crm .btn.text-secondary {
    border-radius: 10px;
    color: var(--crm-text) !important;
}

    .crm .btn.text-secondary:not(:disabled):hover {
        background: var(--crm-surface-2);
        color: var(--crm-primary) !important;
    }

        .crm .btn.text-secondary:not(:disabled):hover .feather-arrow-left {
            transform: translateX(-3px);
        }

        .crm .btn.text-secondary:not(:disabled):hover .feather-arrow-right {
            transform: translateX(3px);
        }

/* ---------- Progress ---------- */
.crm .progress {
    border-radius: 999px;
    background-color: var(--crm-surface-3);
}

.crm .progress-bar {
    border-radius: 999px;
    background-color: var(--crm-primary);
    background-image: var(--crm-grad);
    transform-origin: left;
    transition: width 0.8s var(--crm-ease);
    animation: crm-grow-x 1s var(--crm-ease) backwards;
}

    .crm .progress-bar.progress-bar-striped {
        background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.18) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.18) 50%, rgba(255, 255, 255, 0.18) 75%, transparent 75%, transparent), var(--crm-grad);
        background-size: 1rem 1rem, 100% 100%;
    }

    .crm .progress-bar.bg-success {
        background-image: linear-gradient(135deg, #3DD68C, #16A864) !important;
    }

.crm .progress .jkoop-progress-bar-indeterminate {
    animation: indeterminate 1s linear infinite alternate, progress-bar-stripes 1s linear infinite !important;
}

.crm-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .crm-progress .progress {
        flex: 1 1 auto;
        min-width: 80px;
    }

    .crm-progress b {
        min-width: 44px;
        font-size: 12.5px;
        font-weight: 600;
        color: var(--crm-ink);
        text-align: right;
        font-variant-numeric: tabular-nums;
    }

/* ---------- Spinners ---------- */
.crm .spinner-border:not(.spinner-border-sm) {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: conic-gradient(from 90deg, rgba(60, 134, 243, 0), #5AB8F2 55%, #3C86F3 85%, #6A5CF6);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
    animation: crm-spin 0.75s linear infinite;
}

/* ---------- Tooltips ---------- */
.crm .tooltip .tooltip-inner {
    padding: 6px 10px;
    border-radius: 10px;
    background: var(--crm-ink);
    font-size: 12px;
    box-shadow: var(--crm-shadow);
}

.dark-layout .crm .tooltip .tooltip-inner {
    background: #EEF2FF;
    color: #081735;
}

/* ---------- Stat tiles ---------- */
.crm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.crm-stat {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0 !important;
    padding: 18px 20px !important;
    transition: transform 0.35s var(--crm-spring), box-shadow 0.35s var(--crm-ease);
}

    .crm-stat::before {
        content: "";
        position: absolute;
        top: -50px;
        right: -50px;
        width: 140px;
        height: 140px;
        border-radius: 50%;
        background: var(--tone, var(--crm-primary));
        opacity: 0.07;
        pointer-events: none;
        animation: crm-breathe 7s ease-in-out infinite;
    }

    .crm-stat:hover {
        transform: translateY(-4px);
        box-shadow: var(--crm-shadow-lg);
    }

.crm-stat-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crm-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--tone-soft, var(--crm-primary-soft));
    color: var(--tone, var(--crm-primary));
    flex-shrink: 0;
    transition: transform 0.4s var(--crm-spring);
}

.crm-stat:hover .crm-stat-icon {
    transform: rotate(-8deg) scale(1.12);
}

.crm-stat-icon svg {
    width: 19px;
    height: 19px;
}

.crm-stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--crm-muted);
}

.crm-stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--crm-ink);
    font-variant-numeric: tabular-nums;
}

/* Clickable action tiles */
.crm-action {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 !important;
    padding: 16px 18px !important;
    border: 1px solid var(--crm-line);
    border-radius: var(--crm-radius);
    background: var(--crm-surface);
    box-shadow: var(--crm-shadow);
    color: var(--crm-text);
    text-align: left;
    cursor: pointer;
    transition: transform 0.35s var(--crm-spring), box-shadow 0.35s var(--crm-ease), border-color 0.2s ease;
}

    .crm-action:hover {
        border-color: var(--tone, var(--crm-primary));
        box-shadow: 0 18px 36px -20px var(--tone, var(--crm-primary));
        transform: translateY(-3px);
        color: var(--crm-text);
        text-decoration: none;
    }

    .crm-action b {
        display: block;
        font-size: 14.5px;
        font-weight: 600;
        color: var(--crm-ink);
    }

    .crm-action small {
        display: block;
        font-size: 12.5px;
        color: var(--crm-muted);
    }

    .crm-action > svg:last-child {
        margin-left: auto;
        color: var(--crm-muted);
        transition: transform 0.3s var(--crm-spring), color 0.2s ease;
    }

    .crm-action:hover > svg:last-child {
        color: var(--tone, var(--crm-primary));
        transform: translateX(4px);
    }

    .crm-action:hover .crm-stat-icon {
        transform: rotate(-8deg) scale(1.12);
    }

/* ---------- Profile ---------- */
.crm-hero {
    position: relative;
    overflow: hidden;
    padding: 0 !important;
}

.crm-hero-banner {
    position: relative;
    overflow: hidden;
    height: 108px;
    background: var(--crm-grad-wide);
    background-size: 200% 100%;
}

    .crm-hero-banner::before,
    .crm-hero-banner::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.16);
    }

    .crm-hero-banner::before {
        top: -60px;
        right: 8%;
        width: 180px;
        height: 180px;
        animation: crm-float 6s ease-in-out infinite;
    }

    .crm-hero-banner::after {
        bottom: -70px;
        right: 26%;
        width: 120px;
        height: 120px;
        background: rgba(255, 255, 255, 0.1);
        animation: crm-float 7s 1s ease-in-out infinite;
    }

/* The avatar overlaps the banner; the text starts just below it */
.crm-hero-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px 20px;
    margin-top: -44px;
    padding: 0 24px 22px;
}

.crm-hero-avatar {
    width: 96px;
    height: 96px;
    border: 4px solid var(--crm-surface);
    border-radius: 28px;
    font-size: 36px;
    box-shadow: var(--crm-shadow-lg);
    animation: crm-pop 0.6s 0.2s var(--crm-spring) backwards;
}

.crm-hero-text {
    flex: 1 1 260px;
    min-width: 0;
    margin-top: 56px;
}

.crm-hero-name {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--crm-ink);
    overflow-wrap: anywhere;
}

.crm-hero-mail {
    display: block;
    margin-top: 2px;
    color: var(--crm-muted);
    overflow-wrap: anywhere;
}

a.crm-hero-mail {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

    a.crm-hero-mail:hover {
        color: var(--crm-primary);
    }

.crm-shop-hero-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    padding: 14px;
    border: 4px solid var(--crm-surface);
    border-radius: 28px;
    background: #FFFFFF;
    box-shadow: var(--crm-shadow-lg);
    cursor: pointer;
    animation: crm-pop 0.6s 0.2s var(--crm-spring) backwards;
    transition: transform 0.35s var(--crm-spring);
}

    .crm-shop-hero-logo:hover {
        transform: rotate(-4deg) scale(1.04);
    }

.crm-shop-hero-edit {
    position: absolute;
    right: -8px;
    bottom: -8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 3px solid var(--crm-surface);
    border-radius: 50%;
    background: var(--crm-grad);
    color: #FFFFFF;
    box-shadow: var(--crm-glow);
    transition: transform 0.35s var(--crm-spring);
}

.crm-shop-hero-logo:hover .crm-shop-hero-edit {
    transform: scale(1.15) rotate(12deg);
}

.crm-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.crm-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--crm-line);
    background: var(--crm-surface-2);
}

.crm-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 24px 20px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--crm-warning-soft);
    color: var(--crm-warning);
}

    .crm-callout b {
        color: inherit;
    }

.crm-dl {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 4px 18px;
    margin: 0;
}

.crm-dl-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    padding: 10px 8px;
    border-radius: 12px;
    transition: background-color 0.2s ease;
    animation: crm-rise-sm 0.45s var(--crm-ease) backwards;
}

    .crm-dl-item:hover {
        background: var(--crm-surface-2);
    }

    .crm-dl-item:nth-child(2) { animation-delay: 30ms; }
    .crm-dl-item:nth-child(3) { animation-delay: 60ms; }
    .crm-dl-item:nth-child(4) { animation-delay: 90ms; }
    .crm-dl-item:nth-child(5) { animation-delay: 120ms; }
    .crm-dl-item:nth-child(6) { animation-delay: 150ms; }
    .crm-dl-item:nth-child(7) { animation-delay: 180ms; }
    .crm-dl-item:nth-child(8) { animation-delay: 210ms; }
    .crm-dl-item:nth-child(n+9) { animation-delay: 240ms; }

.crm-dl-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--tone-soft, var(--crm-primary-soft));
    color: var(--tone, var(--crm-primary));
    flex-shrink: 0;
    transition: transform 0.4s var(--crm-spring);
}

    .crm-dl-icon svg {
        width: 16px;
        height: 16px;
    }

.crm-dl-item:hover .crm-dl-icon {
    transform: rotate(-8deg) scale(1.1);
}

.crm-dl-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.crm-dl dt {
    font-size: 12px;
    font-weight: 500;
    color: var(--crm-muted);
}

.crm-dl dd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-weight: 500;
    color: var(--crm-ink);
    overflow-wrap: anywhere;
}

    .crm-dl dd .form-control-sm {
        width: auto;
        min-width: 160px;
        flex: 1 1 160px;
    }

/* Gradient plan card */
.crm-plan {
    position: relative;
    overflow: hidden;
    border: 0 !important;
    background: var(--crm-grad-wide) !important;
    background-size: 200% 100% !important;
    color: #FFFFFF;
    box-shadow: 0 22px 40px -22px rgba(60, 134, 243, 0.9) !important;
}

    .crm-plan::after {
        content: "";
        position: absolute;
        top: -40%;
        right: -30%;
        width: 70%;
        height: 140%;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        pointer-events: none;
        animation: crm-orbit 12s ease-in-out infinite;
    }

    .crm-plan .card-body {
        position: relative;
        z-index: 1;
    }

.crm-plan-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.85;
}

.crm-plan-name {
    margin: 6px 0 12px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #FFFFFF !important;
}

.crm-plan-feats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13.5px;
}

    .crm-plan-feats li {
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .crm-plan-feats li svg {
            flex-shrink: 0;
            padding: 3px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.22);
        }

.crm-region-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 12px 0;
}

    .crm-region-row + .crm-region-row {
        border-top: 1px solid var(--crm-line);
    }

.crm-region-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
    font-weight: 600;
    color: var(--crm-ink);
}

    .crm-region-name img {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        object-fit: cover;
        box-shadow: 0 0 0 2px var(--crm-surface), 0 0 0 3px var(--crm-line);
    }

.crm .crm-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 600;
    color: var(--crm-ink);
}

    .crm-card-title > .crm-i {
        color: var(--crm-primary);
    }

    .crm-card-title > .btn {
        margin-left: auto;
    }

.crm-person {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.crm-refresh svg {
    transition: transform 0.6s var(--crm-ease);
}

.crm-refresh:hover svg {
    transform: rotate(180deg);
}

.crm-refresh.is-busy svg {
    animation: crm-spin 0.8s linear infinite;
}

/* ---------- Issue & notification feeds ---------- */
.crm-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.crm-issue {
    position: relative;
    display: flex;
    gap: 14px;
    padding: 16px 18px 16px 20px;
    border: 1px solid var(--crm-line);
    border-radius: 16px;
    background: var(--crm-surface);
    box-shadow: var(--crm-shadow-sm);
    transition: transform 0.35s var(--crm-spring), box-shadow 0.3s ease, border-color 0.2s ease;
    animation: crm-rise-sm 0.5s var(--crm-ease) backwards;
}

    .crm-issue::before {
        content: "";
        position: absolute;
        top: 14px;
        bottom: 14px;
        left: 0;
        width: 4px;
        border-radius: 0 4px 4px 0;
        background: linear-gradient(180deg, #FF7C95, #E8385F);
        animation: crm-grow-y 0.6s 0.2s var(--crm-ease) backwards;
    }

    .crm-issue:hover {
        border-color: var(--crm-line-strong);
        box-shadow: var(--crm-shadow);
        transform: translateX(3px);
    }

.crm-feed > :nth-child(2) { animation-delay: 40ms; }
.crm-feed > :nth-child(3) { animation-delay: 80ms; }
.crm-feed > :nth-child(4) { animation-delay: 120ms; }
.crm-feed > :nth-child(5) { animation-delay: 160ms; }
.crm-feed > :nth-child(6) { animation-delay: 200ms; }
.crm-feed > :nth-child(7) { animation-delay: 240ms; }
.crm-feed > :nth-child(n+8) { animation-delay: 280ms; }

.crm-issue-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--crm-danger-soft);
    color: var(--crm-danger);
    flex-shrink: 0;
}

.crm-issue-body {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--crm-text);
    overflow-wrap: anywhere;
}

.crm-issue-time {
    display: inline-flex;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--crm-muted);
    font-variant-numeric: tabular-nums;
}

.crm-issue .crm-icon-btn {
    align-self: flex-start;
    opacity: 0.55;
    transition: opacity 0.2s ease, transform 0.25s var(--crm-spring), box-shadow 0.3s ease, background-color 0.2s ease, color 0.2s ease;
}

.crm-issue:hover .crm-icon-btn {
    opacity: 1;
}

.crm-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 4px 0 4px 8px;
    list-style: none;
}

    .crm-timeline::before {
        content: "";
        position: absolute;
        top: 12px;
        bottom: 12px;
        left: 26px;
        width: 2px;
        border-radius: 2px;
        background: linear-gradient(180deg, var(--crm-line-strong), rgba(0, 0, 0, 0));
        transform-origin: top;
        animation: crm-grow-y 1s var(--crm-ease) backwards;
    }

.crm-timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 14px 10px 0;
    border-radius: 14px;
    transition: background-color 0.2s ease;
    animation: crm-rise-sm 0.5s var(--crm-ease) backwards;
}

    .crm-timeline-item:hover {
        background: var(--crm-surface-2);
    }

.crm-timeline-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 3px solid var(--crm-surface);
    border-radius: 50%;
    background: var(--tone-soft, var(--crm-primary-soft));
    color: var(--tone, var(--crm-primary));
    flex-shrink: 0;
    transition: transform 0.4s var(--crm-spring);
}

    .crm-timeline-icon .material-icons {
        font-size: 18px;
    }

.crm-timeline-item:hover .crm-timeline-icon {
    transform: scale(1.12) rotate(-6deg);
}

.crm-timeline-body {
    flex: 1 1 auto;
    min-width: 0;
}

.crm-timeline-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
}

    .crm-timeline-head b {
        font-weight: 600;
        color: var(--crm-ink);
    }

    .crm-timeline-head time {
        margin-left: auto;
        font-size: 12px;
        color: var(--crm-muted);
        white-space: nowrap;
        font-variant-numeric: tabular-nums;
    }

.crm-timeline-text {
    margin-top: 2px;
    font-size: 13px;
    color: var(--crm-text);
    overflow-wrap: anywhere;
}

.crm-timeline-list > .crm-timeline-item:nth-child(2) { animation-delay: 35ms; }
.crm-timeline-list > .crm-timeline-item:nth-child(3) { animation-delay: 70ms; }
.crm-timeline-list > .crm-timeline-item:nth-child(4) { animation-delay: 105ms; }
.crm-timeline-list > .crm-timeline-item:nth-child(5) { animation-delay: 140ms; }
.crm-timeline-list > .crm-timeline-item:nth-child(6) { animation-delay: 175ms; }
.crm-timeline-list > .crm-timeline-item:nth-child(n+7) { animation-delay: 210ms; }
.crm-timeline-list > .crm-timeline-item:nth-child(n+25) { animation: none; }

/* ---------- Subscription plan editors ---------- */
.crm-plan-editor {
    display: flex;
    flex-direction: column;
    height: calc(100% - 24px);
    margin-bottom: 24px;
    transition: transform 0.35s var(--crm-spring), box-shadow 0.35s var(--crm-ease);
}

    .crm-plan-editor:hover,
    .crm-plan-editor:focus-within {
        transform: translateY(-3px);
        box-shadow: var(--crm-shadow-lg);
    }

.crm-plan-editor-head {
    position: relative;
    overflow: hidden;
    padding: 18px 22px;
    border-radius: var(--crm-radius) var(--crm-radius) 0 0;
    background: var(--crm-grad-wide);
    background-size: 200% 100%;
    color: #FFFFFF;
}

    .crm-plan-editor-head::after {
        content: "";
        position: absolute;
        top: -60px;
        right: -30px;
        width: 150px;
        height: 150px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.14);
        pointer-events: none;
        animation: crm-orbit 14s ease-in-out infinite;
    }

    .crm-plan-editor:nth-child(2n) .crm-plan-editor-head::after {
        animation-delay: -5s;
    }

    .crm-plan-editor-head h3 {
        margin: 0;
        font-size: 19px;
        font-weight: 700;
        color: #FFFFFF;
    }

    .crm-plan-editor-head p {
        margin: 4px 0 0;
        font-size: 13px;
        opacity: 0.9;
    }

.crm-plan-editor-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

    .crm-plan-editor-tags span {
        padding: 3px 9px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.22);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

.crm-price {
    position: relative;
}

    .crm-price > span {
        position: absolute;
        top: 50%;
        right: 14px;
        margin-top: -9px;
        font-size: 12px;
        color: var(--crm-muted);
        pointer-events: none;
    }

    .crm-price .form-control {
        padding-right: 64px;
        font-weight: 600;
    }

.crm-savebar {
    position: sticky;
    bottom: 16px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 24px;
    padding: 12px 14px 12px 20px;
    border: 1px solid var(--crm-line);
    border-radius: 16px;
    background: var(--crm-glass);
    -webkit-backdrop-filter: saturate(170%) blur(16px);
    backdrop-filter: saturate(170%) blur(16px);
    box-shadow: var(--crm-shadow-lg);
    animation: crm-rise 0.6s 0.3s var(--crm-ease) backwards;
}

    .crm-savebar > span {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
    }

/* ---------- Quick links (moderator home) ---------- */
.crm-quick-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.crm-quick {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0 !important;
    padding: 22px !important;
    transition: transform 0.35s var(--crm-spring), box-shadow 0.35s var(--crm-ease);
}

    .crm-quick:hover {
        transform: translateY(-4px);
        box-shadow: var(--crm-shadow-lg);
    }

.crm-quick-links a > svg:first-child {
    color: var(--tone, var(--crm-primary));
}

.crm-quick-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .crm-quick-head h3 {
        margin: 0;
        font-size: 17px;
        font-weight: 600;
    }

.crm-quick-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .crm-quick-links a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 11px 14px;
        border: 1px solid var(--crm-line);
        border-radius: 12px;
        background: var(--crm-surface-2);
        color: var(--crm-text);
        font-weight: 500;
        transition: transform 0.3s var(--crm-spring), border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    }

        .crm-quick-links a svg:last-child {
            margin-left: auto;
            color: var(--crm-muted);
            transition: transform 0.3s var(--crm-spring);
        }

        .crm-quick-links a:hover {
            border-color: var(--crm-primary);
            background: var(--crm-surface);
            color: var(--crm-primary);
            text-decoration: none;
            transform: translateX(4px);
        }

            .crm-quick-links a:hover svg:last-child {
                color: var(--crm-primary);
                transform: translateX(3px);
            }

/* ---------- Admin dashboard motion ---------- */
.crm .adm-dash {
    padding-top: 6px;
}

.crm .adm-head {
    animation: crm-rise-sm 0.55s var(--crm-ease) backwards;
}

.crm .adm-dash .adm-card,
.crm .adm-dash .adm-kpi {
    transition: transform 0.35s var(--crm-spring), box-shadow 0.35s var(--crm-ease);
}

.crm .adm-kpi::before {
    animation: crm-breathe 7s ease-in-out infinite;
}

.crm .adm-kpis > :nth-child(2)::before { animation-delay: -1.5s; }
.crm .adm-kpis > :nth-child(3)::before { animation-delay: -3s; }
.crm .adm-kpis > :nth-child(4)::before { animation-delay: -4.5s; }

.crm .adm-dash .adm-kpi:hover {
    transform: translateY(-4px);
    box-shadow: var(--crm-shadow-lg);
}

.crm .adm-kpi-icon {
    transition: transform 0.4s var(--crm-spring);
}

.crm .adm-kpi:hover .adm-kpi-icon {
    animation: crm-wiggle 0.6s ease-in-out;
}

.crm .adm-card-icon {
    transition: transform 0.4s var(--crm-spring), color 0.2s ease, background-color 0.2s ease;
}

.crm .adm-card:hover .adm-card-icon {
    background: var(--crm-primary-soft);
    color: var(--crm-primary);
    transform: rotate(-10deg) scale(1.1);
}

.crm .adm-planbar span,
.crm .adm-meter span {
    transform-origin: left;
    animation: crm-grow-x 1.1s 0.2s var(--crm-ease) backwards;
}

.crm .adm-planbar span:nth-child(2) { animation-delay: 0.32s; }
.crm .adm-planbar span:nth-child(3) { animation-delay: 0.44s; }

.crm .adm-activity-item:nth-child(2) .adm-meter span { animation-delay: 0.28s; }
.crm .adm-activity-item:nth-child(3) .adm-meter span { animation-delay: 0.36s; }
.crm .adm-activity-item:nth-child(4) .adm-meter span { animation-delay: 0.44s; }
.crm .adm-activity-item:nth-child(5) .adm-meter span { animation-delay: 0.52s; }

.crm .adm-domains li {
    animation: crm-slide-left 0.45s var(--crm-ease) backwards;
    transition: background-color 0.2s ease, transform 0.3s var(--crm-spring);
}

    .crm .adm-domains li:hover {
        transform: translateX(4px);
    }

    .crm .adm-domains li:nth-child(2) { animation-delay: 40ms; }
    .crm .adm-domains li:nth-child(3) { animation-delay: 80ms; }
    .crm .adm-domains li:nth-child(4) { animation-delay: 120ms; }
    .crm .adm-domains li:nth-child(5) { animation-delay: 160ms; }
    .crm .adm-domains li:nth-child(6) { animation-delay: 200ms; }
    .crm .adm-domains li:nth-child(7) { animation-delay: 240ms; }
    .crm .adm-domains li:nth-child(8) { animation-delay: 280ms; }
    .crm .adm-domains li:nth-child(n+9) { animation-delay: 320ms; }

.crm .adm-domains li:nth-child(-n+3) .adm-rank {
    background: var(--crm-grad);
    color: #FFFFFF;
    box-shadow: 0 4px 10px -4px rgba(60, 134, 243, 0.8);
}

.crm .adm-segment {
    transition: background-color 0.2s ease;
}

    .crm .adm-segment:hover {
        background: var(--crm-surface);
    }

.crm .adm-table tbody tr {
    animation: none;
}

.crm .adm-date {
    transition: border-color 0.2s ease, box-shadow 0.3s ease;
}

    .crm .adm-date:hover,
    .crm .adm-date:focus-within {
        box-shadow: 0 0 0 4px var(--crm-primary-soft);
    }

/* ---------- Page-specific ---------- */
.crm .btn-img-edit {
    position: relative;
    padding: 8px !important;
    border-radius: 22px !important;
}

.crm .mismatch-block {
    padding: 0 !important;
}

.crm .ecommerce-application .content-header .nav-tabs {
    margin-bottom: 0;
}

.crm .ql-toolbar.ql-snow,
.crm .ql-container.ql-snow {
    border-color: var(--crm-line);
}

.crm .ql-toolbar.ql-snow {
    border-radius: 12px 12px 0 0;
    background: var(--crm-surface-2);
}

.crm .ql-container.ql-snow {
    border-radius: 0 0 12px 12px;
}

/* ---------- Dark layout ---------- */
/* dark-layout.css paints every span white (.dark-layout span), which outranks the single-class colours above */
.dark-layout .crm .crm-pill {
    color: var(--tone);
}

.dark-layout .crm .crm-muted,
.dark-layout .crm .crm-user-mail,
.dark-layout .crm .crm-crumb-section,
.dark-layout .crm .crm-stat-label,
.dark-layout .crm .crm-issue-time,
.dark-layout .crm .crm-hero-mail,
.dark-layout .crm .crm-link-cell,
.dark-layout .crm .crm-price > span,
.dark-layout .crm .crm-savebar > span {
    color: var(--crm-muted);
}

.dark-layout .crm .crm-user-name,
.dark-layout .crm .crm-crumb-page,
.dark-layout .crm .crm-stat-value,
.dark-layout .crm .crm-region-name {
    color: var(--crm-ink);
}

.dark-layout .crm .crm-greeting {
    color: var(--crm-text);
}

.dark-layout .crm .crm-crumb-sep {
    color: var(--crm-line-strong);
}

.dark-layout .crm .crm-eyebrow,
.dark-layout .crm .crm-empty > span:first-child {
    color: var(--crm-primary);
}

.dark-layout .crm .crm-count {
    color: var(--crm-primary-ink);
}

.dark-layout .crm .crm-stat-icon,
.dark-layout .crm .crm-dl-icon,
.dark-layout .crm .crm-timeline-icon {
    color: var(--tone, var(--crm-primary));
}

.dark-layout .crm .crm-issue-icon {
    color: var(--crm-danger);
}

.dark-layout .crm .crm-sort,
.dark-layout .crm .crm-activity,
.dark-layout .crm .crm-user-text {
    color: inherit;
}

/* menu-dark gives each group list its own panel colour */
.crm .main-menu .navigation li,
.crm .main-menu .navigation li ul {
    background: transparent !important;
}

/* ---------- Reduced motion ---------- */
/* Nothing travels or loops; entrances become plain fades and spinners keep turning */
@media (prefers-reduced-motion: reduce) {
    .crm .content-body .card,
    .crm .table tbody tr,
    .crm .list-group-item,
    .crm .main-menu .navigation > li,
    .crm .header-navbar.floating-nav,
    .crm .tab-pane.active,
    .crm .modal.show .modal-content,
    .crm .modal.modal-slide-in.show .modal-content,
    .crm .dropdown-menu.show,
    .crm .toast,
    .crm .adm-head,
    .crm .adm-domains li,
    .crm-page-head,
    .crm-page-crumbs,
    .crm-crumb,
    .crm-dl-item,
    .crm-issue,
    .crm-timeline-item,
    .crm-savebar,
    .crm-hero-avatar,
    .crm-shop-hero-logo {
        animation-name: crm-fade !important;
    }

    .crm-aurora i,
    .crm .beta-logo,
    .crm .main-menu .navigation li > a.active::after,
    .crm .badge-danger,
    .crm .header-navbar .dropdown-notification .nav-link svg,
    .crm .btn::after,
    .crm .nav-tabs .nav-link.active,
    .crm .pagination-item.active .btn,
    .crm .table thead th .crm-i,
    .crm .progress-bar,
    .crm .adm-kpi::before,
    .crm .adm-planbar span,
    .crm .adm-meter span,
    .crm .toast .toast-body::before,
    .crm .toast .toast-body::after,
    .crm-plan::after,
    .crm-stat::before,
    .crm-hero-banner::before,
    .crm-hero-banner::after,
    .crm-plan-editor-head::after,
    .crm-empty,
    .crm-empty > span:first-child,
    .crm-pill.is-live > i,
    .crm-activity > i::after,
    .crm-issue::before,
    .crm-timeline::before,
    .crm-wave {
        animation: none !important;
    }

    .crm *,
    .crm *::before,
    .crm *::after {
        transition-duration: 0.001ms !important;
    }

    /* Without the animation fills these states would lose what the keyframes supplied */
    .crm .modal.show {
        visibility: visible;
    }

    .crm .dropdown-menu.show {
        transform: none !important;
    }
}

@media (max-width: 575.98px) {
    .crm .crm-page-title {
        font-size: 22px;
    }

    .crm-page-head {
        margin-bottom: 16px;
    }

    .crm .table td,
    .crm .table thead th {
        padding-right: 12px;
        padding-left: 12px;
    }

    .crm-hero-body {
        padding: 0 16px 18px;
    }

    .crm-hero-actions {
        padding: 14px 16px;
    }

    .crm-toolbar-actions {
        width: 100%;
        margin-left: 0;
    }

        .crm-toolbar-actions > * {
            flex: 1 1 0;
        }
}
