:root {
    --bg: #f4f1e9;
    --bg-soft: #fffaf1;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-strong: #ffffff;
    --line: rgba(43, 47, 54, 0.12);
    --text: #1d232c;
    --muted: #66707d;
    --accent: #b44c25;
    --accent-dark: #7a2d12;
    --success: #1d7a54;
    --danger: #a23333;
    --shadow: 0 18px 45px rgba(57, 44, 29, 0.12);
    --radius: 20px;
}

body[data-theme="dark"] {
    --bg: #111417;
    --bg-soft: #191d21;
    --surface: rgba(26, 30, 35, 0.88);
    --surface-strong: #1a1e23;
    --line: rgba(255, 255, 255, 0.08);
    --text: #edf2f7;
    --muted: #b1bbc7;
    --accent: #ee7b4c;
    --accent-dark: #ffb08f;
    --success: #4fd69b;
    --danger: #ff8b8b;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    max-width: 100%;
    overflow-x: hidden;
}

html.today-touch-scroll-lock,
body.today-touch-scroll-lock {
    overscroll-behavior-y: none;
    touch-action: pan-x;
}

body {
    margin: 0;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(180, 76, 37, 0.14), transparent 32%),
        radial-gradient(circle at bottom right, rgba(79, 214, 155, 0.12), transparent 28%),
        linear-gradient(180deg, var(--bg-soft), var(--bg));
    min-height: 100vh;
}

body.is-page-inactive *,
body.is-page-inactive *::before,
body.is-page-inactive *::after {
    animation-play-state: paused !important;
}

a {
    color: inherit;
    text-decoration: none;
}

.shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
    width: 100%;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.4);
    position: sticky;
    top: 0;
    z-index: 100;
}

body[data-theme="dark"] .topbar {
    background:
        linear-gradient(180deg, rgba(22, 25, 29, 0.94), rgba(16, 19, 23, 0.9));
    border-bottom-color: rgba(255, 255, 255, 0.055);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.topbar__brand a {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body[data-theme="dark"] .topbar__brand a {
    color: rgba(237, 242, 247, 0.86);
}

.topbar__nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    min-width: 0;
}

body[data-theme="dark"] .topbar__nav a,
body[data-theme="dark"] .topbar__nav button {
    color: rgba(237, 242, 247, 0.76);
}

.topbar__nav .is-active {
    color: var(--accent);
}

body[data-theme="dark"] .topbar__nav .is-active {
    color: #f08a5f;
}

.inline-form,
.inline-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.link-button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.button:hover,
.link-button:hover {
    transform: translateY(-1px);
}

.button:disabled,
.link-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.button--ghost,
.link-button {
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(180, 76, 37, 0.25);
}

.button--danger,
.link-button--danger {
    background: var(--danger);
    color: #fff;
    border: 1px solid transparent;
}

body[data-theme="dark"] .button--danger,
body[data-theme="dark"] .link-button--danger {
    background: #d85f5f;
    color: #fff;
}

body[data-theme="dark"] .topbar .link-button {
    background: rgba(238, 123, 76, 0.07);
    border-color: rgba(238, 123, 76, 0.18);
    color: #e88962;
}

.button--small {
    padding: 0.55rem 0.95rem;
}

.page-header,
.hero,
.grid,
.metrics-grid,
.wizard,
.card,
.auth-card {
    animation: fadeUp 0.55s ease both;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.5rem;
    min-width: 0;
}

.breadcrumbs {
    margin: 0 0 0.9rem;
}

.breadcrumbs__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.breadcrumbs__item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.breadcrumbs__item:not(:last-child)::after {
    content: "/";
    color: rgba(102, 112, 125, 0.55);
}

.breadcrumbs__link {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.18s ease;
}

.breadcrumbs__link:hover {
    color: var(--accent);
}

.breadcrumbs__current {
    color: var(--text);
}

.page-header > *,
.card,
.metric-card,
.vehicle-list__item,
.point-list__item,
.vehicle-pair-card,
.wizard,
.wizard__content,
.filter-form,
.filter-form label {
    min-width: 0;
}

.trip-page-header {
    align-items: center;
}

.trip-page-header__meta {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    align-items: center;
}

.trip-page-header__range {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

.trip-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(57, 44, 29, 0.08);
}

body[data-theme="dark"] .trip-chip {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.purple-streak-badge {
    --purple-streak-ink: rgba(255, 255, 255, 0.94);
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    margin-top: 1rem;
    padding: 1rem 1.05rem;
    max-width: 42rem;
    border-radius: 22px;
    border: 1px solid hsl(276 90% 62% / 0.28);
    background:
        radial-gradient(circle at top right, hsl(286 98% 74% / 0.55), transparent 34%),
        radial-gradient(circle at bottom left, hsl(258 96% 62% / 0.18), transparent 42%),
        linear-gradient(135deg, hsl(272 80% 52%), hsl(262 76% 36%));
    color: var(--purple-streak-ink);
    box-shadow:
        0 18px 40px hsl(268 70% 28% / 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    overflow: hidden;
}

.purple-streak-badge::after {
    content: "";
    position: absolute;
    inset: auto -10% -42% auto;
    width: 9rem;
    height: 9rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.32), transparent 68%);
    opacity: 0.55;
    pointer-events: none;
}

.purple-streak-badge__icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    flex: 0 0 auto;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 10px 20px rgba(38, 11, 84, 0.18);
}

.purple-streak-badge__icon i {
    font-size: 1.15rem;
}

.purple-streak-badge__content {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.16rem;
    min-width: 0;
}

.purple-streak-badge__eyebrow {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.purple-streak-badge strong {
    font-size: clamp(1.02rem, 2.2vw, 1.2rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.purple-streak-badge__text {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
    line-height: 1.45;
}

body[data-theme="dark"] .purple-streak-badge {
    border-color: hsl(276 92% 72% / 0.3);
    background:
        radial-gradient(circle at top right, hsl(286 98% 76% / 0.42), transparent 34%),
        radial-gradient(circle at bottom left, hsl(258 96% 68% / 0.16), transparent 42%),
        linear-gradient(135deg, hsl(272 68% 28%), hsl(262 56% 18%));
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.charge-free-badge {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    margin-top: 1rem;
    padding: 1rem 1.05rem;
    max-width: 42rem;
    border-radius: 22px;
    border: 1px solid hsl(42 92% 58% / 0.3);
    background:
        radial-gradient(circle at top right, hsl(48 100% 72% / 0.7), transparent 34%),
        radial-gradient(circle at bottom left, hsl(35 100% 62% / 0.16), transparent 42%),
        linear-gradient(135deg, hsl(42 94% 58%), hsl(34 88% 42%));
    color: rgba(57, 33, 0, 0.94);
    box-shadow:
        0 18px 40px hsla(38, 84%, 28%, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.charge-free-badge::after {
    content: "";
    position: absolute;
    inset: auto -10% -42% auto;
    width: 9rem;
    height: 9rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent 68%);
    opacity: 0.5;
    pointer-events: none;
}

.charge-free-badge__icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.22);
    color: #fff8d9;
    flex: 0 0 auto;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 10px 20px rgba(110, 61, 2, 0.18);
}

.charge-free-badge__icon i {
    font-size: 1.1rem;
}

.charge-free-badge__content {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.16rem;
    min-width: 0;
}

.charge-free-badge__eyebrow {
    color: rgba(57, 33, 0, 0.72);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.charge-free-badge strong {
    font-size: clamp(1.02rem, 2.2vw, 1.2rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.charge-free-badge__text {
    color: rgba(57, 33, 0, 0.82);
    font-size: 0.95rem;
    line-height: 1.45;
}

body[data-theme="dark"] .charge-free-badge {
    border-color: hsl(42 92% 66% / 0.28);
    background:
        radial-gradient(circle at top right, hsl(48 100% 72% / 0.5), transparent 34%),
        radial-gradient(circle at bottom left, hsl(35 100% 62% / 0.12), transparent 42%),
        linear-gradient(135deg, hsl(42 76% 35%), hsl(34 72% 24%));
    color: rgba(255, 247, 219, 0.95);
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .charge-free-badge__eyebrow,
body[data-theme="dark"] .charge-free-badge__text {
    color: rgba(255, 247, 219, 0.84);
}

.trip-chip--battery {
    gap: 0.5rem;
}

.trip-chip--subtle {
    background: rgba(255, 255, 255, 0.62);
    font-weight: 600;
}

body[data-theme="dark"] .trip-chip--subtle {
    background: rgba(255, 255, 255, 0.06);
}

.battery-range {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    line-height: 1;
    white-space: nowrap;
}

.battery-range__arrow {
    color: var(--muted);
    font-size: 0.9em;
}

.battery-range__value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.battery-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(180, 76, 37, 0.2);
    background: rgba(180, 76, 37, 0.08);
    color: var(--accent-dark);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    white-space: nowrap;
}

.battery-pill i {
    font-size: 0.95em;
    line-height: 1;
}

.battery-pill--empty {
    opacity: 0.75;
}

.trip-trace-card--stacked {
    padding: 1.4rem 1.5rem 1.5rem;
}

.trip-trace-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.trip-trace-card__meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.trip-trace-card__meta--right {
    margin-left: auto;
    justify-content: flex-end;
}

.trip-trace-card__title {
    flex: 1 1 auto;
}

.trip-trace-history p {
    margin-top: 0;
}

.trip-trace-history {
    position: relative;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
    margin-bottom: 1.75rem;
}

.hero__content,
.hero__panel,
.card,
.metric-card,
.auth-card,
.wizard-panel,
.wizard__steps {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero__content {
    padding: 2rem;
}

.hero__content h1 {
    margin: 0 0 0.9rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.3rem, 5vw, 4rem);
    line-height: 0.95;
}

.hero__actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1.4rem;
}

.hero__panel {
    padding: 1.5rem;
}

.grid {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trip-layout,
.trip-insights-grid {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.trip-layout {
    grid-template-columns: minmax(0, 4fr) minmax(320px, 1fr);
    align-items: stretch;
}

.trip-insights-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: start;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-card {
    padding: 1.25rem;
}

.metric-card span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 0.45rem;
}

.metric-card strong {
    font-size: 1.7rem;
}

.card,
.auth-card {
    padding: 1.35rem;
    margin-bottom: 1.5rem;
}

.filter-card {
    position: relative;
    z-index: 6;
}

.card--subtle {
    background: var(--bg-soft);
}

.card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.trip-map-card {
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
}

.charge-session-card {
    display: grid;
    gap: 1.05rem;
    align-content: start;
}

.charge-session-card__header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    flex-wrap: wrap;
}

.charge-session-card__header h2 {
    margin: 0 0 0.35rem;
}

.charge-band {
    display: grid;
    gap: 0.55rem;
    padding: 0.55rem 0.7rem 0.65rem;
    margin-bottom: 0.65rem;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(255, 255, 255, 0.03);
}

.charge-band__scale {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.charge-band__scale {
    color: var(--muted);
    font-size: 0.8rem;
}

.charge-band__scale span:nth-child(2),
.charge-band__scale span:nth-child(3),
.charge-band__scale span:nth-child(4) {
    text-align: center;
}

.charge-band__scale span:last-child {
    text-align: right;
}

.charge-band__track {
    position: relative;
    height: 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background:
        linear-gradient(90deg, rgba(79, 214, 155, 0.08), rgba(238, 123, 76, 0.08)),
        rgba(29, 35, 44, 0.12);
    overflow: hidden;
}

body[data-theme="dark"] .charge-band__track {
    background:
        linear-gradient(90deg, rgba(79, 214, 155, 0.11), rgba(238, 123, 76, 0.11)),
        rgba(255, 255, 255, 0.06);
}

.charge-band__range {
    position: absolute;
    top: 0.08rem;
    bottom: 0.08rem;
    min-width: 0.45rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--success), var(--accent));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.charge-band__marker {
    position: absolute;
    top: 50%;
    width: 0.9rem;
    height: 0.9rem;
    margin-left: -0.45rem;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.92);
    transform: translateY(-50%);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.charge-band__marker--start {
    background: var(--success);
}

.charge-band__marker--end {
    background: var(--accent);
}

.charge-band__labels {
    position: relative;
    min-height: 2rem;
    font-variant-numeric: tabular-nums;
}

.charge-band__label {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    white-space: nowrap;
}

.charge-band__label--edge-left {
    transform: none;
}

.charge-band__label--edge-right {
    transform: translateX(-100%);
}

.charge-graph {
    display: grid;
    gap: 0.8rem;
    padding: 0.9rem;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(74, 222, 128, 0.15), transparent 34%),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.15), transparent 28%),
        rgba(255, 255, 255, 0.58);
    overflow: hidden;
}

body[data-theme="dark"] .charge-graph {
    background:
        radial-gradient(circle at top left, rgba(74, 222, 128, 0.11), transparent 34%),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.11), transparent 28%),
        rgba(255, 255, 255, 0.045);
}

.charge-graph__header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    flex-wrap: wrap;
}

.charge-graph__eyebrow {
    margin: 0 0 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.75rem;
    color: var(--muted);
}

.charge-graph__header h3 {
    margin: 0;
    font-size: 1.15rem;
}

.charge-graph__header .muted {
    margin: 0.25rem 0 0;
}

.charge-graph__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.55rem;
}

.charge-graph__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.22);
    color: var(--muted);
}

.charge-graph__legend-item::before {
    content: "";
    width: 0.58rem;
    height: 0.58rem;
    border-radius: 999px;
    background: currentColor;
}

.charge-graph__legend-item--power {
    color: var(--accent);
}

.charge-graph__legend-item--soc {
    color: var(--success);
}

.charge-graph__metrics {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.charge-graph__metrics span {
    display: grid;
    gap: 0.15rem;
    min-width: 88px;
    padding: 0.62rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.24);
    font-variant-numeric: tabular-nums;
}

body[data-theme="dark"] .charge-graph__metrics span {
    background: rgba(255, 255, 255, 0.06);
}

.charge-graph__metrics strong {
    font-size: 1rem;
}

.charge-graph__metrics small {
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.charge-graph__svg {
    width: 100%;
    height: auto;
    max-height: 250px;
    display: block;
    overflow: visible;
}

.charge-graph__grid {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
    stroke-dasharray: 5 7;
}

body[data-theme="dark"] .charge-graph__grid {
    stroke: rgba(255, 255, 255, 0.07);
}

.charge-graph__axis-label {
    fill: var(--muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.charge-graph__axis-label--right {
    font-size: 12px;
    letter-spacing: 0.04em;
}

.charge-graph__axis-note {
    fill: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.charge-graph__axis-note--right {
    letter-spacing: 0.1em;
}

.charge-graph__axis-timestamp {
    fill: var(--muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.charger-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    border-color: rgba(180, 76, 37, 0.16);
}

.charger-banner--linked {
    background:
        radial-gradient(circle at top left, rgba(79, 214, 155, 0.14), transparent 34%),
        radial-gradient(circle at bottom right, rgba(180, 76, 37, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 241, 0.72));
}

.charger-banner--prompt {
    background:
        radial-gradient(circle at top left, rgba(180, 76, 37, 0.16), transparent 34%),
        radial-gradient(circle at bottom right, rgba(79, 214, 155, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 236, 0.82));
}

body[data-theme="dark"] .charger-banner--linked,
body[data-theme="dark"] .charger-banner--prompt {
    background:
        radial-gradient(circle at top left, rgba(238, 123, 76, 0.14), transparent 32%),
        radial-gradient(circle at bottom right, rgba(79, 214, 155, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.04));
}

.charger-banner__body {
    display: grid;
    gap: 0.85rem;
}

.charger-banner__body h2,
.charger-card__header h2,
.charge-location-modal__panel h2 {
    margin: 0;
}

.charger-banner__body--centered {
    width: 100%;
    justify-items: center;
    text-align: center;
}

.charger-banner__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.charger-banner__chips--centered {
    justify-content: center;
}

.trip-chip i,
.charger-card__meta i {
    margin-right: 0.35rem;
}

.trip-stat-card--compact strong {
    font-size: 1.15rem;
    line-height: 1.25;
}

.trip-stat-card__icon--location {
    background: rgba(60, 126, 235, 0.1);
    color: #2f68b7;
}

body[data-theme="dark"] .trip-stat-card__icon--location {
    color: #8ebcff;
}

.trip-stat-card__icon--rate {
    background: rgba(191, 148, 52, 0.14);
    color: #9d6c00;
}

body[data-theme="dark"] .trip-stat-card__icon--rate {
    color: #ffd179;
}

.chargers-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.charger-card {
    display: grid;
    gap: 1rem;
}

.charger-card__header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
}

.charger-rate-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(29, 122, 84, 0.12);
    color: var(--success);
    font-weight: 800;
    white-space: nowrap;
}

.charger-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.charger-card__meta span {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.72rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.28);
    color: var(--muted);
    font-size: 0.9rem;
}

body[data-theme="dark"] .charger-card__meta span {
    background: rgba(255, 255, 255, 0.05);
}

.charger-card__form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
}

.charger-card__actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.75rem;
}

