/* Stat card hover + preloader polish */

.crm-stat-card--featured {
    position: relative;
    overflow: hidden;
}

.crm-stat-card--interactive {
    cursor: default;
    will-change: transform;
    transform: translateZ(0);
}

.crm-stat-card--interactive .crm-stat-icon {
    will-change: transform;
    transform: translateZ(0);
}

.crm-stat-card--interactive .crm-stat-trend a {
    pointer-events: auto;
}

/* Featured card — CSS-only shine (no shape image) */
.crm-stat-card--featured::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -25%;
    width: 55%;
    height: 120%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 68%);
    pointer-events: none;
    z-index: 0;
}

/* Preloader */
.crm-preloader {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #060b28;
    background-image:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(0, 117, 255, 0.25) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 80% 80%, rgba(33, 212, 253, 0.12) 0%, transparent 50%);
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.crm-preloader.crm-preloader--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.crm-preloader-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 117, 255, 0.35) 0%, transparent 70%);
    animation: crm-preloader-pulse 2s ease-in-out infinite;
}

.crm-preloader-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1.5rem;
}

.crm-preloader-logo-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crm-preloader-logo {
    height: 42px;
    width: auto;
    position: relative;
    z-index: 2;
}

.crm-preloader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #0075ff;
    border-right-color: #21d4fd;
    animation: crm-preloader-spin 1.1s linear infinite;
}

.crm-preloader-ring--2 {
    inset: 12px;
    border-top-color: #21d4fd;
    border-right-color: transparent;
    animation-duration: 1.6s;
    animation-direction: reverse;
    opacity: 0.7;
}

.crm-preloader-text {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #a0aec0;
}

.crm-preloader-bar {
    width: 160px;
    height: 4px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.crm-preloader-bar-fill {
    display: block;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #0075ff, #21d4fd);
    border-radius: 4px;
    animation: crm-preloader-bar 1.2s ease-in-out infinite;
}

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

@keyframes crm-preloader-pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
}

@keyframes crm-preloader-bar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

@media (prefers-reduced-motion: reduce) {
    .crm-preloader-ring,
    .crm-preloader-ring--2,
    .crm-preloader-glow,
    .crm-preloader-bar-fill {
        animation: none;
    }

    .crm-preloader-bar-fill {
        width: 100%;
    }
}

/* Utilization bar */
.crm-util-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.25);
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.crm-util-bar__fill {
    height: 100%;
    border-radius: inherit;
    transition: width 0.35s ease;
    min-width: 2px;
}

.crm-util-bar__label {
    display: block;
    line-height: 1.2;
}
