/* Dashboard chart, period switch and change badges. */
.chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; height: 230px; font: 12px/1 Ubuntu, Arial, sans-serif; color: #7a8592; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; padding-bottom: 26px; font-variant-numeric: tabular-nums; }
.chart-y span { transform: translateY(-50%); } .chart-y span:last-child { transform: translateY(50%); }
.chart-area { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) 26px; min-width: 0; }
.chart-lines { position: absolute; left: 0; right: 0; top: 0; bottom: 26px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-lines i { display: block; border-top: 1px dashed #e3e7ec; } .chart-lines i:last-child { border-top: 1px solid #cfd6de; }
.chart-bars { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: var(--g); align-items: end; }
.chart-day { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; outline: none; cursor: default; }
.chart-day .bar { display: block; width: 100%; height: var(--h); min-height: 2px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #cfd7e1, #b7c2ce); transform-origin: bottom; animation: rgSobe .8s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--i) * 14ms); transition: background .2s, filter .2s; }
.chart-day:hover .bar, .chart-day:focus-visible .bar { background: linear-gradient(180deg, #f04b6e, #d60037); }
.chart-day .sale { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #d60037; color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; animation: rgPop .5s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(.4s + var(--i) * 14ms); z-index: 1; }
.chart-day::after { content: attr(data-t); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 4px); white-space: nowrap; padding: 6px 9px; border-radius: 8px; background: #1f2835; color: #fff; font-size: 12px; font-weight: 500; box-shadow: 0 8px 18px rgba(0, 0, 0, .18); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 3; }
.chart-day.chart-start::after { left: 0; transform: translate(0, 4px); } .chart-day.chart-end::after { left: auto; right: 0; transform: translate(0, 4px); }
.chart-day:hover::after, .chart-day:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.chart-day.chart-start:hover::after, .chart-day.chart-start:focus-visible::after, .chart-day.chart-end:hover::after, .chart-day.chart-end:focus-visible::after { transform: none; }
.chart-x { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: var(--g); align-items: end; }
.chart-x span { display: flex; justify-content: center; white-space: nowrap; overflow: visible; font-variant-numeric: tabular-nums; }
.chart-legend { display: flex; gap: 16px; margin-top: 10px; font-size: 12.5px; color: #5b6673; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; } .chart-legend i { width: 10px; height: 10px; border-radius: 3px; background: #c3ccd7; } .chart-legend i.sale { border-radius: 50%; background: #d60037; }
@keyframes rgSobe { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes rgPop { from { transform: translateX(-50%) scale(0); } to { transform: translateX(-50%) scale(1); } }
.period { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: #eef1f5; }
.period a { padding: 5px 12px; border-radius: 999px; color: #5b6673; font: 700 12.5px Ubuntu, Arial, sans-serif; text-decoration: none; transition: background .2s, color .2s, box-shadow .2s; }
.period a:hover { color: #1f2835; } .period a.on { background: #fff; color: #1f2835; box-shadow: 0 1px 4px rgba(31, 40, 53, .14); }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font: 700 11.5px/1.5 Ubuntu, Arial, sans-serif; white-space: nowrap; }
.delta-up { background: #e7f8ee; color: #0a7d4f; } .delta-down { background: #fdecef; color: #b3123a; } .delta-flat { background: #eef1f5; color: #5b6673; }
@media (max-width: 640px) { .chart { height: 190px; } .chart-x span { font-size: 10.5px; } }
.chart-card { display: flex; flex-direction: column; } .chart-card .chart { flex: 1 1 auto; height: auto; min-height: 230px; }
.chart-day .bar { background: linear-gradient(180deg, #ffb8c8, #ff6f91); }
.chart-day:hover .bar, .chart-day:focus-visible .bar { background: linear-gradient(180deg, #ff4d73, #b8002f); }
.chart-day .sale { background: #1f2835; }
.chart-legend i { background: #ff8fa8; } .chart-legend i.sale { background: #1f2835; }
