html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e52480;
}

.validation-message {
    color: #e52480;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ---- Account pages (login / register) ---- */

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #eef3fb 0%, #f8fafc 60%);
    padding: env(safe-area-inset-top) 1rem env(safe-area-inset-bottom);
}

.auth-brand {
    display: flex;
    justify-content: center;
    padding: 2rem 0 .5rem;
}

.auth-brand-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #052767;
    text-decoration: none;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .75rem;
    background: linear-gradient(135deg, #052767, #3a0647);
    color: #fff;
    font-size: 1.25rem;
}

.auth-page .account-wrapper {
    flex: 1;
    align-items: flex-start;
}

.auth-footer {
    text-align: center;
    color: #9ca3af;
    font-size: .8rem;
    padding: 1rem 0;
}

@media (max-width: 575.98px) {
    .auth-page {
        background: #fff;
    }

    .auth-brand {
        padding-top: 1.25rem;
    }
}

.account-wrapper {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.account-card {
    width: 100%;
    max-width: 440px;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
}

.divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #6b7280;
    font-size: .85rem;
}

    .divider::before, .divider::after {
        content: "";
        flex: 1;
        border-top: 1px solid #e5e7eb;
    }

.provider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: .6rem 1rem;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #111827;
    font-weight: 500;
    border-radius: .5rem;
}

    .provider-btn:hover {
        background: #f9fafb;
        border-color: #9ca3af;
    }

.provider-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    background: #6b7280;
}

