.trend-panel {
  --trend-left: 76px;
  --trend-scale: 36px;
  --trend-gap: 10px;
  margin: 16px 0;
  padding: 14px 20px 16px;
  border: 1px solid #dbdcdf;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff, #fdfdfd 70%, #f8f8fa);
  color: #202126;
  box-shadow: 0 2px 5px #29293108, inset 0 1px #fff;
  font-variant-numeric: tabular-nums;
}
.trend-heading {position: relative; display:flex; align-items:center; gap:14px; margin-bottom:14px}
.trend-heading h2 {margin:0; font-size:18px; line-height:24px; font-weight:650}
.trend-heading > span, .trend-data summary, .trend-blank {font-size:12px; color:#656770}
.trend-data {position:static; margin-left:auto}
.trend-data summary {
  display:block;
  list-style:none;
  padding:2px 7px;
  border-radius:4px;
  cursor:pointer;
}
.trend-data summary::-webkit-details-marker {display:none}
.trend-data summary::after {content:'⌄'; margin-left:5px}
.trend-data summary:hover, .trend-data[open] summary {background:#ededef; color:#272930}
.trend-table {
  position:absolute;
  top:100%; right:0; z-index:5;
  max-width:100%; max-height:310px; overflow:auto;
  border:1px solid #d4d5d9; border-radius:7px;
  background:#fff;
  box-shadow:0 7px 20px #20212b1c;
}
.trend-table table {border-collapse:collapse; width:max-content; min-width:340px; font-size:12px; line-height:1.5}
.trend-table th, .trend-table td {padding:6px 10px; text-align:right; border-bottom:1px solid #ededf0; white-space:nowrap}
.trend-table thead {position:sticky; top:0; background:#f2f2f4; color:#43454e}
.trend-table th:first-child {text-align:left}
.trend-table tbody th {color:#4a4d55; font-weight:500}
.trend-band {
  display:grid;
  grid-template-columns:var(--trend-left) var(--trend-scale) minmax(0,1fr);
  gap:var(--trend-gap);
  min-height:112px;
  align-items:stretch;
}
.trend-key {align-self:center; line-height:1.35; font-size:12px}
.trend-key strong {font-size:12px; font-weight:600; color:#41434a}
.trend-key ul {list-style:none; padding:0; margin:3px 0 0}
.trend-key li {display:flex; align-items:center; gap:7px; min-height:16px; color:#555860}
.trend-key i {width:7px; height:7px; flex:none; border-radius:50%; background:var(--series)}
.trend-scale, .trend-plot {position:relative; min-width:0}
.trend-scale span {position:absolute; right:0; font-size:12px; line-height:1; color:#60636d; transform:translateY(-50%)}
.trend-plot svg {display:block; position:absolute; inset:0; width:100%; height:100%; overflow:visible}
.trend-grid line {stroke:#dbdce1; stroke-width:1; vector-effect:non-scaling-stroke}
.trend-grid line:last-child {stroke:#b9bbc2}
.trend-line, .trend-dot {fill:none; stroke-width:2.4; stroke-linecap:round; vector-effect:non-scaling-stroke}
.trend-dot {stroke-width:4.5; stroke-dasharray:none}
.trend-hit {position:absolute; top:0; height:100%}
.trend-tip {
  display:none; pointer-events:none; position:absolute; z-index:3;
  top:50%; left:52%; transform:translateY(-50%);
  padding:7px 10px; border:1px solid #d7d8dc; border-radius:6px;
  background:#fffffff7; color:#3b3d46; box-shadow:0 2px 8px #1d1f2615;
  font-size:12px; line-height:1.55; white-space:nowrap;
}
.trend-hit.inward .trend-tip {right:52%; left:auto}
.trend-hit:hover .trend-tip {display:block}
.trend-tip b, .trend-tip span {display:block}
.trend-tip b {font-weight:600; color:#202126}
.trend-x {padding-left:calc(var(--trend-left) + var(--trend-scale) + 2 * var(--trend-gap)); margin:5px 0; color:#62656c}
.trend-x > div {position:relative; height:18px}
.trend-x span {position:absolute; transform:translateX(-50%); white-space:nowrap; font-size:12px; line-height:18px}
.trend-x span:first-child {transform:none}
.trend-x span:last-child {transform:translateX(-100%)}
.trend-blank {display:flex; gap:12px; align-items:center; min-height:24px; margin:6px 0 0}

.day-overview {grid-template-columns:repeat(4,minmax(0,1fr))}
.daily-metric {display:grid;align-content:center;gap:9px;padding:19px 22px;font-variant-numeric:tabular-nums}
.daily-metric span,.mileage-key {font-size:13px;color:#575a61}
.daily-metric strong {font-size:clamp(26px,2.4vw,44px);line-height:1.15;letter-spacing:-.035em}
.daily-metric strong small {font-size:15px;font-weight:500}
.daily-metric b {color:#343840}
.mileage-key {display:flex;gap:20px;margin-bottom:15px}
.mileage-key span::before {content:'';display:inline-block;width:10px;height:10px;margin-right:6px;background:#bec8d2;border-radius:2px}
.mileage-key span:last-child::before,.mileage-bar i {background:var(--report-empty)}
.mileage-chart {display:flex;gap:12px;height:149px;margin-bottom:24px}
.mileage-axis {display:flex;flex-direction:column;justify-content:space-between;text-align:right;min-width:35px;color:#666a70;font-size:12px}
.mileage-bars {flex:1;display:grid;grid-template-columns:repeat(7,1fr);background:linear-gradient(#dedfe2 1px,transparent 1px) 0 0 / 100% 50%;border-bottom:1px solid #b3b7bd}
.mileage-slot {position:relative;display:flex;align-items:flex-end;justify-content:center;min-width:0}
.mileage-slot small {color:#686c71}
.mileage-bar {width:48%;max-width:62px;background:#bec8d2;display:flex;align-items:flex-end;border-radius:4px 4px 0 0;overflow:hidden}
.mileage-bar i {width:100%;display:block}
.bar-date {position:absolute;top:100%;padding-top:6px;color:#60636d;font-size:12px}
.bar-tip {display:none;position:absolute;left:50%;bottom:8%;z-index:3;background:white;border:1px solid #ccc;border-radius:6px;padding:8px 12px;box-shadow:0 3px 15px #2528301c;font-size:12px;white-space:nowrap;pointer-events:none}
.bar-tip.align-end {left:auto;right:50%}
.mileage-slot:hover .bar-tip,.mileage-slot:focus .bar-tip {display:grid;gap:2px}
@media(max-width:1050px){.day-overview{grid-template-columns:repeat(2,minmax(0,1fr))}}

.bar-pending {position:absolute;bottom:4px;left:0;right:0;text-align:center;font-size:12px;color:#474d55}
