:root {
    --brand-950: #0b2434;
    --brand-900: #102f42;
    --brand-800: #17465a;
    --brand-700: #1d5a6b;
    --brand-600: #237080;
    --brand-500: #2f8f98;
    --brand-400: #52aab0;
    --brand-100: #dceff0;
    --brand-50: #eff8f8;
    --ink-950: #122737;
    --ink-700: #3f5665;
    --ink-500: #6b7d88;
    --ink-300: #a7b4bc;
    --line: #dce5e8;
    --canvas: #f3f7f7;
    --surface: #ffffff;
    --success: #1f8c68;
    --success-soft: #e7f6ef;
    --warning: #c57b1b;
    --warning-soft: #fff4df;
    --danger: #c84747;
    --danger-soft: #fceaea;
    --info: #2873a6;
    --info-soft: #e8f3fa;
    --shadow-sm: 0 8px 24px rgba(18, 39, 55, 0.06);
    --shadow-lg: 0 28px 70px rgba(11, 36, 52, 0.16);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --sidebar-width: 250px;
    --header-height: 76px;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink-950);
    background: var(--canvas);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

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

img,
svg {
    display: block;
    max-width: 100%;
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand__mark {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 34px;
}

.brand__mark::before,
.brand__mark::after {
    position: absolute;
    content: "";
    left: 2px;
    width: 39px;
    height: 11px;
    border-radius: 3px 9px 3px 9px;
    transform: skewX(-17deg);
}

.brand__mark::before {
    top: 4px;
    background: var(--brand-500);
}

.brand__mark::after {
    top: 20px;
    left: 10px;
    width: 31px;
    background: var(--brand-700);
}

.brand__text {
    min-width: 0;
}

.brand__name {
    display: block;
    color: var(--ink-950);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.brand__sub {
    display: block;
    margin-top: 3px;
    color: var(--ink-500);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.22em;
    white-space: nowrap;
}

.portal-shell {
    min-height: 100vh;
}

.portal-sidebar {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    padding: 24px 18px;
    color: #dbe8ec;
    background:
        radial-gradient(circle at 12% 92%, rgba(47, 143, 152, 0.28), transparent 30%),
        linear-gradient(165deg, #0d293a 0%, #102f42 58%, #0a2231 100%);
    overflow-y: auto;
}

.portal-sidebar .brand__name {
    color: #fff;
}

.portal-sidebar .brand__sub {
    color: #8eb3bd;
}

.portal-sidebar .brand__mark::before {
    background: #55b3b8;
}

.portal-sidebar .brand__mark::after {
    background: #e3f2f3;
}

.sidebar-context {
    margin: 30px 8px 12px;
    color: #7fa3ad;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.sidebar-nav__item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #b8ced4;
    font-size: 15px;
    font-weight: 700;
    transition: 160ms ease;
}

.sidebar-nav__item:hover,
.sidebar-nav__item.is-active {
    color: #fff;
    background: rgba(93, 183, 188, 0.14);
    border-color: rgba(118, 204, 208, 0.2);
}

.sidebar-nav__icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    color: #75c3c7;
    font-size: 16px;
    font-weight: 900;
}

.sidebar-footer {
    margin-top: 34px;
    padding: 16px;
    border: 1px solid rgba(129, 189, 194, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-footer strong,
.sidebar-footer small {
    display: block;
}

.sidebar-footer strong {
    color: #fff;
    font-size: 15px;
}

.sidebar-footer small {
    margin-top: 3px;
    color: #8eb3bd;
    font-size: 12px;
}

.portal-main {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.portal-header {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: var(--header-height);
    padding: 12px clamp(20px, 3vw, 44px);
    border-bottom: 1px solid rgba(220, 229, 232, 0.9);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
}

.portal-header__title {
    min-width: 0;
}

.portal-header__title strong,
.portal-header__title small {
    display: block;
}

.portal-header__title strong {
    overflow: hidden;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-header__title small {
    margin-top: 2px;
    color: var(--ink-500);
    font-size: 12px;
}

.portal-header__tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 10px 6px 7px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.user-chip__avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-800));
    font-size: 13px;
    font-weight: 800;
}

.user-chip__text {
    max-width: 130px;
}

.user-chip__text strong,
.user-chip__text small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-chip__text strong {
    font-size: 13px;
}

.user-chip__text small {
    color: var(--ink-500);
    font-size: 11px;
}

.portal-content {
    width: min(1480px, 100%);
    margin: 0 auto;
    padding: clamp(24px, 3.2vw, 48px);
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.page-heading__eyebrow {
    margin: 0 0 6px;
    color: var(--brand-600);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.page-heading h1 {
    margin: 0;
    color: var(--ink-950);
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.page-heading__desc {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--ink-500);
    font-size: 15px;
}

.page-heading__actions,
.toolbar,
.button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 9px 17px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
    transition: 160ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn--primary {
    color: #fff;
    background: var(--brand-800);
    box-shadow: 0 10px 24px rgba(23, 70, 90, 0.17);
}

.btn--primary:hover {
    background: var(--brand-700);
}

.btn--accent {
    color: #fff;
    background: var(--brand-500);
}

.btn--ghost {
    color: var(--ink-700);
    border-color: var(--line);
    background: #fff;
}

.btn--danger {
    color: var(--danger);
    border-color: #efc9c9;
    background: #fff;
}

.btn--block {
    width: 100%;
}

.btn--large {
    min-height: 54px;
    padding: 13px 22px;
    font-size: 17px;
}

.text-link {
    color: var(--brand-700);
    font-weight: 800;
}

.text-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.panel,
.stat-card,
.task-card,
.form-card,
.empty-state {
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.panel,
.form-card,
.empty-state {
    border-radius: var(--radius-md);
}

.panel {
    overflow: hidden;
}

.panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 19px 22px;
    border-bottom: 1px solid var(--line);
}

.panel__header h2,
.panel__header h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.panel__header p {
    margin: 4px 0 0;
    color: var(--ink-500);
    font-size: 13px;
}

.panel__body {
    padding: 22px;
}

.stack {
    display: grid;
    gap: 18px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.8fr);
    gap: 22px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    position: relative;
    min-height: 132px;
    padding: 20px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.stat-card::after {
    position: absolute;
    content: "";
    right: -28px;
    bottom: -36px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--brand-50);
}

.stat-card__label {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--ink-500);
    font-size: 14px;
    font-weight: 700;
}

.stat-card__value {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 8px;
    color: var(--ink-950);
    font-size: 34px;
    font-weight: 900;
    line-height: 1.1;
}

.stat-card__meta {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 7px;
    color: var(--ink-500);
    font-size: 12px;
}

.stat-card.is-warning::before,
.stat-card.is-danger::before,
.stat-card.is-success::before {
    position: absolute;
    content: "";
    inset: 0 auto 0 0;
    width: 4px;
}

.stat-card.is-warning::before { background: var(--warning); }
.stat-card.is-danger::before { background: var(--danger); }
.stat-card.is-success::before { background: var(--success); }

.map-placeholder {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 440px;
    padding: 32px;
    color: #d8edf0;
    background:
        linear-gradient(rgba(83, 158, 166, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(83, 158, 166, 0.07) 1px, transparent 1px),
        radial-gradient(circle at 50% 45%, #1a5264 0%, #123a4d 48%, #0c2b3d 100%);
    background-size: 32px 32px, 32px 32px, auto;
}

.map-placeholder__content {
    position: relative;
    z-index: 2;
    max-width: 460px;
    text-align: center;
}

.map-placeholder__icon {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    margin: 0 auto 16px;
    border: 1px solid rgba(131, 206, 210, 0.42);
    border-radius: 50%;
    color: #7dd0d3;
    background: rgba(72, 154, 163, 0.12);
    font-size: 28px;
    font-weight: 900;
    box-shadow: 0 0 0 14px rgba(70, 149, 158, 0.06);
}

.map-placeholder h3 {
    margin: 0;
    color: #fff;
    font-size: 22px;
}

.map-placeholder p {
    margin: 8px 0 0;
    color: #9bc0c8;
    font-size: 14px;
}

.map-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 3px solid #8dd4d7;
    border-radius: 50%;
    background: var(--brand-950);
    box-shadow: 0 0 0 8px rgba(88, 181, 187, 0.1);
}

.map-dot--one { left: 28%; top: 35%; }
.map-dot--two { left: 53%; top: 58%; }
.map-dot--three { right: 21%; top: 28%; border-color: #f0b15e; }
.map-dot--four { right: 30%; bottom: 19%; }

.alert-list,
.activity-list,
.plain-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.alert-item,
.activity-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 66px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.alert-item:last-child,
.activity-item:last-child {
    border-bottom: 0;
}

.alert-item__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--warning);
    box-shadow: 0 0 0 5px var(--warning-soft);
}

.alert-item__dot.is-danger { background: var(--danger); box-shadow: 0 0 0 5px var(--danger-soft); }
.alert-item__dot.is-info { background: var(--info); box-shadow: 0 0 0 5px var(--info-soft); }

.alert-item strong,
.activity-item strong {
    display: block;
    font-size: 14px;
}

.alert-item small,
.activity-item small {
    display: block;
    margin-top: 2px;
    color: var(--ink-500);
    font-size: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--ink-700);
    background: #eef2f3;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
}

.badge--success { color: #12684d; background: var(--success-soft); }
.badge--warning { color: #995a0e; background: var(--warning-soft); }
.badge--danger { color: #a23535; background: var(--danger-soft); }
.badge--info { color: #1d648f; background: var(--info-soft); }
.badge--brand { color: var(--brand-800); background: var(--brand-100); }

.filter-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid var(--line);
    background: #fbfdfd;
}

.field {
    display: grid;
    gap: 7px;
}

.field > label,
.field-label {
    color: var(--ink-700);
    font-size: 13px;
    font-weight: 800;
}

.field-hint {
    margin: 0;
    color: var(--ink-500);
    font-size: 12px;
}

.input,
.select,
.textarea {
    width: 100%;
    border: 1px solid #cbd8dd;
    border-radius: 10px;
    color: var(--ink-950);
    outline: none;
    background: #fff;
    transition: 140ms ease;
}

.input,
.select {
    min-height: 45px;
    padding: 9px 12px;
}

.textarea {
    min-height: 112px;
    padding: 11px 12px;
    resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(47, 143, 152, 0.12);
}

.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid {
    border-color: var(--danger);
}

.field-error {
    color: var(--danger);
    font-size: 12px;
    font-weight: 700;
}

.check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    color: var(--ink-700);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--brand-600);
}

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

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

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

.data-table th {
    color: var(--ink-500);
    background: #fbfdfd;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: var(--brand-50);
}

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

.table-primary {
    display: block;
    color: var(--ink-950);
    font-weight: 800;
}

.table-secondary {
    display: block;
    margin-top: 2px;
    color: var(--ink-500);
    font-size: 12px;
}

.route-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 190px;
    font-weight: 800;
}

.route-line__arrow {
    color: var(--brand-500);
    font-weight: 900;
}

.form-card {
    padding: clamp(20px, 3vw, 34px);
}

.form-section + .form-section {
    margin-top: 32px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}

.form-section__heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 19px;
}

.form-section__number {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 29px;
    height: 29px;
    border-radius: 50%;
    color: var(--brand-800);
    background: var(--brand-100);
    font-size: 12px;
    font-weight: 900;
}

.form-section__heading h2 {
    margin: 0;
    font-size: 18px;
}

.form-section__heading p {
    margin: 3px 0 0;
    color: var(--ink-500);
    font-size: 13px;
}

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

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }

