.polestar-image-stage {
  height: clamp(420px, 62vw, 760px);
  min-height: 420px;
  border-radius: 34px;
  overflow: hidden;
  background: rgba(255,255,255,0.035);
  box-shadow: 0 28px 90px rgba(0,0,0,0.42);
}

.topbar-actions button[onclick="loadDashboard()"],
button[onclick="loadChargingGraph()"],
#refreshPlanButton {
  display: none !important;
}

.polestar-image-stage .vehicle-3d-canvas,
.polestar-image-stage .hero-background-glow {
  display: none;
}

.polestar-scene-model {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  z-index: 1;
  filter: none;
}

.polestar-scene-image {
  content: url("assets/polestar-charging-scene.svg?v=20260613-generated-fit-2");
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
  background: #0b0f16;
}

.polestar-scene-model.is-charging {
  filter: none;
}

.charge-port-image {
  position: absolute;
  left: 30.8%;
  top: 72.2%;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(52,245,166,0.82);
  box-shadow:
    0 0 6px rgba(52,245,166,0.95),
    0 0 16px rgba(52,245,166,0.75),
    0 0 30px rgba(52,245,166,0.45);
  opacity: 0;
  transition: opacity .2s ease;
}

.polestar-scene-model.is-charging .charge-port-image {
  opacity: 1;
}

.polestar-image-stage .charger-unit {
  display: none !important;
}

.charge-cable {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
  transition: opacity .2s ease;
}

.charge-cable.hidden {
  opacity: 0;
  visibility: hidden;
}

.charge-cable path {
  d: path("M30 239 C32 303 43 363 68 403 C90 438 125 457 162 445 C191 435 206 415 216 394");
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.charge-cable .cable-base {
  stroke: rgba(8,10,12,.86);
  stroke-width: 7;
  filter: drop-shadow(0 7px 7px rgba(0,0,0,.35));
}

.charge-cable .cable-flow {
  stroke: rgba(52,245,166,.98);
  stroke-width: 6;
  stroke-dasharray: 18 118;
  stroke-dashoffset: 136;
  opacity: 0;
  filter:
    drop-shadow(0 0 4px rgba(52,245,166,.95))
    drop-shadow(0 0 11px rgba(52,245,166,.85))
    drop-shadow(0 0 20px rgba(52,245,166,.55));
}

.charge-cable.is-charging .cable-flow {
  opacity: 1;
  animation: cableFlow .8s linear infinite;
}

@keyframes cableFlow {
  from { stroke-dashoffset: 136; }
  to { stroke-dashoffset: 0; }
}

.premium-battery-card #batteryPercent {
  display: block;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: .9;
  letter-spacing: -0.08em;
}

.premium-battery-card .battery-track {
  height: 14px;
  margin-top: 18px;
}

.battery-plan-status {
  margin: 8px 0 0;
  max-width: 300px;
}

.battery-meta,
.battery-estimate,
.charge-estimate-card {
  display: none !important;
}

/* Premium minimal charging plan chart */
.chart-card.plan-after-car {
  min-height: 230px;
  padding-bottom: 18px;
}

.chart-card.plan-after-car .legend {
  gap: 22px;
  margin: 14px 0 8px;
  font-size: .9rem;
  color: rgba(245,247,251,.58);
}

.chart-card.plan-after-car .legend b {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: none;
}

.charging-graph {
  position: relative;
  display: grid !important;
  grid-auto-flow: column;
  grid-auto-columns: minmax(13px, 1fr);
  align-items: end;
  gap: 5px;
  height: 142px;
  min-height: 142px;
  overflow-x: auto;
  padding: 26px 6px 24px;
  border-top: 1px solid rgba(255,255,255,.07);
  border-bottom: 0;
  background:
    linear-gradient(to bottom, rgba(255,255,255,.055) 1px, transparent 1px) 0 29%,
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px) 0 58%;
  background-size: 100% 50%;
  scrollbar-width: none;
}

.charging-graph::-webkit-scrollbar {
  display: none;
}

.charging-graph::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 23px;
  height: 1px;
  background: rgba(255,255,255,.08);
  pointer-events: none;
}

.charging-graph .slot {
  position: relative;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.charging-graph .slot-bar {
  width: 9px;
  min-height: 6px;
  border-radius: 999px;
  background: rgba(245,247,251,.14);
  opacity: .72;
  transition: height .2s ease, opacity .2s ease, transform .2s ease;
}

.charging-graph .slot-bar.planned {
  background: linear-gradient(180deg, rgba(135,255,205,.96), rgba(52,245,166,.82));
  box-shadow: 0 0 14px rgba(52,245,166,.28);
  opacity: 1;
}

.charging-graph .slot-bar.actual {
  background: linear-gradient(180deg, rgba(188,210,255,.98), rgba(143,184,255,.86));
  box-shadow: 0 0 14px rgba(143,184,255,.3);
  opacity: 1;
}

.charging-graph .slot-now .slot-bar {
  transform: scaleX(1.3);
  outline: 1px solid rgba(245,247,251,.42);
  outline-offset: 3px;
}

.charging-graph .slot small {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  color: rgba(245,247,251,.44);
  font-size: .68rem;
  letter-spacing: .02em;
  white-space: nowrap;
}

.charging-graph .slot:nth-child(24n + 1) small,
.charging-graph .slot:first-child small,
.charging-graph .slot:last-child small {
  display: block;
}

.hourly-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: .92rem;
}

.hourly-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hourly-charging-graph {
  display: grid;
  grid-template-columns: repeat(12, minmax(26px, 1fr));
  align-items: end;
  gap: 8px;
  min-height: 180px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.hourly-graph-slot {
  min-width: 0;
  text-align: center;
}

.hourly-bars {
  height: 130px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
}

.hourly-bar {
  display: block;
  width: 9px;
  border-radius: 999px 999px 3px 3px;
  min-height: 4px;
}

.hourly-planned {
  background: rgba(52,245,166,.9);
  box-shadow: 0 0 12px rgba(52,245,166,.35);
}

.hourly-actual {
  background: rgba(133,170,255,.9);
  box-shadow: 0 0 12px rgba(133,170,255,.35);
}

.hourly-graph-slot small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: .75rem;
  transform: rotate(-35deg);
  transform-origin: top center;
}

@media (max-width: 760px) {
  .polestar-image-stage {
    height: 430px;
    min-height: 430px;
    border-radius: 26px;
  }

  .charge-port-image {
    width: 18px;
    height: 18px;
  }

  .charge-cable .cable-base {
    stroke-width: 5.5;
  }

  .charge-cable .cable-flow {
    stroke-width: 4.5;
  }

  .charging-graph {
    grid-auto-columns: minmax(12px, 1fr);
    gap: 4px;
    height: 130px;
    min-height: 130px;
    padding-bottom: 26px;
  }

  .charging-graph .slot-bar {
    width: 8px;
  }

  .charging-graph .slot:nth-child(24n + 1) small {
    display: none;
  }

  .charging-graph .slot:nth-child(32n + 1) small,
  .charging-graph .slot:first-child small,
  .charging-graph .slot:last-child small {
    display: block;
  }

  .hourly-charging-graph {
    grid-template-columns: repeat(6, minmax(32px, 1fr));
    row-gap: 18px;
  }
}