.charger-card__delete-form {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.charger-card__delete-note {
    margin: 0;
}

.charger-empty-state {
    text-align: center;
}

body.has-modal {
    overflow: hidden;
}

.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
    z-index: 50;
}

.modal[hidden] {
    display: none !important;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 24, 31, 0.56);
    backdrop-filter: blur(12px);
}

.modal__dialog {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding: 1.5rem;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.modal__close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 999px;
    background: rgba(180, 76, 37, 0.1);
    color: var(--accent);
    cursor: pointer;
}

.charge-location-modal {
    display: grid;
    gap: 1rem;
}

.charge-location-modal__panel {
    display: grid;
    gap: 1rem;
}

.charge-rate-override {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(180, 76, 37, 0.06), rgba(255, 255, 255, 0.02));
}

body[data-theme="dark"] .charge-rate-override {
    background:
        linear-gradient(180deg, rgba(238, 123, 76, 0.08), rgba(255, 255, 255, 0.03));
}

.charge-rate-override__toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.charge-rate-override__mode {
    appearance: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    color: var(--muted);
    font: inherit;
    font-weight: 800;
    padding: 0.7rem 0.95rem;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.charge-rate-override__mode:hover:not(:disabled) {
    transform: translateY(-1px);
    color: var(--text);
    border-color: rgba(180, 76, 37, 0.24);
}

.charge-rate-override__mode.is-active {
    background: var(--accent);
    border-color: transparent;
    color: #fff;
}

.charge-rate-override__mode:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

body[data-theme="dark"] .charge-rate-override__mode {
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
}

.charge-rate-override__mode.is-active {
    box-shadow: 0 10px 24px rgba(180, 76, 37, 0.24);
}

.charge-rate-override [data-charge-rate-panel] {
    display: grid;
    gap: 0.4rem;
}

.charge-rate-override__actions {
    display: flex;
    justify-content: flex-end;
}

.charge-location-modal__separator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.charge-location-modal__separator::before,
.charge-location-modal__separator::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--line);
}

.charge-location-modal__separator span {
    flex: 0 0 auto;
}

.charge-location-modal__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.charge-location-modal__actions .button {
    width: 100%;
}

.speed-location-modal {
    width: min(560px, 100%);
    display: grid;
    gap: 1rem;
}

.speed-location-modal h2 {
    margin: 0;
}

.speed-location-modal__form {
    display: grid;
    gap: 0.9rem;
}

.speed-location-modal__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.speed-location-modal__actions .button {
    width: 100%;
}

.trip-map-card__header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.trip-map-card__route-points {
    display: block;
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.trip-route-status[data-state="success"] {
    color: var(--success);
}

.trip-route-status[data-state="warning"] {
    color: var(--accent-dark);
}

.trip-map-card__legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.trip-map-card__legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.trip-map-card__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.trip-map-card__actions .button.is-active {
    background: rgba(180, 76, 37, 0.14);
    border-color: rgba(180, 76, 37, 0.32);
    color: var(--accent-dark);
}

.trip-legend-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    display: inline-block;
}

.trip-legend-dot--start {
    background: var(--success);
}

.trip-legend-dot--route {
    background: var(--accent);
}

.trip-legend-dot--speed-low {
    background: #123c69;
}

.trip-legend-dot--speed-mid {
    background: #198754;
}

.trip-legend-dot--speed-high {
    background: #f97316;
}

.trip-legend-dot--speed-peak {
    background: #dc2626;
}

.trip-legend-dot--camera {
    background: #ef7777;
}

.trip-legend-dot--end {
    background: var(--accent-dark);
}

.trip-overview-card h2,
.trip-summary-card h2,
.trip-trace-card h2,
.trip-map-card h2 {
    margin: 0 0 0.35rem;
}

.trip-stat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin: 1.15rem 0;
}

.trip-stat-card {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 241, 0.75));
    display: grid;
    gap: 0.55rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

body[data-theme="dark"] .trip-stat-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.045));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.trip-stat-card--efficiency {
    position: relative;
    overflow: hidden;
    padding: 1.15rem 1.1rem 1.2rem;
    border-color: hsl(var(--efficiency-hue, 120) 88% 50% / 0.22);
    background:
        radial-gradient(circle at top left, hsl(var(--efficiency-hue, 120) 92% 58% / 0.38), transparent 34%),
        radial-gradient(circle at center right, hsl(calc(var(--efficiency-hue, 120) - 16) 96% 60% / 0.24), transparent 42%),
        radial-gradient(circle at bottom right, hsl(var(--efficiency-hue, 120) 90% 54% / 0.22), transparent 46%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 244, 0.88));
    box-shadow:
        0 18px 36px hsla(var(--efficiency-hue, 120), 70%, 28%, 0.22),
        0 0 0 1px hsla(var(--efficiency-hue, 120), 88%, 45%, 0.12) inset,
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body[data-theme="dark"] .trip-stat-card--efficiency {
    border-color: hsl(var(--efficiency-hue, 120) 88% 55% / 0.2);
    background:
        radial-gradient(circle at top left, hsl(var(--efficiency-hue, 120) 92% 60% / 0.28), transparent 34%),
        radial-gradient(circle at center right, hsl(calc(var(--efficiency-hue, 120) - 16) 96% 62% / 0.2), transparent 42%),
        radial-gradient(circle at bottom right, hsl(var(--efficiency-hue, 120) 90% 56% / 0.18), transparent 46%),
        linear-gradient(135deg, rgba(31, 44, 40, 0.96), rgba(24, 29, 34, 0.92));
    box-shadow:
        0 18px 38px hsla(var(--efficiency-hue, 120), 72%, 12%, 0.34),
        0 0 0 1px hsla(var(--efficiency-hue, 120), 88%, 60%, 0.12) inset,
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.trip-stat-card--efficiency.trip-stat-card--efficiency--empty {
    border-color: var(--line);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.36), transparent 38%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 243, 236, 0.88));
}

body[data-theme="dark"] .trip-stat-card--efficiency.trip-stat-card--efficiency--empty {
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 38%),
        linear-gradient(135deg, rgba(31, 34, 38, 0.96), rgba(26, 29, 33, 0.9));
    box-shadow:
        0 18px 38px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.trip-stat-card--efficiency.trip-stat-card--efficiency--empty .trip-stat-card__icon--efficiency {
    background: rgba(102, 112, 125, 0.14);
    color: var(--muted);
}

body[data-theme="dark"] .trip-stat-card--efficiency.trip-stat-card--efficiency--empty .trip-stat-card__icon--efficiency {
    color: #b8c0ca;
}

.trip-stat-card--efficiency::after {
    content: "";
    position: absolute;
    inset: auto -12% -45% 45%;
    height: 70%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 70%);
    pointer-events: none;
}

.trip-stat-card__top {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.trip-stat-card--efficiency .trip-stat-card__top {
    position: relative;
    z-index: 1;
}

.trip-stat-card__label,
.trip-summary-panel span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0;
}

.trip-stat-card strong {
    font-size: 1.65rem;
    line-height: 1.1;
}

.trip-stat-card--efficiency strong {
    position: relative;
    z-index: 1;
    font-size: 1.65rem;
    letter-spacing: 0;
}

.trip-stat-card p {
    margin: 0;
}

.trip-stat-card--hidden {
    display: none;
}

.trip-stat-card__details {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem 0.6rem;
    margin-top: 0.55rem;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.45;
}

.trip-stat-card__details span {
    min-width: 0;
}

.trip-debug-card {
    margin-top: 1rem;
    padding: 1.1rem 1.15rem 1.2rem;
    border-radius: 18px;
    border: 1px solid rgba(180, 76, 37, 0.18);
    background:
        radial-gradient(circle at top right, rgba(180, 76, 37, 0.12), transparent 30%),
        radial-gradient(circle at bottom left, rgba(29, 122, 84, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 244, 237, 0.88));
    box-shadow: 0 14px 30px rgba(25, 20, 16, 0.08);
    display: grid;
    gap: 1rem;
}

body[data-theme="dark"] .trip-debug-card {
    border-color: rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top right, rgba(180, 76, 37, 0.16), transparent 30%),
        radial-gradient(circle at bottom left, rgba(29, 122, 84, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(28, 31, 36, 0.96), rgba(22, 25, 29, 0.94));
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.trip-debug-card__header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
}

.trip-debug-card__header h2 {
    margin: 0.15rem 0 0;
}

.trip-debug-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.trip-debug-item {
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(102, 112, 125, 0.14);
}

body[data-theme="dark"] .trip-debug-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.07);
}

.trip-debug-item__label {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.trip-debug-item strong {
    font-size: 1.05rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.free-rate-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(248, 214, 112, 0.28), rgba(207, 161, 33, 0.26));
    border: 1px solid rgba(191, 144, 16, 0.45);
    color: #9b6d00;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 8px 18px rgba(191, 144, 16, 0.14);
}

.free-rate-badge i {
    color: #d8a617;
    font-size: 0.95em;
}

body[data-theme="dark"] .free-rate-badge {
    background: linear-gradient(135deg, rgba(248, 214, 112, 0.18), rgba(207, 161, 33, 0.16));
    border-color: rgba(231, 190, 60, 0.38);
    color: #f2cf73;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 8px 18px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .free-rate-badge i {
    color: #ffd86b;
}

.trip-stat-card__inline-link {
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.16em;
    cursor: pointer;
}

.trip-stat-card__inline-link:hover {
    transform: none;
    opacity: 0.84;
}

.trip-stat-card__inline-link:focus-visible {
    outline: 2px solid rgba(180, 76, 37, 0.34);
    outline-offset: 3px;
    border-radius: 4px;
}

.trip-stat-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: rgba(180, 76, 37, 0.1);
    color: var(--accent);
    flex: 0 0 auto;
}

.trip-stat-card__icon i {
    font-size: 1.05rem;
    line-height: 1;
}

.trip-stat-card__icon--journey {
    background: rgba(180, 76, 37, 0.12);
    color: var(--accent-dark);
}

.trip-stat-card__icon--cost {
    background: rgba(29, 122, 84, 0.1);
    color: var(--success);
}

.trip-stat-card__icon--battery {
    background: rgba(255, 191, 73, 0.18);
    color: #9a5b00;
}

body[data-theme="dark"] .trip-stat-card__icon--battery {
    color: #ffcf7a;
}

.trip-stat-card__icon--efficiency {
    width: 2.85rem;
    height: 2.85rem;
    background: hsl(var(--efficiency-hue, 120) 88% 52% / 0.18);
    color: hsl(var(--efficiency-hue, 120) 88% 35%);
}

body[data-theme="dark"] .trip-stat-card__icon--efficiency {
    background: hsl(var(--efficiency-hue, 120) 88% 54% / 0.15);
    color: hsl(var(--efficiency-hue, 120) 92% 74%);
}

.trip-stat-card__icon--speed,
.trip-stat-card__icon--max-speed {
    background: rgba(180, 76, 37, 0.12);
    color: var(--accent-dark);
}

.trip-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 0 0 1.5rem;
}

.trip-temperature-card {
    margin: 0 0 1.5rem;
    padding: 1.15rem;
}

.trip-chart-grid .trip-temperature-card {
    margin: 0;
}

.trip-temp-graph {
    border-radius: 20px;
    background:
        linear-gradient(115deg, rgba(29, 122, 84, 0.14), rgba(44, 96, 151, 0.08) 42%, rgba(180, 76, 37, 0.14)),
        rgba(255, 255, 255, 0.05);
}

.trip-temp-graph__legend-item--temp {
    color: #60a5fa;
}

.trip-temp-graph__legend-item--efficiency {
    color: #a78bfa;
}

.trip-temp-graph__svg {
    max-height: 340px;
}

.trip-temp-graph .charge-graph__grid {
    stroke: rgba(255, 255, 255, 0.09);
    stroke-dasharray: 6 12;
}

.trip-tools-section {
    margin: 0 0 1.5rem;
}

.trip-tools-card {
    display: grid;
    gap: 1rem;
    padding: 1.2rem;
    background:
        radial-gradient(circle at top left, rgba(180, 76, 37, 0.14), transparent 30%),
        radial-gradient(circle at bottom right, rgba(29, 122, 84, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 244, 237, 0.9));
}

body[data-theme="dark"] .trip-tools-card {
    background:
        radial-gradient(circle at top left, rgba(180, 76, 37, 0.16), transparent 30%),
        radial-gradient(circle at bottom right, rgba(29, 122, 84, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(28, 31, 36, 0.96), rgba(22, 25, 29, 0.94));
}

.trip-tools-card__header h2 {
    margin: 0;
}

.trip-tool-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 243, 234, 0.78));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

body[data-theme="dark"] .trip-tool-card {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.trip-tool-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    flex: 0 0 auto;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 35%),
        linear-gradient(145deg, rgba(180, 76, 37, 0.2), rgba(29, 122, 84, 0.14));
    color: var(--accent-dark);
    box-shadow:
        0 16px 30px rgba(25, 20, 16, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.trip-tool-card__icon i {
    font-size: 2rem;
    line-height: 1;
}

body[data-theme="dark"] .trip-tool-card__icon {
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.1), transparent 35%),
        linear-gradient(145deg, rgba(238, 123, 76, 0.18), rgba(79, 214, 155, 0.12));
    color: #ffd0bf;
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.trip-tool-card__body {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 0.85rem;
}

.trip-tool-card__body h3 {
    margin: 0;
    font-size: 1.18rem;
}

.trip-tool-card__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.trip-tool-card--compare {
    align-items: flex-start;
}

.trip-tool-card--compare .trip-tool-card__icon {
    margin-top: 0.15rem;
}

.trip-tool-result {
    flex: 1 1 260px;
    min-width: 0;
}

.trip-tool-result__pill {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(180, 76, 37, 0.18);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 243, 234, 0.9));
    box-shadow:
        0 12px 26px rgba(25, 20, 16, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    font-weight: 800;
}

body[data-theme="dark"] .trip-tool-result__pill {
    border-color: rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    box-shadow:
        0 12px 26px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.trip-tool-result[data-state="error"] .trip-tool-result__pill {
    border-color: rgba(162, 51, 51, 0.22);
    background:
        linear-gradient(135deg, rgba(255, 240, 240, 0.96), rgba(253, 230, 230, 0.9));
    color: var(--danger);
}

body[data-theme="dark"] .trip-tool-result[data-state="error"] .trip-tool-result__pill {
    background:
        linear-gradient(135deg, rgba(162, 51, 51, 0.18), rgba(162, 51, 51, 0.12));
    color: #ffb6b6;
}

.trip-tool-result[data-state="loading"] .trip-tool-result__pill {
    opacity: 0.9;
}

.trip-tool-result__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(180, 76, 37, 0.12);
    color: var(--accent-dark);
    flex: 0 0 auto;
}

.trip-tool-result[data-state="error"] .trip-tool-result__icon {
    background: rgba(162, 51, 51, 0.14);
    color: var(--danger);
}

.trip-tool-result__icon i {
    font-size: 0.95rem;
    line-height: 1;
}

