/* User Roles Chipset */
.roles-chipset {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.role-chip {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.7);
    user-select: none;
}

.role-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.role-chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.role-chip.active:hover {
    filter: brightness(1.1);
}

/* Vertical Fit Refinement */
#user-modal .modal-glass.large {
    height: 90vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

#user-modal .modal-body {
    flex: 1;
    overflow: hidden;
    /* Body doesn't scroll, children do */
    display: flex;
    flex-direction: column;
}

/* Split View Layout for Maintenance Modals */
.maintenance-split {
    display: flex;
    gap: 30px;
    flex: 1;
    min-height: 0;
}

.management-list-pane {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 20px;
    min-height: 0;
}

.management-form-pane {
    flex: 1;
    overflow-y: auto;
    padding-left: 10px;
    height: 100%;
    padding-bottom: 20px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-shrink: 0;
}

#new-user-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

#new-user-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.3);
}

#new-user-btn i {
    font-size: 0.8rem;
    color: white;
}

.mini-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 5px;
}

.mini-list-item {
    padding: 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.mini-list-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.mini-list-item.selected {
    background: var(--primary-color);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.mini-list-item i {
    font-size: 1.4rem;
    color: var(--primary-color);
}

.mini-list-item.selected i,
.mini-list-item.selected span {
    color: white !important;
}