/* ==========================================================
   DRIVER DASHBOARD
   Layout and components for dashboard.html (js/dashboard.js).
   The portal shell (header, sidebar, drawer) lives in site.css.
   ========================================================== */

.dash-main {
    --dash-page: #030912;
    --dash-panel: #0a1422;
    --dash-panel-raised: #0f1c2e;
    --dash-border: #1e3246;
    --dash-accent: #ffbd19;
    --dash-green: #55cc63;
    --dash-blue: #3b8df0;
    --dash-red: #ff6b6b;
    --dash-text: #f4f7fb;
    --dash-muted: #9fb1c3;
    --dash-radius: 14px;

    min-width: 0;
    width: 100%;
    max-width: 1480px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 22px 24px 36px;
    color: var(--dash-text);
    font-variant-numeric: tabular-nums;
}

.dash-main h1,
.dash-main h2,
.dash-main h3,
.dash-main p {
    margin: 0;
}

.dash-main h1,
.dash-main h2,
.dash-main h3 {
    color: var(--dash-text);
}

.dash-route-large {
    color: var(--dash-text);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.dash-main .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.dash-muted {
    color: var(--dash-muted);
    font-size: 13.5px;
    line-height: 1.5;
}

/* ---------- Title row (small screens only) ---------- */

.dash-topline {
    display: none;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.dash-topline-title {
    font-size: 22px;
    font-weight: 700;
}

/* ---------- CAPS status pill ---------- */

.dash-caps-pill {
    min-height: 32px;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--dash-border, #1e3246);
    border-radius: 999px;
    background: #0a1422;
    color: #c6d3e0;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

    .dash-caps-pill > span:not(.dash-caps-dot) {
        overflow: hidden;
        text-overflow: ellipsis;
    }

.dash-caps-dot {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #64748b;
}

.dash-caps-pill.is-live {
    border-color: rgba(85, 204, 99, .45);
    background: rgba(85, 204, 99, .10);
    color: #bff0c5;
}

    .dash-caps-pill.is-live .dash-caps-dot {
        background: #55cc63;
        box-shadow: 0 0 0 4px rgba(85, 204, 99, .18);
        animation: dash-pulse 1.8s ease-in-out infinite;
    }

.dash-caps-pill.is-error .dash-caps-dot {
    background: #ff6b6b;
}

a.dash-caps-pill:hover {
    border-color: rgba(255, 189, 25, .5);
}

@keyframes dash-pulse {
    50% {
        box-shadow: 0 0 0 7px rgba(85, 204, 99, 0);
    }
}

/* ---------- Cards ---------- */

.dash-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius);
    background: var(--dash-panel);
}

.dash-card-kicker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px !important;
    color: #c6d3e0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

    .dash-card-kicker > i {
        color: var(--dash-accent);
    }

.dash-kicker-note {
    color: var(--dash-muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.dash-card-title,
.dash-card-heading h2 {
    font-size: 17px;
    font-weight: 700;
}

.dash-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.dash-card-link,
.dash-section-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--dash-accent);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

    .dash-card-link:hover,
    .dash-section-link:hover {
        text-decoration: underline;
    }

.dash-card-link {
    margin-top: auto;
    padding-top: 12px;
}

/* ---------- Buttons and badges ---------- */

.dash-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid var(--dash-accent);
    border-radius: 10px;
    background: var(--dash-accent);
    color: #1b1300;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

    .dash-button:hover {
        filter: brightness(1.08);
    }

    .dash-button.is-ghost {
        border-color: var(--dash-border);
        background: var(--dash-panel-raised);
        color: var(--dash-text);
    }

        .dash-button.is-ghost:hover {
            border-color: rgba(255, 189, 25, .5);
            filter: none;
        }

    .dash-button:disabled {
        opacity: .5;
        cursor: not-allowed;
    }

.dash-button-small {
    min-height: 32px;
    padding: 0 12px;
    font-size: 12.5px;
}

.dash-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

    .dash-badge.is-verified {
        background: rgba(85, 204, 99, .12);
        color: #8fe39a;
    }

    .dash-badge.is-imported {
        background: rgba(59, 141, 240, .13);
        color: #9cc5f7;
    }

.dash-status {
    display: inline-block;
    margin-left: 6px;
    color: var(--dash-muted);
    font-size: 12px;
}

/* ---------- Progress bars ---------- */

.dash-progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #16263a;
}

    .dash-progress > span {
        display: block;
        height: 100%;
        min-width: 4px;
        border-radius: inherit;
        background: linear-gradient(90deg, #ffbd19, #ffd46a);
    }

/* ---------- Skeleton (loading) ---------- */

.dash-skeleton {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dash-skeleton-line {
    display: block;
    width: 60%;
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg, #102033 0%, #16293f 50%, #102033 100%);
    background-size: 200% 100%;
    animation: dash-shimmer 1.4s linear infinite;
}

    .dash-skeleton-line.wide {
        width: 85%;
        height: 26px;
    }

    .dash-skeleton-line.short {
        width: 35%;
    }

@keyframes dash-shimmer {
    to {
        background-position: -200% 0;
    }
}

/* ---------- Hero ---------- */

.dash-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr);
    gap: 18px;
    align-items: stretch;
}

.dash-hero-primary {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 189, 25, .10), transparent 42%),
        linear-gradient(180deg, #0f1c2e, #0a1422);
}