.provider-google .provider-icon { background: #db4437; }
.provider-microsoft .provider-icon { background: #2f2f2f; }
.provider-facebook .provider-icon { background: #1877f2; }
.provider-apple .provider-icon { background: #000; }
.provider-icon-password { background: #1b6ec2; }

/* ---- Brand logo (header + auth pages) ---- */

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-right: .5rem;
    border-radius: .5rem;
    background: rgba(255, 255, 255, .15);
    font-size: 1rem;
}

/* ---- Charging map (home page) ---- */

/* Full screen under the sticky header */
.map-page {
    position: fixed;
    top: 3.5rem;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0; /* keeps Leaflet's own z-indexes below the header and the floating menu */
}

plug-map.charging-map {
    display: block;
    width: 100%;
    height: 100%;
    background: #e5e7eb;
}

.leaflet-container {
    font-family: inherit;
}

/* Bigger touch targets for the zoom / locate buttons */
.leaflet-touch .leaflet-bar a,
.map-locate-btn {
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    font-size: 1.3rem;
}

.map-locate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
    border-radius: 4px;
}

    .map-locate-btn:hover {
        background: #f4f4f4;
    }

/* Legend: bottom-left, leaves room for the floating menu button on the right */
.map-legend {
    position: absolute;
    left: calc(.75rem + env(safe-area-inset-left));
    bottom: calc(1.25rem + env(safe-area-inset-bottom));
    max-width: calc(100% - 6.5rem);
    z-index: 800;
    padding: .55rem .8rem;
    border-radius: .75rem;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 3px 12px rgba(0, 0, 0, .15);
    font-size: .8rem;
    pointer-events: none;
}

.map-legend-count {
    font-weight: 600;
    margin-bottom: .25rem;
}

.map-legend-hint {
    color: #b45309;
    margin-bottom: .25rem;
}

.map-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem .75rem;
    color: #374151;
}

    .map-legend-items span {
        display: inline-flex;
        align-items: center;
        gap: .3rem;
        white-space: nowrap;
    }

.dot {
    display: inline-block;
    width: .7rem;
    height: .7rem;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .15);
}

/* Legend: small pin shapes matching the map markers */
.map-legend-items .dot {
    width: .75rem;
    height: .75rem;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border-width: 1.5px;
}

.dot-available { background: #16a34a; }
.dot-busy { background: #f59e0b; }
.dot-offline { background: #dc2626; }
.dot-unknown { background: #6b7280; }

/* Marker popup */
.leaflet-popup-content {
    margin: .85rem 1rem;
}

.map-popup {
    min-width: 210px;
    font-size: .9rem;
}

.map-popup-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: .15rem;
}

.map-popup-operator {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .3rem;
    margin-bottom: .15rem;
    font-size: .85rem;
    color: #1f2937;
}

.map-popup-operator-label {
    padding: 0 .4rem;
    border-radius: .25rem;
    background: #eef2ff;
    color: #3730a3;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.map-popup-address {
    color: #6b7280;
    margin-bottom: .5rem;
}

.map-popup-status {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .5rem;
}

.map-popup-connectors {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-bottom: .4rem;
}

.map-chip {
    padding: .1rem .5rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: .75rem;
    font-weight: 600;
}

.map-chip-power {
    background: #ecfdf5;
    color: #065f46;
}

.map-popup-meta {
    color: #9ca3af;
    font-size: .75rem;
}

/* Prices in the popup */
.map-popup-prices {
    margin: .5rem 0;
    padding: .55rem .65rem;
    border-radius: .5rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    font-size: .85rem;
}

.map-popup-prices-loading {
    color: #6b7280;
    font-style: italic;
}

.map-popup-section-title {
    font-weight: 700;
    margin-bottom: .35rem;
}

.price-tariff + .price-tariff {
    margin-top: .45rem;
    padding-top: .45rem;
    border-top: 1px dashed #e5e7eb;
}

.price-tariff-name {
    font-weight: 600;
    color: #374151;
    font-size: .8rem;
    margin-bottom: .15rem;
}

.price-tariff-connectors {
    font-weight: 400;
    color: #6b7280;
    margin-left: .25rem;
}

    .price-tariff-connectors::before {
        content: "· ";
    }

.price-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .price-list li {
        padding: .1rem 0;
    }

.price-value {
    font-weight: 700;
    font-size: .95rem;
    color: #065f46;
}

.price-unit {
    color: #374151;
    margin-left: .2rem;
}

.price-note {
    color: #9ca3af;
    font-size: .72rem;
    font-weight: 400;
}

/* Long popups (several tariffs) stay scrollable on small phones */
.leaflet-popup-content {
    max-height: 60vh;
    max-height: 60dvh;
    overflow-y: auto;
}

.map-popup .btn {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

@media (max-width: 400px) {
    .map-legend-items {
        display: none; /* tiny phones: just the count */
    }
}

/* ---- Vehicles ---- */

.vehicles-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 1rem 0;
}

.vehicles-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    margin-bottom: 1rem;
}

    .vehicles-header .btn-link {
        flex-basis: 100%;
        text-align: left;
        min-height: auto;
    }

.vehicle-welcome,
.vehicle-empty {
    text-align: center;
    margin: .5rem 0 1.25rem;
}

.vehicle-welcome-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: .75rem;
    border-radius: 50%;
    background: #e8f1fb;
    font-size: 2rem;
}

.vehicle-card-form {
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
}

.vehicle-form-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

    .vehicle-form-actions .btn {
        min-height: 48px;
        flex: 1 1 auto;
    }

.vehicle-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .75rem;
}

.vehicle-item {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #fff;
}

    .vehicle-item.is-active {
        border-color: #198754;
        box-shadow: 0 0 0 1px #198754;
    }

.vehicle-item-title,
.vehicle-choice-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.vehicle-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .75rem;
    color: #6b7280;
    font-size: .875rem;
    margin-top: .2rem;
}

.vehicle-plate {
    padding: 0 .4rem;
    border: 1px solid #9ca3af;
    border-radius: .25rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #111827;
    letter-spacing: .03em;
}

.vehicle-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .75rem;
}

    .vehicle-item-actions .btn {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
    }

.vehicle-confirm {
    align-items: center;
    padding: .5rem;
    border-radius: .5rem;
    background: #fef2f2;
}

.vehicle-choices {
    display: grid;
    gap: .75rem;
}