.trip-tool-result__speed {
    font-size: 1.08rem;
    line-height: 1.2;
}

.trip-tool-result__confidence {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.trip-tool-result__confidence-group {
    margin-left: auto;
    display: grid;
    justify-items: end;
    gap: 0.18rem;
    max-width: min(24rem, 100%);
}

.trip-tool-result__confidence-group .trip-tool-result__confidence {
    margin-left: 0;
}

.trip-tool-result__confidence-reason {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: right;
}

.trip-compare-result {
    width: 100%;
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(44, 96, 151, 0.16);
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, rgba(44, 96, 151, 0.08), transparent 34%),
        radial-gradient(circle at bottom right, rgba(29, 122, 84, 0.08), transparent 30%),
        rgba(255, 255, 255, 0.84);
    box-shadow:
        0 14px 28px rgba(25, 20, 16, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

body[data-theme="dark"] .trip-compare-result {
    border-color: rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top left, rgba(44, 96, 151, 0.12), transparent 34%),
        radial-gradient(circle at bottom right, rgba(29, 122, 84, 0.1), transparent 30%),
        rgba(255, 255, 255, 0.04);
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.trip-compare-result[data-state="error"] {
    border-color: rgba(162, 51, 51, 0.2);
}

.trip-compare-result[data-state="loading"] {
    opacity: 0.96;
}

.trip-compare-result__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.trip-compare-result__heading {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.trip-compare-result__header h3 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.15;
}

.trip-compare-result__subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.trip-compare-result__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.82fr) minmax(0, 1fr);
    gap: 0.85rem;
    align-items: stretch;
}

.trip-compare-panel {
    display: grid;
    gap: 0.75rem;
    padding: 0.95rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
}

body[data-theme="dark"] .trip-compare-panel {
    background: rgba(255, 255, 255, 0.04);
}

.trip-compare-panel--current {
    border-color: rgba(29, 122, 84, 0.2);
}

.trip-compare-panel--other {
    border-color: rgba(180, 76, 37, 0.2);
}

.trip-compare-panel--delta {
    border-color: rgba(44, 96, 151, 0.18);
}

