.service-page {
    --service-bg: #f3f6fb;
    --service-surface: #ffffff;
    --service-ink: #13233a;
    --service-muted: #66758a;
    --service-blue: #164f96;
    --service-blue-dark: #0d376e;
    --service-blue-soft: #e9f1fb;
    --service-accent: #ef5b3f;
    --service-success: #17754b;
    --service-success-soft: #e4f5eb;
    --service-danger: #a43d32;
    --service-danger-soft: #fde9e6;
    --service-border: #dce4ef;
    --service-radius: 20px;
    --service-shadow: 0 18px 48px rgba(21, 51, 87, 0.1);
    min-height: calc(100vh - 64px);
    padding: clamp(28px, 5vw, 64px) 20px 72px;
    color: var(--service-ink);
    background:
        radial-gradient(circle at 8% 0%, rgba(39, 111, 189, 0.14), transparent 30%),
        radial-gradient(circle at 94% 12%, rgba(71, 151, 130, 0.11), transparent 24%),
        var(--service-bg);
}

.service-page *,
.service-page *::before,
.service-page *::after {
    box-sizing: border-box;
}

.service-page [hidden] {
    display: none !important;
}

.service-shell {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.service-hero,
.service-card,
.service-search-card {
    border: 1px solid rgba(220, 228, 239, 0.92);
    border-radius: var(--service-radius);
    background: var(--service-surface);
    box-shadow: var(--service-shadow);
}

.service-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
    gap: 30px 48px;
    overflow: hidden;
    padding: clamp(24px, 4vw, 44px);
    margin-bottom: 24px;
}

.service-hero::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 7px;
    height: 100%;
    content: "";
    background: linear-gradient(180deg, var(--service-blue), #3f8ec8 58%, #61aa8b);
}

.service-hero__brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.service-hero__brand img {
    width: 86px;
    height: 86px;
    flex: 0 0 auto;
    object-fit: contain;
}

.service-eyebrow {
    margin: 0 0 6px;
    color: var(--service-blue);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
}