.form-actions {
    position: sticky;
    z-index: 12;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin: 34px -34px -34px;
    padding: 16px 34px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
}

.flash {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
}

.flash--success { color: #14694f; border-color: #bfe3d4; background: var(--success-soft); }
.flash--danger { color: #9d3030; border-color: #efc9c9; background: var(--danger-soft); }

.empty-state {
    padding: 50px 24px;
    text-align: center;
}

.empty-state__icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin: 0 auto 15px;
    border-radius: 50%;
    color: var(--brand-700);
    background: var(--brand-100);
    font-size: 22px;
    font-weight: 900;
}

.empty-state h3 {
    margin: 0;
    font-size: 19px;
}

.empty-state p {
    margin: 7px auto 18px;
    max-width: 460px;
    color: var(--ink-500);
    font-size: 14px;
}

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

.master-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    min-height: 124px;
    padding: 21px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: 160ms ease;
}

.master-card:hover {
    border-color: #a7cdd0;
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(18, 39, 55, 0.09);
}

.master-card__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 13px;
    color: var(--brand-800);
    background: var(--brand-100);
    font-size: 17px;
    font-weight: 900;
}

.master-card h3 {
    margin: 0;
    font-size: 17px;
}

.master-card p {
    margin: 4px 0 0;
    color: var(--ink-500);
    font-size: 13px;
}

