.role-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.role-sidebar {
    position: sticky;
    top: 94px;

    min-height: calc(100vh - 130px);

    padding: 20px;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: var(--surface);
}

.role-sidebar-header {
    padding-bottom: 18px;
    margin-bottom: 18px;

    border-bottom: 1px solid var(--border);
}

.role-name {
    display: block;

    font-weight: 700;
    font-size: 16px;
}

.role-online {
    display: block;

    margin-top: 5px;

    color: var(--success);

    font-size: 12px;
    font-weight: 600;
}

.role-label {
    display: block;

    margin-top: 5px;

    color: var(--text-muted);

    font-size: 12px;
}

.role-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.role-nav-link {
    padding: 11px 12px;

    border-radius: 10px;

    color: var(--text-muted);

    font-size: 14px;
    font-weight: 600;

    transition: 0.2s;
}

.role-nav-link:hover {
    background: var(--surface-light);
    color: var(--text);
}

.role-content {
    min-width: 0;
}

@media (max-width: 900px) {

    .role-layout {
        grid-template-columns: 1fr;
    }

    .role-sidebar {
        position: static;

        min-height: auto;
    }

    .role-nav {
        flex-direction: row;
        overflow-x: auto;

        padding-bottom: 4px;
    }

    .role-nav-link {
        white-space: nowrap;
    }
}

@media (max-width: 640px) {

    .role-sidebar {
        padding: 14px;
    }

    .role-layout {
        gap: 18px;
    }
}
.service-status-control {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 14px;

    margin-top: 12px;
    padding: 10px 12px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.025);
}


.role-online {
    margin: 0;

    color: var(--success);

    font-size: 13px;
    font-weight: 700;

    transition: color 0.25s ease;
}


.role-online.offline {
    color: var(--text-muted);
}


.service-status-toggle {
    position: relative;

    width: 48px;
    height: 28px;

    flex-shrink: 0;

    padding: 0;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: #272b33;

    cursor: pointer;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


.service-status-toggle:hover {
    border-color: rgba(255, 255, 255, 0.22);
}


.service-status-toggle.active {
    border-color: rgba(34, 197, 94, 0.45);

    background: rgba(34, 197, 94, 0.9);

    box-shadow:
        0 0 0 3px rgba(34, 197, 94, 0.10),
        0 0 18px rgba(34, 197, 94, 0.15);
}


.service-status-toggle:disabled {
    cursor: wait;
    opacity: 0.55;
}


.service-status-toggle-dot {
    position: absolute;

    top: 3px;
    left: 3px;

    width: 20px;
    height: 20px;

    border-radius: 50%;

    background: #ffffff;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.35);

    transition:
        transform 0.25s ease;
}


.service-status-toggle.active
.service-status-toggle-dot {
    transform: translateX(20px);
}
/* ==========================================
   SIDEBAR COUNTERS
========================================== */

.dispatcher-sidebar a,
.sidebar a {
    position: relative;
}


.sidebar-count {
    display: none;

    align-items: center;
    justify-content: center;

    margin-left: auto;

    min-width: 22px;
    height: 22px;

    padding: 0 7px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 700;
    line-height: 1;

    background: rgba(107, 114, 128, 0.14);

    color: var(--text-secondary);

    transition:
        transform 0.18s ease,
        opacity 0.18s ease;
}


.sidebar-count-visible {
    display: inline-flex;
}


.sidebar-count[data-count-type="available"].sidebar-count-visible {
    background: rgba(59, 130, 246, 0.14);

    color: rgb(37, 99, 235);
}


.sidebar-count[data-count-type="active"].sidebar-count-visible {
    background: rgba(34, 197, 94, 0.14);

    color: rgb(22, 163, 74);
}


@media (prefers-color-scheme: dark) {

    .sidebar-count[data-count-type="available"].sidebar-count-visible {
        background: rgba(59, 130, 246, 0.2);

        color: rgb(96, 165, 250);
    }


    .sidebar-count[data-count-type="active"].sidebar-count-visible {
        background: rgba(34, 197, 94, 0.2);

        color: rgb(74, 222, 128);
    }
}