.trip-compare-panel__header {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.trip-compare-panel__eyebrow {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.trip-compare-panel__title {
    font-size: 1rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.trip-compare-panel__meta {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.trip-compare-stat-list {
    display: grid;
    gap: 0.55rem;
}

.trip-compare-stat {
    display: grid;
    gap: 0.18rem;
    padding: 0.72rem 0.78rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.78);
}

body[data-theme="dark"] .trip-compare-stat {
    background: rgba(255, 255, 255, 0.035);
}

.trip-compare-stat__label {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.trip-compare-stat__value {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.trip-compare-stat--positive .trip-compare-stat__value {
    color: var(--success);
}

.trip-compare-stat--negative .trip-compare-stat__value {
    color: var(--danger);
}

.trip-compare-stat--neutral .trip-compare-stat__value {
    color: var(--muted);
}

.trip-compare-stat--empty .trip-compare-stat__value {
    color: var(--muted);
}

.trip-compare-stat--unknown .trip-compare-stat__value {
    color: var(--muted);
}

.trip-compare-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font-weight: 700;
}

body[data-theme="dark"] .trip-compare-loading {
    background: rgba(255, 255, 255, 0.04);
}

.trip-compare-loading i {
    color: var(--accent);
}

.trip-compare-modal {
    width: min(720px, 100%);
    display: grid;
    gap: 1rem;
}

.trip-compare-modal h2 {
    margin: 0;
}

.trip-compare-modal__form {
    display: grid;
    gap: 0.9rem;
}

.trip-compare-modal__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.trip-compare-modal__actions .button {
    width: 100%;
}

.efficiency-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.8rem;
    min-width: 5.25rem;
    border-radius: 999px;
    border: 1px solid hsl(var(--efficiency-hue, 120) 88% 50% / 0.28);
    background:
        linear-gradient(
            135deg,
            hsl(var(--efficiency-hue, 120) 90% 54% / 0.26),
            hsl(calc(var(--efficiency-hue, 120) - 16) 88% 52% / 0.14)
        );
    color: hsl(var(--efficiency-hue, 120) 88% 28%);
    font-weight: 800;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.56),
        0 8px 18px hsl(var(--efficiency-hue, 120) 80% 40% / 0.16);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
    white-space: nowrap;
}

.efficiency-pill--large {
    padding: 0.5rem 0.9rem;
    min-width: 6.2rem;
    font-size: 1.05rem;
}

body[data-theme="dark"] .efficiency-pill {
    border-color: hsl(var(--efficiency-hue, 120) 88% 56% / 0.22);
    color: hsl(var(--efficiency-hue, 120) 92% 79%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 10px 22px hsl(var(--efficiency-hue, 120) 70% 12% / 0.2);
    text-shadow: none;
}

.efficiency-pill--empty {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.44);
    color: var(--muted);
    box-shadow: none;
}

body[data-theme="dark"] .efficiency-pill--empty {
    background: rgba(255, 255, 255, 0.06);
}

.trip-fact-list {
    display: grid;
    gap: 0.75rem;
}

.trip-fact-list div {
    display: grid;
    gap: 0.18rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.trip-fact-list span {
    color: var(--muted);
    font-size: 0.86rem;
}

.trip-fact-list strong {
    font-size: 1rem;
}

.trip-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.trip-summary-panel {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
}

body[data-theme="dark"] .trip-summary-panel {
    background: rgba(255, 255, 255, 0.055);
}

.trip-summary-panel strong {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
}

.trip-summary-panel p {
    margin: 0;
    color: var(--muted);
}

.profile-vehicle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.profile-vehicle-grid > .muted {
    grid-column: 1 / -1;
}

.profile-vehicle-card {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    display: grid;
    gap: 0.9rem;
}

body[data-theme="dark"] .profile-vehicle-card {
    background: rgba(255, 255, 255, 0.055);
}

.profile-vehicle-card__header strong {
    display: block;
    margin-bottom: 0.2rem;
}

.profile-vehicle-card__header span {
    color: var(--muted);
    font-size: 0.88rem;
}

.field-help {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 400;
}

.profile-section-divider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 1.5rem 0;
}

.two-factor-setup {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.two-factor-setup__qr {
    display: grid;
    justify-items: center;
    gap: 0.65rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #ffffff;
}

.two-factor-setup__qr svg {
    display: block;
    width: 280px;
    max-width: 100%;
    height: auto;
}

.two-factor-setup__details {
    display: grid;
    gap: 0.9rem;
    min-width: 0;
}

.two-factor-secret {
    display: block;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(29, 35, 44, 0.05);
    border: 1px solid var(--line);
    overflow-wrap: anywhere;
    word-break: break-word;
}

body[data-theme="dark"] .two-factor-secret {
    background: rgba(255, 255, 255, 0.04);
}

.two-factor-setup__form {
    max-width: 26rem;
}

.trip-trace-card {
    min-height: 0;
}

.trip-trace-card > summary {
    list-style: none;
    cursor: pointer;
}

.trip-trace-card > summary::-webkit-details-marker {
    display: none;
}

.trip-trace-card[open] > summary {
    margin-bottom: 0.8rem;
}

.trip-trace-card__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.trip-trace-card__summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--muted);
    transition: transform 0.2s ease;
}

.trip-trace-card[open] .trip-trace-card__summary::after {
    transform: rotate(180deg);
}

.trip-trace-card[open] .trip-trace-history {
    animation: tripTraceReveal 0.28s ease-out both;
}

.trip-trace-list {
    display: grid;
    gap: 0.75rem;
    max-height: 300px;
    overflow: auto;
    padding-right: 0.2rem;
}

@keyframes tripTraceReveal {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trip-trace-item {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

body[data-theme="dark"] .trip-trace-item {
    background: rgba(255, 255, 255, 0.045);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.trip-trace-item__time {
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.trip-trace-item__coords {
    color: var(--muted);
    margin-bottom: 0.55rem;
    font-variant-numeric: tabular-nums;
}

.trip-trace-item__meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.trip-trace-item__meta span {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: rgba(180, 76, 37, 0.08);
    color: var(--accent-dark);
    font-size: 0.84rem;
    font-weight: 600;
}

.trip-route-marker {
    background: transparent;
    border: none;
}

.trip-route-marker span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 0.55rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(29, 35, 44, 0.24);
    border: 2px solid rgba(255, 255, 255, 0.88);
}

.trip-route-marker--start span {
    background: linear-gradient(135deg, #1d7a54, #2fa36f);
}

.trip-route-marker--end span {
    background: linear-gradient(135deg, #b44c25, #7a2d12);
}

.trip-route-camera-marker {
    background: transparent;
    border: none;
}

.trip-route-camera-marker span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    color: #9f1d1d;
    background: rgba(254, 226, 226, 0.92);
    border: 2px solid rgba(248, 113, 113, 0.72);
    box-shadow: 0 8px 20px rgba(127, 29, 29, 0.22);
    font-size: 0.86rem;
}

.trip-camera-popup {
    display: grid;
    gap: 0.22rem;
    min-width: 11rem;
    color: #1f2937;
}

.trip-camera-popup strong {
    color: #9f1d1d;
    font-size: 1rem;
}

.trip-camera-popup span {
    color: #4b5563;
    font-weight: 700;
}

.trip-camera-popup__speeds {
    display: grid;
    gap: 0.18rem;
    margin: 0.25rem 0 0;
}

.trip-camera-popup__speeds div {
    display: grid;
    grid-template-columns: minmax(5.8rem, 1fr) auto;
    gap: 0.65rem;
    align-items: baseline;
}

.trip-camera-popup__speeds dt,
.trip-camera-popup__speeds dd {
    margin: 0;
}

.trip-camera-popup__speeds dt {
    color: #4b5563;
    font-size: 0.78rem;
    font-weight: 800;
}

.trip-camera-popup__speeds dd {
    color: #111827;
    font-size: 0.82rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.trip-camera-popup__reason {
    color: #374151 !important;
    max-width: 16rem;
    font-size: 0.78rem;
    line-height: 1.35;
}

.trip-camera-popup__meta {
    color: #4b5563 !important;
    font-size: 0.75rem;
}

.trip-telemetry-popup {
    display: grid;
    gap: 0.18rem;
    min-width: 9.5rem;
    color: #1f2937;
}

.trip-telemetry-popup strong {
    color: #111827;
    font-size: 1rem;
}

.trip-telemetry-popup span {
    color: #4b5563;
    font-weight: 700;
}

.trip-telemetry-popup__meta {
    color: #6b7280 !important;
    font-size: 0.75rem;
}

.roadtrip-builder {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(320px, 1.28fr);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1.5rem;
    padding: 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(29, 122, 84, 0.12), rgba(180, 76, 37, 0.08)),
        var(--surface);
    box-shadow: var(--shadow);
}

.roadtrip-builder__intro {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.roadtrip-builder__intro h2,
.roadtrip-card h2,
.roadtrip-stat-panel h2,
.roadtrip-map-panel h2 {
    margin: 0 0 0.35rem;
}

.roadtrip-builder__intro p {
    margin: 0;
    line-height: 1.5;
}

.roadtrip-builder__icon,
.roadtrip-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: rgba(29, 122, 84, 0.12);
    color: var(--success);
    flex: 0 0 auto;
}

.roadtrip-builder__filter,
.roadtrip-builder__form {
    display: grid;
    gap: 0.85rem;
}

.roadtrip-builder__filter {
    align-content: start;
}

.roadtrip-builder__form {
    grid-column: 1 / -1;
    grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.1fr) minmax(240px, 1.1fr) auto;
    align-items: end;
}

.roadtrip-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.roadtrip-card {
    cursor: pointer;
    display: grid;
    gap: 1rem;
    padding: 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.roadtrip-card:hover {
    transform: translateY(-2px);
    border-color: rgba(180, 76, 37, 0.24);
}

.roadtrip-card__top {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.roadtrip-card__top p,
.roadtrip-card__range {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.roadtrip-card__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.roadtrip-card__metrics span,
.roadtrip-breakdown__item {
    display: grid;
    gap: 0.18rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.48);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.roadtrip-card__metrics strong,
.roadtrip-breakdown__item strong {
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.15;
    text-transform: none;
    letter-spacing: 0;
}

.roadtrip-empty {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    gap: 0.55rem;
    min-height: 220px;
    padding: 2rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
    text-align: center;
}

.roadtrip-empty i {
    font-size: 2rem;
    color: var(--accent);
}

.roadtrip-empty strong {
    color: var(--text);
    font-size: 1.2rem;
}

.roadtrip-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.65fr);
    gap: 1.25rem;
    align-items: stretch;
    margin-bottom: 1.25rem;
}

.roadtrip-map-panel,
.roadtrip-stat-panel {
    padding: 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.roadtrip-map-panel {
    display: flex;
    flex-direction: column;
}

.roadtrip-stat-grid {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
}

.roadtrip-breakdown {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.roadtrip-breakdown--no-charging {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.roadtrip-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    font-weight: 800;
    white-space: nowrap;
}

.roadtrip-type-pill--trip {
    background: rgba(29, 122, 84, 0.12);
    color: var(--success);
}

.roadtrip-type-pill--charge {
    background: rgba(180, 76, 37, 0.12);
    color: var(--accent-dark);
}

.roadtrip-map-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 0.55rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 22px rgba(29, 35, 44, 0.24);
}

.roadtrip-map-marker--start {
    background: linear-gradient(135deg, #1d7a54, #2fa36f);
}

.roadtrip-map-marker--trip {
    background: linear-gradient(135deg, #b44c25, #7a2d12);
}

.roadtrip-map-marker--charge {
    background: linear-gradient(135deg, #2c6097, #153b68);
}

.roadtrip-legend-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    display: inline-block;
}

.roadtrip-legend-dot--charge {
    background: #2c6097;
}

body[data-theme="dark"] .roadtrip-card__metrics span,
body[data-theme="dark"] .roadtrip-breakdown__item {
    background: rgba(255, 255, 255, 0.045);
}

.muted,
.small-text {
    color: var(--muted);
}

.small-text {
    font-size: 0.9rem;
}

.flash {
    border-radius: 18px;
    padding: 0.95rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--line);
}

.flash--success {
    background: rgba(79, 214, 155, 0.12);
    color: var(--success);
}

.flash--error {
    background: rgba(206, 68, 68, 0.12);
    color: var(--danger);
}

.stack-form {
    display: grid;
    gap: 1rem;
}

.grid-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-form .full-width {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 0.4rem;
    font-weight: 600;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

[hidden] {
    display: none !important;
}

input,
select,
textarea,
code {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    background: var(--surface-strong);
    color: var(--text);
    font: inherit;
}

code {
    display: block;
    overflow-wrap: anywhere;
    font-size: 0.9rem;
}

.inline-check {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.inline-check input {
    width: auto;
}

.section-break {
    border-top: 1px solid var(--line);
    margin-top: 0.5rem;
}

.is-hidden {
    display: none !important;
}

.table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.table-scroll {
    max-width: 100%;
    overflow-x: auto;
}

.table th,
.table td {
    text-align: left;
    padding: 0.85rem 0.6rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.table tbody tr.is-clickable {
    cursor: pointer;
    transition: background 0.18s ease;
}

.table tbody tr.is-clickable:hover {
    background: rgba(180, 76, 37, 0.06);
}

.table td {
    overflow-wrap: anywhere;
}

.trip-table__location-cell .trip-table__time {
    display: block;
    font-weight: 800;
    line-height: 1.15;
}

.trip-table__location-cell small {
    display: block;
    margin-top: 0.25rem;
    line-height: 1.25;
}

.charging-table__cost {
    white-space: nowrap;
    min-width: 5.5rem;
    text-align: right;
}

.charging-table thead th {
    vertical-align: top;
}

.charging-table thead .charging-table__cost {
    text-align: left;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1.1rem;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.pagination__summary {
    color: var(--muted);
    font-size: 0.95rem;
}

.pagination__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    justify-content: flex-end;
}

.pagination__pages {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.pagination__link,
.pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-soft);
    color: var(--text);
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1;
}

.pagination__link {
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.pagination__link:hover,
.pagination__link:focus-visible {
    background: var(--bg);
    border-color: rgba(180, 76, 37, 0.5);
}

.pagination__link--current {
    background: linear-gradient(135deg, #0e5b4f, #1d7a54);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 24px rgba(14, 91, 79, 0.18);
}

.pagination__link--disabled {
    opacity: 0.45;
}

.vehicle-list,
.point-list {
    display: grid;
    gap: 0.8rem;
}

.vehicle-list__item,
.point-list__item,
.vehicle-pair-card {
    display: grid;
    gap: 0.45rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--bg-soft);
}

.vehicle-pair-card__pairing {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1rem;
    align-items: start;
}

.vehicle-pair-card__details {
    display: grid;
    gap: 0.75rem;
}

.wizard-credential-output {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
}

.wizard-credential-output__token {
    width: 100%;
    min-height: 180px;
}

.wizard-credential-output__vins {
    margin-top: 0;
}

.pairing-qr-block {
    display: grid;
    gap: 0.6rem;
}

.pairing-qr {
    display: grid;
    place-items: center;
    width: 220px;
    min-height: 220px;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-strong);
}

.pairing-qr canvas,
.pairing-qr img {
    display: block;
    width: 100%;
    height: auto;
}

.pairing-qr__caption {
    margin: 0;
    text-align: center;
}

.wizard-note {
    margin: 1rem 0;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(180, 76, 37, 0.08);
}

.wizard-note--success {
    background: rgba(79, 214, 155, 0.12);
}

.pairing-flow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 1rem 0 1.25rem;
}

.pairing-flow__step {
    display: grid;
    gap: 0.45rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(180, 76, 37, 0.05));
}

.pairing-flow__step span {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(180, 76, 37, 0.14);
    color: var(--accent);
    font-weight: 800;
}

.pairing-flow__step p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.vehicle-list__item {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.status-pill--active,
.status-pill--synced {
    background: rgba(79, 214, 155, 0.16);
    color: var(--success);
}

.status-pill--pending,
.status-pill--degraded {
    background: rgba(255, 188, 74, 0.18);
    color: #ad6d00;
}

.status-pill--subtle {
    background: rgba(102, 112, 125, 0.12);
    color: var(--muted);
}

body[data-theme="dark"] .status-pill--subtle {
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
}

.status-pill--offline,
.status-pill--error,
.status-pill--disconnected {
    background: rgba(206, 68, 68, 0.16);
    color: var(--danger);
}

.wizard {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.25rem;
}

.wizard__steps {
    display: grid;
    align-content: start;
    gap: 0.6rem;
    padding: 1rem;
}

.wizard__step {
    display: grid;
    grid-template-columns: 36px 1fr;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    border: 1px solid transparent;
    background: transparent;
    text-align: left;
    color: var(--text);
}

.wizard__step span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(180, 76, 37, 0.12);
    color: var(--accent);
    font-weight: 800;
}

.wizard__step.is-current {
    background: rgba(180, 76, 37, 0.1);
    border-color: rgba(180, 76, 37, 0.16);
}

.wizard__step.is-locked {
    opacity: 0.42;
    cursor: not-allowed;
}

.wizard__step:disabled {
    pointer-events: none;
}

.wizard__content {
    min-width: 0;
}

.wizard-panel {
    display: none;
    padding: 2rem;
}

.wizard-panel.is-current {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.75rem;
}

.wizard-panel > * {
    margin: 0;
}

.wizard-panel > .button,
.wizard-panel > a.button {
    align-self: flex-start;
}

.wizard-panel > .card,
.wizard-panel > .wizard-note,
.wizard-panel > .flash,
.wizard-panel > .vehicle-list,
.wizard-panel > .pairing-flow,
.wizard-panel > .vehicle-pair-card,
.wizard-panel > #teslaStatusPanel {
    width: 100%;
}

.check-list,
.status-list {
    margin: 0;
    padding-left: 1.2rem;
}

.status-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
}

.good {
    color: var(--success);
}

.bad {
    color: var(--danger);
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 1rem;
    align-items: end;
    max-width: 100%;
    position: relative;
    z-index: 2;
}

.filter-form__range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.filter-select {
    position: relative;
}

.filter-select.is-open {
    z-index: 20;
}

.filter-select__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(180, 76, 37, 0.18);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 242, 232, 0.88));
    box-shadow: 0 12px 24px rgba(57, 44, 29, 0.08);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.filter-select__trigger:hover,
.filter-select.is-open .filter-select__trigger {
    border-color: rgba(180, 76, 37, 0.35);
    box-shadow: 0 16px 28px rgba(57, 44, 29, 0.12);
}

.filter-select__trigger i {
    color: var(--accent);
    transition: transform 0.18s ease;
}

.filter-select.is-open .filter-select__trigger i {
    transform: rotate(180deg);
}

.filter-select__value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-select__menu {
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    right: 0;
    z-index: 12;
    display: grid;
    gap: 0.45rem;
    padding: 0.65rem;
    border: 1px solid rgba(180, 76, 37, 0.16);
    border-radius: 20px;
    background:
        radial-gradient(circle at top left, rgba(180, 76, 37, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 246, 238, 0.95));
    box-shadow: 0 22px 44px rgba(57, 44, 29, 0.16);
}

.filter-select__menu[hidden] {
    display: none !important;
}

.filter-select__option {
    width: 100%;
    padding: 0.85rem 0.95rem;
    border: 1px solid transparent;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.filter-select__option:hover,
.filter-select__option.is-selected {
    border-color: rgba(180, 76, 37, 0.24);
    background:
        linear-gradient(180deg, rgba(180, 76, 37, 0.12), rgba(180, 76, 37, 0.06)),
        rgba(255, 255, 255, 0.92);
}

.filter-select__option.is-selected::after {
    content: "Selected";
    float: right;
    color: var(--accent);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.filter-form__actions {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.map-placeholder {
    display: grid;
    place-items: center;
    min-height: 180px;
    border-radius: 18px;
    border: 1px dashed var(--line);
    background: linear-gradient(135deg, rgba(180, 76, 37, 0.08), rgba(79, 214, 155, 0.08));
    margin-bottom: 1rem;
}

.trip-route-card {
    margin-bottom: 1.5rem;
}

.trip-route-map {
    position: relative;
    z-index: 0;
    isolation: isolate;
    height: 420px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    flex: 1 1 auto;
}

.trip-route-map--hero {
    height: auto;
    min-height: 420px;
    border-radius: 22px;
}

.roadtrip-route-map {
    min-height: 560px;
}

body[data-theme="dark"] .trip-route-map {
    background: #0c1114;
}

body[data-theme="dark"] .trip-route-map .leaflet-tile {
    filter: invert(0.92) hue-rotate(175deg) brightness(0.72) contrast(0.98) saturate(0.9);
}

body[data-theme="dark"] .trip-route-map .leaflet-control-attribution {
    background: rgba(237, 242, 247, 0.82);
}

body[data-theme="dark"] .filter-select__trigger {
    border-color: rgba(238, 123, 76, 0.16);
    background:
        linear-gradient(180deg, rgba(33, 38, 44, 0.94), rgba(24, 28, 33, 0.92));
    box-shadow: none;
}

body[data-theme="dark"] .filter-select__menu {
    border-color: rgba(238, 123, 76, 0.14);
    background:
        radial-gradient(circle at top left, rgba(238, 123, 76, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(27, 31, 36, 0.98), rgba(20, 24, 28, 0.96));
    box-shadow: 0 24px 44px rgba(0, 0, 0, 0.32);
}

body[data-theme="dark"] .filter-select__option {
    background: rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .filter-select__option:hover,
body[data-theme="dark"] .filter-select__option.is-selected {
    border-color: rgba(238, 123, 76, 0.18);
    background:
        linear-gradient(180deg, rgba(238, 123, 76, 0.14), rgba(238, 123, 76, 0.06)),
        rgba(255, 255, 255, 0.05);
}

body[data-theme="dark"] .trip-route-map .leaflet-control-zoom a {
    background: rgba(237, 242, 247, 0.9);
    color: #111417;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(460px, 1.18fr) minmax(0, 0.82fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.dashboard-vehicle,
.dashboard-kpi,
.dashboard-panel,
.dashboard-map-panel,
.dashboard-charge-pie-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.dashboard-vehicle {
    position: relative;
    padding: 1.35rem;
    overflow: hidden;
}

.dashboard-vehicle--colour-hero {
    --vehicle-colour-rgb: 198, 16, 35;
    --vehicle-colour-deep-rgb: 76, 7, 17;
    min-height: 360px;
    color: #f8fafc;
    border-color: rgba(var(--vehicle-colour-rgb), 0.44);
    background:
        radial-gradient(circle at 84% 30%, rgba(var(--vehicle-colour-rgb), 0.62), transparent 34%),
        linear-gradient(132deg, rgba(var(--vehicle-colour-deep-rgb), 0.98), rgba(var(--vehicle-colour-deep-rgb), 0.92) 38%, rgba(var(--vehicle-colour-rgb), 0.82));
    box-shadow: 0 28px 70px rgba(var(--vehicle-colour-deep-rgb), 0.36);
}

.dashboard-vehicle::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(29, 122, 84, 0.12), transparent 42%),
        linear-gradient(315deg, rgba(180, 76, 37, 0.14), transparent 46%);
    pointer-events: none;
}

.dashboard-vehicle--colour-hero::before {
    background-image:
        linear-gradient(90deg, rgba(var(--vehicle-colour-deep-rgb), 0.94), rgba(var(--vehicle-colour-deep-rgb), 0.68) 38%, rgba(var(--vehicle-colour-rgb), 0.18) 74%),
        linear-gradient(135deg, rgba(var(--vehicle-colour-deep-rgb), 0.58), rgba(var(--vehicle-colour-rgb), 0.9)),
        url("../vehicle-images/car-background.png");
    background-position: center, center, right 45%;
    background-repeat: no-repeat;
    background-size: cover, cover, auto 70%;
    background-blend-mode: normal, color, luminosity;
    opacity: 0.94;
}

.dashboard-vehicle > * {
    position: relative;
    z-index: 1;
}

.dashboard-vehicle__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
}

.dashboard-vehicle__header h1 {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 3.1rem);
    line-height: 1;
}

.dashboard-vehicle--colour-hero .eyebrow {
    color: #ffb45f;
    text-shadow: 0 1px 16px rgba(var(--vehicle-colour-rgb), 0.45);
}

.dashboard-vehicle--colour-hero .dashboard-vehicle__header h1,
.dashboard-vehicle--colour-hero .dashboard-vehicle__header .muted {
    color: #f8fafc;
    text-shadow: 0 2px 22px rgba(0, 0, 0, 0.28);
}

.dashboard-vehicle--colour-hero .dashboard-vehicle__header .muted {
    opacity: 0.78;
}

.dashboard-car-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    min-height: 245px;
    margin: 1.25rem 0 0;
    padding: 1rem;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background:
        radial-gradient(circle at 50% 80%, rgba(29, 35, 44, 0.18), transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.1));
    overflow: hidden;
}

.dashboard-vehicle--colour-hero .dashboard-car-stage {
    min-height: 170px;
    margin-top: 1rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

.dashboard-vehicle--colour-hero .dashboard-car-stage::before {
    min-height: 128px;
}

.dashboard-vehicle--colour-hero .dashboard-car-stage::after {
    content: none;
}

.dashboard-car-stage::before {
    content: "";
    display: block;
    min-height: 210px;
    flex: 1 1 auto;
}

body[data-theme="dark"] .dashboard-car-stage {
    border-color: rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 50% 80%, rgba(238, 123, 76, 0.16), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}

body[data-theme="dark"] .dashboard-vehicle--colour-hero .dashboard-car-stage {
    border: 0;
    background: transparent;
}

.dashboard-car-stage img {
    position: absolute;
    left: 50%;
    top: 1rem;
    display: block;
    width: min(92%, 440px);
    max-height: 230px;
    object-fit: contain;
    filter: drop-shadow(0 26px 30px rgba(29, 35, 44, 0.22));
    transform: translateX(-50%);
    z-index: 1;
}

body[data-theme="dark"] .dashboard-car-stage img {
    filter: drop-shadow(0 28px 34px rgba(0, 0, 0, 0.52));
}

.dashboard-car-stage__empty {
    position: absolute;
    inset: 1rem 1rem auto;
    display: grid;
    gap: 0.6rem;
    justify-items: center;
    color: var(--muted);
    font-weight: 800;
}

.dashboard-car-stage__empty i {
    font-size: 3rem;
    color: var(--accent);
}

.dashboard-vehicle__stats {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    z-index: 2;
    margin-top: 0.9rem;
}

.dashboard-vehicle-stat {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "icon label"
        "icon value";
    column-gap: 0.7rem;
    align-items: center;
    padding: 0.88rem 0.9rem 0.92rem;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.46));
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 16px 34px rgba(29, 35, 44, 0.14);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.dashboard-vehicle--colour-hero .dashboard-vehicle-stat {
    border-radius: 18px;
    background: #191f21;
    border-color: rgba(3, 10, 9, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    backdrop-filter: none;
}

.dashboard-vehicle-stat::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.35rem;
    background: var(--stat-color, var(--accent));
}

body[data-theme="dark"] .dashboard-vehicle-stat {
    background:
        linear-gradient(135deg, rgba(17, 20, 23, 0.78), rgba(17, 20, 23, 0.58));
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

body[data-theme="dark"] .dashboard-vehicle--colour-hero .dashboard-vehicle-stat {
    background: #191f21;
    border-color: rgba(3, 10, 9, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    backdrop-filter: none;
}

.dashboard-vehicle-stat--soc {
    --stat-color: #1d7a54;
}

.dashboard-vehicle-stat--soc.is-charging strong {
    display: flex;
    align-items: center;
    min-height: 1.4rem;
}

.dashboard-vehicle--colour-hero .dashboard-vehicle-stat--soc.is-charging {
    border-color: rgba(79, 214, 155, 0.48);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 0 0 1px rgba(79, 214, 155, 0.18);
}

.dashboard-charging-battery {
    position: relative;
    display: inline-block;
    width: 3.15rem;
    height: 1.32rem;
    border: 0.14rem solid #ffffff;
    border-radius: 0.32rem;
    overflow: hidden;
    box-shadow:
        inset 0 0 0 0.08rem rgba(79, 214, 155, 0.2),
        0 0 16px rgba(79, 214, 155, 0.22);
}

.dashboard-charging-battery::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -0.36rem;
    width: 0.2rem;
    height: 0.62rem;
    border-radius: 0 0.18rem 0.18rem 0;
    background: #ffffff;
    transform: translateY(-50%);
}

.dashboard-charging-battery__fill {
    position: absolute;
    inset: 0.16rem auto 0.16rem 0.16rem;
    width: var(--battery-fill-start, 0%);
    border-radius: 0.18rem;
    background: linear-gradient(90deg, #4fd69b, #8af7c2);
    box-shadow: 0 0 14px rgba(79, 214, 155, 0.4);
    will-change: width, opacity;
    animation: dashboardBatteryFill 4.125s ease-in-out infinite;
}

@keyframes dashboardBatteryFill {
    0% {
        width: var(--battery-fill-start, 0%);
        opacity: 1;
    }
    96.5% {
        width: calc(100% - 0.32rem);
        opacity: 1;
    }
    100% {
        width: calc(100% - 0.32rem);
        opacity: 1;
    }
}

.dashboard-vehicle-stat--odometer {
    --stat-color: #2c6097;
}

.dashboard-vehicle-stat--seen {
    --stat-color: #b44c25;
}

.dashboard-vehicle-stat__icon {
    grid-area: icon;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--stat-color) 17%, transparent);
    color: var(--stat-color);
}

.dashboard-vehicle-stat__icon i {
    font-size: 0.9rem;
}

.dashboard-vehicle-stat__label,
.dashboard-kpi span,
.dashboard-panel__meta {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.dashboard-vehicle-stat__label {
    grid-area: label;
    min-width: 0;
    font-size: clamp(0.66rem, 0.95vw, 0.76rem);
    line-height: 1.1;
}

.dashboard-vehicle__stats strong {
    grid-area: value;
    display: block;
    margin-top: 0.24rem;
    color: var(--text);
    font-size: clamp(1.02rem, 1.28vw, 1.34rem);
    line-height: 1.05;
    letter-spacing: 0;
    overflow-wrap: normal;
    word-break: keep-all;
}

.dashboard-vehicle--colour-hero .dashboard-vehicle-stat__label {
    color: rgba(248, 250, 252, 0.72);
}

.dashboard-vehicle--colour-hero .dashboard-vehicle__stats strong {
    color: #ffffff;
}

.dashboard-vehicle-stat--odometer strong,
.dashboard-vehicle-stat--seen strong {
    font-size: clamp(0.96rem, 1.14vw, 1.18rem);
    line-height: 1.12;
}

.dashboard-live-charge {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 0.75rem;
    margin-top: 1.15rem;
    padding: 0.85rem;
    border-radius: 18px;
    border: 2px solid rgba(79, 214, 155, 0.78);
    background: #10251e;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 0 1px rgba(5, 20, 15, 0.16),
        0 0 0 0.12rem rgba(79, 214, 155, 0.15);
    color: #ffffff;
}

.dashboard-live-charge.is-active {
    animation: dashboardLiveChargePulse 2.35s ease-in-out infinite;
}

.dashboard-live-charge__header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.dashboard-live-charge__header > span:last-child {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
}

.dashboard-live-charge__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 14px;
    flex: 0 0 auto;
    color: #4fd69b;
    background: rgba(79, 214, 155, 0.14);
}

.dashboard-live-charge__header strong {
    font-size: 0.95rem;
    line-height: 1.12;
}

.dashboard-live-charge__header small {
    color: rgba(248, 250, 252, 0.68);
    font-size: 0.78rem;
    font-weight: 800;
}

.dashboard-live-charge__metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}

.dashboard-live-charge__metric {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
    padding: 0.62rem 0.68rem;
    border-radius: 14px;
    border: 1px solid rgba(79, 214, 155, 0.18);
    background: #263b34;
}

.dashboard-live-charge__metric small {
    color: rgba(248, 250, 252, 0.66);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
}

.dashboard-live-charge__metric strong {
    color: #ffffff;
    font-size: clamp(0.96rem, 1.16vw, 1.13rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

@keyframes dashboardLiveChargePulse {
    0%,
    100% {
        border-color: rgba(79, 214, 155, 0.72);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.08),
            inset 0 0 0 1px rgba(5, 20, 15, 0.16),
            0 0 0 0.08rem rgba(79, 214, 155, 0.14),
            0 0 18px rgba(79, 214, 155, 0.22);
    }
    50% {
        border-color: rgba(92, 255, 185, 1);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.16),
            inset 0 0 0 1px rgba(5, 20, 15, 0.12),
            0 0 0 0.48rem rgba(79, 214, 155, 0.22),
            0 0 40px rgba(79, 214, 155, 0.46);
    }
}

.dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-kpi {
    padding: 1.2rem;
    display: grid;
    align-content: space-between;
    min-height: 145px;
}

.dashboard-kpi strong {
    display: block;
    margin: 0.45rem 0;
    font-size: clamp(1.65rem, 4vw, 2.45rem);
    line-height: 1;
}

.dashboard-kpi small {
    color: var(--muted);
    font-weight: 700;
    line-height: 1.35;
}

.dashboard-grid {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.dashboard-map-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    align-items: stretch;
}

.dashboard-grid--analytics {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(280px, 0.72fr);
}

.dashboard-grid--lower {
    grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
}

.dashboard-grid--activity {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vehicle-page-header {
    align-items: flex-start;
}

.vehicle-page-header__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.vehicle-detail-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(220px, 0.72fr);
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top left, rgba(29, 122, 84, 0.14), transparent 34%),
        radial-gradient(circle at top right, rgba(180, 76, 37, 0.14), transparent 30%),
        var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.vehicle-detail-hero--colour-hero {
    --vehicle-colour-rgb: 198, 16, 35;
    --vehicle-colour-deep-rgb: 76, 7, 17;
    color: #f8fafc;
    border-color: rgba(var(--vehicle-colour-rgb), 0.44);
    background:
        radial-gradient(circle at 84% 30%, rgba(var(--vehicle-colour-rgb), 0.62), transparent 34%),
        linear-gradient(132deg, rgba(var(--vehicle-colour-deep-rgb), 0.98), rgba(var(--vehicle-colour-deep-rgb), 0.92) 38%, rgba(var(--vehicle-colour-rgb), 0.82));
    box-shadow: 0 28px 70px rgba(var(--vehicle-colour-deep-rgb), 0.36);
}

.vehicle-detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(29, 122, 84, 0.08), transparent 42%),
        linear-gradient(315deg, rgba(180, 76, 37, 0.12), transparent 48%);
    pointer-events: none;
}