.master-card__count {
    color: var(--ink-500);
    font-size: 13px;
    font-weight: 800;
}

.task-card {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.task-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.task-card__number {
    color: var(--ink-500);
    font-size: 12px;
    font-weight: 800;
}

.task-card__route {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 22px 18px;
}

.route-place span,
.route-place strong {
    display: block;
}

.route-place span {
    color: var(--ink-500);
    font-size: 12px;
}

.route-place strong {
    margin-top: 3px;
    font-size: 21px;
    line-height: 1.25;
}

.route-place:last-child {
    text-align: right;
}

.task-card__arrow {
    position: relative;
    width: 58px;
    height: 1px;
    background: var(--brand-400);
}

.task-card__arrow::after {
    position: absolute;
    content: "";
    right: 0;
    top: -4px;
    width: 8px;
    height: 8px;
    border-top: 1px solid var(--brand-400);
    border-right: 1px solid var(--brand-400);
    transform: rotate(45deg);
}

.task-card__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fbfdfd;
}

.task-meta {
    padding: 14px 18px;
    border-right: 1px solid var(--line);
}

.task-meta:last-child {
    border-right: 0;
}

.task-meta span,
.task-meta strong {
    display: block;
}

.task-meta span {
    color: var(--ink-500);
    font-size: 11px;
}

.task-meta strong {
    margin-top: 2px;
    font-size: 14px;
}

.task-card__actions {
    display: flex;
    gap: 10px;
    padding: 15px 18px;
}

.driver-progress {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 4px 0 24px;
}