.dash-hero-secondary {
    min-width: 0;
}

.dash-eyebrow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--dash-accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

    .dash-eyebrow.is-live {
        color: #8fe39a;
    }

.dash-eyebrow-note {
    color: var(--dash-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.dash-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--dash-green);
    box-shadow: 0 0 0 4px rgba(85, 204, 99, .18);
    animation: dash-pulse 1.8s ease-in-out infinite;
}

.dash-hero-title {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.dash-hero-sub {
    color: var(--dash-muted);
    font-size: 14px;
    font-weight: 500;
}

.dash-route-arrow {
    margin: 0 6px;
    color: var(--dash-accent);
    font-size: .7em;
    vertical-align: middle;
}

.dash-hero-meta {
    color: #c6d3e0;
    font-size: 14.5px;
    overflow-wrap: anywhere;
}

.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

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

.dash-stat {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid #172b40;
    border-radius: 11px;
    background: rgba(3, 9, 18, .45);
}

    .dash-stat span {
        color: var(--dash-muted);
        font-size: 12px;
        font-weight: 600;
    }

    .dash-stat strong {
        font-size: 18px;
        font-weight: 700;
        overflow-wrap: anywhere;
    }

        .dash-stat strong small {
            color: var(--dash-muted);
            font-size: 12px;
        }

        .dash-stat strong em {
            display: block;
            color: var(--dash-muted);
            font-size: 12px;
            font-style: normal;
            font-weight: 500;
        }

    .dash-stat.is-good strong {
        color: #8fe39a;
    }

    .dash-stat.is-ok strong {
        color: #ffd46a;
    }

    .dash-stat.is-bad strong {
        color: #ff9a9a;
    }

.dash-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: auto;
}

    .dash-hero-actions .dash-badge {
        margin-right: auto;
    }

/* This week */

.dash-week {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

    .dash-week .dash-card-kicker {
        margin-bottom: 0 !important;
    }

.dash-week-rows {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-week-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: baseline;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #14263a;
}

    .dash-week-row > span {
        color: var(--dash-muted);
        font-size: 13.5px;
    }

    .dash-week-row > strong {
        font-size: 17px;
    }

.dash-change {
    min-width: 64px;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

    .dash-change.is-up {
        color: #8fe39a;
    }

    .dash-change.is-down {
        color: #ff9a9a;
    }

    .dash-change.is-flat {
        color: var(--dash-muted);
        font-weight: 500;
    }

.dash-activity {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.dash-activity-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

    .dash-activity-day i {
        width: 100%;
        height: 26px;
        border-radius: 6px;
        background: #13243a;
    }

    .dash-activity-day.is-active i {
        background: rgba(255, 189, 25, .55);
    }

    .dash-activity-day.is-busy i {
        background: var(--dash-accent);
    }

    .dash-activity-day small {
        color: var(--dash-muted);
        font-size: 11px;
    }

.dash-streak {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c6d3e0;
    font-size: 13.5px;
}

    .dash-streak i {
        color: #ff8a3d;
    }

/* New driver checklist */

.dash-setup-progress {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    color: var(--dash-muted);
    font-size: 13px;
    font-weight: 600;
}

.dash-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dash-check {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid #172b40;
    border-radius: 11px;
    background: rgba(3, 9, 18, .4);
}

.dash-check-mark {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #2a4460;
    border-radius: 50%;
    color: var(--dash-muted);
    font-size: 13px;
    font-weight: 700;
}

.dash-check.is-done .dash-check-mark {
    border-color: var(--dash-green);
    background: var(--dash-green);
    color: #04210b;
}

.dash-check-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .dash-check-copy strong {
        font-size: 14.5px;
    }

    .dash-check-copy small {
        color: var(--dash-muted);
        font-size: 12.5px;
        line-height: 1.4;
    }

.dash-check.is-done .dash-check-copy strong {
    color: #b9c7d5;
}

.dash-optional {
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #16263a;
    color: var(--dash-muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
}

.dash-setup-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dash-unlocks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.dash-unlock {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px dashed #26405a;
    border-radius: 11px;
    color: var(--dash-text);
    text-decoration: none;
}

    .dash-unlock:hover {
        border-color: rgba(255, 189, 25, .5);
    }

    .dash-unlock > i {
        margin-top: 2px;
        color: var(--dash-accent);
    }

    .dash-unlock span {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .dash-unlock strong {
        font-size: 13.5px;
    }

    .dash-unlock small {
        color: var(--dash-muted);
        font-size: 12px;
        line-height: 1.35;
    }

.dash-link-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

    .dash-link-list a {
        min-height: 38px;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 10px;
        border-radius: 9px;
        color: var(--dash-text);
        font-size: 14px;
        text-decoration: none;
    }

        .dash-link-list a:hover {
            background: rgba(255, 255, 255, .04);
        }

        .dash-link-list a i {
            width: 18px;
            color: var(--dash-blue);
            text-align: center;
        }

/* ---------- Sections ---------- */

.dash-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dash-section-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
}

    .dash-section-heading h2 {
        font-size: 18px;
        font-weight: 700;
    }

.dash-section-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--dash-muted);
    font-size: 12.5px;
}

    .dash-section-note i {
        color: var(--dash-green);
    }

.dash-section-heading .dash-section-link {
    margin-left: auto;
}

/* ---------- KPI strip ---------- */

.dash-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.dash-kpi {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius);
    background: var(--dash-panel);
}

.dash-kpi-label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--dash-muted);
    font-size: 12.5px;
    font-weight: 600;
}

    .dash-kpi-label i {
        color: var(--dash-accent);
    }

