/* ========================================
   DASHBOARD
======================================== */
/* ========================================
   DASHBOARD-WRAPPER OCH GRÖN GLÖD
======================================== */

.dashboard-wrapper {
    position: relative;
    width: 100%;
    isolation: isolate;
}

.dashboard-wrapper::before {
    content: "";

    position: absolute;

    left: -120px;
    bottom: -70px;

    width: 420px;
    height: 420px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(114, 230, 208, 0.42) 0%,
            rgba(114, 230, 208, 0.18) 38%,
            rgba(114, 230, 208, 0.06) 60%,
            transparent 75%
        );

    filter: blur(70px);

    z-index: -1;
    pointer-events: none;
}

.dashboard {
    position: relative;
    z-index: 2;

    width: 100%;

    padding: 26px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;

    background:
        radial-gradient(
            circle at 100% 0,
            rgba(123, 92, 255, 0.18),
            transparent 26%
        ),
        
        linear-gradient(
            145deg,
            #09111a,
            #101923
        );

    color: #ffffff;

    box-shadow:
        0 30px 80px rgba(15, 18, 29, 0.23);

    transform:
    perspective(1400px)
    rotateY(-6deg)
    rotateZ(0.8deg);

    transform-origin: center right;

    opacity: 0;
    translate: 54px 16px;
    transition: opacity 0.85s ease, translate 0.85s cubic-bezier(.2,.8,.2,1);
}

.dashboard.is-visible {
    opacity: 1;
    translate: 0 0;
}

/* Identify the illustrative figures without taking space from the dashboard. */
.dashboard-demo-label {
    position: absolute;
    top: 8px;
    right: 20px;
    color: #9da5b0;
    font-size: .625rem;
    line-height: 1.2;
    font-weight: 500;
    white-space: nowrap;
}


/* ========================================
   DASHBOARD HEADER
======================================== */

.dashboard-header {
    display: flex;

    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.dashboard-heading {
    display: flex;

    align-items: center;
    gap: 12px;
}

.dashboard-heading-icon {
    display: grid;

    width: 40px;
    height: 40px;

    place-items: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #72e6d0,
            #7b5cff
        );

    color: #071019;

    font-size: 1.15rem;
    font-weight: 700;
}

.dashboard-heading h2 {
    margin: 0;

    font-family: "Manrope", sans-serif;
    font-size: 1.32rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.dashboard-heading p {
    margin-top: 2px;

    color: #9da5b0;

    font-size: 0.72rem;
}

.dashboard-heading p::before {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: #72e6d0;
    box-shadow: 0 0 0 0 rgba(114,230,208,.55), 0 0 12px rgba(114,230,208,.65);
    vertical-align: 1px;
    content: "";
    animation: dashboard-live-pulse 1.8s ease-out infinite;
}

.dashboard-period {
    display: inline-flex;

    align-items: center;
    gap: 10px;

    padding: 10px 14px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.035);
    color: #dce0e6;

    font-size: 0.7rem;

    cursor: pointer;
    transition: color .25s ease, border-color .25s ease, background .25s ease, transform .25s ease;
}

.dashboard-period:hover {
    transform: translateY(-2px);
    border-color: rgba(114, 230, 208, .4);
    background: rgba(114, 230, 208, .08);
    color: #fff;
}


/* ========================================
   STATISTIKKORT
======================================== */

.dashboard-stats {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;

    margin-top: 20px;
}

.dashboard-stat-card {
    padding: 16px;

    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.025);
}

.dashboard-stat-top {
    display: flex;

    align-items: center;
    justify-content: space-between;

    color: #b9c0ca;

    font-size: 0.7rem;
}

.dashboard-stat-icon {
    display: grid;

    width: 27px;
    height: 27px;

    place-items: center;

    border-radius: 50%;

    color: #071019;

    font-size: 0.66rem;
}

.dashboard-stat-icon-mint {
    background: #72e6d0;
}

.dashboard-stat-icon-purple {
    background: #8b6cff;
    color: #ffffff;
}

.dashboard-stat-card > strong {
    display: block;

    margin-top: 7px;

    font-family: "Inter", sans-serif;
    font-size: 1.72rem;
    font-weight: 700;
    line-height: 1.1;
}

.dashboard-growth {
    display: block;

    margin-top: 3px;

    font-size: 0.68rem;
}

.dashboard-growth-mint {
    color: #72e6d0;
}

.dashboard-growth-purple {
    color: #a58aff;
}