.driver-progress__step {
    position: relative;
    padding-top: 26px;
    color: var(--ink-300);
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.driver-progress__step::before {
    position: absolute;
    z-index: 2;
    content: "";
    top: 3px;
    left: calc(50% - 7px);
    width: 14px;
    height: 14px;
    border: 3px solid var(--canvas);
    border-radius: 50%;
    background: #c8d2d7;
}

.driver-progress__step::after {
    position: absolute;
    z-index: 1;
    content: "";
    top: 9px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #d6e0e3;
}

.driver-progress__step:last-child::after {
    display: none;
}

.driver-progress__step.is-done,
.driver-progress__step.is-current {
    color: var(--brand-800);
}

.driver-progress__step.is-done::before,
.driver-progress__step.is-current::before {
    background: var(--brand-500);
}

.driver-progress__step.is-done::after {
    background: var(--brand-400);
}

.driver-progress__step.is-current::before {
    box-shadow: 0 0 0 5px var(--brand-100);
}

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

.detail-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.detail-item:nth-child(odd) {
    border-right: 1px solid var(--line);
}

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

.detail-item span {
    color: var(--ink-500);
    font-size: 12px;
}

.detail-item strong {
    margin-top: 4px;
    font-size: 15px;
}

.timeline {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline__item {
    position: relative;
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 18px;
    padding-bottom: 22px;
}

.timeline__item::before {
    position: absolute;
    content: "";
    left: 89px;
    top: 8px;
    bottom: -2px;
    width: 1px;
    background: var(--line);
}

.timeline__item:last-child::before {
    display: none;
}

.timeline__time {
    color: var(--ink-500);
    font-size: 12px;
    text-align: right;
}

.timeline__content {
    position: relative;
    padding-left: 18px;
}

.timeline__content::before {
    position: absolute;
    content: "";
    left: -2px;
    top: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-500);
    box-shadow: 0 0 0 5px var(--brand-100);
}

.timeline__content strong,
.timeline__content small {
    display: block;
}

.timeline__content strong {
    font-size: 14px;
}

.timeline__content small {
    margin-top: 3px;
    color: var(--ink-500);
    font-size: 12px;
}

.login-page {
    min-height: 100vh;
    padding: 24px;
    background:
        radial-gradient(circle at 78% 12%, rgba(88, 177, 182, 0.18), transparent 28%),
        radial-gradient(circle at 5% 95%, rgba(47, 143, 152, 0.15), transparent 32%),
        linear-gradient(135deg, #0b2434 0%, #123b4d 52%, #0d293a 100%);
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.72fr);
    width: min(1180px, 100%);
    min-height: calc(100vh - 48px);
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 32px 90px rgba(1, 17, 25, 0.35);
}

.login-story {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(34px, 5vw, 68px);
    color: #fff;
    background:
        linear-gradient(145deg, rgba(10, 34, 48, 0.38), rgba(10, 34, 48, 0.82)),
        repeating-linear-gradient(115deg, transparent 0 55px, rgba(102, 196, 200, 0.05) 56px 57px);
}

.login-story .brand__name {
    color: #fff;
}

.login-story .brand__sub {
    color: #90b6be;
}

.login-story .brand__mark::before { background: #5cb8bc; }
.login-story .brand__mark::after { background: #fff; }

.login-story__content {
    max-width: 580px;
    padding: 70px 0;
}

.login-story__eyebrow {
    color: #80ccd0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.login-story h1 {
    margin: 14px 0 18px;
    font-size: clamp(38px, 4.6vw, 62px);
    line-height: 1.14;
    letter-spacing: -0.045em;
}

.login-story p {
    max-width: 520px;
    margin: 0;
    color: #acc7ce;
    font-size: 16px;
}

.login-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 36px;
}

.login-point {
    padding: 14px;
    border: 1px solid rgba(130, 205, 210, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}

.login-point strong,
.login-point small {
    display: block;
}

.login-point strong {
    font-size: 14px;
}

.login-point small {
    margin-top: 3px;
    color: #8fb4bc;
    font-size: 11px;
}

.login-story__foot {
    color: #6e99a4;
    font-size: 12px;
}

.login-panel {
    display: grid;
    align-content: center;
    padding: clamp(30px, 5vw, 64px);
    background: #fff;
}

.login-panel__head {
    margin-bottom: 28px;
}

.login-role {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    color: var(--brand-800);
    background: var(--brand-100);
    font-size: 12px;
    font-weight: 900;
}

.login-panel h2 {
    margin: 15px 0 7px;
    font-size: 30px;
    line-height: 1.2;
}

.login-panel__head p {
    margin: 0;
    color: var(--ink-500);
    font-size: 14px;
}

.login-form {
    display: grid;
    gap: 18px;
}

.login-field {
    display: grid;
    gap: 8px;
}

.login-field label {
    color: var(--ink-700);
    font-size: 13px;
    font-weight: 800;
}

.login-input {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid #cbd8dd;
    border-radius: 11px;
    outline: none;
    color: var(--ink-950);
    background: #fff;
}

.login-input:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px rgba(47, 143, 152, 0.11);
}

.login-portals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.login-portals a {
    display: grid;
    place-items: center;
    min-height: 42px;
    padding: 8px 6px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--ink-500);
    font-size: 12px;
    font-weight: 800;
}

.login-portals a.is-active {
    color: var(--brand-800);
    border-color: #9fcdd0;
    background: var(--brand-50);
}

.logout-form {
    margin: 0;
}

.logout-button {
    min-height: 38px;
    padding: 7px 10px;
    border: 0;
    color: var(--ink-500);
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.mobile-brand,
.mobile-bottom-nav {
    display: none;
}

.driver-shell .portal-content {
    width: min(920px, 100%);
}

.driver-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    border-radius: var(--radius-md);
    color: #fff;
    background: linear-gradient(135deg, var(--brand-800), var(--brand-600));
    box-shadow: 0 18px 40px rgba(23, 70, 90, 0.19);
}

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

.driver-callout strong {
    font-size: 20px;
}

.driver-callout span {
    margin-top: 3px;
    color: #c4e1e3;
    font-size: 13px;
}

.driver-callout__count {
    flex: 0 0 auto;
    font-size: 36px;
    font-weight: 900;
}

@media (max-width: 1180px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

    .filter-bar .btn {
        align-self: end;
    }
}

@media (max-width: 900px) {
    :root {
        --header-height: 68px;
    }

    .portal-sidebar {
        display: none;
    }

    .portal-main {
        margin-left: 0;
    }

    .mobile-brand {
        display: block;
    }

    .mobile-brand .brand__name {
        font-size: 17px;
    }

    .mobile-brand .brand__sub {
        display: none;
    }

    .mobile-brand .brand__mark {
        width: 39px;
        transform: scale(0.86);
        transform-origin: left center;
    }

    .portal-header__title small,
    .user-chip__text {
        display: none;
    }

    .portal-content {
        padding: 26px 20px 96px;
    }

    .mobile-bottom-nav {
        position: fixed;
        z-index: 50;
        inset: auto 0 0;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        min-height: 70px;
        padding: 6px max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
        border-top: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 -10px 30px rgba(18, 39, 55, 0.08);
        backdrop-filter: blur(16px);
    }

    .mobile-bottom-nav__item {
        display: grid;
        place-items: center;
        align-content: center;
        gap: 2px;
        min-width: 0;
        color: var(--ink-500);
        font-size: 11px;
        font-weight: 800;
    }

    .mobile-bottom-nav__item strong {
        color: inherit;
        font-size: 17px;
        line-height: 1;
    }

    .mobile-bottom-nav__item.is-active {
        color: var(--brand-700);
    }

    .login-page {
        padding: 0;
    }

    .login-shell {
        grid-template-columns: 1fr;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .login-story {
        min-height: 285px;
        padding: 28px;
    }

    .login-story__content {
        padding: 35px 0 12px;
    }

    .login-story h1 {
        font-size: 34px;
    }

    .login-story p,
    .login-points,
    .login-story__foot {
        display: none;
    }

    .login-panel {
        align-content: start;
        padding: 34px 28px 44px;
    }
}

@media (max-width: 680px) {
    body {
        font-size: 16px;
    }

    .portal-header {
        padding: 9px 15px;
    }

    .portal-header__title {
        display: none;
    }

    .portal-header__tools {
        margin-left: auto;
    }

    .user-chip {
        padding: 4px;
        border: 0;
        background: transparent;
    }

    .logout-button {
        padding-right: 2px;
    }

    .portal-content {
        padding: 22px 15px 94px;
    }

    .page-heading {
        display: grid;
        align-items: start;
        gap: 16px;
        margin-bottom: 20px;
    }

    .page-heading h1 {
        font-size: 29px;
    }

    .page-heading__desc {
        font-size: 14px;
    }

    .page-heading__actions .btn {
        flex: 1 1 140px;
    }

    .stat-grid,
    .master-grid,
    .filter-bar,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .stat-grid {
        gap: 11px;
    }

    .stat-card {
        min-height: 108px;
        padding: 17px;
    }

    .stat-card__value {
        font-size: 30px;
    }

    .panel__header,
    .panel__body {
        padding: 17px;
    }

    .map-placeholder {
        min-height: 310px;
        padding: 24px;
    }

    .map-placeholder h3 {
        font-size: 19px;
    }

    .filter-bar {
        padding: 15px;
    }

    .filter-bar .btn {
        width: 100%;
    }

    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        padding: 14px 15px;
        border-bottom: 1px solid var(--line);
    }

    .data-table td {
        display: grid;
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 12px;
        padding: 6px 0;
        border: 0;
    }

    .data-table td::before {
        content: attr(data-label);
        color: var(--ink-500);
        font-size: 12px;
        font-weight: 800;
    }

    .route-line {
        min-width: 0;
    }

    .form-card {
        padding: 19px 16px;
    }

    .form-grid {
        gap: 15px;
    }

    .col-8,
    .col-6,
    .col-4,
    .col-3 {
        grid-column: span 12;
    }

    .form-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        margin: 28px -16px -19px;
        padding: 14px 16px;
    }

    .form-actions .btn {
        width: 100%;
    }

    .master-card {
        min-height: 108px;
    }

    .task-card__route {
        padding: 20px 16px;
    }

    .route-place strong {
        font-size: 19px;
    }

    .task-card__arrow {
        width: 40px;
    }

    .task-card__meta {
        grid-template-columns: 1fr;
    }

    .task-meta {
        display: grid;
        grid-template-columns: 88px minmax(0, 1fr);
        align-items: baseline;
        gap: 10px;
        padding: 9px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .task-meta:last-child {
        border-bottom: 0;
    }

    .task-card__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 14px 16px;
    }

    .task-card__actions .btn {
        min-height: 49px;
    }

    .detail-item,
    .detail-item:nth-child(odd) {
        border-right: 0;
    }

    .timeline__item {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 14px;
    }

    .timeline__item::before {
        left: 65px;
    }

    .driver-shell .portal-content {
        padding-left: 12px;
        padding-right: 12px;
    }

    .driver-shell .page-heading {
        padding: 0 3px;
    }

    .driver-shell .page-heading h1 {
        font-size: 28px;
    }

    .driver-shell .task-card {
        border-radius: 14px;
    }

    .driver-progress__step {
        font-size: 10px;
    }

    .driver-callout {
        padding: 17px;
    }

    .driver-callout strong {
        font-size: 18px;
    }

    .login-story {
        min-height: 238px;
        padding: 24px;
    }

    .login-story__content {
        padding: 24px 0 0;
    }

    .login-story h1 {
        margin-top: 10px;
        font-size: 30px;
    }

    .login-panel {
        padding: 30px 22px 40px;
    }

    .login-panel h2 {
        font-size: 27px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Admin dispatch workspace ------------------------------------------------ */
.admin-shell {
    min-width: 1180px;
    background: #edf2f3;
}

.portal-main--admin {
    margin-left: 0;
}

.admin-workspace-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 82px;
    padding: 0 clamp(24px, 3.1vw, 56px);
    border-bottom-color: #d8e2e4;
    background: rgba(255, 255, 255, 0.97);
}

.admin-header__brand .brand__mark {
    width: 43px;
    transform: scale(0.92);
    transform-origin: left center;
}

.admin-header__brand .brand__name {
    font-size: 20px;
}

.admin-header__nav {
    display: flex;
    align-items: stretch;
    justify-content: center;
    align-self: stretch;
    min-width: 0;
    margin: 0 18px;
}

.admin-header__nav-item {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 82px;
    padding: 0 clamp(12px, 1.25vw, 22px);
    color: #526974;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    transition: color 150ms ease;
}

.admin-header__nav-item::after {
    position: absolute;
    content: "";
    right: 18px;
    bottom: 0;
    left: 18px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: transparent;
}

.admin-header__nav-item:hover,
.admin-header__nav-item.is-active {
    color: #133547;
}

.admin-header__nav-item.is-active::after {
    background: var(--brand-500);
}

.admin-workspace-header .portal-header__tools {
    gap: 12px;
}

.admin-header__dispatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 15px;
    border-radius: 9px;
    color: #fff;
    background: #153747;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-workspace-content {
    width: min(1720px, 100%);
    padding: 20px clamp(22px, 2.6vw, 46px) 54px;
}

