:root {
    --bg: #f5f7fb;
    --bg-soft: #eef3f8;
    --surface: #ffffff;
    --surface-alt: #f9fbfd;
    --surface-muted: #f3f6fb;
    --border: #e4ebf3;
    --border-strong: #d8e1ec;
    --text: #243145;
    --text-soft: #5f7088;
    --text-muted: #7d8ca1;
    --primary: #2f6fed;
    --primary-soft: #edf3ff;
    --brand-green: #305e37;
    --brand-green-soft: #eef5ef;
    --brand-green-border: #cfe0d1;
    --teal-soft: #ecf8f6;
    --amber-soft: #fff7e8;
    --success-soft: #ecfbf3;
    --dark-soft: #edf1f7;
    --danger-soft: #fff0f0;
    --shadow-sm: 0 8px 20px rgba(28, 43, 74, 0.04);
    --shadow-md: 0 12px 32px rgba(28, 43, 74, 0.06);
    --radius-xl: 24px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(47, 111, 237, 0.05), transparent 26%),
        linear-gradient(180deg, #f8fafc 0%, #f3f7fb 100%);
}

.gm-style,
.gm-style *,
.gm-style iframe,
.gm-style img {
    box-sizing: content-box;
}

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

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

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

.portal-shell {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    background: linear-gradient(180deg, #f7f9fc 0%, #f2f6fb 100%);
}

.portal-sidebar {
    position: sticky;
    top: 0;
    z-index: 70;
    height: 100vh;
    overflow: auto;
    padding: 28px 18px 18px;
    background: #ffffff;
    border-right: 1px solid var(--border);
}

.portal-content {
    min-width: 0;
    position: relative;
    z-index: 0;
}

.portal-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.portal-main {
    padding: 24px 28px 36px;
}

.sidebar-brand,
.sidebar-profile,
.panel,
.metric-card,
.hero-banner,
.auth-copy,
.auth-card,
.profile-card,
.doc-empty,
.hero-side-card {
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.sidebar-brand {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius-xl);
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(180deg, #39c7c7 0%, #2f6fed 100%);
}

.brand-title {
    margin: 0;
    font-family: "Sora", "Manrope", sans-serif;
    font-size: 1.25rem;
    line-height: 1.1;
}

.brand-subtitle,
.brand-tagline,
.sidebar-caption,
.page-kicker,
.meta-text,
.panel-subtitle,
.section-subtitle,
.section-note,
.muted {
    color: var(--text-muted);
}

.brand-subtitle,
.brand-tagline {
    margin-top: 4px;
    line-height: 1.45;
}

.sidebar-profile {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    margin-top: 16px;
    border-radius: var(--radius-lg);
    background: var(--surface-alt);
}

.profile-chip,
.status-pill,
.filter-pill,
.badge,
.soft-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.79rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.profile-chip {
    color: var(--primary);
    background: var(--primary-soft);
}

.badge {
    color: #166534;
    background: var(--success-soft);
}

.badge.warn {
    color: #b7791f;
    background: var(--amber-soft);
}

.badge.muted {
    color: #526173;
    background: var(--surface-muted);
}

.sidebar-nav {
    display: grid;
    gap: 18px;
    margin-top: 0;
}

.sidebar-group {
    display: grid;
    gap: 8px;
}

.sidebar-group-title {
    margin: 0;
    color: #8694a8;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: #fff;
    color: #57687e;
    transition:
        background 160ms ease,
        color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.sidebar-link-form,
.topbar-inline-form {
    margin: 0;
}

.sidebar-link-form .sidebar-link {
    width: 100%;
    border: 0;
    cursor: pointer;
    text-align: left;
}

.sidebar-link svg,
.action-icon,
.mini-icon {
    flex: 0 0 auto;
    display: block;
}

.sidebar-link-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--surface-muted);
    color: #4f6f98;
    transition: background 160ms ease, color 160ms ease;
}

.sidebar-link-label {
    flex: 1 1 auto;
    font-size: 0.93rem;
    font-weight: 700;
    color: inherit;
}

.sidebar-link-indicator {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-top: 1.8px solid #9eacbf;
    border-right: 1.8px solid #9eacbf;
    transform: rotate(45deg);
    transition: border-color 160ms ease, transform 160ms ease;
}

.sidebar-link:hover,
.sidebar-link:focus-visible,
.sidebar-link.is-active {
    color: var(--text);
    background: #f8fbff;
    border-color: var(--border);
    box-shadow: 0 8px 18px rgba(36, 56, 92, 0.05);
}

.sidebar-link.is-active {
    border: 1px solid var(--border-strong);
    box-shadow: inset 0 0 0 1px rgba(47, 111, 237, 0.02);
}

.sidebar-link:hover .sidebar-link-icon,
.sidebar-link:focus-visible .sidebar-link-icon,
.sidebar-link.is-active .sidebar-link-icon {
    background: var(--primary-soft);
    color: var(--primary);
}

.sidebar-link:hover .sidebar-link-indicator,
.sidebar-link:focus-visible .sidebar-link-indicator,
.sidebar-link.is-active .sidebar-link-indicator {
    border-color: #6d8099;
    transform: translateX(1px) rotate(45deg);
}

.topbar-left {
    min-width: 0;
}

.page-kicker {
    margin: 0 0 2px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-title {
    margin: 0;
    font-family: "Sora", "Manrope", sans-serif;
    font-size: clamp(1.2rem, 1.6vw, 1.65rem);
    line-height: 1.02;
}

.page-lead {
    margin: 10px 0 0;
    max-width: 760px;
    font-size: 0.95rem;
    color: var(--text-soft);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topbar-lang,
.icon-button,
.profile-button,
.sidebar-toggle,
.ghost-button,
.primary-button,
.secondary-button {
    border: 0;
    cursor: pointer;
}

.topbar-lang {
    display: inline-flex;
    gap: 6px;
    padding: 5px;
    border-radius: 999px;
    background: var(--surface-muted);
}

.topbar-lang span,
.topbar-lang a {
    padding: 6px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
}

.topbar-lang a.is-active,
.topbar-lang span.is-active {
    color: #fff;
    background: #2f3b50;
}

.icon-button,
.profile-button,
.sidebar-toggle,
.ghost-button,
.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 14px;
    transition: background 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.icon-button,
.profile-button,
.sidebar-toggle,
.ghost-button,
.secondary-button {
    background: #fff;
    border: 1px solid var(--border);
}

.icon-button,
.sidebar-toggle {
    width: 38px;
    height: 38px;
}

.profile-button {
    padding: 6px;
    min-width: 38px;
}

.avatar {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(180deg, #7fd8d3, #f2c458);
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.profile-button .profile-meta {
    display: block;
}

.profile-button .profile-meta strong {
    display: block;
    font-size: 0.9rem;
}

.profile-button .profile-meta span {
    display: block;
    color: var(--text-muted);
    font-size: 0.7rem;
}

.ghost-button,
.secondary-button {
    color: var(--text);
    padding: 9px 12px;
    font-size: 0.86rem;
}

.primary-button {
    color: #fff;
    background: #2ea1a5;
    padding: 13px 18px;
}

.portal-grid {
    display: grid;
    gap: 22px;
}

.client-dashboard-welcome h2 {
    margin: 0;
    color: var(--text);
    font-family: "Sora", "Manrope", sans-serif;
    font-size: clamp(1.5rem, 2.4vw, 2.1rem);
    line-height: 1.15;
}

.hero-banner,
.panel,
.metric-card,
.auth-card,
.auth-copy,
.glass-box {
    background: var(--surface);
}

.hero-banner {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.hero-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(47, 111, 237, 0.04), rgba(57, 199, 199, 0.04), rgba(242, 196, 88, 0.04));
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.9fr);
    gap: 20px;
    padding: 28px;
}

.hero-copy {
    display: grid;
    gap: 16px;
}

.hero-copy h2,
.section-title,
.panel-title,
.auth-title,
.card-title {
    margin: 0;
    font-family: "Sora", "Manrope", sans-serif;
    line-height: 1.08;
}

.hero-copy h2 {
    font-size: clamp(1.9rem, 3.2vw, 3rem);
}

.hero-copy p {
    margin: 0;
    max-width: 68ch;
    color: var(--text-soft);
    font-size: 0.98rem;
    line-height: 1.6;
}

.hero-badges,
.chip-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-side {
    display: grid;
    gap: 14px;
    align-content: start;
}

.hero-side-card {
    padding: 18px;
    border-radius: 20px;
    background: #fbfcfe;
}

.hero-side-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.hero-side-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

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

.metric-card,
.panel {
    border-radius: var(--radius-lg);
}

.metric-card {
    padding: 18px;
}

.metric-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.metric-label {
    margin: 0;
    color: #65758c;
    font-size: 0.86rem;
    font-weight: 700;
}

.metric-value {
    margin: 10px 0 0;
    font-family: "Sora", "Manrope", sans-serif;
    font-size: 2rem;
}

.metric-foot {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.section {
    display: grid;
    gap: 16px;
    margin-top: 10px;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.section-title {
    font-size: 1.28rem;
}

.section-subtitle {
    margin: 6px 0 0;
    max-width: 70ch;
    font-size: 0.94rem;
}

.section-note {
    margin: 0;
    font-size: 0.88rem;
}

.section-grid {
    display: grid;
    gap: 16px;
}

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

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

.panel {
    padding: 20px;
}

.panel-link {
    display: block;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.panel-link:hover {
    border-color: #d2deed;
    box-shadow: 0 14px 32px rgba(36, 56, 92, 0.08);
    transform: translateY(-1px);
}

.action-card {
    display: grid;
    gap: 14px;
    align-content: start;
}

.section-header-centered {
    justify-content: center;
    text-align: center;
}

.quick-actions-showcase {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    width: min(980px, 100%);
    margin: 0 auto;
}

.showcase-card {
    min-height: 300px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 18px;
    padding: 32px 26px;
    border-radius: 26px;
    border: 1px solid #e3e7ed;
    background: #eef1f4;
    color: #1f2b3d;
    text-align: center;
    box-shadow: 0 12px 28px rgba(36, 56, 92, 0.05);
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease,
        background 180ms ease,
        color 180ms ease;
}

.showcase-card:hover {
    transform: translateY(-3px);
    border-color: #d2d9e3;
    box-shadow: 0 18px 34px rgba(36, 56, 92, 0.09);
}

.showcase-card.is-featured {
    border-color: #295130;
    background: #1f6a33;
    color: #fff;
}

.showcase-icon {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    color: currentColor;
}

.showcase-icon svg {
    width: 72px;
    height: 72px;
}

.showcase-title {
    margin: 0;
    font-family: "Sora", "Manrope", sans-serif;
    font-size: clamp(1.45rem, 2vw, 1.95rem);
    line-height: 1.05;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.showcase-meta {
    margin: 0;
    color: inherit;
    opacity: 0.78;
    font-size: 0.94rem;
    font-weight: 600;
}

.showcase-meta-secondary {
    font-size: 0.84rem;
    font-weight: 400;
}

.action-meta {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.9rem;
    font-weight: 700;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.panel-title {
    font-size: 1.02rem;
}

.panel-subtitle {
    margin: 6px 0 0;
    font-size: 0.9rem;
    line-height: 1.45;
}

.panel-body,
.panel-stack,
.subsection {
    display: grid;
    gap: 16px;
}

.soft-chip {
    color: #2e7380;
    background: var(--teal-soft);
}

.tab-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tab-button {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-soft);
    padding: 11px 15px;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
}

.tab-button.is-active {
    color: #fff;
    background: #2f6fed;
    border-color: #2f6fed;
}

.table-wrap {
    overflow: auto;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #fff;
}

.data-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: #f8fafc;
    color: #7c8ba0;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.data-table tbody tr:hover {
    background: #fafcff;
}

.client-history-table {
    min-width: 1450px;
}

.client-history-heading {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.history-reference-cell span {
    display: block;
}

.history-reference-cell span + span {
    margin-top: 5px;
}

.client-history-table tfoot td {
    background: #f8fafc;
}

.history-total-cell span,
.history-total-cell strong {
    display: block;
}

.history-total-cell span {
    color: #657286;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.history-total-cell strong {
    margin-top: 4px;
    color: #1b2938;
    font-size: 0.88rem;
}

.loads-table {
    min-width: 1500px;
}

.loads-table .load-date-column {
    position: sticky;
    z-index: 2;
    min-width: 168px;
    white-space: nowrap;
    background: #fff;
}

.loads-table th.load-date-column {
    z-index: 4;
    background: #f8fafc;
}

.loads-table .load-loading-column {
    left: 0;
}

.loads-table .load-unloading-column {
    left: 168px;
    box-shadow: 8px 0 10px -12px rgba(31, 46, 68, 0.5);
}

.loads-table tbody tr:hover .load-date-column {
    background: #fafcff;
}

.loads-table tbody tr[data-fleet-focus] {
    cursor: pointer;
}

.loads-table tbody tr.is-fleet-selected,
.loads-table tbody tr.is-fleet-selected:hover {
    background: #eef8f0;
}

.loads-table tbody tr[data-fleet-focus]:focus-visible {
    outline: 3px solid rgba(31, 106, 51, 0.28);
    outline-offset: -3px;
}

.table-comparison-header {
    margin-top: 30px;
}

.card-comparison-header {
    margin-bottom: 12px;
}

.card-list-column-headings,
.load-line-grid {
    grid-template-columns: minmax(190px, 1fr) minmax(210px, 1.2fr) minmax(270px, 1fr) minmax(190px, 0.75fr) auto;
}

.card-list-column-headings {
    display: grid;
    gap: 14px;
    padding: 0 52px 8px 18px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card-list-column-headings > span {
    text-align: center;
}

.card-list-column-headings > span:first-child {
    text-align: left;
}

.card-list-date-headings,
.card-list-vehicle-headings,
.load-line-vehicle,
.load-line-dates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-list-date-headings {
    display: grid;
    gap: 12px;
}

.card-list-vehicle-headings,
.load-line-vehicle {
    display: grid;
    gap: 10px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    font-size: 0.76rem;
    color: #48576b;
    background: var(--surface-muted);
}

.live-status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: currentColor;
    animation: live-status-pulse 1.6s ease-out infinite;
}

@keyframes live-status-pulse {
    0% {
        box-shadow: 0 0 0 0 currentColor;
        opacity: 1;
    }

    70% {
        box-shadow: 0 0 0 6px transparent;
        opacity: 0.75;
    }

    100% {
        box-shadow: 0 0 0 0 transparent;
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .live-status-dot {
        animation: none;
    }
}

.status-pill.success {
    color: #1d7a4f;
    background: var(--success-soft);
}

.status-pill.warn {
    color: #b7791f;
    background: var(--amber-soft);
}

.status-pill.info {
    color: #2e7380;
    background: var(--teal-soft);
}

.status-pill.dark {
    color: #3f4b5f;
    background: var(--dark-soft);
}

.status-pill.danger {
    color: #b63b3b;
    background: var(--danger-soft);
}

.doc-empty {
    min-height: 210px;
    display: grid;
    place-items: center;
    padding: 24px;
    border-radius: 20px;
    border-style: dashed;
    background: #fbfcfe;
    text-align: center;
}

.doc-empty strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.08rem;
}

.doc-empty p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.timeline {
    display: grid;
    gap: 12px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    margin-top: 6px;
    border-radius: 50%;
    background: #39c7c7;
    box-shadow: 0 0 0 4px rgba(57, 199, 199, 0.12);
}

.timeline-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: #fbfcfe;
    border: 1px solid var(--border);
}

.timeline-card strong {
    display: block;
    margin-bottom: 4px;
}

.timeline-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.split-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
}

.subsection-title {
    margin: 0;
    font-size: 1rem;
}

.subsection-lead {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.metric-card.inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.metric-card.inline .metric-value {
    margin-top: 0;
}

.map-placeholder {
    min-height: 280px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, #f9fbfd 0%, #f4f8fb 100%),
        repeating-linear-gradient(90deg, rgba(102, 119, 145, 0.04) 0, rgba(102, 119, 145, 0.04) 1px, transparent 1px, transparent 38px),
        repeating-linear-gradient(0deg, rgba(102, 119, 145, 0.04) 0, rgba(102, 119, 145, 0.04) 1px, transparent 1px, transparent 38px);
}

.map-pin {
    display: grid;
    gap: 8px;
    justify-items: center;
    text-align: center;
}

.map-pin strong {
    font-size: 1rem;
}

.map-pin p {
    margin: 0;
    color: var(--text-muted);
}

.auth-shell {
    display: grid;
    place-items: center;
    padding: 32px;
    background:
        radial-gradient(circle at top left, rgba(47, 111, 237, 0.06), transparent 24%),
        linear-gradient(180deg, #f8fafc 0%, #f3f7fb 100%);
}

.auth-grid {
    width: min(1180px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
    gap: 20px;
}

.auth-copy,
.auth-card {
    overflow: hidden;
    border-radius: 24px;
}

.auth-copy {
    position: relative;
    padding: 34px;
    background:
        linear-gradient(180deg, rgba(47, 111, 237, 0.03), rgba(57, 199, 199, 0.03)),
        #ffffff;
}

.auth-copy::after {
    content: "";
    position: absolute;
    top: 24px;
    right: 24px;
    width: 160px;
    height: 160px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(47, 111, 237, 0.05), rgba(57, 199, 199, 0.04));
    transform: rotate(18deg);
    pointer-events: none;
}

.brand-auth-copy::after {
    background: linear-gradient(180deg, rgba(48, 94, 55, 0.08), rgba(48, 94, 55, 0.03));
}

.brand-auth-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 10px;
    min-height: 100%;
    padding: 44px;
}

.auth-card {
    padding: 30px;
}

.auth-card-compact {
    width: min(820px, 100%);
}

.auth-card-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: -6px -6px 18px;
}

.auth-locale-switcher {
    box-shadow: inset 0 0 0 1px rgba(207, 218, 231, 0.7);
}

.auth-brand-logo {
    position: relative;
    z-index: 1;
    width: min(360px, 100%);
    height: auto;
    display: block;
    margin-bottom: 18px;
}

.brand-auth-copy .auth-brand-logo {
    margin: 0 auto 10px;
}

.auth-title {
    position: relative;
    z-index: 1;
    font-size: clamp(2rem, 3vw, 3.1rem);
}

.brand-auth-copy .auth-title {
    max-width: 18ch;
    margin: 0 auto;
}

.auth-title-brand {
    display: grid;
    gap: 8px;
}

.auth-title-overline {
    color: var(--brand-green);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-title-main {
    display: block;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    line-height: 1;
}

.auth-title-sub {
    display: block;
    max-width: 22ch;
    margin: 0 auto;
    color: #40506a;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    font-weight: 700;
    line-height: 1.18;
}

.auth-copy p {
    position: relative;
    z-index: 1;
    color: var(--text-soft);
    max-width: 60ch;
    line-height: 1.65;
}

.brand-auth-copy p {
    max-width: 32ch;
    margin: 0 auto;
}

.auth-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.auth-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #fff;
}

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

.auth-list-item span {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.auth-fields {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.message-input {
    resize: vertical;
    min-height: 150px;
}

.message-thread {
    display: grid;
    gap: 12px;
    max-height: 620px;
    overflow-y: auto;
    padding-right: 4px;
}

.message-card {
    display: grid;
    gap: 8px;
    max-width: 88%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fbfcfe;
}

.message-card.is-outgoing {
    justify-self: end;
    background: var(--primary-soft);
    border-color: #d9e5ff;
}

.message-card.is-incoming {
    justify-self: start;
}

.message-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.message-card p,
.message-card time {
    margin: 0;
}

.message-card p {
    color: var(--text-soft);
    line-height: 1.45;
    white-space: pre-wrap;
}

.message-card time {
    color: var(--text-muted);
    font-size: 0.76rem;
}

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

.field label {
    color: #34445a;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border-strong);
    background: #fff;
    color: var(--text);
}

.input:focus {
    outline: 0;
    border-color: #b7cae8;
    box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.08);
}

.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 18px;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.profile-grid,
.client-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.profile-card,
.client-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #fff;
}

.profile-card.is-active,
.client-card.is-active {
    background: var(--primary-soft);
    border-color: #cfe0ff;
}

.profile-card strong,
.client-card strong {
    display: block;
    font-size: 0.96rem;
}

.profile-card p,
.client-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.profile-footer {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.client-card-code {
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.client-card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.brand-chip {
    color: var(--brand-green);
    background: var(--brand-green-soft);
    border: 1px solid var(--brand-green-border);
}

.brand-soft-chip {
    color: var(--brand-green);
    background: var(--brand-green-soft);
}

.brand-button {
    background: var(--brand-green);
}

.brand-button:hover {
    background: #274d2d;
}

.profile-select-button {
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.alert {
    padding: 14px 16px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 0.94rem;
}

.alert-success {
    background: #edf9f1;
    border-color: #cce8d4;
    color: #25633a;
}

.alert-info {
    background: #eef6ff;
    border-color: #d8e7ff;
    color: #27548f;
}

.alert-error {
    background: #fff2f2;
    border-color: #f0cdcd;
    color: #8c2d2d;
}

.alert-list {
    margin: 0;
    padding-left: 18px;
}

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

.checkbox-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table-actions form {
    margin: 0;
}

.table-action-button {
    padding: 10px 14px;
    font-size: 0.88rem;
}

.table-action-icon {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    padding: 8px;
}

.table-action-icon svg {
    width: 18px;
    height: 18px;
}

.invoice-table-actions {
    flex-wrap: nowrap;
}

.invoice-table-actions .table-action-button {
    white-space: nowrap;
}

.invoice-detail-modal-content {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
}

.invoice-detail-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.invoice-detail-summary > div {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
}

.invoice-detail-summary span {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.invoice-detail-summary strong {
    color: var(--text);
    font-size: 0.9rem;
}

.invoice-detail-state {
    display: grid;
    place-items: center;
    min-height: 180px;
    color: var(--text-soft);
    font-weight: 700;
}

.invoice-detail-state.is-error {
    color: #b63b3b;
}

.invoice-detail-table-wrap {
    border-radius: 14px;
}

.expedition-detail-modal-content {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
}

.expedition-detail-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.expedition-detail-summary > div {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
}

.expedition-detail-summary span {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.expedition-detail-summary strong {
    color: var(--text);
    font-size: 0.9rem;
}

.expedition-note-panel {
    margin-bottom: 18px;
}

.expedition-note-copy {
    margin: 0;
    color: var(--text-soft);
}

.expedition-detail-state {
    display: grid;
    place-items: center;
    min-height: 180px;
    color: var(--text-soft);
    font-weight: 700;
}

.expedition-detail-state.is-error {
    color: #b63b3b;
}

.expedition-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.expedition-detail-table-wrap {
    border-radius: 14px;
}

.table-action-danger {
    color: #a33535;
    border-color: #efd0d0;
    background: #fff6f6;
}

@media (max-width: 992px) {
    .expedition-detail-summary,
    .expedition-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 640px) {
    .expedition-detail-summary,
    .expedition-meta-grid {
        grid-template-columns: 1fr;
    }

}

.simple-select-header {
    margin-top: 18px;
}

.simple-select-title {
    font-size: clamp(1.8rem, 2.8vw, 2.35rem);
}

.client-list {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.client-card-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.client-card-row:hover {
    border-color: #c8d8f1;
    box-shadow: 0 14px 32px rgba(36, 56, 92, 0.08);
    transform: translateY(-1px);
}

.client-card-main {
    display: grid;
    gap: 10px;
}

.simple-select-actions {
    margin-top: 22px;
}

.client-loads-layout {
    align-items: start;
}

.loads-accordion {
    display: grid;
    gap: 14px;
}

.loads-list-panel {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.fleet-map-panel {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.fleet-map-wrap {
    display: block;
}

.fleet-map-canvas {
    position: relative;
    z-index: 0;
    isolation: isolate;
    min-height: 380px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background:
        linear-gradient(180deg, #f9fbfd 0%, #f4f8fb 100%),
        repeating-linear-gradient(90deg, rgba(102, 119, 145, 0.04) 0, rgba(102, 119, 145, 0.04) 1px, transparent 1px, transparent 38px),
        repeating-linear-gradient(0deg, rgba(102, 119, 145, 0.04) 0, rgba(102, 119, 145, 0.04) 1px, transparent 1px, transparent 38px);
}

.fleet-map-fallback {
    width: 100%;
    height: 380px;
    display: block;
    border: 0;
}

.fleet-map-canvas .leaflet-container {
    width: 100%;
    height: 380px;
    font: inherit;
}

.fleet-truck-marker {
    background: transparent;
    border: 0;
}

.fleet-truck-marker svg {
    display: block;
    width: 56px;
    height: 56px;
    filter: drop-shadow(0 5px 8px rgba(31, 46, 68, 0.25));
}

.fleet-demo-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.fleet-map-legend {
    display: grid;
    gap: 12px;
}

.fleet-legend-item {
    display: grid;
    width: 100%;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px 16px;
    color: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #fbfcfe;
}

.fleet-legend-item:hover,
.fleet-legend-item:focus-visible {
    border-color: #a8c5ad;
    background: #f3f9f4;
    outline: 0;
}

.fleet-legend-dot {
    width: 14px;
    height: 14px;
    margin-top: 4px;
    border-radius: 50%;
}

.fleet-legend-item strong,
.fleet-legend-item p {
    margin: 0;
}

.fleet-legend-item p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.load-accordion-item {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px !important;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.load-accordion-button {
    padding: 14px 18px;
    background: #fff;
    box-shadow: none !important;
}

.load-accordion-button:not(.collapsed) {
    background: #fbfcfe;
}

.load-accordion-button::after {
    flex: 0 0 auto;
    margin-left: 18px;
}

.load-line-grid {
    width: 100%;
    display: grid;
    gap: 14px;
    align-items: center;
}

.load-line-primary,
.load-line-dates {
    display: grid;
    gap: 3px;
}

.load-line-primary,
.load-line-dates,
.load-line-vehicle {
    justify-items: center;
    text-align: center;
}

.load-line-primary {
    justify-items: start;
    text-align: left;
}

.load-line-title {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
}

.load-line-reference {
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 700;
}

.load-line-route {
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.35;
    justify-self: center;
    text-align: center;
}

.load-line-dates {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.load-line-vehicle {
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.load-line-status {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

.load-document-button {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: #56677f;
}

.load-document-button svg {
    width: 17px;
    height: 17px;
}

.load-document-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.load-accordion-body {
    padding: 0 18px 18px;
    background: #fbfcfe;
}

.load-body-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.72fr) minmax(380px, 1.28fr);
    gap: 16px;
    align-items: start;
}

.load-body-info,
.load-body-map {
    display: grid;
    gap: 14px;
}

.load-body-map .map-canvas {
    min-height: 300px;
}

.map-canvas,
.load-map-frame,
.map-frame-shell {
    width: 100%;
    min-height: 360px;
    border: 0;
    border-radius: 22px;
}

.map-frame-shell {
    overflow: hidden;
    border: 1px solid var(--border);
    background: #fff;
}

.load-list {
    display: grid;
    gap: 14px;
}

.load-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.load-card-button {
    width: 100%;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.load-card:hover {
    border-color: #cedced;
    box-shadow: 0 16px 28px rgba(36, 56, 92, 0.08);
    transform: translateY(-1px);
}

.load-card.is-active {
    border-color: #c7d6ea;
    background: #fbfdff;
    box-shadow: inset 0 0 0 1px rgba(47, 111, 237, 0.04);
}

.load-detail-panel {
    position: relative;
    min-height: 640px;
}

.load-detail-panel.is-loading {
    opacity: 0.7;
}

.load-card-head,
.load-footer,
.detail-stats {
    display: grid;
    gap: 14px;
}

.load-card-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.load-route {
    margin: 0;
    color: var(--text);
    font-size: 0.96rem;
    font-weight: 700;
}

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

.load-meta-item,
.info-pair {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #fbfcfe;
}

.load-meta-item span,
.info-pair span {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.load-meta-item strong,
.info-pair strong,
.tracking-cta {
    color: var(--text);
    font-size: 0.92rem;
}

.load-footer {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
}

.tracking-cta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: var(--brand-green);
    font-weight: 700;
}

.route-visual-wrap {
    display: grid;
    gap: 16px;
}

.route-summary-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fbfcfe;
}

.route-summary-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.route-track {
    display: grid;
    gap: 16px;
}

.route-track-bar {
    position: relative;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7edf5;
}

.route-track-progress {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #8dd8cf 0%, #305e37 100%);
}

.route-stop-index {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-muted);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 800;
}

.stops-section {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #ffffff;
}

.stops-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.stop-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.stop-detail-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
    box-shadow: 0 10px 24px rgba(36, 56, 92, 0.04);
}

.stop-detail-card.is-current {
    border-color: #cfe0d1;
    background: linear-gradient(180deg, #f8fcf8 0%, #f1f8f2 100%);
}

.stop-detail-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.stop-kind-badge,
.stop-current-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stop-kind-badge {
    color: #42536b;
    background: #eef3f8;
}

.stop-kind-origin {
    color: #0f5e70;
    background: #e8f7fb;
}

.stop-kind-stop {
    color: #8a5a17;
    background: #fff4de;
}

.stop-kind-destination {
    color: #1f6a33;
    background: #edf8ef;
}

.stop-current-pill {
    color: var(--brand-green);
    background: var(--brand-green-soft);
}

.stop-detail-body {
    display: grid;
    gap: 6px;
}

.stop-detail-body strong,
.stop-detail-body p {
    margin: 0;
}

.stop-detail-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.route-visual {
    position: relative;
    min-height: 90px;
    padding: 18px 0 4px;
}

.route-visual-line {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 38px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(48, 94, 55, 0.18), rgba(48, 94, 55, 0.42));
}

.route-stop,
.route-truck {
    position: absolute;
    top: 24px;
    transform: translateX(-50%);
}

.route-stop {
    display: grid;
    justify-items: center;
    gap: 8px;
}

.route-stop-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: #9fb2c8;
    box-shadow: 0 0 0 1px rgba(108, 124, 146, 0.22);
}

.route-stop.is-current .route-stop-dot {
    background: var(--brand-green);
    box-shadow: 0 0 0 6px rgba(48, 94, 55, 0.1);
}

.route-stop-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 800;
}

.route-truck {
    top: 4px;
    color: var(--brand-green);
}

.detail-metric {
    font-size: 1.15rem;
}

.trip-detail {
    align-content: start;
}

.trip-overview {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
}

.trip-overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.trip-overview-head .panel-title {
    margin: 3px 0 0;
    font-size: 1rem;
}

.trip-progress-row {
    display: grid;
    grid-template-columns: auto minmax(80px, 1fr) auto;
    gap: 10px;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.trip-progress-row > span,
.trip-progress-row > strong {
    color: var(--brand-green);
    font-weight: 800;
}

.trip-progress-row > strong {
    color: var(--text);
    font-size: 0.82rem;
}

.trip-route-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.trip-route-summary > div,
.trip-current-position {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.trip-route-summary span,
.trip-current-position span {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.trip-route-summary strong,
.trip-current-position strong {
    overflow: hidden;
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.35;
    text-overflow: ellipsis;
}

.trip-route-arrow {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--brand-green) !important;
    background: var(--brand-green-soft);
    font-size: 1rem !important;
    letter-spacing: 0 !important;
}

.trip-current-position {
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--brand-green-soft);
}

.stops-section {
    gap: 12px;
    padding: 16px;
}

.stop-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.stop-detail-card {
    gap: 10px;
    padding: 12px;
}

.stop-detail-body p {
    font-size: 0.84rem;
    line-height: 1.4;
}

.trip-meta-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

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

.trip-stops-section {
    padding: 14px;
}

.trip-stop-lines {
    display: grid;
    gap: 8px;
}

.trip-stop-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fbfcfe;
}

.trip-stop-line.is-current {
    border-color: #cfe0d1;
    background: #f2f9f3;
}

.trip-stop-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.trip-stop-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
}

.trip-stop-tags .stop-kind-badge,
.trip-stop-tags .stop-current-pill,
.trip-stop-tags .stop-progress-pill {
    padding: 4px 8px;
    font-size: 0.68rem;
}

.stop-progress-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.stop-progress-completed {
    color: #1f6a33;
    background: #edf8ef;
}

.stop-progress-in_progress {
    color: #0f5e70;
    background: #e8f7fb;
}

.stop-progress-pending {
    color: #66778f;
    background: #eef3f8;
}

.trip-stop-copy p {
    margin: 0;
    color: var(--text);
    font-size: 0.86rem;
    line-height: 1.35;
}

.route-stop-map-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    background: #42647a;
    box-shadow: 0 3px 10px rgba(31, 46, 68, 0.26);
    font-size: 0.88rem;
    line-height: 1;
    font-weight: 800;
    overflow: visible;
    text-align: center;
    transform: translateY(-1px);
}

.route-stop-map-marker.is-current {
    background: var(--brand-green);
    box-shadow: 0 0 0 5px rgba(48, 94, 55, 0.16);
}

.trip-meta-grid .info-pair {
    padding: 10px;
    border-radius: 12px;
}

.sidebar-toggle {
    display: none;
}

@media (max-width: 1180px) {
    .portal-shell {
        grid-template-columns: 1fr;
    }

    .portal-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(92vw, 320px);
        transform: translateX(-102%);
        transition: transform 180ms ease;
        z-index: 80;
        box-shadow: 0 16px 48px rgba(28, 43, 74, 0.12);
    }

    .portal-shell.sidebar-open .portal-sidebar {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .hero-inner,
    .auth-grid,
    .split-grid,
    .stat-grid,
    .section-grid.columns-4,
    .section-grid.columns-3,
    .quick-actions-showcase,
    .profile-grid,
    .client-grid,
    .fleet-map-wrap,
    .card-list-column-headings,
    .load-line-grid,
    .load-body-grid,
    .load-meta-grid,
    .meta-grid,
    .detail-stats {
        grid-template-columns: 1fr;
    }

    .client-card-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .load-card-head,
    .load-footer,
    .route-summary-head,
    .stops-section-head {
        grid-template-columns: 1fr;
    }

    .load-line-status {
        justify-content: flex-start;
    }

    .card-list-column-headings {
        display: none;
    }
}

@media (max-width: 720px) {
    .portal-topbar {
        flex-direction: column-reverse;
        align-items: flex-start;
        padding-inline: 18px;
    }

    .portal-main {
        padding: 18px;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .topbar-left {
        width: 100%;
    }

    .auth-shell {
        padding: 18px;
    }

    .auth-copy,
    .auth-card,
    .hero-banner,
    .panel,
    .metric-card {
        border-radius: 18px;
    }

    .auth-copy,
    .auth-card {
        padding: 22px;
    }

    .brand-auth-copy {
        min-height: auto;
        padding: 24px 22px;
        gap: 8px;
    }

    .brand-auth-copy::after,
    .brand-auth-copy p {
        display: none;
    }

    .brand-auth-copy .auth-brand-logo {
        width: min(240px, 100%);
        margin-bottom: 4px;
    }

    .brand-auth-copy .brand-chip {
        display: none;
    }

    .brand-auth-copy .auth-title {
        max-width: none;
    }

    .auth-title-overline {
        font-size: 0.74rem;
        letter-spacing: 0.14em;
    }

    .auth-title-sub {
        max-width: 18ch;
        font-size: 1rem;
        line-height: 1.2;
    }

    .auth-actions {
        align-items: stretch;
    }

    .auth-actions > * {
        width: 100%;
        justify-content: center;
    }

    .tracking-cta {
        justify-content: flex-start;
    }
}

/* Sistema visual Bootstrap inspirado en DeCA. */
:root {
    --bg: #f5f7fb;
    --bg-soft: #eef3fc;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --surface-muted: #eef4fc;
    --border: #e6ecf4;
    --border-strong: #dce4f0;
    --text: #10233f;
    --text-soft: #52657d;
    --text-muted: #64748b;
    --primary: var(--brand-primary, #305e37);
    --primary-soft: color-mix(in srgb, var(--primary) 10%, #ffffff);
    --shadow-sm: 0 4px 17px rgba(23, 43, 77, 0.035);
    --shadow-md: 0 18px 50px rgba(23, 43, 77, 0.09);
    --radius-xl: 18px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

body {
    font-family: "DM Sans", system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
}

h1, h2, h3, h4, h5, h6,
.page-title, .section-title, .panel-title, .card-title {
    font-family: "Manrope", "DM Sans", sans-serif;
    letter-spacing: -0.035em;
}

.portal-shell {
    display: block;
    min-height: 100vh;
    background: var(--bg);
}

.portal-topbar {
    position: sticky;
    top: 0;
    z-index: 70;
    min-height: 72px;
    padding: 0;
    background: color-mix(in srgb, var(--primary) 42%, #071a35);
    box-shadow: 0 2px 12px rgba(11, 31, 58, 0.1);
    border: 0;
}

.portal-topbar .navbar-brand {
    color: #fff;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff !important;
    font-family: "Manrope", sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.06em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 82%, #ffffff), var(--primary));
    color: #fff;
    font-size: 0.95rem;
    letter-spacing: 0;
}

.brand-dot { color: color-mix(in srgb, var(--primary) 62%, #ffffff); }

.portal-topbar .navbar-toggler {
    color: #fff;
    border: 0;
    font-size: 1.7rem;
}

.portal-topbar .navbar-toggler:focus { box-shadow: none; }

.portal-topbar .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 0.75rem !important;
    border-radius: 9px;
    color: #b7c7e2;
    font-size: 0.875rem;
    font-weight: 700;
    white-space: nowrap;
}

.portal-topbar .nav-link:hover,
.portal-topbar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.portal-nav-icon { display: inline-flex; width: 15px; height: 15px; }
.portal-nav-icon svg { width: 100%; height: 100%; }

.topbar-lang {
    display: flex;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.topbar-lang a {
    padding: 4px 7px;
    color: #c4d2e9;
    font-size: 0.7rem;
    font-weight: 800;
}

.topbar-lang a.is-active { color: #fff; background: rgba(255, 255, 255, 0.14); }

.profile-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #d9e5f8;
}

.profile-button:hover { color: #fff; }
.avatar { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: #315c9e; color: #fff; font-size: 0.72rem; font-weight: 800; }
.profile-meta { display: grid; gap: 1px; font-size: 0.72rem; line-height: 1.1; }
.profile-meta span { color: #9fb4d3; text-transform: capitalize; }

.btn {
    border-radius: 10px;
    padding: 0.58rem 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.btn-primary,
.primary-button {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 7px 16px color-mix(in srgb, var(--primary) 28%, transparent);
}

.btn-primary:hover, .btn-primary:focus,
.primary-button:hover, .primary-button:focus { border-color: color-mix(in srgb, var(--primary) 78%, #000000); background: color-mix(in srgb, var(--primary) 78%, #000000); }

.btn-ghost { color: #e7eefb; border-color: rgba(255, 255, 255, 0.22); }
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }

.portal-main { padding-top: 36px; padding-bottom: 64px; }
.portal-page-heading { margin-bottom: 28px; }
.page-kicker { margin: 0 0 5px; color: var(--primary); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.page-title { margin: 0; font-size: clamp(1.75rem, 3vw, 2.45rem); font-weight: 800; color: var(--text); }

.panel, .metric-card, .hero-banner, .profile-card, .doc-empty, .hero-side-card,
.auth-card, .client-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.panel { padding: 1.4rem; }
.panel-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #c9d8f3; }
.section-title { font-size: 1.22rem; font-weight: 800; }
.section-subtitle, .panel-subtitle { color: var(--text-muted); }

.hero-banner { overflow: hidden; border-color: #d7e2f4; background: radial-gradient(circle at 90% 10%, #dfeaff 0, transparent 30%), #fff; }
.hero-banner h2 { font-size: clamp(1.9rem, 3vw, 2.8rem); font-weight: 800; }
.metric-card { border-radius: 16px; }
.metric-value { color: var(--primary); font-family: "Manrope", sans-serif; font-weight: 800; }

.data-table { --bs-table-bg: transparent; --bs-table-border-color: var(--border); color: var(--text); }
.data-table th { padding: 1rem; color: var(--text-muted); font-size: 0.69rem; font-weight: 800; letter-spacing: 0.075em; text-transform: uppercase; }
.data-table td { padding: 1rem; vertical-align: middle; }
.table-wrap { border: 1px solid var(--border); border-radius: 14px; }

.input, .form-control, .form-select {
    min-height: 44px;
    border: 1px solid #dce4f0;
    border-radius: 10px;
    color: var(--text);
}

.input:focus, .form-control:focus, .form-select:focus {
    border-color: color-mix(in srgb, var(--primary) 60%, #ffffff);
    box-shadow: 0 0 0 0.22rem color-mix(in srgb, var(--primary) 14%, transparent);
}

.form-check-input:checked {
    border-color: var(--primary);
    background-color: var(--primary);
}

.form-check-input:focus {
    border-color: color-mix(in srgb, var(--primary) 60%, #ffffff);
    box-shadow: 0 0 0 0.22rem color-mix(in srgb, var(--primary) 14%, transparent);
}

.field label, .form-label { color: #3d4d64; font-size: 0.82rem; font-weight: 700; }
.auth-fields { gap: 1rem; }
.checkbox-pill { border-color: #dce4f0; background: #fff; }
.secondary-button, .ghost-button { border-color: #b5c9f3; color: var(--primary); background: #fff; }
.secondary-button:hover, .ghost-button:hover { background: var(--primary-soft); color: var(--primary); }

.status-pill { padding: 0.4rem 0.6rem; font-size: 0.72rem; }
.alert { border: 0; border-radius: 13px; box-shadow: 0 5px 15px rgba(23, 43, 77, 0.05); }
.alert-success { color: #087f5b; background: #e2f8ef; }
.alert-info { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, #ffffff); }
.alert-error { color: #bf3138; background: #fff0f0; }

.auth-page { margin: 0; padding: 0; background: color-mix(in srgb, var(--primary) 7%, #ffffff); }
.auth-shell { display: block; width: 100%; min-height: 100vh; padding: 0; }
.auth-layout, .auth-grid {
    display: grid;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    gap: 0;
    grid-template-columns: 1.15fr 0.85fr;
}

.auth-aside, .auth-grid > .auth-copy {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(36px, 7vw, 100px);
    border: 0;
    border-radius: 0;
    background: radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--primary) 62%, #ffffff) 0, transparent 28%), linear-gradient(145deg, color-mix(in srgb, var(--primary) 56%, #071a35), color-mix(in srgb, var(--primary) 80%, #071a35));
    color: #fff;
    box-shadow: none;
}

.auth-aside::after, .auth-grid > .auth-copy::after {
    position: absolute;
    right: -120px;
    bottom: -170px;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(161, 195, 255, 0.22);
    border-radius: 50%;
    box-shadow: 0 0 0 70px rgba(161, 195, 255, 0.04), 0 0 0 140px rgba(161, 195, 255, 0.025);
    content: "";
}

.auth-copy { max-width: 510px; position: relative; z-index: 1; }
.auth-aside .auth-copy { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.auth-copy h1, .auth-title { margin: 48px 0 20px; color: #fff; font-size: clamp(2.4rem, 4vw, 4.05rem); font-weight: 800; line-height: 1.04; }
.auth-copy p { color: #c6d8f9; font-size: 1.1rem; line-height: 1.55; }
.auth-eyebrow { display: inline-flex; width: fit-content; margin-top: 48px; padding: 0.42rem 0.7rem; border-radius: 999px; background: rgba(255, 255, 255, 0.12); color: #dbe9ff; font-size: 0.75rem; font-weight: 800; }
.auth-points { display: grid; gap: 14px; margin: 36px 0 0; padding: 0; list-style: none; font-weight: 600; }
.auth-points i { margin-right: 9px; color: #71d6bc; }
.dualtech-credit { position: relative; z-index: 1; color: #a9bfdf; font-size: 0.8rem; }
.auth-platform-logo { position: relative; z-index: 1; display: block; width: min(330px, 100%); max-height: 100px; object-fit: contain; object-position: left center; }

.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 32px; background: color-mix(in srgb, var(--primary) 7%, #ffffff); }
.auth-form { width: 100%; max-width: 410px; }
.auth-form h2 { margin: 28px 0 8px; font-size: 1.9rem; font-weight: 800; }
.auth-form-card, .auth-grid > .auth-card {
    margin-top: 26px;
    padding: 26px;
    border: 1px solid #e2eaf6;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-md);
}

.auth-grid > .auth-card { align-self: center; justify-self: center; width: min(410px, calc(100% - 48px)); }
.auth-form-card .form-label { margin-bottom: 0.45rem; }
.auth-footer-link { margin-top: 20px; color: var(--text-muted); font-size: 0.875rem; text-align: center; }
.auth-text-link, .auth-footer-link a { color: var(--primary); font-size: 0.82rem; font-weight: 700; text-decoration: none; }
.auth-locale-links { display: flex; justify-content: flex-end; gap: 9px; }
.auth-locale-links a { color: var(--text-muted); font-size: 0.72rem; font-weight: 800; text-decoration: none; }
.auth-locale-links a.is-active { color: var(--primary); }
.auth-card-compact { width: min(580px, calc(100% - 40px)); margin: 8vh auto; padding: 30px; }

.auth-profile-form { max-width: 480px; }
.auth-profile-form h2 { margin-top: 32px; }
.auth-profile-selection .auth-copy h1 { font-size: clamp(2.25rem, 3.6vw, 3.55rem); }
.profile-selection-card { padding: 12px; }
.profile-selection-card .client-list { gap: 8px; margin-top: 0; }
.profile-selection-card form { margin: 0; }

.profile-selection-card .profile-select-button {
    min-height: 78px;
    padding: 14px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: var(--surface-alt);
}

.profile-selection-card .profile-select-button:hover,
.profile-selection-card .profile-select-button:focus-visible {
    border-color: color-mix(in srgb, var(--primary) 28%, #ffffff);
    background: var(--primary-soft);
    box-shadow: none;
    transform: none;
}

.profile-selection-card .client-card-main { gap: 4px; }
.profile-selection-card .client-card-code { color: var(--primary); }
.profile-selection-card .client-card-meta { display: flex; align-items: center; gap: 12px; }
.profile-select-arrow { color: var(--primary); font-size: 1rem; transition: transform 160ms ease; }
.profile-select-button:hover .profile-select-arrow,
.profile-select-button:focus-visible .profile-select-arrow { transform: translateX(3px); }

@media (max-width: 991px) {
    .portal-topbar .navbar-collapse { padding: 10px 0 15px; }
    .auth-layout, .auth-grid { grid-template-columns: 1fr; }
    .auth-aside, .auth-grid > .auth-copy { min-height: 350px; padding: 40px; }
    .auth-copy h1, .auth-title { margin: 28px 0 14px; }
    .auth-points { display: none; }
}

@media (max-width: 1399px) {
    .portal-topbar .navbar-collapse { padding: 10px 0 15px; }
}

@media (max-width: 575px) {
    .portal-main { padding-top: 26px; }
    .portal-topbar .profile-meta { display: none; }
    .portal-topbar .topbar-actions { gap: 6px; }
    .portal-topbar .topbar-lang a { padding: 5px 4px; }
    .portal-topbar .btn-ghost { padding: 0.48rem 0.62rem; font-size: 0.78rem; }
    .auth-aside, .auth-grid > .auth-copy { min-height: 315px; padding: 28px; }
    .auth-copy h1, .auth-title { font-size: 2.35rem; }
    .auth-copy p { font-size: 1rem; }
    .auth-platform-logo { width: min(250px, 100%); max-height: 76px; }
    .auth-form-wrap { padding: 24px; }
}

/* Mantiene el menú lateral original junto al sistema visual actual. */
.portal-shell {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
}

.portal-topbar {
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 0;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    box-shadow: none;
    backdrop-filter: blur(14px);
}

.portal-topbar .topbar-actions { margin: 0; }

.portal-topbar .topbar-lang {
    border-color: var(--border);
    background: var(--surface-alt);
}

.portal-topbar .topbar-lang a { color: var(--text-muted); }
.portal-topbar .topbar-lang a.is-active { color: var(--primary); background: var(--primary-soft); }

.portal-topbar .ghost-button,
.portal-topbar .icon-button {
    color: var(--text-soft);
    border-color: var(--border);
    background: #fff;
}

.portal-topbar .ghost-button:hover,
.portal-topbar .icon-button:hover { color: var(--primary); background: var(--primary-soft); }

.portal-topbar .profile-button { color: var(--text); }
.portal-topbar .profile-button:hover { color: var(--primary); }
.portal-topbar .profile-meta span { color: var(--text-muted); }
.portal-topbar .avatar { background: var(--primary); }
.portal-topbar .profile-meta { display: none; }
.portal-topbar .page-kicker { margin-bottom: 2px; font-size: 0.68rem; letter-spacing: 0.12em; }
.portal-topbar .page-title { font-size: clamp(1.2rem, 1.6vw, 1.65rem); line-height: 1.02; }
.portal-topbar .ghost-button,
.portal-topbar .icon-button,
.portal-topbar .profile-button { min-height: 38px; }
.portal-topbar .profile-button { padding: 6px; min-width: 38px; }

.portal-main { padding: 24px 28px 36px; }

/* Las tarjetas se mantienen compactas y con la misma cuadrícula para todos los perfiles. */
.quick-actions-showcase {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.showcase-card {
    min-height: 220px;
    gap: 14px;
    padding: 24px 20px;
}

@media (min-width: 721px) and (max-width: 980px) {
    .quick-actions-showcase,
    .quick-actions-showcase.has-six-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .quick-actions-showcase,
    .quick-actions-showcase.has-six-items {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 1180px) {
    .portal-shell { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .portal-topbar {
        flex-direction: column-reverse;
        align-items: flex-start;
        padding: 12px 18px;
    }

    .portal-topbar .topbar-actions {
        flex-wrap: wrap;
        white-space: normal;
    }
}
