.control-panel__header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.control-panel__header h1 {
    margin: 0;
    min-width: 0;
    font-size: 24px;
    line-height: 1.12;
}

.page-title__subtitle {
    margin: 6px 0 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.45;
}

.site-switcher {
    position: fixed;
    inset: 0 auto auto 0;
    z-index: 1200;
    pointer-events: none;
}

.site-switcher__backdrop {
    position: fixed;
    inset: 0;
    display: block;
    overflow: visible;
    isolation: auto;
    width: auto;
    height: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: rgba(15, 23, 42, 0.18);
    color: transparent;
    box-shadow: none;
    cursor: default;
    letter-spacing: 0;
    opacity: 0;
    pointer-events: none;
    transform: none;
    transition: opacity 0.22s ease;
    appearance: none;
    -webkit-appearance: none;
    z-index: 0;
}

.site-switcher__backdrop:hover,
.site-switcher__backdrop:active,
.site-switcher__backdrop:focus {
    background: rgba(15, 23, 42, 0.18);
    box-shadow: none;
    transform: none;
    outline: none;
}

.site-switcher__backdrop::before,
.site-switcher__backdrop::after {
    content: none;
    display: none !important;
}

.site-switcher__toggle {
    width: 54px;
    height: 54px;
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    isolation: auto;
    z-index: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #cfd2d6;
    padding: 0;
    cursor: pointer;
    flex: 0 0 auto;
    box-shadow: none;
    letter-spacing: 0;
    transform: none;
    transition: none;
}

.site-switcher__toggle:hover,
.site-switcher__toggle:active {
    background: transparent;
    box-shadow: none;
    transform: none;
    color: #cfd2d6;
}

.site-switcher__toggle::before,
.site-switcher__toggle::after {
    content: none;
    display: none !important;
}

.site-switcher__toggle:focus-visible {
    outline: 3px solid rgba(var(--primary-color-rgb), 0.26);
    outline-offset: 4px;
    border-radius: 8px;
}

.site-switcher__toggle-icon {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    line-height: 1;
}

.site-switcher__panel {
    position: fixed;
    top: 76px;
    left: 20px;
    width: 220px;
    height: auto;
    max-height: calc(100vh - 96px);
    padding: 10px;
    border-radius: var(--border-radius);
    background: var(--card-background);
    box-shadow: var(--box-shadow);
    overflow-y: auto;
    pointer-events: auto;
    transform: translateX(-28px);
    opacity: 0;
    transition:
        transform 0.22s ease,
        opacity 0.22s ease;
    z-index: 1;
}

body.site-switcher-open .site-switcher__panel {
    transform: translateX(0);
    opacity: 1;
}

.site-switcher__menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
}

.site-switcher__link {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 9px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-switcher__link:hover,
.site-switcher__link.is-active {
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
}

@media (max-width: 1200px) {
    .site-switcher__panel {
        width: min(160px, calc(100vw - 24px));
        top: 12px;
        left: 12px;
        height: calc(100vh - 24px);
    }

    body.site-switcher-open .site-switcher__backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    body.site-switcher-open .main-container,
    body.site-switcher-open .missions-container {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    body.site-switcher-open {
        overflow: hidden;
    }

    .control-panel__header {
        gap: 12px;
        margin-bottom: 18px;
    }

    .site-switcher__backdrop {
        background: rgba(0, 0, 0, 0.42);
        transition: opacity 0.24s ease;
    }

    .site-switcher__backdrop:hover,
    .site-switcher__backdrop:active,
    .site-switcher__backdrop:focus {
        background: rgba(0, 0, 0, 0.42);
    }

    body.site-switcher-open .site-switcher__backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .site-switcher__toggle {
        width: 44px;
        height: 44px;
    }

    .site-switcher__toggle-icon {
        font-size: 32px;
    }

    .site-switcher__panel {
        top: 78px;
        left: 16px;
        width: min(240px, calc(100vw - 32px));
        height: auto;
        max-height: calc(100dvh - 96px);
        padding: 10px;
        border-radius: 14px;
        box-shadow: var(--box-shadow);
        transform: translateY(-10px);
        opacity: 1;
        transition:
            transform 0.22s ease,
            opacity 0.22s ease;
    }

    body.site-switcher-open .site-switcher__panel {
        transform: translateY(0);
        opacity: 1;
    }

    .site-switcher__menu {
        gap: 4px;
        padding-top: 0;
    }

    .site-switcher__link {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 0 12px;
        border-radius: 10px;
        font-size: 16px;
    }

    .site-switcher__link:hover,
    .site-switcher__link.is-active {
        background: rgba(var(--primary-color-rgb), 0.1);
    }
}