.operations-ribbon {
    display: grid;
    grid-template-columns: auto minmax(460px, 1fr) auto;
    align-items: stretch;
    min-height: 72px;
    margin-bottom: 16px;
    border-radius: 12px;
    color: #d9e7ea;
    background: #112f3f;
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(17, 47, 63, 0.12);
}

.operations-ribbon__date {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 188px;
    padding: 12px 22px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.operations-ribbon__date span {
    color: #65c2c2;
    font-size: 19px;
    font-weight: 900;
}

.operations-ribbon__date strong {
    font-size: 14px;
}

.operations-ribbon__metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(105px, 1fr));
}

.operations-ribbon__metrics a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    min-width: 0;
    padding: 10px 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.operations-ribbon__metrics span {
    color: #9eb7bf;
    font-size: 14px;
}

.operations-ribbon__metrics strong {
    color: #fff;
    font-size: 24px;
    line-height: 1;
}

.operations-ribbon__metrics .is-alert strong {
    color: #ffb76d;
}

.operations-ribbon__summary {
    display: grid;
    align-content: center;
    gap: 3px;
    min-width: 205px;
    padding: 10px 22px;
    color: #a9c0c6;
    font-size: 13px;
}

.task-focus {
    display: grid;
    grid-template-columns: minmax(290px, 0.76fr) minmax(460px, 1.36fr) auto;
    align-items: center;
    gap: 26px;
    min-height: 126px;
    margin-bottom: 16px;
    padding: 20px 24px;
    border: 1px solid #d8e2e4;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(18, 39, 55, 0.05);
}

