.sparkline-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}

.sparkline {
    display: inline-block;
    width: 60px;
    height: 20px;
    vertical-align: middle;
}

.sparkline-svg {
    width: 100%;
    height: 100%;
}

.sparkline-line {
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sparkline-line.positive {
    stroke: #10B981;
}

.sparkline-line.negative {
    stroke: #EF4444;
}

.sparkline-line.neutral {
    stroke: #6B7280;
}

.sparkline-area {
    opacity: 0.15;
}

.sparkline-area.positive {
    fill: #10B981;
}

.sparkline-area.negative {
    fill: #EF4444;
}

.sparkline-area.neutral {
    fill: #6B7280;
}

.sparkline-dot {
    r: 2.5;
    fill: white;
    stroke-width: 1.5;
}

.sparkline-dot.positive {
    stroke: #10B981;
}

.sparkline-dot.negative {
    stroke: #EF4444;
}

.sparkline-trend {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.sparkline-trend.up {
    color: #10B981;
    background: rgba(16, 185, 129, 0.1);
}

.sparkline-trend.down {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.1);
}

.sparkline-trend.flat {
    color: #6B7280;
    background: rgba(107, 114, 128, 0.1);
}

.sparkline-trend i {
    font-size: 0.6rem;
}

.summary-card .sparkline-container {
    position: absolute;
    top: 12px;
    right: 12px;
}

.summary-card-inner {
    position: relative;
}

@keyframes sparklineDraw {
    from {
        stroke-dashoffset: 200;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.sparkline-line {
    stroke-dasharray: 200;
    animation: sparklineDraw 1s ease-out forwards;
}

.sparkline-fade-in {
    animation: sparklineFadeIn 0.5s ease-out forwards;
}

@keyframes sparklineFadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

[data-theme="dark"] .sparkline-dot {
    fill: #1f2937;
}

[data-theme="dark"] .sparkline-trend.up {
    background: rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .sparkline-trend.down {
    background: rgba(239, 68, 68, 0.2);
}

[data-theme="dark"] .sparkline-trend.flat {
    background: rgba(107, 114, 128, 0.2);
}
