/*
 * IPcom CRM Admin Dashboard
 * Subtle visual hierarchy for dashboard KPI cards.
 */

.ipcom-dashboard-stat {
    position: relative;
    overflow: hidden;
    border-width: 1px !important;
    border-style: solid !important;
    box-shadow:
        0 1px 2px rgb(15 23 42 / 0.04),
        0 5px 16px rgb(15 23 42 / 0.045) !important;
    transition:
        transform 140ms ease,
        box-shadow 140ms ease;
}

.ipcom-dashboard-stat::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 12px 0 0 12px;
}

.ipcom-dashboard-stat:hover {
    transform: translateY(-1px);
    box-shadow:
        0 2px 4px rgb(15 23 42 / 0.055),
        0 8px 22px rgb(15 23 42 / 0.065) !important;
}

/* Communications */

.ipcom-stat-messages {
    border-color: rgb(253 186 116 / 0.7) !important;
    background:
        linear-gradient(
            135deg,
            rgb(255 247 237) 0%,
            rgb(255 255 255) 72%
        ) !important;
}

.ipcom-stat-messages::before {
    background: rgb(249 115 22);
}

.ipcom-stat-waiting {
    border-color: rgb(253 230 138 / 0.7) !important;
    background:
        linear-gradient(
            135deg,
            rgb(255 251 235) 0%,
            rgb(255 255 255) 76%
        ) !important;
}

.ipcom-stat-waiting::before {
    background: rgb(217 119 6);
}

/* CRM */

.ipcom-stat-opportunities {
    border-color: rgb(147 197 253 / 0.75) !important;
    background:
        linear-gradient(
            135deg,
            rgb(239 246 255) 0%,
            rgb(255 255 255) 74%
        ) !important;
}

.ipcom-stat-opportunities::before {
    background: rgb(59 130 246);
}

.ipcom-stat-pipeline {
    border-color: rgb(134 239 172 / 0.7) !important;
    background:
        linear-gradient(
            135deg,
            rgb(240 253 244) 0%,
            rgb(255 255 255) 72%
        ) !important;
}

.ipcom-stat-pipeline::before {
    background: rgb(34 197 94);
}

.ipcom-stat-success {
    border-color: rgb(187 247 208 / 0.8) !important;
    background:
        linear-gradient(
            135deg,
            rgb(240 253 244) 0%,
            rgb(255 255 255) 72%
        ) !important;
}

.ipcom-stat-success::before {
    background: rgb(34 197 94);
}

.ipcom-stat-danger {
    border-color: rgb(254 202 202 / 0.9) !important;
    background:
        linear-gradient(
            135deg,
            rgb(254 242 242) 0%,
            rgb(255 255 255) 72%
        ) !important;
}

.ipcom-stat-danger::before {
    background: rgb(239 68 68);
}

.ipcom-stat-neutral {
    border-color: rgb(203 213 225 / 0.8) !important;
    background:
        linear-gradient(
            135deg,
            rgb(248 250 252) 0%,
            rgb(255 255 255) 72%
        ) !important;
}

.ipcom-stat-neutral::before {
    background: rgb(100 116 139);
}

/* Make KPI values slightly stronger */

.ipcom-dashboard-stat .fi-wi-stats-overview-stat-value {
    font-weight: 750;
    letter-spacing: -0.025em;
}

/* Tables form the calmer secondary information layer */

.fi-wi-table {
    border-color: rgb(226 232 240);
    box-shadow:
        0 1px 2px rgb(15 23 42 / 0.035),
        0 5px 18px rgb(15 23 42 / 0.035);
}

.fi-wi-table .fi-ta-header {
    border-bottom: 1px solid rgb(226 232 240);
    background:
        linear-gradient(
            90deg,
            rgb(248 250 252) 0%,
            rgb(255 247 237) 100%
        );
}

/* Dark mode */

.dark .ipcom-dashboard-stat {
    background: rgb(17 24 39) !important;
    border-color: rgb(55 65 81) !important;
}

.dark .fi-wi-table .fi-ta-header {
    background:
        linear-gradient(
            90deg,
            rgb(17 24 39) 0%,
            rgb(30 41 59) 100%
        );
}