.dash-kpi-value {
    font-size: 25px;
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

    .dash-kpi-value small {
        color: var(--dash-muted);
        font-size: 13px;
        font-weight: 600;
    }

.dash-kpi-sub {
    color: var(--dash-muted);
    font-size: 12px;
    line-height: 1.35;
}

    .dash-kpi-sub[data-tone="good"] {
        color: #8fe39a;
    }

    .dash-kpi-sub[data-tone="bad"] {
        color: #ffc07a;
    }

/* ---------- Goals ---------- */

.dash-goals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.dash-goal {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .dash-goal .dash-card-kicker {
        margin-bottom: 4px !important;
    }

.dash-goal-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.dash-goal-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 189, 25, .4);
    border-radius: 11px;
    background: rgba(255, 189, 25, .08);
    color: var(--dash-accent);
}

.dash-goal-title {
    color: var(--dash-text);
    font-size: 16px;
    font-weight: 700;
}

.dash-goal-numbers {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--dash-muted);
    font-size: 13px;
}

    .dash-goal-numbers strong {
        color: var(--dash-text);
        font-size: 15px;
    }

    .dash-goal-numbers span {
        margin-left: auto;
        color: var(--dash-accent);
        font-weight: 700;
    }

.dash-ladder,
.dash-records {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

    .dash-ladder li {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        border: 1px solid #172b40;
        border-radius: 10px;
        font-size: 14px;
    }

        .dash-ladder li.is-you {
            border-color: rgba(255, 189, 25, .45);
            background: rgba(255, 189, 25, .08);
        }

.dash-ladder-rank {
    color: var(--dash-muted);
    font-weight: 700;
}

.dash-ladder li.is-you .dash-ladder-rank {
    color: var(--dash-accent);
}

.dash-ladder-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-ladder-value {
    color: #c6d3e0;
    font-weight: 600;
}

.dash-records li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #172b40;
    border-radius: 10px;
    font-size: 14px;
}

    .dash-records li span {
        color: var(--dash-muted);
    }

    .dash-records li.is-highlight {
        border-color: rgba(59, 141, 240, .5);
        background: rgba(59, 141, 240, .08);
    }

/* ---------- Recent trips ---------- */

.dash-lower {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr);
    gap: 18px;
    align-items: start;
}

.dash-trip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

    .dash-trip-table th {
        padding: 0 10px 10px;
        border-bottom: 1px solid #172b40;
        color: var(--dash-muted);
        font-size: 12px;
        font-weight: 600;
        text-align: left;
        white-space: nowrap;
    }

    .dash-trip-table td {
        padding: 12px 10px;
        border-bottom: 1px solid #13243a;
        vertical-align: middle;
        white-space: nowrap;
    }

    .dash-trip-table tr:last-child td {
        border-bottom: 0;
    }

    .dash-trip-table tbody tr:not(.is-imported):hover {
        background: rgba(255, 255, 255, .025);
    }