/* ========================================
   MINIDIAGRAM
======================================== */

.dashboard-mini-chart {
    width: 100%;
    height: 42px;

    margin-top: 7px;
}

.dashboard-mini-chart polyline {
    fill: none;

    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 230;
    stroke-dashoffset: 230;
    transition: stroke-dashoffset 1.35s cubic-bezier(.3,.7,.2,1);
}

.dashboard.is-visible .dashboard-mini-chart polyline {
    stroke-dashoffset: 0;
}

.dashboard-mini-chart-mint polyline {
    stroke: #72e6d0;
}

.dashboard-mini-chart-purple polyline {
    stroke: #a58aff;
}

.dashboard-chart-pulse {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
}

.dashboard-mini-chart-mint .dashboard-chart-pulse {
    fill: #72e6d0;
}

.dashboard-mini-chart-purple .dashboard-chart-pulse {
    fill: #a58aff;
}

.dashboard.is-visible .dashboard-chart-pulse {
    animation: dashboard-point-pulse 1.65s ease-in-out 1.2s infinite;
}

@keyframes dashboard-live-pulse {
    0% { opacity: .65; box-shadow: 0 0 0 0 rgba(114,230,208,.55), 0 0 10px rgba(114,230,208,.55); }
    45% { opacity: 1; }
    100% { opacity: .65; box-shadow: 0 0 0 8px rgba(114,230,208,0), 0 0 17px rgba(114,230,208,.8); }
}

@keyframes dashboard-point-pulse {
    0%, 100% { opacity: .65; transform: scale(.85); }
    50% { opacity: 1; transform: scale(1.65); }
}


/* ========================================
   NEDRE PANELER
======================================== */

.dashboard-panels {
    display: grid;

    grid-template-columns: 1.05fr 0.95fr;
    gap: 12px;

    margin-top: 12px;
}

.dashboard-panel {
    padding: 17px;

    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.022);
}

.dashboard-panel h3 {
    margin-bottom: 16px;

    font-size: 0.78rem;
    font-weight: 600;
}


/* ========================================
   KONVERTERINGSTRATT
======================================== */

.dashboard-funnel-content {
    display: grid;

    grid-template-columns: 0.88fr 1.12fr;
    align-items: center;
    gap: 20px;
}

.dashboard-funnel {
    display: grid;
    gap: 7px;
}

.dashboard-funnel-level {
    height: 22px;

    margin-inline: auto;

    border-radius: 4px;
}

.dashboard-funnel-level-one {
    width: 100%;

    background:
        linear-gradient(
            90deg,
            #72e6d0,
            #8ae3dc
        );
}

.dashboard-funnel-level-two {
    width: 78%;

    background:
        linear-gradient(
            90deg,
            #75dfd0,
            #9a9ae9
        );
}

.dashboard-funnel-level-three {
    width: 58%;

    background:
        linear-gradient(
            90deg,
            #8bcdd7,
            #987aff
        );
}

.dashboard-funnel-level-four {
    width: 38%;

    background:
        linear-gradient(
            90deg,
            #a38cff,
            #7956f5
        );
}

.dashboard-funnel-list {
    display: grid;
    gap: 12px;
}

.dashboard-funnel-list div {
    display: flex;

    align-items: center;
    justify-content: space-between;
    gap: 16px;

    font-size: 0.68rem;
}

.dashboard-funnel-list span {
    color: #b7bec8;
}

.dashboard-funnel-list strong {
    color: #ffffff;

    font-size: 0.72rem;
}


/* ========================================
   WEBBPLATSENS HÄLSA
======================================== */

.dashboard-health-content {
    display: grid;

    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: 20px;
}

.dashboard-health-score {
    display: grid;

    justify-items: center;
    gap: 7px;
}

.dashboard-health-ring {
    display: grid;

    width: 112px;
    height: 112px;

    place-items: center;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at center,
            #0c141d 61%,
            transparent 62%
        ),
        conic-gradient(
            #72e6d0 0 82%,
            rgba(255, 255, 255, 0.09) 82% 100%
        );
}

.dashboard-health-ring strong {
    font-family: "Inter", sans-serif;
    font-size: 2.28rem;
}

.dashboard-health-score > span {
    color: #72e6d0;

    font-size: 0.7rem;
}

.dashboard-health-list {
    display: grid;
    gap: 12px;
}

.dashboard-health-list div {
    display: flex;

    align-items: center;
    justify-content: space-between;
    gap: 12px;

    font-size: 0.68rem;
}

