/* ═══════ PREMIUM DASHBOARD ═══════ */

.dash-container {
    background: linear-gradient(145deg, #080e1a 0%, #0c1829 30%, #0a1a2e 100%);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(57, 255, 20, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.03);
    font-family: 'Inter', -apple-system, sans-serif;
    overflow: hidden;
}

/* ─── Dashboard Header ─── */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dash-title {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-dot {
    width: 8px;
    height: 8px;
    background: #39FF14;
    border-radius: 50%;
    display: inline-block;
    animation: dotPulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.dash-live {
    color: #39FF14;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    animation: dotPulse 1.5s ease-in-out infinite;
}

/* ─── KPI Row ─── */
.dash-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.dash-kpi {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dash-kpi-label {
    color: rgba(255,255,255,0.4);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.dash-kpi-value {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.dash-kpi-trend {
    font-size: 10px;
    font-weight: 600;
}

.dash-kpi-trend.up {
    color: #39FF14;
}

/* ─── Charts Grid ─── */
.dash-charts {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
}

.dash-chart-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 14px;
    overflow: hidden;
}

.dash-chart-main {
    grid-row: 1 / 3;
}

.dash-chart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: rgba(255,255,255,0.6);
    font-size: 11px;
    font-weight: 600;
}

.dash-chip {
    background: rgba(57, 255, 20, 0.1);
    color: #39FF14;
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ─── Line Chart (Revenue) ─── */
.dash-line-chart {
    width: 100%;
    height: 140px;
    display: block;
}

.dash-grid-line {
    stroke: rgba(255,255,255,0.04);
    stroke-width: 0.5;
    stroke-dasharray: 4 4;
}

.dash-area-fill {
    fill: url(#none);
    fill: rgba(57, 255, 20, 0.06);
    animation: areaFade 3s ease-in-out infinite alternate;
}

@keyframes areaFade {
    0% { opacity: 0.3; }
    100% { opacity: 0.8; }
}

.dash-main-line {
    fill: none;
    stroke: #39FF14;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: drawDashLine 3s ease-out forwards;
    filter: drop-shadow(0 0 6px rgba(57, 255, 20, 0.4));
}

@keyframes drawDashLine {
    to { stroke-dashoffset: 0; }
}

/* ─── Donut Chart ─── */
.dash-donut-wrap {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 8px auto;
}

.dash-donut {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.dash-donut-bg {
    fill: none;
    stroke: rgba(255,255,255,0.05);
    stroke-width: 3;
}

.dash-donut-seg {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 87.96;
}

.seg-1 {
    stroke: #39FF14;
    stroke-dashoffset: 44;
    animation: donutSpin1 2s ease-out forwards;
}

.seg-2 {
    stroke: #2563eb;
    stroke-dashoffset: 66;
    animation: donutSpin2 2.3s ease-out forwards;
}

.seg-3 {
    stroke: #00d4aa;
    stroke-dashoffset: 79;
    animation: donutSpin3 2.6s ease-out forwards;
}

@keyframes donutSpin1 {
    from { stroke-dashoffset: 87.96; }
    to { stroke-dashoffset: 44; }
}

@keyframes donutSpin2 {
    from { stroke-dashoffset: 87.96; }
    to { stroke-dashoffset: 66; }
}

@keyframes donutSpin3 {
    from { stroke-dashoffset: 87.96; }
    to { stroke-dashoffset: 79; }
}

.dash-donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.dash-legend {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 4px;
    color: rgba(255,255,255,0.5);
    font-size: 10px;
}

.dash-legend i {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.dot-web { background: #39FF14; }
.dot-chat { background: #2563eb; }
.dot-social { background: #00d4aa; }

/* ─── Bar Chart ─── */
.dash-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 80px;
    padding-top: 8px;
}

.dash-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 4px;
}

.dash-bar-col span {
    color: rgba(255,255,255,0.3);
    font-size: 9px;
    font-weight: 500;
}

.dash-bar {
    width: 100%;
    height: var(--h, 50%);
    background: linear-gradient(180deg, #2563eb, #00d4aa);
    border-radius: 3px 3px 0 0;
    animation: dashBarGrow 1.5s ease-out forwards;
    animation-delay: var(--delay, 0s);
    transform: scaleY(0);
    transform-origin: bottom;
    opacity: 0.85;
}

@keyframes dashBarGrow {
    0% { transform: scaleY(0); }
    100% { transform: scaleY(1); }
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .dash-container {
        padding: 14px;
    }
    .dash-kpis {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .dash-kpi {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .dash-charts {
        grid-template-columns: 1fr;
    }
    .dash-chart-main {
        grid-row: auto;
    }
    .dash-line-chart {
        height: 100px;
    }
}