td.dash-trip-main {
    width: 100%;
    min-width: 0;
    white-space: normal;
}

    td.dash-trip-main small {
        display: block;
        margin-top: 3px;
        color: var(--dash-muted);
        font-size: 12.5px;
    }

.dash-trip-route {
    color: var(--dash-text);
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}

a.dash-trip-route:hover {
    color: var(--dash-accent);
}

.dash-trip-go a {
    color: var(--dash-muted);
}

.dash-empty {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px dashed #26405a;
    border-radius: 12px;
    color: var(--dash-muted);
    font-size: 14px;
}

    .dash-empty > i {
        margin-top: 2px;
        color: var(--dash-accent);
        font-size: 18px;
    }

    .dash-empty div {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .dash-empty strong {
        color: var(--dash-text);
    }

.dash-footnote {
    margin-top: 12px !important;
    color: var(--dash-muted);
    font-size: 12px;
    line-height: 1.45;
}

/* ---------- More for you ---------- */

.dash-side {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dash-more-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.dash-more-item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 11px;
    color: var(--dash-text);
    text-decoration: none;
}

a.dash-more-item:hover {
    background: rgba(255, 255, 255, .04);
}

.dash-more-icon,
.dash-map-link-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(59, 141, 240, .12);
    color: #8cbcf6;
}

.dash-more-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .dash-more-copy strong {
        font-size: 14px;
    }

    .dash-more-copy small {
        color: var(--dash-muted);
        font-size: 12.5px;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

.dash-more-chevron {
    color: var(--dash-muted);
    font-size: 12px;
}

.dash-map-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--dash-text);
    text-decoration: none;
}

    .dash-map-link:hover {
        border-color: rgba(255, 189, 25, .45);
    }

.dash-map-link-icon {
    background: rgba(85, 204, 99, .12);
    color: #8fe39a;
}

/* ---------- Footer ---------- */

.dash-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 20px;
    padding-top: 16px;
    border-top: 1px solid #13243a;
    color: var(--dash-muted);
    font-size: 13px;
}

    .dash-footer strong {
        color: var(--dash-accent);
    }

.dash-footer-caps i {
    margin-right: 6px;
    color: var(--dash-accent);
}

.dash-footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #b8c1ff;
    font-weight: 600;
    text-decoration: none;
}

    .dash-footer a:hover {
        text-decoration: underline;
    }

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 1360px) {

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

@media (max-width: 1180px) {

    .dash-hero,
    .dash-lower {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .dash-side {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
    }
}

@media (max-width: 900px) {

    .dash-main {
        gap: 18px;
        padding: 16px 16px 28px;
    }

    .dash-topline {
        display: flex;
    }

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

    .dash-side {
        display: flex;
    }
}

@media (max-width: 700px) {

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

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

    .dash-hero-title {
        font-size: 23px;
    }

    .dash-route-large {
        font-size: 21px;
    }

    .dash-hero-primary {
        padding: 18px;
    }

    .dash-card {
        padding: 16px;
    }

    /* Trip table becomes a stacked list. */
    .dash-trip-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .dash-trip-table,
    .dash-trip-table tbody {
        display: block;
    }

        .dash-trip-table tr {
            position: relative;
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 6px 10px;
            padding: 12px 28px 12px 0;
            border-bottom: 1px solid #13243a;
        }

            .dash-trip-table tr:last-child {
                border-bottom: 0;
            }

        .dash-trip-table td {
            padding: 0;
            border: 0;
            white-space: normal;
        }

            .dash-trip-table td[data-label]::before {
                content: attr(data-label);
                display: block;
                color: var(--dash-muted);
                font-size: 11px;
            }

    td.dash-trip-main,
    td.dash-trip-source {
        grid-column: 1 / -1;
    }

    td.dash-trip-go {
        position: absolute;
        top: 50%;
        right: 4px;
        transform: translateY(-50%);
    }

    .dash-setup-progress {
        grid-template-columns: minmax(0, 1fr);
    }

    .dash-check {
        grid-template-columns: 30px minmax(0, 1fr);
    }

        .dash-check > .dash-button {
            grid-column: 2;
            justify-self: start;
        }
}

@media (max-width: 420px) {

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

    .dash-kpi {
        padding: 13px;
    }

    .dash-kpi-value {
        font-size: 21px;
    }

    .dash-stats {
        gap: 8px;
    }

    .dash-stat {
        padding: 10px 11px;
    }

        .dash-stat strong {
            font-size: 16px;
        }
}

@media (prefers-reduced-motion: reduce) {

    .dash-caps-pill.is-live .dash-caps-dot,
    .dash-live-dot,
    .dash-skeleton-line {
        animation: none;
    }
}

/* A route used as the hero title stays on one flowing line. */
.dash-hero-title.dash-route {
    display: block;
}