.dashboard-health-list span {
    display: flex;

    align-items: center;
    gap: 7px;

    color: #c2c8d0;
}

.dashboard-health-list strong {
    color: #72e6d0;

    font-size: 0.72rem;
}

.health-dot {
    width: 6px;
    height: 6px;

    border-radius: 50%;
}

.health-dot-mint {
    background: #72e6d0;
}

.health-dot-purple {
    background: #8b6cff;
}


/* ========================================
   AI-INSIKTER
======================================== */

.dashboard-insight {
    display: grid;

    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;

    margin-top: 12px;
    padding: 11px 14px;

    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.022);

    font-size: 0.67rem;
}

.dashboard-insight-label {
    padding: 5px 9px;

    border-radius: 8px;

    background: rgba(123, 92, 255, 0.17);
    color: #b39bff;

    white-space: nowrap;
}

.dashboard-insight p {
    color: #aeb5bf;
}

.dashboard-insight a {
    color: #b39bff;
    text-decoration: none;

    white-space: nowrap;
}


/* ========================================
   RESPONSIVT
======================================== */

@media (max-width: 1200px) {

    .dashboard {
        transform: none;
    }
}

@media (max-width: 760px) {

    .dashboard {
        padding: 17px;
    }

    .dashboard-period {
        display: none;
    }

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

    .dashboard-panels {
        grid-template-columns: 1fr;
    }

    .dashboard-insight {
        grid-template-columns: 1fr;
    }
}

.dashboard-wrapper::after {
    content: "";

    position: absolute;

    top: 20px;
    right: 20px;
    bottom: -35px;
    left: -70px;

    z-index: 1;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 55%,
            rgba(114, 230, 208, 0.42) 0%,
            rgba(114, 230, 208, 0.20) 35%,
            rgba(114, 230, 208, 0.07) 58%,
            transparent 72%
        );

    filter: blur(34px);

    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-heading p::before,
    .dashboard.is-visible .dashboard-chart-pulse {
        animation: none;
    }

    .dashboard-chart-pulse {
        opacity: 1;
    }
}

/* Extra lager och höjdskillnader */
.dashboard {
    box-shadow:
        0 16px 30px rgba(15,18,29,.18),
        0 48px 100px rgba(15,18,29,.28),
        0 0 80px rgba(114,230,208,.08),
        inset 0 1px 0 rgba(255,255,255,.08);
}

.dashboard::before {
    position: absolute;
    inset: 1px;
    border-radius: 27px;
    background: linear-gradient(135deg, rgba(255,255,255,.045), transparent 28%, transparent 72%, rgba(123,92,255,.04));
    pointer-events: none;
    content: "";
}

.dashboard-stat-card {
    background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
    box-shadow: 0 12px 26px rgba(0,0,0,.13), inset 0 1px 0 rgba(255,255,255,.035);
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.dashboard-stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(114,230,208,.18);
    box-shadow: 0 18px 34px rgba(0,0,0,.19), 0 0 24px rgba(114,230,208,.045);
}

.dashboard-panel {
    background: linear-gradient(145deg, rgba(255,255,255,.038), rgba(255,255,255,.012));
    box-shadow: 0 14px 30px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.035);
}

.dashboard-stat-card,
.dashboard-panel,
.dashboard-insight {
    position: relative;
    z-index: 0;
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease, background .3s ease;
}

.dashboard-stat-card:hover,
.dashboard-panel:hover,
.dashboard-insight:hover {
    z-index: 3;
    transform: translateY(-4px);
    border-color: rgba(114,230,208,.18);
    background: linear-gradient(145deg, rgba(114,230,208,.07), rgba(123,92,255,.035));
    box-shadow: 0 18px 34px rgba(0,0,0,.19), 0 0 24px rgba(114,230,208,.045);
}

/* Högersidans kort har egna explicita hoverregler så effekten inte
   döljs eller skrivs över av dashboardens perspektiv och lila glöd. */
.dashboard-stat-card:nth-child(2):hover,
.dashboard-stat-card:nth-child(4):hover,
.dashboard-health-panel:hover {
    z-index: 3;
    transform: translateY(-4px) !important;
    border-color: rgba(114,230,208,.18) !important;
    background: linear-gradient(145deg, rgba(114,230,208,.07), rgba(123,92,255,.035)) !important;
    box-shadow: 0 18px 34px rgba(0,0,0,.19), 0 0 24px rgba(114,230,208,.045) !important;
}
