:root {
    --route-map-sidebar-width: 360px;
    --route-map-stage-height: calc(100vh - var(--route-nav-height, 72px) - 260px);
}

* {
    box-sizing: border-box;
}

body.route-map-page {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: #f1f5f9;
    color: #0f172a;
    font-family: var(--route-font);
}

body.route-map-fullscreen-active {
    overflow: hidden;
}

.route-map-content {
    padding: 18px 22px 26px;
}

.route-map-heading {
    margin-bottom: 14px;
}

.route-map-toolbar {
    position: sticky;
    top: var(--route-nav-height, 72px);
    z-index: 1100;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 13px;
    padding: 10px 12px;
    border: 1px solid #dbe4ee;
    border-radius: 14px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .09);
    backdrop-filter: blur(10px);
}

.route-map-filter-form,
.route-map-toolbar-actions {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
}

.route-map-toolbar-actions {
    justify-content: flex-end;
}

.route-map-field,
.route-map-select-field,
.route-map-distance-field,
.route-map-search {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.route-map-field > span,
.route-map-select-field > span,
.route-map-distance-field > span,
.route-map-shifts legend {
    color: #475569;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.route-map-field input,
.route-map-search input,
.route-map-select-field select,
.route-map-distance-control {
    min-height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #0f172a;
    font-size: 12px;
}

.route-map-field input,
.route-map-select-field select {
    padding: 7px 9px;
}

.route-map-field input {
    width: 128px;
}

.route-map-select-field select {
    width: 128px;
}

.route-map-distance-field {
    min-width: 160px;
    flex: 0 1 170px;
}

.route-map-distance-control {
    display: grid;
    grid-template-columns: minmax(80px, 1fr) 46px;
    align-items: center;
    gap: 7px;
    padding: 5px 8px;
}

.route-map-distance-control input {
    width: 100%;
    min-width: 0;
    accent-color: #2563eb;
}

.route-map-distance-control strong {
    color: #1e3a8a;
    font-size: 11px;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}

.route-map-search input {
    width: clamp(150px, 12vw, 210px);
    min-width: 145px;
    padding: 7px 10px;
}

.route-map-shifts {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.route-map-shifts legend {
    margin-bottom: 5px;
}

.route-map-shift-options {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.route-map-shift-option {
    position: relative;
}

.route-map-shift-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.route-map-shift-option span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.route-map-shift-option span:hover {
    transform: translateY(-1px);
    border-color: #93c5fd;
}

.route-map-shift-option input:focus-visible + span {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.route-map-shift-option input:checked + span {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 5px 12px rgba(37, 99, 235, .24);
}

.route-map-btn,
.route-map-floating-btn,
.route-map-text-btn {
    font: inherit;
    cursor: pointer;
}

.route-map-btn {
    min-height: 36px;
    padding: 7px 11px;
    border: 0;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 900;
}

.route-map-btn--primary {
    background: #2563eb;
    color: #fff;
}

.route-map-btn--primary:hover {
    background: #1d4ed8;
}

.route-map-btn--secondary {
    border: 1px solid #2563eb;
    background: #fff;
    color: #1d4ed8;
}

.route-map-btn--secondary:hover {
    background: #eff6ff;
}

.route-map-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 8px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.route-map-toggle input {
    width: 15px;
    height: 15px;
    accent-color: #2563eb;
}

.route-map-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 13px;
}

.route-map-kpi {
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #2563eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 7px 18px rgba(15, 23, 42, .05);
}

.route-map-kpi--warning {
    border-top-color: #d97706;
}

.route-map-kpi span {
    display: block;
    overflow: hidden;
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .045em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.route-map-kpi strong {
    display: block;
    margin-top: 4px;
    color: #0f172a;
    font-size: 22px;
    line-height: 1;
}

.route-map-layout {
    display: grid;
    grid-template-columns: var(--route-map-sidebar-width) minmax(0, 1fr);
    min-height: max(560px, var(--route-map-stage-height));
    overflow: hidden;
    border: 1px solid #dbe4ee;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .09);
}

.route-map-layout.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 13000;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    max-height: 100vh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.route-map-layout.is-fullscreen {
    grid-template-columns: minmax(340px, 25vw) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
}

.route-map-layout.is-fullscreen.sidebar-hidden {
    grid-template-columns: 0 minmax(0, 1fr);
}

.route-map-layout.sidebar-hidden {
    grid-template-columns: 0 minmax(0, 1fr);
}

.route-map-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-height: max(560px, var(--route-map-stage-height));
    overflow: hidden;
    border-right: 1px solid #dbe4ee;
    background: #fff;
    transition: opacity .2s ease, visibility .2s ease;
}

.route-map-layout.is-fullscreen .route-map-sidebar {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
}

.route-map-layout.sidebar-hidden .route-map-sidebar {
    visibility: hidden;
    opacity: 0;
}

.route-map-sidebar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.route-map-sidebar-header strong,
.route-map-sidebar-header span {
    display: block;
}

.route-map-sidebar-header strong {
    font-size: 13px;
}

.route-map-sidebar-header span {
    margin-top: 3px;
    color: #64748b;
    font-size: 10px;
}

.route-map-sidebar-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.route-map-text-btn {
    padding: 4px 6px;
    border: 0;
    background: transparent;
    color: #2563eb;
    font-size: 10px;
    font-weight: 900;
}

.route-map-text-btn:hover {
    text-decoration: underline;
}

.route-map-route-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.route-map-route-list::-webkit-scrollbar {
    width: 9px;
}

.route-map-route-list::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.route-map-route-list::-webkit-scrollbar-thumb {
    border: 2px solid #f1f5f9;
    border-radius: 999px;
    background: #94a3b8;
}

.route-map-route-item {
    display: grid;
    grid-template-columns: 20px 14px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: flex-start;
    padding: 10px 11px;
    border-bottom: 1px solid #edf2f7;
    background: #fff;
    cursor: pointer;
    transition: background-color .15s ease;
}

.route-map-route-item:hover,
.route-map-route-item.is-focused {
    background: #eff6ff;
}

.route-map-route-item.is-hidden-by-search {
    display: none;
}

.route-map-route-item input {
    width: 15px;
    height: 15px;
    margin: 2px 0 0;
    accent-color: #2563eb;
}

.route-map-route-swatch {
    width: 11px;
    height: 11px;
    margin-top: 4px;
    border: 2px solid rgba(15, 23, 42, .15);
    border-radius: 999px;
    background: var(--route-color, #2563eb);
    box-shadow: 0 0 0 2px #fff;
}

.route-map-route-copy {
    min-width: 0;
}

.route-map-route-title {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    min-width: 0;
    color: #0f172a;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.25;
}

.route-map-route-title span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-map-route-name {
    margin-top: 3px;
    overflow: hidden;
    color: #475569;
    font-size: 10px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-map-route-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 7px;
    margin-top: 5px;
    color: #64748b;
    font-size: 9px;
    line-height: 1.25;
}

.route-map-route-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.route-map-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100px;
    padding: 3px 5px;
    border-radius: 5px;
    background: #e2e8f0;
    color: #334155;
    font-size: 8px;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
}

.route-map-badge--completed {
    background: #dcfce7;
    color: #166534;
}

.route-map-badge--recovered {
    background: #d1fae5;
    color: #047857;
}

.route-map-badge--warning {
    background: #ffedd5;
    color: #9a3412;
}

.route-map-badge--nearby {
    background: #fef3c7;
    color: #92400e;
}

.route-map-stage {
    position: relative;
    min-width: 0;
    min-height: max(560px, var(--route-map-stage-height));
    overflow: hidden;
    background: #dbeafe;
}

.route-map-layout.is-fullscreen .route-map-stage {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
}

.route-map-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
}

.route-map-layout.is-fullscreen .route-map-canvas {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.route-map-stage-actions {
    position: absolute;
    top: 12px;
    left: 52px;
    z-index: 600;
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.route-map-layout.is-fullscreen .route-map-stage-actions {
    top: 14px;
    left: 56px;
    max-width: calc(100% - 370px);
}

.route-map-floating-btn {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    color: #334155;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
    font-size: 10px;
    font-weight: 900;
}

.route-map-layout.is-fullscreen .route-map-floating-btn {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 11px;
}

.route-map-floating-btn:hover {
    background: #eff6ff;
}

.route-map-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 14000;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(15, 23, 42, .48);
}

.route-map-modal-backdrop[hidden] {
    display: none;
}

.route-map-modal {
    position: relative;
    width: min(520px, 100%);
    padding: 22px;
    border: 1px solid #dbe4ee;
    border-top: 4px solid #008bd2;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.route-map-modal strong {
    display: block;
    color: #1f2d3a;
    font-size: 20px;
    line-height: 1.2;
}

.route-map-modal p {
    margin: 12px 0 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.55;
}

.route-map-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.route-map-modal-close:hover {
    background: #f1f5f9;
}

.route-map-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.route-map-legend {
    position: absolute;
    right: 12px;
    bottom: 24px;
    z-index: 600;
    width: min(290px, calc(100% - 24px));
    max-height: 180px;
    overflow-y: auto;
    padding: 9px 10px;
    border: 1px solid rgba(148, 163, 184, .75);
    border-radius: 9px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .14);
    backdrop-filter: blur(8px);
}

.route-map-layout.is-fullscreen .route-map-legend {
    width: min(360px, calc(100% - 24px));
    max-height: min(40vh, 360px);
}

.route-map-legend-title {
    margin-bottom: 6px;
    color: #0f172a;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.route-map-legend-item {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
    padding: 3px 0;
    color: #334155;
    font-size: 9px;
}

.route-map-legend-line {
    height: 4px;
    border-radius: 999px;
    background: var(--route-color, #2563eb);
}

.route-map-legend-item span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-map-legend-item small {
    color: #64748b;
    font-size: 8px;
}

.route-map-loading,
.route-map-error {
    position: absolute;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 30px;
    background: rgba(248, 250, 252, .94);
    color: #334155;
    text-align: center;
}

.route-map-loading[hidden],
.route-map-error[hidden] {
    display: none !important;
}

.route-map-loading strong,
.route-map-error strong {
    font-size: 14px;
}

.route-map-loading span,
.route-map-error span {
    max-width: 520px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.45;
}

.route-map-spinner {
    width: 38px;
    height: 38px;
    border: 4px solid #bfdbfe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: route-map-spin .85s linear infinite;
}

@keyframes route-map-spin {
    to { transform: rotate(360deg); }
}

.route-map-empty {
    padding: 24px 16px;
    color: #64748b;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
}

.route-map-stop-icon,
.route-map-terminal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--route-color, #2563eb);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .35);
}

.route-map-stop-icon {
    width: 14px;
    height: 14px;
}

.route-map-stop-icon.is-nearby {
    width: 18px;
    height: 18px;
    border: 3px solid #fef08a;
    box-shadow: 0 0 0 2px #d97706, 0 3px 9px rgba(15, 23, 42, .35);
}

.route-map-stop-icon.is-factory {
    border-radius: 4px;
}

.route-map-terminal-icon {
    width: 20px;
    height: 20px;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
}

.route-map-terminal-icon.is-end {
    border-radius: 5px;
}

.route-map-popup {
    min-width: 230px;
    color: #334155;
    font-size: 11px;
    line-height: 1.4;
}

.route-map-popup__title {
    margin-bottom: 5px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
}

.route-map-popup__subtitle {
    margin-bottom: 7px;
    color: #475569;
    font-size: 10px;
}

.route-map-popup__grid {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 3px 8px;
}

.route-map-popup__grid b {
    color: #0f172a;
}

.route-map-popup__nearby {
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px solid #e2e8f0;
}

.route-map-popup__nearby strong {
    display: block;
    margin-bottom: 4px;
    color: #92400e;
}

.route-map-popup__nearby ul {
    margin: 0;
    padding-left: 16px;
}

.route-map-popup__nearby li {
    margin: 2px 0;
}

.leaflet-container {
    font-family: var(--route-font);
}

.leaflet-tooltip.route-map-line-tooltip {
    padding: 5px 7px;
    border: 0;
    border-radius: 6px;
    background: rgba(15, 23, 42, .92);
    color: #fff;
    box-shadow: 0 5px 15px rgba(15, 23, 42, .22);
    font-size: 10px;
    font-weight: 800;
}

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

@media (max-width: 1250px) {
    .route-map-toolbar {
        grid-template-columns: 1fr;
    }

    .route-map-filter-form,
    .route-map-toolbar-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .route-map-search {
        flex: 1 1 280px;
    }

    .route-map-search input {
        width: 100%;
    }
}

@media (max-width: 1050px) {
    :root {
        --route-map-sidebar-width: 320px;
    }

    .route-map-kpis {
        grid-template-columns: repeat(3, minmax(130px, 1fr));
    }
}

@media (max-width: 820px) {
    :root {
        --route-map-stage-height: calc(100vh - var(--route-nav-height, 112px) - 250px);
    }

    .route-map-content {
        padding: 12px;
    }

    .route-map-toolbar {
        top: var(--route-nav-height, 112px);
    }

    .route-map-layout,
    .route-map-layout.sidebar-hidden {
        grid-template-columns: 1fr;
        grid-template-rows: 250px minmax(520px, var(--route-map-stage-height));
    }

    .route-map-layout.sidebar-hidden {
        grid-template-rows: 0 minmax(520px, var(--route-map-stage-height));
    }

    .route-map-layout.is-fullscreen {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(180px, 30dvh) minmax(0, 1fr);
    }

    .route-map-layout.is-fullscreen.sidebar-hidden {
        grid-template-rows: 0 minmax(0, 1fr);
    }

    .route-map-sidebar {
        max-height: 250px;
        border-right: 0;
        border-bottom: 1px solid #dbe4ee;
    }

    .route-map-layout.is-fullscreen .route-map-sidebar {
        height: auto;
        max-height: none;
    }

    .route-map-stage {
        min-height: max(520px, var(--route-map-stage-height));
    }

    .route-map-layout.is-fullscreen .route-map-stage {
        height: auto;
        min-height: 0;
    }

    .route-map-legend {
        max-height: 130px;
    }
}

@media (max-width: 620px) {
    .route-map-filter-form,
    .route-map-toolbar-actions {
        align-items: stretch;
        width: 100%;
    }

    .route-map-field,
    .route-map-search,
    .route-map-select-field,
    .route-map-distance-field {
        flex: 1 1 100%;
    }

    .route-map-field input,
    .route-map-search input,
    .route-map-select-field select,
    .route-map-distance-control {
        width: 100%;
        min-width: 0;
    }

    .route-map-shifts {
        flex: 1 1 100%;
    }

    .route-map-shift-options {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
    }

    .route-map-shift-option span {
        width: 100%;
    }

    .route-map-btn {
        flex: 1 1 100%;
    }

    .route-map-toggle {
        flex: 1 1 calc(50% - 5px);
        justify-content: center;
    }

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

    .route-map-kpi:last-child {
        grid-column: 1 / -1;
    }

    .route-map-stage-actions {
        right: 12px;
        left: 48px;
    }

    .route-map-layout.is-fullscreen .route-map-stage-actions {
        right: 12px;
        left: 48px;
        max-width: calc(100% - 60px);
    }

    .route-map-floating-btn {
        flex: 1 1 auto;
    }

    .route-map-legend {
        right: 8px;
        bottom: 20px;
        width: calc(100% - 16px);
    }
}

/* =========================================================
   Vista analítica: una ejecución representativa por plantilla
   ========================================================= */
.route-map-analysis-note {
    margin: -2px 0 13px;
    padding: 10px 13px;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #2563eb;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.45;
}

.route-map-analysis-note code {
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .75);
    color: #1e3a8a;
    font-family: Consolas, monospace;
    font-size: 10px;
}

.route-map-route-selection {
    display: block;
    margin-top: 5px;
    color: #1d4ed8;
    font-size: 8.5px;
    font-weight: 800;
    line-height: 1.3;
}

.route-map-badge--count {
    background: #e0e7ff;
    color: #3730a3;
}

.route-map-badge--representative {
    background: #dbeafe;
    color: #1d4ed8;
}

.route-map-popup__selection {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 8px;
    padding: 7px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 10px;
    line-height: 1.35;
}

.route-map-popup__selection strong {
    color: #1d4ed8;
}

/* =========================================================
   Frotcom brand layer
   ========================================================= */
body.route-map-page {
    background: var(--route-bg);
    color: var(--route-text);
    font-family: var(--route-font);
}

.route-map-toolbar,
.route-map-layout,
.route-map-kpi,
.route-map-sidebar,
.route-map-route-item,
.route-map-floating-btn,
.route-map-legend {
    border-color: var(--route-border);
}

.route-map-toolbar,
.route-map-layout,
.route-map-kpi {
    box-shadow: 0 10px 24px rgba(38, 55, 69, .07);
}

.route-map-field > span,
.route-map-select-field > span,
.route-map-distance-field > span,
.route-map-shifts legend,
.route-map-kpi span,
.route-map-route-meta,
.route-map-legend-item small {
    color: var(--route-muted);
}

.route-map-field input,
.route-map-search input,
.route-map-select-field select,
.route-map-distance-control,
.route-map-shift-option span,
.route-map-toggle,
.route-map-floating-btn {
    border-color: #c6d4dd;
    color: var(--route-text);
}

.route-map-distance-control input,
.route-map-toggle input {
    accent-color: var(--frotcom-blue);
}

.route-map-distance-control strong,
.route-map-route-selection,
.route-map-popup__selection strong {
    color: var(--frotcom-blue-dark);
}

.route-map-shift-option span:hover {
    border-color: #75bddb;
}

.route-map-shift-option input:focus-visible + span {
    outline-color: var(--frotcom-blue);
}

.route-map-shift-option input:checked + span,
.route-map-btn--primary {
    border-color: var(--frotcom-blue);
    background: var(--frotcom-blue);
    box-shadow: 0 5px 12px rgba(0, 130, 201, .24);
}

.route-map-btn--primary:hover {
    background: var(--frotcom-blue-dark);
}

.route-map-kpi {
    border-top-color: var(--frotcom-blue);
}

.route-map-kpi--warning {
    border-top-color: var(--frotcom-orange);
}

.route-map-stage {
    background: #d8eaf2;
}

.route-map-floating-btn:hover {
    background: var(--frotcom-blue-soft);
}

.route-map-analysis-note,
.route-map-popup__selection {
    border-color: #b9dce9;
    border-left-color: var(--frotcom-blue);
    background: var(--frotcom-blue-soft);
    color: var(--frotcom-blue-dark);
}

.route-map-badge--representative {
    background: var(--frotcom-blue-soft);
    color: var(--frotcom-blue-dark);
}

.route-map-page .route-map-toolbar,
.route-map-page .route-map-toolbar input,
.route-map-page .route-map-toolbar select,
.route-map-page .route-map-toolbar button,
.route-map-page .route-map-sidebar,
.route-map-page .route-map-route-item,
.route-map-page .route-map-legend,
.route-map-page .route-map-popup {
    font-family: var(--route-font) !important;
    font-size: 12px;
}

.route-map-page .route-map-sidebar-header strong,
.route-map-page .route-map-popup__title {
    font-size: 13px;
}

.route-map-page .route-map-kpi span,
.route-map-page .route-map-field > span,
.route-map-page .route-map-select-field > span,
.route-map-page .route-map-distance-field > span,
.route-map-page .route-map-shifts legend {
    font-size: 11px;
}