.task-focus__label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 6px;
}

.task-focus__label span {
    color: #72858e;
    font-size: 13px;
    font-weight: 700;
}

.task-focus__label em {
    padding: 2px 7px;
    border-radius: 999px;
    color: #8c5b1a;
    background: #fff3df;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.task-focus__number-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-focus h1 {
    margin: 0;
    color: #173647;
    font-size: clamp(23px, 2vw, 31px);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.task-focus__identity p {
    margin: 7px 0 0;
    color: #687c86;
    font-size: 14px;
}

.task-status {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.task-status--active {
    color: #126e68;
    background: #def4f0;
}

.task-status--danger {
    color: #9d3030;
    background: #fceaea;
}

.task-route {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(170px, 0.9fr) minmax(120px, 1fr);
    align-items: center;
    gap: 18px;
}

.task-route > div:last-child {
    text-align: right;
}

.task-route span,
.task-route strong,
.task-route small {
    display: block;
}

.task-route span {
    color: #819199;
    font-size: 12px;
}

.task-route strong {
    margin: 2px 0;
    color: #173647;
    font-size: 24px;
    line-height: 1.25;
}

.task-route small {
    color: #607681;
    font-size: 13px;
}

.task-route__line {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #76919b;
}

.task-route__line i {
    flex: 1 1 auto;
    height: 1px;
    background: #8db9bc;
}

.task-route__line i:last-child {
    position: relative;
}

.task-route__line i:last-child::after {
    position: absolute;
    content: "";
    top: -3px;
    right: 0;
    width: 6px;
    height: 6px;
    border-top: 1px solid #8db9bc;
    border-right: 1px solid #8db9bc;
    transform: rotate(45deg);
}

.task-route__line b {
    font-size: 12px;
    white-space: nowrap;
}

.task-focus__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 44px;
    padding: 10px 15px;
    border: 1px solid #b9ced2;
    border-radius: 9px;
    color: #244b5a;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.dispatch-workbench {
    display: grid;
    grid-template-columns: minmax(720px, 1.52fr) minmax(330px, 0.64fr);
    gap: 16px;
    margin-bottom: 16px;
}

.workspace-card {
    border: 1px solid #d6e1e3;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(18, 39, 55, 0.045);
    overflow: hidden;
}

.workspace-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
    padding: 13px 20px;
    border-bottom: 1px solid #dfe7e9;
}

.section-kicker {
    display: block;
    color: #7f949c;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.workspace-card__header h2 {
    margin: 2px 0 0;
    color: #173647;
    font-size: 19px;
    line-height: 1.2;
}

.source-chip,
.trip-temperature,
.quiet-count {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #226e73;
    background: #e8f6f5;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.vehicle-combination {
    display: grid;
    grid-template-columns: minmax(230px, 0.9fr) 94px minmax(280px, 1.12fr);
    align-items: stretch;
    gap: 12px;
    padding: 18px 20px;
    background: #f8fbfb;
}

.vehicle-unit {
    position: relative;
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 108px;
    padding: 15px 16px;
    border: 1px solid #cfe0e2;
    border-radius: 11px;
    background: #fff;
}

.vehicle-unit__index {
    position: absolute;
    top: 9px;
    right: 10px;
    color: #a3b1b7;
    font-size: 11px;
    font-weight: 900;
}

.vehicle-unit__icon {
    display: grid;
    place-items: center;
    width: 66px;
    height: 48px;
    border-radius: 7px;
    color: #cbe6e6;
    background: #173f50;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.vehicle-unit--trailer .vehicle-unit__icon {
    color: #154150;
    border: 2px solid #347985;
    background: #e8f5f4;
}

.vehicle-unit small,
.vehicle-unit strong,
.vehicle-unit div > span {
    display: block;
}

.vehicle-unit small {
    color: #81929a;
    font-size: 12px;
}

.vehicle-unit strong {
    margin: 3px 0 1px;
    color: #173647;
    font-size: 20px;
    line-height: 1.25;
}

.vehicle-unit div > span {
    color: #607681;
    font-size: 13px;
}

.vehicle-coupling {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #759198;
}

.vehicle-coupling span {
    width: 14px;
    height: 1px;
    background: #89adb1;
}

.vehicle-coupling b {
    font-size: 11px;
    white-space: nowrap;
}

.driver-roster {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid #e1e8ea;
    border-bottom: 1px solid #e1e8ea;
}

.driver-person {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 92px;
    padding: 14px 16px;
    border-right: 1px solid #e1e8ea;
}

.driver-person:last-child {
    border-right: 0;
}

