/* ============================================
   НОВАЯ ПАНЕЛЬ ПЕРЕКЛЮЧЕНИЯ
   ============================================ */


.switcher {
    position: relative;
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(135, 130, 148, 0.322);
    border-radius: 16px 16px 0 0;
    padding: 5px;
    width: 100%;
    max-width: 100%;
    justify-content: space-around;
}

/* Анимированная подложка (пилюля) */
.pill-wrapper {
    position: absolute;
    top: 5px;
    left: 5px;
    height: calc(100% - 10px);
    pointer-events: none;
    z-index: 1;
    transition: none;
}

.pill {
    position: relative;
    height: 100%;
    border-radius: 999px;
    background: none;
    border: 1.5px solid rgba(156, 156, 156, 0.45);

    box-shadow:
        inset 0 1.5px 2px rgba(200, 180, 255, 0.2),
        inset 0 -1px 2px rgba(0, 0, 0, 0.3),
        0 4px 20px rgba(148, 145, 158, 0.45);
    transform-origin: center center;
    transition: box-shadow 0.4s ease;
    will-change: transform, width, left;
}


.pill-sheen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(to bottom, rgba(200, 180, 255, 0.15), transparent);
    pointer-events: none;
}

/* Кнопки-вкладки */
.tab {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: 999px;
    cursor: pointer;
    color: rgba(160, 140, 210, 0.65);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 0.3s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    background: transparent;
    border: none;
    font-family: inherit;
    flex: 1;
    justify-content: center;
}

.tab:hover {
    color: rgba(200, 185, 255, 0.9);
}

.tab:active {
    opacity: 0.75;
}

.tab.active {
    color: rgba(230, 220, 255, 1);
}

.tab-icon {
    font-size: 16px;
    line-height: 1;
}

/* Медиа-запросы для мобильных устройств */
@media (max-width: 520px) {
    #table-switch-container {
        padding: 1.5rem 0.5rem;
    }

    .tab {
        padding: 9px 12px;
        font-size: 11px;
        gap: 4px;
    }

    .tab-label {
        display: none;
    }

    .tab-icon {
        font-size: 18px;
    }

    .switcher {
        padding: 4px;
        max-width: 100%;
    }

    .pill-wrapper {
        top: 4px;
        height: calc(100% - 8px);
    }
}

/* Для очень маленьких экранов */
@media (max-width: 380px) {
    .tab {
        padding: 7px 8px;
        font-size: 10px;
    }

    .tab-icon {
        font-size: 16px;
    }
}