.modern-panel:has(.modern-trend) {
  background: linear-gradient(180deg, #fff, #fbfdff);
}

.modern-trend {
  position: relative;
  height: 250px;
  margin: 4px 14px 14px;
  padding: 28px 14px 18px 38px;
  border-left: 1px solid #c8d8e9;
  border-bottom: 1px solid #c8d8e9;
  border-radius: 8px 8px 4px 4px;
  background:
    repeating-linear-gradient(to top, transparent 0 45px, #e9f0f7 46px 47px),
    linear-gradient(180deg, #f8fbff, #fff);
}

.modern-trend::before {
  content: "Routes";
  position: absolute;
  left: -3px;
  top: 50%;
  color: #6a82a0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .5px;
  transform: translate(-50%, -50%) rotate(-90deg);
}

.modern-trend-day {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 6px;
}

.modern-trend-day::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: 27px;
  width: min(30px, 62%);
  height: calc(100% - 48px);
  border: 1px solid #d7e7f7;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, rgba(224, 241, 255, .58), rgba(238, 247, 255, .3));
  transform: translateX(-50%);
}

.modern-trend-day b {
  min-width: 25px;
  padding: 3px 6px;
  border-radius: 999px;
  background: #fff;
  color: #244a72;
  box-shadow: 0 2px 8px rgba(30, 70, 112, .12);
  text-align: center;
}

.modern-trend-day i {
  position: relative;
  width: min(38px, 72%);
  min-height: 7px;
  border-radius: 9px 9px 3px 3px;
  background: linear-gradient(180deg, #4f9df2, #2475dd);
  box-shadow: 0 5px 12px rgba(36, 117, 221, .2);
  transition: transform .18s ease, filter .18s ease;
}

.modern-trend-day i::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: inherit;
  box-shadow: 0 2px 7px rgba(21, 58, 94, .2);
  transform: translateX(-50%);
}

.modern-trend-day:hover i {
  filter: brightness(1.06);
  transform: scaleX(1.08);
}

.modern-trend-day:nth-child(2) i { background: linear-gradient(180deg, #34c995, #16a872); box-shadow: 0 5px 12px rgba(22, 168, 114, .2); }
.modern-trend-day:nth-child(3) i { background: linear-gradient(180deg, #ffbd4b, #e89417); box-shadow: 0 5px 12px rgba(232, 148, 23, .2); }
.modern-trend-day:nth-child(4) i { background: linear-gradient(180deg, #a27af2, #6d4bd8); box-shadow: 0 5px 12px rgba(109, 75, 216, .2); }
.modern-trend-day:nth-child(5) i { background: linear-gradient(180deg, #32bfd0, #1095a6); box-shadow: 0 5px 12px rgba(16, 149, 166, .2); }
.modern-trend-day:nth-child(6) i { background: linear-gradient(180deg, #fb7d8f, #d94c65); box-shadow: 0 5px 12px rgba(217, 76, 101, .2); }
.modern-trend-day:nth-child(7) i { background: linear-gradient(180deg, #4f9df2, #2869d8); box-shadow: 0 5px 12px rgba(40, 105, 216, .24); }

.modern-trend-day small {
  padding: 4px 6px;
  border-radius: 6px;
  color: #5d7695;
  font-weight: 700;
}

.modern-trend-day:last-child small {
  background: #e8f2ff;
  color: #1764b8;
}

/* Unified blue analytics style */
.modern-trend {
  height: 238px;
  margin-bottom: 28px;
  background:
    repeating-linear-gradient(to top, transparent 0 42px, #e5edf6 43px 44px),
    linear-gradient(180deg, #fbfdff, #fff);
}

.modern-trend::after {
  content: "■  Daily trips";
  position: absolute;
  right: 12px;
  bottom: -24px;
  color: #2678dc;
  font-size: 9px;
  font-weight: 800;
}

.modern-trend-day b {
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #365c82;
  font-size: 10px;
}

.modern-trend-day i,
.modern-trend-day:nth-child(2) i,
.modern-trend-day:nth-child(3) i,
.modern-trend-day:nth-child(4) i,
.modern-trend-day:nth-child(5) i,
.modern-trend-day:nth-child(6) i,
.modern-trend-day:nth-child(7) i {
  width: min(30px, 62%);
  min-height: 6px;
  border-radius: 5px 5px 1px 1px;
  background: linear-gradient(180deg, #36a3f4 0%, #1976dc 58%, #0d5fc2 100%);
  box-shadow: 0 5px 11px rgba(23, 105, 203, .2);
  z-index: 2;
  height: var(--trend-height, 4%);
  flex: 0 0 var(--trend-height, 4%);
}

.modern-trend-day i::after {
  display: none;
}

.modern-trend-day:last-child i {
  background: linear-gradient(180deg, #1f8ce7, #0b58bd);
  box-shadow: 0 6px 14px rgba(11, 88, 189, .27);
}

.modern-trend-day:last-child::before {
  border-color: #b9d6f4;
  background: linear-gradient(180deg, rgba(201, 229, 255, .72), rgba(232, 244, 255, .42));
}