.driver-person__letter {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    background: #2e8891;
    font-size: 14px;
    font-weight: 900;
}

.driver-person small,
.driver-person strong,
.driver-person div > span {
    display: block;
}

.driver-person small {
    color: #82939a;
    font-size: 11px;
}

.driver-person strong {
    color: #173647;
    font-size: 16px;
}

.driver-person div > span {
    color: #6d8189;
    font-size: 12px;
    white-space: nowrap;
}

.driver-person em {
    color: #267176;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
}

.driver-person.is-empty {
    background: #fafcfc;
}

.driver-person.is-empty .driver-person__letter {
    color: #789098;
    background: #e4ecee;
}

.driver-person.is-empty em {
    color: #8a999f;
}

.vehicle-reminders {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: #e1e8ea;
}

.vehicle-reminders article {
    position: relative;
    min-width: 0;
    padding: 13px 15px;
    background: #fff;
}

.vehicle-reminders span,
.vehicle-reminders strong,
.vehicle-reminders small {
    display: block;
}

.vehicle-reminders span {
    color: #809198;
    font-size: 11px;
}

.vehicle-reminders strong {
    margin-top: 2px;
    color: #294956;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vehicle-reminders small {
    position: absolute;
    top: 13px;
    right: 13px;
    color: #2e817a;
    font-size: 10px;
    font-weight: 800;
}

.transport-progress {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    padding: 18px 14px 17px;
    background: #f8fbfb;
}

.transport-progress__step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 6px;
    color: #91a0a6;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.transport-progress__step::after {
    position: absolute;
    z-index: 0;
    content: "";
    top: 13px;
    left: calc(50% + 14px);
    width: calc(100% - 28px);
    height: 2px;
    background: #d5e1e3;
}

.transport-progress__step:last-child::after {
    display: none;
}

.transport-progress__step i {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 2px solid #cddadd;
    border-radius: 50%;
    color: #899aa1;
    background: #fff;
    font-size: 11px;
    font-style: normal;
}

.transport-progress__step.is-done::after {
    background: #4a9ba1;
}

.transport-progress__step.is-done i,
.transport-progress__step.is-current i {
    color: #fff;
    border-color: #378c93;
    background: #378c93;
}

.transport-progress__step.is-done,
.transport-progress__step.is-current {
    color: #225b62;
}

.transport-progress__step.is-current i {
    box-shadow: 0 0 0 5px rgba(55, 140, 147, 0.13);
}

.trip-workspace {
    color: #dce9eb;
    border-color: #173d4d;
    background: #153747;
    box-shadow: 0 16px 38px rgba(16, 47, 62, 0.16);
}

.trip-workspace .workspace-card__header {
    border-bottom-color: rgba(255, 255, 255, 0.11);
}

.trip-workspace .section-kicker {
    color: #79a9b2;
}

.trip-workspace .workspace-card__header h2 {
    color: #fff;
}

.trip-temperature {
    color: #c7f3ee;
    background: rgba(73, 168, 168, 0.22);
}