.vehicle-detail-hero--colour-hero::before {
    background-image:
        linear-gradient(90deg, rgba(var(--vehicle-colour-deep-rgb), 0.94), rgba(var(--vehicle-colour-deep-rgb), 0.68) 38%, rgba(var(--vehicle-colour-rgb), 0.18) 74%),
        linear-gradient(135deg, rgba(var(--vehicle-colour-deep-rgb), 0.58), rgba(var(--vehicle-colour-rgb), 0.9)),
        url("../vehicle-images/car-background.png");
    background-position: center, center, right 45%;
    background-repeat: no-repeat;
    background-size: cover, cover, auto 70%;
    background-blend-mode: normal, color, luminosity;
    opacity: 0.94;
}

.vehicle-detail-hero > * {
    position: relative;
    z-index: 1;
}

.vehicle-detail-hero__content {
    display: grid;
    gap: 0.75rem;
    align-content: start;
}

.vehicle-detail-hero__flags {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.vehicle-detail-hero__content h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3.4vw, 2.9rem);
    line-height: 0.98;
    letter-spacing: -0.03em;
}

.vehicle-detail-hero--colour-hero .vehicle-detail-hero__content h2,
.vehicle-detail-hero--colour-hero .muted,
.vehicle-detail-hero--colour-hero .status-pill {
    color: #f8fafc;
}

.vehicle-detail-hero--colour-hero .muted {
    opacity: 0.78;
}

.vehicle-detail-hero__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.vehicle-summary-chip {
    display: grid;
    gap: 0.22rem;
    padding: 0.9rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
    font-variant-numeric: tabular-nums;
}

body[data-theme="dark"] .vehicle-summary-chip {
    background: rgba(255, 255, 255, 0.055);
}

.vehicle-summary-chip span,
.vehicle-health-item span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.vehicle-summary-chip strong {
    font-size: 1.05rem;
    line-height: 1.2;
}

.vehicle-detail-hero__actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.vehicle-detail-hero__media {
    display: grid;
    gap: 0.55rem;
    align-content: start;
    justify-items: stretch;
}

.vehicle-detail-hero__art {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    min-height: 245px;
    margin: 1.25rem 0 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        radial-gradient(circle at 50% 80%, rgba(29, 35, 44, 0.18), transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.1));
    overflow: hidden;
}

.vehicle-detail-hero--colour-hero .vehicle-detail-hero__art {
    min-height: 170px;
    margin-top: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.vehicle-detail-hero--colour-hero .vehicle-detail-hero__art::before {
    min-height: 128px;
}

body[data-theme="dark"] .vehicle-detail-hero__art {
    border-color: rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 50% 80%, rgba(238, 123, 76, 0.16), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}

body[data-theme="dark"] .vehicle-detail-hero--colour-hero .vehicle-detail-hero__art {
    border: 0;
    background: transparent;
}

.vehicle-detail-hero__art::before {
    content: "";
    display: block;
    min-height: 210px;
    flex: 1 1 auto;
}

.vehicle-detail-hero__art img {
    position: absolute;
    left: 50%;
    top: 1rem;
    display: block;
    width: min(92%, 440px);
    max-height: 230px;
    object-fit: contain;
    filter: drop-shadow(0 26px 30px rgba(29, 35, 44, 0.22));
    transform: translateX(-50%);
    z-index: 1;
}

body[data-theme="dark"] .vehicle-detail-hero__art img {
    filter: drop-shadow(0 28px 34px rgba(0, 0, 0, 0.52));
}

.vehicle-detail-hero__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.6rem 1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.24);
    font-variant-numeric: tabular-nums;
}

body[data-theme="dark"] .vehicle-detail-hero__meta {
    background: rgba(255, 255, 255, 0.05);
}

.vehicle-detail-hero__meta strong,
.vehicle-detail-hero__meta span {
    display: block;
}

.vehicle-detail-hero__meta strong {
    font-size: 0.96rem;
}

.vehicle-detail-hero__meta span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.vehicle-detail-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vehicle-detail-kpi {
    min-height: 124px;
}

