.download-history-panel {
    background: rgba(31, 41, 55, 0.55);
    border: 1px solid rgba(75, 85, 99, 0.95);
    border-radius: 0.75rem;
    padding: 1.5rem;
    backdrop-filter: blur(8px);
}

.download-history-host {
    width: 100%;
    min-width: 0;
}

.download-history-status {
    color: #9ca3af;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.download-history-status--warning {
    color: #fcd34d;
    margin-top: 0.75rem;
}

.download-history-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.download-history-summary-item {
    min-width: 0;
    padding: 0.75rem 0.9rem;
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid rgba(75, 85, 99, 0.72);
    border-radius: 0.6rem;
}

.download-history-summary-label {
    display: block;
    color: #9ca3af;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    line-height: 1.25;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.download-history-summary-value {
    display: block;
    color: #f9fafb;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.download-history-chart-frame {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    background: rgba(17, 24, 39, 0.62);
    border: 1px solid rgba(75, 85, 99, 0.72);
    border-radius: 0.65rem;
}

.download-history-svg {
    display: block;
    width: 100%;
    height: auto;
    min-height: 230px;
    max-height: 350px;
}

.download-history-grid-line {
    stroke: rgba(156, 163, 175, 0.22);
    stroke-width: 1;
}

.download-history-axis-label {
    fill: #9ca3af;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
}

.download-history-area {
    fill: rgba(139, 92, 246, 0.16);
}

.download-history-line {
    fill: none;
    stroke: #a78bfa;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.download-history-marker {
    fill: #111827;
    stroke: #c4b5fd;
    stroke-width: 3;
}

.download-history-marker--live {
    fill: #22c55e;
    stroke: #bbf7d0;
}

.download-history-marker-label {
    fill: #e5e7eb;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 600;
}

.download-history-hover-line {
    opacity: 0;
    pointer-events: none;
    stroke: rgba(196, 181, 253, 0.92);
    stroke-dasharray: 5 4;
    stroke-width: 2;
    transition: opacity 120ms ease;
}

.download-history-hover-line--visible {
    opacity: 1;
}

.download-history-hover-marker {
    fill: #111827;
    opacity: 0;
    pointer-events: none;
    stroke: #f9fafb;
    stroke-width: 3;
    transition: opacity 120ms ease;
}

.download-history-hover-marker--visible {
    opacity: 1;
}

.download-history-tooltip {
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
}

.download-history-tooltip--visible {
    opacity: 1;
}

.download-history-tooltip-background {
    fill: rgba(17, 24, 39, 0.97);
    stroke: rgba(196, 181, 253, 0.9);
    stroke-width: 1.5;
}

.download-history-tooltip-date,
.download-history-tooltip-value,
.download-history-tooltip-change {
    fill: #f9fafb;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}

.download-history-tooltip-date {
    fill: #c4b5fd;
    font-weight: 700;
}

.download-history-tooltip-value {
    font-weight: 600;
}

.download-history-tooltip-change {
    fill: #bbf7d0;
}

.download-history-interaction-target {
    cursor: crosshair;
    fill: transparent;
    outline: none;
}

.download-history-interaction-target:focus {
    stroke: rgba(196, 181, 253, 0.75);
    stroke-width: 2;
}

@media (max-width: 640px) {
    .download-history-panel {
        padding: 1rem;
    }

    .download-history-summary {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .download-history-summary-item {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.65rem 0.75rem;
    }

    .download-history-summary-label {
        margin-bottom: 0;
    }

    .download-history-summary-value {
        text-align: right;
    }

    .download-history-svg {
        min-height: 210px;
    }

    .download-history-axis-label,
    .download-history-marker-label {
        font-size: 11px;
    }
}
