﻿/* Chart wrappers and legend */
.chart-wrap,
.trend-card {
    position: relative;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    height: auto;
    aspect-ratio: 16 / 9;
}

.trend-card {
    padding: 10px 12px 12px;
    display: grid;
    grid-template-rows: auto 1fr;
}

@media (max-width:768px) {
    .chart-wrap, .trend-card {
        aspect-ratio: 4 / 3;
    }
}

.trend-title {
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 8px;
}

/* Canvas fills the parent box defined by aspect-ratio */
.chart-wrap canvas,
.trend-card canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Legend */
.legend {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    color: var(--muted);
    font-size: .9rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%
}

    .dot.ok {
        background: #10b981
    }

    .dot.hi {
        background: #ef4444
    }