.vehicle-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.vehicle-detail-grid--lower {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vehicle-detail-grid--activity {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vehicle-detail-panel {
    padding: 1.25rem;
}

.vehicle-detail-panel .card__header {
    align-items: flex-start;
}

.vehicle-detail-panel h2 {
    margin: 0;
}

.vehicle-mix {
    display: grid;
    gap: 0.85rem;
}

.vehicle-mix__row {
    display: grid;
    gap: 0.4rem;
}

.vehicle-mix__label {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
    font-variant-numeric: tabular-nums;
}

.vehicle-mix__label strong {
    font-size: 0.95rem;
}

.vehicle-mix__label span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.vehicle-mix__track {
    position: relative;
    height: 0.85rem;
    border-radius: 999px;
    background: rgba(102, 112, 125, 0.13);
    overflow: hidden;
}

.vehicle-mix__track i {
    position: absolute;
    inset: 0 auto 0 0;
    display: block;
    border-radius: inherit;
}

.vehicle-mix__bar--ac {
    background: linear-gradient(90deg, #1d7a54, #4fd69b);
}

.vehicle-mix__bar--dc {
    background: linear-gradient(90deg, #b44c25, #f5b84b);
}

.vehicle-mix__bar--other {
    background: linear-gradient(90deg, #6b7280, #a1a1aa);
}

.vehicle-subline {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.dashboard-panel,
.dashboard-map-panel,
.dashboard-charge-pie-panel {
    padding: 1.25rem;
}

.dashboard-panel .card__header,
.dashboard-map-panel .card__header,
.dashboard-charge-pie-panel .card__header {
    align-items: flex-start;
}

.dashboard-panel h2,
.dashboard-map-panel h2,
.dashboard-charge-pie-panel h2 {
    margin: 0;
}

.dashboard-bars {
    display: grid;
    align-items: end;
    gap: 0.65rem;
    min-height: 210px;
}

.dashboard-bars--wide {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dashboard-bars--compact {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.dashboard-bars__item {
    display: grid;
    grid-template-rows: auto minmax(120px, 1fr) auto;
    align-items: end;
    gap: 0.5rem;
    min-width: 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.dashboard-bars--compact .dashboard-bars__item {
    grid-template-rows: minmax(135px, 1fr) auto;
}

.dashboard-bars__value {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.dashboard-bars__track {
    position: relative;
    height: 100%;
    min-height: 120px;
    border-radius: 999px;
    background: rgba(102, 112, 125, 0.13);
    overflow: hidden;
}

.dashboard-bars__track i {
    position: absolute;
    inset: auto 0 0;
    display: block;
    border-radius: inherit;
    background: linear-gradient(180deg, #4f92d6, #1d7a54);
}

.dashboard-bars--charge .dashboard-bars__track i {
    background: linear-gradient(180deg, #f5b84b, #b44c25);
}

.dashboard-map {
    position: relative;
    z-index: 0;
    isolation: isolate;
    height: 480px;
    border-radius: 20px;
    border: 1px solid var(--line);
    overflow: hidden;
}

.dashboard-map-panel--compact .dashboard-map {
    height: 360px;
}

body[data-theme="dark"] .dashboard-map {
    background: #0c1114;
}

body[data-theme="dark"] .dashboard-map .leaflet-tile {
    filter: invert(0.92) hue-rotate(175deg) brightness(0.72) contrast(0.98) saturate(0.9);
}

.dashboard-map-legend {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.dashboard-map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.dashboard-map-legend i {
    display: inline-block;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 999px;
}

.dashboard-map-legend__route {
    background: #2c6097;
}

.dashboard-map-legend__visit {
    background: #1d7a54;
}

.dashboard-map-legend__charge {
    background: #b44c25;
}

.dashboard-charge-pie-panel {
    position: relative;
    overflow: hidden;
}

.dashboard-charge-pie-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 18%, rgba(29, 122, 84, 0.16), transparent 34%),
        radial-gradient(circle at 86% 78%, rgba(180, 76, 37, 0.15), transparent 38%);
    pointer-events: none;
}

.dashboard-charge-pie-panel > * {
    position: relative;
    z-index: 1;
}

.dashboard-charge-pie-layout {
    display: grid;
    grid-template-columns: minmax(210px, 0.92fr) minmax(170px, 0.78fr);
    gap: 1.25rem;
    align-items: center;
    min-height: 360px;
}

.dashboard-charge-pie {
    --ac-color: #1d7a54;
    --dc-color: #b44c25;
    position: relative;
    width: min(100%, 265px);
    aspect-ratio: 1;
    margin: 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        conic-gradient(var(--ac-color) 0 var(--ac-share), var(--dc-color) var(--ac-share) 100%);
    box-shadow:
        0 30px 42px rgba(29, 35, 44, 0.24),
        inset -18px -20px 34px rgba(0, 0, 0, 0.28),
        inset 16px 18px 26px rgba(255, 255, 255, 0.18);
    transform: perspective(800px) rotateX(12deg) rotateY(-8deg);
}

.dashboard-charge-pie::before {
    content: "";
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42));
    box-shadow:
        inset 0 12px 24px rgba(255, 255, 255, 0.26),
        0 14px 26px rgba(29, 35, 44, 0.2);
}

body[data-theme="dark"] .dashboard-charge-pie::before {
    background:
        linear-gradient(145deg, rgba(22, 26, 30, 0.96), rgba(12, 15, 18, 0.94));
    box-shadow:
        inset 0 12px 24px rgba(255, 255, 255, 0.04),
        0 14px 26px rgba(0, 0, 0, 0.42);
}

.dashboard-charge-pie::after {
    content: "";
    position: absolute;
    inset: auto 10% -9% 10%;
    height: 28%;
    border-radius: 50%;
    background:
        linear-gradient(90deg, rgba(29, 122, 84, 0.42), rgba(180, 76, 37, 0.46));
    filter: blur(10px);
    opacity: 0.72;
    z-index: -1;
}

.dashboard-charge-pie span {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 0.05rem;
    color: var(--text);
}

.dashboard-charge-pie strong {
    font-size: clamp(2.05rem, 5vw, 3.05rem);
    line-height: 0.9;
    letter-spacing: 0;
}

.dashboard-charge-pie small {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-charge-pie-legend {
    display: grid;
    gap: 0.85rem;
}

.dashboard-charge-pie-legend__item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.15rem 0.85rem;
    align-items: baseline;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.45);
    overflow: hidden;
}

body[data-theme="dark"] .dashboard-charge-pie-legend__item {
    background: rgba(255, 255, 255, 0.045);
}

.dashboard-charge-pie-legend__item::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.36rem;
    background: var(--charge-color);
}

.dashboard-charge-pie-legend__item--ac {
    --charge-color: #1d7a54;
}

.dashboard-charge-pie-legend__item--dc {
    --charge-color: #b44c25;
}

.dashboard-charge-pie-legend__item span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-charge-pie-legend__item strong {
    color: var(--text);
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    line-height: 1;
}

.dashboard-charge-pie-legend__item small {
    grid-column: 1 / -1;
    color: var(--muted);
    font-weight: 800;
}

.dashboard-charge-pie-empty {
    display: grid;
    place-items: center;
    gap: 0.85rem;
    min-height: 360px;
    border: 1px dashed var(--line);
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

.dashboard-charge-pie-empty i {
    display: inline-grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border-radius: 22px;
    background: rgba(180, 76, 37, 0.12);
    color: var(--accent);
    font-size: 1.55rem;
}

.dashboard-vehicle-list,
.dashboard-meter-list,
.dashboard-stop-list,
.dashboard-timeline {
    display: grid;
    gap: 0.75rem;
}

.dashboard-vehicle-row,
.dashboard-timeline__item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    padding: 0.82rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.46);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

body[data-theme="dark"] .dashboard-vehicle-row,
body[data-theme="dark"] .dashboard-timeline__item {
    background: rgba(255, 255, 255, 0.04);
}

.dashboard-vehicle-row:hover,
.dashboard-timeline__item:hover {
    transform: translateY(-1px);
    border-color: rgba(180, 76, 37, 0.28);
}

.dashboard-vehicle-row__soc,
.dashboard-timeline__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 14px;
    background: rgba(29, 122, 84, 0.12);
    color: var(--success);
    font-weight: 900;
}

.dashboard-vehicle-row small,
.dashboard-timeline__item small,
.dashboard-stop span,
.dashboard-meter span {
    display: block;
    margin-top: 0.18rem;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.35;
}

.dashboard-timeline__item em {
    color: var(--text);
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.dashboard-timeline--charging .dashboard-timeline__icon {
    background: rgba(180, 76, 37, 0.12);
    color: var(--accent);
}

.dashboard-meter {
    display: grid;
    gap: 0.55rem;
}

.dashboard-meter > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
}

.dashboard-meter i {
    display: block;
    height: 0.65rem;
    border-radius: 999px;
    background: rgba(102, 112, 125, 0.13);
    overflow: hidden;
}

.dashboard-meter b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #b44c25, #f5b84b);
}

.dashboard-stop {
    padding: 0.82rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.4);
}

body[data-theme="dark"] .dashboard-stop {
    background: rgba(255, 255, 255, 0.04);
}

.dashboard-map-marker {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 2px solid #fff;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
    box-shadow: 0 9px 18px rgba(29, 35, 44, 0.25);
}

.dashboard-map-marker--visit {
    background: #1d7a54;
}

.dashboard-map-marker--charge {
    background: #b44c25;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .hero,
    .grid--2,
    .grid--3,
    .metrics-grid,
    .wizard,
    .filter-form,
    .grid-form,
    .trip-layout,
    .trip-insights-grid,
    .trip-summary-grid,
    .dashboard-hero,
    .dashboard-grid--analytics,
    .dashboard-map-grid,
    .dashboard-grid--lower,
    .dashboard-grid--activity,
    .chargers-grid,
    .charger-card__form {
        grid-template-columns: 1fr;
    }

    .profile-vehicle-grid {
        grid-template-columns: 1fr;
    }

    .two-factor-setup {
        grid-template-columns: 1fr;
    }

    .page-header {
        align-items: start;
        flex-direction: column;
    }

    .trip-route-map--hero {
        height: 420px;
    }

    .dashboard-map {
        height: 420px;
    }

    .dashboard-map-panel--compact .dashboard-map,
    .dashboard-charge-pie-layout,
    .dashboard-charge-pie-empty {
        min-height: 340px;
    }

    .dashboard-map-panel--compact .dashboard-map {
        height: 340px;
    }

    .trip-stat-grid {
        grid-template-columns: 1fr;
    }

    .trip-chart-grid {
        grid-template-columns: 1fr;
    }

    .trip-tool-card {
        flex-direction: column;
        align-items: stretch;
    }

    .trip-tool-card__icon {
        width: 4.4rem;
        height: 4.4rem;
    }

    .trip-tool-card__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .trip-tool-card__actions .button {
        width: 100%;
    }

    .trip-tool-result {
        width: 100%;
        flex-basis: auto;
    }

    .trip-compare-result__grid {
        grid-template-columns: 1fr;
    }

    .trip-compare-result__header {
        flex-direction: column;
    }

    .trip-compare-result__header .button {
        width: 100%;
    }

    .trip-tool-result__confidence-group {
        margin-left: 0;
        justify-items: start;
    }

    .trip-tool-result__confidence-reason {
        text-align: left;
    }

    .speed-location-modal__actions {
        grid-template-columns: 1fr;
    }

    .roadtrip-builder,
    .roadtrip-detail-layout {
        grid-template-columns: 1fr;
    }

    .roadtrip-builder__form {
        grid-template-columns: 1fr;
    }

    .roadtrip-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .roadtrip-breakdown {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .vehicle-detail-hero,
    .vehicle-detail-grid,
    .vehicle-detail-grid--lower,
    .vehicle-detail-grid--activity {
        grid-template-columns: 1fr;
    }

    .vehicle-detail-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vehicle-detail-hero__summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .charger-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .pairing-flow {
        grid-template-columns: 1fr;
    }

    .vehicle-pair-card__pairing {
        grid-template-columns: 1fr;
    }

    .pairing-qr {
        width: min(220px, 100%);
        margin: 0 auto;
    }
}

@media (max-width: 720px) {
    .shell {
        padding: 1.25rem 0.85rem 2rem;
    }

    .card {
        padding: 1rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .filter-form {
        gap: 0.85rem;
    }

    .filter-form label {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }

    .filter-form input,
    .filter-form select {
        width: 100%;
        max-width: 100%;
    }

    .filter-form__range {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .filter-form input[type="date"] {
        appearance: auto;
        -webkit-appearance: auto;
        min-inline-size: 0;
        inline-size: 100%;
        min-height: 3.35rem;
    }

    .battery-range,
    .trip-chip,
    .trip-page-header__range {
        white-space: normal;
    }

    .battery-range,
    .trip-chip {
        flex-wrap: wrap;
    }

    .purple-streak-badge {
        width: 100%;
        max-width: 100%;
    }

    .charge-free-badge {
        width: 100%;
        max-width: 100%;
    }

    .roadtrip-grid,
    .roadtrip-breakdown {
        grid-template-columns: 1fr;
    }

    .roadtrip-route-map {
        min-height: 360px;
    }

    .dashboard-kpis,
    .dashboard-vehicle__stats {
        grid-template-columns: 1fr;
    }

    .dashboard-car-stage {
        min-height: 345px;
    }

    .dashboard-vehicle--colour-hero .dashboard-car-stage {
        min-height: 190px;
    }

    .dashboard-vehicle--colour-hero .dashboard-car-stage::before,
    .vehicle-detail-hero--colour-hero .vehicle-detail-hero__art::before {
        min-height: 150px;
    }

    .dashboard-live-charge__metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-vehicle--colour-hero::before,
    .vehicle-detail-hero--colour-hero::before {
        background-position: center, center, right 52%;
        background-size: cover, cover, auto 52%;
    }

    .dashboard-car-stage img {
        max-height: 200px;
    }

    .dashboard-bars {
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }

    .dashboard-bars__item {
        min-width: 2.65rem;
    }

    .vehicle-page-header__actions,
    .vehicle-detail-hero__actions {
        width: 100%;
    }

    .vehicle-detail-hero__actions .button,
    .vehicle-detail-hero__actions .link-button,
    .vehicle-page-header__actions .button,
    .vehicle-page-header__actions .link-button {
        flex: 1 1 0;
    }

    .dashboard-map-panel .card__header {
        flex-direction: column;
    }

    .dashboard-charge-pie-layout {
        grid-template-columns: 1fr;
    }

    .trip-debug-card,
    .trip-trace-card,
    .charging-trace-card {
        display: none !important;
    }

    .charge-graph {
        gap: 0.65rem;
        padding: 0.75rem;
    }

    .charge-graph__header {
        gap: 0.75rem;
    }

    .charge-graph__metrics {
        width: 100%;
    }

    .charge-graph__metrics span {
        min-width: 0;
        flex: 1 1 0;
    }

    .charge-graph__svg {
        max-height: 220px;
    }

    .charge-graph__axis-timestamp {
        font-size: 9px;
        letter-spacing: 0;
    }

    .vehicle-detail-kpis,
    .vehicle-detail-hero__summary,
    .vehicle-health-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-detail-hero__art {
        min-height: 240px;
    }

    .table {
        display: block;
        max-width: 100%;
    }

    .table thead {
        display: none;
    }

    .table tbody {
        display: grid;
        gap: 0.85rem;
        min-width: 0;
    }

    .table tr {
        display: grid;
        gap: 0;
        padding: 0.85rem;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: var(--bg-soft);
        min-width: 0;
        max-width: 100%;
    }

    .table th,
    .table td {
        border-bottom: 0;
    }

    .table td {
        display: grid;
        grid-template-columns: minmax(7.5rem, 42%) minmax(0, 1fr);
        gap: 0.75rem;
        align-items: start;
        padding: 0.55rem 0;
        min-width: 0;
        max-width: 100%;
    }

    .table td + td {
        border-top: 1px solid var(--line);
    }

    .table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.78rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .table tbody tr.is-clickable:hover {
        background: var(--bg-soft);
    }
}

@media (max-width: 460px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar__nav {
        width: 100%;
        gap: 0.55rem;
    }

    .topbar__brand,
    .topbar__brand a {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .filter-form__actions,
    .page-header__actions {
        width: 100%;
        flex-wrap: wrap;
        min-width: 0;
    }

    .filter-form__actions .button,
    .page-header__actions .button {
        flex: 1 1 10rem;
    }

    .dashboard-live-charge__metrics {
        grid-template-columns: 1fr;
    }

    .purple-streak-badge {
        gap: 0.8rem;
        padding: 0.9rem 0.95rem;
    }

    .purple-streak-badge__icon {
        width: 2.75rem;
        height: 2.75rem;
        border-radius: 14px;
    }

    .charge-free-badge {
        gap: 0.8rem;
        padding: 0.9rem 0.95rem;
    }

    .charge-free-badge__icon {
        width: 2.75rem;
        height: 2.75rem;
        border-radius: 14px;
    }

    .dashboard-vehicle,
    .dashboard-panel,
    .dashboard-map-panel,
    .dashboard-charge-pie-panel {
        padding: 1rem;
    }

    .dashboard-vehicle__header,
    .dashboard-meter > div {
        flex-direction: column;
    }

    .dashboard-vehicle-row,
    .dashboard-timeline__item {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .dashboard-map {
        height: 360px;
    }

    .dashboard-map-panel--compact .dashboard-map {
        height: 320px;
    }

    .dashboard-charge-pie {
        max-width: 230px;
    }

    .table td {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .charger-card__header {
        flex-direction: column;
    }

    .charge-location-modal__actions {
        grid-template-columns: 1fr;
    }

    .charge-rate-override__toggle {
        grid-template-columns: 1fr;
    }

    .trip-compare-modal__actions {
        grid-template-columns: 1fr;
    }
}

.today-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 42rem);
    gap: 1rem;
    align-items: stretch;
    min-height: min(760px, calc(100vh - 7rem));
    margin-bottom: 8vh;
}

.today-date-filter {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    justify-content: flex-end;
    margin: -0.45rem 0 0.2rem;
}

.today-date-filter__toggle {
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 0.18em;
    cursor: pointer;
}

.today-date-filter__toggle:hover {
    color: var(--text);
}

.today-date-filter__form {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    width: max-content;
    max-width: 100%;
    gap: 0.5rem;
    padding: 0.45rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--card) 88%, transparent);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
}

.today-date-filter__form[hidden] {
    display: none !important;
}

.today-date-filter label {
    position: relative;
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.today-date-filter__select {
    min-width: 9.8rem;
    width: 9.8rem;
    margin-top: 0;
}

.today-date-filter__select .filter-select__trigger {
    min-height: 2.45rem;
    padding: 0.62rem 0.8rem;
}

.today-date-filter__select .filter-select__menu {
    right: auto;
    width: max-content;
    min-width: 100%;
}

.today-date-filter__select .filter-select__option.is-selected::after {
    content: none;
}

.today-date-filter__custom {
    display: inline-flex;
    grid-template-columns: none;
    gap: 0;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.today-date-filter__custom input[type="date"] {
    min-height: 2.45rem;
    margin-top: 0;
    padding: 0.58rem 0.68rem;
    width: 8.9rem;
    max-width: 8.9rem;
}

.today-date-filter__actions {
    display: inline-flex;
    align-items: center;
}

.today-date-filter__actions .button {
    min-height: 2.45rem;
    padding: 0.62rem 0.9rem;
}

.today-scroll-scene {
    opacity: var(--scene-opacity, 0.2);
    transform: translateY(var(--scene-translate, 70px)) scale(var(--scene-scale, 0.94));
    transform-origin: center top;
    transition:
        opacity 420ms ease,
        transform 420ms ease;
    will-change: opacity, transform;
}

.today-scroll-scene.is-in-scene {
    opacity: var(--scene-opacity, 1);
}

.today-hero__copy,
.today-hero__stats,
.today-map-shell,
.today-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    box-shadow: var(--shadow);
}

.today-hero__copy {
    min-height: 12rem;
    position: relative;
    overflow: hidden;
    padding: clamp(2.15rem, 3.2vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.16), transparent 12rem),
        radial-gradient(circle at 84% 74%, rgba(79, 214, 155, 0.16), transparent 18rem),
        linear-gradient(135deg, rgba(21, 91, 118, 0.82), rgba(12, 19, 30, 0.92)),
        linear-gradient(45deg, rgba(45, 166, 117, 0.24), transparent 55%);
    color: #fff;
}

.today-hero__copy::after {
    content: "";
    position: absolute;
    right: -5rem;
    top: -5rem;
    width: 18rem;
    height: 18rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    box-shadow: inset 0 0 50px rgba(255, 255, 255, 0.06);
    animation: todayHeroRing 8s ease-in-out infinite alternate;
}

.today-hero__icon-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.today-hero__float-icon {
    position: absolute;
    width: clamp(3.4rem, 5.5vw, 5.6rem);
    height: clamp(3.4rem, 5.5vw, 5.6rem);
    display: grid;
    place-items: center;
    border-radius: 26px;
    color: rgba(255, 255, 255, 0.52);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 22px 50px rgba(2, 8, 13, 0.18);
    animation: todayHeroIconFloat 5.8s ease-in-out infinite;
}

.today-hero__float-icon i {
    font-size: clamp(1.45rem, 2.9vw, 2.45rem);
}

.today-hero__float-icon--car {
    right: 9%;
    top: 10%;
    color: #8be3ef;
}

.today-hero__float-icon--route {
    left: 53%;
    right: auto;
    top: auto;
    bottom: 15%;
    color: #8de0b0;
    animation-delay: 700ms;
}

.today-hero__float-icon--bolt {
    left: 8%;
    top: 10%;
    color: #ffd65d;
    animation-delay: 1300ms;
}

.today-hero__badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    margin-bottom: 0.9rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.today-hero__copy .eyebrow,
.today-hero__copy p {
    color: rgba(255, 255, 255, 0.76);
}

.today-hero__copy h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 0.6rem;
    color: #fff;
    max-width: 100%;
    font-size: clamp(2.75rem, 5.15vw, 5.75rem);
    line-height: 0.98;
}

.today-hero__copy p {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: clamp(1.1rem, 2vw, 1.65rem);
    font-weight: 900;
}

.today-hero__stats {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.today-stat-card {
    position: relative;
    overflow: hidden;
    min-width: 0;
    padding: 1.7rem;
    border-radius: 8px;
    background:
        radial-gradient(circle at 92% 16%, hsla(var(--stat-hue), 76%, 56%, 0.24), transparent 8rem),
        linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 38%),
        var(--bg-soft);
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.today-stat-card::before {
    content: "";
    position: absolute;
    inset: auto 1rem 1rem 1rem;
    height: 0.28rem;
    border-radius: 999px;
    background: linear-gradient(90deg, hsla(var(--stat-hue), 80%, 58%, 0.95), transparent);
}

.today-stat-card > i {
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: 4rem;
    height: 4rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: hsl(var(--stat-hue) 82% 68%);
    background: hsla(var(--stat-hue), 72%, 50%, 0.12);
    font-size: 1.55rem;
    animation: todayStatIconPulse 3.4s ease-in-out infinite;
}

.today-stat-card--trips {
    --stat-hue: 188;
}

.today-stat-card--distance {
    --stat-hue: 139;
}

.today-stat-card--time {
    --stat-hue: 286;
}

.today-stat-card--charged {
    --stat-hue: 43;
}

.today-hero__stats span {
    position: relative;
    z-index: 1;
    display: block;
    color: var(--muted);
    font-size: clamp(0.85rem, 1vw, 1rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.today-hero__stats strong {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 0.5rem;
    font-size: clamp(2.4rem, 4.4vw, 4.2rem);
    line-height: 1;
    color: var(--text);
}

.today-map-shell {
    padding: 1rem;
    min-height: min(860px, calc(100vh - 6rem));
    margin-bottom: 8vh;
    background:
        radial-gradient(circle at 18% 16%, rgba(45, 125, 156, 0.14), transparent 18rem),
        linear-gradient(180deg, var(--card), rgba(9, 14, 18, 0.14));
}

.today-map-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.today-map-intro > div {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.today-map-intro h2 {
    margin: 0;
}

.today-map-intro p {
    margin: 0.2rem 0 0;
}

.today-map-intro__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.today-map-intro__icon {
    flex: 0 0 auto;
    width: 2.8rem;
    height: 2.8rem;
    color: #fff;
    background: linear-gradient(135deg, #2d7d9c, #155b76);
    box-shadow: 0 14px 30px rgba(2, 8, 13, 0.22);
}

.today-map-shell__header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.today-map-shell__header h2,
.today-panel h2 {
    margin: 0;
}

.today-map-shell__header p {
    margin: 0.25rem 0 0;
}

.today-map {
    height: min(74vh, 760px);
    min-height: 560px;
    overflow: hidden;
    border-radius: 8px;
    background: #111923;
}

.today-map .maplibregl-popup {
    color: #1d232c;
    font: inherit;
}

.today-map .maplibregl-popup-content {
    min-width: 12.5rem;
    padding: 1rem 1.15rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    color: #1d232c;
    box-shadow: 0 18px 42px rgba(2, 10, 18, 0.22);
}

.today-map .maplibregl-popup-content strong {
    color: #101820;
}

.today-map .maplibregl-popup-close-button {
    top: 0.45rem;
    right: 0.45rem;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 6px;
    color: #101820;
    font-size: 1.25rem;
    line-height: 1;
}

.today-map .maplibregl-popup-close-button:hover {
    background: rgba(13, 24, 35, 0.08);
}

.today-map .maplibregl-popup[class*="maplibregl-popup-anchor-bottom"] .maplibregl-popup-tip {
    border-top-color: rgba(255, 255, 255, 0.96);
}

.today-map .maplibregl-popup[class*="maplibregl-popup-anchor-top"] .maplibregl-popup-tip {
    border-bottom-color: rgba(255, 255, 255, 0.96);
}

.today-map .maplibregl-popup[class*="maplibregl-popup-anchor-left"] .maplibregl-popup-tip {
    border-right-color: rgba(255, 255, 255, 0.96);
}

.today-map .maplibregl-popup[class*="maplibregl-popup-anchor-right"] .maplibregl-popup-tip {
    border-left-color: rgba(255, 255, 255, 0.96);
}

body[data-theme="dark"] .today-map .maplibregl-popup {
    color: #edf2f7;
}

body[data-theme="dark"] .today-map .maplibregl-popup-content {
    background: rgba(19, 24, 31, 0.96);
    color: #edf2f7;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

body[data-theme="dark"] .today-map .maplibregl-popup-content strong {
    color: #ffffff;
}

body[data-theme="dark"] .today-map .maplibregl-popup-close-button {
    color: #ffffff;
}

body[data-theme="dark"] .today-map .maplibregl-popup-close-button:hover {
    background: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .today-map .maplibregl-popup[class*="maplibregl-popup-anchor-bottom"] .maplibregl-popup-tip {
    border-top-color: rgba(19, 24, 31, 0.96);
}

body[data-theme="dark"] .today-map .maplibregl-popup[class*="maplibregl-popup-anchor-top"] .maplibregl-popup-tip {
    border-bottom-color: rgba(19, 24, 31, 0.96);
}

body[data-theme="dark"] .today-map .maplibregl-popup[class*="maplibregl-popup-anchor-left"] .maplibregl-popup-tip {
    border-right-color: rgba(19, 24, 31, 0.96);
}

body[data-theme="dark"] .today-map .maplibregl-popup[class*="maplibregl-popup-anchor-right"] .maplibregl-popup-tip {
    border-left-color: rgba(19, 24, 31, 0.96);
}

.today-map__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 0.8rem;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.today-map__legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.today-map__legend i {
    display: inline-block;
    width: 1.6rem;
    height: 0.35rem;
    border-radius: 999px;
}

.today-map__legend-route {
    background: #22b99a;
}

.today-map__legend-charge {
    background: #d76835;
}

.today-map-marker {
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    position: relative;
    border-radius: 50%;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 30px rgba(2, 10, 18, 0.3);
}

.today-map-marker i {
    font-size: 0.86rem;
}

.today-map-marker--start {
    background: #168060;
}

.today-map-marker--end {
    background: #155b76;
}

.today-map-marker--charge {
    width: 2.2rem;
    min-width: 2.2rem;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #231702;
    background: linear-gradient(135deg, #ffe082, #d69b18);
    border-color: rgba(255, 249, 221, 0.95);
    box-shadow: 0 14px 30px rgba(2, 10, 18, 0.3), 0 0 0 0 rgba(224, 174, 44, 0.36);
    animation: todayMarkerPulse 1.8s ease-in-out infinite;
}

.today-map-marker--charge i {
    font-size: 0.9rem;
}

@keyframes todayMarkerPulse {
    0%,
    100% {
        box-shadow: 0 14px 30px rgba(2, 10, 18, 0.3), 0 0 0 0 rgba(224, 174, 44, 0.36);
    }
    50% {
        box-shadow: 0 14px 30px rgba(2, 10, 18, 0.3), 0 0 0 12px rgba(224, 174, 44, 0);
    }
}

.today-empty-map {
    min-height: 28rem;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: var(--bg-soft);
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.6rem;
    text-align: center;
    padding: 2rem;
}

.today-empty-map i {
    color: var(--muted);
    font-size: 2.4rem;
}

.today-empty-map strong {
    font-size: 1.25rem;
}

.today-empty-map span {
    max-width: 32rem;
    color: var(--muted);
}

.today-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.today-panel {
    padding: 1rem;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 42%),
        linear-gradient(180deg, var(--card), rgba(10, 17, 22, 0.08));
}

.today-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(115deg, rgba(34, 185, 154, 0.08), transparent 34%),
        linear-gradient(245deg, rgba(199, 90, 39, 0.08), transparent 42%);
    opacity: 0.55;
}

.today-list {
    display: grid;
    gap: 0.8rem;
    position: relative;
    z-index: 1;
    counter-reset: today-list;
}

.today-list__item {
    counter-increment: today-list;
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: center;
    min-width: 0;
    min-height: 5.15rem;
    padding: 0.82rem 1rem 0.82rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 38%),
        linear-gradient(90deg, rgba(21, 91, 118, 0.16), rgba(255, 255, 255, 0.025));
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 16px 32px rgba(2, 8, 13, 0.13);
    transform: translateY(14px);
    opacity: 0;
    animation: todayItemEnter 560ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease;
}

.today-list__item:hover {
    border-color: rgba(93, 207, 178, 0.52);
    transform: translateY(-3px) scale(1.006);
    box-shadow: 0 22px 44px rgba(2, 8, 13, 0.24);
}

.today-list__item::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.32rem;
    border-radius: 8px 0 0 8px;
    background: linear-gradient(180deg, #24c6a0, #2f75a6);
    box-shadow: 0 0 22px rgba(36, 198, 160, 0.42);
    z-index: -1;
}

.today-list__item::after {
    content: counter(today-list, decimal-leading-zero);
    position: absolute;
    right: 1rem;
    top: 0.55rem;
    color: rgba(140, 154, 166, 0.18);
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
}

.today-list__item:nth-child(2n) {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 42%),
        linear-gradient(90deg, rgba(29, 122, 84, 0.18), rgba(255, 255, 255, 0.025));
}

.today-list__item:nth-child(2n)::before {
    background: linear-gradient(180deg, #65d68e, #157a54);
    box-shadow: 0 0 22px rgba(101, 214, 142, 0.36);
}

.today-list__item:nth-child(3n) {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), transparent 40%),
        linear-gradient(90deg, rgba(180, 76, 37, 0.18), rgba(255, 255, 255, 0.025));
}

.today-list__item:nth-child(3n)::before {
    background: linear-gradient(180deg, #f0a15d, #b44c25);
    box-shadow: 0 0 22px rgba(240, 161, 93, 0.34);
}

.today-list__item:nth-child(4n) {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 44%),
        linear-gradient(90deg, rgba(91, 96, 105, 0.28), rgba(255, 255, 255, 0.025));
}

.today-list__item:nth-child(1) {
    animation-delay: 60ms;
}

.today-list__item:nth-child(2) {
    animation-delay: 130ms;
}

.today-list__item:nth-child(3) {
    animation-delay: 200ms;
}

.today-list__item:nth-child(4) {
    animation-delay: 270ms;
}

.today-list__item:nth-child(5) {
    animation-delay: 340ms;
}

.today-list__item:nth-child(6) {
    animation-delay: 410ms;
}

.today-list__item:nth-child(7) {
    animation-delay: 480ms;
}

.today-list__item:nth-child(8) {
    animation-delay: 550ms;
}

.today-list__item strong,
.today-list__item small,
.today-list__item b {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.today-list__item small {
    margin-top: 0.2rem;
    color: var(--muted);
    font-weight: 600;
}

.today-list__item b {
    position: relative;
    z-index: 1;
    align-self: center;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.today-list__icon {
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 12px 22px rgba(2, 8, 13, 0.22);
    transform: rotate(-2deg);
    transition: transform 180ms ease;
}

.today-list__item:hover .today-list__icon {
    transform: rotate(0deg) scale(1.06);
}

.today-list__icon--trip {
    background: linear-gradient(135deg, #2d7d9c, #155b76);
}

.today-list__icon--charge {
    background: linear-gradient(135deg, #f0a15d, #c75a27);
}

.today-list--trips .today-list__item:nth-child(2n) .today-list__icon--trip {
    background: linear-gradient(135deg, #65d68e, #157a54);
}

.today-list--trips .today-list__item:nth-child(3n) .today-list__icon--trip {
    background: linear-gradient(135deg, #f0a15d, #b44c25);
}

.today-panel > .muted {
    position: relative;
    z-index: 1;
    min-height: 9rem;
    margin: 0;
    padding: 1rem;
    border: 1px dashed rgba(140, 154, 166, 0.28);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 45%),
        rgba(255, 255, 255, 0.02);
    display: grid;
    align-content: center;
    color: var(--muted);
    animation: todayPanelGlow 2.2s ease-in-out infinite alternate;
}

.today-bubble-panel {
    position: relative;
    overflow: hidden;
    padding: 1rem;
    min-height: min(900px, calc(100vh - 6rem));
    margin-top: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        radial-gradient(circle at 18% 18%, rgba(34, 185, 154, 0.12), transparent 24rem),
        radial-gradient(circle at 82% 72%, rgba(199, 90, 39, 0.12), transparent 26rem),
        linear-gradient(180deg, var(--card), rgba(9, 14, 18, 0.16));
    box-shadow: var(--shadow);
}

.today-bubble-panel__header {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
    min-height: 4.8rem;
}

.today-bubble-panel__header h2 {
    margin: 0;
}

.today-bubble-panel__header p {
    margin: 0.25rem 0 0;
}

.today-bubble-panel__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

.today-bubble-panel__links a {
    padding: 0.45rem 0.68rem;
    border: 1px solid rgba(140, 154, 166, 0.24);
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.today-bubble-panel__links a:hover {
    color: var(--text);
    border-color: rgba(93, 207, 178, 0.5);
}

.today-bubble-field {
    position: relative;
    min-height: var(--bubble-field-height, 520px);
    overflow: hidden;
    border-radius: 8px;
    padding-top: 1rem;
    background:
        linear-gradient(90deg, rgba(140, 154, 166, 0.08) 1px, transparent 1px),
        linear-gradient(180deg, rgba(140, 154, 166, 0.07) 1px, transparent 1px);
    background-size: 72px 72px;
}

.today-bubble-field::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 35%),
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 35rem);
    pointer-events: none;
}

.today-bubble-field__decor {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.today-bubble-field__float {
    position: absolute;
    left: var(--float-x);
    top: var(--float-y);
    width: clamp(1.75rem, 2.2vw, 2.8rem);
    height: clamp(1.75rem, 2.2vw, 2.8rem);
    display: grid;
    place-items: center;
    border-radius: 10px;
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.18), transparent 38%),
        hsla(var(--float-hue), 80%, 54%, 0.1);
    border: 1px solid hsla(var(--float-hue), 80%, 72%, 0.16);
    color: hsla(var(--float-hue), 82%, 68%, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 10px 24px rgba(0, 0, 0, 0.12);
    opacity: 0.46;
    transform: translate3d(0, 0, 0) rotate(var(--float-rotate, -6deg));
    animation: todayGridIconFloat var(--float-duration, 11s) ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
}

.today-bubble-field__float i {
    font-size: clamp(0.72rem, 1.15vw, 1.15rem);
}

.today-bubble {
    position: absolute;
    left: var(--bubble-x);
    top: var(--bubble-y);
    width: var(--bubble-size);
    height: var(--bubble-size);
    margin-left: calc(var(--bubble-size) * -0.5);
    margin-top: calc(var(--bubble-size) * -0.5);
    border-radius: 50%;
    display: block;
    padding: 0;
    color: #fff;
    text-decoration: none;
    opacity: 0;
    backface-visibility: hidden;
    transition: opacity 220ms ease var(--bubble-delay, 0ms);
    will-change: opacity;
    z-index: 1;
    outline: none;
    touch-action: manipulation;
    user-select: none;
}

.today-bubble.is-visible {
    opacity: 1;
}

.today-bubble:focus,
.today-bubble:active,
.today-bubble:focus-visible {
    outline: none;
}

.today-bubble:focus-visible .today-bubble__surface::after {
    box-shadow:
        inset 0 0 0 2px hsla(var(--bubble-hue), 90%, 82%, 0.62),
        0 0 22px hsla(var(--bubble-hue), 90%, 70%, 0.22);
}

@media (hover: none), (pointer: coarse) {
    .today-bubble,
    .today-bubble *,
    .today-bubble::before,
    .today-bubble::after {
        -webkit-tap-highlight-color: transparent;
    }

    .today-bubble:focus,
    .today-bubble:active,
    .today-bubble:focus-visible {
        outline: none;
    }

    .today-bubble:focus-visible .today-bubble__surface::after {
        box-shadow:
            inset 0 0 0 1px rgba(255, 255, 255, 0.22),
            0 0 18px hsla(var(--bubble-hue), 90%, 70%, 0.12);
    }

    .today-bubble--charge .today-bubble__surface::before {
        box-shadow:
            inset 0 2px 0 rgba(255, 255, 255, 0.56),
            inset 14px 18px 28px rgba(255, 255, 255, 0.1),
            inset -16px -20px 28px rgba(87, 51, 0, 0.28);
    }

    .today-bubble--charge .today-bubble__surface::after {
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    }
}

.today-bubble:hover {
    z-index: 3;
}

.today-bubble__drift,
.today-bubble__scale {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform-origin: center;
    backface-visibility: hidden;
    will-change: transform;
}

.today-bubble.is-visible .today-bubble__drift {
    animation: todayBubbleDrift var(--bubble-float-duration, 31s) ease-in-out calc(var(--bubble-delay, 0ms) + 1000ms) infinite;
}

.today-bubble__scale {
    transform: scale(0.38);
    transition: transform 760ms cubic-bezier(0.15, 0.9, 0.25, 1.15) var(--bubble-delay, 0ms);
}

.today-bubble.is-visible .today-bubble__scale {
    transform: scale(1);
}

.today-bubble:hover .today-bubble__scale {
    transform: scale(1.06);
    transition-duration: 220ms;
    transition-delay: 0ms;
}

.today-bubble__surface {
    position: relative;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    isolation: isolate;
    contain: paint;
    overflow: hidden;
    border-radius: 50%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: clamp(0.12rem, calc(var(--bubble-size) * 0.025), 0.25rem);
    padding: clamp(0.48rem, calc(var(--bubble-size) * 0.105), 1rem);
    text-align: center;
    border: 1px solid hsla(var(--bubble-hue), 82%, 76%, 0.58);
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.62), transparent 16%),
        radial-gradient(circle at 64% 18%, hsla(var(--bubble-hue), 95%, 82%, 0.24), transparent 30%),
        radial-gradient(circle at 70% 82%, hsla(var(--bubble-hue), 84%, 32%, 0.96), transparent 58%),
        linear-gradient(135deg, hsla(var(--bubble-hue), 82%, 54%, 0.98), hsla(var(--bubble-hue), 80%, 23%, 0.98));
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.5),
        inset 14px 18px 28px rgba(255, 255, 255, 0.08),
        inset -18px -24px 34px rgba(2, 8, 13, 0.32),
        0 22px 48px rgba(2, 8, 13, 0.32),
        0 0 44px hsla(var(--bubble-hue), 86%, 58%, 0.26);
    transition:
        box-shadow 220ms ease,
        border-color 220ms ease;
}

.today-bubble__surface::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.28) 47%, transparent 64%);
    opacity: 0.72;
    transform: translateX(-72%) rotate(8deg);
    animation: todayBubbleSheen 4.2s ease-in-out infinite;
    animation-delay: calc(var(--bubble-delay, 0ms) + 1200ms);
    pointer-events: none;
}

.today-bubble__surface::before,
.today-bubble__surface::after {
    z-index: 0;
}

.today-bubble:hover .today-bubble__surface {
    border-color: hsla(var(--bubble-hue), 90%, 82%, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.48),
        inset -16px -20px 28px rgba(2, 8, 13, 0.22),
        0 28px 62px rgba(2, 8, 13, 0.4),
        0 0 44px hsla(var(--bubble-hue), 82%, 58%, 0.3);
}

.today-bubble__surface::after {
    content: "";
    position: absolute;
    inset: 9%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        inset 0 0 22px rgba(255, 255, 255, 0.06),
        0 0 18px hsla(var(--bubble-hue), 90%, 70%, 0.12);
    pointer-events: none;
}

.today-bubble--charge .today-bubble__surface {
    --bubble-hue: 43;
    contain: none;
    isolation: auto;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.today-bubble--charge .today-bubble__surface::before {
    inset: 0;
    border-radius: 0;
    clip-path: polygon(50% 1%, 79% 10%, 97% 35%, 97% 65%, 79% 90%, 50% 99%, 21% 90%, 3% 65%, 3% 35%, 21% 10%);
    background:
        radial-gradient(circle at 33% 24%, rgba(255, 255, 255, 0.68), transparent 14%),
        radial-gradient(circle at 64% 20%, rgba(255, 246, 184, 0.32), transparent 30%),
        radial-gradient(circle at 68% 76%, rgba(132, 83, 12, 0.96), transparent 56%),
        linear-gradient(135deg, rgba(255, 223, 103, 0.99), rgba(187, 119, 22, 0.99));
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.56),
        inset 14px 18px 28px rgba(255, 255, 255, 0.1),
        inset -16px -20px 28px rgba(87, 51, 0, 0.28),
        0 22px 48px rgba(2, 8, 13, 0.32),
        0 0 48px rgba(255, 196, 62, 0.34);
    opacity: 1;
    transform: none;
    animation: none;
}

.today-bubble--charge .today-bubble__surface::after {
    inset: 10%;
    border: 0;
    border-radius: 0;
    clip-path: polygon(50% 1%, 79% 10%, 97% 35%, 97% 65%, 79% 90%, 50% 99%, 21% 90%, 3% 65%, 3% 35%, 21% 10%);
    background: rgba(255, 255, 255, 0.13);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.22),
        0 0 18px rgba(255, 196, 62, 0.14);
}

.today-bubble__icon {
    width: clamp(1.2rem, calc(var(--bubble-size) * 0.19), 2rem);
    height: clamp(1.2rem, calc(var(--bubble-size) * 0.19), 2rem);
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.today-bubble__icon i {
    font-size: clamp(0.64rem, calc(var(--bubble-size) * 0.09), 1rem);
}

.today-bubble__metric {
    font-size: clamp(0.95rem, calc(var(--bubble-size) * 0.16), 2.15rem);
    font-weight: 900;
    line-height: 1;
}

.today-bubble__icon,
.today-bubble__metric,
.today-bubble__title,
.today-bubble__time {
    position: relative;
    z-index: 1;
}

.today-bubble__title,
.today-bubble__time {
    max-width: 92%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.today-bubble__title {
    font-size: clamp(0.58rem, calc(var(--bubble-size) * 0.06), 0.8rem);
    font-weight: 900;
}

.today-bubble__time {
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(0.72rem, calc(var(--bubble-size) * 0.068), 0.92rem);
    font-weight: 800;
}

.today-bubble.is-popping {
    pointer-events: none;
    z-index: 10;
}

.today-bubble.is-popping .today-bubble__drift {
    animation-play-state: paused;
}

.today-bubble.is-popping .today-bubble__scale {
    animation: todayBubblePop 360ms cubic-bezier(0.28, 0.84, 0.42, 1) forwards;
}

.today-bubble.is-popping .today-bubble__surface::before {
    animation: none;
}

.today-empty-bubbles {
    min-height: 20rem;
    border: 1px dashed rgba(140, 154, 166, 0.28);
    border-radius: 8px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.6rem;
    color: var(--muted);
    text-align: center;
}

.today-empty-bubbles i {
    font-size: 2.4rem;
}

.today-empty-bubbles strong {
    color: var(--text);
    font-size: 1.25rem;
}

@keyframes todayItemEnter {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes todayPanelGlow {
    from {
        border-color: rgba(140, 154, 166, 0.22);
    }
    to {
        border-color: rgba(93, 207, 178, 0.42);
    }
}

@keyframes todayHeroRing {
    from {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.72;
    }
    to {
        transform: translate3d(-1.6rem, 1.4rem, 0) scale(1.08);
        opacity: 1;
    }
}

@keyframes todayHeroIconFloat {
    0%,
    100% {
        transform: translate3d(0, 0, 0) rotate(-2deg);
    }
    50% {
        transform: translate3d(0, -0.65rem, 0) rotate(3deg);
    }
}

@keyframes todayStatIconPulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 hsla(var(--stat-hue), 80%, 62%, 0.22);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 0 12px hsla(var(--stat-hue), 80%, 62%, 0);
    }
}

@keyframes todayGridIconFloat {
    0%,
    100% {
        transform: translate3d(0, 0, 0) rotate(var(--float-rotate, -6deg));
    }
    45% {
        transform: translate3d(1.2rem, -1.1rem, 0) rotate(calc(var(--float-rotate, -6deg) + 16deg));
    }
    72% {
        transform: translate3d(-0.7rem, 0.8rem, 0) rotate(calc(var(--float-rotate, -6deg) - 10deg));
    }
}

@keyframes todayBubbleDrift {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    32% {
        transform: translate3d(var(--bubble-float-x), var(--bubble-float-y), 0);
    }
    66% {
        transform: translate3d(calc(var(--bubble-float-x) * -0.55), calc(var(--bubble-float-y) * -0.65), 0);
    }
}

@keyframes todayBubbleSheen {
    0%,
    42% {
        opacity: 0;
        transform: translateX(-72%) rotate(8deg);
    }
    58% {
        opacity: 0.55;
    }
    82%,
    100% {
        opacity: 0;
        transform: translateX(72%) rotate(8deg);
    }
}

@keyframes todayBubblePop {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    55% {
        opacity: 1;
        transform: scale(1.22);
    }
    100% {
        opacity: 0;
        transform: scale(0.08);
    }
}

@media (max-width: 920px) {
    .today-hero,
    .today-grid {
        grid-template-columns: 1fr;
    }

    .today-date-filter {
        justify-content: flex-end;
        margin: -0.25rem 0 0.2rem;
    }

    .today-date-filter__form {
        width: max-content;
        max-width: 100%;
        align-items: center;
        justify-content: flex-start;
        gap: 0.45rem;
        padding: 0.4rem;
    }

    .today-date-filter__form > label {
        flex: 0 1 auto;
        min-width: 0;
    }

    .today-date-filter__select {
        min-width: 9rem;
        width: 9rem;
    }

    .today-date-filter__custom {
        flex: 0 0 auto;
    }

    .today-date-filter__custom input[type="date"] {
        width: 8.75rem;
        max-width: 8.75rem;
    }

    .today-date-filter__actions {
        flex: 0 0 auto;
    }

    .today-hero__icon-field {
        display: none;
    }

    .today-hero,
    .today-map-shell,
    .today-bubble-panel {
        min-height: auto;
        margin-bottom: 1rem;
    }

    .today-hero {
        gap: 0.65rem;
    }

    .today-hero__copy {
        min-height: 13.5rem;
        padding: 1.2rem 1.35rem;
    }

    .today-hero__copy h1 {
        font-size: clamp(2.65rem, 13vw, 4.2rem);
        line-height: 0.95;
    }

    .today-hero__copy p {
        font-size: clamp(1rem, 5vw, 1.35rem);
    }

    .today-hero__stats {
        padding: 0.65rem;
        gap: 0.55rem;
    }

    .today-stat-card {
        min-height: 7.2rem;
        padding: 1rem 0.8rem 0.95rem;
    }

    .today-stat-card::before {
        inset: auto 0.65rem 0.65rem 0.65rem;
        height: 0.2rem;
    }

    .today-stat-card > i {
        right: 0.75rem;
        top: 0.75rem;
        width: 2.65rem;
        height: 2.65rem;
        font-size: 1.05rem;
    }

    .today-hero__stats span {
        max-width: calc(100% - 3.1rem);
        font-size: 0.68rem;
        letter-spacing: 0.08em;
    }

    .today-hero__stats strong {
        margin-top: 0.35rem;
        font-size: clamp(1.8rem, 9vw, 2.8rem);
    }

    .today-map {
        height: 520px;
        min-height: 440px;
    }

    .today-bubble-field {
        min-height: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        padding: 1rem 0;
    }

    .today-bubble {
        position: relative;
        left: auto;
        top: auto;
        margin-left: 0;
        margin-top: 0;
    }

    .today-bubble.is-popping {
        animation: none;
    }

    .today-bubble.is-visible .today-bubble__drift {
        animation: todayBubbleDriftMobile var(--bubble-float-duration, 31s) ease-in-out calc(var(--bubble-delay, 0ms) + 900ms) infinite;
    }
}

@media (max-width: 560px) {
    .today-date-filter__form {
        flex-wrap: wrap;
    }

    .today-hero__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .today-map-shell__header,
    .today-list__item {
        grid-template-columns: 1fr;
    }

    .today-map-shell__header {
        display: grid;
    }

    .today-map {
        height: 420px;
        min-height: 360px;
    }

    .today-bubble-panel__header {
        flex-direction: column;
    }

    .today-bubble-panel__links {
        justify-content: flex-start;
    }

    .today-bubble {
        width: min(var(--bubble-size), 11.5rem);
        height: min(var(--bubble-size), 11.5rem);
    }

    .today-bubble--charge {
        width: min(var(--bubble-size), 13rem);
        height: min(var(--bubble-size), 13rem);
    }
}

@keyframes todayBubbleDriftMobile {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    32% {
        transform: translate3d(calc(var(--bubble-float-x) * 0.45), calc(var(--bubble-float-y) * 0.45), 0);
    }
    66% {
        transform: translate3d(calc(var(--bubble-float-x) * -0.25), calc(var(--bubble-float-y) * -0.3), 0);
    }
}

@supports (-moz-appearance: none) {
    .today-bubble-panel.today-scroll-scene {
        transform: none;
    }

    .today-bubble {
        overflow: visible;
        transform: none;
    }

    .today-bubble::before,
    .today-bubble::after {
        content: "";
        position: absolute;
        pointer-events: none;
        border-radius: 50%;
    }

    .today-bubble::before {
        inset: 0;
        z-index: 0;
        border: 1px solid hsla(var(--bubble-hue), 82%, 76%, 0.58);
        background:
            radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.62), transparent 16%),
            radial-gradient(circle at 64% 18%, hsla(var(--bubble-hue), 95%, 82%, 0.24), transparent 30%),
            radial-gradient(circle at 70% 82%, hsla(var(--bubble-hue), 84%, 32%, 0.96), transparent 58%),
            linear-gradient(135deg, hsla(var(--bubble-hue), 82%, 54%, 0.98), hsla(var(--bubble-hue), 80%, 23%, 0.98));
        box-shadow:
            inset 0 2px 0 rgba(255, 255, 255, 0.5),
            inset 14px 18px 28px rgba(255, 255, 255, 0.08),
            inset -18px -24px 34px rgba(2, 8, 13, 0.32),
            0 22px 48px rgba(2, 8, 13, 0.32),
            0 0 44px hsla(var(--bubble-hue), 86%, 58%, 0.26);
    }

    .today-bubble::after {
        inset: 9%;
        z-index: 0;
        border: 1px solid rgba(255, 255, 255, 0.22);
        box-shadow:
            inset 0 0 22px rgba(255, 255, 255, 0.06),
            0 0 18px hsla(var(--bubble-hue), 90%, 70%, 0.12);
    }

    .today-bubble--charge::before {
        border: 0;
        border-radius: 0;
        clip-path: polygon(50% 1%, 79% 10%, 97% 35%, 97% 65%, 79% 90%, 50% 99%, 21% 90%, 3% 65%, 3% 35%, 21% 10%);
        background:
            radial-gradient(circle at 33% 24%, rgba(255, 255, 255, 0.68), transparent 14%),
            radial-gradient(circle at 64% 20%, rgba(255, 246, 184, 0.32), transparent 30%),
            radial-gradient(circle at 68% 76%, rgba(132, 83, 12, 0.96), transparent 56%),
            linear-gradient(135deg, rgba(255, 223, 103, 0.99), rgba(187, 119, 22, 0.99));
        box-shadow:
            inset 0 2px 0 rgba(255, 255, 255, 0.56),
            inset 14px 18px 28px rgba(255, 255, 255, 0.1),
            inset -16px -20px 28px rgba(87, 51, 0, 0.28);
    }

    .today-bubble--charge::after {
        border: 0;
        border-radius: 0;
        clip-path: polygon(50% 1%, 79% 10%, 97% 35%, 97% 65%, 79% 90%, 50% 99%, 21% 90%, 3% 65%, 3% 35%, 21% 10%);
        background: rgba(255, 255, 255, 0.13);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    }

    .today-bubble__drift,
    .today-bubble__scale,
    .today-bubble.is-visible .today-bubble__drift,
    .today-bubble.is-visible .today-bubble__scale,
    .today-bubble:hover .today-bubble__scale,
    .today-bubble.is-popping .today-bubble__scale {
        animation: none !important;
        backface-visibility: visible;
        transform: none !important;
        transition: none !important;
        will-change: auto;
    }

    .today-bubble__drift {
        position: relative;
        z-index: 1;
    }

    .today-bubble__surface,
    .today-bubble:hover .today-bubble__surface {
        background: none;
        border: 0;
        box-shadow: none;
        contain: none;
        isolation: auto;
        overflow: visible;
    }

    .today-bubble__surface::before,
    .today-bubble__surface::after {
        content: none;
    }

    .today-bubble.is-popping {
        opacity: 0;
        transition: opacity 180ms ease;
    }
}