.vehicle-choice {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    min-height: 72px;
    padding: 1rem 2.75rem 1rem 1rem;
    text-align: left;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .vehicle-choice:hover,
    .vehicle-choice:focus-visible {
        border-color: #1b6ec2;
        box-shadow: 0 0 0 2px rgba(27, 110, 194, .25);
        outline: none;
    }

    .vehicle-choice.is-active {
        border-color: #198754;
    }

.vehicle-choice-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.75rem;
    color: #9ca3af;
}

@media (min-width: 576px) {
    .vehicles-header .btn-link {
        flex-basis: auto;
    }

    .vehicle-form-actions .btn {
        flex: 0 0 auto;
        min-width: 10rem;
    }
}

/* ---- Directions chooser (bottom sheet) ---- */

.nav-chooser {
    position: absolute;
    inset: 0;
    z-index: 1100;
}

.nav-chooser-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, .4);
    opacity: 0;
    transition: opacity .2s ease;
}

.nav-chooser-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 480px;
    margin: 0 auto;
    padding: .5rem 1rem calc(1rem + env(safe-area-inset-bottom));
    background: #fff;
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .2);
    transform: translateY(100%);
    transition: transform .22s ease;
}

.nav-chooser.is-open .nav-chooser-backdrop { opacity: 1; }
.nav-chooser.is-open .nav-chooser-sheet { transform: none; }

.nav-chooser-handle {
    width: 2.5rem;
    height: .3rem;
    margin: .25rem auto .75rem;
    border-radius: 999px;
    background: #d1d5db;
}

.nav-chooser-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.nav-chooser-subtitle {
    color: #6b7280;
    margin-bottom: .9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-chooser-option {
    display: flex;
    align-items: center;
    gap: .9rem;
    width: 100%;
    min-height: 64px;
    margin-bottom: .6rem;
    padding: .75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: .9rem;
    background: #fff;
    color: #111827 !important;
    text-align: left;
    text-decoration: none;
}

    .nav-chooser-option:hover,
    .nav-chooser-option:focus-visible {
        border-color: #1b6ec2;
        background: #f5f9ff;
        outline: none;
    }

.nav-chooser-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #eef2f7;
    color: #1f2937;
    font-size: 1.15rem;
}

