.vehicle-content {
    display: grid;
    grid-template-columns:
        minmax(250px, 0.8fr)
        minmax(0, 1.5fr);
    gap: 34px;
    padding: 34px 28px;
}

.battery-display {
    display: flex;
    align-items: center;
    gap: 22px;
}

.battery-shell {
    position: relative;
    width: 150px;
    height: 68px;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.52);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.045);
}

.battery-shell::after {
    content: "";
    position: absolute;
    top: 19px;
    right: -10px;
    width: 7px;
    height: 25px;
    border-radius: 0 5px 5px 0;
    background: rgba(255, 255, 255, 0.52);
}

.battery-fill {
    height: 100%;
    transition:
        width 450ms ease,
        background 300ms ease,
        box-shadow 300ms ease;
}

.battery-fill.battery-good {
    background:
        linear-gradient(
            90deg,
            #28b878,
            var(--success)
        );
    box-shadow:
        0 0 26px rgba(66, 211, 146, 0.38);
}

.battery-fill.battery-warning {
    background:
        linear-gradient(
            90deg,
            #d89a16,
            var(--warning)
        );
    box-shadow:
        0 0 26px rgba(255, 191, 105, 0.4);
}

.battery-fill.battery-critical {
    background:
        linear-gradient(
            90deg,
            var(--accent),
            var(--accent-light)
        );
    box-shadow:
        0 0 26px rgba(232, 33, 39, 0.48);
}

.battery-number {
    display: flex;
    align-items: baseline;
    font-size: clamp(3.2rem, 7vw, 5rem);
    font-weight: 850;
    letter-spacing: -0.07em;
}

.battery-number small {
    margin-left: 4px;
    color: var(--muted);
    font-size: 1.1rem;
}

.live-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--border);
}

.metric {
    min-height: 130px;
    padding: 22px;
    background: rgba(12, 15, 22, 0.84);
}

.metric-label {
    display: block;
    color: var(--muted);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.metric strong {
    display: block;
    margin-top: 20px;
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    letter-spacing: -0.055em;
}

.metric small {
    color: var(--muted);
    font-size: 0.85rem;
}

.card-footer {
    padding: 14px 28px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.8rem;
}

.headline-metric,
.challenge-count {
    display: flex;
    align-items: baseline;
    padding: 30px 28px 0;
}

.headline-metric strong,
.challenge-count strong {
    font-size: clamp(3.1rem, 6vw, 4.8rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.headline-metric > span,
.challenge-count > span {
    margin-left: 10px;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 750;
}

.headline-caption {
    margin: 13px 28px 28px;
    color: var(--muted);
}

.split-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    border-top: 1px solid var(--border);
    background: var(--border);
}

.split-metrics article {
    padding: 24px 28px;
    background: rgba(12, 15, 22, 0.84);
}

.split-metrics article > span {
    display: block;
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.split-metrics strong {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-top: 0;
    color: var(--text);
    font-size: clamp(1.7rem, 3vw, 2.25rem);
    font-weight: 850;
    line-height: 1;
    letter-spacing: -0.045em;
}

.split-metrics strong span {
    display: inline;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
}

.split-metrics strong small {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0;
}

.progress-track {
    height: 13px;
    margin: 0 28px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.075);
}

.progress-fill {
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            var(--accent),
            var(--accent-light)
        );
    box-shadow: 0 0 22px rgba(232, 33, 39, 0.45);
    transition: width 500ms ease;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 17px 28px 28px;
    color: var(--muted);
    font-size: 0.86rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 17px 21px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

td strong,
td small {
    display: block;
}

td small {
    margin-top: 4px;
    color: var(--muted);
}

.table-pill {
    padding: 6px 9px;
    font-size: 0.73rem;
    font-weight: 800;
}

.state-progress,
.recent-list {
    display: grid;
}

.state-row,
.recent-row {
    padding: 17px 28px;
    border-bottom: 1px solid var(--border);
}

.state-row:last-child,
.recent-row:last-child {
    border-bottom: 0;
}

.state-row-heading,
.recent-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.state-row-heading {
    margin-bottom: 10px;
}

.state-row-heading span:last-child,
.recent-row time {
    color: var(--muted);
    font-size: 0.8rem;
}

.state-row .progress-track {
    height: 8px;
    margin: 0;
}

.page-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 0.78rem;
}

@media (max-width: 820px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: auto;
    }

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

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

    .metric {
        min-height: auto;
    }
}

@media (max-width: 620px) {
    .page {
        width: min(100% - 22px, 1220px);
        padding-top: 28px;
    }

    .hero,
    .card-heading,
    .progress-meta,
    .page-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .battery-display {
        align-items: flex-start;
        flex-direction: column-reverse;
    }

    .split-metrics {
        grid-template-columns: 1fr;
    }

    th,
    td {
        padding: 14px;
    }
}