.cargo-summary {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cargo-summary span,
.cargo-summary strong,
.cargo-summary small {
    display: block;
}

.cargo-summary span {
    color: #8db1b9;
    font-size: 11px;
}

.cargo-summary strong {
    margin: 2px 0;
    color: #fff;
    font-size: 19px;
}

.cargo-summary small {
    color: #b7cdd2;
    font-size: 13px;
}

.trip-ledger {
    margin: 0;
    padding: 7px 20px;
}

.trip-ledger div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.trip-ledger dt {
    color: #a8c1c7;
    font-size: 13px;
}

.trip-ledger dd {
    margin: 0;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
}

.document-status {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 20px 17px;
}

.document-status div {
    padding: 10px 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.document-status span,
.document-status strong {
    display: block;
}

.document-status span {
    color: #8eafb7;
    font-size: 11px;
}

.document-status strong {
    margin-top: 2px;
    color: #ffd39d;
    font-size: 13px;
}

.document-status strong.is-complete {
    color: #8de0d2;
}

.trip-total {
    margin-top: auto;
    padding: 17px 20px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(4, 24, 34, 0.18);
}

.trip-total span,
.trip-total strong,
.trip-total small {
    display: block;
}

.trip-total span {
    color: #8fb1b9;
    font-size: 12px;
}

.trip-total strong {
    margin: 2px 0;
    color: #fff;
    font-size: 26px;
}

.trip-total small {
    color: #91adb4;
    font-size: 11px;
}

.lower-workspace {
    display: grid;
    grid-template-columns: minmax(390px, 0.75fr) minmax(610px, 1.25fr);
    gap: 16px;
}

.quiet-count {
    color: #657c86;
    background: #edf3f4;
}

.work-item-list,
.recent-task-list {
    padding: 4px 20px 10px;
}

.work-item {
    display: grid;
    grid-template-columns: 56px 10px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e6ecee;
}

.work-item:last-child {
    border-bottom: 0;
}

.work-item time {
    color: #7e9097;
    font-size: 12px;
    text-align: right;
}

.work-item__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4d98a0;
}

.work-item--success .work-item__dot { background: #31a077; }
.work-item--warning .work-item__dot { background: #d18a31; }
.work-item--danger .work-item__dot { background: #c84747; }

.work-item strong,
.work-item small {
    display: block;
}

.work-item strong {
    color: #254552;
    font-size: 13px;
}

.work-item small {
    margin-top: 1px;
    color: #74878f;
    font-size: 11px;
}

.recent-workspace .workspace-card__header a {
    color: #28747b;
    font-size: 13px;
    font-weight: 800;
}

.recent-task-list article {
    display: grid;
    grid-template-columns: minmax(250px, 1fr) minmax(180px, 0.7fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 54px;
    border-bottom: 1px solid #e6ecee;
}

.recent-task-list article:last-child {
    border-bottom: 0;
}

.recent-task-list strong,
.recent-task-list div > span {
    display: block;
}

.recent-task-list strong {
    color: #254552;
    font-size: 13px;
}

.recent-task-list div > span,
.recent-task-list article > span {
    color: #71858d;
    font-size: 12px;
}

.recent-task-list em {
    min-width: 74px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #277276;
    background: #e7f4f3;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
}

.compact-empty {
    padding: 24px 4px;
    color: #7a8d95;
    font-size: 14px;
    text-align: center;
}

.admin-empty-workspace {
    display: grid;
    place-items: center;
    min-height: 520px;
    padding: 48px;
    border: 1px solid #d8e2e4;
    border-radius: 16px;
    background: #fff;
    text-align: center;
}

.admin-empty-workspace > span {
    color: #26757b;
    font-size: 13px;
    font-weight: 900;
}

.admin-empty-workspace h1 {
    margin: 12px 0 4px;
    font-size: 28px;
}

.admin-empty-workspace p {
    margin: 0 0 20px;
    color: #70838c;
}

@media (max-width: 1360px) {
    .admin-shell {
        min-width: 1024px;
    }

    .admin-workspace-header {
        padding-right: 24px;
        padding-left: 24px;
    }

    .admin-header__nav-item {
        padding-right: 11px;
        padding-left: 11px;
        font-size: 14px;
    }

    .admin-workspace-header .user-chip__text,
    .admin-workspace-header .logout-button {
        display: none;
    }

    .task-focus {
        grid-template-columns: minmax(260px, 0.75fr) minmax(410px, 1.25fr) auto;
        gap: 18px;
    }

    .dispatch-workbench {
        grid-template-columns: minmax(650px, 1.45fr) minmax(320px, 0.65fr);
    }

    .driver-person {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .driver-person em {
        display: none;
    }
}

@media (max-width: 1100px) {
    .admin-shell {
        min-width: 0;
    }

    .admin-workspace-header {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .admin-header__nav {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .dispatch-workbench,
    .lower-workspace {
        grid-template-columns: 1fr;
    }

    .task-focus {
        grid-template-columns: minmax(260px, 0.75fr) minmax(420px, 1.25fr);
    }

    .task-focus__action {
        display: none;
    }

    .trip-workspace {
        display: grid;
        grid-template-columns: minmax(260px, 0.8fr) minmax(300px, 1fr);
    }

    .trip-workspace .workspace-card__header,
    .trip-total {
        grid-column: 1 / -1;
    }

    .cargo-summary {
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 900px) {
    .admin-workspace-header {
        display: flex;
        min-height: 68px;
        padding: 8px 15px;
    }

    .admin-header__brand .brand__name {
        font-size: 17px;
    }

    .admin-header__brand .brand__sub,
    .admin-header__nav,
    .admin-workspace-header .user-chip {
        display: none;
    }

    .admin-workspace-header .portal-header__tools {
        margin-left: auto;
    }

    .admin-header__dispatch {
        min-height: 39px;
        padding: 7px 11px;
        font-size: 13px;
    }

    .admin-workspace-content {
        padding: 14px 14px 96px;
    }

    .operations-ribbon {
        grid-template-columns: 1fr;
    }

    .operations-ribbon__date,
    .operations-ribbon__summary {
        display: none;
    }

    .operations-ribbon__metrics {
        min-width: 0;
    }

    .operations-ribbon__metrics a {
        min-width: 0;
        padding: 12px 7px;
    }

    .operations-ribbon__metrics span {
        font-size: 12px;
    }

    .operations-ribbon__metrics strong {
        font-size: 20px;
    }

    .admin-mobile-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .task-focus {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px;
    }

    .task-route {
        grid-template-columns: minmax(95px, 1fr) minmax(90px, 0.72fr) minmax(95px, 1fr);
        gap: 8px;
        padding-top: 16px;
        border-top: 1px solid #e3eaec;
    }

    .task-route strong {
        font-size: 19px;
    }

    .task-route small {
        font-size: 11px;
    }

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

    .vehicle-coupling {
        min-height: 20px;
    }

    .vehicle-coupling span {
        width: 34px;
    }

    .driver-roster {
        grid-template-columns: 1fr;
    }

    .driver-person {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        min-height: 78px;
        border-right: 0;
        border-bottom: 1px solid #e1e8ea;
    }

    .driver-person:last-child {
        border-bottom: 0;
    }

    .driver-person em {
        display: block;
    }

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

    .transport-progress {
        grid-template-columns: repeat(6, 92px);
        justify-content: start;
        overflow-x: auto;
    }

    .trip-workspace {
        display: block;
    }

    .cargo-summary {
        border-right: 0;
    }

    .recent-task-list article {
        grid-template-columns: 1fr auto;
        gap: 4px 12px;
        padding: 10px 0;
    }

    .recent-task-list article > span {
        grid-column: 1;
    }

    .recent-task-list em {
        grid-column: 2;
        grid-row: 1 / span 2;
    }
}

@media (max-width: 480px) {
    .operations-ribbon__metrics a {
        display: grid;
        justify-items: center;
        gap: 2px;
    }

    .task-focus__number-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .task-focus h1 {
        font-size: 22px;
    }

    .task-route__line b {
        display: none;
    }

    .vehicle-combination,
    .workspace-card__header,
    .cargo-summary,
    .trip-ledger,
    .document-status,
    .trip-total,
    .work-item-list,
    .recent-task-list {
        padding-right: 15px;
        padding-left: 15px;
    }

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

    .document-status {
        grid-template-columns: 1fr;
    }
}