.service-hero h1,
.service-search-card h1 {
    margin: 0;
    color: var(--service-ink);
    font-size: clamp(2rem, 4vw, 3.35rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.04;
}

.service-hero__summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.service-label,
.service-details dt,
.trip-metrics dt {
    display: block;
    margin-bottom: 5px;
    color: var(--service-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.065em;
    line-height: 1.35;
    text-transform: uppercase;
}

.service-code {
    display: block;
    color: var(--service-ink);
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.service-status {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.service-status--completed {
    color: var(--service-success);
    background: var(--service-success-soft);
}

.service-status--cancelled {
    color: var(--service-danger);
    background: var(--service-danger-soft);
}

.service-status--active {
    color: var(--service-blue-dark);
    background: var(--service-blue-soft);
}

.service-hero__billing {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-top: 28px;
    border-top: 1px solid var(--service-border);
}

.service-total span {
    display: block;
    margin-bottom: 2px;
    color: var(--service-muted);
    font-size: 0.9rem;
}

.service-total strong {
    color: var(--service-ink);
    font-size: clamp(2.4rem, 6vw, 4.25rem);
    font-weight: 700;
    letter-spacing: -0.055em;
    line-height: 1;
}

.service-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border: 0;
    border-radius: 12px;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    line-height: 1.2;
    text-transform: uppercase;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.service-button:hover,
.service-button:focus-visible {
    transform: translateY(-2px);
}

.service-button:focus-visible {
    outline: 3px solid rgba(22, 79, 150, 0.28);
    outline-offset: 3px;
}

.service-button--primary {
    color: #ffffff;
    background: var(--service-blue);
    box-shadow: 0 10px 24px rgba(22, 79, 150, 0.22);
}

.service-button--primary:hover,
.service-button--primary:focus-visible {
    color: #ffffff;
    background: var(--service-blue-dark);
}

.service-button--accent {
    color: #ffffff;
    background: var(--service-accent);
    box-shadow: 0 10px 24px rgba(239, 91, 63, 0.24);
}

.service-button--accent:hover,
.service-button--accent:focus-visible {
    color: #ffffff;
    background: #d94b32;
}

.service-button--secondary {
    color: var(--service-blue-dark);
    border: 1px solid #bdd0e8;
    background: var(--service-blue-soft);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.service-card {
    padding: clamp(22px, 3vw, 32px);
}

.service-card__heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.service-card__heading h2 {
    margin: 0;
    color: var(--service-ink);
    font-size: clamp(1.3rem, 2.4vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.service-card__icon {
    display: inline-grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 13px;
    color: var(--service-blue);
    background: var(--service-blue-soft);
    font-size: 1.08rem;
}

.driver-profile {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 24px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--service-border);
}

.driver-photo {
    position: relative;
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
    overflow: hidden;
    border: 4px solid #ffffff;
    border-radius: 50%;
    background: var(--service-blue-soft);
    box-shadow: 0 0 0 1px var(--service-border), 0 10px 24px rgba(19, 35, 58, 0.12);
}

.driver-photo__fallback,
.driver-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.driver-photo__fallback {
    display: grid;
    place-items: center;
    color: var(--service-blue);
    font-size: 2rem;
}

.driver-photo img {
    z-index: 1;
    object-fit: cover;
    background: var(--service-blue-soft);
}

.driver-profile__identity {
    min-width: 0;
}

.driver-profile__identity strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 1.1rem;
    line-height: 1.4;
}

.service-details,
.trip-metrics {
    display: grid;
    padding: 0;
    margin: 0;
    list-style: none;
}

.service-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.service-details__wide {
    grid-column: 1 / -1;
}

.service-details dd,
.trip-metrics dd {
    margin: 0;
    color: var(--service-ink);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.service-plate {
    display: inline-block;
    padding: 4px 9px;
    border: 1px solid #bfc9d6;
    border-radius: 6px;
    background: #f7f9fc;
    letter-spacing: 0.08em;
}

.trip-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.trip-metrics > div {
    min-height: 105px;
    padding: 18px;
    border: 1px solid #d9e4f1;
    border-radius: 15px;
    background: linear-gradient(145deg, #f8fbff, #eef4fb);
}

.trip-metrics dd {
    margin-top: 13px;
    font-size: 1.13rem;
}

.route-card,
.carbon-callout,
.route-map-card {
    margin-bottom: 24px;
}

.route-timeline {
    --route-timeline-gap: 28px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--route-timeline-gap);
    padding: 0;
    margin: 0;
    list-style: none;
}

.route-timeline__item--start::after {
    position: absolute;
    top: 12px;
    left: 9px;
    width: 3px;
    height: calc(100% + var(--route-timeline-gap));
    content: "";
    border-radius: 999px;
    background: linear-gradient(180deg, var(--service-success), var(--service-blue));
}

.route-timeline__item {
    position: relative;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 13px;
}

.route-timeline__marker {
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border: 5px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px currentColor;
}

.route-timeline__item--start .route-timeline__marker {
    color: var(--service-success);
    background: var(--service-success);
}

.route-timeline__item--end .route-timeline__marker {
    color: var(--service-blue);
    background: var(--service-blue);
}

.route-timeline strong,
.route-timeline time {
    display: block;
}

.route-timeline strong {
    overflow-wrap: anywhere;
    font-size: 1.05rem;
    line-height: 1.45;
}

.route-timeline time {
    margin-top: 7px;
    color: var(--service-muted);
    font-size: 0.9rem;
}

.carbon-callout {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 26px;
    border: 1px solid #cde4d8;
    border-radius: 18px;
    color: #175538;
    background: linear-gradient(115deg, #eef9f3, #e2f3ea);
}

.carbon-callout__icon {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--service-success);
    font-size: 1.1rem;
}

.carbon-callout span,
.carbon-callout strong {
    display: block;
}

.carbon-callout span {
    margin-bottom: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.carbon-callout strong {
    font-size: 1.05rem;
    line-height: 1.45;
}

.route-map-card {
    overflow: hidden;
    padding-bottom: 0;
}

.service-map {
    width: calc(100% + clamp(44px, 6vw, 64px));
    height: clamp(320px, 48vw, 470px);
    margin-right: calc(clamp(22px, 3vw, 32px) * -1);
    margin-left: calc(clamp(22px, 3vw, 32px) * -1);
    border-top: 1px solid var(--service-border);
    background: #e8eef5;
}

.route-map-label {
    padding: 5px 9px;
    border: 0;
    border-radius: 8px;
    color: var(--service-ink);
    box-shadow: 0 6px 16px rgba(19, 35, 58, 0.16);
    font-size: 0.78rem;
    font-weight: 700;
}

.service-search-card {
    width: min(580px, 100%);
    padding: clamp(28px, 6vw, 52px);
    margin: min(8vh, 72px) auto 0;
    text-align: center;
}

.service-search-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 24px;
    object-fit: contain;
}

.service-search-copy {
    max-width: 430px;
    margin: 18px auto 30px;
    color: var(--service-muted);
    font-size: 1rem;
    line-height: 1.65;
}

.service-search-form {
    display: grid;
    gap: 12px;
    text-align: left;
}

.service-search-form label {
    color: var(--service-ink);
    font-size: 0.86rem;
    font-weight: 700;
}

.service-search-form input[type="number"] {
    box-sizing: border-box;
    width: 100%;
    height: 52px;
    padding: 0 15px;
    margin: 0 0 6px;
    border: 1px solid #bdcada;
    border-radius: 12px;
    color: var(--service-ink);
    background: #f9fbfd;
    box-shadow: none;
    font-size: 1rem;
}

.service-search-form input[type="number"]:focus {
    border-color: var(--service-blue) !important;
    box-shadow: 0 0 0 3px rgba(22, 79, 150, 0.14) !important;
}

.service-empty-state__icon {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    margin: 0 auto 22px;
    border-radius: 50%;
    color: var(--service-blue);
    background: var(--service-blue-soft);
    font-size: 1.35rem;
}

.service-empty-state .service-button {
    margin-top: 8px;
}

@media (max-width: 760px) {
    .service-page {
        min-height: calc(100vh - 56px);
        padding: 22px 16px 48px;
    }

    .service-hero {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px 22px 26px;
    }

    .service-hero__brand {
        align-items: flex-start;
        gap: 15px;
    }

    .service-hero__brand img {
        width: 64px;
        height: 64px;
    }

    .service-hero h1 {
        font-size: clamp(1.85rem, 9vw, 2.5rem);
    }

    .service-hero__summary {
        justify-content: space-between;
    }

    .service-hero__billing {
        align-items: stretch;
        flex-direction: column;
    }

    .service-hero__billing .service-button {
        width: 100%;
    }

    .service-card {
        padding: 22px;
    }

    .carbon-callout {
        align-items: flex-start;
        padding: 20px;
    }

    .service-map {
        width: calc(100% + 44px);
        height: 330px;
        margin-right: -22px;
        margin-left: -22px;
    }
}

@media (max-width: 420px) {
    .service-hero__summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .service-total strong {
        font-size: 2.75rem;
    }

    .driver-profile {
        align-items: flex-start;
    }

    .driver-photo {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
    }

    .service-details,
    .trip-metrics {
        grid-template-columns: 1fr;
    }

    .service-details__wide {
        grid-column: auto;
    }

    .trip-metrics > div {
        min-height: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-page *,
    .service-page *::before,
    .service-page *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