.nav-chooser-icon-primary {
    background: linear-gradient(135deg, #052767, #3a0647);
    color: #fff;
}

.nav-chooser-text {
    display: flex;
    flex-direction: column;
}

    .nav-chooser-text small {
        color: #6b7280;
    }

.nav-chooser-cancel {
    min-height: 44px;
    color: #6b7280;
}

/* ---- Turn-by-turn navigation ---- */

/* While navigating: hide the floating menu, legend and locate button */
html.is-navigating .fab-root,
html.is-navigating .map-legend,
html.is-navigating .map-locate-btn,
html.is-navigating .leaflet-control-zoom {
    display: none !important;
}

/* Keep the OpenStreetMap attribution visible above the navigation bar */
html.is-navigating .leaflet-bottom {
    bottom: calc(5.25rem + env(safe-area-inset-bottom));
}

.nav-ui {
    position: absolute;
    inset: 0;
    z-index: 1050;
    pointer-events: none; /* the map stays draggable; panels re-enable events */
}

    .nav-ui > * {
        pointer-events: auto;
    }

.nav-banner {
    position: absolute;
    top: .75rem;
    left: .75rem;
    right: .75rem;
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .8rem 1rem;
    border-radius: 1rem;
    background: #0b3d91;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}

.nav-banner-icon {
    flex: 0 0 auto;
    width: 3rem;
    font-size: 2.2rem;
    line-height: 1;
    text-align: center;
}

.nav-banner-body {
    min-width: 0;
}

.nav-banner-distance {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
}

.nav-banner-text {
    font-size: 1rem;
    font-weight: 500;
}

.nav-banner-then {
    margin-top: .2rem;
    font-size: .8rem;
    opacity: .8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-ui.is-arrived .nav-banner {
    background: #15803d;
}

.nav-toast {
    position: absolute;
    top: 7.5rem;
    left: 50%;
    transform: translateX(-50%);
    padding: .5rem 1rem;
    border-radius: 999px;
    background: rgba(17, 24, 39, .85);
    color: #fff;
    font-size: .9rem;
    white-space: nowrap;
}

    .nav-toast.is-error {
        background: #b91c1c;
    }

.nav-recenter {
    display: none;
    position: absolute;
    left: 50%;
    bottom: calc(6rem + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    min-height: 44px;
    padding: .5rem 1.1rem;
    border: none;
    border-radius: 999px;
    background: #fff;
    color: #0b3d91;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}

.nav-ui.is-free .nav-recenter {
    display: block;
}

.nav-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
    background: #fff;
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .15);
}

.nav-bar-summary {
    flex: 1;
    min-width: 0;
}

.nav-bar-time {
    font-size: 1.35rem;
    font-weight: 800;
    color: #15803d;
    line-height: 1.1;
}

.nav-bar-remaining {
    color: #6b7280;
    font-size: .85rem;
}

.nav-bar-btn {
    min-width: 48px;
    min-height: 48px;
    border: 1px solid #e5e7eb;
    border-radius: .9rem;
    background: #f9fafb;
    font-size: 1.15rem;
}

.nav-bar-stop {
    padding: 0 1.1rem;
    border-color: #dc2626;
    background: #dc2626;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.nav-steps {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 65%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .25);
    z-index: 2;
}

    .nav-steps[hidden] {
        display: none;
    }

.nav-steps-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.nav-steps-list {
    margin: 0;
    padding: 0 0 env(safe-area-inset-bottom);
    list-style: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

    .nav-steps-list li {
        display: flex;
        align-items: center;
        gap: .75rem;
        min-height: 52px;
        padding: .5rem 1rem;
        border-bottom: 1px solid #f3f4f6;
    }

        .nav-steps-list li.is-done {
            opacity: .45;
        }

        .nav-steps-list li.is-next {
            background: #eff6ff;
            font-weight: 600;
        }

.nav-step-icon {
    flex: 0 0 auto;
    width: 1.75rem;
    font-size: 1.3rem;
    text-align: center;
    color: #0b3d91;
}

.nav-step-text {
    flex: 1;
}

.nav-step-distance {
    color: #6b7280;
    font-size: .85rem;
    white-space: nowrap;
}

/* ---- SearchSelect (searchable dropdown) ---- */

.search-select {
    position: relative;
}

.search-select-input {
    padding-right: 2.75rem;
    text-overflow: ellipsis;
}

.search-select.is-disabled .search-select-input {
    background-color: #f3f4f6;
}

.search-select-chevron {
    position: absolute;
    top: 50%;
    right: 1rem;
    width: .65rem;
    height: .65rem;
    margin-top: -.45rem;
    border-right: 2px solid #6b7280;
    border-bottom: 2px solid #6b7280;
    transform: rotate(45deg);
    pointer-events: none;
    transition: transform .15s ease, margin-top .15s ease;
}

.search-select.is-open .search-select-chevron {
    transform: rotate(-135deg);
    margin-top: -.1rem;
}

.search-select-clear {
    position: absolute;
    top: 50%;
    right: .5rem;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    font-size: 1.4rem;
    line-height: 1;
}

    .search-select-clear:hover {
        background: #f3f4f6;
        color: #111827;
    }

.search-select-list {
    position: absolute;
    z-index: 1050;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: min(50vh, 20rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    margin: 0;
    padding: .25rem 0;
    list-style: none;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: .75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
}

.search-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    min-height: 44px;            /* comfortable tap target */
    padding: .5rem 1rem;
    cursor: pointer;
    user-select: none;
}

    .search-select-option:hover,
    .search-select-option.is-highlighted {
        background: #eef4fc;
    }

    .search-select-option.is-selected {
        font-weight: 600;
        color: #1b6ec2;
    }

    .search-select-option mark {
        padding: 0;
        background: transparent;
        color: inherit;
        font-weight: 700;
        text-decoration: underline;
        text-decoration-color: #93c5fd;
        text-underline-offset: 2px;
    }

.search-select-check {
    color: #1b6ec2;
}

.search-select-empty {
    padding: .75rem 1rem;
    color: #6b7280;
    font-size: .9rem;
}

/* ---- Language switch (EN | ΕΛ) ---- */

.top-row-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-width: 0;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 2px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
}

.lang-switch-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    min-height: 1.9rem;
    padding: 0 .45rem;
    border-radius: 999px;
    color: #6b7280;
    font-size: .75rem;
    font-weight: 700;
    text-decoration: none !important;
}

    .lang-switch-item:hover {
        color: #052767;
    }

    .lang-switch-item.is-active {
        background: #052767;
        color: #fff !important;
    }

/* Sign-in pages: centred under the card */
.lang-switch-auth {
    align-self: center;
    margin-bottom: 1rem;
}

/* ---- Small utilities ---- */

.min-w-0 { min-width: 0; }

@media (min-width: 768px) {
    .w-md-auto { width: auto !important; }
}

/* ---- Header: account chip ---- */

.login-display {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.account-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    max-width: 14rem;
    color: inherit;
    text-decoration: none;
}

.account-chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.avatar {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: #1b6ec2;
    color: #fff;
    font-weight: 700;
}

.avatar-lg {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.4rem;
}

.account-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: #e8f1fb;
    color: #1b6ec2;
    font-size: 1.6rem;
}

.account-badge-success {
    background: #e7f6ec;
    color: #198754;
}

/* ---- Manage account ---- */

.manage-wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem 0 2rem;
}

