.route-creator-shell {
    display: flex;
    height: calc(100vh - 88px);
    min-height: 640px;
    margin: -1.5rem -1.5rem 0;
    background: #f5f7fb;
    overflow: hidden;
}

.route-creator-panel {
    width: min(440px, 42vw);
    min-width: 360px;
    background: #ffffff;
    border-right: 1px solid #e9edf3;
    display: flex;
    flex-direction: column;
    box-shadow: 8px 0 32px rgba(24, 28, 50, 0.06);
    z-index: 2;
}

.route-creator-panel-header {
    padding: 1.75rem 1.75rem 1rem;
    border-bottom: 1px solid #eff2f5;
}

.route-creator-panel-header h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: #181c32;
    margin: 0 0 0.35rem;
}

.route-creator-panel-header p {
    margin: 0;
    color: #7e8299;
    font-size: 0.92rem;
}

.route-creator-form {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.75rem 1.75rem;
}

.route-creator-field {
    margin-bottom: 1.1rem;
}

.route-creator-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #7e8299;
    margin-bottom: 0.45rem;
}

.route-creator-input-wrap {
    position: relative;
}

.route-creator-input {
    width: 100%;
    border: 1px solid #e4e6ef;
    border-radius: 0.85rem;
    padding: 0.95rem 1rem 0.95rem 2.85rem;
    font-size: 0.98rem;
    color: #181c32;
    background: #fafbfc;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.route-creator-input:focus {
    outline: none;
    border-color: #1b84ff;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(27, 132, 255, 0.12);
}

.route-creator-input.is-invalid {
    border-color: #f1416c;
    box-shadow: 0 0 0 3px rgba(241, 65, 108, 0.1);
}

.route-creator-input.is-valid {
    border-color: #50cd89;
}

.route-creator-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.route-creator-input-icon.start {
    background: #50cd89;
    box-shadow: 0 0 0 4px rgba(80, 205, 137, 0.18);
}

.route-creator-input-icon.end {
    background: #181c32;
    border-radius: 2px;
    width: 11px;
    height: 11px;
}

.route-creator-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: #ffffff;
    border: 1px solid #e9edf3;
    border-radius: 0.85rem;
    box-shadow: 0 12px 32px rgba(24, 28, 50, 0.12);
    max-height: 240px;
    overflow-y: auto;
    z-index: 20;
}

.route-creator-suggestion {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 0.85rem 1rem;
    color: #3f4254;
    cursor: pointer;
}

.route-creator-suggestion:hover,
.route-creator-suggestion.active {
    background: #f1f8ff;
}

.route-creator-suggestion strong {
    display: block;
    color: #181c32;
    font-size: 0.95rem;
}

.route-creator-suggestion span {
    display: block;
    font-size: 0.8rem;
    color: #7e8299;
    margin-top: 0.15rem;
}

.route-creator-swap-row {
    display: flex;
    justify-content: center;
    margin: -0.35rem 0 0.55rem;
}

.route-creator-swap-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #e4e6ef;
    background: #ffffff;
    color: #5e6278;
    box-shadow: 0 4px 12px rgba(24, 28, 50, 0.08);
    cursor: pointer;
}

.route-creator-swap-btn:hover {
    color: #1b84ff;
    border-color: #1b84ff;
}

.route-creator-summary {
    margin-top: 1.25rem;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #f8fbff 0%, #f3f7ff 100%);
    border: 1px solid #dfe9ff;
}

.route-creator-summary-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7e8299;
    margin-bottom: 0.75rem;
}

.route-creator-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.route-creator-summary-item {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 0.8rem;
    padding: 0.75rem 0.85rem;
}

.route-creator-summary-item small {
    display: block;
    color: #7e8299;
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.route-creator-summary-item strong {
    color: #181c32;
    font-size: 1.05rem;
}

.route-creator-actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
}

.route-creator-actions .btn-primary {
    flex: 1;
    border-radius: 0.85rem;
    padding: 0.95rem 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #181c32 0%, #2f3652 100%);
    border: none;
}

.route-creator-actions .btn-primary:disabled {
    opacity: 0.55;
}

.route-creator-actions .btn-light {
    border-radius: 0.85rem;
    padding: 0.95rem 1rem;
    font-weight: 700;
}

.route-creator-hint {
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: #7e8299;
}

.route-creator-return-toggle {
    padding: 0.95rem 1rem;
    border-radius: 0.85rem;
    background: #f8fafc;
    border: 1px solid #e9edf3;
}

.route-creator-return-toggle .form-check-label {
    font-size: 0.92rem;
}

.route-creator-error {
    margin-top: 0.45rem;
    font-size: 0.82rem;
    color: #f1416c;
}

.route-creator-saved {
    border-top: 1px solid #eff2f5;
    padding: 1rem 1.75rem 1.5rem;
    background: #fafbfc;
    max-height: 240px;
    overflow-y: auto;
}

.route-creator-saved h3 {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7e8299;
    font-weight: 800;
    margin: 0 0 0.85rem;
}

.route-creator-saved-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid #edf0f5;
}

.route-creator-saved-item:last-child {
    border-bottom: none;
}

.route-creator-saved-item strong {
    display: block;
    color: #181c32;
    font-size: 0.95rem;
}

.route-creator-saved-item span {
    display: block;
    color: #7e8299;
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.route-creator-map-wrap {
    flex: 1 1 auto;
    position: relative;
    min-width: 0;
    min-height: 0;
    align-self: stretch;
    background: #e9edf3;
}

.route-creator-map-host {
    position: absolute;
    inset: 0;
}

.route-creator-map-canvas {
    position: absolute;
    inset: 0;
}

.route-creator-map-canvas .mapboxgl-map,
.route-creator-map-canvas .mapboxgl-canvas-container,
.route-creator-map-canvas canvas.mapboxgl-canvas {
    width: 100% !important;
    height: 100% !important;
}

.route-creator-map-toolbar {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.route-creator-map-toolbar button {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(24, 28, 50, 0.14);
    color: #181c32;
    font-size: 18px;
    cursor: pointer;
}

.route-creator-map-toolbar button:hover {
    background: #181c32;
    color: #ffffff;
}

.route-creator-map-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 3;
    background: rgba(24, 28, 50, 0.88);
    color: #ffffff;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.route-creator-map-badge.pick-start {
    background: rgba(80, 205, 137, 0.92);
    color: #0f1f17;
}

.route-creator-map-badge.pick-end {
    background: rgba(24, 28, 50, 0.92);
}

@media (max-width: 1100px) {
    .route-creator-shell {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }

    .route-creator-panel {
        width: 100%;
        min-width: 0;
        border-right: none;
        border-bottom: 1px solid #e9edf3;
    }

    .route-creator-map-wrap {
        height: 420px;
    }
}