.manage-title {
    margin-bottom: 1rem;
}

.manage-grid {
    display: grid;
    gap: 1rem;
}

.manage-content {
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
}

/* Phones: horizontally scrollable tabs */
.manage-nav {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: .25rem;
    scroll-snap-type: x proximity;
}

    .manage-nav::-webkit-scrollbar {
        display: none;
    }

.manage-nav-link {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: .6rem 1rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    white-space: nowrap;
    font-size: .95rem;
}

    .manage-nav-link.active {
        background: #1b6ec2;
        color: #fff;
    }

.manage-nav-danger {
    color: #b02a37;
}

/* Tablets / desktop: vertical menu next to content */
@media (min-width: 768px) {
    .manage-grid {
        grid-template-columns: 220px 1fr;
        align-items: start;
    }

    .manage-nav {
        flex-direction: column;
        overflow: visible;
    }

    .manage-nav-link {
        border-radius: .5rem;
        background: transparent;
    }

        .manage-nav-link:hover {
            background: #f3f4f6;
        }
}

.signin-methods .list-group-item {
    padding: .85rem 1rem;
}

/* ---- Mobile-first touch & layout tweaks ---- */

/* Comfortable tap targets (Apple/Google recommend >= 44-48px) */
.account-wrapper .btn,
.manage-wrapper .btn:not(.btn-sm),
.provider-btn {
    min-height: 48px;
}

.form-check-input {
    width: 1.25em;
    height: 1.25em;
}

/* 16px inputs prevent iOS Safari from zooming in on focus */
.form-control, .form-select {
    font-size: 1rem;
}

@media (max-width: 575.98px) {
    /* Full-bleed account card on phones: no floating box, more room */
    .account-wrapper {
        padding: .5rem 0 calc(1.5rem + env(safe-area-inset-bottom));
    }

    .account-card {
        border: none;
        box-shadow: none !important;
        border-radius: 0;
        background: transparent;
    }

        .account-card .card-body {
            padding: .75rem 0 !important;
        }

    .manage-wrapper {
        padding-top: .5rem;
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }

    .manage-content .card-body {
        padding: 1.25rem 1rem;
    }

    .content {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}
